summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-07-27 17:01:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-07-28 16:45:48 +0100
commit5efc15f0006866ac4c422c1b2bde173ded47893f (patch)
tree119b46339aae67b9a5b1a76ea2a955a548e5016e /framework
parentsurely this is a typo (diff)
downloadcore-5efc15f0006866ac4c422c1b2bde173ded47893f.tar.gz
core-5efc15f0006866ac4c422c1b2bde173ded47893f.zip
reduce use of UniString from ResID ctor
Change-Id: I8d7619e7807ff2d400ec5c7fd181375130245728
Diffstat (limited to 'framework')
-rw-r--r--framework/source/accelerators/presethandler.cxx6
-rw-r--r--framework/source/classes/menumanager.cxx2
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx4
-rw-r--r--framework/source/services/desktop.cxx2
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx9
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx18
-rw-r--r--framework/source/uielement/menubarmanager.cxx11
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx6
8 files changed, 25 insertions, 33 deletions
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 6c6539d1f6ae..c69b8336b69e 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -182,16 +182,16 @@ OUString lcl_getLocalizedMessage(::sal_Int32 nID)
switch(nID)
{
case ID_CORRUPT_UICONFIG_SHARE :
- sMessage = OUString( String( FwkResId( STR_CORRUPT_UICFG_SHARE )));
+ sMessage = FWK_RESSTR(STR_CORRUPT_UICFG_SHARE);
break;
case ID_CORRUPT_UICONFIG_USER :
- sMessage = OUString( String( FwkResId( STR_CORRUPT_UICFG_USER )));
+ sMessage = FWK_RESSTR(STR_CORRUPT_UICFG_USER);
break;
case ID_CORRUPT_UICONFIG_GENERAL :
- sMessage = OUString( String( FwkResId( STR_CORRUPT_UICFG_GENERAL )));
+ sMessage = FWK_RESSTR(STR_CORRUPT_UICFG_GENERAL);
break;
}
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 63b363633683..b1095a2fe181 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -159,7 +159,7 @@ MenuManager::MenuManager(
pPopupMenu->InsertSeparator();
// Use resource to load popup menu title
- String aAddonsStrRes = String( FwkResId( STR_MENU_ADDONS ));
+ OUString aAddonsStrRes(FWK_RESSTR(STR_MENU_ADDONS));
pPopupMenu->InsertItem( ITEMID_ADDONLIST, aAddonsStrRes );
pPopupMenu->SetPopupMenu( ITEMID_ADDONLIST, pSubMenu );
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 13dfb80c939d..cc4569a3c4f6 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -970,9 +970,7 @@ void ToolbarLayoutManager::setDockingAreaOffsets( const ::Rectangle aOffsets )
OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const
{
- String aAddonGenericTitle;
-
- aAddonGenericTitle = String( FwkResId( STR_TOOLBAR_TITLE_ADDON ));
+ String aAddonGenericTitle(FWK_RESSTR(STR_TOOLBAR_TITLE_ADDON));
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
String aNumStr = rI18nHelper.GetNum( nNumber, 0, sal_False, sal_False );
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index f9da2de0e469..51ba3e5ea542 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -117,7 +117,7 @@ DEFINE_INIT_SERVICE ( Desktop,
m_xDispatchHelper = css::uno::Reference< css::frame::XDispatchProvider >( static_cast< ::cppu::OWeakObject* >(pInterceptionHelper), css::uno::UNO_QUERY );
OUStringBuffer sUntitledPrefix (256);
- sUntitledPrefix.append (OUString( String( FwkResId( STR_UNTITLED_DOCUMENT ))));
+ sUntitledPrefix.append (FWK_RESSTR(STR_UNTITLED_DOCUMENT));
sUntitledPrefix.appendAscii (" ");
::comphelper::NumberedCollection* pNumbers = new ::comphelper::NumberedCollection ();
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 386fda57385f..340fd28386f1 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -227,23 +227,20 @@ throw ( RuntimeException )
// Replacement for place holders
if ( aStrValue.matchAsciiL( "($1)", 4 ))
{
- String aResStr = String( FwkResId( STR_UPDATEDOC ));
- OUString aTmp( aResStr );
+ OUString aTmp(FwkResId(STR_UPDATEDOC));
aTmp += OUString( " " );
aTmp += aStrValue.copy( 4 );
aStrValue = aTmp;
}
else if ( aStrValue.matchAsciiL( "($2)", 4 ))
{
- String aResStr = String( FwkResId( STR_CLOSEDOC_ANDRETURN ));
- OUString aTmp( aResStr );
+ OUString aTmp(FWK_RESSTR(STR_CLOSEDOC_ANDRETURN));
aTmp += aStrValue.copy( 4 );
aStrValue = aTmp;
}
else if ( aStrValue.matchAsciiL( "($3)", 4 ))
{
- String aResStr = String( FwkResId( STR_SAVECOPYDOC ));
- OUString aTmp( aResStr );
+ OUString aTmp(FWK_RESSTR(STR_SAVECOPYDOC));
aTmp += aStrValue.copy( 4 );
aStrValue = aTmp;
}
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index c6073c98a37a..095cca7b095f 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -98,7 +98,7 @@ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException
if ( m_xStatusbarItem.is() )
{
- m_xStatusbarItem->setText( String( FwkResId( STR_LANGSTATUS_MULTIPLE_LANGUAGES ) ) );
+ m_xStatusbarItem->setText( FWK_RESSTR(STR_LANGSTATUS_MULTIPLE_LANGUAGES) );
}
}
@@ -147,11 +147,11 @@ throw (::com::sun::star::uno::RuntimeException)
}
}
- xPopupMenu->insertItem( MID_LANG_SEL_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), 0, MID_LANG_SEL_NONE );
+ xPopupMenu->insertItem( MID_LANG_SEL_NONE, FWK_RESSTR(STR_LANGSTATUS_NONE), 0, MID_LANG_SEL_NONE );
if ( aLanguageTable.GetString( LANGUAGE_NONE ) == m_aCurLang )
xPopupMenu->checkItem( MID_LANG_SEL_NONE, sal_True );
- xPopupMenu->insertItem( MID_LANG_SEL_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), 0, MID_LANG_SEL_RESET );
- xPopupMenu->insertItem( MID_LANG_SEL_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), 0, MID_LANG_SEL_MORE );
+ xPopupMenu->insertItem( MID_LANG_SEL_RESET, FWK_RESSTR(STR_RESET_TO_DEFAULT_LANGUAGE), 0, MID_LANG_SEL_RESET );
+ xPopupMenu->insertItem( MID_LANG_SEL_MORE, FWK_RESSTR(STR_LANGSTATUS_MORE), 0, MID_LANG_SEL_MORE );
// add entries to submenu ('set language for paragraph')
nItemId = static_cast< sal_Int16 >(MID_LANG_PARA_1);
@@ -169,13 +169,13 @@ throw (::com::sun::star::uno::RuntimeException)
++nItemId;
}
}
- subPopupMenu->insertItem( MID_LANG_PARA_NONE, String( FwkResId( STR_LANGSTATUS_NONE )), 0, MID_LANG_PARA_NONE );
- subPopupMenu->insertItem( MID_LANG_PARA_RESET, String( FwkResId( STR_RESET_TO_DEFAULT_LANGUAGE )), 0, MID_LANG_PARA_RESET );
- subPopupMenu->insertItem( MID_LANG_PARA_MORE, String( FwkResId( STR_LANGSTATUS_MORE )), 0, MID_LANG_PARA_MORE );
+ subPopupMenu->insertItem( MID_LANG_PARA_NONE, FWK_RESSTR(STR_LANGSTATUS_NONE), 0, MID_LANG_PARA_NONE );
+ subPopupMenu->insertItem( MID_LANG_PARA_RESET, FWK_RESSTR(STR_RESET_TO_DEFAULT_LANGUAGE), 0, MID_LANG_PARA_RESET );
+ subPopupMenu->insertItem( MID_LANG_PARA_MORE, FWK_RESSTR(STR_LANGSTATUS_MORE), 0, MID_LANG_PARA_MORE );
// add last two entries to main menu
xPopupMenu->insertSeparator( MID_LANG_PARA_SEPARATOR );
- xPopupMenu->insertItem( MID_LANG_PARA_STRING, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), 0, MID_LANG_PARA_STRING );
+ xPopupMenu->insertItem( MID_LANG_PARA_STRING, FWK_RESSTR(STR_SET_LANGUAGE_FOR_PARAGRAPH), 0, MID_LANG_PARA_STRING );
xPopupMenu->setPopupMenu( MID_LANG_PARA_STRING, subPopupMenu );
@@ -290,7 +290,7 @@ throw ( RuntimeException )
OUString aStatusText = aSeq[0];
if (aStatusText == "*")
{
- aStatusText = String( FwkResId( STR_LANGSTATUS_MULTIPLE_LANGUAGES ) );
+ aStatusText = FWK_RESSTR(STR_LANGSTATUS_MULTIPLE_LANGUAGES);
}
m_xStatusbarItem->setText( aStatusText );
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index bec9d490414a..7f7f69a575fb 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -506,23 +506,20 @@ throw ( RuntimeException )
// Replacement for place holders
if ( aItemText.matchAsciiL( "($1)", 4 ))
{
- String aResStr = String( FwkResId( STR_UPDATEDOC ));
- OUString aTmp( aResStr );
+ OUString aTmp(FWK_RESSTR(STR_UPDATEDOC));
aTmp += OUString( " " );
aTmp += aItemText.copy( 4 );
aItemText = aTmp;
}
else if ( aItemText.matchAsciiL( "($2)", 4 ))
{
- String aResStr = String( FwkResId( STR_CLOSEDOC_ANDRETURN ));
- OUString aTmp( aResStr );
+ OUString aTmp(FWK_RESSTR(STR_CLOSEDOC_ANDRETURN));
aTmp += aItemText.copy( 4 );
aItemText = aTmp;
}
else if ( aItemText.matchAsciiL( "($3)", 4 ))
{
- String aResStr = String( FwkResId( STR_SAVECOPYDOC ));
- OUString aTmp( aResStr );
+ OUString aTmp(FWK_RESSTR(STR_SAVECOPYDOC));
aTmp += aItemText.copy( 4 );
aItemText = aTmp;
}
@@ -1339,7 +1336,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
pPopup->InsertSeparator();
// Use resource to load popup menu title
- String aAddonsStrRes = String( FwkResId( STR_MENU_ADDONS ));
+ OUString aAddonsStrRes(FWK_RESSTR(STR_MENU_ADDONS));
pPopup->InsertItem( ITEMID_ADDONLIST, aAddonsStrRes );
pPopup->SetPopupMenu( ITEMID_ADDONLIST, pSubMenu );
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 47f08687d9cd..7b01a110db80 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -176,16 +176,16 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
pVCLPopupMenu->InsertSeparator();
// Clear List menu entry
pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 1 ),
- String( FwkResId( STR_CLEAR_RECENT_FILES ) ) );
+ FWK_RESSTR(STR_CLEAR_RECENT_FILES) );
pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 1 ),
OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_CLEAR_LIST ) ) );
pVCLPopupMenu->SetHelpText( sal_uInt16( nCount + 1 ),
- String( FwkResId( STR_CLEAR_RECENT_FILES_HELP ) ) );
+ FWK_RESSTR(STR_CLEAR_RECENT_FILES_HELP) );
}
else
{
// No recent documents => insert "no document" string
- pVCLPopupMenu->InsertItem( 1, String( FwkResId( STR_NODOCUMENT ) ) );
+ pVCLPopupMenu->InsertItem( 1, FWK_RESSTR(STR_NODOCUMENT) );
// Do not disable it, otherwise the Toolbar controller and MenuButton
// will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT
pVCLPopupMenu->SetItemBits( 1, pVCLPopupMenu->GetItemBits( 1 ) | MIB_NOSELECT );