summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-14 09:58:40 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-05-14 08:10:22 +0000
commit248145f99e95cc30bb6231a8e5ea4e294f147040 (patch)
treec3b5c1e226cc631cde530f2cfb7df2d46f00b8c9
parent671eb12dee290607ed66f3b325f28e7bd4695cba (diff)
Find places where uno::Sequence is passed by value.
Implement a clang plugin to find them, and clean up existing code to pass them by reference. Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8 Reviewed-on: https://gerrit.libreoffice.org/9351 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/localizationmgr.cxx4
-rw-r--r--basctl/source/inc/localizationmgr.hxx8
-rw-r--r--chart2/source/tools/ErrorBar.cxx2
-rw-r--r--chart2/source/tools/RangeHighlighter.cxx2
-rw-r--r--compilerplugins/clang/passsequencebyref.cxx63
-rw-r--r--framework/inc/uielement/statusbarmerger.hxx2
-rw-r--r--framework/inc/uielement/toolbarmerger.hxx4
-rw-r--r--framework/source/fwe/classes/addonmenu.cxx6
-rw-r--r--framework/source/fwe/dispatch/interaction.cxx4
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx2
-rw-r--r--framework/source/uielement/toolbarmerger.cxx4
-rw-r--r--include/framework/addonmenu.hxx2
-rw-r--r--include/framework/interaction.hxx2
-rw-r--r--include/oox/export/drawingml.hxx6
-rw-r--r--include/sax/fshelper.hxx2
-rw-r--r--include/sfx2/dinfdlg.hxx2
-rw-r--r--include/svl/documentlockfile.hxx2
-rw-r--r--include/test/sheet/xdatapilottable2.hxx2
-rw-r--r--include/unotools/configitem.hxx4
-rw-r--r--include/unotools/lingucfg.hxx2
-rw-r--r--include/vcl/canvastools.hxx2
-rw-r--r--linguistic/source/dlistimp.hxx4
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--oox/source/export/chartexport.cxx2
-rw-r--r--oox/source/export/drawingml.cxx6
-rw-r--r--sax/source/tools/fastserializer.cxx2
-rw-r--r--sax/source/tools/fastserializer.hxx4
-rw-r--r--sax/source/tools/fshelper.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyli.hxx2
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx4
-rw-r--r--sfx2/source/appl/appuno.cxx2
-rw-r--r--sfx2/source/control/statcach.cxx11
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--sfx2/source/inc/fltoptint.hxx2
-rw-r--r--sfx2/source/inc/statcach.hxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx2
-rw-r--r--svl/source/misc/documentlockfile.cxx2
-rw-r--r--svx/source/form/fmexch.cxx2
-rw-r--r--svx/source/inc/fmexch.hxx2
-rw-r--r--sw/source/core/uibase/inc/mmconfigitem.hxx2
-rw-r--r--sw/source/core/uibase/inc/olmenu.hxx2
-rw-r--r--sw/source/core/uibase/lingu/olmenu.cxx2
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx2
-rw-r--r--sw/source/filter/ww8/docxsdrexport.hxx2
-rw-r--r--test/source/sheet/xdatapilottable2.cxx4
-rw-r--r--unotools/source/config/configitem.cxx4
-rw-r--r--unotools/source/config/lingucfg.cxx2
-rw-r--r--vcl/source/helper/canvastools.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx12
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx8
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx2
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx2
-rw-r--r--writerfilter/source/dmapper/SdtHelper.hxx2
-rw-r--r--writerfilter/source/dmapper/ThemeTable.cxx2
-rw-r--r--writerfilter/source/dmapper/ThemeTable.hxx2
-rw-r--r--xmlsecurity/inc/xmlsecurity/biginteger.hxx2
-rw-r--r--xmlsecurity/source/xmlsec/biginteger.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx2
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx2
61 files changed, 154 insertions, 92 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 878dad9f43c4..470219c5aba6 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -867,7 +867,7 @@ extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
const ::com::sun::star::lang::Locale& rLocaleRight );
std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq
- ( Sequence< lang::Locale > aFirstSeq, Sequence< lang::Locale > aSecondSeq )
+ ( const Sequence< lang::Locale >& aFirstSeq, const Sequence< lang::Locale >& aSecondSeq )
{
std::vector< lang::Locale > avRet;
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 2c5efb23d962..c34ac55a60a5 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -646,7 +646,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
}
-void LocalizationMgr::handleAddLocales( Sequence< Locale > aLocaleSeq )
+void LocalizationMgr::handleAddLocales( const Sequence< Locale >& aLocaleSeq )
{
const Locale* pLocales = aLocaleSeq.getConstArray();
sal_Int32 nLocaleCount = aLocaleSeq.getLength();
@@ -678,7 +678,7 @@ void LocalizationMgr::handleAddLocales( Sequence< Locale > aLocaleSeq )
}
-void LocalizationMgr::handleRemoveLocales( Sequence< Locale > aLocaleSeq )
+void LocalizationMgr::handleRemoveLocales( const Sequence< Locale >& aLocaleSeq )
{
const Locale* pLocales = aLocaleSeq.getConstArray();
sal_Int32 nLocaleCount = aLocaleSeq.getLength();
diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx
index f6a33ff4ab7a..a23c6c8486cd 100644
--- a/basctl/source/inc/localizationmgr.hxx
+++ b/basctl/source/inc/localizationmgr.hxx
@@ -82,11 +82,11 @@ public:
void handleTranslationbar( void );
- void handleAddLocales( ::com::sun::star::uno::Sequence
- < ::com::sun::star::lang::Locale > aLocaleSeq );
+ void handleAddLocales( const ::com::sun::star::uno::Sequence
+ < ::com::sun::star::lang::Locale >& aLocaleSeq );
- void handleRemoveLocales( ::com::sun::star::uno::Sequence
- < ::com::sun::star::lang::Locale > aLocaleSeq );
+ void handleRemoveLocales( const ::com::sun::star::uno::Sequence
+ < ::com::sun::star::lang::Locale >& aLocaleSeq );
void handleSetDefaultLocale( ::com::sun::star::lang::Locale aLocale );
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 4bf53386effa..b6c1844cb0ab 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -176,7 +176,7 @@ void ErrorBar::setPropertyValue( const OUString& rPropName, const uno::Any& rAny
namespace {
-OUString getSourceRangeStrFromLabeledSequences( uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences, bool bPositive )
+OUString getSourceRangeStrFromLabeledSequences( const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > >& aSequences, bool bPositive )
{
const OUString aRolePrefix( "error-bars" );
OUString aDirection;
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index cc7e431c0b47..8a623988fdd1 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -42,7 +42,7 @@ namespace
void lcl_fillRanges(
Sequence< chart2::data::HighlightedRange > & rOutRanges,
- Sequence< OUString > aRangeStrings,
+ const Sequence< OUString >& aRangeStrings,
sal_Int32 nPreferredColor = PREFERED_DEFAULT_COLOR,
sal_Int32 nIndex = -1 )
{
diff --git a/compilerplugins/clang/passsequencebyref.cxx b/compilerplugins/clang/passsequencebyref.cxx
new file mode 100644
index 000000000000..851307bb2710
--- /dev/null
+++ b/compilerplugins/clang/passsequencebyref.cxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <string>
+
+#include "plugin.hxx"
+
+// Find places where com::sun::star::uno::Sequence is passed by value.
+// It's not very efficient, because that copies a whole list
+// They should rather be passed by reference.
+
+namespace {
+
+class PassSequenceByRef:
+ public RecursiveASTVisitor<PassSequenceByRef>, public loplugin::Plugin
+{
+public:
+ explicit PassSequenceByRef(InstantiationData const & data): Plugin(data) {}
+
+ virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
+
+ bool VisitFunctionDecl(const FunctionDecl * decl);
+};
+
+bool PassSequenceByRef::VisitFunctionDecl(const FunctionDecl * functionDecl) {
+ if (ignoreLocation(functionDecl)) {
+ return true;
+ }
+ // only warn on the definition/prototype of the function,
+ // not on the function implementation
+ if (functionDecl->isThisDeclarationADefinition() && functionDecl->getPreviousDecl() != nullptr) {
+ return true;
+ }
+ unsigned n = functionDecl->getNumParams();
+ for (unsigned i = 0; i != n; ++i) {
+ const ParmVarDecl * pvDecl = functionDecl->getParamDecl(i);
+ QualType t1 { pvDecl->getType() };
+ if (!t1->isClassType()) {
+ continue;
+ }
+ string typeName = t1.getUnqualifiedType().getCanonicalType().getAsString();
+ if (typeName.find("class com::sun::star::uno::Sequence") == 0) {
+ report(
+ DiagnosticsEngine::Warning,
+ "passing css::uno::Sequence by value, rather pass by reference .e.g. 'const css::uno::Sequence&' " + typeName,
+ pvDecl->getSourceRange().getBegin())
+ << pvDecl->getSourceRange();
+ }
+ }
+ return true;
+}
+
+loplugin::Plugin::Registration< PassSequenceByRef > X("passsequencebyref");
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/uielement/statusbarmerger.hxx b/framework/inc/uielement/statusbarmerger.hxx
index 9fff10744f8a..27387171f66d 100644
--- a/framework/inc/uielement/statusbarmerger.hxx
+++ b/framework/inc/uielement/statusbarmerger.hxx
@@ -49,7 +49,7 @@ public:
static bool IsCorrectContext( const ::rtl::OUString& aContext,
const ::rtl::OUString& aModuleIdentifier );
- static bool ConvertSeqSeqToVector( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > &rSequence,
+ static bool ConvertSeqSeqToVector( const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& rSequence,
AddonStatusbarItemContainer& rContainer );
static sal_uInt16 FindReferencePos( StatusBar* pStatusbar,
diff --git a/framework/inc/uielement/toolbarmerger.hxx b/framework/inc/uielement/toolbarmerger.hxx
index 87c51bc5df6a..fe1ab31c49da 100644
--- a/framework/inc/uielement/toolbarmerger.hxx
+++ b/framework/inc/uielement/toolbarmerger.hxx
@@ -71,10 +71,10 @@ class ToolBarMerger
public:
static bool IsCorrectContext( const OUString& aContext, const OUString& aModuleIdentifier );
- static bool ConvertSeqSeqToVector( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > rSequence,
+ static bool ConvertSeqSeqToVector( const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& rSequence,
AddonToolbarItemContainer& rContainer );
- static void ConvertSequenceToValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rSequence,
+ static void ConvertSequenceToValues( const css::uno::Sequence< css::beans::PropertyValue >& rSequence,
OUString& rCommandURL,
OUString& rLabel,
OUString& rImageIdentifier,
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx
index cccc53c760f7..eda31f5fc97c 100644
--- a/framework/source/fwe/classes/addonmenu.cxx
+++ b/framework/source/fwe/classes/addonmenu.cxx
@@ -263,9 +263,9 @@ void AddonMenuManager::MergeAddonPopupMenus( const Reference< XFrame >& rFrame,
// Insert the menu and sub menu entries into pCurrentMenu with the aAddonMenuDefinition provided
void AddonMenuManager::BuildMenu( PopupMenu* pCurrentMenu,
MenuType nSubMenuType,
- sal_uInt16 nInsPos,
- sal_uInt16& nUniqueMenuId,
- Sequence< Sequence< PropertyValue > > aAddonMenuDefinition,
+ sal_uInt16 nInsPos,
+ sal_uInt16& nUniqueMenuId,
+ const Sequence< Sequence< PropertyValue > >& aAddonMenuDefinition,
const Reference< XFrame >& rFrame,
const Reference< XModel >& rModel )
{
diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx
index 8bb4634ae285..3f06725c5b8b 100644
--- a/framework/source/fwe/dispatch/interaction.cxx
+++ b/framework/source/fwe/dispatch/interaction.cxx
@@ -194,7 +194,7 @@ class InteractionRequest_Impl : public ::cppu::WeakImplHelper1< ::com::sun::star
public:
InteractionRequest_Impl( const ::com::sun::star::uno::Any& aRequest,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > lContinuations )
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >& lContinuations )
{
m_aRequest = aRequest;
m_lContinuations = lContinuations;
@@ -217,7 +217,7 @@ uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL Inter
}
uno::Reference < task::XInteractionRequest > InteractionRequest::CreateRequest(
- const uno::Any& aRequest, const uno::Sequence< uno::Reference< task::XInteractionContinuation > > lContinuations )
+ const uno::Any& aRequest, const uno::Sequence< uno::Reference< task::XInteractionContinuation > >& lContinuations )
{
return new InteractionRequest_Impl( aRequest, lContinuations );
}
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index 66f6c1d7eb95..3d8945d2966a 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -107,7 +107,7 @@ MenuStyleItem MenuItemStyles[ ] = {
sal_Int32 nMenuStyleItemEntries = (sizeof (MenuItemStyles) / sizeof (MenuItemStyles[0]));
-static void ExtractMenuParameters( const Sequence< PropertyValue > rProp,
+static void ExtractMenuParameters( const Sequence< PropertyValue >& rProp,
OUString& rCommandURL,
OUString& rLabel,
OUString& rHelpURL,
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index 12f3a531123b..42d139dead33 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -108,7 +108,7 @@ bool ToolBarMerger::IsCorrectContext(
*/
bool ToolBarMerger::ConvertSeqSeqToVector(
- const uno::Sequence< uno::Sequence< beans::PropertyValue > > rSequence,
+ const uno::Sequence< uno::Sequence< beans::PropertyValue > >& rSequence,
AddonToolbarItemContainer& rContainer )
{
sal_Int32 nLen( rSequence.getLength() );
@@ -180,7 +180,7 @@ bool ToolBarMerger::ConvertSeqSeqToVector(
*/
void ToolBarMerger::ConvertSequenceToValues(
- const uno::Sequence< beans::PropertyValue > rSequence,
+ const uno::Sequence< beans::PropertyValue >& rSequence,
OUString& rCommandURL,
OUString& rLabel,
OUString& rImageIdentifier,
diff --git a/include/framework/addonmenu.hxx b/include/framework/addonmenu.hxx
index 8d12399e7df4..d948cfe3472d 100644
--- a/include/framework/addonmenu.hxx
+++ b/include/framework/addonmenu.hxx
@@ -106,7 +106,7 @@ class FWE_DLLPUBLIC AddonMenuManager
MenuType nSubMenuType,
sal_uInt16 nInsPos,
sal_uInt16& nUniqueMenuId,
- com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > > aAddonMenuDefinition,
+ const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > >& aAddonMenuDefinition,
const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame,
const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel );
diff --git a/include/framework/interaction.hxx b/include/framework/interaction.hxx
index 175a7fc84b55..415f7a7c9f97 100644
--- a/include/framework/interaction.hxx
+++ b/include/framework/interaction.hxx
@@ -92,7 +92,7 @@ class FWE_DLLPUBLIC InteractionRequest
public:
static com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionRequest >
CreateRequest( const ::com::sun::star::uno::Any& aRequest,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > lContinuations );
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >& lContinuations );
};
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 2b3eb9eec8e7..9153196a3fef 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -104,7 +104,7 @@ protected:
/// If bRelPathToMedia is true add "../" to image folder path while adding the image relationship
OUString WriteImage( const OUString& rURL, bool bRelPathToMedia = false);
- void WriteStyleProperties( sal_Int32 nTokenId, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aProperties );
+ void WriteStyleProperties( sal_Int32 nTokenId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProperties );
const char* GetComponentDir();
const char* GetRelationCompPrefix();
@@ -130,11 +130,11 @@ public:
void WriteConnectorConnections( EscherConnectorListEntry& rConnectorEntry, sal_Int32 nStartID, sal_Int32 nEndID );
void WriteSolidFill( sal_uInt32 nColor, sal_Int32 nAlpha = MAX_PERCENT );
- void WriteSolidFill( const OUString& sSchemeName, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aTransformations );
+ void WriteSolidFill( const OUString& sSchemeName, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aTransformations );
void WriteSolidFill( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet );
void WriteGradientFill( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet );
void WriteGradientFill( ::com::sun::star::awt::Gradient rGradient );
- void WriteGrabBagGradientFill( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aGradientStops, ::com::sun::star::awt::Gradient rGradient);
+ void WriteGrabBagGradientFill( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aGradientStops, ::com::sun::star::awt::Gradient rGradient);
void WriteBlipOrNormalFill( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet,
const OUString& rURLPropName );
diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx
index 9f2f9aad90e4..e3d3f052e39a 100644
--- a/include/sax/fshelper.hxx
+++ b/include/sax/fshelper.hxx
@@ -139,7 +139,7 @@ public:
FastAttributeList *createAttrList();
- void mark( ::com::sun::star::uno::Sequence< sal_Int32 > aOrder =
+ void mark( const ::com::sun::star::uno::Sequence< sal_Int32 >& aOrder =
::com::sun::star::uno::Sequence< sal_Int32 >() );
void mergeTopMarks( MergeMarksEnum eMergeType = MERGE_MARKS_APPEND );
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index aab6bda0e1e3..95eab18df1d3 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -169,7 +169,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::document::CmisProperty >
GetCmisProperties() const;
- void SetCmisProperties(::com::sun::star::uno::Sequence< ::com::sun::star::document::CmisProperty > cmisProps );
+ void SetCmisProperties(const ::com::sun::star::uno::Sequence< ::com::sun::star::document::CmisProperty >& cmisProps );
virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const SAL_OVERRIDE;
virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
diff --git a/include/svl/documentlockfile.hxx b/include/svl/documentlockfile.hxx
index 51d85c696513..e698a0e28249 100644
--- a/include/svl/documentlockfile.hxx
+++ b/include/svl/documentlockfile.hxx
@@ -39,7 +39,7 @@ class SVL_DLLPUBLIC DocumentLockFile : public LockFileCommon
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > OpenStream();
- void WriteEntryToStream( ::com::sun::star::uno::Sequence< OUString > aEntry, ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xStream );
+ void WriteEntryToStream( const ::com::sun::star::uno::Sequence< OUString >& aEntry, ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xStream );
public:
DocumentLockFile( const OUString& aOrigURL );
diff --git a/include/test/sheet/xdatapilottable2.hxx b/include/test/sheet/xdatapilottable2.hxx
index 2bc17a53d918..517ddadf24b9 100644
--- a/include/test/sheet/xdatapilottable2.hxx
+++ b/include/test/sheet/xdatapilottable2.hxx
@@ -35,7 +35,7 @@ public:
protected:
private:
- bool checkDrillDownSheetContent(css::uno::Reference< css::sheet::XSpreadsheet >, css::uno::Sequence< css::uno::Sequence < css::uno::Any > > aData);
+ bool checkDrillDownSheetContent(css::uno::Reference< css::sheet::XSpreadsheet >, const css::uno::Sequence< css::uno::Sequence < css::uno::Any > >& aData);
void getOutputRanges(css::uno::Reference< css::sheet::XDataPilotTable2 >);
void buildDataFields(css::uno::Reference< css::sheet::XDataPilotTable2 >);
diff --git a/include/unotools/configitem.hxx b/include/unotools/configitem.hxx
index 12965fd31b82..a08df2da504d 100644
--- a/include/unotools/configitem.hxx
+++ b/include/unotools/configitem.hxx
@@ -149,9 +149,9 @@ namespace utl
bool ClearNodeElements(const OUString& rNode,
com::sun::star::uno::Sequence< OUString >& rElements);
// change or add members to a set
- bool SetSetProperties(const OUString& rNode, com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > rValues);
+ bool SetSetProperties(const OUString& rNode, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rValues);
// remove, change or add members of a set
- bool ReplaceSetProperties(const OUString& rNode, com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > rValues);
+ bool ReplaceSetProperties(const OUString& rNode, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rValues);
// add a new node without setting any properties
bool AddNode(const OUString& rNode, const OUString& rNewNode);
diff --git a/include/unotools/lingucfg.hxx b/include/unotools/lingucfg.hxx
index c55f55f5a1fc..82c56f4c7eae 100644
--- a/include/unotools/lingucfg.hxx
+++ b/include/unotools/lingucfg.hxx
@@ -174,7 +174,7 @@ public:
bool
ReplaceSetProperties(
const OUString &rNode,
- com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > rValues );
+ const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rValues );
com::sun::star::uno::Any
GetProperty( const OUString &rPropertyName ) const;
diff --git a/include/vcl/canvastools.hxx b/include/vcl/canvastools.hxx
index 49afcaf31414..774f09ff50e0 100644
--- a/include/vcl/canvastools.hxx
+++ b/include/vcl/canvastools.hxx
@@ -127,7 +127,7 @@ namespace vcl
@param xColorSpace
Color space to convert from
*/
- Color VCL_DLLPUBLIC doubleSequenceToColor( const ::com::sun::star::uno::Sequence< double > rColor,
+ Color VCL_DLLPUBLIC doubleSequenceToColor( const ::com::sun::star::uno::Sequence< double >& rColor,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace >& xColorSpace );
diff --git a/linguistic/source/dlistimp.hxx b/linguistic/source/dlistimp.hxx
index 8dfeb3f0a2e6..24a8fd915365 100644
--- a/linguistic/source/dlistimp.hxx
+++ b/linguistic/source/dlistimp.hxx
@@ -83,9 +83,7 @@ class DicList :
return aDicList;
}
- void LaunchEvent(sal_Int16 nEvent, com::sun::star::uno::Sequence<
- ::com::sun::star::linguistic2::XDictionary > xDic);
- void SearchForDictionaries( DictionaryVec_t &rDicList,
+ void SearchForDictionaries( DictionaryVec_t &rDicList,
const OUString &rDicDir, bool bIsWritePath );
sal_Int32 GetDicPos(const com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionary > &xDic);
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index bb8e114757c5..14d50fc0f3c6 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -544,7 +544,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const util::DateTime& rTi
}
static void
-writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, Sequence< OUString > aItems )
+writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const Sequence< OUString >& aItems )
{
if( aItems.getLength() == 0 )
return;
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 78c6ea985b23..68bb9f0c2e7c 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3096,7 +3096,7 @@ const char* getErrorBarStyle(sal_Int32 nErrorBarStyle)
}
Reference< chart2::data::XDataSequence> getLabeledSequence(
- uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences,
+ const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > >& aSequences,
bool bPositive )
{
const OUString aRolePrefix( "error-bars" );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index eff1d2bc6efd..2f9f7f275eee 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -221,7 +221,7 @@ void DrawingML::WriteSolidFill( sal_uInt32 nColor, sal_Int32 nAlpha )
mpFS->endElementNS( XML_a, XML_solidFill );
}
-void DrawingML::WriteSolidFill( const OUString& sSchemeName, Sequence< PropertyValue > aTransformations )
+void DrawingML::WriteSolidFill( const OUString& sSchemeName, const Sequence< PropertyValue >& aTransformations )
{
mpFS->startElementNS( XML_a, XML_solidFill, FSEND );
WriteColor( sSchemeName, aTransformations );
@@ -360,7 +360,7 @@ void DrawingML::WriteGradientFill( Reference< XPropertySet > rXPropSet )
}
}
-void DrawingML::WriteGrabBagGradientFill( Sequence< PropertyValue > aGradientStops, awt::Gradient rGradient )
+void DrawingML::WriteGrabBagGradientFill( const Sequence< PropertyValue >& aGradientStops, awt::Gradient rGradient )
{
// write back the original gradient
mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
@@ -2027,7 +2027,7 @@ void DrawingML::WriteFill( Reference< XPropertySet > xPropSet )
return;
}
-void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, Sequence< PropertyValue > aProperties )
+void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, const Sequence< PropertyValue >& aProperties )
{
if( aProperties.getLength() > 0 )
{
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 4005a252b49f..1eea16e99bf7 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -272,7 +272,7 @@ namespace sax_fastparser {
}
}
- void FastSaxSerializer::mark( Int32Sequence aOrder )
+ void FastSaxSerializer::mark( const Int32Sequence& aOrder )
{
if ( aOrder.hasElements() )
{
diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx
index 89e9da8895db..4544fc3515e3 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/source/tools/fastserializer.hxx
@@ -128,7 +128,7 @@ public:
mergeTopMarks( true ), mergeTopMarks(), /r, /p
and you are done.
*/
- void mark( Int32Sequence aOrder = Int32Sequence() );
+ void mark( const Int32Sequence& aOrder = Int32Sequence() );
/** Merge 2 topmost marks.
@@ -183,7 +183,7 @@ private:
Int32Sequence maOrder;
public:
- ForSort( Int32Sequence aOrder ) :
+ ForSort( const Int32Sequence& aOrder ) :
ForMerge(),
maData(),
mnCurrentElement( 0 ),
diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx
index 45f8d23c9543..c19bd4b8c359 100644
--- a/sax/source/tools/fshelper.cxx
+++ b/sax/source/tools/fshelper.cxx
@@ -151,7 +151,7 @@ FastSerializerHelper* FastSerializerHelper::writeId(sal_Int32 tokenId)
return mpSerializer->getOutputStream();
}
-void FastSerializerHelper::mark( Sequence< sal_Int32 > aOrder )
+void FastSerializerHelper::mark( const Sequence< sal_Int32 >& aOrder )
{
mpSerializer->mark( aOrder );
}
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index fd468ba1e0cf..5ccdf9bcf50b 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -495,7 +495,7 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext(
return pContext;
}
-void XMLTableStyleContext::ApplyCondFormat( uno::Sequence<table::CellRangeAddress> xCellRanges )
+void XMLTableStyleContext::ApplyCondFormat( const uno::Sequence<table::CellRangeAddress>& xCellRanges )
{
if(!mpCondFormat || GetScImport().HasNewCondFormatData())
return;
diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx
index ffc64b5fc86a..065e47e453b0 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -115,7 +115,7 @@ public:
SCTAB GetLastSheet() const { return nLastSheet; }
void SetLastSheet(SCTAB nNew) { nLastSheet = nNew; }
- void ApplyCondFormat( com::sun::star::uno::Sequence<com::sun::star::table::CellRangeAddress> xCellRanges );
+ void ApplyCondFormat( const com::sun::star::uno::Sequence<com::sun::star::table::CellRangeAddress>& xCellRanges );
private:
using XMLPropStyleContext::SetStyle;
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 680e86570437..3a9255818d94 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -183,7 +183,7 @@ sal_Int32 ReadThroughComponent(
const OUString& rStreamName,
Reference<uno::XComponentContext> & rxContext,
const sal_Char* pFilterName,
- Sequence<Any> rFilterArguments,
+ const Sequence<Any>& rFilterArguments,
const OUString& rName,
bool bMustBeSuccessfull,
bool bEncrypted )
@@ -325,7 +325,7 @@ sal_Int32 ReadThroughComponent(
const sal_Char* pCompatibilityStreamName,
Reference<uno::XComponentContext> & rxContext,
const sal_Char* pFilterName,
- Sequence<Any> rFilterArguments,
+ const Sequence<Any>& rFilterArguments,
const OUString& rName,
bool bMustBeSuccessfull )
{
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 3010f6efb95f..8f44b07b88f9 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1675,7 +1675,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL
RequestFilterOptions::RequestFilterOptions( uno::Reference< frame::XModel > rModel,
- uno::Sequence< beans::PropertyValue > rProperties )
+ const uno::Sequence< beans::PropertyValue >& rProperties )
{
OUString temp;
uno::Reference< uno::XInterface > temp2;
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index a21bfd88f75a..d69f34efd450 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -166,15 +166,16 @@ const ::com::sun::star::frame::FeatureStateEvent& BindDispatch_Impl::GetStatus()
return aStatus;
}
-void BindDispatch_Impl::Dispatch( uno::Sequence < beans::PropertyValue > aProps, bool bForceSynchron )
+void BindDispatch_Impl::Dispatch( const uno::Sequence < beans::PropertyValue >& aProps, bool bForceSynchron )
{
if ( xDisp.is() && aStatus.IsEnabled )
{
sal_Int32 nLength = aProps.getLength();
- aProps.realloc(nLength+1);
- aProps[nLength].Name = "SynchronMode";
- aProps[nLength].Value <<= bForceSynchron ;
- xDisp->dispatch( aURL, aProps );
+ uno::Sequence < beans::PropertyValue > aProps2 = aProps;
+ aProps2.realloc(nLength+1);
+ aProps2[nLength].Name = "SynchronMode";
+ aProps2[nLength].Value <<= bForceSynchron ;
+ xDisp->dispatch( aURL, aProps2 );
}
}
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 1fe4ff8d256c..57a5f94e31f9 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -492,7 +492,7 @@ uno::Sequence< document::CmisProperty > SfxDocumentInfoItem::GetCmisProperties()
return m_aCmisProperties;
}
-void SfxDocumentInfoItem::SetCmisProperties( Sequence< document::CmisProperty > cmisProps)
+void SfxDocumentInfoItem::SetCmisProperties( const Sequence< document::CmisProperty >& cmisProps)
{
m_aCmisProperties = cmisProps;
}
diff --git a/sfx2/source/inc/fltoptint.hxx b/sfx2/source/inc/fltoptint.hxx
index eafe21ab4a39..30f70011ae68 100644
--- a/sfx2/source/inc/fltoptint.hxx
+++ b/sfx2/source/inc/fltoptint.hxx
@@ -49,7 +49,7 @@ class RequestFilterOptions : public ::cppu::WeakImplHelper1< ::com::sun::star::t
public:
RequestFilterOptions( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > rModel,
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties );
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProperties );
bool isAbort() { return m_pAbort->wasSelected(); }
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index eb900ea00171..2e9757334862 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -56,7 +56,7 @@ public:
void Release();
const ::com::sun::star::frame::FeatureStateEvent& GetStatus() const;
- void Dispatch( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aProps, bool bForceSynchron = false );
+ void Dispatch( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aProps, bool bForceSynchron = false );
};
class SfxStateCache
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index a32d88348844..84d0a711c2e7 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -172,7 +172,7 @@ namespace
}
-static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHandler >& xHandler, const OUString& aPath, const SfxFilter* pFilter, sal_uInt32 nPasswordHash, const uno::Sequence< beans::PropertyValue > aInfo )
+static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHandler >& xHandler, const OUString& aPath, const SfxFilter* pFilter, sal_uInt32 nPasswordHash, const uno::Sequence< beans::PropertyValue >& aInfo )
{
// TODO/LATER: In future the info should replace the direct hash completely
bool bResult = ( !nPasswordHash && !aInfo.getLength() );
diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx
index 9ebb0dd927e9..cb708960c5eb 100644
--- a/svl/source/misc/documentlockfile.cxx
+++ b/svl/source/misc/documentlockfile.cxx
@@ -64,7 +64,7 @@ DocumentLockFile::~DocumentLockFile()
}
-void DocumentLockFile::WriteEntryToStream( uno::Sequence< OUString > aEntry, uno::Reference< io::XOutputStream > xOutput )
+void DocumentLockFile::WriteEntryToStream( const uno::Sequence< OUString >& aEntry, uno::Reference< io::XOutputStream > xOutput )
{
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx
index ba3c2d6d8833..48d5838b8286 100644
--- a/svx/source/form/fmexch.cxx
+++ b/svx/source/form/fmexch.cxx
@@ -215,7 +215,7 @@ namespace svxform
}
- void OControlTransferData::addHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqInterfaces)
+ void OControlTransferData::addHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& seqInterfaces)
{
m_aHiddenControlModels = seqInterfaces;
}
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
index cfee3c0b0d09..8e47403aa43e 100644
--- a/svx/source/inc/fmexch.hxx
+++ b/svx/source/inc/fmexch.hxx
@@ -186,7 +186,7 @@ namespace svxform
void buildListFromPath(SvTreeListBox* pTreeBox, SvTreeListEntry* pRoot);
// der umgekehrte Weg : wirft alles aus m_aSelectedEntries weg und baut es mittels m_aControlPaths neu auf
- void addHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqInterfaces);
+ void addHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& seqInterfaces);
// fuegt ein SVX_FML_HIDDEN_CONTROLS-Format hinzu und merk sich dafuer die uebergebenen Interfaces
// (es erfolgt KEINE Ueberpruefung, ob dadurch auch tatsaechlich nur hidden Controls bezeichnet werden, dass muss der
// Aufrufer sicherstellen)
diff --git a/sw/source/core/uibase/inc/mmconfigitem.hxx b/sw/source/core/uibase/inc/mmconfigitem.hxx
index 32a3b44dd0e2..b40e189b1c11 100644
--- a/sw/source/core/uibase/inc/mmconfigitem.hxx
+++ b/sw/source/core/uibase/inc/mmconfigitem.hxx
@@ -104,7 +104,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>
GetSelection()const;
- void SetSelection(::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > rSelection);
+ void SetSelection(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection);
void SetCurrentDBData( const SwDBData& rDBData);
const SwDBData& GetCurrentDBData() const;
diff --git a/sw/source/core/uibase/inc/olmenu.hxx b/sw/source/core/uibase/inc/olmenu.hxx
index f85b9febd0b3..084c4a50a407 100644
--- a/sw/source/core/uibase/inc/olmenu.hxx
+++ b/sw/source/core/uibase/inc/olmenu.hxx
@@ -61,7 +61,7 @@ class SW_DLLPUBLIC SwSpellPopup : public PopupMenu
Image m_aInfo16;
void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart,
- ::com::sun::star::uno::Sequence< OUString > aSeq, SwWrtShell* pWrtSh,
+ const ::com::sun::star::uno::Sequence< OUString >& aSeq, SwWrtShell* pWrtSh,
std::map< sal_Int16, OUString > &rLangTable );
using PopupMenu::Execute;
diff --git a/sw/source/core/uibase/lingu/olmenu.cxx b/sw/source/core/uibase/lingu/olmenu.cxx
index 62bbf2deaad9..62731cfbf3fb 100644
--- a/sw/source/core/uibase/lingu/olmenu.cxx
+++ b/sw/source/core/uibase/lingu/olmenu.cxx
@@ -115,7 +115,7 @@ static inline bool lcl_checkScriptType( sal_Int16 nScriptType, LanguageType nLan
void SwSpellPopup::fillLangPopupMenu(
PopupMenu *pPopupMenu,
sal_uInt16 nLangItemIdStart,
- uno::Sequence< OUString > aSeq,
+ const uno::Sequence< OUString >& aSeq,
SwWrtShell* pWrtSh,
std::map< sal_Int16, OUString > &rLangTable )
{
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 2181568681f4..4f9aa336abf2 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -791,7 +791,7 @@ void DocxSdrExport::writeDMLEffectLst(const SwFrmFmt& rFrmFmt)
}
void DocxSdrExport::writeDiagramRels(uno::Reference<xml::dom::XDocument> xDom,
- uno::Sequence< uno::Sequence< uno::Any > > xRelSeq,
+ const uno::Sequence< uno::Sequence< uno::Any > >& xRelSeq,
uno::Reference< io::XOutputStream > xOutStream, const OUString& sGrabBagProperyName,
int nAnchorId)
{
diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx
index b54cad4660b5..5b0a21d91b9f 100644
--- a/sw/source/filter/ww8/docxsdrexport.hxx
+++ b/sw/source/filter/ww8/docxsdrexport.hxx
@@ -83,7 +83,7 @@ public:
/// Writes a diagram (smartart).
void writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFrmFmt, int nAnchorId);
void writeDiagramRels(com::sun::star::uno::Reference< com::sun::star::xml::dom::XDocument> xDom,
- com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > > xRelSeq,
+ const com::sun::star::uno::Sequence< com::sun::star::uno::Sequence< com::sun::star::uno::Any > >& xRelSeq,
com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > xOutStream, const OUString& sGrabBagProperyName,
int nAnchorId);
/// Writes text frame in DML format.
diff --git a/test/source/sheet/xdatapilottable2.cxx b/test/source/sheet/xdatapilottable2.cxx
index a309e2479e76..fad98fd63036 100644
--- a/test/source/sheet/xdatapilottable2.cxx
+++ b/test/source/sheet/xdatapilottable2.cxx
@@ -250,7 +250,7 @@ table::CellAddress getLastUsedCellAddress( uno::Reference< sheet::XSpreadsheet >
}
-bool XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpreadsheet > xSheet, uno::Sequence< uno::Sequence< Any > > aData)
+bool XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpreadsheet > xSheet, const uno::Sequence< uno::Sequence< Any > >& aData)
{
table::CellAddress aLastCell = getLastUsedCellAddress(xSheet, 0, 0);
CPPUNIT_ASSERT(aData.getLength() > 0);
@@ -269,7 +269,7 @@ bool XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpread
for(sal_Int32 y = 0; y < aSheetData[x].getLength(); ++y)
{
Any& aCell1 = aSheetData[x][y];
- Any& aCell2 = aData[x][y];
+ const Any& aCell2 = aData[x][y];
CPPUNIT_ASSERT(aCell1 == aCell2);
}
}
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 59c1207b80e1..931a9a189eca 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -801,7 +801,7 @@ Sequence< OUString > lcl_extractSetPropertyNames( const Sequence< PropertyValue
// Add or change properties
bool ConfigItem::SetSetProperties(
- const OUString& rNode, Sequence< PropertyValue > rValues)
+ const OUString& rNode, const Sequence< PropertyValue >& rValues)
{
ValueCounter_Impl aCounter(m_nInValueChange);
bool bRet = true;
@@ -900,7 +900,7 @@ bool ConfigItem::SetSetProperties(
}
bool ConfigItem::ReplaceSetProperties(
- const OUString& rNode, Sequence< PropertyValue > rValues)
+ const OUString& rNode, const Sequence< PropertyValue >& rValues)
{
ValueCounter_Impl aCounter(m_nInValueChange);
bool bRet = true;
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 781f16463b87..f02b52b89d80 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -846,7 +846,7 @@ uno::Sequence< uno::Any > SvtLinguConfig::GetProperties( const uno::Sequence< OU
}
bool SvtLinguConfig::ReplaceSetProperties(
- const OUString &rNode, uno::Sequence< beans::PropertyValue > rValues )
+ const OUString &rNode, const uno::Sequence< beans::PropertyValue >& rValues )
{
return GetConfigItem().ReplaceSetProperties( rNode, rValues );
}
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index 0ef642b8f3c3..f16a5bcc96a0 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -615,7 +615,7 @@ namespace vcl
}
Color VCL_DLLPUBLIC doubleSequenceToColor(
- const uno::Sequence< double > rColor,
+ const uno::Sequence< double >& rColor,
const uno::Reference< rendering::XColorSpace >& xColorSpace )
{
const rendering::ARGBColor aARGBColor(
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index bfeb77025e20..9cda8061bb5d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1289,7 +1289,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, PropertyMapP
void DomainMapper_Impl::appendTextContent(
const uno::Reference< text::XTextContent > xContent,
- const uno::Sequence< beans::PropertyValue > xPropertyValues
+ const uno::Sequence< beans::PropertyValue >& xPropertyValues
)
{
SAL_WARN_IF(m_aTextAppendStack.empty(), "writerfilter.dmapper", "no text append stack");
@@ -2865,7 +2865,7 @@ void DomainMapper_Impl::handleAuthor
}
uno::Sequence< beans::PropertyValues > lcl_createTOXLevelHyperlinks( bool bHyperlinks, const OUString& sChapterNoSeparator,
- uno::Sequence< beans::PropertyValues >aLevel,
+ const uno::Sequence< beans::PropertyValues >& aLevel,
PropertyNameSupplier& rPropNameSupplier )
{
//create a copy of the level and add two new entries - hyperlink start and end
@@ -4400,9 +4400,9 @@ _PageMar::_PageMar()
void DomainMapper_Impl::RegisterFrameConversion(
- uno::Reference< text::XTextRange > xFrameStartRange,
- uno::Reference< text::XTextRange > xFrameEndRange,
- uno::Sequence< beans::PropertyValue > aFrameProperties
+ uno::Reference< text::XTextRange > xFrameStartRange,
+ uno::Reference< text::XTextRange > xFrameEndRange,
+ const uno::Sequence< beans::PropertyValue >& aFrameProperties
)
{
OSL_ENSURE(
@@ -4524,7 +4524,7 @@ void DomainMapper_Impl::SetCurrentRedlineToken( sal_Int32 nToken )
pCurrent->m_nToken = nToken;
}
-void DomainMapper_Impl::SetCurrentRedlineRevertProperties( uno::Sequence<beans::PropertyValue> aProperties )
+void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const uno::Sequence<beans::PropertyValue>& aProperties )
{
RedlineParamsPtr pCurrent( GetTopRedline( ) );
if ( pCurrent.get( ) )
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 5b17baf31f8a..130ec482c25c 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -279,7 +279,7 @@ struct FloatingTableInfo
uno::Sequence<beans::PropertyValue> m_aFrameProperties;
sal_Int32 m_nTableWidth;
- FloatingTableInfo(uno::Reference<text::XTextRange> xStart, uno::Reference<text::XTextRange> xEnd, uno::Sequence<beans::PropertyValue> aFrameProperties, sal_Int32 nTableWidth)
+ FloatingTableInfo(uno::Reference<text::XTextRange> xStart, uno::Reference<text::XTextRange> xEnd, const uno::Sequence<beans::PropertyValue>& aFrameProperties, sal_Int32 nTableWidth)
: m_xStart(xStart),
m_xEnd(xEnd),
m_aFrameProperties(aFrameProperties),
@@ -483,7 +483,7 @@ public:
void finishParagraph( PropertyMapPtr pPropertyMap );
void appendTextPortion( const OUString& rString, PropertyMapPtr pPropertyMap );
void appendTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >,
- const uno::Sequence< beans::PropertyValue > );
+ const uno::Sequence< beans::PropertyValue >& );
void appendOLE( const OUString& rStreamName, OLEHandlerPtr pOleHandler );
void appendStarMath( const Value& v );
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > appendTextSectionAfter(
@@ -690,7 +690,7 @@ public:
void RegisterFrameConversion(
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameStartRange,
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xFrameEndRange,
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aFrameProperties
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aFrameProperties
);
bool ExecuteFrameConversion();
@@ -703,7 +703,7 @@ public:
void SetCurrentRedlineDate( const OUString& sDate );
void SetCurrentRedlineId( sal_Int32 nId );
void SetCurrentRedlineToken( sal_Int32 nToken );
- void SetCurrentRedlineRevertProperties( uno::Sequence<beans::PropertyValue> aProperties );
+ void SetCurrentRedlineRevertProperties( const uno::Sequence<beans::PropertyValue>& aProperties );
void RemoveCurrentRedline( );
void ResetParaMarkerRedline( );
void SetCurrentRedlineInitials( const OUString& sInitials );
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index cb1ce8c7a8bf..547c7b062d0b 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -66,7 +66,7 @@ void lcl_printProperties( uno::Sequence< beans::PropertyValue > aProps )
}
#endif
-sal_Int32 lcl_findProperty( uno::Sequence< beans::PropertyValue > aProps, const OUString& sName )
+sal_Int32 lcl_findProperty( const uno::Sequence< beans::PropertyValue >& aProps, const OUString& sName )
{
sal_Int32 i = 0;
sal_Int32 nLen = aProps.getLength( );
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index a18f84ddaef1..5abccdc86f01 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -141,7 +141,7 @@ void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControl
createControlShape(aSize, xControlModel, uno::Sequence<beans::PropertyValue>());
}
-void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> xControlModel, uno::Sequence<beans::PropertyValue> rGrabBag)
+void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControlModel> xControlModel, const uno::Sequence<beans::PropertyValue>& rGrabBag)
{
uno::Reference<drawing::XControlShape> xControlShape(m_rDM_Impl.GetTextFactory()->createInstance("com.sun.star.drawing.ControlShape"), uno::UNO_QUERY);
xControlShape->setSize(aSize);
diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx
index 9e730b2335ef..11b776de83e1 100644
--- a/writerfilter/source/dmapper/SdtHelper.hxx
+++ b/writerfilter/source/dmapper/SdtHelper.hxx
@@ -64,7 +64,7 @@ class SdtHelper
/// Create and append the drawing::XControlShape, containing the various models.
void createControlShape(com::sun::star::awt::Size aSize, com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>);
void createControlShape(com::sun::star::awt::Size aSize, com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>,
- com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> rGrabBag);
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rGrabBag);
public:
SdtHelper(DomainMapper_Impl& rDM_Impl);
virtual ~SdtHelper();
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index f654e2c406fc..406a2bc2b09f 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -251,7 +251,7 @@ const OUString ThemeTable::getFontNameForTheme(const Id id) const
}
}
-void ThemeTable::setThemeFontLangProperties(uno::Sequence<beans::PropertyValue> aPropSeq)
+void ThemeTable::setThemeFontLangProperties(const uno::Sequence<beans::PropertyValue>& aPropSeq)
{
for (sal_Int32 i = 0 ; i < aPropSeq.getLength() ; i ++)
{
diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx
index afd7456a2590..e55216bb3815 100644
--- a/writerfilter/source/dmapper/ThemeTable.hxx
+++ b/writerfilter/source/dmapper/ThemeTable.hxx
@@ -42,7 +42,7 @@ public:
const OUString getFontNameForTheme(const Id id) const;
static OUString getStringForTheme(const Id id);
- void setThemeFontLangProperties(uno::Sequence<beans::PropertyValue> aPropSeq);
+ void setThemeFontLangProperties(const uno::Sequence<beans::PropertyValue>& aPropSeq);
private:
// Properties
diff --git a/xmlsecurity/inc/xmlsecurity/biginteger.hxx b/xmlsecurity/inc/xmlsecurity/biginteger.hxx
index 2bdc628405f8..45b2eee8c003 100644
--- a/xmlsecurity/inc/xmlsecurity/biginteger.hxx
+++ b/xmlsecurity/inc/xmlsecurity/biginteger.hxx
@@ -26,7 +26,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include "com/sun/star/uno/Sequence.h"
-OUString bigIntegerToNumericString( ::com::sun::star::uno::Sequence< sal_Int8 > serial );
+OUString bigIntegerToNumericString( const ::com::sun::star::uno::Sequence< sal_Int8 >& serial );
::com::sun::star::uno::Sequence< sal_Int8 > numericStringToBigInteger ( const OUString& serialNumber );
#endif
diff --git a/xmlsecurity/source/xmlsec/biginteger.cxx b/xmlsecurity/source/xmlsec/biginteger.cxx
index 72eb669a09e4..567d206b9274 100644
--- a/xmlsecurity/source/xmlsec/biginteger.cxx
+++ b/xmlsecurity/source/xmlsec/biginteger.cxx
@@ -76,7 +76,7 @@ Sequence< sal_Int8 > numericStringToBigInteger ( const OUString& numeral )
return Sequence< sal_Int8 >();
}
-OUString bigIntegerToNumericString ( Sequence< sal_Int8 > integer )
+OUString bigIntegerToNumericString ( const Sequence< sal_Int8 >& integer )
{
OUString aRet ;
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index 6f66266305f8..f8dc8f14a45f 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -284,7 +284,7 @@ const CERTCertificate* X509Certificate_NssImpl :: getNssCert() const {
}
}
-void X509Certificate_NssImpl :: setRawCert( Sequence< sal_Int8 > rawCert ) throw ( ::com::sun::star::uno::RuntimeException) {
+void X509Certificate_NssImpl :: setRawCert( const Sequence< sal_Int8 >& rawCert ) throw ( ::com::sun::star::uno::RuntimeException) {
CERTCertificate* cert ;
SECItem certItem ;
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
index ec3353c0b08d..377710592d11 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx
@@ -87,7 +87,7 @@ class X509Certificate_NssImpl : public ::cppu::WeakImplHelper2<
//Helper methods
void setCert( CERTCertificate* cert ) ;
const CERTCertificate* getNssCert() const ;
- void setRawCert( ::com::sun::star::uno::Sequence< sal_Int8 > rawCert ) throw ( ::com::sun::star::uno::RuntimeException) ;
+ void setRawCert( const ::com::sun::star::uno::Sequence< sal_Int8 >& rawCert ) throw ( ::com::sun::star::uno::RuntimeException) ;
} ;
#endif // INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_X509CERTIFICATE_NSSIMPL_HXX