Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1503

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/03/1503/1

fdo#57950: Remove chained append and simplify strings

No need to two strings here, since just destFolder is used.

Change-Id: Ie1bfd5744113764caaec11d9fb9c771f9c67e1c4
Signed-off-by: Marcos Paulo de Souza <marcos.souza....@gmail.com>
---
M basctl/source/basicide/moduldl2.cxx
1 file changed, 6 insertions(+), 8 deletions(-)



diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index 1fd2e47..1c5d9311 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1314,14 +1314,12 @@
 
         ::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, 
comphelper::getProcessComponentContext() );
 
-        OUStringBuffer buf;
-        buf.appendAscii( "vnd.sun.star.zip://" );
-        buf.append( ::rtl::Uri::encode( aPackageURL,
-                                        rtl_UriCharClassRegName,
-                                        rtl_UriEncodeIgnoreEscapes,
-                                        RTL_TEXTENCODING_UTF8 ) );
-        buf.append( static_cast<sal_Unicode>('/') );
-        OUString destFolder( buf.makeStringAndClear() );
+        OUString destFolder = "vnd.sun.star.zip://" +
+                              ::rtl::Uri::encode( aPackageURL,
+                                                  rtl_UriCharClassRegName,
+                                                  rtl_UriEncodeIgnoreEscapes,
+                                                  RTL_TEXTENCODING_UTF8 ) +
+                              OUString::valueOf(static_cast<sal_Unicode>('/'));
 
         if( xSFA->exists( aPackageURL ) )
             xSFA->kill( aPackageURL );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1bfd5744113764caaec11d9fb9c771f9c67e1c4
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Marcos Souza <marcos.souza....@gmail.com>

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to