diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-30 15:10:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-01 08:26:43 +0200 |
commit | 9b3643820bf821c8be728ed20a8cb7ed05cabef2 (patch) | |
tree | 85b3cf0347f5e887b3b6f36aad33f6bb805452d0 /framework | |
parent | 4f2465f599020b356dc37f3132049a103dd32486 (diff) |
loplugin:stringadd in extensions..framework
Change-Id: I0a0788cdbde292cae582982b0000ee6d5a2056d7
Reviewed-on: https://gerrit.libreoffice.org/79888
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
4 files changed, 8 insertions, 17 deletions
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx index b81abece09c1..3b4aa1704ed7 100644 --- a/framework/source/accelerators/presethandler.cxx +++ b/framework/source/accelerators/presethandler.cxx @@ -479,11 +479,8 @@ void PresetHandler::copyPresetToTarget(const OUString& sPreset, return; } - OUString sPresetFile(sPreset); - sPresetFile += ".xml"; - - OUString sTargetFile(sTarget); - sTargetFile += ".xml"; + OUString sPresetFile = sPreset + ".xml"; + OUString sTargetFile = sTarget + ".xml"; // remove existing elements before you try to copy the preset to that location ... // Otherwise w will get an ElementExistException inside copyElementTo()! @@ -510,8 +507,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString if (!xFolder.is()) return css::uno::Reference< css::io::XStream >(); - OUString sFile(sPreset); - sFile += ".xml"; + OUString sFile = sPreset + ".xml"; // inform user about errors (use original exceptions!) css::uno::Reference< css::io::XStream > xStream = xFolder->openStreamElement(sFile, css::embed::ElementModes::READ); diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 296ba978c0c7..d4fb733c7d2c 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -156,15 +156,13 @@ OReadStatusBarDocumentHandler::OReadStatusBarDocumentHandler( { if ( StatusBarEntries[i].nNamespace == SB_NS_STATUSBAR ) { - OUString temp( XMLNS_STATUSBAR ); - temp += XMLNS_FILTER_SEPARATOR; + OUString temp = XMLNS_STATUSBAR XMLNS_FILTER_SEPARATOR; temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName ); m_aStatusBarMap.emplace( temp, static_cast<StatusBar_XML_Entry>(i) ); } else { - OUString temp( XMLNS_XLINK ); - temp += XMLNS_FILTER_SEPARATOR; + OUString temp = XMLNS_XLINK XMLNS_FILTER_SEPARATOR; temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName ); m_aStatusBarMap.emplace( temp, static_cast<StatusBar_XML_Entry>(i) ); } diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index e8f0fb1fde21..50d7246a7a4c 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -134,15 +134,13 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde { if ( ToolBoxEntries[i].nNamespace == TB_NS_TOOLBAR ) { - OUString temp( XMLNS_TOOLBAR ); - temp += XMLNS_FILTER_SEPARATOR; + OUString temp = XMLNS_TOOLBAR XMLNS_FILTER_SEPARATOR; temp += OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); m_aToolBoxMap.emplace( temp, static_cast<ToolBox_XML_Entry>(i) ); } else { - OUString temp( XMLNS_XLINK ); - temp += XMLNS_FILTER_SEPARATOR; + OUString temp = XMLNS_XLINK XMLNS_FILTER_SEPARATOR; temp += OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); m_aToolBoxMap.emplace( temp, static_cast<ToolBox_XML_Entry>(i) ); } diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx index 2442171c6606..1b74f8bfdec2 100644 --- a/framework/source/uielement/objectmenucontroller.cxx +++ b/framework/source/uielement/objectmenucontroller.cxx @@ -109,8 +109,7 @@ void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescri m_xPopupMenu->insertItem( i+1, rVerb.VerbName, 0, i ); // use VCL popup menu pointer to set vital information that are not part of the awt implementation - OUString aCommand( aVerbCommand ); - aCommand += OUString::number( rVerb.VerbID ); + OUString aCommand = aVerbCommand + OUString::number( rVerb.VerbID ); pVCLPopupMenu->SetItemCommand( i+1, aCommand ); // Store verb command } } |