[Libreoffice-commits] core.git: basctl/source chart2/qa comphelper/source compilerplugins/clang dbaccess/source filter/source lotuswordpro/source oox/source sax/source sc/source sdext/source sd/source sfx2/source svl/source svtools/source sw/source vcl/skia vcl/source xmloff/source xmlsecurity/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon May 3 13:37:52 UTC 2021


 basctl/source/basicide/baside2b.cxx                   |    4 
 chart2/qa/extras/chart2dump/chart2dump.cxx            |    2 
 comphelper/source/misc/mimeconfighelper.cxx           |    2 
 compilerplugins/clang/stringadd.cxx                   |   16 --
 dbaccess/source/ui/querydesign/QueryDesignView.cxx    |    2 
 filter/source/svg/svgwriter.cxx                       |   20 +--
 lotuswordpro/source/filter/xfilter/xfdrawpath.cxx     |    2 
 lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx  |    2 
 lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx |    2 
 oox/source/export/chartexport.cxx                     |   12 -
 oox/source/export/drawingml.cxx                       |   14 --
 oox/source/export/vmlexport.cxx                       |   45 +++----
 sax/source/tools/converter.cxx                        |    4 
 sc/source/core/tool/compiler.cxx                      |    4 
 sc/source/filter/excel/xehelper.cxx                   |    2 
 sc/source/filter/html/htmlexp.cxx                     |   11 -
 sc/source/filter/oox/formulabase.cxx                  |    4 
 sc/source/filter/oox/querytablebuffer.cxx             |    2 
 sc/source/ui/dbgui/asciiopt.cxx                       |   12 -
 sc/source/ui/miscdlgs/dataproviderdlg.cxx             |    2 
 sc/source/ui/view/tabview.cxx                         |   12 -
 sd/source/filter/eppt/pptx-epptooxml.cxx              |  109 ++++--------------
 sd/source/filter/html/htmlex.cxx                      |    2 
 sdext/source/pdfimport/pdfparse/pdfentries.cxx        |    4 
 sdext/source/pdfimport/tree/genericelements.cxx       |    2 
 sfx2/source/appl/newhelp.cxx                          |    8 -
 sfx2/source/control/unoctitm.cxx                      |    6 
 sfx2/source/view/lokhelper.cxx                        |    6 
 svl/source/passwordcontainer/passwordcontainer.cxx    |    2 
 svtools/source/svhtml/htmlout.cxx                     |    8 -
 sw/source/core/fields/cellfml.cxx                     |    6 
 sw/source/filter/html/htmldrawwriter.cxx              |   12 -
 sw/source/filter/html/htmlflywriter.cxx               |   13 --
 sw/source/filter/html/htmltabw.cxx                    |   14 +-
 sw/source/filter/ww8/docxattributeoutput.cxx          |   20 +--
 sw/source/filter/ww8/rtfattributeoutput.cxx           |   10 -
 sw/source/filter/ww8/rtfsdrexport.cxx                 |   46 +++----
 sw/source/uibase/config/modcfg.cxx                    |    2 
 sw/source/uibase/uiview/pview.cxx                     |    7 -
 vcl/skia/gdiimpl.cxx                                  |   11 -
 vcl/source/gdi/pdfobjectcopier.cxx                    |    2 
 vcl/source/uitest/logger.cxx                          |    6 
 vcl/source/window/printdlg.cxx                        |    6 
 xmloff/source/draw/animationexport.cxx                |    2 
 xmloff/source/draw/shapeexport.cxx                    |    2 
 xmloff/source/style/xmlbahdl.cxx                      |    7 -
 xmloff/source/xforms/xformsexport.cxx                 |    6 
 xmlsecurity/source/framework/buffernode.cxx           |    4 
 xmlsecurity/source/framework/saxeventkeeperimpl.cxx   |    4 
 49 files changed, 205 insertions(+), 298 deletions(-)

New commits:
commit c5a0b7af847a71fd50f713934b29305f8ce96c6b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon May 3 14:09:20 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon May 3 15:32:53 2021 +0200

    loplugin:stringadd improvement for appending numbers
    
    I was wrong, the Concat framework already optimised appending
    numbers by stack-allocating small buffers, so include
    them in the plugin
    
    Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 73cedfd04776..ecba2d5fa873 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2142,10 +2142,10 @@ IMPL_LINK(WatchWindow, RequestingChildrenHdl, const weld::TreeIter&, rParent, bo
                 for (j = 0; j < nParentLevel; j++)
                 {
                     sal_Int32 n = pChildItem->vIndices[j] = pItem->vIndices[j];
-                    aIndexStr.append(n).append(",");
+                    aIndexStr.append( OUString::number(n) + "," );
                 }
                 pChildItem->vIndices[nParentLevel] = i;
-                aIndexStr.append(i).append(")");
+                aIndexStr.append( OUString::number(i) + ")" );
 
                 OUString aDisplayName;
                 WatchItem* pArrayRootItem = pChildItem->GetRootItem();
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index aebee0dd8fcc..061ed8b19ea7 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -240,7 +240,7 @@ protected:
         OUStringBuffer aBuffer;
         for (const double& vectorItem : rVector)
         {
-            aBuffer.append(vectorItem).append(";");
+            aBuffer.append(OUString::number(vectorItem) + ";");
         }
         return aBuffer.makeStringAndClear();
     }
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 5069105dc1a1..3093aef3a9f6 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -60,7 +60,7 @@ OUString MimeConfigurationHelper::GetStringClassIDRepresentation( const uno::Seq
 
             sal_Int32 nDigit1 = static_cast<sal_Int32>( static_cast<sal_uInt8>(aClassID[nInd]) / 16 );
             sal_Int32 nDigit2 = static_cast<sal_uInt8>(aClassID[nInd]) % 16;
-            aResult.append( nDigit1, 16 ).append( nDigit2, 16 );
+            aResult.append( OUString::number(nDigit1, 16) + OUString::number( nDigit2, 16 ) );
         }
     }
 
diff --git a/compilerplugins/clang/stringadd.cxx b/compilerplugins/clang/stringadd.cxx
index 9c6d11fd55b1..c25992928f1e 100644
--- a/compilerplugins/clang/stringadd.cxx
+++ b/compilerplugins/clang/stringadd.cxx
@@ -277,12 +277,8 @@ bool StringAdd::VisitCXXMemberCallExpr(CXXMemberCallExpr const* methodCall)
         && !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())
+    // char is still a pain to work with, when constructing a chained +
+    if (paramType->isCharType() || loplugin::TypeCheck(paramType).Typedef("sal_Unicode"))
         return true;
     auto arg = methodCall->getArg(0);
     // I don't think the OUStringAppend functionality can handle this efficiently
@@ -301,12 +297,8 @@ bool StringAdd::VisitCXXMemberCallExpr(CXXMemberCallExpr const* methodCall)
         || 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())
+    // char is still a pain to work with, when constructing a chained +
+    if (paramType2->isCharType() || loplugin::TypeCheck(paramType2).Typedef("sal_Unicode"))
         return true;
     arg = methodCall2->getArg(0);
     // I don't think the OUStringAppend functionality can handle this efficiently
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 63c5d07998ec..baf90e28997b 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2812,7 +2812,7 @@ OUString OQueryDesignView::getStatement()
         const sal_Int64 nLimit = rController.getLimit();
         if( nLimit != -1 )
         {
-            aSqlCmd.append( " LIMIT " ).append(nLimit);
+            aSqlCmd.append( " LIMIT " + OUString::number(nLimit) );
         }
     }
 
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 26421884212b..a5fe44536d32 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1882,10 +1882,10 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
         if( nSize > 1 )
         {
             aPolyPoint = rPoly[ 0 ];
-            aPathData.append("M ")
-                     .append( aPolyPoint.X() )
-                     .append(aComma)
-                     .append( aPolyPoint.Y() );
+            aPathData.append("M " +
+                    OUString::number( aPolyPoint.X() ) +
+                    aComma +
+                    OUString::number( aPolyPoint.Y() ));
 
             char nCurrentMode = 0;
             const bool bClose(!bLine || rPoly[0] == rPoly[nSize - 1]);
@@ -1906,9 +1906,9 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
                             aPathData.append(aBlank);
 
                         aPolyPoint = rPoly[ n++ ];
-                        aPathData.append( aPolyPoint.X() )
-                                 .append(aComma)
-                                 .append( aPolyPoint.Y() );
+                        aPathData.append( OUString::number(aPolyPoint.X()) +
+                                aComma +
+                                OUString::number( aPolyPoint.Y() ) );
                     }
                 }
                 else
@@ -1920,9 +1920,9 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
                     }
 
                     aPolyPoint = rPoly[ n++ ];
-                    aPathData.append( aPolyPoint.X() )
-                             .append(aComma)
-                             .append( aPolyPoint.Y() );
+                    aPathData.append( OUString::number(aPolyPoint.X()) +
+                            aComma +
+                            OUString::number(aPolyPoint.Y()) );
                 }
             }
 
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx b/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx
index fdc6b1113e97..e150e436b958 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx
@@ -72,7 +72,7 @@ OUString XFSvgPathEntry::ToString()
 
     for (auto const& point : m_aPoints)
     {
-        str.append(point.GetX()*1000).append(" ").append(point.GetY()*1000).append(" ");
+        str.append( OUString::number(point.GetX()*1000) + " " + OUString::number(point.GetY()*1000) + " ");
     }
     str.stripEnd(' ');
     return str.makeStringAndClear();
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx b/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx
index d37e4f8a5848..d0e0239947af 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx
@@ -83,7 +83,7 @@ void XFDrawPolygon::ToXml(IXFStream *pStrm)
     {
         double  x = (point.GetX()-rect.GetX())*1000;
         double  y = (point.GetY()-rect.GetY())*1000;
-        strPoints.append(x).append(" ").append(y).append(" ");
+        strPoints.append( OUString::number(x) + " " + OUString::number(y) + " ");
     }
     strPoints.stripEnd(' ');
     pAttrList->AddAttribute( "draw:points", strPoints.makeStringAndClear());
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx
index 7a9bcdcad32a..6f5fb1a0f8a2 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx
@@ -83,7 +83,7 @@ void XFDrawPolyline::ToXml(IXFStream *pStrm)
     {
         double  x = (point.GetX()-rect.GetX())*1000;
         double  y = (point.GetY()-rect.GetY())*1000;
-        strPoints.append(x).append(",").append(y).append(" ");
+        strPoints.append( OUString::number(x) + "," + OUString::number(y) + " ");
     }
     strPoints.stripEnd(' ');
     pAttrList->AddAttribute( "draw:points", strPoints.makeStringAndClear());
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 2b412d43430a..4a9a1d027bc5 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -807,13 +807,11 @@ void ChartExport::WriteChartObj( const Reference< XShape >& xShape, sal_Int32 nI
     }
     OUString sFullStream = OUStringBuffer()
                             .appendAscii(sFullPath)
-                            .append(nChartCount)
-                            .append( ".xml" )
+                            .append(OUString::number(nChartCount) + ".xml")
                             .makeStringAndClear();
     OUString sRelativeStream = OUStringBuffer()
                             .appendAscii(sRelativePath)
-                            .append(nChartCount)
-                            .append( ".xml" )
+                            .append(OUString::number(nChartCount) + ".xml" )
                             .makeStringAndClear();
     FSHelperPtr pChart = CreateOutputStream(
             sFullStream,
@@ -1028,13 +1026,11 @@ void ChartExport::exportAdditionalShapes( const Reference< css::chart::XChartDoc
             }
             OUString sFullStream = OUStringBuffer()
                 .appendAscii(sFullPath)
-                .append(nDrawing)
-                .append(".xml")
+                .append(OUString::number(nDrawing) + ".xml")
                 .makeStringAndClear();
             OUString sRelativeStream = OUStringBuffer()
                 .appendAscii(sRelativePath)
-                .append(nDrawing)
-                .append(".xml")
+                .append(OUString::number(nDrawing) + ".xml")
                 .makeStringAndClear();
 
             sax_fastparser::FSHelperPtr pDrawing = CreateOutputStream(
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 1e94c7bd68ab..bfe44e32b098 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1252,8 +1252,8 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia,
 
     Reference< XOutputStream > xOutStream = mpFB->openFragmentStream( OUStringBuffer()
                                                                       .appendAscii( GetComponentDir() )
-                                                                      .append( "/media/image" )
-                                                                      .append( static_cast<sal_Int32>(mnImageCounter) )
+                                                                      .append( "/media/image" +
+                                                                        OUString::number(mnImageCounter) )
                                                                       .appendAscii( pExtension )
                                                                       .makeStringAndClear(),
                                                                       sMediaType );
@@ -1339,9 +1339,9 @@ void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::dra
         // copy the video stream
         Reference<XOutputStream> xOutStream = mpFB->openFragmentStream(OUStringBuffer()
                                                                        .appendAscii(GetComponentDir())
-                                                                       .append("/media/media")
-                                                                       .append(static_cast<sal_Int32>(mnImageCounter))
-                                                                       .append(aExtension)
+                                                                       .append("/media/media" +
+                                                                            OUString::number(mnImageCounter) +
+                                                                            aExtension)
                                                                        .makeStringAndClear(),
                                                                        aMimeType);
 
@@ -1352,9 +1352,7 @@ void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::dra
 
         // create the relation
         OUString aPath = OUStringBuffer().appendAscii(GetRelationCompPrefix())
-                                         .append("media/media")
-                                         .append(static_cast<sal_Int32>(mnImageCounter++))
-                                         .append(aExtension)
+                                         .append("media/media" + OUString::number(mnImageCounter++) + aExtension)
                                          .makeStringAndClear();
         aVideoFileRelId = mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(eMediaType), aPath);
         aMediaRelId = mpFB->addRelation(mpFS->getOutputStream(), oox::getRelationship(Relationship::MEDIA), aPath);
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 2539c7eac143..77d3e1686d16 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -582,7 +582,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
                                     sal_Int32 nX = impl_GetPointComponent( pVerticesIt, nPointSize );
                                     sal_Int32 nY = impl_GetPointComponent( pVerticesIt, nPointSize );
                                     if (nX >= 0 && nY >= 0 )
-                                        aPath.append( "m" ).append( nX ).append( "," ).append( nY );
+                                        aPath.append( "m" + OString::number( nX ) + "," + OString::number( nY ) );
                                     break;
                                 }
                                 case msopathClientEscape:
@@ -613,7 +613,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
                                     {
                                         sal_Int32 nX = impl_GetPointComponent( pVerticesIt, nPointSize );
                                         sal_Int32 nY = impl_GetPointComponent( pVerticesIt, nPointSize );
-                                        aPath.append( "l" ).append( nX ).append( "," ).append( nY );
+                                        aPath.append( "l" + OString::number( nX ) + "," + OString::number( nY ) );
                                     }
                                     break;
                                 case msopathCurveTo:
@@ -625,9 +625,9 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
                                         sal_Int32 nY2 = impl_GetPointComponent( pVerticesIt, nPointSize );
                                         sal_Int32 nX3 = impl_GetPointComponent( pVerticesIt, nPointSize );
                                         sal_Int32 nY3 = impl_GetPointComponent( pVerticesIt, nPointSize );
-                                        aPath.append( "c" ).append( nX1 ).append( "," ).append( nY1 ).append( "," )
-                                            .append( nX2 ).append( "," ).append( nY2 ).append( "," )
-                                            .append( nX3 ).append( "," ).append( nY3 );
+                                        aPath.append( "c" + OString::number( nX1 ) + "," + OString::number( nY1 ) + "," +
+                                            OString::number( nX2 ) + "," + OString::number( nY2 ) + "," +
+                                            OString::number( nX3 ) + "," + OString::number( nY3 ) );
                                     }
                                     break;
                                 case msopathClose:
@@ -1005,7 +1005,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
             case ESCHER_Prop_Rotation:
                 {
                     // The higher half of the variable contains the angle.
-                    m_ShapeStyle.append(";rotation:").append(double(opt.nPropValue >> 16));
+                    m_ShapeStyle.append(";rotation:" + OString::number(double(opt.nPropValue >> 16)));
                     bAlreadyWritten[ESCHER_Prop_Rotation] = true;
                 }
                 break;
@@ -1130,24 +1130,24 @@ void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const tools::Rec
 
     if(m_bInline)
     {
-        rBuffer.append( "width:" ).append( double( rRectangle.Right() - rRectangle.Left() ) / 20 )
-            .append( "pt;height:" ).append( double( rRectangle.Bottom() - rRectangle.Top() ) / 20 )
-            .append( "pt" );
+        rBuffer.append( "width:" + OString::number( double( rRectangle.Right() - rRectangle.Left() ) / 20 ) +
+            "pt;height:" + OString::number( double( rRectangle.Bottom() - rRectangle.Top() ) / 20 ) +
+            "pt" );
     }
     else if ( mnGroupLevel == 1 )
     {
-        rBuffer.append( "margin-left:" ).append( double( rRectangle.Left() ) / 20 )
-            .append( "pt;margin-top:" ).append( double( rRectangle.Top() ) / 20 )
-            .append( "pt;width:" ).append( double( rRectangle.Right() - rRectangle.Left() ) / 20 )
-            .append( "pt;height:" ).append( double( rRectangle.Bottom() - rRectangle.Top() ) / 20 )
-            .append( "pt" );
+        rBuffer.append( "margin-left:" + OString::number( double( rRectangle.Left() ) / 20 ) +
+            "pt;margin-top:" + OString::number( double( rRectangle.Top() ) / 20 ) +
+            "pt;width:" + OString::number( double( rRectangle.Right() - rRectangle.Left() ) / 20 ) +
+            "pt;height:" + OString::number( double( rRectangle.Bottom() - rRectangle.Top() ) / 20 ) +
+            "pt" );
     }
     else
     {
-        rBuffer.append( "left:" ).append( rRectangle.Left() )
-            .append( ";top:" ).append( rRectangle.Top() )
-            .append( ";width:" ).append( rRectangle.Right() - rRectangle.Left() )
-            .append( ";height:" ).append( rRectangle.Bottom() - rRectangle.Top() );
+        rBuffer.append( "left:" + OString::number( rRectangle.Left() ) +
+            ";top:" + OString::number( rRectangle.Top() ) +
+            ";width:" + OString::number( rRectangle.Right() - rRectangle.Left() ) +
+            ";height:" + OString::number( rRectangle.Bottom() - rRectangle.Top() ) );
     }
 
     AddFlipXY();
@@ -1400,12 +1400,11 @@ sal_Int32 VMLExport::StartShape()
 
     if ( nShapeElement >= 0 && !m_pShapeAttrList->hasAttribute( XML_type ) && bReferToShapeType )
     {
-        OStringBuffer sTypeBuffer( 20 );
+        OString sType;
         if (m_bUseHashMarkForType)
-            sTypeBuffer.append("#");
-        m_pShapeAttrList->add( XML_type, sTypeBuffer
-                .append( "_x0000_t" ).append( sal_Int32( m_nShapeType ) )
-                .makeStringAndClear() );
+            sType = "#";
+        m_pShapeAttrList->add( XML_type, sType +
+                "_x0000_t" + OString::number( m_nShapeType ) );
     }
 
     // start of the shape
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 3e76e0a5c5e5..01657ddf30db 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1549,11 +1549,11 @@ void Converter::convertDateTime(
     if (nYear < 10) {
         i_rBuffer.append(zero);
     }
-    i_rBuffer.append(nYear).append(dash);
+    i_rBuffer.append( OUString::number(nYear) + OUStringChar(dash) );
     if( i_rDateTime.Month < 10 ) {
         i_rBuffer.append(zero);
     }
-    i_rBuffer.append( static_cast<sal_Int32>(i_rDateTime.Month) ).append(dash);
+    i_rBuffer.append( OUString::number(i_rDateTime.Month) + OUStringChar(dash) );
     if( i_rDateTime.Day   < 10 ) {
         i_rBuffer.append(zero);
     }
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 9e8f8929dc12..76a60156fd16 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -1616,7 +1616,7 @@ r1c1_add_col( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress
     {
         SCCOL nCol = rRef.Col();
         if (nCol != 0)
-            rBuf.append("[").append(static_cast<sal_Int32>(nCol)).append("]");
+            rBuf.append("[" + OUString::number(nCol) + "]");
     }
     else
         rBuf.append( static_cast<sal_Int32>(rAbsRef.Col() + 1) );
@@ -1629,7 +1629,7 @@ r1c1_add_row( OUStringBuffer &rBuf, const ScSingleRefData& rRef, const ScAddress
     {
         if (rRef.Row() != 0)
         {
-            rBuf.append("[").append(rRef.Row() ).append("]");
+            rBuf.append("[" + OUString::number(rRef.Row()) + "]");
         }
     }
     else
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index d841789e8b5e..cae981a5e622 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -760,7 +760,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
                 aNewData.mnHeight = (aNewData.mnHeight + 10) / 20;
                 bool bFontHtChanged = (aFontData.mnHeight != aNewData.mnHeight);
                 if( bFontHtChanged )
-                    aParaText.append("&").append( static_cast<sal_Int32>(aNewData.mnHeight) );
+                    aParaText.append("&" + OUString::number(aNewData.mnHeight));
                 // update maximum paragraph height, convert to twips
                 nParaHeight = ::std::max< sal_Int32 >( nParaHeight, aNewData.mnHeight * 20 );
 
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index ca93cdc02f34..9fd6e737fab5 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -496,8 +496,7 @@ OString ScHTMLExport::BorderToStyle(const char* pBorderName,
         int nWidth = pLine->GetWidth();
         int nPxWidth = (nWidth > 0) ?
             std::max(o3tl::convert(nWidth, o3tl::Length::twip, o3tl::Length::px), sal_Int64(1)) : 0;
-        aOut.append(static_cast<sal_Int32>(nPxWidth)).
-            append("px ");
+        aOut.append(OString::number(nPxWidth) + "px ");
         switch (pLine->GetBorderLineStyle())
         {
             case SvxBorderLineStyle::SOLID:
@@ -722,8 +721,8 @@ void ScHTMLExport::WriteTables()
             // ALIGN=LEFT allow text and graphics to flow around
         // CELLSPACING
         aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_cellspacing
-                "=\"").
-            append(static_cast<sal_Int32>(nCellSpacing)).append('"');
+                "=\"" +
+                OString::number(nCellSpacing) + "\"");
 
         // BORDER=0, we do the styling of the cells in <TD>
         aByteStrOut.append(" " OOO_STRING_SVTOOLS_HTML_O_border "=\"0\"");
@@ -935,8 +934,8 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC
 
     if ( bTableDataHeight )
     {
-        aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_height "=\"").
-            append(static_cast<sal_Int32>(nHeightPixel)).append('"');
+        aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_height "=\"" +
+                OString::number(nHeightPixel) + "\"");
     }
 
     const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>( pAttr->GetItem(
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index a6e058c5c453..9d009dd301fe 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1272,8 +1272,8 @@ bool OpCodeProviderImpl::initOpCode( sal_Int32& ornOpCode, const OpCodeEntrySequ
         ornOpCode = rEntrySeq[ nSpecialId ].Token.OpCode;
         return true;
     }
-    OSL_FAIL( OStringBuffer( "OpCodeProviderImpl::initOpCode - opcode for special offset " ).
-        append( nSpecialId ).append( " not found" ).getStr() );
+    OSL_FAIL( OString( OString::Concat("OpCodeProviderImpl::initOpCode - opcode for special offset ") +
+                       OString::number( nSpecialId ) + " not found" ).getStr() );
     return false;
 }
 
diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx
index 14974c30da71..82f9821fcee9 100644
--- a/sc/source/filter/oox/querytablebuffer.cxx
+++ b/sc/source/filter/oox/querytablebuffer.cxx
@@ -79,7 +79,7 @@ void lclAppendWebQueryTableIndex( OUStringBuffer& rTables, sal_Int32 nTableIndex
     {
         if( !rTables.isEmpty() )
             rTables.append( ';' );
-        rTables.append( "HTML_" ).append( nTableIndex );
+        rTables.append( "HTML_" + OUString::number( nTableIndex ) );
     }
 }
 
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 270ca6b01069..4d9e8dea6fe8 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -211,24 +211,24 @@ OUString ScAsciiOptions::WriteToString() const
         aOutStr.append(ScGlobal::GetCharsetString( eCharSet ));
 
     //Token 3: Number of start row.
-    aOutStr.append(",").append(nStartRow).append(",");
+    aOutStr.append("," + OUString::number(nStartRow) + ",");
 
     //Token 4: Column info.
     for (size_t nInfo=0; nInfo<mvColStart.size(); nInfo++)
     {
         if (nInfo)
             aOutStr.append("/");
-        aOutStr.append(mvColStart[nInfo])
-               .append("/")
-               .append(static_cast<sal_Int32>(mvColFormat[nInfo]));
+        aOutStr.append(OUString::number(mvColStart[nInfo]) +
+                "/" +
+               OUString::number(mvColFormat[nInfo]));
     }
 
     // #i112025# the options string is used in macros and linked sheets,
     // so new options must be added at the end, to remain compatible
 
-    aOutStr.append(",")
+    aOutStr.append("," +
                //Token 5: Language
-               .append(static_cast<sal_Int32>(static_cast<sal_uInt16>(eLang))).append("," +
+               OUString::number(static_cast<sal_uInt16>(eLang)) + "," +
                //Token 6: Import quoted field as text.
                OUString::boolean( bQuotedFieldAsText ) + "," +
                //Token 7: Detect special numbers.
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index fe8809f144e1..85d58a907527 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -301,7 +301,7 @@ ScMergeColumnTransformationControl::ScMergeColumnTransformationControl(
     aBuffer.append(static_cast<sal_Int32>(nStartCol + 1));
     for ( SCCOL nCol = nStartCol + 1; nCol <= nEndCol; ++nCol)
     {
-        aBuffer.append(";").append(static_cast<sal_Int32>(nCol + 1));
+        aBuffer.append(";" + OUString::number(nCol + 1));
     }
 
     mxEdColumns->set_text(aBuffer.makeStringAndClear());
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index b727d817e185..4fb5d812c8af 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2410,12 +2410,12 @@ void lcl_createGroupsData(
 
                 bool bGroupHidden = pEntry->IsHidden();
 
-                rGroupsBuffer
-                    .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(" }");
+                rGroupsBuffer.append(
+                    "{ \"level\": " + OString::number(nLevel + 1) + ", "
+                    "\"index\": " + OString::number(nIndex) + ", "
+                    "\"startPos\": " + OString::number(rGroupStartPositions[nLevel]) + ", "
+                    "\"endPos\": " + OString::number(nTotalPx) + ", "
+                    "\"hidden\": " + OString::number(bGroupHidden ? 1 : 0) + " }");
 
                 // 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 0fad116fd1ea..cee8f7760e4a 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -997,11 +997,8 @@ bool PowerPointExport::WriteComments(sal_uInt32 nPageNum)
 
         if (xAnnotationEnumeration->hasMoreElements())
         {
-            FSHelperPtr pFS = openFragmentStreamWithSerializer(OUStringBuffer()
-                              .append("ppt/comments/comment")
-                              .append(static_cast<sal_Int32>(nPageNum) + 1)
-                              .append(".xml")
-                              .makeStringAndClear(),
+            FSHelperPtr pFS = openFragmentStreamWithSerializer(
+                              "ppt/comments/comment" + OUString::number(nPageNum + 1) + ".xml",
                               "application/vnd.openxmlformats-officedocument.presentationml.comments+xml");
 
             pFS->startElementNS(XML_p, XML_cmLst,
@@ -1085,11 +1082,7 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
     // add explicit relation of presentation to this slide
     OUString sRelId = addRelation(mPresentationFS->getOutputStream(),
                                   oox::getRelationship(Relationship::SLIDE),
-                                  OUStringBuffer()
-                                  .append("slides/slide")
-                                  .append(static_cast<sal_Int32>(nPageNum) + 1)
-                                  .append(".xml")
-                                  .makeStringAndClear());
+                                  OUString("slides/slide" + OUString::number(nPageNum + 1) +".xml"));
 
     mPresentationFS->singleElementNS(XML_p, XML_sldId,
                                      XML_id, OString::number(GetNewSlideId()),
@@ -1098,12 +1091,9 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
     if (nPageNum == mnPages - 1)
         mPresentationFS->endElementNS(XML_p, XML_sldIdLst);
 
-    FSHelperPtr pFS = openFragmentStreamWithSerializer(OUStringBuffer()
-                      .append("ppt/slides/slide")
-                      .append(static_cast<sal_Int32>(nPageNum) + 1)
-                      .append(".xml")
-                      .makeStringAndClear(),
-                      "application/vnd.openxmlformats-officedocument.presentationml.slide+xml");
+    FSHelperPtr pFS = openFragmentStreamWithSerializer(
+                        "ppt/slides/slide" + OUString::number(nPageNum + 1) + ".xml",
+                        "application/vnd.openxmlformats-officedocument.presentationml.slide+xml");
 
     if (mpSlidesFSArray.size() < mnPages)
         mpSlidesFSArray.resize(mnPages);
@@ -1140,21 +1130,15 @@ void PowerPointExport::ImplWriteSlide(sal_uInt32 nPageNum, sal_uInt32 nMasterNum
     // add implicit relation to slide layout
     addRelation(pFS->getOutputStream(),
                 oox::getRelationship(Relationship::SLIDELAYOUT),
-                OUStringBuffer()
-                .append("../slideLayouts/slideLayout")
-                .append(GetLayoutFileId(GetPPTXLayoutId(GetLayoutOffset(mXPagePropSet)), nMasterNum))
-                .append(".xml")
-                .makeStringAndClear());
+                OUString("../slideLayouts/slideLayout" +
+                    OUString::number(GetLayoutFileId(GetPPTXLayoutId(GetLayoutOffset(mXPagePropSet)), nMasterNum)) +
+                    ".xml"));
 
     if (WriteComments(nPageNum))
         // add implicit relation to slide comments
         addRelation(pFS->getOutputStream(),
                     oox::getRelationship(Relationship::COMMENTS),
-                    OUStringBuffer()
-                    .append("../comments/comment")
-                    .append(static_cast<sal_Int32>(nPageNum) + 1)
-                    .append(".xml")
-                    .makeStringAndClear());
+                    OUString("../comments/comment" + OUString::number(nPageNum + 1) + ".xml"));
 
     SAL_INFO("sd.eppt", "----------------");
 }
@@ -1166,12 +1150,11 @@ void PowerPointExport::ImplWriteNotes(sal_uInt32 nPageNum)
 
     SAL_INFO("sd.eppt", "write Notes " << nPageNum << "\n----------------");
 
-    FSHelperPtr pFS = openFragmentStreamWithSerializer(OUStringBuffer()
-                      .append("ppt/notesSlides/notesSlide")
-                      .append(static_cast<sal_Int32>(nPageNum) + 1)
-                      .append(".xml")
-                      .makeStringAndClear(),
-                      "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml");
+    FSHelperPtr pFS = openFragmentStreamWithSerializer(
+                        "ppt/notesSlides/notesSlide" +
+                        OUString::number(nPageNum + 1) +
+                        ".xml",
+                        "application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml");
 
     pFS->startElementNS(XML_p, XML_notes, PNMSS);
 
@@ -1186,21 +1169,13 @@ void PowerPointExport::ImplWriteNotes(sal_uInt32 nPageNum)
     // add implicit relation to slide
     addRelation(pFS->getOutputStream(),
                 oox::getRelationship(Relationship::SLIDE),
-                OUStringBuffer()
-                .append("../slides/slide")
-                .append(static_cast<sal_Int32>(nPageNum) + 1)
-                .append(".xml")
-                .makeStringAndClear());
+                OUString("../slides/slide" + OUString::number(nPageNum + 1) + ".xml"));
 
     // add slide implicit relation to notes
     if (nPageNum < mpSlidesFSArray.size())
         addRelation(mpSlidesFSArray[ nPageNum ]->getOutputStream(),
                     oox::getRelationship(Relationship::NOTESSLIDE),
-                    OUStringBuffer()
-                    .append("../notesSlides/notesSlide")
-                    .append(static_cast<sal_Int32>(nPageNum) + 1)
-                    .append(".xml")
-                    .makeStringAndClear());
+                    OUString("../notesSlides/notesSlide" + OUString::number(nPageNum + 1) + ".xml"));
 
     // add implicit relation to notes master
     addRelation(pFS->getOutputStream(),
@@ -1215,11 +1190,7 @@ void PowerPointExport::AddLayoutIdAndRelation(const FSHelperPtr& pFS, sal_Int32
     // add implicit relation of slide master to slide layout
     OUString sRelId = addRelation(pFS->getOutputStream(),
                                   oox::getRelationship(Relationship::SLIDELAYOUT),
-                                  OUStringBuffer()
-                                  .append("../slideLayouts/slideLayout")
-                                  .append(nLayoutFileId)
-                                  .append(".xml")
-                                  .makeStringAndClear());
+                                  OUString("../slideLayouts/slideLayout" + OUString::number(nLayoutFileId) + ".xml"));
 
     pFS->singleElementNS(XML_p, XML_sldLayoutId,
                          XML_id, OString::number(GetNewSlideMasterId()),
@@ -1236,11 +1207,7 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
 
     OUString sRelId = addRelation(mPresentationFS->getOutputStream(),
                                   oox::getRelationship(Relationship::SLIDEMASTER),
-                                  OUStringBuffer()
-                                  .append("slideMasters/slideMaster")
-                                  .append(static_cast<sal_Int32>(nPageNum) + 1)
-                                  .append(".xml")
-                                  .makeStringAndClear());
+                                  OUString("slideMasters/slideMaster" + OUString::number(nPageNum + 1) + ".xml"));
 
     mPresentationFS->singleElementNS(XML_p, XML_sldMasterId,
                                      XML_id, OString::number(GetNewSlideMasterId()),
@@ -1250,11 +1217,8 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
         mPresentationFS->endElementNS(XML_p, XML_sldMasterIdLst);
 
     FSHelperPtr pFS =
-        openFragmentStreamWithSerializer(OUStringBuffer()
-                                         .append("ppt/slideMasters/slideMaster")
-                                         .append(static_cast<sal_Int32>(nPageNum) + 1)
-                                         .append(".xml")
-                                         .makeStringAndClear(),
+        openFragmentStreamWithSerializer("ppt/slideMasters/slideMaster" +
+                                          OUString::number(nPageNum + 1) + ".xml",
                                          "application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml");
 
     // write theme per master
@@ -1263,11 +1227,7 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
     // add implicit relation to the presentation theme
     addRelation(pFS->getOutputStream(),
                 oox::getRelationship(Relationship::THEME),
-                OUStringBuffer()
-                .append("../theme/theme")
-                .append(static_cast<sal_Int32>(nPageNum) + 1)
-                .append(".xml")
-                .makeStringAndClear());
+                OUString("../theme/theme" + OUString::number(nPageNum + 1) + ".xml"));
 
     pFS->startElementNS(XML_p, XML_sldMaster, PNMSS);
 
@@ -1357,21 +1317,14 @@ void PowerPointExport::ImplWritePPTXLayout(sal_Int32 nOffset, sal_uInt32 nMaster
         return;
 
     FSHelperPtr pFS
-        = openFragmentStreamWithSerializer(OUStringBuffer()
-                                           .append("ppt/slideLayouts/slideLayout")
-                                           .append(mnLayoutFileIdMax)
-                                           .append(".xml")
-                                           .makeStringAndClear(),
+        = openFragmentStreamWithSerializer("ppt/slideLayouts/slideLayout" +
+                                            OUString::number(mnLayoutFileIdMax) + ".xml",
                                            "application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml");
 
     // add implicit relation of slide layout to slide master
     addRelation(pFS->getOutputStream(),
                 oox::getRelationship(Relationship::SLIDEMASTER),
-                OUStringBuffer()
-                .append("../slideMasters/slideMaster")
-                .append(static_cast<sal_Int32>(nMasterNum) + 1)
-                .append(".xml")
-                .makeStringAndClear());
+                OUString("../slideMasters/slideMaster" + OUString::number(nMasterNum + 1) + ".xml"));
 
     pFS->startElementNS(XML_p, XML_sldLayout,
                         PNMSS,
@@ -1824,11 +1777,7 @@ bool PowerPointExport::WriteColorSchemes(const FSHelperPtr& pFS, const OUString&
 
 void PowerPointExport::WriteTheme(sal_Int32 nThemeNum)
 {
-    OUString sThemePath = OUStringBuffer()
-        .append("ppt/theme/theme")
-        .append(nThemeNum + 1)
-        .append(".xml")
-        .makeStringAndClear();
+    OUString sThemePath = "ppt/theme/theme" + OUString::number(nThemeNum + 1) + ".xml";
 
     FSHelperPtr pFS = openFragmentStreamWithSerializer(sThemePath,
                       "application/vnd.openxmlformats-officedocument.theme+xml");
@@ -1904,11 +1853,7 @@ void PowerPointExport::WriteNotesMaster()
     // add implicit relation to the presentation theme
     addRelation(pFS->getOutputStream(),
                 oox::getRelationship(Relationship::THEME),
-                OUStringBuffer()
-                .append("../theme/theme")
-                .append(static_cast<sal_Int32>(mnMasterPages) + 1)
-                .append(".xml")
-                .makeStringAndClear());
+                OUString("../theme/theme" + OUString::number(mnMasterPages + 1) + ".xml"));
 
     pFS->startElementNS(XML_p, XML_notesMaster, PNMSS);
 
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 9d93365c7b04..a0836ce8758b 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -2788,7 +2788,7 @@ OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPo
 
             aPnt.setX( static_cast<tools::Long>(aPnt.X() * fFactor) );
             aPnt.setY( static_cast<tools::Long>(aPnt.Y() * fFactor) );
-            aStr.append(aPnt.X()).append(",").append(aPnt.Y());
+            aStr.append( OUString::number(aPnt.X()) + "," + OUString::number(aPnt.Y()) );
 
             if (nPoint < nNoOfPoints - 1)
                 aStr.append(',');
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 0054faba9bd1..bc379e5e2508 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -1366,7 +1366,7 @@ PDFFileImplData* PDFFile::impl_getData() const
                                 {
                                     OUStringBuffer aTmp;
                                     for( int i = 0; i < aEnt.getLength(); i++ )
-                                        aTmp.append(" ").append(static_cast<sal_Int32>(sal_uInt8(aEnt[i])), 16);
+                                        aTmp.append(" " + OUString::number(sal_uInt8(aEnt[i]), 16));
                                     SAL_WARN("sdext.pdfimport.pdfparse",
                                              "O entry has length " << static_cast<int>(aEnt.getLength()) << ", should be 32 <" << aTmp.makeStringAndClear() << ">" );
                                 }
@@ -1386,7 +1386,7 @@ PDFFileImplData* PDFFile::impl_getData() const
                                 {
                                     OUStringBuffer aTmp;
                                     for( int i = 0; i < aEnt.getLength(); i++ )
-                                        aTmp.append(" ").append(static_cast<sal_Int32>(sal_uInt8(aEnt[i])), 16);
+                                        aTmp.append(" " + OUString::number(sal_uInt8(aEnt[i]), 16));
                                     SAL_WARN("sdext.pdfimport.pdfparse",
                                              "U entry has length " << static_cast<int>(aEnt.getLength()) << ", should be 32 <" << aTmp.makeStringAndClear() << ">" );
                                 }
diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx
index 3754d811e4ab..b02e2c0a727d 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -167,7 +167,7 @@ void PolyPolyElement::emitStructure( int nLevel)
         for( int n = 0; n < nPoints; n++ )
         {
             basegfx::B2DPoint aPoint = aPoly.getB2DPoint( n );
-            buff.append( " (").append(aPoint.getX()).append(",").append(aPoint.getY()).append(")");
+            buff.append( " (" + OUString::number(aPoint.getX()) + "," + OUString::number(aPoint.getY()) + ")");
         }
         SAL_WARN( "sdext", "    " << buff.makeStringAndClear() );
     }
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 102738a8705e..78be4e455894 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -937,10 +937,10 @@ SearchTabPage_Impl::SearchTabPage_Impl(weld::Widget* pParent, SfxHelpIndexWindow
 SearchTabPage_Impl::~SearchTabPage_Impl()
 {
     SvtViewOptions aViewOpt( EViewType::TabPage, CONFIGNAME_SEARCHPAGE );
-    OUStringBuffer aUserData;
-    aUserData.append(static_cast<sal_Int32>(m_xFullWordsCB->get_active() ? 1 : 0))
-        .append(";")
-        .append( static_cast<sal_Int32>(m_xScopeCB->get_active() ? 1 : 0) );
+    OUStringBuffer aUserData =
+            OUString::number(m_xFullWordsCB->get_active() ? 1 : 0) +
+            ";" +
+            OUString::number(m_xScopeCB->get_active() ? 1 : 0);
     sal_Int32 nCount = std::min(m_xSearchED->get_count(), 10);  // save only 10 entries
 
     for ( sal_Int32 i = 0; i < nCount; ++i )
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 830df11c319b..a7e4346c0d48 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -538,7 +538,7 @@ void UsageInfo::save()
         OStringBuffer aUsageInfoMsg("Document Type;Command;Count");
 
         for (auto const& elem : maUsage)
-            aUsageInfoMsg.append("\n" + elem.first.toUtf8() + ";").append(static_cast<sal_Int32>(elem.second));
+            aUsageInfoMsg.append("\n" + elem.first.toUtf8() + ";" + OString::number(elem.second));
 
         sal_uInt64 written = 0;
         auto s = aUsageInfoMsg.makeStringAndClear();
@@ -1267,7 +1267,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra
 
         if (aEvent.IsEnabled && (aEvent.State >>= aPoint))
         {
-            aBuffer.append(aPoint.X).append(" / ").append(aPoint.Y);
+            aBuffer.append( OUString::number(aPoint.X) + " / " + OUString::number(aPoint.Y));
         }
     }
     else if (aEvent.FeatureURL.Path == "Size")
@@ -1276,7 +1276,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra
 
         if (aEvent.IsEnabled && (aEvent.State >>= aSize))
         {
-            aBuffer.append(aSize.Width).append(" x ").append(aSize.Height);
+            aBuffer.append( OUString::number(aSize.Width) + " x " + OUString::number(aSize.Height) );
         }
     }
     else if (aEvent.FeatureURL.Path == "LanguageStatus" ||
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index d334177d71e6..0487ff96922e 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -475,9 +475,9 @@ void SfxLokHelper::notifyWindow(const SfxViewShell* pThisView,
     if (nLOKWindowId == 0 || DisableCallbacks::disabled())
         return;
 
-    OStringBuffer aPayload;
-    aPayload.append("{ \"id\": \"").append(static_cast<sal_Int64>(nLOKWindowId)).append('"');
-    aPayload.append(", \"action\": \"" + OUStringToOString(rAction, RTL_TEXTENCODING_UTF8) + "\"");
+    OStringBuffer aPayload =
+        "{ \"id\": \"" + OString::number(nLOKWindowId) + "\""
+        ", \"action\": \"" + OUStringToOString(rAction, RTL_TEXTENCODING_UTF8) + "\"";
 
     for (const auto& rItem: rPayload)
     {
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 7dba92c9866b..596a6e413db3 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -68,7 +68,7 @@ static OUString createIndex(const std::vector< OUString >& lines)
             }
             else
             {
-                aResult.append("_").append( static_cast<sal_Int32>(*pLine), 16 );
+                aResult.append("_" + OUString::number(*pLine, 16) );
             }
 
             pLine++;
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index b39609ad38d8..13b9eca57f64 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -942,10 +942,10 @@ OString HTMLOutFuncs::CreateTableDataOptionsValNum(
     }
     if ( bValue || nFormat )
     {
-        aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_SDnum "=\"").
-            append(static_cast<sal_Int32>(static_cast<sal_uInt16>(
-                Application::GetSettings().GetLanguageTag().getLanguageType()))).
-            append(';'); // Language for Format 0
+        aStrTD.append(" " OOO_STRING_SVTOOLS_HTML_O_SDnum "=\"" +
+            OString::number(static_cast<sal_uInt16>(
+                Application::GetSettings().GetLanguageTag().getLanguageType())) +
+                ";"); // Language for Format 0
         if ( nFormat )
         {
             OString aNumStr;
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 0ed5d21c293d..a3a32b80b98e 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -557,8 +557,8 @@ void SwTableFormula::BoxNmsToPtr( const SwTable& rTable, OUStringBuffer& rNewStr
     if( pLastBox )
     {
         pBox = rTable.GetTableBox( *pLastBox );
-        rNewStr.append(reinterpret_cast<sal_PtrDiff>(pBox))
-                .append(":");
+        rNewStr.append(OUString::number(reinterpret_cast<sal_PtrDiff>(pBox)) +
+                    ":");
         rFirstBox = rFirstBox.copy( pLastBox->getLength()+1 );
     }
 
@@ -1222,7 +1222,7 @@ void SwTableFormula::SplitMergeBoxNm_( const SwTable& rTable, OUStringBuffer& rN
     }
 
     if( pLastBox )
-        rNewStr.append(reinterpret_cast<sal_PtrDiff>(pEndBox)).append(":");
+        rNewStr.append(OUString::number(reinterpret_cast<sal_PtrDiff>(pEndBox)) + ":");
 
     rNewStr.append(reinterpret_cast<sal_PtrDiff>(pSttBox))
             .append(rFirstBox[ rFirstBox.getLength()-1] );
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index f9ac9a39542c..3f9758ae8bc0 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -177,13 +177,13 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
     sal_Int32 nCount = rItemSet.Get( SDRATTR_TEXT_ANICOUNT ).GetValue();
     if( 0==nCount )
         nCount = SdrTextAniKind::Slide==eAniKind ? 1 : -1;
-    sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_loop "=\"").
-        append(nCount).append("\"");
+    sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_loop "=\"" +
+        OString::number(nCount) + "\"");
 
     // SCROLLDELAY
     sal_uInt16 nDelay = rItemSet.Get( SDRATTR_TEXT_ANIDELAY ).GetValue();
     sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_scrolldelay
-            "=\"").append(static_cast<sal_Int32>(nDelay)).append("\"");
+            "=\"" + OString::number(nDelay) + "\"");
 
     // SCROLLAMOUNT
     sal_Int16 nAmount = rItemSet.Get( SDRATTR_TEXT_ANIAMOUNT ).GetValue();
@@ -200,7 +200,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
     if( nAmount )
     {
         sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_scrollamount
-                "=\"").append(static_cast<sal_Int32>(nAmount)).append("\"");
+                "=\"" + OString::number(nAmount) + "\"");
     }
 
     Size aTwipSz( pTextObj->GetLogicRect().GetSize() );
@@ -231,13 +231,13 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
         if( aPixelSz.Width() )
         {
             sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_width
-                    "=\"").append(static_cast<sal_Int32>(aPixelSz.Width())).append("\"");
+                    "=\"" + OString::number(aPixelSz.Width()) + "\"");
         }
 
         if( aPixelSz.Height() )
         {
             sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_height
-                    "=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\"");
+                    "=\"" + OString::number(aPixelSz.Height()) + "\"");
         }
     }
 
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index bbc0874a4784..50a5a648efae 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -633,13 +633,13 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
         if( aPixelSpc.Width() )
         {
             sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_hspace
-                    "=\"").append(static_cast<sal_Int32>(aPixelSpc.Width())).append("\"");
+                    "=\"" + OString::number(aPixelSpc.Width()) + "\"");
         }
 
         if( aPixelSpc.Height() )
         {
             sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_vspace
-                    "=\"").append(static_cast<sal_Int32>(aPixelSpc.Height())).append("\"");
+                    "=\"" + OString::number(aPixelSpc.Height()) + "\"");
         }
     }
 
@@ -1587,7 +1587,7 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt,
     if( nCols )
     {
         sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_cols
-                "=\"").append(static_cast<sal_Int32>(nCols)).append("\"");
+                "=\"" + OString::number(nCols) + "\"");
     }
 
     // the Gutter width (minimum value) as GUTTER
@@ -1601,7 +1601,7 @@ static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt,
                                             MapMode(MapUnit::MapTwip) ).Width());
         }
         sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_gutter
-                "=\"").append(static_cast<sal_Int32>(nGutter)).append("\"");
+                "=\"" + OString::number(nGutter) + "\"");
     }
 
     rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
@@ -1959,12 +1959,11 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat,
         nSize = static_cast<sal_Int16>(Application::GetDefaultDevice()
             ->LogicToPixel( Size(nSize,0), MapMode(MapUnit::MapTwip) ).Width());
 
-        aSpacer = OStringBuffer(OOO_STRING_SVTOOLS_HTML_spacer
+        aSpacer = OOO_STRING_SVTOOLS_HTML_spacer
                 " " OOO_STRING_SVTOOLS_HTML_O_type
                 "=\"" OOO_STRING_SVTOOLS_HTML_SPTYPE_vertical "\""
                 " " OOO_STRING_SVTOOLS_HTML_O_size
-                "=\"").append(static_cast<sal_Int32>(nSize)).append("\"").
-            makeStringAndClear();
+                "=\"" + OString::number(nSize) + "\"";
     }
 
     const SwFormatContent& rFlyContent = rFrameFormat.GetContent();
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index e05d4124e6b5..af5f67922bed 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -310,12 +310,12 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
     if( nRowSpan>1 )
     {
         sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_rowspan
-                "=\"").append(static_cast<sal_Int32>(nRowSpan)).append("\"");
+                "=\"" + OString::number(nRowSpan) + "\"");
     }
     if( nColSpan > 1 )
     {
         sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_colspan
-                "=\"").append(static_cast<sal_Int32>(nColSpan)).append("\"");
+                "=\"" + OString::number(nColSpan) + "\"");
     }
 
     tools::Long nWidth = 0;
@@ -388,7 +388,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
     if( nHeight )
     {
         sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_height
-                "=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\"");
+                "=\"" + OString::number(aPixelSz.Height()) + "\"");
     }
 
     const SfxItemSet& rItemSet = pBox->GetFrameFormat()->GetAttrSet();
@@ -677,23 +677,23 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
         if( aPixelSpc.Width() )
         {
             sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_hspace
-                    "=\"").append(static_cast<sal_Int32>(aPixelSpc.Width())).append("\"");
+                    "=\"" + OString::number(aPixelSpc.Width()) + "\"");
         }
 
         if( aPixelSpc.Height() )
         {
             sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_vspace
-                    "=\"").append(static_cast<sal_Int32>(aPixelSpc.Height())).append("\"");
+                    "=\"" + OString::number(aPixelSpc.Height()) + "\"");
         }
     }
 
     // output CELLPADDING: from layout or calculated
     sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_cellpadding
-            "=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(m_nCellPadding,false))).append("\"");
+            "=\"" + OString::number(SwHTMLWriter::ToPixel(m_nCellPadding,false)) + "\"");
 
     // output CELLSPACING: from layout or calculated
     sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_cellspacing
-            "=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(m_nCellSpacing,false))).append("\"");
+            "=\"" + OString::number(SwHTMLWriter::ToPixel(m_nCellSpacing,false)) + "\"");
 
     rWrt.Strm().WriteOString( sOut.makeStringAndClear() );
 
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index c7f672ae4f58..3c6b2616e13a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8717,8 +8717,8 @@ void DocxAttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize )
     if (m_rExport.SdrExporter().getTextFrameSyntax() && m_rExport.SdrExporter().getFlyFrameSize())
     {
         const Size* pSize = m_rExport.SdrExporter().getFlyFrameSize();
-        m_rExport.SdrExporter().getTextFrameStyle().append(";width:").append(double(pSize->Width()) / 20);
-        m_rExport.SdrExporter().getTextFrameStyle().append("pt;height:").append(double(pSize->Height()) / 20).append("pt");
+        m_rExport.SdrExporter().getTextFrameStyle().append(";width:" + OString::number(double(pSize->Width()) / 20));
+        m_rExport.SdrExporter().getTextFrameStyle().append("pt;height:" + OString::number(double(pSize->Height()) / 20) + "pt");
     }
     else if (m_rExport.SdrExporter().getDMLTextFrameSyntax())
     {
@@ -8763,8 +8763,8 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
 
     if (m_rExport.SdrExporter().getTextFrameSyntax())
     {
-        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-left:").append(double(rLRSpace.GetLeft()) / 20).append("pt");
-        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-right:").append(double(rLRSpace.GetRight()) / 20).append("pt");
+        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-left:" + OString::number(double(rLRSpace.GetLeft()) / 20) + "pt");
+        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-right:" + OString::number(double(rLRSpace.GetRight()) / 20) + "pt");
     }
     else if (m_rExport.SdrExporter().getDMLTextFrameSyntax())
     {
@@ -8820,8 +8820,8 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
 
     if (m_rExport.SdrExporter().getTextFrameSyntax())
     {
-        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-top:").append(double(rULSpace.GetUpper()) / 20).append("pt");
-        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-bottom:").append(double(rULSpace.GetLower()) / 20).append("pt");
+        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-top:" + OString::number(double(rULSpace.GetUpper()) / 20) + "pt");
+        m_rExport.SdrExporter().getTextFrameStyle().append(";mso-wrap-distance-bottom:" + OString::number(double(rULSpace.GetLower()) / 20) + "pt");
     }
     else if (m_rExport.SdrExporter().getDMLTextFrameSyntax())
     {
@@ -9036,7 +9036,7 @@ void DocxAttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyV
 
     if (m_rExport.SdrExporter().getTextFrameSyntax())
     {
-        m_rExport.SdrExporter().getTextFrameStyle().append(";margin-top:").append(double(rFlyVert.GetPos()) / 20).append("pt");
+        m_rExport.SdrExporter().getTextFrameStyle().append(";margin-top:" + OString::number(double(rFlyVert.GetPos()) / 20) + "pt");
         if ( !sAlign.isEmpty() )
             m_rExport.SdrExporter().getTextFrameStyle().append(";mso-position-vertical:" + sAlign);
         m_rExport.SdrExporter().getTextFrameStyle().append(";mso-position-vertical-relative:" + sVAnchor);
@@ -9062,7 +9062,7 @@ void DocxAttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFly
 
     if (m_rExport.SdrExporter().getTextFrameSyntax())
     {
-        m_rExport.SdrExporter().getTextFrameStyle().append(";margin-left:").append(double(rFlyHori.GetPos()) / 20).append("pt");
+        m_rExport.SdrExporter().getTextFrameStyle().append(";margin-left:" + OString::number(double(rFlyHori.GetPos()) / 20) + "pt");
         if ( !sAlign.isEmpty() )
             m_rExport.SdrExporter().getTextFrameStyle().append(";mso-position-horizontal:" + sAlign);
         m_rExport.SdrExporter().getTextFrameStyle().append(";mso-position-horizontal-relative:" + sHAnchor);
@@ -9998,8 +9998,8 @@ void DocxAttributeOutput::BulletDefinition(int nId, const Graphic& rGraphic, Siz
 
     OStringBuffer aStyle;
     // Size is in twips, we need it in points.
-    aStyle.append("width:").append(double(aSize.Width()) / 20);
-    aStyle.append("pt;height:").append(double(aSize.Height()) / 20).append("pt");
+    aStyle.append("width:" + OString::number(double(aSize.Width()) / 20));
+    aStyle.append("pt;height:" + OString::number(double(aSize.Height()) / 20) + "pt");
     m_pSerializer->startElementNS(XML_w, XML_pict);
     m_pSerializer->startElementNS( XML_v, XML_shape,
             XML_style, aStyle.getStr(),
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 978e44ded2c0..34e6cabd0591 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -176,7 +176,8 @@ static OString OutTBLBorderLine(RtfExport const& rExport, const editeng::SvxBord
             ::editeng::ConvertBorderWidthToWord(pLine->GetBorderLineStyle(), pLine->GetWidth()));
         if (255 >= pLine->GetWidth()) // That value comes from RTF specs
         {
-            aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW).append(static_cast<sal_Int32>(fConverted));
+            aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW
+                        + OString::number(static_cast<sal_Int32>(fConverted)));
         }
         else
         {
@@ -4258,11 +4259,8 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
                         *pPolyPoly, pNd, /*bCorrectCrop=*/true);
                     OStringBuffer aVerticies;
                     for (sal_uInt16 i = 0; i < aPoly.GetSize(); ++i)
-                        aVerticies.append(";(")
-                            .append(aPoly[i].X())
-                            .append(",")
-                            .append(aPoly[i].Y())
-                            .append(")");
+                        aVerticies.append(";(" + OString::number(aPoly[i].X()) + ","
+                                          + OString::number(aPoly[i].Y()) + ")");
                     aFlyProperties.push_back(std::make_pair<OString, OString>(
                         "pWrapPolygonVertices",
                         "8;" + OString::number(aPoly.GetSize()) + aVerticies.makeStringAndClear()));
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index f4c2e3deca3e..320d8026ed33 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -178,8 +178,7 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl
                         break;
                 }
                 if (nWrapType)
-                    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPWR)
-                        .append(static_cast<sal_Int32>(nWrapType));
+                    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPWR + OString::number(nWrapType));
             }
             break;
             case ESCHER_Prop_fillColor:
@@ -293,7 +292,7 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl
                     // number of segments
                     sal_uInt16 nSegments = impl_GetUInt16(pSegmentIt);
                     sal_Int32 nVertices = 0;
-                    aSegmentInfo.append("2;").append(static_cast<sal_Int32>(nSegments));
+                    aSegmentInfo.append("2;" + OString::number(nSegments));
                     pSegmentIt += 4;
 
                     for (; nSegments; --nSegments)
@@ -316,11 +315,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl
                                                                           nPointSize);
                                     sal_Int32 nY = impl_GetPointComponent(pVerticesIt, nVerticesPos,
                                                                           nPointSize);
-                                    aVerticies.append(";(")
-                                        .append(nX)
-                                        .append(",")
-                                        .append(nY)
-                                        .append(")");
+                                    aVerticies.append(";(" + OString::number(nX) + ","
+                                                      + OString::number(nY) + ")");
                                     nVertices++;
                                 }
                                 break;
@@ -330,8 +326,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl
                                     = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize);
                                 sal_Int32 nY
                                     = impl_GetPointComponent(pVerticesIt, nVerticesPos, nPointSize);
-                                aVerticies.append(";(").append(nX).append(",").append(nY).append(
-                                    ")");
+                                aVerticies.append(";(" + OString::number(nX) + ","
+                                                  + OString::number(nY) + ")");
                                 nVertices++;
                                 break;
                             }
@@ -344,11 +340,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl
                                             pVerticesIt, nVerticesPos, nPointSize);
                                         sal_Int32 nY = impl_GetPointComponent(
                                             pVerticesIt, nVerticesPos, nPointSize);
-                                        aVerticies.append(";(")
-                                            .append(nX)
-                                            .append(",")
-                                            .append(nY)
-                                            .append(")");
+                                        aVerticies.append(";(" + OString::number(nX) + ","
+                                                          + OString::number(nY) + ")");
                                         nVertices++;
                                     }
                                 }
@@ -466,10 +459,10 @@ void RtfSdrExport::AddLineDimensions(const tools::Rectangle& rRectangle)
         m_aShapeProps.insert(std::pair<OString, OString>("fFlipH", "1"));
 
     // the actual dimensions
-    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPLEFT).append(rRectangle.Left());
-    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPTOP).append(rRectangle.Top());
-    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPRIGHT).append(rRectangle.Right());
-    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPBOTTOM).append(rRectangle.Bottom());
+    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPLEFT + OString::number(rRectangle.Left()));
+    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPTOP + OString::number(rRectangle.Top()));
+    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPRIGHT + OString::number(rRectangle.Right()));
+    m_aShapeStyle.append(OOO_STRING_SVTOOLS_RTF_SHPBOTTOM + OString::number(rRectangle.Bottom()));
 }
 
 void RtfSdrExport::AddRectangleDimensions(OStringBuffer& rBuffer,
@@ -478,10 +471,10 @@ void RtfSdrExport::AddRectangleDimensions(OStringBuffer& rBuffer,
     // We get the position relative to (the current?) character
     m_aShapeProps.insert(std::pair<OString, OString>("posrelh", "3"));
 
-    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPLEFT).append(rRectangle.Left());
-    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPTOP).append(rRectangle.Top());
-    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPRIGHT).append(rRectangle.Right());
-    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPBOTTOM).append(rRectangle.Bottom());
+    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPLEFT + OString::number(rRectangle.Left()));
+    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPTOP + OString::number(rRectangle.Top()));
+    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPRIGHT + OString::number(rRectangle.Right()));
+    rBuffer.append(OOO_STRING_SVTOOLS_RTF_SHPBOTTOM + OString::number(rRectangle.Bottom()));
 }
 
 static void lcl_AppendSP(OStringBuffer& rRunText, const char* cName, std::string_view rValue)
@@ -531,10 +524,9 @@ void RtfSdrExport::impl_writeGraphic()
     // Add it to the properties.
     RtfStringBuffer aBuf;
     aBuf->append("{" OOO_STRING_SVTOOLS_RTF_PICT OOO_STRING_SVTOOLS_RTF_PNGBLIP);
-    aBuf->append(OOO_STRING_SVTOOLS_RTF_PICW).append(sal_Int32(aMapped.Width()));
-    aBuf->append(OOO_STRING_SVTOOLS_RTF_PICH)
-        .append(sal_Int32(aMapped.Height()))
-        .append(SAL_NEWLINE_STRING);
+    aBuf->append(OOO_STRING_SVTOOLS_RTF_PICW + OString::number(aMapped.Width()));
+    aBuf->append(OOO_STRING_SVTOOLS_RTF_PICH + OString::number(aMapped.Height())
+                 + SAL_NEWLINE_STRING);
     aBuf->append(msfilter::rtfutil::WriteHex(pGraphicAry, nSize));
     aBuf->append('}');
     m_aShapeProps.insert(std::pair<OString, OString>("pib", aBuf.makeStringAndClear()));
diff --git a/sw/source/uibase/config/modcfg.cxx b/sw/source/uibase/config/modcfg.cxx
index 20bde25caa5b..ef51d6e6ba95 100644
--- a/sw/source/uibase/config/modcfg.cxx
+++ b/sw/source/uibase/config/modcfg.cxx
@@ -200,7 +200,7 @@ OUString SwModuleOptions::ConvertWordDelimiter(const OUString& rDelim, bool bFro
                 default:
                     if( c <= 0x1f || c >= 0x7f )
                     {
-                        sReturn.append("\\x").append( static_cast<sal_Int32>(c), 16 );
+                        sReturn.append("\\x" + OUString::number( static_cast<sal_Int32>(c), 16 ));
                     }
                     else
                     {
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index a2e7c29a7361..856dc09f9db3 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -398,14 +398,13 @@ OUString SwPagePreviewWin::GetStatusStr( sal_uInt16 nPageCnt ) const
     const sal_uInt16 nPageNum = mpPgPreviewLayout->IsPageVisible( mpPgPreviewLayout->SelectedPage() )
         ? mpPgPreviewLayout->SelectedPage() : std::max<sal_uInt16>(mnSttPage, 1);
 
-    OUStringBuffer aStatusStr;
+    OUString aStatusStr;
     const sal_uInt16 nVirtPageNum = mpPgPreviewLayout->GetVirtPageNumByPageNum( nPageNum );
     if( nVirtPageNum && nVirtPageNum != nPageNum )
     {
-        aStatusStr.append(static_cast<sal_Int32>(nVirtPageNum)).append( " " );
+        aStatusStr = OUString::number(nVirtPageNum) + " " ;
     }
-    aStatusStr.append(static_cast<sal_Int32>(nPageNum)).append( " / " ).append(static_cast<sal_Int32>(nPageCnt));
-    return aStatusStr.makeStringAndClear();
+    return aStatusStr + OUString::number(nPageNum) + " / " + OUString::number(nPageCnt);
 }
 
 void  SwPagePreviewWin::KeyInput( const KeyEvent &rKEvt )
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index b0a992fa942f..2e15d8dbb45f 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1619,15 +1619,10 @@ sk_sp<SkImage> SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
     // Do not cache the result if it would take most of the cache and thus get evicted soon.
     if (targetSize.Width() * targetSize.Height() * 4 > maxImageCacheSize() * 0.7)
         return image;
-    OString key;
-    OStringBuffer keyBuf;
-    keyBuf.append(targetSize.Width())
-        .append("x")
-        .append(targetSize.Height())
-        .append("_" + bitmap.GetImageKey());
+    OString key = OString::number(targetSize.Width()) + "x" + OString::number(targetSize.Height())
+                  + "_" + bitmap.GetImageKey();
     if (alphaBitmap)
-        keyBuf.append("_" + alphaBitmap->GetAlphaImageKey());
-    key = keyBuf.makeStringAndClear();
+        key += "_" + alphaBitmap->GetAlphaImageKey();
     image = findCachedImage(key);
     if (image)
     {
diff --git a/vcl/source/gdi/pdfobjectcopier.cxx b/vcl/source/gdi/pdfobjectcopier.cxx
index c9e332aba28f..35dae59237ee 100644
--- a/vcl/source/gdi/pdfobjectcopier.cxx
+++ b/vcl/source/gdi/pdfobjectcopier.cxx
@@ -230,7 +230,7 @@ OString PDFObjectCopier::copyExternalResources(filter::PDFObjectElement& rPage,
     OStringBuffer sRet("/" + rKind + "<<");
     for (const auto& rPair : aRet)
     {
-        sRet.append("/" + rPair.first + " ").append(rPair.second).append(" 0 R");
+        sRet.append("/" + rPair.first + " " + OString::number(rPair.second) + " 0 R");
     }
     sRet.append(">>");
 
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 8c23eb8b1cb2..6b3eed64f849 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -99,15 +99,13 @@ void UITestLogger::logCommand(const OUString& rAction,
             {
                 sal_Int32 nValue = 0;
                 rProp.Value >>= nValue;
-                aBuffer.append("\"" + rProp.Name + "\": ");
-                aBuffer.append(nValue).append(", ");
+                aBuffer.append("\"" + rProp.Name + "\": " + OUString::number(nValue) + ", ");
             }
             else if (aTypeName == "unsigned long")
             {
                 sal_uInt32 nValue = 0;
                 rProp.Value >>= nValue;
-                aBuffer.append("\"" + rProp.Name + "\": ");
-                aBuffer.append(static_cast<sal_Int64>(nValue)).append(", ");
+                aBuffer.append("\"" + rProp.Name + "\": " + OUString::number(nValue) + ", ");
             }
             else if (aTypeName == "boolean")
             {
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 9f5906310799..f908bbc5f81e 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -237,8 +237,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
     Size aLogicPaperSize(OutputDevice::LogicToLogic(i_rOrigSize, MapMode(MapUnit::Map100thMM), MapMode(eUnit)));
     OUString aNumText( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) );
     OUStringBuffer aBuf;
-    aBuf.append( aNumText )
-        .append( u' ' );
+    aBuf.append( aNumText + " " );
     aBuf.appendAscii( eUnit == MapUnit::MapMM ? "mm" : "in" );
     if( !i_rPaperName.empty() )
     {
@@ -249,8 +248,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
     maHorzText = aBuf.makeStringAndClear();
 
     aNumText = rLocWrap.getNum( aLogicPaperSize.Height(), nDigits );
-    aBuf.append( aNumText )
-        .append( u' ' );
+    aBuf.append( aNumText + " " );
     aBuf.appendAscii( eUnit == MapUnit::MapMM ? "mm" : "in" );
     maVertText = aBuf.makeStringAndClear();
 
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index f003717193a2..62781694e28f 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1207,7 +1207,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
                     if( !sTmp.isEmpty() )
                         sTmp.append( ';' );
 
-                    sTmp.append(rPair.Time).append( "," ).append(rPair.Progress);
+                    sTmp.append(OUString::number(rPair.Time) + "," + OUString::number(rPair.Progress));
                 }
 
                 mxExport->AddAttribute( XML_NAMESPACE_SMIL, XML_KEYSPLINES, sTmp.makeStringAndClear() );
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index cd334405d030..96971ab4c555 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -3799,7 +3799,7 @@ static void ExportParameter( OUStringBuffer& rStrBuffer, const css::drawing::Enh
         {
             case css::drawing::EnhancedCustomShapeParameterType::EQUATION :
             {
-                rStrBuffer.append( "?f" ).append( nValue );
+                rStrBuffer.append( "?f" + OUString::number( nValue ) );
             }
             break;
 
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index 8bb6352408b1..7f928dfbf499 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -482,10 +482,9 @@ bool XMLColorPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, cons
         Sequence< double > aHSL;
         if( (rValue >>= aHSL) && (aHSL.getLength() == 3) )
         {
-            aOut.append( "hsl(" ).append(aHSL[0]).append( "," )
-                .append(aHSL[1] * 100.0).append( "%," )
-                .append(aHSL[2] * 100.0).append( "%)" );
-            rStrExpValue = aOut.makeStringAndClear();
+            rStrExpValue = "hsl(" + OUString::number(aHSL[0]) + "," +
+                    OUString::number(aHSL[1] * 100.0) +  "%," +
+                    OUString::number(aHSL[2] * 100.0) + "%)";
 
             bRet = true;
         }
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index d875d6545f7f..8ff457fcf289 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -659,9 +659,9 @@ OUString xforms_bool( const Any& rAny )
 
 void xforms_formatDate( OUStringBuffer& aBuffer, const util::Date& rDate )
 {
-    aBuffer.append(static_cast<sal_Int32>( rDate.Year ))
-            .append("-").append(static_cast<sal_Int32>( rDate.Month ))
-            .append("-").append(static_cast<sal_Int32>( rDate.Day ));
+    aBuffer.append( OUString::number( rDate.Year ) +
+                "-" + OUString::number( rDate.Month ) +
+                "-" + OUString::number( rDate.Day ) );
 }
 
 void xforms_formatTime( OUStringBuffer& aBuffer, const css::util::Time& rTime )
diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx
index d966217ee853..cc6c37c18aee 100644
--- a/xmlsecurity/source/framework/buffernode.cxx
+++ b/xmlsecurity/source/framework/buffernode.cxx
@@ -200,7 +200,7 @@ OUString BufferNode::printChildren() const
 
     for( const ElementCollector* ii : m_vElementCollectors )
     {
-        rc.append("BufID=").append(ii->getBufferId());
+        rc.append("BufID=" + OUString::number(ii->getBufferId()));
 
         if (ii->getModify())
         {
@@ -222,7 +222,7 @@ OUString BufferNode::printChildren() const
                 break;
         }
 
-        rc.append("(SecID=").append(ii->getSecurityId()).append(") ");
+        rc.append("(SecID=" + OUString::number(ii->getSecurityId()) + ") ");
     }
 
     return rc.makeStringAndClear();
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index 738fec308546..b1d960241702 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -308,8 +308,8 @@ OUString SAXEventKeeperImpl::printBufferNode(
     ElementMark * pBlocker = pBufferNode->getBlocker();
     if (pBlocker != nullptr)
     {
-        rc.append( pBlocker->getBufferId() ).append("(SecId=")
-            .append( pBlocker->getSecurityId() ).append(") ");
+        rc.append( OUString::number(pBlocker->getBufferId()) +
+            "(SecId=" + OUString::number( pBlocker->getSecurityId() ) + ") ");
     }
     rc.append("\n");
 


More information about the Libreoffice-commits mailing list