summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-25 23:10:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-26 13:34:03 +0100
commitd9a00ace2ce3423c1ac08eee0bd1fd36dace8d3e (patch)
tree2a3900905792268c39f0c9596a5eb9ecdc8a3c61 /sfx2/source
parent4f25eb2c4eb7b5ce265eefe25a5ab84a39daf574 (diff)
tidy some resource strings
Change-Id: I611a276d048121084ec842d062129e042f3baea5
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appcfg.cxx3
-rw-r--r--sfx2/source/appl/appmisc.cxx4
-rw-r--r--sfx2/source/appl/appopen.cxx3
-rw-r--r--sfx2/source/appl/appserv.cxx4
-rw-r--r--sfx2/source/appl/linkmgr2.cxx6
-rw-r--r--sfx2/source/appl/newhelp.cxx40
-rw-r--r--sfx2/source/appl/opengrf.cxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx4
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx2
-rw-r--r--sfx2/source/control/msgpool.cxx6
-rw-r--r--sfx2/source/control/objface.cxx2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx40
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx10
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx2
-rw-r--r--sfx2/source/dialog/mailmodel.cxx4
-rw-r--r--sfx2/source/dialog/mgetempl.cxx10
-rw-r--r--sfx2/source/dialog/navigat.cxx2
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/dialog/passwd.cxx6
-rw-r--r--sfx2/source/dialog/recfloat.cxx4
-rw-r--r--sfx2/source/dialog/securitypage.cxx8
-rw-r--r--sfx2/source/dialog/srchdlg.cxx2
-rw-r--r--sfx2/source/dialog/styledlg.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx7
-rw-r--r--sfx2/source/dialog/taskpane.cxx10
-rw-r--r--sfx2/source/dialog/templdlg.cxx22
-rw-r--r--sfx2/source/doc/QuerySaveDocument.cxx6
-rw-r--r--sfx2/source/doc/doctdlg.cxx4
-rw-r--r--sfx2/source/doc/doctemplates.cxx2
-rw-r--r--sfx2/source/doc/docvor.cxx28
-rw-r--r--sfx2/source/doc/guisaveas.cxx7
-rw-r--r--sfx2/source/doc/new.cxx8
-rw-r--r--sfx2/source/doc/objcont.cxx6
-rw-r--r--sfx2/source/doc/objserv.cxx8
-rw-r--r--sfx2/source/doc/objstor.cxx14
-rw-r--r--sfx2/source/doc/objuno.cxx2
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/doc/querytemplate.cxx4
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx12
-rw-r--r--sfx2/source/inc/sfxtypes.hxx2
-rw-r--r--sfx2/source/menu/mnuitem.cxx4
-rw-r--r--sfx2/source/menu/mnumgr.cxx6
-rw-r--r--sfx2/source/menu/virtmenu.cxx2
-rw-r--r--sfx2/source/view/orgmgr.cxx4
-rw-r--r--sfx2/source/view/printer.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx6
-rw-r--r--sfx2/source/view/viewprn.cxx14
48 files changed, 174 insertions, 180 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 4b8d786d4b1a..bda8064a9264 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -470,8 +470,7 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
for ( sal_uInt16 nProp = SvtPathOptions::PATH_ADDIN;
nProp <= SvtPathOptions::PATH_WORK; nProp++ )
{
- const String aName( SfxResId( CONFIG_PATH_START + nProp ) );
- aNames.InsertValue( nProp, aName );
+ aNames.InsertValue( nProp, SfxResId(CONFIG_PATH_START + nProp).toString() );
rtl::OUString aValue;
switch ( nProp )
{
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 1e57943d3942..a8dfa09d1cd4 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -232,10 +232,10 @@ std::vector<sal_uInt16>* SfxApplication::GetDisabledSlotList_Impl()
// If an entry slot is present, but no or faulty slot file, or a slot
// file, but no slot entry, then this is considered to be a
// misconfiguration
- new SfxSpecialConfigError_Impl( String( SfxResId( RID_SPECIALCONFIG_ERROR ) ) );
+ new SfxSpecialConfigError_Impl( SfxResId( RID_SPECIALCONFIG_ERROR ).toString() );
}
- return pList;
+ return pList;
}
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 31e96945c13d..f8d13aaf800c 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -949,9 +949,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SolarMutexGuard aGuard;
Window *pWindow = SFX_APP()->GetTopWindow();
- String aSecurityWarningBoxTitle( SfxResId( RID_SECURITY_WARNING_TITLE ));
WarningBox aSecurityWarningBox( pWindow, SfxResId( RID_SECURITY_WARNING_NO_HYPERLINKS ));
- aSecurityWarningBox.SetText( aSecurityWarningBoxTitle );
+ aSecurityWarningBox.SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() );
aSecurityWarningBox.Execute();
return;
}
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 917ccf4bd328..fb69193344b3 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -207,7 +207,7 @@ namespace
{
if ( i != STR_LICENSING_INFORMATION_1 )
aLicensing += String( RTL_CONSTASCII_USTRINGPARAM( "\n\n" ) );
- aLicensing += String( SfxResId( i ) );
+ aLicensing += SfxResId( i ).toString();
}
aText.SetText( aLicensing );
@@ -732,7 +732,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
if ( pAppData_Impl->nDocModalMode )
rSet.DisableItem(nWhich);
else
- rSet.Put(SfxStringItem(nWhich, String(SfxResId(STR_QUITAPP))));
+ rSet.Put(SfxStringItem(nWhich, SfxResId(STR_QUITAPP).toString()));
break;
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 9ee75174a338..7bd60b3b20bb 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -264,10 +264,10 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
if( pType )
{
sal_uInt16 nObjType = pLink->GetObjType();
- *pType = String( SfxResId(
+ *pType = SfxResId(
( OBJECT_CLIENT_FILE == nObjType || OBJECT_CLIENT_OLE == nObjType )
? RID_SVXSTR_FILELINK
- : RID_SVXSTR_GRAFIKLINK ));
+ : RID_SVXSTR_GRAFIKLINK).toString();
}
bRet = true;
}
@@ -357,7 +357,7 @@ void LinkManager::UpdateAllLinks(
if( bAskUpdate )
{
- int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ) ).Execute();
+ int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString() ).Execute();
if( RET_YES != nRet )
return ; // nothing should be updated
bAskUpdate = sal_False; // once is enough
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 1da4f36754b6..09b242d8ce28 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1107,7 +1107,7 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
if ( !nCount )
{
InfoBox aBox( this, SfxResId( RID_INFO_NOSEARCHRESULTS ) );
- aBox.SetText( String( SfxResId( STR_HELP_WINDOW_TITLE ) ) );
+ aBox.SetText( SfxResId( STR_HELP_WINDOW_TITLE ).toString() );
aBox.Execute();
}
}
@@ -2047,9 +2047,9 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
aOnStartupCB ( this, SfxResId( RID_HELP_ONSTARTUP_BOX ) ),
aIndexOnImage ( SfxResId( IMG_HELP_TOOLBOX_INDEX_ON ) ),
aIndexOffImage ( SfxResId( IMG_HELP_TOOLBOX_INDEX_OFF ) ),
- aIndexOnText ( SfxResId( STR_HELP_BUTTON_INDEX_ON ) ),
- aIndexOffText ( SfxResId( STR_HELP_BUTTON_INDEX_OFF ) ),
- aOnStartupText ( SfxResId( RID_HELP_ONSTARTUP_TEXT ) ),
+ aIndexOnText ( SfxResId( STR_HELP_BUTTON_INDEX_ON ).toString() ),
+ aIndexOffText ( SfxResId( STR_HELP_BUTTON_INDEX_OFF ).toString() ),
+ aOnStartupText ( SfxResId( RID_HELP_ONSTARTUP_TEXT ).toString() ),
pHelpWin ( pParent ),
pTextWin ( new TextWin_Impl( this ) ),
pSrchDlg ( NULL ),
@@ -2073,18 +2073,18 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
aToolBox.InsertItem( TBI_INDEX, aIndexOffText );
aToolBox.SetHelpId( TBI_INDEX, HID_HELP_TOOLBOXITEM_INDEX );
aToolBox.InsertSeparator();
- aToolBox.InsertItem( TBI_BACKWARD, String( SfxResId( STR_HELP_BUTTON_PREV ) ) );
+ aToolBox.InsertItem( TBI_BACKWARD, SfxResId( STR_HELP_BUTTON_PREV ).toString() );
aToolBox.SetHelpId( TBI_BACKWARD, HID_HELP_TOOLBOXITEM_BACKWARD );
- aToolBox.InsertItem( TBI_FORWARD, String( SfxResId( STR_HELP_BUTTON_NEXT ) ) );
+ aToolBox.InsertItem( TBI_FORWARD, SfxResId( STR_HELP_BUTTON_NEXT ).toString() );
aToolBox.SetHelpId( TBI_FORWARD, HID_HELP_TOOLBOXITEM_FORWARD );
- aToolBox.InsertItem( TBI_START, String( SfxResId( STR_HELP_BUTTON_START ) ) );
+ aToolBox.InsertItem( TBI_START, SfxResId( STR_HELP_BUTTON_START ).toString() );
aToolBox.SetHelpId( TBI_START, HID_HELP_TOOLBOXITEM_START );
aToolBox.InsertSeparator();
- aToolBox.InsertItem( TBI_PRINT, String( SfxResId( STR_HELP_BUTTON_PRINT ) ) );
+ aToolBox.InsertItem( TBI_PRINT, SfxResId( STR_HELP_BUTTON_PRINT ).toString() );
aToolBox.SetHelpId( TBI_PRINT, HID_HELP_TOOLBOXITEM_PRINT );
- aToolBox.InsertItem( TBI_BOOKMARKS, String( SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ) ) );
+ aToolBox.InsertItem( TBI_BOOKMARKS, SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ).toString() );
aToolBox.SetHelpId( TBI_BOOKMARKS, HID_HELP_TOOLBOXITEM_BOOKMARKS );
- aToolBox.InsertItem( TBI_SEARCHDIALOG, String( SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ) ) );
+ aToolBox.InsertItem( TBI_SEARCHDIALOG, SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ).toString() );
aToolBox.SetHelpId( TBI_SEARCHDIALOG, HID_HELP_TOOLBOXITEM_SEARCHDIALOG );
InitToolBoxImages();
@@ -2560,40 +2560,40 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
aMenu.SetHelpId( TBI_INDEX, HID_HELP_TOOLBOXITEM_INDEX );
aMenu.InsertSeparator();
aMenu.InsertItem( TBI_BACKWARD,
- String( SfxResId( STR_HELP_BUTTON_PREV ) ),
+ SfxResId( STR_HELP_BUTTON_PREV ).toString(),
Image( SfxResId( IMG_HELP_TOOLBOX_PREV ) )
);
aMenu.SetHelpId( TBI_BACKWARD, HID_HELP_TOOLBOXITEM_BACKWARD );
aMenu.EnableItem( TBI_BACKWARD, pHelpWin->HasHistoryPredecessor() );
aMenu.InsertItem( TBI_FORWARD,
- String( SfxResId( STR_HELP_BUTTON_NEXT ) ),
+ SfxResId( STR_HELP_BUTTON_NEXT ).toString(),
Image( SfxResId( IMG_HELP_TOOLBOX_NEXT ) )
);
aMenu.SetHelpId( TBI_FORWARD, HID_HELP_TOOLBOXITEM_FORWARD );
aMenu.EnableItem( TBI_FORWARD, pHelpWin->HasHistorySuccessor() );
aMenu.InsertItem( TBI_START,
- String( SfxResId( STR_HELP_BUTTON_START ) ),
+ SfxResId( STR_HELP_BUTTON_START ).toString(),
Image( SfxResId( IMG_HELP_TOOLBOX_START ) )
);
aMenu.SetHelpId( TBI_START, HID_HELP_TOOLBOXITEM_START );
aMenu.InsertSeparator();
aMenu.InsertItem( TBI_PRINT,
- String( SfxResId( STR_HELP_BUTTON_PRINT ) ),
+ SfxResId( STR_HELP_BUTTON_PRINT ).toString(),
Image( SfxResId( IMG_HELP_TOOLBOX_PRINT ) )
);
aMenu.SetHelpId( TBI_PRINT, HID_HELP_TOOLBOXITEM_PRINT );
aMenu.InsertItem( TBI_BOOKMARKS,
- String( SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ) ),
+ SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ).toString(),
Image( SfxResId( IMG_HELP_TOOLBOX_BOOKMARKS ) )
);
aMenu.SetHelpId( TBI_BOOKMARKS, HID_HELP_TOOLBOXITEM_BOOKMARKS );
aMenu.InsertItem( TBI_SEARCHDIALOG,
- String( SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ) ),
+ SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ).toString(),
Image( SfxResId( IMG_HELP_TOOLBOX_SEARCHDIALOG ) )
);
aMenu.SetHelpId( TBI_SEARCHDIALOG, HID_HELP_TOOLBOXITEM_SEARCHDIALOG );
aMenu.InsertSeparator();
- aMenu.InsertItem( TBI_SELECTIONMODE, String( SfxResId( STR_HELP_MENU_TEXT_SELECTION_MODE ) ) );
+ aMenu.InsertItem( TBI_SELECTIONMODE, SfxResId( STR_HELP_MENU_TEXT_SELECTION_MODE ).toString() );
aMenu.SetHelpId( TBI_SELECTIONMODE, HID_HELP_TEXT_SELECTION_MODE );
Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY );
URL aURL;
@@ -2613,7 +2613,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
}
aMenu.InsertSeparator();
aMenu.InsertItem( TBI_COPY,
- String( SfxResId( STR_HELP_MENU_TEXT_COPY ) ),
+ SfxResId(STR_HELP_MENU_TEXT_COPY).toString(),
Image( SfxResId( IMG_HELP_TOOLBOX_COPY ) )
);
aMenu.SetHelpId( TBI_COPY, ".uno:Copy" );
@@ -2622,7 +2622,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if ( bIsDebug )
{
aMenu.InsertSeparator();
- aMenu.InsertItem( TBI_SOURCEVIEW, String( SfxResId( STR_HELP_BUTTON_SOURCEVIEW ) ) );
+ aMenu.InsertItem( TBI_SOURCEVIEW, SfxResId(STR_HELP_BUTTON_SOURCEVIEW).toString() );
}
if( SvtMenuOptions().IsEntryHidingEnabled() == sal_False )
@@ -3441,7 +3441,7 @@ SfxAddHelpBookmarkDialog_Impl::SfxAddHelpBookmarkDialog_Impl( Window* pParent, s
{
if ( bRename )
- SetText( String( SfxResId( STR_BOOKMARK_RENAME ) ) );
+ SetText( SfxResId(STR_BOOKMARK_RENAME).toString() );
FreeResource();
}
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index cfc00a72a314..a62de6194809 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -168,7 +168,7 @@ short SvxOpenGraphicDialog::Execute()
// could not load?
if ( nFound == USHRT_MAX )
{
- WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, String( SfxResId( SvxOpenGrfErr2ResId(nImpRet) ) ) );
+ WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ).toString() );
bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True;
}
else
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 5f6244696eb6..62030ef3dc44 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -97,7 +97,7 @@ public:
NoHelpErrorBox::NoHelpErrorBox( Window* _pParent ) :
- ErrorBox( _pParent, WB_OK, String( SfxResId( RID_STR_HLPFILENOTEXIST ) ) )
+ ErrorBox( _pParent, WB_OK, SfxResId( RID_STR_HLPFILENOTEXIST ).toString() )
{
// Error message: "No help available"
}
@@ -587,7 +587,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask ,
if (xProps.is())
xProps->setPropertyValue(
DEFINE_CONST_UNICODE("Title"),
- makeAny(::rtl::OUString(String(SfxResId(STR_HELP_WINDOW_TITLE)))));
+ makeAny(SfxResId(STR_HELP_WINDOW_TITLE).toString()));
pHelpWindow->setContainerWindow( xParentWindow );
xParentWindow->setVisible(sal_True);
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 72b35900575e..dc3ca0258343 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -507,7 +507,7 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter )
if ( pFilter->GetFilterFlags() & SFX_FILTER_MUSTINSTALL )
{
// Here could a re-installation be offered
- String aText( SfxResId( STR_FILTER_NOT_INSTALLED ) );
+ String aText( SfxResId(STR_FILTER_NOT_INSTALLED).toString() );
aText.SearchAndReplaceAscii( "$(FILTER)", pFilter->GetUIName() );
QueryBox aQuery( NULL, WB_YES_NO | WB_DEF_YES, aText );
short nRet = aQuery.Execute();
@@ -525,7 +525,7 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter )
}
else if ( pFilter->GetFilterFlags() & SFX_FILTER_CONSULTSERVICE )
{
- String aText( SfxResId( STR_FILTER_CONSULT_SERVICE ) );
+ String aText( SfxResId(STR_FILTER_CONSULT_SERVICE).toString() );
aText.SearchAndReplaceAscii( "$(FILTER)", pFilter->GetUIName() );
InfoBox ( NULL, aText ).Execute();
return sal_False;
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 63f3ec0fb82f..8720e53c7028 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -144,7 +144,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
}
// Who we are
- String sGenerator( SfxResId( STR_HTML_GENERATOR ) );
+ String sGenerator( SfxResId(STR_HTML_GENERATOR).toString() );
::rtl::OUString os( "$_OS" );
::rtl::Bootstrap::expandMacros(os);
sGenerator.SearchAndReplaceAscii( "%1", os );
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index 76b0e5e14dee..e72e1ea22159 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -181,13 +181,13 @@ String SfxSlotPool::SeekGroup( sal_uInt16 nNo )
if ( !aResId.GetResMgr()->IsAvailable(aResId) )
{
OSL_FAIL( "GroupId-Name not defined in SFX!" );
- return String();
+ return rtl::OUString();
}
- return String( aResId );
+ return aResId.toString();
}
- return String();
+ return rtl::OUString();
}
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index f6409c56eb0c..852fb40f9a0a 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -432,7 +432,7 @@ SfxObjectUI_Impl* CreateObjectBarUI_Impl( sal_uInt16 nPos, const ResId& rResId,
if ( !aResId.GetResMgr() || !aResId.GetResMgr()->IsAvailable(aResId) )
pUI->pName = new String (DEFINE_CONST_UNICODE("NoName"));
else
- pUI->pName = new String(aResId);
+ pUI->pName = new String(aResId.toString());
}
else
pUI->pName = new String(*pStr);
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d60f0cef199b..7c9efe51d49e 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -123,7 +123,7 @@ String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes = sal_True, sal_B
String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartExtraBytes )
{
String aUnitStr = ' ';
- aUnitStr += String( SfxResId(STR_BYTES) );
+ aUnitStr += SfxResId(STR_BYTES).toString();
sal_uIntPtr nSize1 = nSize;
sal_uIntPtr nSize2 = nSize1;
sal_uIntPtr nMega = 1024 * 1024;
@@ -136,7 +136,7 @@ String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartE
{
nSize1 /= 1024;
aUnitStr = ' ';
- aUnitStr += String( SfxResId(STR_KB) );
+ aUnitStr += SfxResId(STR_KB).toString();
fSize /= 1024;
nDec = 0;
}
@@ -144,7 +144,7 @@ String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartE
{
nSize1 /= nMega;
aUnitStr = ' ';
- aUnitStr += String( SfxResId(STR_MB) );
+ aUnitStr += SfxResId(STR_MB).toString();
fSize /= nMega;
nDec = 2;
}
@@ -152,7 +152,7 @@ String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartE
{
nSize1 /= nGiga;
aUnitStr = ' ';
- aUnitStr += String( SfxResId(STR_GB) );
+ aUnitStr += SfxResId(STR_GB).toString();
bGB = sal_True;
fSize /= nGiga;
nDec = 3;
@@ -171,7 +171,7 @@ String CreateSizeText( sal_uIntPtr nSize, sal_Bool bExtraBytes, sal_Bool bSmartE
aSizeStr += DEFINE_CONST_UNICODE(" (");
aSizeStr += rLocaleWrapper.getNum( nSize2, 0 );
aSizeStr += ' ';
- aSizeStr += String( SfxResId(STR_BYTES) );
+ aSizeStr += SfxResId(STR_BYTES).toString();
aSizeStr += ')';
}
else if ( bGB && bSmartExtraBytes )
@@ -801,14 +801,14 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet )
aTemplFt ( this, SfxResId( FT_TEMPL ) ),
aTemplValFt ( this, SfxResId( FT_TEMPL_VAL ) ),
- aUnknownSize ( SfxResId( STR_UNKNOWNSIZE ) ),
- aMultiSignedStr ( SfxResId( STR_MULTSIGNED ) ),
+ aUnknownSize ( SfxResId( STR_UNKNOWNSIZE ).toString() ),
+ aMultiSignedStr ( SfxResId( STR_MULTSIGNED ).toString() ),
bEnableUseUserData ( sal_False ),
bHandleDelete ( sal_False )
{
- aNameED.SetAccessibleName( String( SfxResId( EDIT_FILE_NAME ) ) );
+ aNameED.SetAccessibleName( SfxResId( EDIT_FILE_NAME ).toString() );
FreeResource();
ImplUpdateSignatures();
ImplCheckPasswordState();
@@ -1107,7 +1107,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
INetURLObject aURL(aFile);
aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
if ( !aName.Len() || aURL.GetProtocol() == INET_PROT_PRIVATE )
- aName = String( SfxResId( STR_NONAME ) );
+ aName = SfxResId( STR_NONAME ).toString();
aNameED.SetReadOnly( sal_True );
}
else
@@ -1140,7 +1140,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet )
String aDescription = SvFileInformationManager::GetDescription( INetURLObject(rMainURL) );
if ( aDescription.Len() == 0 )
- aDescription = String( SfxResId( STR_SFX_NEWOFFICEDOC ) );
+ aDescription = SfxResId( STR_SFX_NEWOFFICEDOC ).toString();
aShowTypeFT.SetText( aDescription );
// determine location
@@ -1214,7 +1214,7 @@ SfxInternetPage::SfxInternetPage( Window* pParent, const SfxItemSet& rItemSet )
aFTFrame ( this, SfxResId( FT_FRAME ) ),
aCBFrame ( this, SfxResId( CB_FRAME ) ),
- aForwardErrorMessg ( SfxResId( STR_FORWARD_ERRMSSG ) ),
+ aForwardErrorMessg ( SfxResId(STR_FORWARD_ERRMSSG).toString() ),
pInfoItem ( NULL ),
pFileDlg ( NULL ),
eState ( S_Init )
@@ -1573,7 +1573,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
aTitle += aFile;
}
else
- aTitle += String( SfxResId( STR_NONAME ) );
+ aTitle += SfxResId( STR_NONAME ).toString();
}
else
{
@@ -1777,7 +1777,7 @@ CustomPropertyLine::CustomPropertyLine( Window* pParent ) :
m_aValueEdit ( pParent, SfxResId( SFX_ED_PROPERTY_VALUE ), this ),
m_aDateField ( pParent, SfxResId( SFX_FLD_DATE), this),
m_aTimeField ( pParent, SfxResId( SFX_FLD_TIME), this),
- m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT )),
+ m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT ).toString() ),
m_aDurationField( pParent, SfxResId( SFX_FLD_DURATION), this),
m_aEditButton( pParent, SfxResId( SFX_PB_EDIT ), this),
m_aYesNoButton ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
@@ -1831,9 +1831,9 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR
m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) );
ResMgr* pResMgr = rResId.GetResMgr();
- m_aNameBox.SetAccessibleName( String( ResId( STR_HEADER_NAME, *pResMgr ) ) );
- m_aTypeBox.SetAccessibleName( String( ResId( STR_HEADER_TYPE, *pResMgr ) ) );
- m_aValueEdit.SetAccessibleName( String( ResId( STR_HEADER_VALUE, *pResMgr ) ) );
+ m_aNameBox.SetAccessibleName( ResId( STR_HEADER_NAME, *pResMgr ).toString() );
+ m_aTypeBox.SetAccessibleName( ResId( STR_HEADER_TYPE, *pResMgr ).toString() );
+ m_aValueEdit.SetAccessibleName( ResId( STR_HEADER_VALUE, *pResMgr ).toString() );
}
CustomPropertiesWindow::~CustomPropertiesWindow()
@@ -2315,10 +2315,10 @@ CustomPropertiesControl::CustomPropertiesControl( Window* pParent, const ResId&
const HeaderBarItemBits nHeadBits = HIB_VCENTER | HIB_FIXED | HIB_FIXEDPOS | HIB_LEFT;
nWidth = nWidth / 4;
ResMgr* pResMgr = rResId.GetResMgr();
- m_aHeaderBar.InsertItem( HI_NAME, String( ResId( STR_HEADER_NAME, *pResMgr ) ), nWidth, nHeadBits );
- m_aHeaderBar.InsertItem( HI_TYPE, String( ResId( STR_HEADER_TYPE, *pResMgr ) ), nWidth, nHeadBits );
- m_aHeaderBar.InsertItem( HI_VALUE, String( ResId( STR_HEADER_VALUE, *pResMgr ) ), nWidth, nHeadBits );
- m_aHeaderBar.InsertItem( HI_ACTION, String( ResId( STR_HEADER_ACTION, *pResMgr ) ), nWidth, nHeadBits );
+ m_aHeaderBar.InsertItem( HI_NAME, ResId( STR_HEADER_NAME, *pResMgr ).toString(), nWidth, nHeadBits );
+ m_aHeaderBar.InsertItem( HI_TYPE, ResId( STR_HEADER_TYPE, *pResMgr ).toString(), nWidth, nHeadBits );
+ m_aHeaderBar.InsertItem( HI_VALUE, ResId( STR_HEADER_VALUE, *pResMgr ).toString(), nWidth, nHeadBits );
+ m_aHeaderBar.InsertItem( HI_ACTION, ResId( STR_HEADER_ACTION, *pResMgr ).toString(), nWidth, nHeadBits );
m_aHeaderBar.Show();
FreeResource();
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index fe35177e86b2..c61217adeb99 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -659,7 +659,7 @@ void FileDialogHelper_Impl::updateVersions()
uno::Sequence < util::RevisionTag > xVersions = SfxMedium::GetVersionList( xStorage );
aEntries.realloc( xVersions.getLength() + 1 );
- aEntries[0] = OUString( String ( SfxResId( STR_SFX_FILEDLG_ACTUALVERSION ) ) );
+ aEntries[0] = SfxResId( STR_SFX_FILEDLG_ACTUALVERSION ).toString();
for ( sal_Int32 i=0; i<xVersions.getLength(); i++ )
aEntries[ i + 1 ] = xVersions[i].Identifier;
@@ -1119,7 +1119,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
// Export dialog
if ( mbExport )
{
- mxFileDlg->setTitle( OUString( String( SfxResId( STR_SFX_EXPLORERFILE_EXPORT ) ) ) );
+ mxFileDlg->setTitle( SfxResId( STR_SFX_EXPLORERFILE_EXPORT ).toString() );
try {
com::sun::star::uno::Reference < XFilePickerControlAccess > xCtrlAccess( mxFileDlg, UNO_QUERY_THROW );
xCtrlAccess->enableControl( ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR, sal_True );
@@ -1130,14 +1130,14 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
// the "insert file" dialog needs another title
if ( mbInsert )
{
- mxFileDlg->setTitle( OUString( String( SfxResId( STR_SFX_EXPLORERFILE_INSERT ) ) ) );
+ mxFileDlg->setTitle( SfxResId( STR_SFX_EXPLORERFILE_INSERT ).toString() );
uno::Reference < XFilePickerControlAccess > xExtDlg( mxFileDlg, UNO_QUERY );
if ( xExtDlg.is() )
{
try
{
xExtDlg->setLabel( CommonFilePickerElementIds::PUSHBUTTON_OK,
- OUString( String( SfxResId( STR_SFX_EXPLORERFILE_BUTTONINSERT ) ) ) );
+ SfxResId( STR_SFX_EXPLORERFILE_BUTTONINSERT ).toString() );
}
catch( const IllegalArgumentException& ){}
}
@@ -1909,7 +1909,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
try
{
- OUString aAllFilterName = String( SfxResId( STR_SFX_IMPORT_ALL ) );
+ OUString aAllFilterName = SfxResId( STR_SFX_IMPORT_ALL ).toString();
aAllFilterName = ::sfx2::addExtension( aAllFilterName, aExtensions, bIsInOpenMode, *this );
xFltMgr->appendFilter( aAllFilterName, aExtensions );
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 770149f1d52a..816c5854c78b 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -776,7 +776,7 @@ namespace sfx2
{
::rtl::OUString sUIName;
sal_Bool bHasAll = sal_False;
- _rAllFilterName = String( SfxResId( STR_SFX_FILTERNAME_ALL ) );
+ _rAllFilterName = SfxResId( STR_SFX_FILTERNAME_ALL ).toString();
// ===============================================================
// check if there's already a filter <ALL>
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 79a4671c5e3a..8f69fd0faa1c 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -235,11 +235,9 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
//add an internal property, used to tell the dialog we want to set a different
//string for the ok button
//used in filter/source/pdf/impdialog.cxx
- String aOkSendText( SfxResId( STR_PDF_EXPORT_SEND ));
-
uno::Sequence< beans::PropertyValue > aFilterDataValue(1);
aFilterDataValue[0].Name = ::rtl::OUString( "_OkButtonString" );
- aFilterDataValue[0].Value = css::uno::makeAny( ::rtl::OUString( aOkSendText ));
+ aFilterDataValue[0].Value = css::uno::makeAny(SfxResId(STR_PDF_EXPORT_SEND ).toString());
//add to the filterdata property, the only one the PDF export filter dialog will care for
aPropsForDialog[0].Name = ::rtl::OUString( "FilterData" );
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 7d7926df6824..f9bc26bc05dd 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -121,7 +121,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
if ( !pStyle->GetName().Len() && pPool )
{
// NullString as Name -> generate Name
- String aNoName( SfxResId( STR_NONAME ) );
+ String aNoName( SfxResId(STR_NONAME).toString() );
sal_uInt16 nNo = 1;
String aNo( aNoName );
aNoName += String::CreateFromInt32( nNo );
@@ -180,7 +180,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem
{
if ( pStyle->HasClearParentSupport() )
// the base template can be set to NULL
- aBaseLb.InsertEntry( String( SfxResId( STR_NONE ) ) );
+ aBaseLb.InsertEntry( SfxResId(STR_NONE).toString() );
SfxStyleSheetBase* pPoolStyle = pPool->First();
@@ -482,11 +482,11 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet& /*rAttrSet*/ )
pStyle->SetParent( aParent );
if ( !aParent.Len() )
- aBaseLb.SelectEntry( String( SfxResId( STR_NONE ) ) );
+ aBaseLb.SelectEntry( SfxResId(STR_NONE).toString() );
else
aBaseLb.SelectEntry( aParent );
- if ( String( SfxResId( STR_STANDARD ) ) == aName )
+ if ( SfxResId(STR_STANDARD).toString().equals(aName) )
{
// the default template can not be linked
aBaseFt.Disable();
@@ -612,7 +612,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
{
String aParentEntry( aBaseLb.GetSelectEntry() );
- if ( String( SfxResId( STR_NONE ) ) == aParentEntry || aParentEntry == pStyle->GetName() )
+ if ( SfxResId(STR_NONE).toString().equals(aParentEntry) || aParentEntry == pStyle->GetName() )
aParentEntry.Erase();
if ( pStyle->GetParent() != aParentEntry )
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index 4d27330cce73..3aa284577c46 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -64,7 +64,7 @@ SfxNavigator::SfxNavigator( SfxBindings* pBind ,
nBits )
, pWrapper( pChildWin )
{
- SetText( String( SfxResId( SID_NAVIGATOR ) ) );
+ SetText( SfxResId(SID_NAVIGATOR).toString() );
}
void SfxNavigator::Resize()
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 3ef75e51bb1b..c529a28d5b86 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -88,7 +88,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
- aColBox.SetAccessibleName(SfxResId(FL_COL));
+ aColBox.SetAccessibleName(SfxResId(FL_COL).toString());
SfxStyleSheetBase *pStyle = rPool.First();
while ( pStyle )
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 681d3683bb0a..bfb4bdf9b075 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -119,15 +119,15 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
maCancelBtn ( this, SfxResId( BTN_PASSWD_CANCEL ) ),
maHelpBtn ( this, SfxResId( BTN_PASSWD_HELP ) ),
- maMinLenPwdStr ( SfxResId( STR_PASSWD_MIN_LEN ) ),
- maEmptyPwdStr ( SfxResId( STR_PASSWD_EMPTY ) ),
+ maMinLenPwdStr ( SfxResId( STR_PASSWD_MIN_LEN ).toString() ),
+ maEmptyPwdStr ( SfxResId( STR_PASSWD_EMPTY ).toString() ),
maMainPwdStr ( ),
mnMinLen ( 5 ),
mnExtras ( 0 ),
mbAsciiOnly ( false )
{
- maPasswordED.SetAccessibleName(String(SfxResId(TEXT_PASSWD)));
+ maPasswordED.SetAccessibleName(SfxResId(TEXT_PASSWD).toString());
FreeResource();
// setup layout
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 010002b1840b..2426ec708fe9 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -173,8 +173,8 @@ sal_Bool SfxRecordingFloatWrapper_Impl::QueryClose()
com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() && !xRecorder->getRecordedMacro().isEmpty() )
{
- QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , String( SfxResId( STR_MACRO_LOSS ) ) );
- aBox.SetText( String( SfxResId(STR_CANCEL_RECORDING) ) );
+ QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , SfxResId(STR_MACRO_LOSS).toString() );
+ aBox.SetText( SfxResId(STR_CANCEL_RECORDING).toString() );
bRet = ( aBox.Execute() == RET_YES );
}
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 22efcf333ebb..588608f3f124 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -134,7 +134,7 @@ static bool lcl_IsPasswordCorrect( const String &rPassword )
if (SvPasswordHelper::CompareHashPassword( aPasswordHash, rPassword ))
bRes = true; // password was correct
else
- InfoBox( NULL, String( SfxResId( RID_SFX_INCORRECT_PASSWORD ) ) ).Execute();
+ InfoBox( NULL, SfxResId( RID_SFX_INCORRECT_PASSWORD ).toString() ).Execute();
return bRes;
}
@@ -200,12 +200,12 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const Sfx
m_aOpenReadonlyCB (&rTabPage, SfxResId( OPEN_READONLY_CB ) ),
m_aRecordChangesCB (&rTabPage, SfxResId( RECORD_CHANGES_CB ) ),
m_aChangeProtectionPB (&rTabPage, SfxResId( CHANGE_PROTECTION_PB ) ),
- m_aProtectSTR ( SfxResId( STR_PROTECT ) ),
- m_aUnProtectSTR ( SfxResId( STR_UNPROTECT ) ),
+ m_aProtectSTR ( SfxResId( STR_PROTECT ).toString() ),
+ m_aUnProtectSTR ( SfxResId( STR_UNPROTECT ).toString() ),
m_eRedlingMode ( RL_NONE ),
m_bOrigPasswordIsConfirmed ( false ),
m_bNewPasswordIsValid ( false ),
- m_aEndRedliningWarning ( SfxResId( STR_END_REDLINING_WARNING ) ),
+ m_aEndRedliningWarning ( SfxResId( STR_END_REDLINING_WARNING ).toString() ),
m_bEndRedliningWarningDone ( false )
{
m_aChangeProtectionPB.SetText( m_aProtectSTR );
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index b84a1bb6f490..ed4edad38128 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -62,7 +62,7 @@ SearchDialog::SearchDialog( Window* pWindow, const ::rtl::OUString& rConfigName
m_aBackwardsBox ( this, SfxResId( CB_BACKWARDS ) ),
m_aFindBtn ( this, SfxResId( PB_FIND ) ),
m_aCancelBtn ( this, SfxResId( PB_CANCELFIND ) ),
- m_sToggleText ( SfxResId( STR_TOGGLE ) ),
+ m_sToggleText ( SfxResId( STR_TOGGLE ).toString() ),
m_sConfigName ( rConfigName ),
m_bIsConstructed ( false )
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 495e90084cc8..5b9e0734fa7b 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -64,7 +64,7 @@ SfxStyleDialog::SfxStyleDialog
{
AddTabPage( ID_TABPAGE_MANAGESTYLES,
- String( SfxResId( STR_TABPAGE_MANAGESTYLES ) ),
+ SfxResId( STR_TABPAGE_MANAGESTYLES ).toString(),
SfxManageStyleSheetPage::Create, 0, sal_False, 0 );
// With new template always set the management page as the current page
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index fe4e8be65a8c..9096f8c06ad4 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -520,7 +520,7 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
aOKBtn.SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) );
aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
aResetBtn.SetClickHdl( LINK( this, SfxTabDialog, ResetHdl ) );
- aResetBtn.SetText( String( SfxResId( STR_RESET ) ) );
+ aResetBtn.SetText( SfxResId( STR_RESET ).toString() );
aTabCtrl.SetActivatePageHdl(
LINK( this, SfxTabDialog, ActivatePageHdl ) );
aTabCtrl.SetDeactivatePageHdl(
@@ -543,8 +543,7 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const String* pUserButtonText )
different behavior than implemented!! */
if ( bFmtFlag )
{
- String aStd( SfxResId( STR_STANDARD_SHORTCUT ) );
- aBaseFmtBtn.SetText( aStd );
+ aBaseFmtBtn.SetText( SfxResId( STR_STANDARD_SHORTCUT ).toString() );
aBaseFmtBtn.SetClickHdl( LINK( this, SfxTabDialog, BaseFmtHdl ) );
aBaseFmtBtn.SetHelpId( HID_TABDLG_STANDARD_BTN );
@@ -632,7 +631,7 @@ void SfxTabDialog::EnableApplyButton(sal_Bool bEnable)
pImpl->pApplyButton = new PushButton( this );
// in the z-order, the apply button should be behind the ok button, thus appearing at the right side of it
pImpl->pApplyButton->SetZOrder(&aOKBtn, WINDOW_ZORDER_BEHIND);
- pImpl->pApplyButton->SetText( String( SfxResId( STR_APPLY ) ) );
+ pImpl->pApplyButton->SetText( SfxResId( STR_APPLY ).toString() );
pImpl->pApplyButton->Show();
pImpl->pApplyButton->SetHelpId( HID_TABDLG_APPLY_BTN );
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 5adaedb0268b..0ebdcb366372 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -215,7 +215,7 @@ namespace sfx2
,m_aPaneController( m_aTaskPane, *this )
{
m_aTaskPane.Show();
- SetText( String( SfxResId( SID_TASKPANE ) ) );
+ SetText( SfxResId( SID_TASKPANE ).toString() );
}
//------------------------------------------------------------------------------------------------------------------
@@ -943,7 +943,7 @@ namespace sfx2
{
m_rDockingWindow.ResetToolBox();
m_nViewMenuID = m_rDockingWindow.AddDropDownToolBoxItem(
- String( SfxResId( STR_SFX_TASK_PANE_VIEW ) ),
+ SfxResId( STR_SFX_TASK_PANE_VIEW ).toString(),
HID_TASKPANE_VIEW_MENU,
LINK( this, TaskPaneController_Impl, OnToolboxClicked )
);
@@ -959,7 +959,7 @@ namespace sfx2
m_aPanelRepository.push_back( PanelDescriptor( pPanel ) );
}
- SetDefaultTitle( String( SfxResId( STR_SFX_TASKS ) ) );
+ SetDefaultTitle( SfxResId( STR_SFX_TASKS ).toString() );
}
//------------------------------------------------------------------------------------------------------------------
@@ -1259,12 +1259,12 @@ namespace sfx2
if ( m_rDockingWindow.IsFloatingMode() )
pMenu->InsertItem(
MID_LOCK_TASK_PANEL,
- String( SfxResId( STR_SFX_DOCK ) )
+ SfxResId( STR_SFX_DOCK ).toString()
);
else
pMenu->InsertItem(
MID_UNLOCK_TASK_PANEL,
- String( SfxResId( STR_SFX_UNDOCK ) )
+ SfxResId( STR_SFX_UNDOCK ).toString()
);
pMenu->RemoveDisabledEntries( sal_False, sal_False );
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 75bace87997b..5bfc0028f355 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -789,7 +789,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
bHierarchical ( sal_False ),
bBindingUpdate ( sal_True )
{
- aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
+ aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST).toString());
aFmtLb.SetHelpId( HID_TEMPLATE_FMT );
aFilterLb.SetHelpId( HID_TEMPLATE_FILTER );
aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION );
@@ -1278,7 +1278,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
aFilterLb.SetUpdateMode(sal_False);
aFilterLb.Clear();
//insert hierarchical at the beginning
- sal_uInt16 nPos = aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)), 0);
+ sal_uInt16 nPos = aFilterLb.InsertEntry(SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString(), 0);
aFilterLb.SetEntryData( nPos, (void*)(sal_uIntPtr)SFXSTYLEBIT_ALL );
const SfxStyleFilter& rFilter = pItem->GetFilterList();
for( size_t i = 0; i < rFilter.size(); ++i)
@@ -1300,7 +1300,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
// if the tree view again, select family hierarchy
if(pTreeBox)
- aFilterLb.SelectEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)));
+ aFilterLb.SelectEntry(SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString());
// show maximum 12 entries
aFilterLb.SetDropDownLineCount( MAX_FILTER_ENTRIES );
@@ -1751,7 +1751,7 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
// Handler der Listbox der Filter
IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
{
- if ( pBox->GetSelectEntry() == String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)) )
+ if ( SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString().equals(pBox->GetSelectEntry()) )
{
if ( !bHierarchical )
{
@@ -1778,7 +1778,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
pTreeBox->SetIndent(10);
FillTreeBox();
SelectStyle(aSelectEntry);
- pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
+ pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST).toString());
pTreeBox->Show();
}
}
@@ -2041,8 +2041,8 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
{
String aMsg;
if ( pStyle->IsUsed() )
- aMsg = String( SfxResId( STR_DELETE_STYLE_USED ) );
- aMsg += String ( SfxResId( STR_DELETE_STYLE ) );
+ aMsg = SfxResId(STR_DELETE_STYLE_USED).toString();
+ aMsg += SfxResId(STR_DELETE_STYLE).toString();
aMsg.SearchAndReplaceAscii( "$1", aTemplName );
#if defined UNX
QueryBox aBox( SFX_APP()->GetTopWindow(), WB_YES_NO | WB_DEF_NO, aMsg );
@@ -2685,7 +2685,7 @@ IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, CancelHdl, Button *, pButton )
IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, NewHdl, Button *, pButton )
{
(void)pButton; //unused
- aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ aCancelBtn.SetText( SfxResId(STR_CLOSE).toString() );
SfxCommonTemplateDialog_Impl::NewHdl( NULL );
return 0;
}
@@ -2696,7 +2696,7 @@ IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, NewHdl, Button *, pButton )
IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, ChangeHdl, Button *, pButton )
{
(void)pButton; //unused
- aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ aCancelBtn.SetText( SfxResId(STR_CLOSE).toString() );
SfxCommonTemplateDialog_Impl::EditHdl( NULL );
return 0;
}
@@ -2717,7 +2717,7 @@ IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, DelHdl, Button *, pButton )
IMPL_LINK( SfxTemplateCatalog_Impl, OrgHdl, Button *, pButton )
{
(void)pButton; //unused
- aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ aCancelBtn.SetText( SfxResId(STR_CLOSE).toString() );
SfxDocumentTemplates aTemplates;
aTemplates.Construct();
SfxTemplateOrganizeDlg* pDlg = new SfxTemplateOrganizeDlg( pReal, &aTemplates );
@@ -2826,7 +2826,7 @@ void SfxTemplateCatalog_Impl::ClearFamilyList()
void SfxTemplateCatalog_Impl::PrepareDeleteAction()
{
aDelBtn.Disable();
- aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ aCancelBtn.SetText( SfxResId(STR_CLOSE).toString() );
}
diff --git a/sfx2/source/doc/QuerySaveDocument.cxx b/sfx2/source/doc/QuerySaveDocument.cxx
index 7ac2b6771809..1f355c2d8219 100644
--- a/sfx2/source/doc/QuerySaveDocument.cxx
+++ b/sfx2/source/doc/QuerySaveDocument.cxx
@@ -41,12 +41,12 @@ short ExecuteQuerySaveDocument(Window* _pParent,const String& _rTitle)
{ // don't block Desktop::terminate() if there's no user to ask
return RET_NO;
}
- String aText( SfxResId( STR_QUERY_SAVE_DOCUMENT ) );
+ String aText( SfxResId(STR_QUERY_SAVE_DOCUMENT).toString() );
aText.SearchAndReplace( DEFINE_CONST_UNICODE( "$(DOC)" ),
_rTitle );
QueryBox aQBox( _pParent, WB_YES_NO_CANCEL | WB_DEF_YES, aText );
- aQBox.SetButtonText( BUTTONID_NO, SfxResId( STR_NOSAVEANDCLOSE ) );
- aQBox.SetButtonText( BUTTONID_YES, SfxResId( STR_SAVEDOC ) );
+ aQBox.SetButtonText( BUTTONID_NO, SfxResId(STR_NOSAVEANDCLOSE).toString() );
+ aQBox.SetButtonText( BUTTONID_YES, SfxResId(STR_SAVEDOC).toString() );
return aQBox.Execute();
}
// -----------------------------------------------------------------------------
diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx
index 2b616182153d..75d3c2534efd 100644
--- a/sfx2/source/doc/doctdlg.cxx
+++ b/sfx2/source/doc/doctdlg.cxx
@@ -111,7 +111,7 @@ void SfxDocumentTemplateDlg::Init()
for(sal_uInt16 i = 0; i < nCount; ++i)
aRegionLb.InsertEntry(pTemplates->GetFullRegionName(i));
if(!nCount)
- aRegionLb.InsertEntry(String(SfxResId(STR_STANDARD)));
+ aRegionLb.InsertEntry(SfxResId(STR_STANDARD).toString());
aRegionLb.SelectEntryPos(0);
if(nCount)
{
@@ -145,7 +145,7 @@ IMPL_LINK( SfxDocumentTemplateDlg, OrganizeHdl, Button *, pButton )
aRegionLb.SetUpdateMode( sal_True );
aRegionLb.Invalidate();
aRegionLb.Update();
- aCancelBt.SetText(String(SfxResId(STR_CLOSE)));
+ aCancelBt.SetText(SfxResId(STR_CLOSE).toString());
}
else if(RET_EDIT_STYLE == nRet)
EndDialog(RET_CANCEL);
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index ecceed91d4c6..85c5cd1aed61 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2419,7 +2419,7 @@ WaitWindow_Impl::WaitWindow_Impl()
{
Rectangle aRect = Rectangle( 0, 0, 300, 30000 );
_nTextStyle = TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER | TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE;
- _aText = String( SfxResId( RID_CNT_STR_WAITING ) );
+ _aText = SfxResId( RID_CNT_STR_WAITING ).toString();
_aRect = GetTextRect( aRect, _aText, _nTextStyle );
aRect = _aRect;
aRect.Right() += 2*X_OFFSET;
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index a1eded4f2b52..b4e604fb7f15 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -329,7 +329,7 @@ sal_Bool QueryDelete_Impl(Window *pParent, // Parent to QueryBox
*/
{
SfxResId aResId( nId );
- String aEntryText( aResId );
+ String aEntryText( aResId.toString() );
aEntryText.SearchAndReplaceAscii( "$1", rTemplateName );
QueryBox aBox( pParent, WB_YES_NO | WB_DEF_NO, aEntryText );
return RET_NO != aBox.Execute();
@@ -346,12 +346,12 @@ void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = s
{
if ( bFolder )
{
- String aText( SfxResId( STR_ERROR_DELETE_TEMPLATE_DIR ) );
+ rtl::OUString aText(SfxResId(STR_ERROR_DELETE_TEMPLATE_DIR).toString());
ErrorBox( pParent, WB_OK, aText ).Execute();
}
else
{
- String aText( SfxResId( STR_ERROR_DELETE_TEMPLATE ) );
+ String aText( SfxResId(STR_ERROR_DELETE_TEMPLATE).toString() );
aText.SearchAndReplaceAscii( "$1", rName );
ErrorBox( pParent, WB_OK, aText ).Execute();
}
@@ -594,7 +594,7 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
else if ( bCopy )
{
// the template organizer always tries copy after the move, so no error is required for move case
- String aText( SfxResId( bCopy ? STR_ERROR_COPY_TEMPLATE : STR_ERROR_MOVE_TEMPLATE ) );
+ String aText( SfxResId( bCopy ? STR_ERROR_COPY_TEMPLATE : STR_ERROR_MOVE_TEMPLATE ).toString() );
aText.SearchAndReplaceAscii( "$1",
( (SvTreeListBox *)pSourceBox )->GetEntryText( pSource ) );
ErrorBox( this, WB_OK, aText ).Execute();
@@ -1499,10 +1499,10 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool bOpen, const String& rFileNam
pFileDlg = new sfx2::FileDialogHelper( nDialogType, 0L );
// add "All" filter
- pFileDlg->AddFilter( String( SfxResId( STR_SFX_FILTERNAME_ALL ) ),
+ pFileDlg->AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL).toString(),
DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) );
// add template filter
- String sFilterName( SfxResId( STR_TEMPLATE_FILTER ) );
+ String sFilterName( SfxResId(STR_TEMPLATE_FILTER).toString() );
String sFilterExt;
// add filters of modules which are installed
SvtModuleOptions aModuleOpt;
@@ -1594,11 +1594,11 @@ String SfxOrganizeDlg_Impl::GetPath_Impl( sal_Bool bOpen, const String& rFileNam
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, SFXWB_MULTISELECTION );
// add "All" filter
- pFileDlg->AddFilter( String( SfxResId( STR_SFX_FILTERNAME_ALL ) ),
+ pFileDlg->AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL).toString(),
DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) );
// add template filter
- String sFilterName( SfxResId( STR_TEMPLATE_FILTER ) );
+ String sFilterName( SfxResId(STR_TEMPLATE_FILTER).toString() );
String sFilterExt;
// add filters of modules which are installed
SvtModuleOptions aModuleOpt;
@@ -2211,20 +2211,20 @@ IMPL_LINK( SfxOrganizeDlg_Impl, AddFiles_Impl, Button *, pButton )
static String sConfigExt( DEFINE_CONST_UNICODE( "*.cfg" ) );
static String sBasicExt( DEFINE_CONST_UNICODE( "*.sbl" ) );
- String sFilterName( SfxResId( RID_STR_FILTCONFIG ) );
+ String sFilterName( SfxResId(RID_STR_FILTCONFIG).toString() );
sFilterName += sOpenBracket;
sFilterName += sConfigExt;
sFilterName += sCloseBracket;
pFileDlg->AddFilter( sFilterName, sConfigExt );
- sFilterName = String( SfxResId( RID_STR_FILTBASIC ) );
+ sFilterName = SfxResId(RID_STR_FILTBASIC).toString();
sFilterName += sOpenBracket;
sFilterName += sBasicExt;
sFilterName += sCloseBracket;
pFileDlg->AddFilter( sFilterName, sBasicExt );
// set "All" filter as current
- pFileDlg->SetCurrentFilter( String( SfxResId( STR_SFX_FILTERNAME_ALL ) ) );
+ pFileDlg->SetCurrentFilter( SfxResId(STR_SFX_FILTERNAME_ALL).toString() );
if ( aLastDir.Len() )
pFileDlg->SetDisplayDirectory( aLastDir );
@@ -2262,7 +2262,7 @@ IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ImportHdl)
if ( aPath.Len() && !aMgr.CopyTo( m_nRegion, m_nIndex, aPath ) )
{
- String aText( SfxResId( STR_ERROR_COPY_TEMPLATE ) );
+ String aText( SfxResId(STR_ERROR_COPY_TEMPLATE).toString() );
aText.SearchAndReplaceAscii( "$1", aPath );
ErrorBox( pDialog, WB_OK, aText ).Execute();
}
@@ -2294,7 +2294,7 @@ IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ExportHdl)
String aPath = String( aPaths.getArray()[0] );
if ( aPath.Len() && !aMgr.CopyFrom( pFocusBox, m_nRegion, m_nIndex, aPath ) )
{
- String aText( SfxResId( STR_ERROR_COPY_TEMPLATE ) );
+ String aText( SfxResId(STR_ERROR_COPY_TEMPLATE).toString() );
aText.SearchAndReplaceAscii( "$1", aPath );
ErrorBox( pDialog, WB_OK, aText ).Execute();
}
@@ -2312,7 +2312,7 @@ IMPL_LINK_NOARG(SfxOrganizeDlg_Impl, ExportHdl)
String aPath = aPathObj.GetMainURL( INetURLObject::NO_DECODE );
if ( aPath.Len() && !aMgr.CopyFrom( pFocusBox, m_nRegion, m_nIndex, aPath ) )
{
- String aText( SfxResId( STR_ERROR_COPY_TEMPLATE ) );
+ String aText( SfxResId(STR_ERROR_COPY_TEMPLATE).toString() );
aText.SearchAndReplaceAscii( "$1", aPath );
ErrorBox( pDialog, WB_OK, aText ).Execute();
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index a9fdd5bf673f..25f08a21d4e6 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -647,9 +647,8 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
&& GetMediaDescr().find( aVersionCommentString ) == GetMediaDescr().end() )
{
// notify the user that SaveAs is going to be done
- String aString( SfxResId( STR_NEW_FILENAME_SAVE ) );
Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
- QueryBox aMessageBox( pWin, WB_OK_CANCEL | WB_DEF_OK, aString );
+ QueryBox aMessageBox( pWin, WB_OK_CANCEL | WB_DEF_OK, SfxResId(STR_NEW_FILENAME_SAVE).toString() );
if ( aMessageBox.Execute() == RET_OK )
nResult = STATUS_SAVEAS;
else
@@ -897,10 +896,10 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
if ( xControlAccess.is() )
{
- ::rtl::OUString aCtrlText = String( SfxResId( STR_EXPORTBUTTON ) );
+ ::rtl::OUString aCtrlText = SfxResId(STR_EXPORTBUTTON).toString();
xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, aCtrlText );
- aCtrlText = ::rtl::OUString( String( SfxResId( STR_LABEL_FILEFORMAT ) ) );
+ aCtrlText = SfxResId(STR_LABEL_FILEFORMAT).toString();
xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER_LABEL, aCtrlText );
}
}
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 2696882f154d..870e9068c306 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -303,7 +303,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox )
sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
- if (aSel.CompareIgnoreCaseToAscii( String(SfxResId(STR_STANDARD)) )==COMPARE_EQUAL)
+ if (aSel.CompareIgnoreCaseToAscii( SfxResId(STR_STANDARD).toString() )==COMPARE_EQUAL)
aTemplateLb.InsertEntry(aNone);
for (sal_uInt16 i = 0; i < nCount; ++i)
aTemplateLb.InsertEntry(aTemplates.GetName(nRegion, i));
@@ -391,7 +391,7 @@ sal_uInt16 SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
sal_uInt16 nc=aSel.Search('(');
if (nc-1&&nc!=STRING_NOTFOUND)
aSel.Erase(nc-1);
- if (aSel.CompareIgnoreCaseToAscii(String(SfxResId(STR_STANDARD)))!=COMPARE_EQUAL)
+ if (aSel.CompareIgnoreCaseToAscii(SfxResId(STR_STANDARD).toString())!=COMPARE_EQUAL)
nEntry++;
if (!aTemplateLb.GetSelectEntryCount())
nEntry=0;
@@ -479,8 +479,8 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
aCancelBt( pAntiImplP, SfxResId( BT_CANCEL ) ),
aHelpBt( pAntiImplP, SfxResId( BT_HELP ) ),
pMoreBt( new MoreButton( pAntiImplP, SfxResId( BT_MORE ) ) ),
- aNone( SfxResId(STR_NONE) ),
- sLoadTemplate( SfxResId(STR_LOAD_TEMPLATE)),
+ aNone(SfxResId(STR_NONE).toString()),
+ sLoadTemplate(SfxResId(STR_LOAD_TEMPLATE).toString()),
nFlags(nFl),
pAntiImpl( pAntiImplP )
{
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 398cf85808f3..8080ac39731f 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -403,7 +403,7 @@ void SfxObjectShell::GetContent(String &rText,
if ( nTextResId )
{
- rText = String(SfxResId(nTextResId));
+ rText = SfxResId(nTextResId).toString();
rClosedBitmap = Bitmap(SfxResId(nClosedBitmapResId));
rOpenedBitmap = Bitmap(SfxResId(nOpenedBitmapResId));
}
@@ -679,7 +679,7 @@ sal_Bool SfxObjectShell::Print
const sal_uInt16 nXIndent = 200;
sal_uInt16 nYIndent = 200;
Point aOutPos(nXIndent, nYIndent);
- String aHeader(SfxResId(STR_PRINT_STYLES_HEADER));
+ String aHeader(SfxResId(STR_PRINT_STYLES_HEADER).toString());
if ( pObjectName )
aHeader += *pObjectName;
else
@@ -940,7 +940,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
bLoad = sal_True;
else if ( bCanUpdateFromTemplate == document::UpdateDocMode::ACCORDING_TO_CONFIG )
{
- String sMessage( SfxResId( STR_QRYTEMPL_MESSAGE ) );
+ String sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString() );
sMessage.SearchAndReplace( String::CreateFromAscii("$(ARG1)"), aTemplName );
sfx2::QueryTemplateBox aBox( GetDialogParent(), sMessage );
if ( RET_YES == aBox.Execute() )
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 7b4475af6753..d9305809c8a1 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -950,7 +950,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
bool bMediumRO = IsReadOnlyMedium();
if ( !bMediumRO && GetMedium() && bAllowSave )
rSet.Put(SfxStringItem(
- nWhich, String(SfxResId(STR_SAVEDOC))));
+ nWhich, SfxResId(STR_SAVEDOC).toString()));
else
rSet.DisableItem(nWhich);
}
@@ -977,7 +977,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
if ( pDoc->GetFlags() & SFXOBJECTSHELL_DONTCLOSE )
rSet.DisableItem(nWhich);
else
- rSet.Put(SfxStringItem(nWhich, String(SfxResId(STR_CLOSEDOC))));
+ rSet.Put(SfxStringItem(nWhich, SfxResId(STR_CLOSEDOC).toString()));
break;
}
@@ -991,7 +991,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
if ( /*!pCombinedFilters ||*/ !GetMedium() )
rSet.DisableItem( nWhich );
else
- rSet.Put( SfxStringItem( nWhich, String( SfxResId( STR_SAVEASDOC ) ) ) );
+ rSet.Put( SfxStringItem( nWhich, SfxResId(STR_SAVEASDOC).toString() ) );
break;
}
@@ -1386,7 +1386,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent )
}
else
{
- ErrorBox( NULL, WB_OK, SfxResId( STR_XMLSEC_ODF12_EXPECTED ) ).Execute();
+ ErrorBox( NULL, WB_OK, SfxResId(STR_XMLSEC_ODF12_EXPECTED).toString() ).Execute();
return;
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 3645e8a29aea..d3f713307a78 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -494,7 +494,7 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
// empty documents always get their macros from the user, so there is no reason to restrict access
pImp->aMacroMode.allowMacroExecution();
if ( SFX_CREATE_MODE_EMBEDDED == eCreateMode )
- SetTitle( String( SfxResId( STR_NONAME ) ));
+ SetTitle(SfxResId(STR_NONAME).toString());
uno::Reference< frame::XModel > xModel ( GetModel(), uno::UNO_QUERY );
if ( xModel.is() )
@@ -697,7 +697,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
// Name vor ConvertFrom setzen, damit GetSbxObject() schon funktioniert
bHasName = sal_True;
- SetName( SfxResId( STR_NONAME ) );
+ SetName( SfxResId(STR_NONAME).toString() );
if( !bHasStorage )
pMedium->GetInStream();
@@ -2894,7 +2894,7 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, Windo
if ( eOption != -1 && SvtSecurityOptions().IsOptionSet( eOption ) )
{
- String sMessage( SfxResId( STR_HIDDENINFO_CONTAINS ) );
+ String sMessage( SfxResId(STR_HIDDENINFO_CONTAINS).toString() );
sal_uInt16 nWantedStates = HIDDENINFORMATION_RECORDEDCHANGES | HIDDENINFORMATION_NOTES;
if ( eFact != WhenPrinting )
nWantedStates |= HIDDENINFORMATION_DOCUMENTVERSIONS;
@@ -2903,19 +2903,19 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, Windo
if ( ( nStates & HIDDENINFORMATION_RECORDEDCHANGES ) == HIDDENINFORMATION_RECORDEDCHANGES )
{
- sMessage += String( SfxResId( STR_HIDDENINFO_RECORDCHANGES ) );
+ sMessage += SfxResId(STR_HIDDENINFO_RECORDCHANGES).toString();
sMessage += '\n';
bWarning = true;
}
if ( ( nStates & HIDDENINFORMATION_NOTES ) == HIDDENINFORMATION_NOTES )
{
- sMessage += String( SfxResId( STR_HIDDENINFO_NOTES ) );
+ sMessage += SfxResId(STR_HIDDENINFO_NOTES).toString();
sMessage += '\n';
bWarning = true;
}
if ( ( nStates & HIDDENINFORMATION_DOCUMENTVERSIONS ) == HIDDENINFORMATION_DOCUMENTVERSIONS )
{
- sMessage += String( SfxResId( STR_HIDDENINFO_DOCVERSIONS ) );
+ sMessage += SfxResId(STR_HIDDENINFO_DOCVERSIONS).toString();
sMessage += '\n';
bWarning = true;
}
@@ -2923,7 +2923,7 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, Windo
if ( bWarning )
{
sMessage += '\n';
- sMessage += String( SfxResId( nResId ) );
+ sMessage += SfxResId(nResId).toString();
WarningBox aWBox( pParent, WB_YES_NO | WB_DEF_NO, sMessage );
nRet = aWBox.Execute();
}
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index b5182ac31d73..a4ec4404cdf1 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -381,7 +381,7 @@ void SfxDocumentInfoObject_Impl::Reset(uno::Reference<document::XDocumentPropert
names.push_back(props[i].Name);
}
const ::rtl::OUString sInfo(
- String( SfxResId( STR_DOCINFO_INFOFIELD ) ));
+ SfxResId(STR_DOCINFO_INFOFIELD).toString());
for (sal_Int32 i = oldLength; i < FOUR; ++i) {
::rtl::OUString sName(sInfo);
sal_Int32 idx = sName.indexOfAsciiL("%1", 2);
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 15a7399e14dc..a054c92c7599 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -651,7 +651,7 @@ sal_uInt16 SfxObjectShell::PrepareClose
const SfxPoolItem *pPoolItem;
if ( IsSaveVersionOnClose() )
{
- SfxStringItem aItem( SID_DOCINFO_COMMENTS, String( SfxResId( STR_AUTOMATICVERSION ) ) );
+ SfxStringItem aItem( SID_DOCINFO_COMMENTS, SfxResId(STR_AUTOMATICVERSION).toString() );
SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, 0 };
pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
diff --git a/sfx2/source/doc/querytemplate.cxx b/sfx2/source/doc/querytemplate.cxx
index 8bea8714e7d5..b5ce118c659e 100644
--- a/sfx2/source/doc/querytemplate.cxx
+++ b/sfx2/source/doc/querytemplate.cxx
@@ -33,9 +33,9 @@ QueryTemplateBox::QueryTemplateBox( Window* pParent, const String& rMessage ) :
SetImage( QueryBox::GetStandardImage() );
SetHelpId( HID_QUERY_LOAD_TEMPLATE );
- AddButton( String( SfxResId( STR_QRYTEMPL_UPDATE_BTN ) ), RET_YES,
+ AddButton( SfxResId( STR_QRYTEMPL_UPDATE_BTN ).toString(), RET_YES,
BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
- AddButton( String( SfxResId( STR_QRYTEMPL_KEEP_BTN ) ), RET_NO, BUTTONDIALOG_CANCELBUTTON );
+ AddButton( SfxResId(STR_QRYTEMPL_KEEP_BTN).toString(), RET_NO, BUTTONDIALOG_CANCELBUTTON );
}
} // end of namespace sfx2
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index be44438cc3a3..4d40e3b894c8 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3795,24 +3795,24 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl
}
}
}
- catch (ucb::ContentCreationException &)
+ catch (const ucb::ContentCreationException &)
{
}
- catch (ucb::CommandAbortedException &)
+ catch (const ucb::CommandAbortedException &)
{
}
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pRepairedDocItem, SfxBoolItem, SID_REPAIRPACKAGE, sal_False );
if ( pRepairedDocItem && pRepairedDocItem->GetValue() )
- aResult += String( SfxResId(STR_REPAIREDDOCUMENT) );
+ aResult += SfxResId(STR_REPAIREDDOCUMENT).toString();
}
if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (pMedium && pMedium->IsReadOnly()) )
- aResult += ::rtl::OUString( String( SfxResId(STR_READONLY) ) );
+ aResult += SfxResId(STR_READONLY).toString();
else if ( m_pData->m_pObjectShell->IsDocShared() )
- aResult += ::rtl::OUString( String( SfxResId(STR_SHARED) ) );
+ aResult += SfxResId(STR_SHARED).toString();
if ( m_pData->m_pObjectShell->GetDocumentSignatureState() == SIGNATURESTATE_SIGNATURES_OK )
- aResult += String( SfxResId( RID_XMLSEC_DOCUMENTSIGNED ) );
+ aResult += SfxResId(RID_XMLSEC_DOCUMENTSIGNED).toString();
}
return aResult;
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index 3d533b01ab2a..980ae1fa9783 100644
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -143,7 +143,7 @@ struct StringList_Impl : private Resource
: Resource( rErrIdP ),aResId(nId, *rErrIdP.GetResMgr()){}
~StringList_Impl() { FreeResource(); }
- String GetString(){ return String( aResId ); }
+ String GetString(){ return aResId.toString(); }
operator sal_Bool(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
};
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 6cd43caf645c..18558297b860 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -220,14 +220,14 @@ void SfxMenuControl::StateChanged
String aStr( ((const SfxStringItem*)pState)->GetValue() );
if ( aStr.CompareToAscii("($1)",4) == COMPARE_EQUAL )
{
- String aEntry(SfxResId(STR_UPDATEDOC));
+ String aEntry(SfxResId(STR_UPDATEDOC).toString());
aEntry += ' ';
aEntry += aStr.Copy(4);
aStr = aEntry;
}
else if ( aStr.CompareToAscii("($2)",4) == COMPARE_EQUAL )
{
- String aEntry(SfxResId(STR_CLOSEDOC_ANDRETURN));
+ String aEntry(SfxResId(STR_CLOSEDOC_ANDRETURN).toString());
aEntry += aStr.Copy(4);
aStr = aEntry;
}
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index c9a66e748084..f997c6fbf404 100644
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -218,16 +218,16 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu )
}
else // nNumSynonyms == 0
{
- const String aItemText( SfxResId( STR_MENU_NO_SYNONYM_FOUND ) );
+ const rtl::OUString aItemText( SfxResId(STR_MENU_NO_SYNONYM_FOUND).toString() );
pThesSubMenu->InsertItem( 1, aItemText, MIB_NOSELECT );
}
pThesSubMenu->InsertSeparator();
- const String sThesaurus( SfxResId( STR_MENU_THESAURUS ) );
+ const rtl::OUString sThesaurus( SfxResId(STR_MENU_THESAURUS).toString() );
pThesSubMenu->InsertItem( 100, sThesaurus );
pThesSubMenu->SetItemCommand( 100, ::rtl::OUString(".uno:ThesaurusDialog") );
pSVMenu->InsertSeparator();
- const String sSynonyms( SfxResId( STR_MENU_SYNONYMS ) );
+ const rtl::OUString sSynonyms( SfxResId(STR_MENU_SYNONYMS).toString() );
pSVMenu->InsertItem( SID_THES, sSynonyms );
pSVMenu->SetPopupMenu( SID_THES, pThesSubMenu );
}
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 1fa371f56a71..c2c99b2acd50 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -792,7 +792,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
if ( pAddonMenu && pAddonMenu->GetItemCount() > 0 )
{
sal_uInt16 nItemCount = pMenu->GetItemCount();
- String aAddonsTitle( SfxResId( STR_MENU_ADDONS ));
+ rtl::OUString aAddonsTitle(SfxResId(STR_MENU_ADDONS).toString());
if ( nItemCount > 0 && pMenu->GetItemType( nItemCount-1 ) != MENUITEM_SEPARATOR )
pMenu->InsertSeparator();
pMenu->InsertItem( SID_ADDONS, aAddonsTitle );
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index ab1d2248256d..71507cf36ac4 100644
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -751,7 +751,7 @@ void SfxOrganizeMgr::SaveAll(Window *pParent)
{
if(!pTemplates->DeleteObjectShell(i, j))
{
- String aText = String(SfxResId(STR_ERROR_SAVE_TEMPLATE));
+ String aText = SfxResId(STR_ERROR_SAVE_TEMPLATE).toString();
aText += pTemplates->GetName(i, j);
ErrorBox aBox(pParent,
WinBits(WB_OK_CANCEL | WB_DEF_CANCEL),
@@ -768,7 +768,7 @@ void SfxOrganizeMgr::SaveAll(Window *pParent)
_FileListEntry *pEntry = (*pImpl->pDocList)[i];
if(!pEntry->DeleteObjectShell())
{
- String aText(SfxResId(STR_ERROR_SAVE_TEMPLATE));
+ String aText(SfxResId(STR_ERROR_SAVE_TEMPLATE).toString());
aText += pEntry->aBaseName;
ErrorBox aBox(pParent, WinBits(WB_OK_CANCEL | WB_DEF_CANCEL), aText);
if(RET_CANCEL == aBox.Execute())
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 810b25071ae1..77eb34cd0672 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -222,7 +222,7 @@ SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
pPage ( NULL )
{
- SetText( SfxResId( STR_PRINT_OPTIONS_TITLE ) );
+ SetText( SfxResId(STR_PRINT_OPTIONS_TITLE).toString() );
// Insert TabPage
pPage = pViewSh->CreatePrintOptionsPage( this, *pOptions );
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3719ac1c7149..589c6608628d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -995,7 +995,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() )
{
- String aTmp( SvtResId( STR_UNDO ) );
+ String aTmp(SvtResId(STR_UNDO).toString());
aTmp+= pShUndoMgr->GetUndoActionComment(0);
rSet.Put( SfxStringItem( SID_UNDO, aTmp ) );
}
@@ -1004,7 +1004,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() )
{
- String aTmp( SvtResId(STR_REDO) );
+ String aTmp(SvtResId(STR_REDO).toString());
aTmp += pShUndoMgr->GetRedoActionComment(0);
rSet.Put( SfxStringItem( SID_REDO, aTmp ) );
}
@@ -1014,7 +1014,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() &&
pShUndoMgr->CanRepeat(*pTarget) )
{
- String aTmp( SvtResId(STR_REPEAT) );
+ String aTmp(SvtResId(STR_REPEAT).toString());
aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget);
rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) );
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index a8c19a2b0145..909b54eddca4 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -343,7 +343,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
case view::PrintableState_JOB_FAILED :
{
// "real" problem (not simply printing cancelled by user)
- String aMsg( SfxResId( STR_NOSTARTPRINTER ) );
+ rtl::OUString aMsg( SfxResId(STR_NOSTARTPRINTER).toString() );
if ( !m_bApi )
ErrorBox( mpViewShell->GetWindow(), WB_OK | WB_DEF_OK, aMsg ).Execute();
// intentionally no break
@@ -517,21 +517,21 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
bSizeToDoc;
// Message and Flags for page format, summaries changes
- String aMsg;
+ rtl::OUString aMsg;
sal_uInt16 nNewOpt=0;
if( bOriChg && bPgSzChg )
{
- aMsg = String(SfxResId(STR_PRINT_NEWORISIZE));
+ aMsg = SfxResId(STR_PRINT_NEWORISIZE).toString();
nNewOpt = SFX_PRINTER_CHG_ORIENTATION | SFX_PRINTER_CHG_SIZE;
}
else if (bOriChg )
{
- aMsg = String(SfxResId(STR_PRINT_NEWORI));
+ aMsg = SfxResId(STR_PRINT_NEWORI).toString();
nNewOpt = SFX_PRINTER_CHG_ORIENTATION;
}
else if (bPgSzChg)
{
- aMsg = String(SfxResId(STR_PRINT_NEWSIZE));
+ aMsg = SfxResId(STR_PRINT_NEWSIZE).toString();
nNewOpt = SFX_PRINTER_CHG_SIZE;
}
@@ -797,7 +797,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
break;
}
else
- ErrorBox( NULL, WB_OK | WB_DEF_OK, String( SfxResId( STR_NODEFPRINTER ) ) ).Execute();
+ ErrorBox( NULL, WB_OK | WB_DEF_OK, SfxResId(STR_NODEFPRINTER).toString() ).Execute();
}
// FIXME: printer isn't used for printing anymore!
@@ -805,7 +805,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
// if printer is busy, abort printing
if ( !bSilent )
- InfoBox( NULL, String( SfxResId( STR_ERROR_PRINTER_BUSY ) ) ).Execute();
+ InfoBox( NULL, SfxResId(STR_ERROR_PRINTER_BUSY).toString() ).Execute();
rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}