summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-10 17:00:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-10 19:45:48 +0200
commitf4ac99f717d7365fc7d1f0adbf72a9bb4d4c8db5 (patch)
treebb263a9aa6c17ed7103078b8bdb991b6db17b265
parentloplugin:moveparam in svx (diff)
downloadcore-f4ac99f717d7365fc7d1f0adbf72a9bb4d4c8db5.tar.gz
core-f4ac99f717d7365fc7d1f0adbf72a9bb4d4c8db5.zip
loplugin:moveparam in xmlscript
Change-Id: I8c33291dae8a4f90c02f47d823b127ca4e383d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx2
-rw-r--r--desktop/source/deployment/registry/dp_backenddb.cxx2
-rw-r--r--include/xmlscript/xml_helper.hxx2
-rw-r--r--xmlscript/qa/cppunit/test.cxx2
-rw-r--r--xmlscript/source/xml_helper/xml_byteseq.cxx10
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx8
6 files changed, 13 insertions, 13 deletions
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(