[Libreoffice-commits] core.git: filter/source pyuno/source sc/source unoidl/source vcl/unx

Noel (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 6 06:57:48 UTC 2020


 filter/source/xsltdialog/typedetectionexport.cxx |    8 ++++----
 pyuno/source/module/pyuno.cxx                    |   20 ++++++++++----------
 pyuno/source/module/pyuno_module.cxx             |    4 ++--
 pyuno/source/module/pyuno_util.cxx               |    6 +++---
 sc/source/core/data/table3.cxx                   |    2 +-
 unoidl/source/sourceprovider-parser.y            |    2 +-
 vcl/unx/generic/fontmanager/helper.cxx           |    4 ++--
 7 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit f0356b6128bb4e78041d53025ad7c2e0b8e0c299
Author:     Noel <noelgrandin at gmail.com>
AuthorDate: Thu Nov 5 20:54:16 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 6 07:57:13 2020 +0100

    loplugin:stringbuffer
    
    Change-Id: Id6f7268f12eb728dbb255aa19cd590b6813c4f01
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105377
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 68ed95a065e5..5f94c11870ea 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -166,10 +166,10 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS,  co
                     sDelim);
 
                 const application_info_impl* pAppInfo = getApplicationInfo( filter->maExportService );
-                sValue.append(pAppInfo->maXMLImporter +
-                    sDelim +
-                    pAppInfo->maXMLExporter +
-                    sDelim);
+                sValue.append(pAppInfo->maXMLImporter)
+                    .append(sDelim)
+                    .append(pAppInfo->maXMLExporter)
+                    .append(sDelim);
 
                 sValue.append(createRelativeURL( filter->maFilterName, filter->maImportXSLT ));
                 sValue.append(sDelim);
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index 25ae588d6d58..4cfdab9982d0 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -93,13 +93,13 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
         return "void";
 
     OUStringBuffer buf( 64 );
-    buf.append( "(" + OUString::unacquired(&pTypeRef->pTypeName) + ")" );
+    buf.append( "(" ).append( OUString::unacquired(&pTypeRef->pTypeName) ).append( ")" );
 
     switch (pTypeRef->eTypeClass)
     {
     case typelib_TypeClass_INTERFACE:
     {
-        buf.append( "0x" +
+        buf.append( "0x" ).append(
             OUString::number( reinterpret_cast< sal_IntPtr >(*static_cast<void * const *>(pVal)), 16 ));
         if( VAL2STR_MODE_DEEP == mode )
         {
@@ -162,7 +162,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
 
         for ( sal_Int32 nPos = 0; nPos < nDescr; ++nPos )
         {
-            buf.append( OUString::unacquired(&ppMemberNames[nPos]) + " = " );
+            buf.append( OUString::unacquired(&ppMemberNames[nPos]) ).append( " = " );
             typelib_TypeDescription * pMemberType = nullptr;
             TYPELIB_DANGER_GET( &pMemberType, ppTypeRefs[nPos] );
             buf.append( val2str( static_cast<char const *>(pVal) + pMemberOffsets[nPos], pMemberType->pWeakRef, mode ) );
@@ -219,8 +219,8 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
         buf.append( (*static_cast<typelib_TypeDescriptionReference * const *>(pVal))->pTypeName );
         break;
     case typelib_TypeClass_STRING:
-        buf.append( "\"" +
-            OUString::unacquired(&*static_cast<rtl_uString * const *>(pVal)) +
+        buf.append( "\"").append(
+            OUString::unacquired(&*static_cast<rtl_uString * const *>(pVal)) ).append(
             "\"" );
         break;
     case typelib_TypeClass_ENUM:
@@ -261,23 +261,23 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
         buf.append( *static_cast<double const *>(pVal) );
         break;
     case typelib_TypeClass_BYTE:
-        buf.append( "0x" +
+        buf.append( "0x").append(
             OUString::number( static_cast<sal_Int32>(*static_cast<sal_Int8 const *>(pVal)), 16 ));
         break;
     case typelib_TypeClass_SHORT:
-        buf.append( "0x" +
+        buf.append( "0x").append(
             OUString::number( static_cast<sal_Int32>(*static_cast<sal_Int16 const *>(pVal)), 16 ));
         break;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        buf.append( "0x" +
+        buf.append( "0x").append(
             OUString::number( static_cast<sal_Int32>(*static_cast<sal_uInt16 const *>(pVal)), 16 ));
         break;
     case typelib_TypeClass_LONG:
-        buf.append( "0x" +
+        buf.append( "0x").append(
             OUString::number( *static_cast<sal_Int32 const *>(pVal), 16 ));
         break;
     case typelib_TypeClass_UNSIGNED_LONG:
-        buf.append( "0x" +
+        buf.append( "0x").append(
             OUString::number( static_cast<sal_Int64>(*static_cast<sal_uInt32 const *>(pVal)), 16 ));
         break;
     case typelib_TypeClass_HYPER:
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index cb2824d00005..34141029ab58 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -112,10 +112,10 @@ public:
         if (initialised[key])
         {
             OUStringBuffer buf;
-            buf.append( "pyuno._createUnoStructHelper: member '" + key + "'");
+            buf.append( "pyuno._createUnoStructHelper: member '").append(key).append("'");
             if ( pos >= 0 )
             {
-                buf.append( " at position " + OUString::number(pos));
+                buf.append( " at position ").append(OUString::number(pos));
             }
             buf.append( " initialised multiple times.");
             throw RuntimeException(buf.makeStringAndClear());
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index 77006c33acac..f7cb6a9f4c79 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -151,7 +151,7 @@ void logException( RuntimeCargo *cargo, const char *intro,
         OUStringBuffer buf( 128 );
         buf.appendAscii( intro );
         appendPointer(buf, ptr);
-        buf.append( "]." + aFunctionName + " = " );
+        buf.append( "]." ).append( aFunctionName ).append( " = " );
         buf.append(
             val2str( data, type.getTypeLibType(), VAL2STR_MODE_SHALLOW ) );
         log( cargo,LogLevel::CALL, buf.makeStringAndClear() );
@@ -170,7 +170,7 @@ void logReply(
     OUStringBuffer buf( 128 );
     buf.appendAscii( intro );
     appendPointer(buf, ptr);
-    buf.append( "]." + aFunctionName + "()=" );
+    buf.append( "]." ).append( aFunctionName ).append( "()=" );
     if( isLog( cargo, LogLevel::ARGS ) )
     {
         buf.append(
@@ -192,7 +192,7 @@ void logCall( RuntimeCargo *cargo, const char *intro,
     OUStringBuffer buf( 128 );
     buf.appendAscii( intro );
     appendPointer(buf, ptr);
-    buf.append( "]." + aFunctionName + "(" );
+    buf.append( "]." ).append( aFunctionName ).append( "(" );
     if( isLog( cargo, LogLevel::ARGS ) )
     {
         for( int i = 0; i < aParams.getLength() ; i ++ )
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index a528117f1d74..5ba1ee204b47 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -3111,7 +3111,7 @@ SCSIZE ScTable::Query(const ScQueryParam& rParamOrg, bool bKeepSub)
                 {
                     OUString aCellStr;
                     GetString(k, j, aCellStr);
-                    aStr.append(aCellStr + u"\x0001");
+                    aStr.append(aCellStr).append(u"\x0001");
                 }
 
                 bResult = aStrSet.insert(aStr.makeStringAndClear()).second; // unique if inserted.
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index 569f9022b953..b4df765443a5 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -4029,7 +4029,7 @@ OUString SourceProviderType::getName() const {
     case unoidl::detail::SourceProviderType::TYPE_INSTANTIATED_POLYMORPHIC_STRUCT:
         {
             OUStringBuffer n(512);
-            n.append(name + "<");
+            n.append(name).append("<");
             for (auto i(subtypes.begin()); i != subtypes.end(); ++i) {
                 if (i != subtypes.begin()) {
                     n.append(",");
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index 79b772c39d6e..c72ad83081b7 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -185,8 +185,8 @@ OUString const & psp::getFontPath()
         if (!aInstallationRootPath.isEmpty())
         {
             // internal font resources, required for normal operation, like OpenSymbol
-            aPathBuffer.append(aInstallationRootPath
-                               + "/" LIBO_SHARE_RESOURCE_FOLDER "/common/fonts;");
+            aPathBuffer.append(aInstallationRootPath).append(
+                               "/" LIBO_SHARE_RESOURCE_FOLDER "/common/fonts;");
         }
         if( !aConfigPath.isEmpty() )
         {


More information about the Libreoffice-commits mailing list