summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-28 10:41:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-28 12:42:54 +0200
commit2bf18879d77b6f4e7e8b54267157741f11fb8c5b (patch)
treee82a7b0377130eebe30fbcd1a8f075e7cd2c8efd /include
parent47099350beb5d955d16776e43aa2276d4760eecb (diff)
clang-tidy modernize-pass-by-value in test
Change-Id: I375ff43a60d0058be36dd07e409027ad1dcd1bcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/test/container/xnameaccess.hxx5
-rw-r--r--include/test/container/xnamecontainer.hxx5
-rw-r--r--include/test/container/xnamed.hxx5
-rw-r--r--include/test/container/xnamereplace.hxx5
-rw-r--r--include/test/drawing/xshapedescriptor.hxx5
-rw-r--r--include/test/lang/xserviceinfo.hxx9
-rw-r--r--include/test/sheet/cellarealink.hxx5
-rw-r--r--include/test/sheet/xddelink.hxx5
-rw-r--r--include/test/sheet/xddelinks.hxx5
-rw-r--r--include/test/sheet/xnamedranges.hxx5
-rw-r--r--include/test/table/xcellrange.hxx5
-rw-r--r--include/test/unoapi_test.hxx2
-rw-r--r--include/test/util/xreplaceable.hxx5
-rw-r--r--include/test/util/xsearchable.hxx3
14 files changed, 41 insertions, 28 deletions
diff --git a/include/test/container/xnameaccess.hxx b/include/test/container/xnameaccess.hxx
index 960cf67822b9..875c2bed6098 100644
--- a/include/test/container/xnameaccess.hxx
+++ b/include/test/container/xnameaccess.hxx
@@ -15,14 +15,15 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest
{
class OOO_DLLPUBLIC_TEST XNameAccess
{
public:
- XNameAccess(const OUString& rName)
- : m_aName(rName)
+ XNameAccess(OUString aName)
+ : m_aName(std::move(aName))
{
}
diff --git a/include/test/container/xnamecontainer.hxx b/include/test/container/xnamecontainer.hxx
index 221ef2a4473a..5cc4bab1250c 100644
--- a/include/test/container/xnamecontainer.hxx
+++ b/include/test/container/xnamecontainer.hxx
@@ -17,6 +17,7 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
+#include <utility>
namespace apitest
{
@@ -29,8 +30,8 @@ public:
{
}
// removes given entry
- XNameContainer(const OUString& rNameToRemove)
- : m_aName(rNameToRemove)
+ XNameContainer(OUString aNameToRemove)
+ : m_aName(std::move(aNameToRemove))
{
}
diff --git a/include/test/container/xnamed.hxx b/include/test/container/xnamed.hxx
index ff4c4616df36..17ef070de947 100644
--- a/include/test/container/xnamed.hxx
+++ b/include/test/container/xnamed.hxx
@@ -17,14 +17,15 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest
{
class OOO_DLLPUBLIC_TEST XNamed
{
public:
- XNamed(const OUString& rTestName)
- : m_aTestName(rTestName)
+ XNamed(OUString aTestName)
+ : m_aTestName(std::move(aTestName))
{
}
diff --git a/include/test/container/xnamereplace.hxx b/include/test/container/xnamereplace.hxx
index ecf2fac83798..dcecaf971755 100644
--- a/include/test/container/xnamereplace.hxx
+++ b/include/test/container/xnamereplace.hxx
@@ -17,14 +17,15 @@
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Any.hxx>
+#include <utility>
namespace apitest
{
class OOO_DLLPUBLIC_TEST XNameReplace
{
public:
- XNameReplace(const OUString& rName)
- : m_aReplacementName(rName)
+ XNameReplace(OUString aName)
+ : m_aReplacementName(std::move(aName))
{
}
diff --git a/include/test/drawing/xshapedescriptor.hxx b/include/test/drawing/xshapedescriptor.hxx
index 2c99e7e9c197..4bbebac3f4cf 100644
--- a/include/test/drawing/xshapedescriptor.hxx
+++ b/include/test/drawing/xshapedescriptor.hxx
@@ -14,14 +14,15 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest
{
class OOO_DLLPUBLIC_TEST XShapeDescriptor
{
public:
- XShapeDescriptor(const OUString& rShapeType)
- : m_aShapeType(rShapeType)
+ XShapeDescriptor(OUString aShapeType)
+ : m_aShapeType(std::move(aShapeType))
{
}
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
diff --git a/include/test/lang/xserviceinfo.hxx b/include/test/lang/xserviceinfo.hxx
index 14ce4eaaaa61..29cc17dc07bd 100644
--- a/include/test/lang/xserviceinfo.hxx
+++ b/include/test/lang/xserviceinfo.hxx
@@ -10,6 +10,7 @@
#ifndef INCLUDED_TEST_LANG_XSERVICEINFO_HXX
#define INCLUDED_TEST_LANG_XSERVICEINFO_HXX
+#include <utility>
#include <vector>
#include <com/sun/star/uno/XInterface.hpp>
@@ -23,13 +24,13 @@ namespace apitest
class OOO_DLLPUBLIC_TEST XServiceInfo
{
public:
- XServiceInfo(const OUString& rImplName, const OUString& rServiceName)
- : m_aImplName(rImplName)
+ XServiceInfo(OUString aImplName, const OUString& rServiceName)
+ : m_aImplName(std::move(aImplName))
{
m_aServiceNames.push_back(rServiceName);
}
- XServiceInfo(const OUString& rImplName, const std::vector<OUString> rServiceNames)
- : m_aImplName(rImplName)
+ XServiceInfo(OUString aImplName, const std::vector<OUString> rServiceNames)
+ : m_aImplName(std::move(aImplName))
, m_aServiceNames(rServiceNames)
{
}
diff --git a/include/test/sheet/cellarealink.hxx b/include/test/sheet/cellarealink.hxx
index eb3a13547c0a..bf300be30fdb 100644
--- a/include/test/sheet/cellarealink.hxx
+++ b/include/test/sheet/cellarealink.hxx
@@ -15,14 +15,15 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest
{
class OOO_DLLPUBLIC_TEST CellAreaLink
{
public:
- CellAreaLink(const OUString& rFileURL)
- : m_aFileURL(rFileURL)
+ CellAreaLink(OUString aFileURL)
+ : m_aFileURL(std::move(aFileURL))
{
}
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
diff --git a/include/test/sheet/xddelink.hxx b/include/test/sheet/xddelink.hxx
index 854462a0dc1c..3cc86812ee1d 100644
--- a/include/test/sheet/xddelink.hxx
+++ b/include/test/sheet/xddelink.hxx
@@ -14,6 +14,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest
{
@@ -27,8 +28,8 @@ public:
void testGetTopic();
protected:
- explicit XDDELink(OUString const& rURL)
- : m_URL(rURL)
+ explicit XDDELink(OUString aURL)
+ : m_URL(std::move(aURL))
{
}
~XDDELink() {}
diff --git a/include/test/sheet/xddelinks.hxx b/include/test/sheet/xddelinks.hxx
index 8ceb07cdd39e..accfa3aadb7d 100644
--- a/include/test/sheet/xddelinks.hxx
+++ b/include/test/sheet/xddelinks.hxx
@@ -16,14 +16,15 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest
{
class OOO_DLLPUBLIC_TEST XDDELinks
{
public:
- XDDELinks(const OUString& rTopic)
- : m_aTopic(rTopic)
+ XDDELinks(OUString aTopic)
+ : m_aTopic(std::move(aTopic))
{
}
diff --git a/include/test/sheet/xnamedranges.hxx b/include/test/sheet/xnamedranges.hxx
index 8d02773f8eaf..90b8ab6c2fcb 100644
--- a/include/test/sheet/xnamedranges.hxx
+++ b/include/test/sheet/xnamedranges.hxx
@@ -17,6 +17,7 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest
{
@@ -30,8 +31,8 @@ public:
}
// removes given entry
- XNamedRanges(const OUString& rNameToRemove)
- : maNameToRemove(rNameToRemove)
+ XNamedRanges(OUString aNameToRemove)
+ : maNameToRemove(std::move(aNameToRemove))
{
}
diff --git a/include/test/table/xcellrange.hxx b/include/test/table/xcellrange.hxx
index 78f965e9d951..94db1130b21e 100644
--- a/include/test/table/xcellrange.hxx
+++ b/include/test/table/xcellrange.hxx
@@ -15,6 +15,7 @@
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Reference.hxx>
+#include <utility>
namespace apitest
{
@@ -25,8 +26,8 @@ public:
: m_aRangeName("A1:A1")
{
}
- XCellRange(const OUString& aRangeName)
- : m_aRangeName(aRangeName)
+ XCellRange(OUString aRangeName)
+ : m_aRangeName(std::move(aRangeName))
{
}
diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 82f04cf465eb..ac5bd0675b12 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -24,7 +24,7 @@
class OOO_DLLPUBLIC_TEST UnoApiTest : public test::BootstrapFixture, public unotest::MacrosTest
{
public:
- UnoApiTest(const OUString& path);
+ UnoApiTest(OUString path);
void createFileURL(std::u16string_view aFileBase, OUString& rFilePath);
diff --git a/include/test/util/xreplaceable.hxx b/include/test/util/xreplaceable.hxx
index 9f33feeb5d9d..5773e75aecb2 100644
--- a/include/test/util/xreplaceable.hxx
+++ b/include/test/util/xreplaceable.hxx
@@ -12,14 +12,15 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
+#include <utility>
namespace apitest {
class OOO_DLLPUBLIC_TEST XReplaceable
{
public:
- XReplaceable( const OUString& rSearchString, const OUString& rReplaceString):
- maSearchString(rSearchString), maReplaceString(rReplaceString) {}
+ XReplaceable( OUString aSearchString, OUString aReplaceString):
+ maSearchString(std::move(aSearchString)), maReplaceString(std::move(aReplaceString)) {}
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void testCreateReplaceDescriptor();
diff --git a/include/test/util/xsearchable.hxx b/include/test/util/xsearchable.hxx
index 9f45f051edff..0f78ceb18cb1 100644
--- a/include/test/util/xsearchable.hxx
+++ b/include/test/util/xsearchable.hxx
@@ -13,13 +13,14 @@
#include <test/testdllapi.hxx>
#include <com/sun/star/uno/Reference.hxx>
+#include <utility>
namespace apitest {
class OOO_DLLPUBLIC_TEST XSearchable
{
public:
- XSearchable(const OUString& rString, sal_Int32 nCount) : maSearchString(rString), mnCount(nCount) {}
+ XSearchable(OUString aString, sal_Int32 nCount) : maSearchString(std::move(aString)), mnCount(nCount) {}
XSearchable() : maSearchString("SearchString"), mnCount(1) {}
virtual ~XSearchable();