summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-29 09:50:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-31 08:33:13 +0200
commit93bea3531cff7f1e35a4c982836afbabfa587a6f (patch)
tree24df21ed573eb3548756e6b294ef29ca71017bd4 /writerperfect
parentd75c5c1f61a174b3b333e9db6536ab15cc37d00b (diff)
clang-tidy modernize-pass-by-value in writer*
Change-Id: Ib08c971eb3e859e7b04cdd408af7966d83c2955b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137585 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/inc/ImportFilter.hxx5
-rw-r--r--writerperfect/source/calc/MSWorksCalcImportFilter.cxx5
-rw-r--r--writerperfect/source/common/DirectoryStream.cxx7
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx15
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.hxx6
5 files changed, 21 insertions, 17 deletions
diff --git a/writerperfect/inc/ImportFilter.hxx b/writerperfect/inc/ImportFilter.hxx
index f2cfb614d1b4..9923b834625b 100644
--- a/writerperfect/inc/ImportFilter.hxx
+++ b/writerperfect/inc/ImportFilter.hxx
@@ -23,6 +23,7 @@
#include <cppuhelper/implbase.hxx>
#include <unotools/mediadescriptor.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <xmloff/xmlimp.hxx>
@@ -43,8 +44,8 @@ class ImportFilterImpl
css::lang::XInitialization>
{
public:
- ImportFilterImpl(const css::uno::Reference<css::uno::XComponentContext>& rxContext)
- : mxContext(rxContext)
+ ImportFilterImpl(css::uno::Reference<css::uno::XComponentContext> xContext)
+ : mxContext(std::move(xContext))
{
}
diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
index b0118eaad5b7..bc13f9fc74b5 100644
--- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx
@@ -32,6 +32,7 @@
#include <iostream>
#include <map>
+#include <utility>
using namespace ::com::sun::star;
@@ -71,8 +72,8 @@ class FolderStream : public librevenge::RVNGInputStream
{
public:
//! constructor
- explicit FolderStream(const css::uno::Reference<css::ucb::XContent>& xContent)
- : m_xContent(xContent)
+ explicit FolderStream(css::uno::Reference<css::ucb::XContent> xContent)
+ : m_xContent(std::move(xContent))
{
}
diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx
index 28c38daa686b..9664fbee9750 100644
--- a/writerperfect/source/common/DirectoryStream.cxx
+++ b/writerperfect/source/common/DirectoryStream.cxx
@@ -39,6 +39,7 @@
#include <DirectoryStream.hxx>
#include <WPXSvInputStream.hxx>
+#include <utility>
namespace io = com::sun::star::io;
namespace sdbc = com::sun::star::sdbc;
@@ -93,13 +94,13 @@ uno::Reference<io::XInputStream> findStream(ucbhelper::Content& rContent, std::u
struct DirectoryStream::Impl
{
- explicit Impl(const uno::Reference<ucb::XContent>& rxContent);
+ explicit Impl(uno::Reference<ucb::XContent> xContent);
uno::Reference<ucb::XContent> xContent;
};
-DirectoryStream::Impl::Impl(const uno::Reference<ucb::XContent>& rxContent)
- : xContent(rxContent)
+DirectoryStream::Impl::Impl(uno::Reference<ucb::XContent> _xContent)
+ : xContent(std::move(_xContent))
{
}
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 3364b0509d7e..45625927e3a1 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -29,6 +29,7 @@
#include <memory>
#include <string_view>
#include <unordered_map>
+#include <utility>
#include <vector>
namespace writerperfect
@@ -96,7 +97,7 @@ OUString concatPath(std::u16string_view lhs, const OUString& rhs)
struct OLEStreamData
{
- OLEStreamData(const OString& rName, const OString& rvngName);
+ OLEStreamData(OString aName, OString rvngName);
tools::SvRef<SotStorageStream> stream;
@@ -155,9 +156,9 @@ public:
bool mbInitialized;
};
-OLEStreamData::OLEStreamData(const OString& rName, const OString& rvngName)
- : name(rName)
- , RVNGname(rvngName)
+OLEStreamData::OLEStreamData(OString aName, OString rvngName)
+ : name(std::move(aName))
+ , RVNGname(std::move(rvngName))
{
}
@@ -265,7 +266,7 @@ namespace
{
struct ZipStreamData
{
- explicit ZipStreamData(const OString& rName);
+ explicit ZipStreamData(OString aName);
Reference<XInputStream> xStream;
@@ -309,8 +310,8 @@ public:
bool mbInitialized;
};
-ZipStreamData::ZipStreamData(const OString& rName)
- : aName(rName)
+ZipStreamData::ZipStreamData(OString _aName)
+ : aName(std::move(_aName))
{
}
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx
index a9fc331ae3a9..92a90699d8db 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.hxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.hxx
@@ -16,6 +16,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
/* This component will be instantiated for both import or export. Whether it calls
* setSourceDocument or setTargetDocument determines which Impl function the filter
@@ -32,9 +33,8 @@ class WordPerfectImportFilter
bool importImpl(const css::uno::Sequence<css::beans::PropertyValue>& aDescriptor);
public:
- explicit WordPerfectImportFilter(
- const css::uno::Reference<css::uno::XComponentContext>& rxContext)
- : mxContext(rxContext)
+ explicit WordPerfectImportFilter(css::uno::Reference<css::uno::XComponentContext> xContext)
+ : mxContext(std::move(xContext))
{
}