summaryrefslogtreecommitdiff
path: root/sfx2/source/control/statcach.cxx
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 /sfx2/source/control/statcach.cxx
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>
Diffstat (limited to 'sfx2/source/control/statcach.cxx')
-rw-r--r--sfx2/source/control/statcach.cxx11
1 files changed, 6 insertions, 5 deletions
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 );
}
}