drop intermediate Strings

Change-Id: I7f730d4f5329525eda9f78514dcaa3788149d077
This commit is contained in:
Caolán McNamara
2013-09-17 09:32:56 +01:00
parent f2be92b68d
commit 0cd21c2bed
7 changed files with 20 additions and 21 deletions

View File

@@ -363,7 +363,7 @@ OUString GetMsgString(
{ {
ResMgr* resMgr = Desktop::GetDesktopResManager(); ResMgr* resMgr = Desktop::GetDesktopResManager();
if ( resMgr ) if ( resMgr )
return OUString( ResId( nId, *resMgr ) ); return ResId(nId, *resMgr).toString();
} }
return aFallbackMsg; return aFallbackMsg;
} }
@@ -391,7 +391,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
ResMgr* pResMgr = Desktop::GetDesktopResManager(); ResMgr* pResMgr = Desktop::GetDesktopResManager();
if ( pResMgr ) if ( pResMgr )
aDiagnosticMessage.append( OUString( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr ) ) ); aDiagnosticMessage.append( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr).toString() );
else else
aDiagnosticMessage.appendAscii( "The program cannot be started." ); aDiagnosticMessage.appendAscii( "The program cannot be started." );
@@ -399,7 +399,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
{ {
aDiagnosticMessage.appendAscii( "\n\n" ); aDiagnosticMessage.appendAscii( "\n\n" );
if ( pResMgr ) if ( pResMgr )
aDiagnosticMessage.append( OUString( ResId(STR_INTERNAL_ERRMSG, *pResMgr ) ) ); aDiagnosticMessage.append( ResId(STR_INTERNAL_ERRMSG, *pResMgr).toString() );
else else
aDiagnosticMessage.appendAscii( "The following internal error has occurred:\n\n" ); aDiagnosticMessage.appendAscii( "The following internal error has occurred:\n\n" );
aDiagnosticMessage.append( aInternalErrMsg ); aDiagnosticMessage.append( aInternalErrMsg );
@@ -1169,7 +1169,7 @@ void restartOnMac(bool passArguments) {
#if HAVE_FEATURE_MACOSX_SANDBOX #if HAVE_FEATURE_MACOSX_SANDBOX
(void) passArguments; // avoid warnings (void) passArguments; // avoid warnings
ResMgr *resMgr = Desktop::GetDesktopResManager(); ResMgr *resMgr = Desktop::GetDesktopResManager();
OUString aMessage = OUString( ResId( STR_LO_MUST_BE_RESTARTED, *resMgr ) ); OUString aMessage = ResId(STR_LO_MUST_BE_RESTARTED, *resMgr).toString();
ErrorBox aRestartBox( NULL, WB_OK, aMessage ); ErrorBox aRestartBox( NULL, WB_OK, aMessage );
aRestartBox.Execute(); aRestartBox.Execute();
@@ -1494,7 +1494,7 @@ int Desktop::Main()
// create title string // create title string
LanguageTag aLocale( LANGUAGE_SYSTEM); LanguageTag aLocale( LANGUAGE_SYSTEM);
ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( "ofa", aLocale ); ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( "ofa", aLocale );
OUString aTitle = pLabelResMgr ? OUString( ResId( RID_APPTITLE, *pLabelResMgr ) ) : OUString(); OUString aTitle = pLabelResMgr ? ResId(RID_APPTITLE, *pLabelResMgr).toString() : OUString();
delete pLabelResMgr; delete pLabelResMgr;
#ifdef DBG_UTIL #ifdef DBG_UTIL

View File

@@ -96,8 +96,7 @@ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles >
const SolarMutexGuard guard; const SolarMutexGuard guard;
::std::auto_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) ); ::std::auto_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) );
OSL_ASSERT( resmgr.get() != 0 ); OSL_ASSERT( resmgr.get() != 0 );
OUString ret( ResId( STR_FILTERNAME_ALL, *resmgr.get() ) ); return ResId(STR_FILTERNAME_ALL, *resmgr.get()).toString();
return ret;
} }
}; };

View File

@@ -217,14 +217,14 @@ UpdateInstallDialog::UpdateInstallDialog(
m_bError(false), m_bError(false),
m_bNoEntry(true), m_bNoEntry(true),
m_bActivated(false), m_bActivated(false),
m_sInstalling(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_INSTALLING))), m_sInstalling(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_INSTALLING)),
m_sFinished(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_FINISHED))), m_sFinished(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_FINISHED)),
m_sNoErrors(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_NO_ERRORS))), m_sNoErrors(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_NO_ERRORS)),
m_sErrorDownload(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD))), m_sErrorDownload(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD)),
m_sErrorInstallation(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION))), m_sErrorInstallation(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION)),
m_sErrorLicenseDeclined(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED))), m_sErrorLicenseDeclined(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED)),
m_sNoInstall(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL))), m_sNoInstall(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL)),
m_sThisErrorOccurred(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED))), m_sThisErrorOccurred(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED)),
m_ft_action(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_DOWNLOADING)), m_ft_action(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_DOWNLOADING)),
m_statusbar(this,DpGuiResId(RID_DLG_UPDATE_INSTALL_STATUSBAR)), m_statusbar(this,DpGuiResId(RID_DLG_UPDATE_INSTALL_STATUSBAR)),
m_ft_extension_name(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NAME)), m_ft_extension_name(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NAME)),

View File

@@ -162,7 +162,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra
if ( bAllOneState && ( nCount > 1 )) if ( bAllOneState && ( nCount > 1 ))
{ {
// Insert special item for all command // Insert special item for all command
pVCLPopupMenu->InsertItem( ALL_MENUITEM_ID, OUString( FwlResId( STR_MENU_HEADFOOTALL )), 0, OString(), 0 ); pVCLPopupMenu->InsertItem( ALL_MENUITEM_ID, FwlResId(STR_MENU_HEADFOOTALL).toString(), 0, OString(), 0 );
OUStringBuffer aStrBuf( aCmd ); OUStringBuffer aStrBuf( aCmd );
aStrBuf.appendAscii( "?On:bool=" ); aStrBuf.appendAscii( "?On:bool=" );

View File

@@ -261,19 +261,19 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
// entry for LANGUAGE_NONE // entry for LANGUAGE_NONE
++nItemId; ++nItemId;
pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_LANGSTATUS_NONE )) ); pPopupMenu->InsertItem( nItemId, FwlResId(STR_LANGSTATUS_NONE).toString() );
aCmd = aCmd_Language + "LANGUAGE_NONE"; aCmd = aCmd_Language + "LANGUAGE_NONE";
pPopupMenu->SetItemCommand( nItemId, aCmd ); pPopupMenu->SetItemCommand( nItemId, aCmd );
// entry for 'Reset to default language' // entry for 'Reset to default language'
++nItemId; ++nItemId;
pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) ); pPopupMenu->InsertItem( nItemId, FwlResId(STR_RESET_TO_DEFAULT_LANGUAGE).toString() );
aCmd = aCmd_Language + "RESET_LANGUAGES"; aCmd = aCmd_Language + "RESET_LANGUAGES";
pPopupMenu->SetItemCommand( nItemId, aCmd ); pPopupMenu->SetItemCommand( nItemId, aCmd );
// entry for opening the Format/Character dialog // entry for opening the Format/Character dialog
++nItemId; ++nItemId;
pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_LANGSTATUS_MORE ))); pPopupMenu->InsertItem( nItemId, FwlResId(STR_LANGSTATUS_MORE).toString());
pPopupMenu->SetItemCommand( nItemId, aCmd_Dialog ); pPopupMenu->SetItemCommand( nItemId, aCmd_Dialog );
} }

View File

@@ -519,7 +519,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
} }
} }
OUString aLabelStr( FwkResId( STR_RESTORE_TOOLBARS )); OUString aLabelStr(FWK_RESSTR(STR_RESTORE_TOOLBARS));
OUString aRestoreCmd( CMD_RESTOREVISIBILITY ); OUString aRestoreCmd( CMD_RESTOREVISIBILITY );
addCommand( m_xPopupMenu, aRestoreCmd, aLabelStr ); addCommand( m_xPopupMenu, aRestoreCmd, aLabelStr );
} }

View File

@@ -121,7 +121,7 @@ void OGenericUnoDialog::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
m_bTitleAmbiguous = sal_False; m_bTitleAmbiguous = sal_False;
if (m_pDialog) if (m_pDialog)
m_pDialog->SetText(OUString(m_sTitle)); m_pDialog->SetText(m_sTitle);
} }
} }