summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-19 17:06:06 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 10:07:32 +0200
commit52bbd9cc00b5a1e15e4f96b5c5fa5e75855692c1 (patch)
tree72d0d1d16806f1c785a4f79ea2c0cdfe54bb8101 /framework
parent3af99e4d59d89c343965a928681a30f36b1007d2 (diff)
remove unnecessary RTL_CONSTASCII_STRINGPARAM in appendAscii calls
Convert code like: aStrBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "ln(x)" )); to: aStrBuf.append( "ln(x)" ); which compiles down to the same code. Change-Id: I24c7cb45ceb32fd7cd6ec7ed203c2a5d746f1c5c
Diffstat (limited to 'framework')
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx8
-rw-r--r--framework/source/services/autorecovery.cxx22
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx16
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx2
5 files changed, 25 insertions, 25 deletions
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index dd301e6ad653..b7f56a1ea6de 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -373,7 +373,7 @@ void TitleHelper::impl_updateTitleForModel (const css::uno::Reference< css::fram
if (nLeasedNumber != css::frame::UntitledNumbersConst::INVALID_NUMBER)
sNewTitle.append ((::sal_Int32)nLeasedNumber);
else
- sNewTitle.appendAscii ("?");
+ sNewTitle.appendAscii("?");
sTitle = sNewTitle.makeStringAndClear ();
}
@@ -522,7 +522,7 @@ void TitleHelper::impl_appendProductName (OUStringBuffer& sTitle)
if (!name.isEmpty())
{
if (!sTitle.isEmpty())
- sTitle.appendAscii(RTL_CONSTASCII_STRINGPARAM(" - "));
+ sTitle.append(" - ");
sTitle.append(name);
}
}
@@ -569,9 +569,9 @@ void TitleHelper::impl_appendDebugVersion (OUStringBuffer& sTitle)
sTitle.append(version);
OUString sDefault("development");
OUString sVersion = ::utl::Bootstrap::getBuildIdData(sDefault);
- sTitle.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ["));
+ sTitle.append(" [");
sTitle.append(sVersion);
- sTitle.appendAscii(RTL_CONSTASCII_STRINGPARAM("]"));
+ sTitle.append("]");
}
#else
void TitleHelper::impl_appendDebugVersion (OUStringBuffer&)
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 1106f84615b8..75595d96d21b 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1250,7 +1250,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn
css::uno::Reference< css::lang::XSingleServiceFactory > xCreate(xCheck, css::uno::UNO_QUERY_THROW);
OUStringBuffer sIDBuf;
- sIDBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM(RECOVERY_ITEM_BASE_IDENTIFIER));
+ sIDBuf.append(RECOVERY_ITEM_BASE_IDENTIFIER);
sIDBuf.append((sal_Int32)rInfo.ID);
OUString sID = sIDBuf.makeStringAndClear();
@@ -2813,7 +2813,7 @@ OUString AutoRecovery::implst_getJobDescription(sal_Int32 eJob)
{
// describe the current running operation
OUStringBuffer sFeature(256);
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL));
+ sFeature.append(CMD_PROTOCOL);
// Attention: Because "eJob" is used as a flag field the order of checking these
// flags is important. We must preferr job with higher priorities!
@@ -2822,23 +2822,23 @@ OUString AutoRecovery::implst_getJobDescription(sal_Int32 eJob)
// e.g. PrepareEmergencySave must be done before EmergencySave is started of course.
if ((eJob & AutoRecovery::E_PREPARE_EMERGENCY_SAVE) == AutoRecovery::E_PREPARE_EMERGENCY_SAVE)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_PREPARE_EMERGENCY_SAVE));
+ sFeature.append(CMD_DO_PREPARE_EMERGENCY_SAVE);
else if ((eJob & AutoRecovery::E_EMERGENCY_SAVE) == AutoRecovery::E_EMERGENCY_SAVE)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_EMERGENCY_SAVE));
+ sFeature.append(CMD_DO_EMERGENCY_SAVE);
else if ((eJob & AutoRecovery::E_RECOVERY) == AutoRecovery::E_RECOVERY)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_RECOVERY));
+ sFeature.append(CMD_DO_RECOVERY);
else if ((eJob & AutoRecovery::E_SESSION_SAVE) == AutoRecovery::E_SESSION_SAVE)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_SAVE));
+ sFeature.append(CMD_DO_SESSION_SAVE);
else if ((eJob & AutoRecovery::E_SESSION_QUIET_QUIT) == AutoRecovery::E_SESSION_QUIET_QUIT)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_QUIET_QUIT));
+ sFeature.append(CMD_DO_SESSION_QUIET_QUIT);
else if ((eJob & AutoRecovery::E_SESSION_RESTORE) == AutoRecovery::E_SESSION_RESTORE)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_SESSION_RESTORE));
+ sFeature.append(CMD_DO_SESSION_RESTORE);
else if ((eJob & AutoRecovery::E_ENTRY_BACKUP) == AutoRecovery::E_ENTRY_BACKUP)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_ENTRY_BACKUP));
+ sFeature.append(CMD_DO_ENTRY_BACKUP);
else if ((eJob & AutoRecovery::E_ENTRY_CLEANUP) == AutoRecovery::E_ENTRY_CLEANUP)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_ENTRY_CLEANUP));
+ sFeature.append(CMD_DO_ENTRY_CLEANUP);
else if ((eJob & AutoRecovery::E_AUTO_SAVE) == AutoRecovery::E_AUTO_SAVE)
- sFeature.appendAscii(RTL_CONSTASCII_STRINGPARAM(CMD_DO_AUTO_SAVE));
+ sFeature.append(CMD_DO_AUTO_SAVE);
else if ( eJob != AutoRecovery::E_NO_JOB )
SAL_INFO("fwk", "AutoRecovery::implst_getJobDescription(): Invalid job identifier detected.");
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index 095cca7b095f..f8f3a025f4d8 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -193,43 +193,43 @@ throw (::com::sun::star::uno::RuntimeException)
if (MID_LANG_SEL_1 <= nId && nId <= MID_LANG_SEL_9)
{
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:LanguageStatus?Language:string=Current_") ));
+ aBuff.append( ".uno:LanguageStatus?Language:string=Current_" );
aBuff.append( aSelectedLang );
}
else if (nId == MID_LANG_SEL_NONE)
{
//set None as current language for selection
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE") ));
+ aBuff.append( ".uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE" );
}
else if (nId == MID_LANG_SEL_RESET)
{
// reset language attributes for selection
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES") ));
+ aBuff.append( ".uno:LanguageStatus?Language:string=Current_RESET_LANGUAGES" );
}
else if (nId == MID_LANG_SEL_MORE)
{
//open the dialog "format/character" for current selection
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:FontDialog?Language:string=*") ));
+ aBuff.append( ".uno:FontDialog?Language:string=*" );
}
else if (MID_LANG_PARA_1 <= nId && nId <= MID_LANG_PARA_9)
{
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:LanguageStatus?Language:string=Paragraph_") ));
+ aBuff.append( ".uno:LanguageStatus?Language:string=Paragraph_" );
aBuff.append( aSelectedLang );
}
else if (nId == MID_LANG_PARA_NONE)
{
//set None as language for current paragraph
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE") ));
+ aBuff.append( ".uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE" );
}
else if (nId == MID_LANG_PARA_RESET)
{
// reset language attributes for paragraph
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES") ));
+ aBuff.append( ".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES" );
}
else if (nId == MID_LANG_PARA_MORE)
{
//open the dialog "format/character" for current paragraph
- aBuff.appendAscii( RTL_CONSTASCII_STRINGPARAM( (".uno:FontDialogForParagraph") ));
+ aBuff.append( ".uno:FontDialogForParagraph" );
}
const Sequence< beans::PropertyValue > aDummyArgs;
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 03b1fce4c931..e2ac700d38ab 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -386,7 +386,7 @@ static sal_Bool Impl_ExistURLInMenu(
if ( !bValidFallback )
{
OUStringBuffer aBuffer;
- aBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( "private:factory/" ) );
+ aBuffer.append( "private:factory/" );
aBuffer.append( SvtModuleOptions().GetDefaultModuleName() );
sFallback = aBuffer.makeStringAndClear();
}
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 52b3ed69ebce..586a9af7dcf0 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -145,7 +145,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
}
OUStringBuffer aStrBuffer;
- aStrBuffer.appendAscii( RTL_CONSTASCII_STRINGPARAM( CMD_PREFIX ) );
+ aStrBuffer.append( CMD_PREFIX );
aStrBuffer.append( sal_Int32( i ) );
OUString aURLString( aStrBuffer.makeStringAndClear() );