UnoControls/source/controls/progressmonitor.cxx | 8 - avmedia/source/viewer/mediawindow.cxx | 4 basctl/source/basicide/baside2b.cxx | 2 basic/source/runtime/methods.cxx | 2 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx | 10 - chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx | 8 - chart2/source/tools/PolynomialRegressionCurveCalculator.cxx | 2 chart2/source/tools/PotentialRegressionCurveCalculator.cxx | 6 chart2/source/view/charttypes/VSeriesPlotter.cxx | 2 comphelper/source/misc/xmlsechelper.cxx | 2 compilerplugins/clang/stringadd.cxx | 58 ++++++++ compilerplugins/clang/stringview.cxx | 2 compilerplugins/clang/test/stringadd.cxx | 4 connectivity/source/commontools/dbtools2.cxx | 4 connectivity/source/commontools/sqlerror.cxx | 6 connectivity/source/drivers/firebird/Util.cxx | 2 connectivity/source/drivers/postgresql/pq_xkeys.cxx | 5 connectivity/source/drivers/postgresql/pq_xviews.cxx | 2 cui/source/customize/cfg.cxx | 2 dbaccess/source/core/api/CacheSet.cxx | 6 dbaccess/source/core/api/KeySet.cxx | 12 - dbaccess/source/core/api/OptimisticSet.cxx | 4 dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 20 +-- dbaccess/source/core/dataaccess/ContentHelper.cxx | 2 dbaccess/source/filter/xml/xmlServerDatabase.cxx | 22 +-- dbaccess/source/ui/dlg/directsql.cxx | 2 dbaccess/source/ui/dlg/tablespage.cxx | 4 dbaccess/source/ui/misc/WCopyTable.cxx | 2 dbaccess/source/ui/uno/copytablewizard.cxx | 2 desktop/source/deployment/registry/component/dp_component.cxx | 2 extensions/source/propctrlr/selectlabeldialog.cxx | 7 - filter/source/config/cache/filtercache.cxx | 24 +-- forms/source/xforms/model_ui.cxx | 2 framework/source/accelerators/storageholder.cxx | 2 i18nlangtag/source/languagetag/languagetag.cxx | 6 i18npool/source/collator/collator_unicode.cxx | 4 lotuswordpro/source/filter/lwptblformula.cxx | 2 oox/source/core/xmlfilterbase.cxx | 2 oox/source/dump/dumperbase.cxx | 2 oox/source/export/drawingml.cxx | 3 oox/source/export/vmlexport.cxx | 12 - oox/source/ole/vbamodule.cxx | 3 reportdesign/source/filter/xml/xmlControlProperty.cxx | 24 +-- sc/source/core/data/postit.cxx | 2 sc/source/core/tool/address.cxx | 2 sc/source/core/tool/chgtrack.cxx | 49 +------ sc/source/core/tool/compiler.cxx | 4 sc/source/filter/dif/difimp.cxx | 4 sc/source/filter/excel/xehelper.cxx | 6 sc/source/filter/html/htmlexp.cxx | 28 +--- sc/source/filter/oox/formulabase.cxx | 6 sc/source/filter/oox/numberformatsbuffer.cxx | 6 sc/source/filter/oox/querytablebuffer.cxx | 2 sc/source/ui/app/inputhdl.cxx | 2 sc/source/ui/cctrl/checklistmenu.cxx | 2 sc/source/ui/condformat/condformathelper.cxx | 4 sc/source/ui/dataprovider/datatransformation.cxx | 2 sc/source/ui/dbgui/asciiopt.cxx | 12 - sc/source/ui/optdlg/tpusrlst.cxx | 4 sc/source/ui/unoobj/PivotTableDataProvider.cxx | 2 sc/source/ui/vba/vbahyperlink.cxx | 2 sc/source/ui/vba/vbanames.cxx | 2 sc/source/ui/view/tabview.cxx | 10 - sd/source/filter/eppt/pptx-epptooxml.cxx | 24 --- sd/source/filter/html/htmlex.cxx | 10 - sd/source/ui/remotecontrol/Communicator.cxx | 11 - sd/source/ui/remotecontrol/DiscoveryService.cxx | 7 - sfx2/source/appl/newhelp.cxx | 9 - sfx2/source/bastyp/frmhtmlw.cxx | 14 -- sfx2/source/control/unoctitm.cxx | 5 sfx2/source/dialog/templdlg.cxx | 2 sfx2/source/view/lokhelper.cxx | 6 starmath/source/mathtype.cxx | 10 - svl/source/misc/urihelper.cxx | 8 - svl/source/numbers/zforlist.cxx | 4 svl/source/numbers/zformat.cxx | 2 svtools/source/svhtml/htmlout.cxx | 65 +++------ sw/source/core/edit/editsh.cxx | 2 sw/source/core/fields/cellfml.cxx | 14 +- sw/source/filter/html/htmldrawwriter.cxx | 28 ++-- sw/source/filter/html/htmlfldw.cxx | 6 sw/source/filter/html/htmlflywriter.cxx | 66 ++++------ sw/source/filter/html/htmlftn.cxx | 12 - sw/source/filter/html/htmlplug.cxx | 24 +-- sw/source/filter/html/htmltabw.cxx | 56 ++++---- sw/source/filter/html/swhtml.cxx | 2 sw/source/filter/ww8/docxattributeoutput.cxx | 8 - sw/source/filter/ww8/docxsdrexport.cxx | 6 sw/source/filter/ww8/rtfattributeoutput.cxx | 32 +--- sw/source/filter/ww8/rtfexport.cxx | 33 ++--- sw/source/filter/ww8/rtfsdrexport.cxx | 34 +---- sw/source/ui/dbui/createaddresslistdialog.cxx | 4 sw/source/uibase/app/docstyle.cxx | 4 sw/source/uibase/shells/annotsh.cxx | 2 sw/source/uibase/shells/drwtxtsh.cxx | 2 sw/source/uibase/wrtsh/wrtundo.cxx | 2 ucb/source/core/provprox.cxx | 4 ucb/source/ucp/cmis/cmis_url.cxx | 2 ucb/source/ucp/ftp/ftpurl.cxx | 2 unotools/source/config/bootstrap.cxx | 7 - unotools/source/config/configpaths.cxx | 4 unotools/source/i18n/localedatawrapper.cxx | 6 unoxml/source/rdf/librdf_repository.cxx | 8 - vcl/skia/gdiimpl.cxx | 5 vcl/source/gdi/pdfobjectcopier.cxx | 2 vcl/source/treelist/transfer.cxx | 4 vcl/source/treelist/treelistbox.cxx | 2 vcl/source/uitest/logger.cxx | 12 - vcl/source/uitest/uiobject.cxx | 4 xmloff/source/forms/elementimport.cxx | 22 +-- xmloff/source/forms/layerimport.cxx | 4 xmloff/source/forms/propertyimport.cxx | 24 +-- xmloff/source/style/xmlexppr.cxx | 7 - xmloff/source/style/xmlnumfi.cxx | 6 xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 6 115 files changed, 521 insertions(+), 577 deletions(-)
New commits: commit c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Apr 23 16:07:32 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Apr 27 14:07:56 2021 +0200 loplugin:stringadd convert chained append to + which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 05296e35915b..de9d596513de 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -722,7 +722,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (auto const & pSearchItem : maTextlist_Top) { - aCollectString.append(pSearchItem->sTopic).append("\n"); + aCollectString.append(pSearchItem->sTopic + "\n"); } m_xTopic_Top->setText ( aCollectString.makeStringAndClear() ); @@ -737,7 +737,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (auto const & pSearchItem : maTextlist_Top) { - aCollectString.append(pSearchItem->sText).append("\n"); + aCollectString.append(pSearchItem->sText + "\n"); } m_xText_Top->setText ( aCollectString.makeStringAndClear() ); @@ -754,7 +754,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (auto const & pSearchItem : maTextlist_Bottom) { - aCollectString.append(pSearchItem->sTopic).append("\n"); + aCollectString.append(pSearchItem->sTopic + "\n"); } m_xTopic_Bottom->setText ( aCollectString.makeStringAndClear() ); @@ -770,7 +770,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (auto const & pSearchItem : maTextlist_Bottom) { - aCollectString.append(pSearchItem->sText).append("\n"); + aCollectString.append(pSearchItem->sText + "\n"); } m_xText_Bottom->setText ( aCollectString.makeStringAndClear() ); diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index e823c2e8dac5..0807de0f5a45 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -225,7 +225,7 @@ bool MediaWindow::executeMediaURLDialog(weld::Window* pParent, OUString& rURL, b if( !aAllTypes.isEmpty() ) aAllTypes.append(aSeparator); - aAllTypes.append(aWildcard).append(aFilters[ i ].second.getToken( 0, ';', nIndex )); + aAllTypes.append(aWildcard + aFilters[ i ].second.getToken( 0, ';', nIndex )); } } @@ -241,7 +241,7 @@ bool MediaWindow::executeMediaURLDialog(weld::Window* pParent, OUString& rURL, b if( !aTypes.isEmpty() ) aTypes.append(aSeparator); - aTypes.append(aWildcard).append(aFilters[ i ].second.getToken( 0, ';', nIndex )); + aTypes.append(aWildcard + aFilters[ i ].second.getToken( 0, ';', nIndex )); } // add single filters diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index cdc69b96b355..73cedfd04776 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1885,7 +1885,7 @@ void StackWindow::UpdateCalls() OUStringBuffer aEntry( OUString::number(nScope )); if ( aEntry.getLength() < 2 ) aEntry.insert(0, " "); - aEntry.append(": ").append(pMethod->GetName()); + aEntry.append(": " + pMethod->GetName()); SbxArray* pParams = pMethod->GetParameters(); SbxInfo* pInfo = pMethod->GetInfo(); if ( pParams ) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 0276a41c1b17..910b95f084fa 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4643,7 +4643,7 @@ void SbRtl_Partition(StarBASIC *, SbxArray & rPar, bool) aRetStr.append(" "); } } - aRetStr.append( aLowerValue ).append(":"); + aRetStr.append( aLowerValue + ":"); if( nLen > nLen2 ) { // appending the leading spaces for the uppervalue diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx index 1aa962ab5e3e..1d389d6f99bf 100644 --- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx @@ -183,13 +183,13 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation( // if nValueLength not calculated then nullptr sal_Int32* pValueLength = nValueLength ? &nValueLength : nullptr; if ( m_fSign < 0.0 ) - aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " ); + aTmpBuf.append( OUStringChar(aMinusSign) + " " ); if ( bHasIntercept ) { OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fIntercept, pValueLength ); if ( aValueString != "1" ) // aValueString may be rounded to 1 if nValueLength is small { - aTmpBuf.append( aValueString ).append( " " ); + aTmpBuf.append( aValueString + " " ); addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth ); aTmpBuf.truncate(); } @@ -208,16 +208,16 @@ OUString ExponentialRegressionCurveCalculator::ImplGetRepresentation( } } if ( m_fLogSlope < 0.0 ) - aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " ); + aTmpBuf.append( OUStringChar(aMinusSign) + " " ); if ( bHasLogSlope ) { OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fLogSlope), pValueLength ); if ( aValueString != "1" ) // aValueString may be rounded to 1 if nValueLength is small { - aTmpBuf.append( aValueString ).append( " " ); + aTmpBuf.append( aValueString + " " ); } } - aTmpBuf.append( mXName ).append(" )"); + aTmpBuf.append( mXName + " )"); addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth ); return aBuf.makeStringAndClear(); diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx index c09eab50975c..bfa5d9e4be5d 100644 --- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx +++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx @@ -156,17 +156,17 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation( { if( m_fSlope < 0.0 ) { - aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " ); + aTmpBuf.append( OUStringChar(aMinusSign) + " " ); } if( bHasSlope ) { OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fSlope), pValueLength ); if ( aValueString != "1" ) // aValueString may be rounded to 1 if nValueLength is small { - aTmpBuf.append( aValueString ).append( " " ); + aTmpBuf.append( aValueString + " " ); } } - aTmpBuf.append( "ln(" ).append( mXName ).append( ") " ); + aTmpBuf.append( "ln(" + mXName + ") " ); addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth ); aTmpBuf.truncate(); @@ -175,7 +175,7 @@ OUString LogarithmicRegressionCurveCalculator::ImplGetRepresentation( } // add intercept value if( m_fIntercept < 0.0 ) - aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " ); + aTmpBuf.append( OUStringChar(aMinusSign) + " " ); OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength ); if ( aValueString != "0" ) // aValueString may be rounded to 0 if nValueLength is small { diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx index b3585b71f5e3..38e326cbbbc4 100644 --- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx @@ -345,7 +345,7 @@ OUString PolynomialRegressionCurveCalculator::ImplGetRepresentation( { if ( bFindValue ) // if it is not the first aValue aTmpBuf.append( " " ); - aTmpBuf.append( OUStringChar(aMinusSign) ).append(" "); + aTmpBuf.append( OUStringChar(aMinusSign) + " "); aValue = - aValue; } else diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx index eb054bd8db66..89f6dc5b9e6e 100644 --- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx @@ -170,18 +170,18 @@ OUString PotentialRegressionCurveCalculator::ImplGetRepresentation( // if nValueLength not calculated then nullptr sal_Int32* pValueLength = nValueLength ? &nValueLength : nullptr; if ( m_fIntercept < 0.0 ) // add intercept value - aTmpBuf.append( OUStringChar(aMinusSign) ).append( " " ); + aTmpBuf.append( OUStringChar(aMinusSign) + " " ); if( bHasIntercept ) { OUString aValueString = getFormattedString( xNumFormatter, nNumberFormatKey, fabs(m_fIntercept), pValueLength ); if ( aValueString != "1" ) // aValueString may be rounded to 1 if nValueLength is small { - aTmpBuf.append( aValueString ).append( " " ); + aTmpBuf.append( aValueString + " " ); } } if( m_fSlope != 0.0 ) // add slope value { - aTmpBuf.append( mXName ).append( "^" ); + aTmpBuf.append( mXName + "^" ); aTmpBuf.append( getFormattedString( xNumFormatter, nNumberFormatKey, m_fSlope, pValueLength )); } addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth ); diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 39a97c618a47..fda17a91964b 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1542,7 +1542,7 @@ void VSeriesPlotter::createRegressionCurveEquationShapes( } if( bShowCorrCoeff ) { - aFormula.append( "R" ).append( OUStringChar( aSuperscriptFigures[2] ) ).append( " = " ); + aFormula.append( "R" + OUStringChar( aSuperscriptFigures[2] ) + " = " ); double fR( xRegressionCurveCalculator->getCorrelationCoefficient()); if (m_apNumberFormatterWrapper) { diff --git a/comphelper/source/misc/xmlsechelper.cxx b/comphelper/source/misc/xmlsechelper.cxx index c01743b36615..8f7184d2abee 100644 --- a/comphelper/source/misc/xmlsechelper.cxx +++ b/comphelper/source/misc/xmlsechelper.cxx @@ -61,7 +61,7 @@ namespace comphelper::xmlsec s2.append('\n'); } s1.append(i->second); - s2.append(i->first).append(" = ").append(i->second); + s2.append(i->first + " = " + i->second); } return make_pair(s1.makeStringAndClear(), s2.makeStringAndClear()); } diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx index 5723b5bb6e3b..9c6d11fd55b1 100644 --- a/compilerplugins/clang/stringadd.cxx +++ b/compilerplugins/clang/stringadd.cxx @@ -72,6 +72,7 @@ public: bool VisitCompoundStmt(CompoundStmt const*); bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr const*); + bool VisitCXXMemberCallExpr(CXXMemberCallExpr const*); private: enum class Summands @@ -262,6 +263,63 @@ bool StringAdd::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* operatorCall return true; } +bool StringAdd::VisitCXXMemberCallExpr(CXXMemberCallExpr const* methodCall) +{ + if (ignoreLocation(methodCall)) + return true; + + auto methodDecl = methodCall->getMethodDecl(); + if (!methodDecl || !methodDecl->getIdentifier() || methodDecl->getName() != "append" + || methodCall->getNumArgs() == 0) + return true; + auto tc1 = loplugin::TypeCheck(methodCall->getType()); + if (!tc1.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && !tc1.Class("OStringBuffer").Namespace("rtl").GlobalNamespace()) + return true; + auto paramType = methodDecl->getParamDecl(0)->getType(); + // if we convert one of the number append methods, we need to create an extra temporary to hold the string convertion of the number + if (paramType->isIntegerType()) + return true; + if (paramType->isCharType()) + return true; + if (paramType->isFloatingType()) + return true; + auto arg = methodCall->getArg(0); + // I don't think the OUStringAppend functionality can handle this efficiently + if (isa<ConditionalOperator>(ignore(arg))) + return true; + + auto methodCall2 = dyn_cast<CXXMemberCallExpr>(ignore(methodCall->getImplicitObjectArgument())); + if (!methodCall2) + return true; + auto tc = loplugin::TypeCheck(methodCall2->getType()); + if (!tc.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && !tc.Class("OStringBuffer").Namespace("rtl").GlobalNamespace()) + return true; + auto methodDecl2 = methodCall2->getMethodDecl(); + if (!methodDecl2->getIdentifier() || methodDecl2->getName() != "append" + || methodCall2->getNumArgs() == 0) + return true; + auto paramType2 = methodDecl2->getParamDecl(0)->getType(); + // if we convert one of the number append methods, we need to create an extra temporary to hold the string convertion of the number + if (paramType2->isIntegerType()) + return true; + if (paramType2->isCharType()) + return true; + if (paramType2->isFloatingType()) + return true; + arg = methodCall2->getArg(0); + // I don't think the OUStringAppend functionality can handle this efficiently + if (isa<ConditionalOperator>(ignore(arg))) + return true; + report(DiagnosticsEngine::Warning, + "chained append, rather use single append call and + operator", + compat::getBeginLoc(methodCall2)) + << methodCall2->getSourceRange(); + + return true; +} + Expr const* StringAdd::ignore(Expr const* expr) { return compat::IgnoreImplicit(compat::IgnoreImplicit(expr)->IgnoreParens()); diff --git a/compilerplugins/clang/stringview.cxx b/compilerplugins/clang/stringview.cxx index 5df91dcad054..95d7d6368572 100644 --- a/compilerplugins/clang/stringview.cxx +++ b/compilerplugins/clang/stringview.cxx @@ -70,7 +70,7 @@ bool StringView::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* cxxOperator if (!memberCallExpr) return; auto methodDecl = memberCallExpr->getMethodDecl(); - if (!methodDecl->getIdentifier() || methodDecl->getName() != "copy") + if (!methodDecl || !methodDecl->getIdentifier() || methodDecl->getName() != "copy") return; report(DiagnosticsEngine::Warning, "rather than copy, pass with a view using subView()", compat::getBeginLoc(expr)) diff --git a/compilerplugins/clang/test/stringadd.cxx b/compilerplugins/clang/test/stringadd.cxx index a953e44062bb..a18b562a052f 100644 --- a/compilerplugins/clang/test/stringadd.cxx +++ b/compilerplugins/clang/test/stringadd.cxx @@ -217,6 +217,10 @@ void f1(OUString s, OUString t, int i, const char* pChar) // no warning expected OUString c; c = c + OUString(pChar, strlen(pChar), RTL_TEXTENCODING_UTF8); + + OUStringBuffer buf; + // expected-error@+1 {{chained append, rather use single append call and + operator [loplugin:stringadd]}} + buf.append(" ").append(b); } void f2(char ch) { diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 907bc7fd3698..9805f63afba4 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -261,8 +261,8 @@ namespace for(sal_Int32 i=0;i<nColCount;++i) { if ( (_xColumns->getByIndex(i) >>= xColProp) && xColProp.is() ) - sSql.append( ::dbtools::quoteName(sQuote,::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)))) ) - .append(","); + sSql.append( ::dbtools::quoteName(sQuote,::comphelper::getString(xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_NAME)))) + + ","); } if ( nColCount ) diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx index dee6f36f0b61..9f8608384d1d 100644 --- a/connectivity/source/commontools/sqlerror.cxx +++ b/connectivity/source/commontools/sqlerror.cxx @@ -222,13 +222,9 @@ namespace connectivity OUString SQLError_Impl::impl_getErrorMessage( ErrorCondition _eCondition ) { - OUStringBuffer aMessage; - OUString sResMessage(Translate::get(lcl_getResourceErrorID(_eCondition), m_aResources)); OSL_ENSURE( !sResMessage.isEmpty(), "SQLError_Impl::impl_getErrorMessage: illegal error condition, or invalid resource!" ); - aMessage.append( getMessagePrefix() ).append( " " ).append( sResMessage ); - - return aMessage.makeStringAndClear(); + return getMessagePrefix() + " " + sResMessage; } OUString SQLError_Impl::impl_getSQLState( ErrorCondition _eCondition ) diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx index 3bf3cfbc4d82..46b87d7caf12 100644 --- a/connectivity/source/drivers/firebird/Util.cxx +++ b/connectivity/source/drivers/firebird/Util.cxx @@ -51,7 +51,7 @@ OUString firebird::StatusVectorToString(const ISC_STATUS_ARRAY& rStatusVector, { SAL_WARN("connectivity.firebird", "ignore fb_interpret exception"); } - buf.append("\ncaused by\n'").append(rCause).append("'\n"); + buf.append(OUString::Concat("\ncaused by\n'") + rCause + "'\n"); OUString error = buf.makeStringAndClear(); SAL_WARN("connectivity.firebird", error); diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx index 88d8b5b1189b..84507202fa9a 100644 --- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx @@ -172,10 +172,9 @@ void Keys::refresh() if( css::sdbcx::KeyType::FOREIGN == keyType ) { - OUStringBuffer buf( 128 ); - buf.append( xRow->getString( 6 ) ).append( "." ).append( xRow->getString( 5 ) ); + OUString buf = xRow->getString( 6 ) + "." + xRow->getString( 5 ); pKey->setPropertyValue_NoBroadcast_public( - st.REFERENCED_TABLE, makeAny( buf.makeStringAndClear() ) ); + st.REFERENCED_TABLE, makeAny( buf ) ); Int2StringMap foreignMap; fillAttnum2attnameMap( foreignMap, m_origin, xRow->getString(6), xRow->getString(5)); diff --git a/connectivity/source/drivers/postgresql/pq_xviews.cxx b/connectivity/source/drivers/postgresql/pq_xviews.cxx index 3f36c168b6d2..d71219fa6420 100644 --- a/connectivity/source/drivers/postgresql/pq_xviews.cxx +++ b/connectivity/source/drivers/postgresql/pq_xviews.cxx @@ -149,7 +149,7 @@ void Views::appendByDescriptor( buf.append( "CREATE VIEW "); bufferQuoteQualifiedIdentifier( buf, schema, name, m_pSettings ); - buf.append(" AS " ).append( command ); + buf.append(" AS " + command ); stmt->executeUpdate( buf.makeStringAndClear() ); diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index fe1b68db85b9..3ab8e4288703 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -3075,7 +3075,7 @@ void SvxIconSelectorDialog::ImportGraphics( fPath = OUString::Concat(rPaths[0].subView(8)) + "/"; for ( sal_Int32 i = 0; i < rejectedCount; ++i ) { - message.append(fPath).append(rejected[i]).append("\n"); + message.append(fPath + rejected[i] + "\n"); } SvxIconChangeDialog aDialog(m_xDialog.get(), message.makeStringAndClear()); diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index e6f31962834f..366a727be58d 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -160,7 +160,7 @@ void OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQ connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->end(); for(; aIter != aEnd;++aIter) { - aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++)) ).append(","); + aSql.append(::dbtools::quoteName( aQuote,m_xSetMetaData->getColumnName(i++)) + ","); aValues.append("?,"); } @@ -261,7 +261,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow } if(aIter->isModified()) { - _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) ).append("?,"); + _sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + "?,"); } } } @@ -282,7 +282,7 @@ void OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOri { aCondition.setLength(aCondition.getLength()-5); - aSql.append(" WHERE " ).append( aCondition.makeStringAndClear()); + aSql.append(" WHERE " + aCondition.makeStringAndClear()); } else ::dbtools::throwSQLException( diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index e61259bf61b1..8999ded1e3c7 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -220,11 +220,11 @@ namespace fullName = OUString::Concat(tblName) + "." + colName; if ( _rValue.isNull() ) { - o_buf.append(fullName).append(" IS NULL "); + o_buf.append(fullName + " IS NULL "); } else { - o_buf.append(fullName).append(" = ? "); + o_buf.append(fullName + " = ? "); } } } @@ -496,7 +496,7 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrigi } if((*_rInsertRow)[columnName.second.nPosition].isModified()) { - aSql.append(::dbtools::quoteName( aQuote,columnName.second.sRealName)).append(aPara); + aSql.append(::dbtools::quoteName( aQuote,columnName.second.sRealName) + aPara); } ++i; } @@ -513,7 +513,7 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrigi aSql.append(" WHERE "); if(!sKeyCondition.isEmpty() && !sIndexCondition.isEmpty()) { - aSql.append(sKeyCondition.makeStringAndClear()).append(sIndexCondition.makeStringAndClear()); + aSql.append(sKeyCondition.makeStringAndClear() + sIndexCondition.makeStringAndClear()); } else if(!sKeyCondition.isEmpty()) { @@ -611,7 +611,7 @@ void OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLT { bRefetch = std::find(m_aFilterColumns.begin(),m_aFilterColumns.end(),columnName.second.sRealName) == m_aFilterColumns.end(); } - aSql.append(::dbtools::quoteName( aQuote,columnName.second.sRealName)).append(","); + aSql.append(::dbtools::quoteName( aQuote,columnName.second.sRealName) + ","); aValues.append("?,"); bModified = true; } @@ -717,7 +717,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ SelectColumnsMetaData::const_iterator aFind = m_pKeyColumnNames->find(autoColumn); if ( aFind != aEnd ) { - sMaxStmt.append(" MAX(").append(::dbtools::quoteName( sQuote,aFind->second.sRealName)).append("),"); + sMaxStmt.append(" MAX(" + ::dbtools::quoteName( sQuote,aFind->second.sRealName) + "),"); } } diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 4cec7ed6839b..c214402f50c5 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -188,7 +188,7 @@ void OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _ OUStringBuffer& rPart = aSql[columnName.second.sTableName]; if ( !rPart.isEmpty() ) rPart.append(", "); - rPart.append(sQuotedColumnName).append(" = ?"); + rPart.append(sQuotedColumnName + " = ?"); } } @@ -211,7 +211,7 @@ void OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _ " SET " + elem.second.toString()); OUStringBuffer& rCondition = aKeyConditions[elem.first]; if ( !rCondition.isEmpty() ) - sSql.append(" WHERE ").append( rCondition ); + sSql.append(" WHERE " + rCondition ); executeUpdate(_rInsertRow ,_rOriginalRow,sSql.makeStringAndClear(),elem.first); } diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 879342932cc0..2284f1db3e3f 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -174,28 +174,28 @@ namespace switch( i_nFilterOperator ) { case SQLFilterOperator::EQUAL: - o_sRet.append(" = " ).append( i_sValue); + o_sRet.append(OUString::Concat(" = ") + i_sValue); break; case SQLFilterOperator::NOT_EQUAL: - o_sRet.append(" <> " ).append( i_sValue); + o_sRet.append(OUString::Concat(" <> ") + i_sValue); break; case SQLFilterOperator::LESS: - o_sRet.append(" < " ).append( i_sValue); + o_sRet.append(OUString::Concat(" < ") + i_sValue); break; case SQLFilterOperator::GREATER: - o_sRet.append(" > " ).append( i_sValue); + o_sRet.append(OUString::Concat(" > ") + i_sValue); break; case SQLFilterOperator::LESS_EQUAL: - o_sRet.append(" <= " ).append( i_sValue); + o_sRet.append(OUString::Concat(" <= ") + i_sValue); break; case SQLFilterOperator::GREATER_EQUAL: - o_sRet.append(" >= " ).append( i_sValue); + o_sRet.append(OUString::Concat(" >= ") + i_sValue); break; case SQLFilterOperator::LIKE: - o_sRet.append(" LIKE " ).append( i_sValue); + o_sRet.append(OUString::Concat(" LIKE ") + i_sValue); break; case SQLFilterOperator::NOT_LIKE: - o_sRet.append(" NOT LIKE " ).append( i_sValue); + o_sRet.append(OUString::Concat(" NOT LIKE ") + i_sValue); break; case SQLFilterOperator::SQLNULL: o_sRet.append(" IS NULL"); @@ -759,7 +759,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) OUString sOriginalWhereClause = getSQLPart( Where, m_aSqlIterator, false ); if ( !sOriginalWhereClause.isEmpty() ) { - aSQL.append( " AND ( " ).append( sOriginalWhereClause ).append( " ) " ); + aSQL.append( " AND ( " + sOriginalWhereClause + " ) " ); } OUString sGroupBy = getSQLPart( Group, m_aSqlIterator, true ); @@ -1665,7 +1665,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert const ::sal_Int64 nLength = xClob->length(); if ( sal_Int64(nLength + aSQL.getLength() + STR_LIKE.getLength() ) < sal_Int64(SAL_MAX_INT32) ) { - aSQL.append("'").append(xClob->getSubString(1,static_cast<sal_Int32>(nLength))).append("'"); + aSQL.append("'" + xClob->getSubString(1,static_cast<sal_Int32>(nLength)) + "'"); } } else diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index e237d8ea3b88..94cb7168d037 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -123,7 +123,7 @@ OUString OContentHelper::impl_getHierarchicalName( bool _includingRootContainer xProp->getPropertyValue( PROPERTY_NAME ) >>= sName; OUString sPrevious = aHierarchicalName.makeStringAndClear(); - aHierarchicalName.append( sName ).append( "/" ).append( sPrevious ); + aHierarchicalName.append( sName + "/" + sPrevious ); } } OUString sHierarchicalName( aHierarchicalName.makeStringAndClear() ); diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx index 590db077437b..654a9f403402 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx @@ -74,46 +74,46 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport, OUStringBuffer sURL; if ( sType == "sdbc:mysql:jdbc" || sType == "sdbc:mysqlc" || sType == "sdbc:mysql:mysqlc" ) { - sURL.append( sType ).append( ":" ).append(sHostName); + sURL.append( sType + ":" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.append(":").append(sPortNumber); + sURL.append(":" + sPortNumber); } if ( !sDatabaseName.isEmpty() ) { - sURL.append("/").append(sDatabaseName); + sURL.append("/" + sDatabaseName); } } else if ( sType == "jdbc:oracle:thin" ) { - sURL.append("jdbc:oracle:thin:@").append(sHostName); + sURL.append("jdbc:oracle:thin:@" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.append(":").append(sPortNumber); + sURL.append(":" + sPortNumber); } if ( !sDatabaseName.isEmpty() ) { - sURL.append(":").append(sDatabaseName); + sURL.append(":" + sDatabaseName); } } else if ( sType == "sdbc:address:ldap" ) { - sURL.append("sdbc:address:ldap:").append(sHostName); + sURL.append("sdbc:address:ldap:" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.append(":").append(sPortNumber); + sURL.append(":" + sPortNumber); } } else { - sURL.append(sType).append(":").append(sHostName); + sURL.append(sType + ":" + sHostName); if ( !sPortNumber.isEmpty() ) { - sURL.append(":").append(sPortNumber); + sURL.append(":" + sPortNumber); } if ( !sDatabaseName.isEmpty() ) { - sURL.append(":").append(sDatabaseName); + sURL.append(":" + sDatabaseName); } } try diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index fc8191707c44..ac3425999cf9 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -258,7 +258,7 @@ namespace dbaui for (;;) { // be dumb, treat everything as a string - out.append(xRow->getString(i)).append(","); + out.append(xRow->getString(i) + ","); i++; } } diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 8162126a3749..91456123ec58 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -381,7 +381,7 @@ namespace dbaui bCatalogWildcard = m_xTablesList->isWildcardChecked(*xCatalog); if (m_bCatalogAtStart) { - sComposedName.append(m_xTablesList->GetWidget().get_text(*xCatalog)).append(m_sCatalogSeparator); + sComposedName.append(m_xTablesList->GetWidget().get_text(*xCatalog) + m_sCatalogSeparator); if (bCatalogWildcard) sComposedName.append(sWildcard); } @@ -396,7 +396,7 @@ namespace dbaui } } bSchemaWildcard = m_xTablesList->isWildcardChecked(*xSchema); - sComposedName.append(m_xTablesList->GetWidget().get_text(*xSchema)).append("."); + sComposedName.append(m_xTablesList->GetWidget().get_text(*xSchema) + "."); } if (bSchemaWildcard) diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 4420b83bf428..05d6181ca881 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -230,7 +230,7 @@ OUString ObjectCopySource::getSelectStatement() const aSQL.append( ", " ); } - aSQL.append( "FROM " ).append( ::dbtools::composeTableNameForSelect( m_xConnection, m_xObject ) ); + aSQL.append( "FROM " + ::dbtools::composeTableNameForSelect( m_xConnection, m_xObject ) ); sSelectStatement = aSQL.makeStringAndClear(); } diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index 50fa22f6dad4..12e3575dbafd 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -1448,7 +1448,7 @@ OUString CopyTableWizard::impl_getServerSideCopyStatement_throw(const Reference< { if ( !sColumns.isEmpty() ) sColumns.append(","); - sColumns.append(sQuote).append(aDestColumnNames[rColumnPositionPair.second - 1]).append(sQuote); + sColumns.append(sQuote + aDestColumnNames[rColumnPositionPair.second - 1] + sQuote); } } const OUString sComposedTableName = ::dbtools::composeTableName( xDestMetaData, _xTable, ::dbtools::EComposeRule::InDataManipulation, true ); diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 5bf230c17f68..ac859a3d946f 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -1090,7 +1090,7 @@ Reference<XComponentContext> raise_uno_process( catch (...) { OUStringBuffer sMsg = "error starting process: " + url; for(const auto& arg : args) - sMsg.append(" ").append(arg); + sMsg.append(" " + arg); throw uno::RuntimeException(sMsg.makeStringAndClear()); } try { diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index 9cefcb72b273..1987de8d85c5 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -205,10 +205,9 @@ namespace pcr if (!::comphelper::hasProperty(PROPERTY_LABEL, xAsSet)) continue; - OUString sDisplayName = OUStringBuffer( - ::comphelper::getString(xAsSet->getPropertyValue(PROPERTY_LABEL))). - append(" (").append(sName).append(')'). - makeStringAndClear(); + OUString sDisplayName = + ::comphelper::getString(xAsSet->getPropertyValue(PROPERTY_LABEL)) + + " (" + sName + ")"; // all requirements met -> insert m_xUserData.emplace_back(new Reference<XPropertySet>(xAsSet)); diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index b3ac1594fade..c97d39f2319b 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -995,13 +995,13 @@ void FilterCache::impl_validateAndOptimize() aType[PROPNAME_NAME] >>= sInternalTypeNameCheck; if (sInternalTypeNameCheck != sType) { - sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does support the property \"Name\" correctly.\n"); + sLog.append("Warning\t:\t" "The type \"" + sType + "\" does support the property \"Name\" correctly.\n"); ++nWarnings; } if (!ce && !cu) { - sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" does not contain any URL pattern nor any extensions.\n"); + sLog.append("Warning\t:\t" "The type \"" + sType + "\" does not contain any URL pattern nor any extensions.\n"); ++nWarnings; } #endif @@ -1077,7 +1077,7 @@ void FilterCache::impl_validateAndOptimize() (!bReferencedByHandler) ) { - sLog.append("Warning\t:\t" "The type \"").append(sType).append("\" is not used by any filter, loader or content handler.\n"); + sLog.append("Warning\t:\t" "The type \"" + sType + "\" is not used by any filter, loader or content handler.\n"); ++nWarnings; } } @@ -1098,7 +1098,7 @@ void FilterCache::impl_validateAndOptimize() sLog.append("warning\t:\t"); } - sLog.append("The type \"").append(sType).append("\" points to an invalid filter \"").append(sPrefFilter).append("\".\n"); + sLog.append("The type \"" + sType + "\" points to an invalid filter \"" + sPrefFilter + "\".\n"); continue; } @@ -1107,10 +1107,10 @@ void FilterCache::impl_validateAndOptimize() aPrefFilter[PROPNAME_TYPE] >>= sFilterTypeReg; if (sFilterTypeReg != sType) { - sLog.append("error\t:\t" "The preferred filter \"") - .append(sPrefFilter).append("\" of type \"").append(sType) - .append("\" is registered for another type \"").append(sFilterTypeReg) - .append("\".\n"); + sLog.append("error\t:\t" "The preferred filter \"" + + sPrefFilter + "\" of type \"" + sType + + "\" is registered for another type \"" + sFilterTypeReg + + "\".\n"); ++nErrors; } @@ -1118,8 +1118,8 @@ void FilterCache::impl_validateAndOptimize() aPrefFilter[PROPNAME_FLAGS] >>= nFlags; if (!(static_cast<SfxFilterFlags>(nFlags) & SfxFilterFlags::IMPORT)) { - sLog.append("error\t:\t" "The preferred filter \"").append(sPrefFilter).append("\" of type \"") - .append(sType).append("\" is not an IMPORT filter!\n"); + sLog.append("error\t:\t" "The preferred filter \"" + sPrefFilter + "\" of type \"" + + sType + "\" is not an IMPORT filter!\n"); ++nErrors; } @@ -1127,8 +1127,8 @@ void FilterCache::impl_validateAndOptimize() aPrefFilter[PROPNAME_NAME] >>= sInternalFilterNameCheck; if (sInternalFilterNameCheck != sPrefFilter) { - sLog.append("Warning\t:\t" "The filter \"").append(sPrefFilter) - .append("\" does support the property \"Name\" correctly.\n"); + sLog.append("Warning\t:\t" "The filter \"" + sPrefFilter + + "\" does support the property \"Name\" correctly.\n"); ++nWarnings; } } diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 8591186b4bbb..4592fa3efe97 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -287,7 +287,7 @@ OUString Model::getNodeDisplayName( const css::uno::Reference<css::xml::dom::XNo OUString sContent = xNode->getNodeValue(); if( bDetail || ! lcl_isWhitespace( sContent ) ) { - aBuffer.append("\"").append(Convert::collapseWhitespace( sContent )).append("\""); + aBuffer.append("\"" + Convert::collapseWhitespace( sContent ) + "\""); } } break; diff --git a/framework/source/accelerators/storageholder.cxx b/framework/source/accelerators/storageholder.cxx index 4c7702e579ca..e8a26845f489 100644 --- a/framework/source/accelerators/storageholder.cxx +++ b/framework/source/accelerators/storageholder.cxx @@ -345,7 +345,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::getParentStorage(cons sal_Int32 i = 0; for (i = 0; i < c - 1; ++i) { - sParentPath.append(lFolders[i]).append(PATH_SEPARATOR); + sParentPath.append(lFolders[i] + PATH_SEPARATOR); } auto pParent = m_lStorages.find(sParentPath.makeStringAndClear()); diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index acdb3374b6ff..41f23973020f 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -1115,11 +1115,11 @@ bool LanguageTagImpl::canonicalize() 1 + aCountry.getLength() + 1 + aVariants.getLength()); aBuf.append( aLanguage); if (!aScript.isEmpty()) - aBuf.append("-").append(aScript); + aBuf.append("-" + aScript); if (!aCountry.isEmpty()) - aBuf.append("-").append(aCountry); + aBuf.append("-" + aCountry); if (!aVariants.isEmpty()) - aBuf.append("-").append(aVariants); + aBuf.append("-" + aVariants); OUString aStr( aBuf.makeStringAndClear()); if (maBcp47 != aStr) diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index 8c8255a18229..2cff45a6d68d 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -160,10 +160,10 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: #ifdef SAL_DLLPREFIX aBuf.append(SAL_DLLPREFIX); #endif - aBuf.append( "collator_data" ).append( SAL_DLLEXTENSION ); + aBuf.append( "collator_data" SAL_DLLEXTENSION ); hModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT ); if (hModule) { - aBuf.append("get_").append(rLocale.Language).append("_"); + aBuf.append("get_" + rLocale.Language + "_"); if ( rLocale.Language == "zh" ) { OUString func_base = aBuf.makeStringAndClear(); if (OUString("TW HK MO").indexOf(rLocale.Country) >= 0) diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx index 6c9f29f722af..301b414e1b4d 100644 --- a/lotuswordpro/source/filter/lwptblformula.cxx +++ b/lotuswordpro/source/filter/lwptblformula.cxx @@ -428,7 +428,7 @@ OUString LwpFormulaFunc::ToString(LwpTableLayout* pCellsMap) //Append args for (auto const& elem : m_aArgs) { - aFormula.append(elem->ToArgString(pCellsMap)).append("|"); //separator + aFormula.append(elem->ToArgString(pCellsMap) + "|"); //separator } //erase the last "|" diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index bb63873f5540..b46392d1a246 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -602,7 +602,7 @@ writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const Sequence< OU for( const OUString& rItem : aItems ) { - sRep.append( " " ).append( rItem ); + sRep.append( " " + rItem ); } writeElement( pDoc, nXmlElement, sRep.makeStringAndClear() ); diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index b73c24accef0..1638d51a6964 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -2409,7 +2409,7 @@ void XmlStreamObject::implDumpText( TextInputStream& rTextStrm ) matching end element on the same line in the next iteration. */ if( bStartElem ) { - aOldStartElem.append( aElem ).append( aText ); + aOldStartElem.append( aElem + aText ); } else { diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index c6c81a9bec3c..dfb81a27e713 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -4735,8 +4735,7 @@ OString DrawingML::WriteWdpPicture( const OUString& rFileId, const Sequence< sal OUString sFileName = "media/hdphoto" + OUString::number( mnWdpImageCounter++ ) + ".wdp"; Reference< XOutputStream > xOutStream = mpFB->openFragmentStream( OUStringBuffer() .appendAscii( GetComponentDir() ) - .append( "/" ) - .append( sFileName ) + .append( "/" + sFileName ) .makeStringAndClear(), "image/vnd.ms-photo" ); OUString sId; diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 36d35a7ed18b..0506041e67d5 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -1120,15 +1120,9 @@ void VMLExport::AddLineDimensions( const tools::Rectangle& rRectangle ) aBottom = OString::number( rRectangle.Bottom() ); } - m_pShapeAttrList->add( XML_from, - OStringBuffer( 20 ).append( aLeft ) - .append( "," ).append( aTop ) - .makeStringAndClear() ); - - m_pShapeAttrList->add( XML_to, - OStringBuffer( 20 ).append( aRight ) - .append( "," ).append( aBottom ) - .makeStringAndClear() ); + m_pShapeAttrList->add( XML_from, aLeft + "," + aTop ); + + m_pShapeAttrList->add( XML_to, aRight + "," + aBottom ); } void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const tools::Rectangle& rRectangle, bool rbAbsolutePos) diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index 47c676cdc086..ade0bd97aeae 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -301,8 +301,7 @@ void VbaModule::createModule( std::u16string_view rVBASourceCode, else { // add a subroutine named after the module itself - aSourceCode.append( "Sub " ). - append( maName.replace( ' ', '_' ) ).append( '\n' ); + aSourceCode.append( "Sub " + maName.replace( ' ', '_' ) + "\n" ); } // append passed VBA source code diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index 1bc323d466c1..4cebfa18a7ea 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -188,9 +188,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertBool(bValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OXMLControlProperty::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into a boolean!").getStr()); + OStringBuffer("OXMLControlProperty::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into a boolean!").getStr()); aReturn <<= bValue; } break; @@ -201,9 +201,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertNumber(nValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OXMLControlProperty::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into an integer!").getStr()); + OStringBuffer("OXMLControlProperty::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into an integer!").getStr()); if (TypeClass_SHORT == _rExpectedType.getTypeClass()) aReturn <<= static_cast<sal_Int16>(nValue); else @@ -221,9 +221,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertDouble(nValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OXMLControlProperty::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into a double!").getStr()); + OStringBuffer("OXMLControlProperty::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into a double!").getStr()); aReturn <<= nValue; } break; @@ -250,9 +250,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertDouble(nValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OPropertyImport::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into a double!").getStr()); + OStringBuffer("OPropertyImport::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into a double!").getStr()); // then convert it into the target type switch (nType) diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 84633a640de8..882cc8c190bb 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -1169,7 +1169,7 @@ ScCaptionPtr ScNoteUtil::CreateTempCaption( if( pNote && !pNote->IsCaptionShown() ) { if( !aBuffer.isEmpty() ) - aBuffer.append( "\n--------\n" ).append( pNote->GetText() ); + aBuffer.append( "\n--------\n" + pNote->GetText() ); pNoteCaption = pNote->GetOrCreateCaption( rPos ); } diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 06ffd08c7d44..283f45ee8d0a 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -2185,7 +2185,7 @@ static void lcl_ScRange_Format_XL_Header( OUStringBuffer& rString, const ScRange default: if (!aDocName.isEmpty()) { - rString.append("[").append(aDocName).append("]"); + rString.append("[" + aDocName + "]"); } rString.append(aTabName); break; diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 7abcc01864ac..ebe614ed7b81 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -426,20 +426,15 @@ void ScChangeAction::GetDescription( // not properly restored in formulas. See specification at // http://specs.openoffice.org/calc/ease-of-use/redlining_comment.sxw - OUStringBuffer aBuf(rStr); // Take the original string. if (GetType() == SC_CAT_MOVE) { - aBuf.append( - ScResId(STR_CHANGED_MOVE_REJECTION_WARNING)).append(" "); - rStr = aBuf.makeStringAndClear(); + rStr += ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) + " "; return; } if (IsInsertType()) { - aBuf.append( - ScResId(STR_CHANGED_DELETE_REJECTION_WARNING)).append(" "); - rStr = aBuf.makeStringAndClear(); + rStr += ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) + " "; return; } @@ -454,19 +449,13 @@ void ScChangeAction::GetDescription( if (pReject->GetType() == SC_CAT_MOVE) { - aBuf.append( - ScResId(STR_CHANGED_MOVE_REJECTION_WARNING)); - aBuf.append(' '); - rStr = aBuf.makeStringAndClear(); + rStr += ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) + " "; return; } if (pReject->IsDeleteType()) { - aBuf.append( - ScResId(STR_CHANGED_DELETE_REJECTION_WARNING)); - aBuf.append(' '); - rStr = aBuf.makeStringAndClear(); + rStr += ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) + " "; return; } @@ -482,15 +471,9 @@ void ScChangeAction::GetDescription( return; if( itChangeAction->second->GetType() == SC_CAT_MOVE) - aBuf.append( - ScResId(STR_CHANGED_MOVE_REJECTION_WARNING)); + rStr += ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) + " "; else - aBuf.append( - ScResId(STR_CHANGED_DELETE_REJECTION_WARNING)); - - aBuf.append(' '); - rStr = aBuf.makeStringAndClear(); - return; + rStr += ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) + " "; } OUString ScChangeAction::GetRefString( @@ -707,15 +690,13 @@ void ScChangeActionIns::GetDescription( return; // Construct a range string to replace '#1' first. - OUStringBuffer aBuf(ScResId(pWhatId)); - aBuf.append(' '); - aBuf.append(GetRefString(GetBigRange(), rDoc)); - OUString aRangeStr = aBuf.makeStringAndClear(); + OUString aRangeStr = ScResId(pWhatId) + + " " + + GetRefString(GetBigRange(), rDoc); aRsc = aRsc.replaceAt(nPos, 2, aRangeStr); // replace '#1' with the range string. - aBuf.append(rStr).append(aRsc); - rStr = aBuf.makeStringAndClear(); + rStr += aRsc; } bool ScChangeActionIns::IsEndOfList() const @@ -955,15 +936,11 @@ void ScChangeActionDel::GetDescription( return; // Build a string to replace with. - OUStringBuffer aBuf; - aBuf.append(ScResId(pWhatId)); - aBuf.append(' '); - aBuf.append(GetRefString(aTmpRange, rDoc)); - OUString aRangeStr = aBuf.makeStringAndClear(); + OUString aRangeStr = ScResId(pWhatId) + " " + + GetRefString(aTmpRange, rDoc); aRsc = aRsc.replaceAt(nPos, 2, aRangeStr); // replace '#1' with the string. - aBuf.append(rStr).append(aRsc); - rStr = aBuf.makeStringAndClear(); // append to the original. + rStr += aRsc; // append to the original. } bool ScChangeActionDel::Reject( ScDocument& rDoc ) diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 233038b90c24..488e5ab1fd9f 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -688,7 +688,7 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r OUStringBuffer aBuf(aFile.getLength() + aName.getLength() + 9); if (bODF) aBuf.append( '['); - aBuf.append( "'" ).append( aFile ).append( "'" ).append( OUStringChar(cSep) ); + aBuf.append( "'" + aFile + "'" + OUStringChar(cSep) ); if (bODF) aBuf.append( "$$'" ); aBuf.append( aName); @@ -952,7 +952,7 @@ struct ConventionOOO_A1 : public Convention_A1 else aFile = INetURLObject::decode(rFileName, INetURLObject::DecodeMechanism::Unambiguous); - rBuffer.append("'").append(aFile.replaceAll("'", "''")).append("'#"); + rBuffer.append("'" + aFile.replaceAll("'", "''") + "'#"); if (!rRef.IsTabRel()) rBuffer.append('$'); diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index 2e68d4ba57ec..a640ebfba70a 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -502,9 +502,7 @@ DATASET DifParser::GetNextDataset() ReadNextLine( aTmpLine ); if ( eRet == D_SYNT_ERROR ) { // for broken records write "#ERR: data" to cell - m_aData = "#ERR: "; - m_aData.append(pCurrentBuffer).append(" ("); - m_aData.append(aTmpLine).append(')'); + m_aData = OUString::Concat("#ERR: ") + pCurrentBuffer + " (" + aTmpLine + ")"; eRet = D_STRING; } else diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index d7b769e2c811..d841789e8b5e 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -739,7 +739,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico (aFontData.mbItalic != aNewData.mbItalic); if( bNewFont || (bNewStyle && pFontList) ) { - aParaText.append("&\"").append(aNewData.maName); + aParaText.append("&\"" + aNewData.maName); if( pFontList ) { FontMetric aFontMetric( pFontList->Get( @@ -748,7 +748,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico aNewData.mbItalic ? ITALIC_NORMAL : ITALIC_NONE ) ); aNewData.maStyle = pFontList->GetStyleName( aFontMetric ); if( !aNewData.maStyle.isEmpty() ) - aParaText.append(",").append(aNewData.maStyle); + aParaText.append("," + aNewData.maStyle); } aParaText.append("\""); } @@ -784,7 +784,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico aNewData.maColor = aFont.GetColor(); if ( !aFontData.maColor.IsRGBEqual( aNewData.maColor ) ) { - aParaText.append("&K").append(aNewData.maColor.AsRGBHexString()); + aParaText.append("&K" + aNewData.maColor.AsRGBHexString()); } // strikeout diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 5d527f6ca167..ca93cdc02f34 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -490,7 +490,7 @@ OString ScHTMLExport::BorderToStyle(const char* pBorderName, aOut.append("; "); // which border - aOut.append("border-").append(pBorderName).append(": "); + aOut.append(OString::Concat("border-") + pBorderName + ": "); // thickness int nWidth = pLine->GetWidth(); @@ -715,19 +715,18 @@ void ScHTMLExport::WriteTables() // more <TABLE ...> if ( bTabAlignedLeft ) { - aByteStrOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align). - append("=\""). - append(OOO_STRING_SVTOOLS_HTML_AL_left).append('"'); + aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_align + "=\"" + OOO_STRING_SVTOOLS_HTML_AL_left "\""); } // ALIGN=LEFT allow text and graphics to flow around // CELLSPACING - aByteStrOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellspacing). - append("=\""). + aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_cellspacing + "=\""). append(static_cast<sal_Int32>(nCellSpacing)).append('"'); // BORDER=0, we do the styling of the cells in <TD> - aByteStrOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_border). - append("=\"0\""); + aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_border "=\"0\""); IncIndent(1); TAG_ON_LF( aByteStrOut.makeStringAndClear().getStr() ); // --- <COLGROUP> ---- @@ -877,8 +876,7 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC const SvxBoxItem* pBorder = pDoc->GetAttr( nCol, nRow, nTab, ATTR_BORDER ); if ( pBorder && (pBorder->GetTop() || pBorder->GetBottom() || pBorder->GetLeft() || pBorder->GetRight()) ) { - aStrTD.append(' ').append(OOO_STRING_SVTOOLS_HTML_style). - append("=\""); + aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_style "=\""); bool bInsertSemicolon = false; aStrTD.append(BorderToStyle("top", pBorder->GetTop(), @@ -937,8 +935,7 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC if ( bTableDataHeight ) { - aStrTD.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height). - append("=\""). + aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_height "=\""). append(static_cast<sal_Int32>(nHeightPixel)).append('"'); } @@ -1016,8 +1013,8 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC default: pChar = OOO_STRING_SVTOOLS_HTML_AL_left; break; } - aStrTD.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align). - append("=\"").append(pChar).append('"'); + aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_align "=\"" + + OString::Concat(pChar) + "\""); switch( rVerJustifyItem.GetValue() ) { @@ -1093,8 +1090,7 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC OStringBuffer aStr(OOO_STRING_SVTOOLS_HTML_font); if ( bSetFontName ) { - aStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_face). - append("=\""); + aStr.append(" " OOO_STRING_SVTOOLS_HTML_O_face "=\""); if (!rFontItem.GetFamilyName().isEmpty()) { diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index f6553af07cd9..a6e058c5c453 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -1292,9 +1292,9 @@ bool OpCodeProviderImpl::initOpCode( sal_Int32& ornOpCode, const ApiTokenMap& rT } return true; } - OSL_FAIL( OStringBuffer( "OpCodeProviderImpl::initOpCode - opcode for \"" ). - append( OUStringToOString( rOdfName, RTL_TEXTENCODING_ASCII_US ) ). - append( "\" not found" ).getStr() ); + OSL_FAIL( OStringBuffer( "OpCodeProviderImpl::initOpCode - opcode for \"" + + OUStringToOString( rOdfName, RTL_TEXTENCODING_ASCII_US ) + + "\" not found" ).getStr() ); return false; } diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 70146cd0747c..eaf960f9e9e2 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -2040,9 +2040,9 @@ void NumberFormatsBuffer::insertBuiltinFormats() BuiltinVec aBuiltinVec; BuiltinMap::const_iterator aMIt = aBuiltinMap.find( maLocaleStr ), aMEnd = aBuiltinMap.end(); OSL_ENSURE( aMIt != aMEnd, - OStringBuffer( "NumberFormatsBuffer::insertBuiltinFormats - locale '" ). - append( OUStringToOString( maLocaleStr, RTL_TEXTENCODING_ASCII_US ) ). - append( "' not supported (#i29949#)" ).getStr() ); + OStringBuffer( "NumberFormatsBuffer::insertBuiltinFormats - locale '" + + OUStringToOString( maLocaleStr, RTL_TEXTENCODING_ASCII_US ) + + "' not supported (#i29949#)" ).getStr() ); // start with default table, if no table has been found if( aMIt == aMEnd ) aMIt = aBuiltinMap.find( "*" ); diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx index 0f561c5ab629..14974c30da71 100644 --- a/sc/source/filter/oox/querytablebuffer.cxx +++ b/sc/source/filter/oox/querytablebuffer.cxx @@ -69,7 +69,7 @@ void lclAppendWebQueryTableName( OUStringBuffer& rTables, std::u16string_view rT { if( !rTables.isEmpty() ) rTables.append( ';' ); - rTables.append( "HTML__" ).append( rTableName ); + rTables.append( OUString::Concat("HTML__") + rTableName ); } } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 168334f5cce9..3abf07641963 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1455,7 +1455,7 @@ void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec { if ( !ppFDesc->getFunctionName().isEmpty() ) { - aTipStr.append(" : ").append(ppFDesc->getDescription()); + aTipStr.append(" : " + ppFDesc->getDescription()); } } ShowTip( aTipStr.makeStringAndClear() ); diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 55072f5d5f9c..4200457956fe 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1349,7 +1349,7 @@ void ScCheckListMenuControl::getResult(ResultType& rResult) std::unique_ptr<weld::TreeIter> xIter(mpChecks->make_iterator(maMembers[i].mxParent.get())); do { - aLabel.append(";").append(mpChecks->get_text(*xIter)); + aLabel.append(";" + mpChecks->get_text(*xIter)); } while (mpChecks->iter_parent(*xIter)); } diff --git a/sc/source/ui/condformat/condformathelper.cxx b/sc/source/ui/condformat/condformathelper.cxx index 3ae4f301a1a5..b595b6f8d157 100644 --- a/sc/source/ui/condformat/condformathelper.cxx +++ b/sc/source/ui/condformat/condformathelper.cxx @@ -204,7 +204,7 @@ OUString ScCondFormatHelper::GetExpression( ScCondFormatEntryType eType, sal_Int aBuffer.append(getExpression(nIndex)); if(nIndex <= 7 || nIndex >= 19) { - aBuffer.append(" ").append(aStr1); + aBuffer.append(OUString::Concat(" ") + aStr1); if(nIndex == 6 || nIndex == 7) { aBuffer.append(" "); @@ -216,7 +216,7 @@ OUString ScCondFormatHelper::GetExpression( ScCondFormatEntryType eType, sal_Int } else if(eType == FORMULA) { - aBuffer.append(" ").append(aStr1); + aBuffer.append(OUString::Concat(" ") + aStr1); } else if(eType == DATE) { diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx index 7a03f7ed3871..dfdc72375cb1 100644 --- a/sc/source/ui/dataprovider/datatransformation.cxx +++ b/sc/source/ui/dataprovider/datatransformation.cxx @@ -135,7 +135,7 @@ void MergeColumnTransformation::Transform(ScDocument& rDoc) const { if (itr != nTargetCol) { - aStr.append(maMergeString).append(rDoc.GetString(itr, nRow, 0)); + aStr.append(maMergeString + rDoc.GetString(itr, nRow, 0)); } } rDoc.SetString(nTargetCol, nRow, 0, aStr.makeStringAndClear()); diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index 5dcb1cbd251f..0d584b5291a6 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -228,17 +228,17 @@ OUString ScAsciiOptions::WriteToString() const aOutStr.append(",") //Token 5: Language - .append(static_cast<sal_Int32>(static_cast<sal_uInt16>(eLang))).append(",") + .append(static_cast<sal_Int32>(static_cast<sal_uInt16>(eLang))).append("," + //Token 6: Import quoted field as text. - .append(OUString::boolean( bQuotedFieldAsText )).append(",") + OUString::boolean( bQuotedFieldAsText ) + "," + //Token 7: Detect special numbers. - .append(OUString::boolean( bDetectSpecialNumber )).append(",") + OUString::boolean( bDetectSpecialNumber ) + "," + // Token 8: used for "Save as shown" in export options - .append(OUString::boolean( bSaveAsShown )).append(",") + OUString::boolean( bSaveAsShown ) +"," + // Token 9: used for "Save cell formulas" in export options - .append(OUString::boolean( bSaveFormulas )).append(",") + OUString::boolean( bSaveFormulas ) + "," + //Token 10: Trim Space - .append(OUString::boolean( bRemoveSpace )); + OUString::boolean( bRemoveSpace )); return aOutStr.makeStringAndClear(); } diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 0dc4692645d9..c7bcf1c8b893 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -363,7 +363,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( !aStrField.isEmpty() ) { - aStrList.append(aStrField).append("\n"); + aStrList.append(aStrField + "\n"); } } else @@ -386,7 +386,7 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, if ( !aStrField.isEmpty() ) { - aStrList.append(aStrField).append("\n"); + aStrList.append(aStrField + "\n"); } } else diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index 03e53c640718..9d167d862e0e 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -615,7 +615,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t nIndex) } else { - aLabel.append(" - ").append(rItem.m_aString); + aLabel.append(" - " + rItem.m_aString); } } } diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx index 9b5140cd0fb1..2bd35542130b 100644 --- a/sc/source/ui/vba/vbahyperlink.cxx +++ b/sc/source/ui/vba/vbahyperlink.cxx @@ -78,7 +78,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch { OUStringBuffer aBuffer( aUrlComp.first ); if( !aUrlComp.second.isEmpty() ) - aBuffer.append( " - " ).append( aUrlComp.second ); + aBuffer.append( " - " + aUrlComp.second ); aTextToDisplay = aBuffer.makeStringAndClear(); } } diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 7c145f83bda8..8eba8097b236 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -211,7 +211,7 @@ ScVbaNames::Add( const css::uno::Any& Name , OUString sRangeAdd = xArea->Address( aAny2, aAny2 , aAny2 , aAny2, aAny2 ); if ( nArea > 1 ) sTmp.append(","); - sTmp.append("'").append(xRange->getWorksheet()->getName()).append("'.").append(sRangeAdd); + sTmp.append("'" + xRange->getWorksheet()->getName() + "'." + sRangeAdd); } mxNames->addNewByName( sName, sTmp.makeStringAndClear(), aCellAddr, 0/*nUnoType*/); return Item( uno::makeAny( sName ), uno::Any() ); diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index f4581d394dd0..b727d817e185 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -2411,11 +2411,11 @@ void lcl_createGroupsData( bool bGroupHidden = pEntry->IsHidden(); rGroupsBuffer - .append("{ \"level\": ").append(sal_Int32(nLevel + 1)).append(", ") - .append("\"index\": ").append(sal_Int32(nIndex)).append(", ") - .append("\"startPos\": ").append(rGroupStartPositions[nLevel]).append(", ") - .append("\"endPos\": ").append(nTotalPx).append(", ") - .append("\"hidden\": ").append(sal_Int32(bGroupHidden ? 1 : 0)).append(" }"); + .append("{ \"level\": ").append(sal_Int32(nLevel + 1)).append(", " + "\"index\": ").append(sal_Int32(nIndex)).append(", " + "\"startPos\": ").append(rGroupStartPositions[nLevel]).append(", " + "\"endPos\": ").append(nTotalPx).append(", " + "\"hidden\": ").append(sal_Int32(bGroupHidden ? 1 : 0)).append(" }"); // look for the next visible group control at level nLevel bool bFound = false; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 13ec3572b701..afed524c0452 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1746,20 +1746,12 @@ void PowerPointExport::WriteDefaultColorSchemes(const FSHelperPtr& pFS) break; } - OUString sOpenColorScheme = OUStringBuffer() - .append("<a:") - .append(sName) - .append(">") - .makeStringAndClear(); + OUString sOpenColorScheme = "<a:" + sName + ">"; pFS->write(sOpenColorScheme); pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor)); - OUString sCloseColorScheme = OUStringBuffer() - .append("</a:") - .append(sName) - .append(">") - .makeStringAndClear(); + OUString sCloseColorScheme = "</a:" + sName + ">"; pFS->write(sCloseColorScheme); } } @@ -1799,20 +1791,12 @@ bool PowerPointExport::WriteColorSchemes(const FSHelperPtr& pFS, const OUString& } } - OUString sOpenColorScheme = OUStringBuffer() - .append("<a:") - .append(sName) - .append(">") - .makeStringAndClear(); + OUString sOpenColorScheme ="<a:" + sName + ">"; pFS->write(sOpenColorScheme); pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(nColor)); - OUString sCloseColorScheme = OUStringBuffer() - .append("</a:") - .append(sName) - .append(">") - .makeStringAndClear(); + OUString sCloseColorScheme = "</a:" + sName + ">"; pFS->write(sCloseColorScheme); } diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index e9aba13346e3..78914a0adf14 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -325,9 +325,9 @@ OUString getParagraphStyle( SdrOutliner* pOutliner, sal_Int32 nPara ) void lclAppendStyle(OUStringBuffer& aBuffer, std::u16string_view aTag, std::u16string_view aStyle) { if (aStyle.empty()) - aBuffer.append("<").append(aTag).append(">"); + aBuffer.append(OUString::Concat("<") + aTag + ">"); else - aBuffer.append("<").append(aTag).append(" style=\"").append(aStyle).append("\">"); + aBuffer.append(OUString::Concat("<") + aTag + " style=\"" + aStyle + "\">"); } } // anonymous namespace @@ -1334,7 +1334,7 @@ void HtmlExport::WriteOutlinerParagraph(OUStringBuffer& aStr, SdrOutliner* pOutl lclAppendStyle(aStr, aTag, getParagraphStyle(pOutliner, nIndex)); aStr.append(aParaText); - aStr.append("</").append(aTag).append(">\r\n"); + aStr.append("</" + aTag + ">\r\n"); } else { @@ -1578,7 +1578,7 @@ bool HtmlExport::CreateHtmlForPresPages() // HTML Head OUStringBuffer aStr(gaHTMLHeader); aStr.append(CreateMetaCharset()); - aStr.append(" <title>" ).append( StringToHTMLString(maPageNames[nSdPage]) ).append("</title>\r\n"); + aStr.append(" <title>" + StringToHTMLString(maPageNames[nSdPage]) + "</title>\r\n"); // insert timing information pPage = maPages[ nSdPage ]; @@ -2793,7 +2793,7 @@ OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPo if (nPoint < nNoOfPoints - 1) aStr.append(','); } - aStr.append("\" href=\"").append(rHRef).append("\">\n"); + aStr.append(OUString::Concat("\" href=\"") + rHRef + "\">\n"); } return aStr.makeStringAndClear(); diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx index a500d9191131..de55f38f8514 100644 --- a/sd/source/ui/remotecontrol/Communicator.cxx +++ b/sd/source/ui/remotecontrol/Communicator.cxx @@ -82,13 +82,12 @@ void Communicator::execute() Transmitter::PRIORITY_HIGH ); } - OStringBuffer aBuffer; - aBuffer - .append( "slideshow_info\n" ) - .append( OUStringToOString( ::comphelper::DocumentInfo::getDocumentTitle( xFrame->getController()->getModel() ), RTL_TEXTENCODING_UTF8 ) ) - .append("\n\n"); + OString aBuffer = + "slideshow_info\n" + + OUStringToOString( ::comphelper::DocumentInfo::getDocumentTitle( xFrame->getController()->getModel() ), RTL_TEXTENCODING_UTF8 ) + + "\n\n"; - pTransmitter->addMessage( aBuffer.makeStringAndClear(), Transmitter::PRIORITY_LOW ); + pTransmitter->addMessage( aBuffer.getStr(), Transmitter::PRIORITY_LOW ); } catch (uno::RuntimeException &) { diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index 90f88a6c5374..9ed2ae727761 100644 --- a/sd/source/ui/remotecontrol/DiscoveryService.cxx +++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx @@ -164,10 +164,9 @@ void SAL_CALL DiscoveryService::run() OString aString( aBuffer, strlen( "LOREMOTE_SEARCH" ) ); if ( aString == "LOREMOTE_SEARCH" ) { - OStringBuffer aStringBuffer("LOREMOTE_ADVERTISE\n"); - aStringBuffer.append( OUStringToOString( - osl::SocketAddr::getLocalHostname(), RTL_TEXTENCODING_UTF8 ) ) - .append( "\n\n" ); + OString aStringBuffer = "LOREMOTE_ADVERTISE\n" + + OUStringToOString(osl::SocketAddr::getLocalHostname(), RTL_TEXTENCODING_UTF8 ) + + "\n\n"; if ( sendto( mSocket, aStringBuffer.getStr(), aStringBuffer.getLength(), 0, reinterpret_cast<sockaddr*>(&aAddr), sizeof(aAddr) ) <= 0 ) diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 4657c87f89c9..102738a8705e 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -945,10 +945,11 @@ SearchTabPage_Impl::~SearchTabPage_Impl() for ( sal_Int32 i = 0; i < nCount; ++i ) { - aUserData.append(";").append(INetURLObject::encode( - m_xSearchED->get_text(i), - INetURLObject::PART_UNO_PARAM_VALUE, - INetURLObject::EncodeMechanism::All )); + aUserData.append(";" + + INetURLObject::encode( + m_xSearchED->get_text(i), + INetURLObject::PART_UNO_PARAM_VALUE, + INetURLObject::EncodeMechanism::All )); } Any aUserItem = makeAny( aUserData.makeStringAndClear() ); diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index 4c8b237bb90a..1b83c2be8b1e 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -61,13 +61,13 @@ void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm, rStrm.WriteCharPtr( pIndent ); OStringBuffer sOut; - sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_meta).append(' ') + sOut.append("<" OOO_STRING_SVTOOLS_HTML_meta " ") .append(bHTTPEquiv ? OOO_STRING_SVTOOLS_HTML_O_httpequiv : OOO_STRING_SVTOOLS_HTML_O_name).append("=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rStrm, rName, eDestEnc, pNonConvertableChars ); - sOut.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_content).append("=\""); + sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_content "=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rStrm, rContent, eDestEnc, pNonConvertableChars ).WriteCharPtr( "\"/>" ); @@ -239,8 +239,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( { aURL = URIHelper::simpleNormalizedMakeRelative( rBaseURL, aURL ); - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_src "=\""); rOut.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rOut, aURL, eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -250,8 +249,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( aAny = xSet->getPropertyValue("FrameName"); if ( (aAny >>= aStr) && !aStr.isEmpty() ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_name "=\""); rOut.WriteOString( sOut.makeStringAndClear() ); HTMLOutFuncs::Out_String( rOut, aStr, eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -279,8 +277,8 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( if ( aAny >>= bVal ) { const char *pStr = bVal ? sHTML_SC_yes : sHTML_SC_no; - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_scrolling) - .append(pStr); + sOut.append(OString::Concat(" " OOO_STRING_SVTOOLS_HTML_O_scrolling) + + pStr); } } diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index fbecef81125e..830df11c319b 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -538,8 +538,7 @@ void UsageInfo::save() OStringBuffer aUsageInfoMsg("Document Type;Command;Count"); for (auto const& elem : maUsage) - aUsageInfoMsg.append("\n").append(elem.first.toUtf8()) - .append(";").append(static_cast<sal_Int32>(elem.second)); + aUsageInfoMsg.append("\n" + elem.first.toUtf8() + ";").append(static_cast<sal_Int32>(elem.second)); sal_uInt64 written = 0; auto s = aUsageInfoMsg.makeStringAndClear(); @@ -1309,7 +1308,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aBuffer.append(u'{'); for (sal_Int32 itSeq = 0; itSeq < aSeq.getLength(); itSeq++) { - aBuffer.append("\"").append(aSeq[itSeq]); + aBuffer.append("\"" + aSeq[itSeq]); if (itSeq != aSeq.getLength() - 1) aBuffer.append("\":true,"); else diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index efc99c1af294..54ae8fc0e2db 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1777,7 +1777,7 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl() const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl(); OUStringBuffer aMsg; - aMsg.append(SfxResId(STR_DELETE_STYLE_USED)).append(SfxResId(STR_DELETE_STYLE)); + aMsg.append(SfxResId(STR_DELETE_STYLE_USED) + SfxResId(STR_DELETE_STYLE)); pTreeView->selected_foreach([this, pTreeView, pItem, &aList, &bUsedStyle, &aMsg](weld::TreeIter& rEntry){ aList.emplace_back(pTreeView->make_iterator(&rEntry)); diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index a19498de467d..d334177d71e6 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -477,14 +477,14 @@ void SfxLokHelper::notifyWindow(const SfxViewShell* pThisView, OStringBuffer aPayload; aPayload.append("{ \"id\": \"").append(static_cast<sal_Int64>(nLOKWindowId)).append('"'); - aPayload.append(", \"action\": \"").append(OUStringToOString(rAction, RTL_TEXTENCODING_UTF8)).append('"'); + aPayload.append(", \"action\": \"" + OUStringToOString(rAction, RTL_TEXTENCODING_UTF8) + "\""); for (const auto& rItem: rPayload) { if (!rItem.first.isEmpty() && !rItem.second.isEmpty()) { - aPayload.append(", \"").append(rItem.first).append("\": \"") - .append(rItem.second).append('"'); + aPayload.append(", \"" + rItem.first + "\": \"" + + rItem.second).append('"'); } } aPayload.append('}'); diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 6a3147d2f817..cb46776cc618 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -316,7 +316,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers break; case 0x2208: // in case 0x2209: // notin - rRet.append(" func ").append(OUStringChar(nChar)).append(" "); + rRet.append(" func " + OUStringChar(nChar) + " "); break; case 0x220d: // owns rRet.append(u" func \u220b "); @@ -432,7 +432,7 @@ bool MathType::LookupChar(sal_Unicode nChar,OUStringBuffer &rRet,sal_uInt8 nVers case 0x2289: // nsupseteq case 0x22b2: // NORMAL SUBGROUP OF case 0x22b3: // CONTAINS AS NORMAL SUBGROUP - rRet.append(" func ").append(OUStringChar(nChar)).append(" "); + rRet.append(" func " + OUStringChar(nChar) + " "); break; case 0x22a5: pC = " ortho "; @@ -1438,7 +1438,7 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector, else if (nPart == 1) { rRet.insert(0, sPush); - rRet.append(" over ").append(sMainTerm); + rRet.append(" over " + sMainTerm); sPush.clear(); sMainTerm.clear(); } @@ -2891,7 +2891,7 @@ bool MathType::HandleChar(sal_Int32 &rTextStart, int &rSetSize, int nLevel, aStr.clear(); TypeFaceToString(aStr,nTypeFace); - rRet.append(aStr).append("{"); + rRet.append(aStr + "{"); } else rRet.append(" {"); @@ -2935,7 +2935,7 @@ bool MathType::HandleChar(sal_Int32 &rTextStart, int &rSetSize, int nLevel, if ((xfEMBELL(nTag)) && (!bSilent)) { - rRet.append("}}").append(sPost); // #i24340# make what would be "vec {A}_n" become "{vec {A}}_n" + rRet.append("}}" + sPost); // #i24340# make what would be "vec {A}_n" become "{vec {A}}_n" rTextStart = rRet.getLength(); } return bRet; diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index 43a4cd500e1b..f5ac858474c2 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -786,16 +786,16 @@ OUString URIHelper::resolveIdnaHost(OUString const & url) { return url; } OUStringBuffer buf(uri->getScheme()); - buf.append("://").append(auth.subView(0, hostStart)); + buf.append(OUString::Concat("://") + auth.subView(0, hostStart)); buf.append( reinterpret_cast<sal_Unicode const *>(ascii.getBuffer()), ascii.length()); - buf.append(auth.subView(hostEnd)).append(uri->getPath()); + buf.append(auth.subView(hostEnd) + uri->getPath()); if (uri->hasQuery()) { - buf.append('?').append(uri->getQuery()); + buf.append("?" + uri->getQuery()); } if (uri->hasFragment()) { - buf.append('#').append(uri->getFragment()); + buf.append("#" + uri->getFragment()); } return buf.makeStringAndClear(); } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 85ee27638587..a3207d20831b 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -4335,7 +4335,7 @@ OUString NfCurrencyEntry::BuildSymbolString(bool bBank, if ( aSymbol.indexOf( '-' ) >= 0 || aSymbol.indexOf( ']' ) >= 0) { - aBuf.append('"').append(aSymbol).append('"'); + aBuf.append("\"" + aSymbol + "\""); } else { @@ -4355,7 +4355,7 @@ OUString NfCurrencyEntry::Impl_BuildFormatStringNumChars( const LocaleDataWrappe sal_uInt16 nDecimalFormat) const { OUStringBuffer aBuf; - aBuf.append('#').append(rLoc.getNumThousandSep()).append("##0"); + aBuf.append("#" + rLoc.getNumThousandSep() + "##0"); if (nDecimalFormat && nDigits) { aBuf.append(rLoc.getNumDecimalSep()); diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index ade0dac4768f..de73817ff474 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -5136,7 +5136,7 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords, // lcl_insertLCID() below, in practice as long as it is used for system // time and date modifiers it shouldn't (i.e. there is no calendar or // numeral specified as well). - aStr.append("[$-").append( maLocale.generateCode()).append(']'); + aStr.append("[$-" + maLocale.generateCode() + "]"); } bool bDefault[4]; // 1 subformat matches all if no condition specified, diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 48beab0039cd..c75d293b6f77 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -625,11 +625,11 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, return rStream; OStringBuffer sOut; - sOut.append('<') - .append(OOO_STRING_SVTOOLS_HTML_map) - .append(' ') - .append(OOO_STRING_SVTOOLS_HTML_O_name) - .append("=\""); + sOut.append(OString::Concat("<") + + OOO_STRING_SVTOOLS_HTML_map + " " + OOO_STRING_SVTOOLS_HTML_O_name + "=\""); rStream.WriteOString( sOut.makeStringAndClear() ); Out_String( rStream, rOutName, eDestEnc, pNonConvertableChars ); rStream.WriteCharPtr( "\">" ); @@ -718,11 +718,11 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, if( pIndentArea ) rStream.WriteCharPtr( pIndentArea ); - sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_area) - .append(' ').append(OOO_STRING_SVTOOLS_HTML_O_shape) - .append('=').append(pShape).append(' ') - .append(OOO_STRING_SVTOOLS_HTML_O_coords).append("=\"") - .append(aCoords).append("\" "); + sOut.append(OString::Concat("<") + OOO_STRING_SVTOOLS_HTML_area + " " OOO_STRING_SVTOOLS_HTML_O_shape + "=" + pShape + " " + OOO_STRING_SVTOOLS_HTML_O_coords "=\"" + + aCoords + "\" "); rStream.WriteOString( sOut.makeStringAndClear() ); OUString aURL( pObj->GetURL() ); @@ -730,7 +730,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, { aURL = URIHelper::simpleNormalizedMakeRelative( rBaseURL, aURL ); - sOut.append(OOO_STRING_SVTOOLS_HTML_O_href).append("=\""); + sOut.append(OOO_STRING_SVTOOLS_HTML_O_href "=\""); rStream.WriteOString( sOut.makeStringAndClear() ); Out_String( rStream, aURL, eDestEnc, pNonConvertableChars ).WriteChar( '\"' ); } @@ -740,8 +740,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, const OUString& rObjName = pObj->GetName(); if( !rObjName.isEmpty() ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_name "=\""); rStream.WriteOString( sOut.makeStringAndClear() ); Out_String( rStream, rObjName, eDestEnc, pNonConvertableChars ).WriteChar( '\"' ); } @@ -749,8 +748,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, const OUString& rTarget = pObj->GetTarget(); if( !rTarget.isEmpty() && pObj->IsActive() ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_target) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_target "=\""); rStream.WriteOString( sOut.makeStringAndClear() ); Out_String( rStream, rTarget, eDestEnc, pNonConvertableChars ).WriteChar( '\"' ); } @@ -761,8 +759,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, if( !rDesc.isEmpty() ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_alt) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_alt "=\""); rStream.WriteOString( sOut.makeStringAndClear() ); Out_String( rStream, rDesc, eDestEnc, pNonConvertableChars ).WriteChar( '\"' ); } @@ -808,9 +805,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm, if( !rLanguage.isEmpty() ) { - sOut.append(' ') - .append(OOO_STRING_SVTOOLS_HTML_O_language) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_language "=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); Out_String( rStrm, rLanguage, eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -818,7 +813,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm, if( !rSrc.isEmpty() ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src).append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_src "=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); Out_String( rStrm, URIHelper::simpleNormalizedMakeRelative(rBaseURL, rSrc), eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -826,8 +821,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm, if( STARBASIC != eScriptType && pSBLibrary ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdlibrary) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_sdlibrary "=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); Out_String( rStrm, *pSBLibrary, eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -835,8 +829,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm, if( STARBASIC != eScriptType && pSBModule ) { - sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdmodule) - .append("=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_sdmodule "=\""); rStrm.WriteOString( sOut.makeStringAndClear() ); Out_String( rStrm, *pSBModule, eDestEnc, pNonConvertableChars ); sOut.append('\"'); @@ -860,19 +853,15 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm, { if( pSBLibrary ) { - sOut.append("' ") - .append(OOO_STRING_SVTOOLS_HTML_SB_library) - .append(' ') - .append(OUStringToOString(*pSBLibrary, eDestEnc)); + sOut.append("' " OOO_STRING_SVTOOLS_HTML_SB_library " " + + OUStringToOString(*pSBLibrary, eDestEnc)); rStrm.WriteOString( sOut.makeStringAndClear() ).WriteCharPtr( SAL_NEWLINE_STRING ); } if( pSBModule ) { - sOut.append("' ") - .append(OOO_STRING_SVTOOLS_HTML_SB_module) - .append(' ') - .append(OUStringToOString(*pSBModule, eDestEnc)); + sOut.append("' " OOO_STRING_SVTOOLS_HTML_SB_module " " + + OUStringToOString(*pSBModule, eDestEnc)); rStrm.WriteOString( sOut.makeStringAndClear() ).WriteCharPtr( SAL_NEWLINE_STRING ); } } ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits