summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-03-30 16:51:13 +0300
committerTor Lillqvist <tml@collabora.com>2015-03-30 16:51:24 +0300
commit32423f6f877397be5d3358cbcba5f105e9715a1f (patch)
tree4ace95ca2dc0e7cb054a83970a83b32aa0f26c8a
parent45cfdae9b195d5fa89dd46c6035fc36d63ebc515 (diff)
WaE: passing [...] by value, rather pass by reference
Change-Id: Ic733f9b5dcb55bb8120c3652a60300914fab04ea
-rw-r--r--include/unotest/macros_test.hxx2
-rw-r--r--unotest/source/cpp/macros_test.cxx16
2 files changed, 9 insertions, 9 deletions
diff --git a/include/unotest/macros_test.hxx b/include/unotest/macros_test.hxx
index ae006fc3570d..6ec5c25167df 100644
--- a/include/unotest/macros_test.hxx
+++ b/include/unotest/macros_test.hxx
@@ -28,7 +28,7 @@ class OOO_DLLPUBLIC_UNOTEST MacrosTest
{
public:
css::uno::Reference< css::lang::XComponent > loadFromDesktop(const OUString& rURL, const OUString& rDocService = OUString(),
- css::uno::Sequence<css::beans::PropertyValue> extra_args = css::uno::Sequence<css::beans::PropertyValue>() );
+ const css::uno::Sequence<css::beans::PropertyValue>& rExtra_args = css::uno::Sequence<css::beans::PropertyValue>() );
protected:
css::uno::Reference< css::frame::XDesktop2> mxDesktop;
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index 02b14ba9f3e3..7dce6ef54567 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -19,7 +19,7 @@ using namespace css;
namespace unotest {
-uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString& rURL, const OUString& rDocService, uno::Sequence<beans::PropertyValue> extraArgs)
+uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString& rURL, const OUString& rDocService, const uno::Sequence<beans::PropertyValue>& rExtraArgs)
{
CPPUNIT_ASSERT_MESSAGE("no desktop", mxDesktop.is());
uno::Reference<frame::XComponentLoader> xLoader = uno::Reference<frame::XComponentLoader>(mxDesktop, uno::UNO_QUERY);
@@ -39,16 +39,16 @@ uno::Reference<css::lang::XComponent> MacrosTest::loadFromDesktop(const OUString
args[1].State = beans::PropertyState_DIRECT_VALUE;
}
- if (extraArgs.getLength() > 0)
+ if (rExtraArgs.getLength() > 0)
{
sal_Int32 aSize = args.getLength();
- args.realloc(aSize + extraArgs.getLength());
- for (int i = 0; i < extraArgs.getLength(); i++)
+ args.realloc(aSize + rExtraArgs.getLength());
+ for (int i = 0; i < rExtraArgs.getLength(); i++)
{
- args[aSize + i].Name = extraArgs[i].Name;
- args[aSize + i].Handle = extraArgs[i].Handle;
- args[aSize + i].Value = extraArgs[i].Value;
- args[aSize + i].State = extraArgs[i].State;
+ args[aSize + i].Name = rExtraArgs[i].Name;
+ args[aSize + i].Handle = rExtraArgs[i].Handle;
+ args[aSize + i].Value = rExtraArgs[i].Value;
+ args[aSize + i].State = rExtraArgs[i].State;
}
}