[PATCH] Make some uses of OUStrings a little more readable

Rodolfo Ribeiro Gomes (via Code Review) gerrit at gerrit.libreoffice.org
Fri May 17 16:38:24 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3949

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/49/3949/1

Make some uses of OUStrings a little more readable

Change-Id: I2e85fa39abbff86918464aae67b4b9eacd3bf7a4
Signed-off-by: Rodolfo Ribeiro Gomes <rodolforg at gmail.com>
---
M vcl/source/gdi/impimagetree.cxx
1 file changed, 2 insertions(+), 8 deletions(-)



diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 7a2fbdd..bcdfd01 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -66,10 +66,7 @@
 OUString createPath(
     OUString const & name, sal_Int32 pos, OUString const & locale)
 {
-    OUStringBuffer b(name.copy(0, pos + 1));
-    b.append(locale);
-    b.append(name.copy(pos));
-    return b.makeStringAndClear();
+    return name.copy(0, pos + 1) + locale + name.copy(pos);
 }
 
 boost::shared_ptr< SvStream > wrapFile(osl::File & file)
@@ -279,10 +276,7 @@
         rtl::Bootstrap::expandMacros(url);
         INetURLObject u(url);
         OSL_ASSERT(!u.HasError());
-        OUStringBuffer b;
-        b.appendAscii("images_");
-        b.append(m_style);
-        bool ok = u.Append(b.makeStringAndClear(), INetURLObject::ENCODE_ALL);
+        bool ok = u.Append("images_" + m_style, INetURLObject::ENCODE_ALL);
         OSL_ASSERT(ok); (void) ok;
         m_paths.push_back(
             std::make_pair(

-- 
To view, visit https://gerrit.libreoffice.org/3949
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e85fa39abbff86918464aae67b4b9eacd3bf7a4
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Rodolfo Ribeiro Gomes <libo at rodolfo.eng.br>



More information about the LibreOffice mailing list