[Libreoffice-commits] .: desktop/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 1 13:25:00 PST 2013


 desktop/source/deployment/inc/dp_misc.h                   |    1 
 desktop/source/deployment/manager/dp_extensionmanager.cxx |    2 
 desktop/source/pkgchk/unopkg/unopkg_app.cxx               |   95 ++++++--------
 desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx            |   27 +--
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx              |   91 ++++++-------
 desktop/source/splash/splash.cxx                          |   32 +---
 6 files changed, 107 insertions(+), 141 deletions(-)

New commits:
commit f9f9fa1ef72c78accfbc25b33748a1046aa01843
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Tue Jan 1 20:47:51 2013 +0100

    RTL_CONSTASCII_(U)STRINGPARAM removed in desktop
    
    Change-Id: I23bd979aa39a8062f65f66e701cfd8ca3a18da8c

diff --git a/desktop/source/deployment/inc/dp_misc.h b/desktop/source/deployment/inc/dp_misc.h
index 39407a9..70f5cbb 100644
--- a/desktop/source/deployment/inc/dp_misc.h
+++ b/desktop/source/deployment/inc/dp_misc.h
@@ -32,7 +32,6 @@
 #include "com/sun/star/awt/XWindow.hpp"
 #include "dp_misc_api.hxx"
 
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
 #define ARLEN(x) (sizeof (x) / sizeof *(x))
 
 namespace dp_misc {
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 90dc8d8..9add425 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -1308,7 +1308,7 @@ sal_Bool ExtensionManager::synchronize(
         sSynchronizingShared.SearchAndReplaceAllAscii( "%NAME", OUString("shared"));
         dp_misc::ProgressLevel progressShared(xCmdEnv, sSynchronizingShared);
         sal_Bool bModified = getSharedRepository()->synchronize(xAbortChannel, xCmdEnv);
-        progressShared.update(OUSTR("\n\n"));
+        progressShared.update("\n\n");
 
         String sSynchronizingBundled(StrSyncRepository::get());
         sSynchronizingBundled.SearchAndReplaceAllAscii( "%NAME", OUString("bundled"));
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index b2b09a6..6747419 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -196,23 +196,23 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
     ::std::vector<OUString> cmdPackages;
 
     OptionInfo const * info_shared = getOptionInfo(
-        s_option_infos, OUSTR("shared") );
+        s_option_infos, "shared" );
     OptionInfo const * info_force = getOptionInfo(
-        s_option_infos, OUSTR("force") );
+        s_option_infos, "force" );
     OptionInfo const * info_verbose = getOptionInfo(
-        s_option_infos, OUSTR("verbose") );
+        s_option_infos, "verbose" );
     OptionInfo const * info_log = getOptionInfo(
-        s_option_infos, OUSTR("log-file") );
+        s_option_infos, "log-file" );
     OptionInfo const * info_context = getOptionInfo(
-        s_option_infos, OUSTR("deployment-context") );
+        s_option_infos, "deployment-context" );
     OptionInfo const * info_help = getOptionInfo(
-        s_option_infos, OUSTR("help") );
+        s_option_infos, "help" );
     OptionInfo const * info_version = getOptionInfo(
-        s_option_infos, OUSTR("version") );
+        s_option_infos, "version" );
     OptionInfo const * info_bundled = getOptionInfo(
-        s_option_infos, OUSTR("bundled") );
+        s_option_infos, "bundled" );
     OptionInfo const * info_suppressLicense = getOptionInfo(
-        s_option_infos, OUSTR("suppress-license") );
+        s_option_infos, "suppress-license" );
 
 
     Reference<XComponentContext> xComponentContext;
@@ -267,12 +267,12 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
                     {
                         // is option:
                         dp_misc::writeConsoleError(
-                                 OUSTR("\nERROR: unexpected option ") +
+                                 "\nERROR: unexpected option " +
                                  cmdArg +
-                                 OUSTR("!\n") +
-                                 OUSTR("       Use " APP_NAME " ") +
+                                 "!\n" +
+                                 "       Use " + APP_NAME + " " +
                                  toString(info_help) +
-                                 OUSTR(" to print all options.\n"));
+                                 " to print all options.\n");
                         return 1;
                     }
                     else
@@ -291,11 +291,11 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
         if (repository.isEmpty())
         {
             if (option_shared)
-                repository = OUSTR("shared");
+                repository = "shared";
             else if (option_bundled)
-                repository = OUSTR("bundled");
+                repository = "bundled";
             else
-                repository = OUSTR("user");
+                repository = "user";
         }
         else
         {
@@ -304,31 +304,29 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
             }
             else if (option_shared) {
                 dp_misc::writeConsoleError(
-                    OUSTR("WARNING: explicit context given!  ") +
-                    OUSTR("Ignoring option ") +
-                    toString( info_shared ) +
-                    OUSTR("!\n") );
+                    OUString("WARNING: explicit context given!  ") +
+                    "Ignoring option " + toString( info_shared ) + "!\n" );
             }
         }
 
-        if (subCommand.equals(OUSTR("reinstall")))
+        if (subCommand == "reinstall")
         {
             //We must prevent that services and types are loaded by UNO,
             //otherwise we cannot delete the registry data folder.
             OUString extensionUnorc;
-            if (repository.equals(OUSTR("user")))
-                extensionUnorc = OUSTR("$UNO_USER_PACKAGES_CACHE/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc");
-            else if (repository.equals(OUSTR("shared")))
-                extensionUnorc = OUSTR("$SHARED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc");
-            else if (repository.equals(OUSTR("bundled")))
-                extensionUnorc = OUSTR("$BUNDLED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc");
+            if (repository == "user")
+                extensionUnorc = "$UNO_USER_PACKAGES_CACHE/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc";
+            else if (repository == "shared")
+                extensionUnorc = "$SHARED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc";
+            else if (repository == "bundled")
+                extensionUnorc = "$BUNDLED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc";
             else
                 OSL_ASSERT(0);
 
             ::rtl::Bootstrap::expandMacros(extensionUnorc);
             oslFileError e = osl_removeFile(extensionUnorc.pData);
             if (e != osl_File_E_None && e != osl_File_E_NOENT)
-                throw Exception(OUSTR("Could not delete ") + extensionUnorc, 0);
+                throw Exception("Could not delete " + extensionUnorc, 0);
         }
 
         xComponentContext = getUNO(
@@ -345,7 +343,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
         //Do not synchronize when command is "reinstall". This could add types and services to UNO and
         //prevent the deletion of the registry data folder
         //synching is done in XExtensionManager.reinstall
-        if (!subcmd_gui && ! subCommand.equals(OUSTR("reinstall"))
+        if (!subcmd_gui && ! (subCommand == "reinstall")
             && ! dp_misc::office_is_running())
             dp_misc::syncRepositories(false, xCmdEnv);
 
@@ -357,8 +355,8 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
                 if (subcmd_add)
                 {
                     beans::NamedValue nvSuppress(
-                        OUSTR("SUPPRESS_LICENSE"), option_suppressLicense ?
-                        makeAny(OUSTR("1")):makeAny(OUSTR("0")));
+                        OUString("SUPPRESS_LICENSE"), option_suppressLicense ?
+                        makeAny(OUString("1")):makeAny(OUString("0")));
                         xExtensionManager->addExtension(
                             cmdPackage, Sequence<beans::NamedValue>(&nvSuppress, 1),
                             repository, Reference<task::XAbortChannel>(), xCmdEnv);
@@ -387,8 +385,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
                 }
             }
         }
-        else if (subCommand.equalsAsciiL(
-                     RTL_CONSTASCII_STRINGPARAM("reinstall") ))
+        else if ( subCommand == "reinstall" )
         {
             xExtensionManager->reinstallDeployedExtensions(
                 false, repository, Reference<task::XAbortChannel>(), xCmdEnv);
@@ -431,7 +428,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
                       vec_packages.size(), false);
 
                 dp_misc::writeConsole(
-                    OUSTR("All deployed ") + repository + OUSTR(" extensions:\n\n"));
+                    OUString("All deployed ") + repository + " extensions:\n\n");
             }
             else
             {
@@ -474,7 +471,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
 
                     else
                         throw lang::IllegalArgumentException(
-                            OUSTR("There is no such extension deployed: ") +
+                            "There is no such extension deployed: " +
                             cmdPackages[pos],0,-1);
                 }
 
@@ -540,24 +537,22 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
         else
         {
             dp_misc::writeConsoleError(
-                OUSTR("\nERROR: unknown sub-command ") +
-                subCommand +
-                OUSTR("!\n") +
-                OUSTR("       Use " APP_NAME " ") +
-                toString(info_help) +
-                OUSTR(" to print all options.\n"));
+                "\nERROR: unknown sub-command " +
+                subCommand + "!\n" +
+                "       Use " + APP_NAME + " " +
+                toString(info_help) + " to print all options.\n");
             return 1;
         }
 
         if (option_verbose)
-            dp_misc::writeConsole(OUSTR("\n" APP_NAME " done.\n"));
+            dp_misc::writeConsole(OUString("\n") + APP_NAME + " done.\n");
         //Force to release all bridges which connect us to the child processes
         dp_misc::disposeBridges(xLocalComponentContext);
         return 0;
     }
     catch (const ucb::CommandFailedException &e)
     {
-        dp_misc::writeConsoleError(e.Message + OUSTR("\n"));
+        dp_misc::writeConsoleError(e.Message + "\n");
         bNoOtherErrorMsg = true;
     }
     catch (const ucb::CommandAbortedException &)
@@ -578,11 +573,9 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
                 cause = e.Message;
         }
 
-        dp_misc::writeConsoleError(
-            OUSTR("\nERROR: ") + exc.Message + OUSTR("\n"));
+        dp_misc::writeConsoleError("\nERROR: " + exc.Message + "\n");
         if (!cause.isEmpty())
-            dp_misc::writeConsoleError(
-                OUSTR("       Cause: ") + cause + OUSTR("\n"));
+            dp_misc::writeConsoleError("       Cause: " + cause + "\n");
     }
     catch (const LockFileException & e)
     {
@@ -593,11 +586,9 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
     catch (const ::com::sun::star::uno::Exception & e ) {
         Any exc( ::cppu::getCaughtException() );
 
-        dp_misc::writeConsoleError(
-            OUSTR("\nERROR: ") +
-            OUString(option_verbose  ? e.Message + OUSTR("\nException details: \n") +
-            ::comphelper::anyToString(exc) : e.Message) +
-            OUSTR("\n"));
+        dp_misc::writeConsoleError("\nERROR: " +
+            OUString(option_verbose ? e.Message + "\nException details: \n" +
+            ::comphelper::anyToString(exc) : e.Message) + "\n");
     }
     if (!bNoOtherErrorMsg)
         dp_misc::writeConsoleError("\n" APP_NAME " failed.\n");
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index f93a049..3a782ca 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -114,7 +114,7 @@ CommandEnvironmentImpl::CommandEnvironmentImpl(
         m_xLogFile.set(
             xComponentContext->getServiceManager()
             ->createInstanceWithArgumentsAndContext(
-                OUSTR("com.sun.star.comp.deployment.ProgressLog"),
+                "com.sun.star.comp.deployment.ProgressLog",
                 Sequence<Any>( &logfile, 1 ), xComponentContext ),
             UNO_QUERY_THROW );
     }
@@ -151,7 +151,7 @@ void CommandEnvironmentImpl::printLicense(
     OUString sNO = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_NO, *pResMgr));
     OUString sN = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_N, *pResMgr));
 
-    OUString sNewLine(RTL_CONSTASCII_USTRINGPARAM("\n"));
+    OUString sNewLine("\n");
 
     dp_misc::writeConsole(sNewLine + sNewLine + s1 + sNewLine + sNewLine);
     dp_misc::writeConsole(sLicense + sNewLine + sNewLine);
@@ -211,8 +211,8 @@ void CommandEnvironmentImpl::handle(
 {
     Any request( xRequest->getRequest() );
     OSL_ASSERT( request.getValueTypeClass() == TypeClass_EXCEPTION );
-    dp_misc::TRACE(OUSTR("[unopkg_cmdenv.cxx] incoming request:\n")
-        + ::comphelper::anyToString(request) + OUSTR("\n\n"));
+    dp_misc::TRACE("[unopkg_cmdenv.cxx] incoming request:\n"
+        + ::comphelper::anyToString(request) + "\n\n");
 
     // selections:
     bool approve = false;
@@ -238,10 +238,8 @@ void CommandEnvironmentImpl::handle(
             OSL_ASSERT( xPackageType.is() );
             if (xPackageType.is()) {
                 approve = (xPackage->isBundle() &&
-                           xPackageType->getMediaType().matchAsciiL(
-                               RTL_CONSTASCII_STRINGPARAM(
-                                   "application/"
-                                   "vnd.sun.star.legacy-package-bundle") ));
+                           xPackageType->getMediaType().match(
+                               "application/vnd.sun.star.legacy-package-bundle") );
             }
         }
         abort = !approve;
@@ -275,7 +273,7 @@ void CommandEnvironmentImpl::handle(
     {
         String sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get()));
         sMsg.SearchAndReplaceAllAscii("%Name", platExc.package->getDisplayName());
-        dp_misc::writeConsole(OUSTR("\n") + sMsg + OUSTR("\n\n"));
+        dp_misc::writeConsole(OUString("\n") + sMsg + "\n\n");
         approve = true;
     }
     else {
@@ -295,8 +293,7 @@ void CommandEnvironmentImpl::handle(
     if (abort && m_option_verbose && !bLicenseException)
     {
         OUString msg = ::comphelper::anyToString(request);
-        dp_misc::writeConsoleError(
-            OUSTR("\nERROR: ") + msg + OUSTR("\n"));
+        dp_misc::writeConsoleError(OUString("\nERROR: ") + msg + "\n");
     }
 
     // select:
@@ -352,11 +349,11 @@ void CommandEnvironmentImpl::update_( Any const & Status )
     }
     else {
         ::rtl::OUStringBuffer buf;
-        buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("WARNING: ") );
+        buf.appendAscii( "WARNING: " );
         deployment::DeploymentException dp_exc;
         if (Status >>= dp_exc) {
             buf.append( dp_exc.Message );
-            buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(", Cause: ") );
+            buf.appendAscii( ", Cause: " );
             buf.append( ::comphelper::anyToString(dp_exc.Cause) );
         }
         else {
@@ -375,9 +372,9 @@ void CommandEnvironmentImpl::update_( Any const & Status )
     }
 
     if (bUseErr)
-        dp_misc::writeConsoleError(msg + OUSTR("\n"));
+        dp_misc::writeConsoleError(msg + OUString("\n"));
     else
-        dp_misc::writeConsole(msg + OUSTR("\n"));
+        dp_misc::writeConsole(msg + OUString("\n"));
 }
 
 //______________________________________________________________________________
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 9ded8b8..a3171c8 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -115,16 +115,16 @@ bool isOption( OptionInfo const * option_info, sal_uInt32 * pIndex )
     if (len == 2 && arg[ 1 ] == option_info->m_short_option)
     {
         ++(*pIndex);
-        dp_misc::TRACE(OUSTR(__FILE__": identified option \'")
-            + OUSTR("\'") + OUString( option_info->m_short_option ) + OUSTR("\n"));
+        dp_misc::TRACE(OUString(__FILE__) + ": identified option \'"
+            + "\'" + OUString( option_info->m_short_option ) + "\n");
         return true;
     }
     if (arg[ 1 ] == '-' && rtl_ustr_ascii_compare(
             arg.pData->buffer + 2, option_info->m_name ) == 0)
     {
         ++(*pIndex);
-        dp_misc::TRACE(OUSTR( __FILE__": identified option \'")
-            + OUString::createFromAscii(option_info->m_name) + OUSTR("\'\n"));
+        dp_misc::TRACE(OUString( __FILE__) + ": identified option \'"
+            + OUString::createFromAscii(option_info->m_name) + "\'\n");
         return true;
     }
     return false;
@@ -137,7 +137,7 @@ bool isBootstrapVariable(sal_uInt32 * pIndex)
 
     OUString arg;
     osl_getCommandArg(*pIndex, &arg.pData);
-    if (arg.matchAsciiL("-env:", 5))
+    if (arg.match("-env:"))
     {
         ++(*pIndex);
         return true;
@@ -155,8 +155,8 @@ bool readArgument(
         {
             OSL_ASSERT( pValue != 0 );
             osl_getCommandArg( *pIndex, &pValue->pData );
-            dp_misc::TRACE(OUSTR( __FILE__": argument value: ")
-                + *pValue + OUSTR("\n"));
+            dp_misc::TRACE(OUString( __FILE__) + ": argument value: "
+                + *pValue + "\n");
             ++(*pIndex);
             return true;
         }
@@ -172,8 +172,7 @@ struct ExecutableDir : public rtl::StaticWithInit<
     const OUString operator () () {
         OUString path;
         if (osl_getExecutableFile( &path.pData ) != osl_Process_E_None) {
-            throw RuntimeException(
-                OUSTR("cannot locate executable directory!"),0  );
+            throw RuntimeException("cannot locate executable directory!",0);
         }
         return path.copy( 0, path.lastIndexOf( '/' ) );
     }
@@ -215,8 +214,7 @@ OUString makeAbsoluteFileUrl(
         }
         else if (throw_exc)
         {
-            throw RuntimeException(
-                OUSTR("cannot get file url from system path: ") +
+            throw RuntimeException("cannot get file url from system path: " +
                 sys_path, Reference< XInterface >() );
         }
     }
@@ -227,13 +225,11 @@ OUString makeAbsoluteFileUrl(
     {
         if (throw_exc) {
             ::rtl::OUStringBuffer buf;
-            buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
-                                 "making absolute file url failed: \"") );
+            buf.appendAscii( "making absolute file url failed: \"" );
             buf.append( base_url );
-            buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
-                                 "\" (base-url) and \"") );
+            buf.appendAscii( "\" (base-url) and \"" );
             buf.append( file_url );
-            buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" (file-url)!") );
+            buf.appendAscii( "\" (file-url)!" );
             throw RuntimeException(
                 buf.makeStringAndClear(), Reference< XInterface >() );
         }
@@ -258,7 +254,7 @@ void printf_line(
     OUString const & name, OUString const & value, sal_Int32 level )
 {
    printf_space( level );
-    dp_misc::writeConsole(name + OUSTR(": ") + value + OUSTR("\n"));
+    dp_misc::writeConsole(name + ": " + value + "\n");
 }
 
 //------------------------------------------------------------------------------
@@ -272,11 +268,11 @@ void printf_package(
             true, dp_misc::getIdentifier( xPackage ) )
         : xPackage->getIdentifier() );
     if (id.IsPresent)
-        printf_line( OUSTR("Identifier"), id.Value, level );
+        printf_line( "Identifier", id.Value, level );
     OUString version(xPackage->getVersion());
     if (!version.isEmpty())
-        printf_line( OUSTR("Version"), version, level + 1 );
-    printf_line( OUSTR("URL"), xPackage->getURL(), level + 1 );
+        printf_line( "Version", version, level + 1 );
+    printf_line( "URL", xPackage->getURL(), level + 1 );
 
     beans::Optional< beans::Ambiguous<sal_Bool> > option(
         xPackage->isRegistered( Reference<task::XAbortChannel>(), xCmdEnv ) );
@@ -284,22 +280,21 @@ void printf_package(
     if (option.IsPresent) {
         beans::Ambiguous<sal_Bool> const & reg = option.Value;
         if (reg.IsAmbiguous)
-            value = OUSTR("unknown");
+            value = "unknown";
         else
-            value = reg.Value ? OUSTR("yes") : OUSTR("no");
+            value = reg.Value ? OUString("yes") : OUString("no");
     }
     else
-        value = OUSTR("n/a");
-    printf_line( OUSTR("is registered"), value, level + 1 );
+        value = "n/a";
+    printf_line( "is registered", value, level + 1 );
 
     const Reference<deployment::XPackageTypeInfo> xPackageType(
         xPackage->getPackageType() );
     OSL_ASSERT( xPackageType.is() );
     if (xPackageType.is()) {
-        printf_line( OUSTR("Media-Type"),
-                     xPackageType->getMediaType(), level + 1 );
+        printf_line( "Media-Type", xPackageType->getMediaType(), level + 1 );
     }
-    printf_line( OUSTR("Description"), xPackage->getDescription(), level + 1 );
+    printf_line( "Description", xPackage->getDescription(), level + 1 );
     if (xPackage->isBundle()) {
         Sequence< Reference<deployment::XPackage> > seq(
             xPackage->getBundle( Reference<task::XAbortChannel>(), xCmdEnv ) );
@@ -321,9 +316,9 @@ void printf_unaccepted_licenses(
 {
         OUString id(
             dp_misc::getIdentifier(ext) );
-        printf_line( OUSTR("Identifier"), id, 0 );
+        printf_line( "Identifier", id, 0 );
         printf_space(1);
-        dp_misc::writeConsole(OUSTR("License not accepted\n\n"));
+        dp_misc::writeConsole("License not accepted\n\n");
 }
 
 //==============================================================================
@@ -349,7 +344,7 @@ void printf_packages(
                 printf_unaccepted_licenses(*i);
             else
                 printf_package( *i, xCmdEnv, level );
-            dp_misc::writeConsole(OUSTR("\n"));
+            dp_misc::writeConsole("\n");
         }
     }
 }
@@ -382,25 +377,23 @@ Reference<XComponentContext> connectToOffice(
     bool verbose )
 {
     Sequence<OUString> args( 3 );
-    args[ 0 ] = OUSTR("--nologo");
-    args[ 1 ] = OUSTR("--nodefault");
+    args[ 0 ] = "--nologo";
+    args[ 1 ] = "--nodefault";
 
     OUString pipeId( ::dp_misc::generateRandomPipeId() );
     ::rtl::OUStringBuffer buf;
-    buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("--accept=pipe,name=") );
+    buf.appendAscii( "--accept=pipe,name=" );
     buf.append( pipeId );
-    buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(";urp;") );
+    buf.appendAscii( ";urp;" );
     args[ 2 ] = buf.makeStringAndClear();
-    OUString appURL( getExecutableDir() + OUSTR("/soffice") );
+    OUString appURL( getExecutableDir() + "/soffice" );
 
     if (verbose)
     {
         dp_misc::writeConsole(
-            OUSTR("Raising process: ") +
-            appURL +
-            OUSTR("\nArguments: --nologo --nodefault ") +
-            args[2] +
-            OUSTR("\n"));
+            "Raising process: " + appURL +
+            "\nArguments: --nologo --nodefault " + args[2] +
+            "\n");
     }
 
     ::dp_misc::raiseProcess( appURL, args );
@@ -409,10 +402,9 @@ Reference<XComponentContext> connectToOffice(
         dp_misc::writeConsole("OK.  Connecting...");
 
     OSL_ASSERT( buf.getLength() == 0 );
-    buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("uno:pipe,name=") );
+    buf.appendAscii( "uno:pipe,name=" );
     buf.append( pipeId );
-    buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
-                         ";urp;StarOffice.ComponentContext") );
+    buf.appendAscii( ";urp;StarOffice.ComponentContext" );
     Reference<XComponentContext> xRet(
         ::dp_misc::resolveUnoURL(
             buf.makeStringAndClear(), xLocalComponentContext ),
@@ -431,11 +423,11 @@ Reference<XComponentContext> connectToOffice(
 OUString getLockFilePath()
 {
     OUString ret;
-    OUString sBootstrap(RTL_CONSTASCII_USTRINGPARAM("${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}"));
+    OUString sBootstrap("${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}");
     rtl::Bootstrap::expandMacros(sBootstrap);
     OUString sAbs;
     if (::osl::File::E_None ==  ::osl::File::getAbsoluteFileURL(
-        sBootstrap, OUSTR(".lock"), sAbs))
+        sBootstrap, ".lock", sAbs))
     {
         if (::osl::File::E_None ==
             ::osl::File::getSystemPathFromFileURL(sAbs, sBootstrap))
@@ -454,7 +446,7 @@ Reference<XComponentContext> getUNO(
     // do not create any user data (for the root user) in --shared mode:
     if (shared) {
         rtl::Bootstrap::set(
-            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CFG_CacheUrl")),
+            rtl::OUString("CFG_CacheUrl"),
             rtl::OUString());
     }
 
@@ -475,14 +467,14 @@ Reference<XComponentContext> getUNO(
             //the ResMgr
             String sError(ResId(RID_STR_UNOPKG_ERROR, *DeploymentResMgr::get()));
 
-            sMsg = sMsg + OUSTR("\n") + getLockFilePath();
+            sMsg = sMsg + OUString("\n") + getLockFilePath();
 
             if (bGui)
             {
                 //We show a message box or print to the console that there
                 //is another instance already running
                 if ( ! InitVCL() )
-                    throw RuntimeException( OUSTR("Cannot initialize VCL!"),
+                    throw RuntimeException( "Cannot initialize VCL!",
                                             NULL );
                 {
                     WarningBox warn(NULL, WB_OK | WB_DEF_OK, sMsg);
@@ -493,8 +485,7 @@ Reference<XComponentContext> getUNO(
                 DeInitVCL();
             }
 
-            throw LockFileException(
-                OUSTR("\n") + sError + sMsg + OUSTR("\n"));
+            throw LockFileException(OUString("\n") + sError + sMsg + "\n");
         }
     }
 
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 15f6771..f14ee31 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -334,11 +334,7 @@ IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent )
 // Read keys from edition/edition.ini or soffice{.ini|rc}:
 OUString implReadBootstrapKey( const OUString& _rKey )
 {
-    OUString sValue(
-        rtl::OUString(
-            RTL_CONSTASCII_USTRINGPARAM(
-                "${.override:${BRAND_BASE_DIR}/program/edition/edition.ini:")) +
-        _rKey + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("}")));
+    OUString sValue("${.override:${BRAND_BASE_DIR}/program/edition/edition.ini:" + _rKey + "}");
     rtl::Bootstrap::expandMacros(sValue);
     return sValue;
 }
@@ -347,27 +343,19 @@ void SplashScreen::loadConfig()
 {
     _bShowLogo = implReadBootstrapKey( "Logo" ) != "0";
 
-    OUString sProgressFrameColor = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressFrameColor" ) ) );
-    OUString sProgressBarColor = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressBarColor" ) ) );
-    OUString sProgressTextColor = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressTextColor" ) ) );
-    OUString sProgressTextBaseline = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressTextBaseline" ) ) );
-    OUString sSize = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressSize" ) ) );
-    OUString sPosition = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressPosition" ) ) );
-    OUString sFullScreenSplash = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "FullScreenSplash" ) ) );
-    OUString sNativeProgress = implReadBootstrapKey(
-        OUString( RTL_CONSTASCII_USTRINGPARAM( "NativeProgress" ) ) );
+    OUString sProgressFrameColor = implReadBootstrapKey( "ProgressFrameColor" );
+    OUString sProgressBarColor = implReadBootstrapKey( "ProgressBarColor" );
+    OUString sProgressTextColor = implReadBootstrapKey( "ProgressTextColor" );
+    OUString sProgressTextBaseline = implReadBootstrapKey( "ProgressTextBaseline" );
+    OUString sSize = implReadBootstrapKey( "ProgressSize" );
+    OUString sPosition = implReadBootstrapKey( "ProgressPosition" );
+    OUString sFullScreenSplash = implReadBootstrapKey( "FullScreenSplash" );
+    OUString sNativeProgress = implReadBootstrapKey( "NativeProgress" );
 
 
     // Determine full screen splash mode
     _bFullScreenSplash = (( !sFullScreenSplash.isEmpty() ) &&
-                          ( !sFullScreenSplash.equalsAsciiL( "0", 1 )));
+                          ( !sFullScreenSplash.equals( "0" )));
 
     // Try to retrieve the relative values for the progress bar. The current
     // schema uses the screen ratio to retrieve the associated values.


More information about the Libreoffice-commits mailing list