[Libreoffice-commits] core.git: sd/source sw/source vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 16 06:47:25 UTC 2019


 sd/source/filter/eppt/pptx-epptooxml.cxx |    5 +----
 sw/source/uibase/ribbar/inputwin.cxx     |    8 ++------
 vcl/source/window/mnemonic.cxx           |    6 +++---
 3 files changed, 6 insertions(+), 13 deletions(-)

New commits:
commit e2d82611088677f8ec9f038639567f2d7c699b5e
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 15 16:39:06 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 16 08:46:50 2019 +0200

    convert some Buffer.append to +
    
    by hand, because I don't feel like teaching this specific idiom to the
    plugin
    
    Change-Id: If400677dac842ca740c4532ed79f6f18f752b730
    Reviewed-on: https://gerrit.libreoffice.org/80842
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 47cf5be5b1d2..8a7db7302ff0 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1970,10 +1970,7 @@ void PowerPointExport::embedEffectAudio(const FSHelperPtr& pFS, const OUString&
     int nLastSlash = sUrl.lastIndexOf('/');
     sName = sUrl.copy(nLastSlash >= 0 ? nLastSlash + 1 : 0);
 
-    OUString sPath = OUStringBuffer().append("../media/")
-                                     .append(sName)
-                                     .makeStringAndClear();
-
+    OUString sPath = "../media/" + sName;
     sRelId = addRelation(pFS->getOutputStream(),
                         oox::getRelationship(Relationship::AUDIO), sPath);
 
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index ff4e9c16514f..91bffa18df6a 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -494,9 +494,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes,
     const sal_uInt16 nLen = aActText.getLength();
     if( !nLen )
     {
-        OUString aStr = OUStringBuffer().
-            append(cOpen).append(aBoxes).append(cClose).
-            makeStringAndClear();
+        OUString aStr = OUStringLiteral1(cOpen) + aBoxes + OUStringLiteral1(cClose);
         SetText(aStr);
         sal_Int32 nPos = aStr.indexOf( cClose );
         OSL_ENSURE(nPos != -1, "delimiter not found");
@@ -545,9 +543,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes,
         }
         else
         {
-            OUString aTmp = OUStringBuffer().
-                append(cOpen).append(aBoxes).append(cClose).
-                makeStringAndClear();
+            OUString aTmp = OUStringLiteral1(cOpen) + aBoxes + OUStringLiteral1(cClose);
             nPos = static_cast<sal_uInt16>(aSelection.Min());
             aActText = aActText.replaceAt( nPos, 0, aTmp );
             nPos = nPos + aTmp.getLength();
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index 42a21c6fca07..bbe12299abc5 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -262,9 +262,9 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey )
                 if ( maMnemonics[nMnemonicIndex] )
                 {
                     maMnemonics[nMnemonicIndex] = 0;
-                    OUString aStr = OUStringBuffer().
-                        append('(').append(m_cMnemonic).append(sal_Unicode(rtl::toAsciiUpperCase(c))).
-                        append(')').makeStringAndClear();
+                    OUString aStr = OUStringLiteral("(") + OUStringLiteral1(m_cMnemonic) +
+                            OUStringLiteral1(sal_Unicode(rtl::toAsciiUpperCase(c))) +
+                            ")";
                     nIndex = rKey.getLength();
                     if( nIndex >= 2 )
                     {


More information about the Libreoffice-commits mailing list