diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-31 08:03:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-31 08:03:47 +0200 |
commit | 8fa038d895d67672131ad7ddb0792c3b2900b47d (patch) | |
tree | 7017e73b2a81a1360e81f281592c44842022b074 /desktop | |
parent | c2f8beb5934aa345ff7b4aebc233c73c7642e487 (diff) |
loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: If839a783a57fb22566cc5e577f0f28463842f5dd
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 34 | ||||
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 18 | ||||
-rw-r--r-- | desktop/source/deployment/dp_log.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_manager.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_identifier.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_misc.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/registry/configuration/dp_configuration.cxx | 10 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_backenddb.cxx | 14 | ||||
-rw-r--r-- | desktop/source/deployment/registry/dp_registry.cxx | 6 | ||||
-rw-r--r-- | desktop/source/deployment/registry/package/dp_package.cxx | 2 | ||||
-rw-r--r-- | desktop/source/migration/migration.cxx | 4 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 4 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 22 |
16 files changed, 69 insertions, 69 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index b916d5396536..14a9a21c64c7 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -378,7 +378,7 @@ OUString MakeStartupErrorMessage( STR_BOOTSTRAP_ERR_CANNOT_START, "The program cannot be started.", bAlwaysUseFallbackMsg ) ); - aDiagnosticMessage.appendAscii( "\n" ); + aDiagnosticMessage.append( "\n" ); aDiagnosticMessage.append( aErrorMessage ); @@ -393,15 +393,15 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg ) if ( pResMgr ) aDiagnosticMessage.append( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr).toString() ); else - aDiagnosticMessage.appendAscii( "The program cannot be started." ); + aDiagnosticMessage.append( "The program cannot be started." ); if ( !aInternalErrMsg.isEmpty() ) { - aDiagnosticMessage.appendAscii( "\n\n" ); + aDiagnosticMessage.append( "\n\n" ); if ( pResMgr ) aDiagnosticMessage.append( ResId(STR_INTERNAL_ERRMSG, *pResMgr).toString() ); else - aDiagnosticMessage.appendAscii( "The following internal error has occurred:\n\n" ); + aDiagnosticMessage.append( "The following internal error has occurred:\n\n" ); aDiagnosticMessage.append( aInternalErrMsg ); } @@ -432,7 +432,7 @@ void FatalError(const OUString& sMessage) OUStringBuffer sTitle (128); sTitle.append (sProductKey ); - sTitle.appendAscii (" - Fatal Error"); + sTitle.append (" - Fatal Error"); Application::ShowNativeErrorBox (sTitle.makeStringAndClear (), sMessage); _exit(EXITHELPER_FATAL_ERROR); @@ -915,12 +915,12 @@ void Desktop::HandleBootstrapErrors( OUString( "The configuration service is not available." ) ); aDiagnosticMessage.append( aErrorMsg ); - aDiagnosticMessage.appendAscii( "\n" ); + aDiagnosticMessage.append( "\n" ); if ( !aErrorMessage.isEmpty() ) { - aDiagnosticMessage.appendAscii( "(\"" ); + aDiagnosticMessage.append( "(\"" ); aDiagnosticMessage.append( aErrorMessage ); - aDiagnosticMessage.appendAscii( "\")\n" ); + aDiagnosticMessage.append( "\")\n" ); } // Due to the fact the we haven't a backup applicat.rdb file anymore it is not possible to @@ -2125,31 +2125,31 @@ void Desktop::OpenClients() OUStringBuffer aHelpURLBuffer; if (rArgs.IsHelpWriter()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://swriter/start"); + aHelpURLBuffer.append("vnd.sun.star.help://swriter/start"); } else if (rArgs.IsHelpCalc()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://scalc/start"); + aHelpURLBuffer.append("vnd.sun.star.help://scalc/start"); } else if (rArgs.IsHelpDraw()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdraw/start"); + aHelpURLBuffer.append("vnd.sun.star.help://sdraw/start"); } else if (rArgs.IsHelpImpress()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://simpress/start"); + aHelpURLBuffer.append("vnd.sun.star.help://simpress/start"); } else if (rArgs.IsHelpBase()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdatabase/start"); + aHelpURLBuffer.append("vnd.sun.star.help://sdatabase/start"); } else if (rArgs.IsHelpBasic()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://sbasic/start"); + aHelpURLBuffer.append("vnd.sun.star.help://sbasic/start"); } else if (rArgs.IsHelpMath()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://smath/start"); + aHelpURLBuffer.append("vnd.sun.star.help://smath/start"); } if (bShowHelp) { - aHelpURLBuffer.appendAscii("?Language="); + aHelpURLBuffer.append("?Language="); aHelpURLBuffer.append(utl::ConfigManager::getLocale()); #if defined UNX - aHelpURLBuffer.appendAscii("&System=UNX"); + aHelpURLBuffer.append("&System=UNX"); #elif defined WNT aHelpURLBuffer.appendAscii("&System=WIN"); #endif diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index a7075f128be5..9cc3ce4a78f5 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -882,31 +882,31 @@ void OfficeIPCThread::execute() OUStringBuffer aHelpURLBuffer; if (aCmdLineArgs->IsHelpWriter()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://swriter/start"); + aHelpURLBuffer.append("vnd.sun.star.help://swriter/start"); } else if (aCmdLineArgs->IsHelpCalc()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://scalc/start"); + aHelpURLBuffer.append("vnd.sun.star.help://scalc/start"); } else if (aCmdLineArgs->IsHelpDraw()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdraw/start"); + aHelpURLBuffer.append("vnd.sun.star.help://sdraw/start"); } else if (aCmdLineArgs->IsHelpImpress()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://simpress/start"); + aHelpURLBuffer.append("vnd.sun.star.help://simpress/start"); } else if (aCmdLineArgs->IsHelpBase()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdatabase/start"); + aHelpURLBuffer.append("vnd.sun.star.help://sdatabase/start"); } else if (aCmdLineArgs->IsHelpBasic()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://sbasic/start"); + aHelpURLBuffer.append("vnd.sun.star.help://sbasic/start"); } else if (aCmdLineArgs->IsHelpMath()) { bShowHelp = true; - aHelpURLBuffer.appendAscii("vnd.sun.star.help://smath/start"); + aHelpURLBuffer.append("vnd.sun.star.help://smath/start"); } if (bShowHelp) { - aHelpURLBuffer.appendAscii("?Language="); + aHelpURLBuffer.append("?Language="); aHelpURLBuffer.append(utl::ConfigManager::getLocale()); #if defined UNX - aHelpURLBuffer.appendAscii("&System=UNX"); + aHelpURLBuffer.append("&System=UNX"); #elif defined WNT aHelpURLBuffer.appendAscii("&System=WIN"); #endif diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx index 6cc894c4c548..aa6d54b04ce3 100644 --- a/desktop/source/deployment/dp_log.cxx +++ b/desktop/source/deployment/dp_log.cxx @@ -169,10 +169,10 @@ void ProgressLogImpl::update( Any const & Status ) buf.append( msg ); } else { - buf.appendAscii( "ERROR: " ); + buf.append( "ERROR: " ); buf.append( ::comphelper::anyToString(Status) ); } - buf.appendAscii( "\n" ); + buf.append( "\n" ); log_write( OUStringToOString( buf.makeStringAndClear(), osl_getThreadTextEncoding() ) ); } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 0f8715c95bb5..40292a922ac8 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -1213,7 +1213,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) i < data.unsatisfiedDependencies.getLength(); ++i) { b.append(LF); - b.appendAscii(" "); + b.append(" "); // U+2003 EM SPACE would be better than two spaces, // but some fonts do not contain it b.append( @@ -1221,7 +1221,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) data.unsatisfiedDependencies[i])); } b.append(LF); - b.appendAscii(" "); + b.append(" "); b.append(m_noDependencyCurVer); } break; diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 3d94cb18b5c7..79b7b959c249 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -418,10 +418,10 @@ void UpdateInstallDialog::Thread::downloadExtensions() for (CIT j = vecExceptions.begin(); j != vecExceptions.end(); ++j) { if (j != vecExceptions.begin()) - buf.appendAscii("\n"); + buf.append("\n"); buf.append("Could not download "); buf.append(j->first); - buf.appendAscii(". "); + buf.append(". "); buf.append(j->second.Message); } m_dialog.setError(UpdateInstallDialog::ERROR_DOWNLOAD, curData.aInstalledPackage->getDisplayName(), diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 007d8e5a7287..bcb7b90b07a5 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -602,7 +602,7 @@ OUString PackageManagerImpl::insertToActivationLayer( OUStringBuffer buf; if (!sourceContent.isFolder()) { - buf.appendAscii( "vnd.sun.star.zip://" ); + buf.append( "vnd.sun.star.zip://" ); buf.append( ::rtl::Uri::encode( sourceContent.getURL(), rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes, @@ -937,7 +937,7 @@ OUString PackageManagerImpl::getDeployPath( ActivePackages::Data const & data ) //UTF8 encoded folder name. See PackageManagerImpl::synchronize if (!(m_context == "bundled")) { - buf.appendAscii( "_/" ); + buf.append( "_/" ); buf.append( ::rtl::Uri::encode( data.fileName, rtl_UriCharClassPchar, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 ) ); diff --git a/desktop/source/deployment/misc/dp_identifier.cxx b/desktop/source/deployment/misc/dp_identifier.cxx index 70967647f87c..a0b922c008b1 100644 --- a/desktop/source/deployment/misc/dp_identifier.cxx +++ b/desktop/source/deployment/misc/dp_identifier.cxx @@ -51,7 +51,7 @@ OUString getIdentifier( OUString generateLegacyIdentifier(OUString const & fileName) { OUStringBuffer b; - b.appendAscii("org.openoffice.legacy."); + b.append("org.openoffice.legacy."); b.append(fileName); return b.makeStringAndClear(); } diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 807eacb72c2f..2c0a165d7c5f 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -120,7 +120,7 @@ const OUString OfficePipeId::operator () () // create hex-value string from the MD5 value to keep // the string size minimal OUStringBuffer buf; - buf.appendAscii( "SingleOfficeIPC_" ); + buf.append( "SingleOfficeIPC_" ); for ( sal_uInt32 i = 0; i < md5_key_len; ++i ) { buf.append( static_cast<sal_Int32>(md5_buf[ i ]), 0x10 ); } diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 9b2a2a73179c..f595e9f0170e 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -87,12 +87,12 @@ bool jarManifestHeaderPresent( Reference<XCommandEnvironment> const & xCmdEnv ) { OUStringBuffer buf; - buf.appendAscii( "vnd.sun.star.zip://" ); + buf.append( "vnd.sun.star.zip://" ); buf.append( ::rtl::Uri::encode( url, rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 ) ); - buf.appendAscii( "/META-INF/MANIFEST.MF" ); + buf.append( "/META-INF/MANIFEST.MF" ); ::ucbhelper::Content manifestContent; OUString line; return diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 79bdd1b031b4..f240194d1757 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -574,19 +574,19 @@ OUString encodeForXml( OUString const & text ) sal_Unicode c = text[ pos ]; switch (c) { case '<': - buf.appendAscii( "<" ); + buf.append( "<" ); break; case '>': - buf.appendAscii( ">" ); + buf.append( ">" ); break; case '&': - buf.appendAscii( "&" ); + buf.append( "&" ); break; case '\'': - buf.appendAscii( "'" ); + buf.append( "'" ); break; case '\"': - buf.appendAscii( """ ); + buf.append( """ ); break; default: buf.append( c ); diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx index 1f6e5b639a5b..3f607ae04b0c 100644 --- a/desktop/source/deployment/registry/dp_backenddb.cxx +++ b/desktop/source/deployment/registry/dp_backenddb.cxx @@ -157,11 +157,11 @@ void BackendDb::removeEntry(OUString const & url) const OUString sPrefix = getNSPrefix(); OUStringBuffer sExpression(500); sExpression.append(sPrefix); - sExpression.appendAscii(":"); + sExpression.append(":"); sExpression.append(sKeyElement); sExpression.append("[@url = \""); sExpression.append(url); - sExpression.appendAscii("\"]"); + sExpression.append("\"]"); removeElement(sExpression.makeStringAndClear()); } @@ -243,11 +243,11 @@ Reference<css::xml::dom::XNode> BackendDb::getKeyElement( const OUString sKeyElement = getKeyElementName(); OUStringBuffer sExpression(500); sExpression.append(sPrefix); - sExpression.appendAscii(":"); + sExpression.append(":"); sExpression.append(sKeyElement); sExpression.append("[@url = \""); sExpression.append(url); - sExpression.appendAscii("\"]"); + sExpression.append("\"]"); const Reference<css::xml::dom::XDocument> doc = getDocument(); const Reference<css::xml::dom::XNode> root = doc->getFirstChild(); @@ -580,11 +580,11 @@ OUString BackendDb::readSimpleElement( const OUString sKeyElement = getKeyElementName(); OUStringBuffer buf(512); buf.append(sPrefix); - buf.appendAscii(":"); + buf.append(":"); buf.append(sKeyElement); - buf.appendAscii("/"); + buf.append("/"); buf.append(sPrefix); - buf.appendAscii(":"); + buf.append(":"); buf.append(name); buf.append("/text()"); diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index f66ed59268a0..7c8b9282c6cc 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -266,13 +266,13 @@ void PackageRegistryImpl::insertBackend( else { OUStringBuffer buf; - buf.appendAscii( "more than one PackageRegistryBackend for media-type=\"" ); + buf.append( "more than one PackageRegistryBackend for media-type=\"" ); buf.append( mediaType ); - buf.appendAscii( "\" => " ); + buf.append( "\" => " ); buf.append( Reference<lang::XServiceInfo>( xBackend, UNO_QUERY_THROW )-> getImplementationName() ); - buf.appendAscii( "\"!" ); + buf.append( "\"!" ); OSL_FAIL( OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr() ); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index d9ae1e0a1b95..b97c458edf15 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -1074,7 +1074,7 @@ void BackendImpl::PackageImpl::exportTo( erase_path( destURL, xCmdEnv ); OUStringBuffer buf; - buf.appendAscii( "vnd.sun.star.zip://" ); + buf.append( "vnd.sun.star.zip://" ); buf.append( ::rtl::Uri::encode( destURL, rtl_UriCharClassRegName, rtl_UriEncodeIgnoreEscapes, diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index ef8517c340e5..c4dcec25ea0b 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -821,7 +821,7 @@ void MigrationImpl::copyConfig() { // the configuration is split in many registry files // determine the file names from the first element in included paths OUStringBuffer buf(m_aInfo.userdata); - buf.appendAscii("/user/registry/data"); + buf.append("/user/registry/data"); sal_Int32 n = 0; do { OUString seg(i->first.getToken(0, '.', n)); @@ -840,7 +840,7 @@ void MigrationImpl::copyConfig() { buf.append('/'); buf.append(enc); } while (n >= 0); - buf.appendAscii(".xcu"); + buf.append(".xcu"); regFilePath = buf.toString(); } configuration::Update::get( diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index 145117f7dd6a..e2bc45618142 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -346,11 +346,11 @@ void CommandEnvironmentImpl::update_( Any const & Status ) } else { OUStringBuffer buf; - buf.appendAscii( "WARNING: " ); + buf.append( "WARNING: " ); deployment::DeploymentException dp_exc; if (Status >>= dp_exc) { buf.append( dp_exc.Message ); - buf.appendAscii( ", Cause: " ); + buf.append( ", Cause: " ); buf.append( ::comphelper::anyToString(dp_exc.Cause) ); } else { diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index d86a455238cf..eac18d4ca8f2 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -51,16 +51,16 @@ OUString toString( OptionInfo const * info ) { assert(info != 0); OUStringBuffer buf; - buf.appendAscii("--"); + buf.append("--"); buf.appendAscii(info->m_name); if (info->m_short_option != '\0') { - buf.appendAscii(" (short -" ); + buf.append(" (short -" ); buf.append(info->m_short_option ); - buf.appendAscii(")"); + buf.append(")"); } if (info->m_has_argument) - buf.appendAscii(" <argument>" ); + buf.append(" <argument>" ); return buf.makeStringAndClear(); } @@ -222,11 +222,11 @@ OUString makeAbsoluteFileUrl( { if (throw_exc) { OUStringBuffer buf; - buf.appendAscii( "making absolute file url failed: \"" ); + buf.append( "making absolute file url failed: \"" ); buf.append( base_url ); - buf.appendAscii( "\" (base-url) and \"" ); + buf.append( "\" (base-url) and \"" ); buf.append( file_url ); - buf.appendAscii( "\" (file-url)!" ); + buf.append( "\" (file-url)!" ); throw RuntimeException( buf.makeStringAndClear() ); } return OUString(); @@ -378,9 +378,9 @@ Reference<XComponentContext> connectToOffice( OUString pipeId( ::dp_misc::generateRandomPipeId() ); OUStringBuffer buf; - buf.appendAscii( "--accept=pipe,name=" ); + buf.append( "--accept=pipe,name=" ); buf.append( pipeId ); - buf.appendAscii( ";urp;" ); + buf.append( ";urp;" ); args[ 2 ] = buf.makeStringAndClear(); OUString appURL( getExecutableDir() + "/soffice" ); @@ -398,9 +398,9 @@ Reference<XComponentContext> connectToOffice( dp_misc::writeConsole("OK. Connecting..."); OSL_ASSERT( buf.isEmpty() ); - buf.appendAscii( "uno:pipe,name=" ); + buf.append( "uno:pipe,name=" ); buf.append( pipeId ); - buf.appendAscii( ";urp;StarOffice.ComponentContext" ); + buf.append( ";urp;StarOffice.ComponentContext" ); Reference<XComponentContext> xRet( ::dp_misc::resolveUnoURL( buf.makeStringAndClear(), xLocalComponentContext ), |