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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 6 09:45:20 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 0de59fac73861466aea95796f16a0fe17e083172
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Nov 6 08:32:47 2020 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 6 10:44:44 2020 +0100

    Revert "loplugin:stringbuffer"
    
    This reverts commit f0356b6128bb4e78041d53025ad7c2e0b8e0c299.
    
    Reason for revert: There is a OUStringConcat overload for OUStringBuffer which would have kicked in here, so this is unnecessary
    
    Change-Id: I3bafb6c30bd3a2c1912daf227554889f1e09c78a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105354
    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 5f94c11870ea..68ed95a065e5 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)
-                    .append(sDelim)
-                    .append(pAppInfo->maXMLExporter)
-                    .append(sDelim);
+                sValue.append(pAppInfo->maXMLImporter +
+                    sDelim +
+                    pAppInfo->maXMLExporter +
+                    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 4cfdab9982d0..25ae588d6d58 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( "(" ).append( OUString::unacquired(&pTypeRef->pTypeName) ).append( ")" );
+    buf.append( "(" + OUString::unacquired(&pTypeRef->pTypeName) + ")" );
 
     switch (pTypeRef->eTypeClass)
     {
     case typelib_TypeClass_INTERFACE:
     {
-        buf.append( "0x" ).append(
+        buf.append( "0x" +
             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]) ).append( " = " );
+            buf.append( OUString::unacquired(&ppMemberNames[nPos]) + " = " );
             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( "\"").append(
-            OUString::unacquired(&*static_cast<rtl_uString * const *>(pVal)) ).append(
+        buf.append( "\"" +
+            OUString::unacquired(&*static_cast<rtl_uString * const *>(pVal)) +
             "\"" );
         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").append(
+        buf.append( "0x" +
             OUString::number( static_cast<sal_Int32>(*static_cast<sal_Int8 const *>(pVal)), 16 ));
         break;
     case typelib_TypeClass_SHORT:
-        buf.append( "0x").append(
+        buf.append( "0x" +
             OUString::number( static_cast<sal_Int32>(*static_cast<sal_Int16 const *>(pVal)), 16 ));
         break;
     case typelib_TypeClass_UNSIGNED_SHORT:
-        buf.append( "0x").append(
+        buf.append( "0x" +
             OUString::number( static_cast<sal_Int32>(*static_cast<sal_uInt16 const *>(pVal)), 16 ));
         break;
     case typelib_TypeClass_LONG:
-        buf.append( "0x").append(
+        buf.append( "0x" +
             OUString::number( *static_cast<sal_Int32 const *>(pVal), 16 ));
         break;
     case typelib_TypeClass_UNSIGNED_LONG:
-        buf.append( "0x").append(
+        buf.append( "0x" +
             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 34141029ab58..cb2824d00005 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 '").append(key).append("'");
+            buf.append( "pyuno._createUnoStructHelper: member '" + key + "'");
             if ( pos >= 0 )
             {
-                buf.append( " at position ").append(OUString::number(pos));
+                buf.append( " at position " + 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 f7cb6a9f4c79..77006c33acac 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( "]." ).append( aFunctionName ).append( " = " );
+        buf.append( "]." + aFunctionName + " = " );
         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( "]." ).append( aFunctionName ).append( "()=" );
+    buf.append( "]." + aFunctionName + "()=" );
     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( "]." ).append( aFunctionName ).append( "(" );
+    buf.append( "]." + aFunctionName + "(" );
     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 5ba1ee204b47..a528117f1d74 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).append(u"\x0001");
+                    aStr.append(aCellStr + 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 b4df765443a5..569f9022b953 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).append("<");
+            n.append(name + "<");
             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 c72ad83081b7..79b772c39d6e 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).append(
-                               "/" LIBO_SHARE_RESOURCE_FOLDER "/common/fonts;");
+            aPathBuffer.append(aInstallationRootPath
+                               + "/" LIBO_SHARE_RESOURCE_FOLDER "/common/fonts;");
         }
         if( !aConfigPath.isEmpty() )
         {


More information about the Libreoffice-commits mailing list