From a15329d53f20bf913fe63c05fc7c53e17bd68e97 Mon Sep 17 00:00:00 2001
From: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Tue, 28 Mar 2023 20:25:10 +0200
Subject: loplugin:stringadd in svx

when applying my upcoming patch to also consider O[U]StringBuffer

Change-Id: I043885ed3120ff6f4262f339c69f15e2b2d4a85c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
---
 svx/source/form/databaselocationinput.cxx |  3 +--
 svx/source/form/formcontrolfactory.cxx    | 12 ++----------
 svx/source/form/formcontroller.cxx        |  4 +---
 3 files changed, 4 insertions(+), 15 deletions(-)

(limited to 'svx/source/form')

diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index ac1f94d8b72b..aa4bab9a3613 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -92,8 +92,7 @@ namespace svx
         OUStringBuffer aExtensionList;
         for ( auto const & extension : std::as_const(m_aFilterExtensions) )
         {
-            aExtensionList.append( extension );
-            aExtensionList.append( ';' );
+            aExtensionList.append( extension + ";" );
         }
         m_rLocationInput.SetFilter( aExtensionList.makeStringAndClear() );
         _rBrowseButton.connect_clicked(LINK(this, DatabaseLocationInputController_Impl, OnButtonAction));
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index f7310113d9d3..6d0682b38c3c 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -155,12 +155,7 @@ namespace svxform
                 // now find a free label
                 sal_Int32 i=2;
                 while ( aUsedLabels.find( sLabel ) != aUsedLabels.end() )
-                {
-                    OUStringBuffer aBuffer( _rBaseLabel );
-                    aBuffer.append( " " );
-                    aBuffer.append( i++ );
-                    sLabel = aBuffer.makeStringAndClear();
-                }
+                    sLabel = _rBaseLabel + " " + OUString::number( i++ );
             }
             catch( const Exception& )
             {
@@ -685,10 +680,7 @@ namespace svxform
         OUString sName;
         do
         {
-            OUStringBuffer aBuf( _rBaseName );
-            aBuf.append( " " );
-            aBuf.append( ++n );
-            sName = aBuf.makeStringAndClear();
+            sName = OUString::Concat(_rBaseName) + " " + OUString::number( ++n );
         }
         while ( _rxContainer->hasByName( sName ) );
 
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index ba666fd3829d..b1063a46df2f 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -810,9 +810,7 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
                             if ( !aFilter.isEmpty() )
                                 aFilter.append( " OR " );
 
-                            aFilter.append( "( " );
-                            aFilter.append( aRowFilter );
-                            aFilter.append( " )" );
+                            aFilter.append( "( " + aRowFilter + " )" );
                         }
                     }
                 }
-- 
cgit