loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: If839a783a57fb22566cc5e577f0f28463842f5dd
This commit is contained in:
parent
c2f8beb593
commit
8fa038d895
@ -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
|
||||
|
@ -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
|
||||
|
@ -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() ) );
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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(),
|
||||
|
@ -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 ) );
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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 );
|
||||
|
@ -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()");
|
||||
|
||||
|
@ -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() );
|
||||
|
@ -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,
|
||||
|
@ -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(
|
||||
|
@ -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 {
|
||||
|
@ -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 ),
|
||||
|
Loading…
x
Reference in New Issue
Block a user