[Libreoffice-commits] .: basctl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 3 09:29:32 PST 2013


 basctl/source/basicide/moduldl2.cxx |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit f6b4d0313dbaf1089254a1bfae9ccfbc3f413eb3
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date:   Sat Dec 29 11:39:23 2012 -0200

    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.org at gmail.com>
    Signed-off-by: Luboš Luňák <l.lunak at suse.cz>

diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 1fd2e47..d846bf3 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1314,14 +1314,12 @@ void LibPage::ExportAsPackage( const String& aLibName )
 
         ::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 ) +
+                              "/";
 
         if( xSFA->exists( aPackageURL ) )
             xSFA->kill( aPackageURL );


More information about the Libreoffice-commits mailing list