basegfx/source/polygon/b2dpolypolygoncutter.cxx                       |    4 
++--
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |    2 +-
 desktop/source/deployment/registry/dp_backenddb.cxx                   |    2 +-
 include/basegfx/polygon/b2dpolypolygoncutter.hxx                      |    2 +-
 include/xmlscript/xml_helper.hxx                                      |    2 +-
 svgio/source/svgreader/svgclippathnode.cxx                            |    2 +-
 svgio/source/svgreader/svgstyleattributes.cxx                         |    4 
++--
 vcl/skia/gdiimpl.cxx                                                  |    4 
++--
 xmlscript/qa/cppunit/test.cxx                                         |    2 +-
 xmlscript/source/xml_helper/xml_byteseq.cxx                           |   10 
+++++-----
 xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx                      |    8 
++++----
 11 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit eea7af10d9ff1407c90abc233f6ea470fa832b1c
Author:     Noel Grandin <[email protected]>
AuthorDate: Sun Oct 10 14:40:50 2021 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Oct 10 19:46:01 2021 +0200

    loplugin:moveparam in basegfx
    
    Change-Id: I73414e94358114ff0d475f13855db8c4c493b6f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123334
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx 
b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index f314fcb716cc..9d3cd7b450df 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -1067,9 +1067,9 @@ namespace basegfx::utils
             }
         }
 
-        B2DPolyPolygon mergeToSinglePolyPolygon(const B2DPolyPolygonVector& 
rInput)
+        B2DPolyPolygon mergeToSinglePolyPolygon(B2DPolyPolygonVector&& rInput)
         {
-            B2DPolyPolygonVector aInput(rInput);
+            B2DPolyPolygonVector aInput(std::move(rInput));
 
             // first step: prepareForPolygonOperation and simple merge of 
non-overlapping
             // PolyPolygons for speedup; this is possible for the wanted 
OR-operation
diff --git a/include/basegfx/polygon/b2dpolypolygoncutter.hxx 
b/include/basegfx/polygon/b2dpolypolygoncutter.hxx
index a5f4ba6626af..864d84643281 100644
--- a/include/basegfx/polygon/b2dpolypolygoncutter.hxx
+++ b/include/basegfx/polygon/b2dpolypolygoncutter.hxx
@@ -136,7 +136,7 @@ namespace basegfx::utils
 
             @return A single tools::PolyPolygon containing the Or-merged result
         */
-        BASEGFX_DLLPUBLIC B2DPolyPolygon mergeToSinglePolyPolygon(const 
B2DPolyPolygonVector& rInput);
+        BASEGFX_DLLPUBLIC B2DPolyPolygon 
mergeToSinglePolyPolygon(B2DPolyPolygonVector&& rInput);
 
 } // end of namespace basegfx::utils
 
diff --git a/svgio/source/svgreader/svgclippathnode.cxx 
b/svgio/source/svgreader/svgclippathnode.cxx
index 31ac632d33dc..7f4b4beae8ec 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -148,7 +148,7 @@ namespace svgio::svgreader
                 if(nSize > 1)
                 {
                     // merge to single clipPolyPolygon
-                    aClipPolyPolygon = 
basegfx::utils::mergeToSinglePolyPolygon(rResult);
+                    aClipPolyPolygon = 
basegfx::utils::mergeToSinglePolyPolygon(std::vector(rResult));
                 }
                 else
                 {
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index 62133fbb11fb..8a61d2e9dfe6 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -303,7 +303,7 @@ namespace svgio::svgreader
 
                 if(!aTextFillVector.empty())
                 {
-                    aMergedArea = 
basegfx::utils::mergeToSinglePolyPolygon(aTextFillVector);
+                    aMergedArea = 
basegfx::utils::mergeToSinglePolyPolygon(std::move(aTextFillVector));
                 }
             }
 
@@ -762,7 +762,7 @@ namespace svgio::svgreader
                 {
                     const basegfx::B2DPolyPolygon aMergedArea(
                         basegfx::utils::mergeToSinglePolyPolygon(
-                            rLineFillVector));
+                            std::vector(rLineFillVector)));
 
                     if(aMergedArea.count())
                     {
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index c580471a9608..00bbbe6660c3 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1070,8 +1070,8 @@ void SkiaSalGraphicsImpl::checkPendingDrawing()
         {
             for (basegfx::B2DPolyPolygon& p : polygons)
                 roundPolygonPoints(p);
-            
performDrawPolyPolygon(basegfx::utils::mergeToSinglePolyPolygon(polygons), 
transparency,
-                                   true);
+            
performDrawPolyPolygon(basegfx::utils::mergeToSinglePolyPolygon(std::move(polygons)),
+                                   transparency, true);
         }
     }
 }
commit f4ac99f717d7365fc7d1f0adbf72a9bb4d4c8db5
Author:     Noel Grandin <[email protected]>
AuthorDate: Sun Oct 10 17:00:15 2021 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Oct 10 19:45:48 2021 +0200

    loplugin:moveparam in xmlscript
    
    Change-Id: I8c33291dae8a4f90c02f47d823b127ca4e383d61
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123338
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git 
a/desktop/source/deployment/registry/configuration/dp_configuration.cxx 
b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 7949ab353b0a..03eedff5fbab 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -680,7 +680,7 @@ OUString replaceOrigin(
     }
 
     ucbhelper::Content(newUrl, xCmdEnv, xContext).writeStream(
-        xmlscript::createInputStream(filtered), true);
+        xmlscript::createInputStream(std::move(filtered)), true);
     out_replaced = true;
     return newUrl;
 }
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx 
b/desktop/source/deployment/registry/dp_backenddb.cxx
index 1cd3007b25a3..28effd95c8f5 100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.cxx
@@ -54,7 +54,7 @@ void BackendDb::save()
     xDataControl->start();
 
     const Reference<css::io::XInputStream> xData(
-        ::xmlscript::createInputStream(bytes));
+        ::xmlscript::createInputStream(std::move(bytes)));
     ::ucbhelper::Content ucbDb(m_urlDb, nullptr, m_xContext);
     ucbDb.writeStream(xData, true /*replace existing*/);
 }
diff --git a/include/xmlscript/xml_helper.hxx b/include/xmlscript/xml_helper.hxx
index e2b7fee3b3a6..4baed88da3b2 100644
--- a/include/xmlscript/xml_helper.hxx
+++ b/include/xmlscript/xml_helper.hxx
@@ -106,7 +106,7 @@ private:
 
 XMLSCRIPT_DLLPUBLIC css::uno::Reference< css::io::XInputStream >
 createInputStream(
-    std::vector<sal_Int8> const & rInData );
+    std::vector<sal_Int8>&& rInData );
 
 XMLSCRIPT_DLLPUBLIC css::uno::Reference< css::io::XInputStream >
 createInputStream(
diff --git a/xmlscript/qa/cppunit/test.cxx b/xmlscript/qa/cppunit/test.cxx
index 572fae867423..aa8bd934ea14 100644
--- a/xmlscript/qa/cppunit/test.cxx
+++ b/xmlscript/qa/cppunit/test.cxx
@@ -92,7 +92,7 @@ Reference<container::XNameContainer> 
XmlScriptTest::importFile(std::u16string_vi
             "com.sun.star.awt.UnoControlDialogModel", mxComponentContext),
         UNO_QUERY);
 
-    ::xmlscript::importDialogModel(::xmlscript::createInputStream(bytes), 
xDialogModel,
+    
::xmlscript::importDialogModel(::xmlscript::createInputStream(std::move(bytes)),
 xDialogModel,
                                    mxComponentContext, nullptr);
 
     Reference<lang::XComponent> xDialogModelComp(xDialogModel, UNO_QUERY);
diff --git a/xmlscript/source/xml_helper/xml_byteseq.cxx 
b/xmlscript/source/xml_helper/xml_byteseq.cxx
index 693ef301384e..2ae8ecea1661 100644
--- a/xmlscript/source/xml_helper/xml_byteseq.cxx
+++ b/xmlscript/source/xml_helper/xml_byteseq.cxx
@@ -41,8 +41,8 @@ class BSeqInputStream
     sal_Int32 _nPos;
 
 public:
-    explicit BSeqInputStream( std::vector<sal_Int8> const & rSeq )
-        : _seq( rSeq )
+    explicit BSeqInputStream( std::vector<sal_Int8>&& rSeq )
+        : _seq( std::move(rSeq) )
         , _nPos( 0 )
         {}
 
@@ -134,9 +134,9 @@ void BSeqOutputStream::closeOutput()
 {
 }
 
-Reference< io::XInputStream > createInputStream( std::vector<sal_Int8> const & 
rInData )
+Reference< io::XInputStream > createInputStream( std::vector<sal_Int8>&& 
rInData )
 {
-    return new BSeqInputStream( rInData );
+    return new BSeqInputStream( std::move(rInData) );
 }
 
 Reference< io::XInputStream > createInputStream( const sal_Int8* pData, int 
len )
@@ -145,7 +145,7 @@ Reference< io::XInputStream > createInputStream( const 
sal_Int8* pData, int len
     if (len != 0) {
         memcpy( rInData.data(), pData, len);
     }
-    return new BSeqInputStream( rInData );
+    return new BSeqInputStream( std::move(rInData) );
 }
 
 Reference< io::XOutputStream > createOutputStream( std::vector<sal_Int8> * 
pOutData )
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
index 6b3d9c425417..be3605de59cd 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
@@ -40,8 +40,8 @@ class InputStreamProvider
     std::vector<sal_Int8> const _bytes;
 
 public:
-    explicit InputStreamProvider( std::vector<sal_Int8> const & rBytes )
-        : _bytes( rBytes )
+    explicit InputStreamProvider( std::vector<sal_Int8>&& rBytes )
+        : _bytes( std::move(rBytes) )
     {
     }
 
@@ -53,7 +53,7 @@ public:
 
 uno::Reference< io::XInputStream > InputStreamProvider::createInputStream()
 {
-    return ::xmlscript::createInputStream( _bytes );
+    return ::xmlscript::createInputStream( std::vector(_bytes) );
 }
 
 uno::Reference< io::XInputStreamProvider > exportDialogModel(
@@ -69,7 +69,7 @@ uno::Reference< io::XInputStreamProvider > exportDialogModel(
     uno::Reference< xml::sax::XExtendedDocumentHandler > xHandler(xWriter, 
uno::UNO_QUERY_THROW);
     exportDialogModel( xHandler, xDialogModel, xDocument );
 
-    return new InputStreamProvider( aBytes );
+    return new InputStreamProvider( std::move(aBytes) );
 }
 
 void importDialogModel(

Reply via email to