summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-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
6 files changed, 11 insertions, 11 deletions
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,