diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-12 16:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-18 07:37:31 +0000 |
commit | 789055bc2acb4c71483fd60ea258d158bd5aec10 (patch) | |
tree | 7849de841a71f667a30b2a971ad0c3d406110396 /framework/source/fwe/classes | |
parent | 150ac9cf05ed9da6a2af5bc3f820280fd853e519 (diff) |
clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.
Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework/source/fwe/classes')
-rw-r--r-- | framework/source/fwe/classes/addonsoptions.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index 82a519b6244f..406e4663bcf1 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -771,16 +771,15 @@ void AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionContaine const OUString aMenuMergeRootName( "AddonUI/OfficeMenuBarMerging/" ); Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName ); - OUString aAddonMergeNode( aMenuMergeRootName ); - sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); + sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); // Init the property value sequence Sequence< OUString > aNodePropNames( 5 ); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] ); + OUString aMergeAddonInstructions( aMenuMergeRootName + aAddonMergeNodesSeq[i] ); Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions ); sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength(); @@ -849,16 +848,14 @@ void AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstruction const OUString aToolbarMergeRootName( "AddonUI/OfficeToolbarMerging/" ); Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName ); - OUString aAddonMergeNode( aToolbarMergeRootName ); - - sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); + sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); // Init the property value sequence Sequence< OUString > aNodePropNames( 6 ); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] ); + OUString aMergeAddonInstructions( aToolbarMergeRootName + aAddonMergeNodesSeq[i] ); Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions ); sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength(); @@ -929,14 +926,13 @@ void AddonsOptions_Impl::ReadStatusbarMergeInstructions( MergeStatusbarInstructi const ::rtl::OUString aStatusbarMergeRootName( "AddonUI/OfficeStatusbarMerging/" ); Sequence< ::rtl::OUString > aAddonMergeNodesSeq = GetNodeNames( aStatusbarMergeRootName ); - ::rtl::OUString aAddonMergeNode( aStatusbarMergeRootName ); sal_uInt32 nCount = aAddonMergeNodesSeq.getLength(); Sequence< ::rtl::OUString > aNodePropNames( 5 ); for ( sal_uInt32 i = 0; i < nCount; i++ ) { - ::rtl::OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] ); + ::rtl::OUString aMergeAddonInstructions( aStatusbarMergeRootName + aAddonMergeNodesSeq[i] ); Sequence< ::rtl::OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions ); sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength(); |