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 | |
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>
-rw-r--r-- | extensions/source/abpilot/abpfinalpage.cxx | 3 | ||||
-rw-r--r-- | extensions/source/bibliography/bibconfig.cxx | 20 | ||||
-rw-r--r-- | extensions/source/bibliography/bibview.cxx | 3 | ||||
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 9 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 9 | ||||
-rw-r--r-- | extensions/source/update/check/download.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 3 | ||||
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 3 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 3 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 19 | ||||
-rw-r--r-- | filter/source/xsltdialog/typedetectionexport.cxx | 75 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 11 | ||||
-rw-r--r-- | framework/source/accelerators/presethandler.cxx | 10 | ||||
-rw-r--r-- | framework/source/fwe/xml/statusbardocumenthandler.cxx | 6 | ||||
-rw-r--r-- | framework/source/fwe/xml/toolboxdocumenthandler.cxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/objectmenucontroller.cxx | 3 |
17 files changed, 71 insertions, 119 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index d420a3658791..685592f8c739 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -96,8 +96,7 @@ namespace abp if( aURL.GetProtocol() == INetProtocol::NotValid ) { OUString sPath = SvtPathOptions().GetWorkPath(); - sPath += "/"; - sPath += rSettings.sDataSourceName; + sPath += "/" + rSettings.sDataSourceName; std::shared_ptr<const SfxFilter> pFilter = lcl_getBaseFilter(); if ( pFilter ) diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index daaa3702b03b..986b9f700eae 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdb; -const char cDataSourceHistory[] = "DataSourceHistory"; +static const char cDataSourceHistory[] = "DataSourceHistory"; Sequence<OUString> const & BibConfig::GetPropertyNames() { @@ -126,10 +126,7 @@ BibConfig::BibConfig() Sequence<OUString> aHistoryNames(3); OUString* pHistoryNames = aHistoryNames.getArray(); - OUString sPrefix(cDataSourceHistory); - sPrefix += "/"; - sPrefix += pNodeNames[nNode]; - sPrefix += "/"; + OUString sPrefix = OUStringLiteral(cDataSourceHistory) + "/" + pNodeNames[nNode] + "/"; pHistoryNames[0] = sPrefix + "DataSourceName"; pHistoryNames[1] = sPrefix + "Command"; pHistoryNames[2] = sPrefix + "CommandType"; @@ -152,9 +149,7 @@ BibConfig::BibConfig() sal_Int16 nFieldIdx = 0; for(sal_Int32 nField = 0; nField < aAssignmentNodeNames.getLength(); nField++) { - OUString sSubPrefix(sPrefix); - sSubPrefix += "/"; - sSubPrefix += pAssignmentNodeNames[nField]; + OUString sSubPrefix = sPrefix + "/" + pAssignmentNodeNames[nField]; pAssignmentPropertyNames[nFieldIdx] = sSubPrefix; pAssignmentPropertyNames[nFieldIdx++] += "/ProgrammaticFieldName"; pAssignmentPropertyNames[nFieldIdx] = sSubPrefix; @@ -224,10 +219,7 @@ void BibConfig::ImplCommit() for(sal_Int32 i = 0; i < static_cast<sal_Int32>(mvMappings.size()); i++) { const Mapping* pMapping = mvMappings[i].get(); - OUString sPrefix(cDataSourceHistory); - sPrefix += "/_"; - sPrefix += OUString::number(i); - sPrefix += "/"; + OUString sPrefix = OUStringLiteral(cDataSourceHistory) + "/_" + OUString::number(i) + "/"; pNodeValues[nIndex].Name = sPrefix + "DataSourceName"; pNodeValues[nIndex++].Value <<= pMapping->sURL; pNodeValues[nIndex].Name = sPrefix + "Command"; @@ -245,9 +237,7 @@ void BibConfig::ImplCommit() while(nFieldAssignment < COLUMN_COUNT && !pMapping->aColumnPairs[nFieldAssignment].sLogicalColumnName.isEmpty()) { - OUString sSubPrefix(sPrefix); - sSubPrefix += "/_"; - sSubPrefix += OUString::number(nFieldAssignment); + OUString sSubPrefix = sPrefix + "/_" + OUString::number(nFieldAssignment); Sequence< PropertyValue > aAssignmentValues(2); PropertyValue* pAssignmentValues = aAssignmentValues.getArray(); pAssignmentValues[0].Name = sSubPrefix; diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index 1664b9f3c249..4f6af6e86415 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -148,8 +148,7 @@ namespace bib } else if(bExecute) { - sErrorString += "\n"; - sErrorString += BibResId(RID_MAP_QUESTION); + sErrorString += "\n" + BibResId(RID_MAP_QUESTION); MessageWithCheck aQueryBox(GetFrameWeld()); aQueryBox.set_primary_text(sErrorString); diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index be9de7ee0866..d5d97729cfd4 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -849,11 +849,9 @@ void BibDataManager::startQueryWith(const OUString& rQuery) { aQueryString=aQuoteChar; aQueryString+=getQueryField(); - aQueryString+=aQuoteChar; - aQueryString+=" like '"; + aQueryString+=aQuoteChar + " like '"; OUString sQuery = rQuery.replaceAll("?","_").replaceAll("*","%"); - aQueryString += sQuery; - aQueryString+="%'"; + aQueryString += sQuery + "%'"; } setFilter(aQueryString); } @@ -1173,8 +1171,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( const OUString& rName, bool bForceListBox) { Reference< awt::XControlModel > xModel; - OUString aName("View_"); - aName += rName; + OUString aName = "View_" + rName; try { diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 220e915f4d24..b4eada0786fb 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -384,8 +384,7 @@ namespace pcr for ( i = 0; i < nNewCount; ++i ) { sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId(); - OUString aPureIdStr = OUString::number( nUniqueId ); - aPureIdStr += aIdStrBase; + OUString aPureIdStr = OUString::number( nUniqueId ) + aIdStrBase; pNewPureIds[i] = aPureIdStr; // Force usage of next Unique Id xStringResourceManager->setString( aPureIdStr, OUString() ); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index b5654c89eb11..7d79231e1ecd 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -1168,10 +1168,8 @@ namespace pcr if (!aInput.isEmpty()) { - aOutput += "\""; + aOutput += "\"" + aInput + "\""; nDiff++; - aOutput += aInput; - aOutput += "\""; } if (nSinglePos <= aOutput.getLength()) @@ -1185,11 +1183,8 @@ namespace pcr aInput=aStr.getToken(0, '\n', nIdx); if (!aInput.isEmpty()) { - aOutput += ";"; - aOutput += "\""; + aOutput += ";\"" + aInput + "\""; nDiff += 2; - aOutput += aInput; - aOutput += "\""; if (nSinglePos <= aOutput.getLength()) { diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index de8b4cc8747e..73e79bcf851d 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -306,9 +306,7 @@ static bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHo } else { - aMessage += ":error code = "; - aMessage += OString::number( nError ); - aMessage += " !"; + aMessage += ":error code = " + OString::number( nError ) + " !"; } } if ( !ret ) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 9e303d876cf8..a6651c9d66b8 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -7177,8 +7177,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo if ( pName || pFilter ) { //Reuse current ole name - OUString aDstStgName(MSO_OLE_Obj); - aDstStgName += OUString::number(nMSOleObjCntr); + OUString aDstStgName = MSO_OLE_Obj + OUString::number(nMSOleObjCntr); OUString aFilterName; if ( pFilter ) diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 7d8e25cbdeed..42ed5ee2df77 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -128,8 +128,7 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen try { uno::Reference< ui::XUIConfigurationManager > xCfgManager( getCfgManager() ); - OUString sMenuBar("private:resource/menubar/"); - sMenuBar += rName; + OUString sMenuBar = "private:resource/menubar/" + rName; uno::Reference< container::XIndexContainer > xPopup( xCfgManager->createSettings(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xProps( xPopup, uno::UNO_QUERY_THROW ); // set name for menubar diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 92b8a7392dcd..9b5e83596f05 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -6897,8 +6897,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport OUString aTarget( rHyperlink.aTarget ); if ( !rHyperlink.aConvSubString.isEmpty() ) { - aTarget += "#"; - aTarget += rHyperlink.aConvSubString; + aTarget += "#" + rHyperlink.aConvSubString; } xEntry->xField1.reset(new SvxFieldItem( SvxURLField( aTarget, OUString(), SvxURLFormat::Repr ), EE_FEATURE_FIELD )); } diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index cce3c3abd45d..7adb1d04e9ca 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -984,8 +984,8 @@ void SVGFilter::implExportDocumentHeaderWriterOrCalc(sal_Int32 nDocX, sal_Int32 aAttr = OUString::number( nDocHeight * 0.01 ) + "mm"; mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "height", aAttr ); - aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " "; - aAttr += OUString::number(nDocWidth) + " " + OUString::number(nDocHeight); + aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " " + + OUString::number(nDocWidth) + " " + OUString::number(nDocHeight); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", "xMidYMid" ); @@ -1651,8 +1651,7 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing: // inserted before or after a slide: that is used for some // when switching from the last to the first slide. const OUString & sPageId = implGetValidIDFromInterface( rxPages[i] ); - OUString sContainerId = "container-"; - sContainerId += sPageId; + OUString sContainerId = "container-" + sPageId; mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sContainerId ); SvXMLElementExport aContainerExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); @@ -1725,8 +1724,7 @@ bool SVGFilter::implExportPage( const OUString & sPageId, if( rMtf.GetActionSize() ) { // background id = "bg-" + page id - OUString sBackgroundId = "bg-"; - sBackgroundId += sPageId; + OUString sBackgroundId = "bg-" + sPageId; mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundId ); // At present (LibreOffice 3.4.0) the 'IsBackgroundVisible' property is not handled @@ -1760,8 +1758,7 @@ bool SVGFilter::implExportPage( const OUString & sPageId, if( bMaster ) { // background objects id = "bo-" + page id - OUString sBackgroundObjectsId = "bo-"; - sBackgroundObjectsId += sPageId; + OUString sBackgroundObjectsId = "bo-" + sPageId; mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sBackgroundObjectsId ); if( !mbPresentation ) { @@ -2473,12 +2470,10 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf ) if( xExtDocHandler.is() && IsUseDTDString() ) xExtDocHandler->unknown( SVG_DTD_STRING ); - aAttr = OUString::number( aSize.Width() ); - aAttr += "mm"; + aAttr = OUString::number( aSize.Width() ) + "mm"; AddAttribute( XML_NAMESPACE_NONE, "width", aAttr ); - aAttr = OUString::number( aSize.Height() ); - aAttr += "mm"; + aAttr = OUString::number( aSize.Height() ) + "mm"; AddAttribute( XML_NAMESPACE_NONE, "height", aAttr ); aAttr = "0 0 "; diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx index 65cd250790c3..7d53a7db8726 100644 --- a/filter/source/xsltdialog/typedetectionexport.cxx +++ b/filter/source/xsltdialog/typedetectionexport.cxx @@ -119,20 +119,13 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co pAttrList->AddAttribute( sName, sCdataAttribute, filter->maType ); xHandler->ignorableWhitespace ( sWhiteSpace ); xHandler->startElement( sNode, xAttrList ); - OUString sValue("0"); - sValue += sComma; - sValue += sComma; + OUString sValue = "0" + sComma + sComma; if( !filter->maDocType.isEmpty() ) { - sValue += sDocTypePrefix; - sValue += filter->maDocType; + sValue += sDocTypePrefix + filter->maDocType; } - sValue += sComma; - sValue += sComma; - sValue += filter->maExtension; - sValue += sComma; - sValue += OUString::number( filter->mnDocumentIconID ); - sValue += sComma; + sValue += sComma + sComma + filter->maExtension + sComma + + OUString::number( filter->mnDocumentIconID ) + sComma; addProperty( xHandler, sData, sValue ); addLocaleProperty( xHandler, sUIName, filter->maInterfaceName ); @@ -159,39 +152,39 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co xHandler->startElement( sNode, xAttrList ); addLocaleProperty( xHandler, sUIName, filter->maInterfaceName ); - OUString sValue("0"); - sValue += sComma; - sValue += filter->maType; - sValue += sComma; - sValue += filter->maDocumentService; - sValue += sComma; - sValue += sFilterAdaptorService; - sValue += sComma; - sValue += OUString::number( filter->maFlags ); - sValue += sComma; - sValue += sXSLTFilterService; - sValue += sDelim; - sValue += OUString::boolean( filter->mbNeedsXSLT2 ); - sValue += sDelim; + OUStringBuffer sValue("0" + + sComma + + filter->maType + + sComma + + filter->maDocumentService + + sComma + + sFilterAdaptorService + + sComma + + OUString::number( filter->maFlags ) + + sComma + + sXSLTFilterService + + sDelim + + OUString::boolean( filter->mbNeedsXSLT2 ) + + sDelim); const application_info_impl* pAppInfo = getApplicationInfo( filter->maExportService ); - sValue += pAppInfo->maXMLImporter; - sValue += sDelim; - sValue += pAppInfo->maXMLExporter; - sValue += sDelim; - - sValue += createRelativeURL( filter->maFilterName, filter->maImportXSLT ); - sValue += sDelim; - sValue += createRelativeURL( filter->maFilterName, filter->maExportXSLT ); - sValue += sDelim; + sValue.append(pAppInfo->maXMLImporter + + sDelim + + pAppInfo->maXMLExporter + + sDelim); + + sValue.append(createRelativeURL( filter->maFilterName, filter->maImportXSLT )); + sValue.append(sDelim); + sValue.append(createRelativeURL( filter->maFilterName, filter->maExportXSLT )); + sValue.append(sDelim); // entry DTD obsolete and removed, but delimiter kept - sValue += sDelim; - sValue += filter->maComment; - sValue += sComma; - sValue += "0"; - sValue += sComma; - sValue += createRelativeURL( filter->maFilterName, filter->maImportTemplate ); - addProperty( xHandler, sData, sValue ); + sValue.append(sDelim); + sValue.append(filter->maComment); + sValue.append(sComma); + sValue.append("0"); + sValue.append(sComma); + sValue.append(createRelativeURL( filter->maFilterName, filter->maImportTemplate )); + addProperty( xHandler, sData, sValue.makeStringAndClear() ); xHandler->ignorableWhitespace ( sWhiteSpace ); xHandler->endElement( sNode ); } diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 5f7dcc7b9039..6f81c821f113 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -449,8 +449,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi INetURLObject aSourceURL( pFilterEntry->maImportTemplate ); if (!aSourceURL.GetLastName().isEmpty()) { - OUString aDestURL( m_sTemplatePath ); - aDestURL += pFilterEntry->maFilterName + "/"; + OUString aDestURL = m_sTemplatePath + pFilterEntry->maFilterName + "/"; if( createDirectory( aDestURL ) ) { aDestURL += aSourceURL.GetLastName(); @@ -851,8 +850,8 @@ void XMLFilterSettingsDialog::onSave() FileDialogFlags::NONE, m_xDialog.get()); OUString aExtensions( "*.jar" ); - OUString aFilterName(XsltResId(STR_FILTER_PACKAGE)); - aFilterName += " (" + aExtensions + ")"; + OUString aFilterName = XsltResId(STR_FILTER_PACKAGE) + + " (" + aExtensions + ")"; aDlg.AddFilter( aFilterName, aExtensions ); @@ -896,8 +895,8 @@ void XMLFilterSettingsDialog::onOpen() FileDialogFlags::NONE, m_xDialog.get()); OUString aExtensions( "*.jar" ); - OUString aFilterName(XsltResId(STR_FILTER_PACKAGE)); - aFilterName += " (" + aExtensions + ")"; + OUString aFilterName = XsltResId(STR_FILTER_PACKAGE) + + " (" + aExtensions + ")"; aDlg.AddFilter( aFilterName, aExtensions ); 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 } } |