summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-18 21:14:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-21 19:28:59 +0200
commitd666c2f87d56da1f4dd3d421665ac3078c447a17 (patch)
treefb837b5b12955d94c06e1abdb0ccb09ceb901607 /sfx2
parentd3ba63909740262e0cd64648e2eb00096b4626d2 (diff)
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 2155e04d6343638ca9815d394cbc4f78c2b17c3a) drop toString Change-Id: I0f67c8931523bbe90bfbc8cc7d9a5bd523758ee5 (cherry picked from commit 8b1101023f01b2c7478a014b5ead73ada4fd4861) pNameResId is unused Change-Id: Ic1fe6abc7066517187695266c4d1a0888b41ffe7 (cherry picked from commit c2667d7ff558a1b7bf83e694909465f00d1a16f6) Reviewed-on: https://gerrit.libreoffice.org/37843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/doc.hrc8
-rw-r--r--sfx2/source/appl/app.cxx3
-rw-r--r--sfx2/source/appl/appcfg.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/appquit.cxx4
-rw-r--r--sfx2/source/appl/appserv.cxx4
-rw-r--r--sfx2/source/appl/fileobj.cxx2
-rw-r--r--sfx2/source/appl/linkmgr2.cxx4
-rw-r--r--sfx2/source/appl/lnkbase2.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx36
-rw-r--r--sfx2/source/appl/opengrf.cxx2
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/appl/shutdownicon.cxx10
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx11
-rw-r--r--sfx2/source/control/msgpool.cxx6
-rw-r--r--sfx2/source/control/templatedefaultview.cxx4
-rw-r--r--sfx2/source/control/templatelocalview.cxx22
-rw-r--r--sfx2/source/control/templatesearchview.cxx10
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx28
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx18
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx2
-rw-r--r--sfx2/source/dialog/mailmodel.cxx2
-rw-r--r--sfx2/source/dialog/mgetempl.cxx8
-rw-r--r--sfx2/source/dialog/navigat.cxx2
-rw-r--r--sfx2/source/dialog/passwd.cxx6
-rw-r--r--sfx2/source/dialog/recfloat.cxx4
-rw-r--r--sfx2/source/dialog/securitypage.cxx4
-rw-r--r--sfx2/source/dialog/styledlg.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx20
-rw-r--r--sfx2/source/doc/doc.src35
-rw-r--r--sfx2/source/doc/docfac.cxx22
-rw-r--r--sfx2/source/doc/doctempl.cxx4
-rw-r--r--sfx2/source/doc/doctemplates.cxx7
-rw-r--r--sfx2/source/doc/guisaveas.cxx4
-rw-r--r--sfx2/source/doc/new.cxx6
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx8
-rw-r--r--sfx2/source/doc/objserv.cxx8
-rw-r--r--sfx2/source/doc/objstor.cxx14
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/doc/querytemplate.cxx4
-rw-r--r--sfx2/source/doc/saveastemplatedlg.cxx6
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx8
-rw-r--r--sfx2/source/doc/templatedlg.cxx44
-rw-r--r--sfx2/source/sidebar/DeckTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/PanelTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx10
-rw-r--r--sfx2/source/sidebar/TabBar.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx6
-rw-r--r--sfx2/source/view/viewprn.cxx8
52 files changed, 184 insertions, 258 deletions
diff --git a/sfx2/inc/doc.hrc b/sfx2/inc/doc.hrc
index f6ae529b83df..959e5b23e71f 100644
--- a/sfx2/inc/doc.hrc
+++ b/sfx2/inc/doc.hrc
@@ -39,14 +39,6 @@
#define STR_AUTOMATICVERSION (RID_SFX_DOC_START+ 68)
-#define STR_DOCTYPENAME_SW (RID_SFX_DOC_START+ 69)
-#define STR_DOCTYPENAME_SWWEB (RID_SFX_DOC_START+ 70)
-#define STR_DOCTYPENAME_SWGLOB (RID_SFX_DOC_START+ 71)
-#define STR_DOCTYPENAME_SC (RID_SFX_DOC_START+ 72)
-#define STR_DOCTYPENAME_SI (RID_SFX_DOC_START+ 73)
-#define STR_DOCTYPENAME_SD (RID_SFX_DOC_START+ 74)
-#define STR_DOCTYPENAME_MESSAGE (RID_SFX_DOC_START+ 75)
-
#define TEMPLATE_LONG_NAMES_ARY (RID_SFX_DOC_START+ 81)
#define TEMPLATE_SHORT_NAMES_ARY (RID_SFX_DOC_START+ 82)
#define RID_CNT_STR_WAITING (RID_SFX_DOC_START+ 83)
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 7974c56eaf84..174dccd61ee3 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -350,10 +350,9 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame )
ResMgr* SfxApplication::GetSfxResManager()
{
- return SfxResId::GetResMgr();
+ return SfxResMgr::GetResMgr();
}
-
void SfxApplication::SetProgress_Impl
(
SfxProgress *pProgress
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index da421158f497..c539b659e3ca 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -418,7 +418,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
for ( sal_uInt16 nProp = SvtPathOptions::PATH_ADDIN;
nProp <= SvtPathOptions::PATH_WORK; nProp++ )
{
- aNames.InsertValue( nProp, SfxResId(CONFIG_PATH_START + nProp).toString() );
+ aNames.InsertValue( nProp, SfxResId(CONFIG_PATH_START + nProp) );
OUString aValue;
switch ( nProp )
{
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 3681d4cfc80b..ca6901737e27 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -840,7 +840,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
ScopedVclPtrInstance<MessageDialog> aSecurityWarningBox(pWindow,
SfxResId(STR_SECURITY_WARNING_NO_HYPERLINKS),
VclMessageType::Warning);
- aSecurityWarningBox->SetText( SfxResId(RID_SECURITY_WARNING_TITLE).toString() );
+ aSecurityWarningBox->SetText( SfxResId(RID_SECURITY_WARNING_TITLE) );
aSecurityWarningBox->Execute();
return;
}
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index b33eb7819964..f71c499bb1fb 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -102,8 +102,8 @@ void SfxApplication::Deinitialize()
// free administration managers
DELETEZ(pImpl->pAppDispat);
- SfxResId::DeleteResMgr();
- SvtResId::DeleteResMgr();
+ SfxResMgr::DeleteResMgr();
+ SvtResMgr::DeleteResMgr();
// from here no SvObjects have to exists
DELETEZ(pImpl->pMatcher);
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 54a503f5b166..d6424c2d06ef 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1029,7 +1029,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
if ( pImpl->nDocModalMode )
rSet.DisableItem(nWhich);
else
- rSet.Put(SfxStringItem(nWhich, SfxResId(STR_QUITAPP).toString()));
+ rSet.Put(SfxStringItem(nWhich, SfxResId(STR_QUITAPP)));
break;
}
@@ -1621,7 +1621,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
SvtModuleOptions aModuleOpt;
if ( !aModuleOpt.IsImpress() )
{
- ScopedVclPtrInstance<MessageDialog>( nullptr, SFX2_RESSTR( STR_MODULENOTINSTALLED ))->Execute();
+ ScopedVclPtrInstance<MessageDialog>( nullptr, SfxResId( STR_MODULENOTINSTALLED ))->Execute();
return;
}
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 75d8038db66a..af5bdb8758b9 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -403,7 +403,7 @@ void SvFileObject::Edit( vcl::Window* /*pParent*/, sfx2::SvBaseLink* pLink, cons
{
nType = FILETYPE_GRF; // If not set already
- SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK).toString());
+ SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK));
aDlg.EnableLink(false);
aDlg.SetPath( sFile, true );
aDlg.SetCurrentFilter( sTmpFilter );
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index c2997297564f..6a27fb4d8e08 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -239,7 +239,7 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
*pType = SfxResId(
( OBJECT_CLIENT_FILE == nObjType || OBJECT_CLIENT_OLE == nObjType )
? RID_SVXSTR_FILELINK
- : RID_SVXSTR_GRAFIKLINK).toString();
+ : RID_SVXSTR_GRAFIKLINK);
}
bRet = true;
}
@@ -307,7 +307,7 @@ void LinkManager::UpdateAllLinks(
if( bAskUpdate )
{
- int nRet = ScopedVclPtrInstance<QueryBox>(pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString())->Execute();
+ int nRet = ScopedVclPtrInstance<QueryBox>(pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ))->Execute();
if( RET_YES != nRet )
{
SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index af60ef3bb9d7..d3aa40b38090 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -496,7 +496,7 @@ bool SvBaseLink::ExecuteEdit( const OUString& _rNewName )
sfx2::LinkManager::GetDisplayNames( this, &sApp, &sTopic, &sItem );
if( nObjType == OBJECT_CLIENT_DDE )
{
- sError = SFX2_RESSTR(STR_DDE_ERROR);
+ sError = SfxResId(STR_DDE_ERROR);
sal_Int32 nFndPos = sError.indexOf( "%1" );
if( -1 != nFndPos )
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index c3acd7f126b6..1315b2a5bf13 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1865,9 +1865,9 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
aSelectIdle ( "sfx2 appl SfxHelpTextWindow_Impl Select" ),
aIndexOnImage (BitmapEx(BMP_HELP_TOOLBOX_INDEX_ON)),
aIndexOffImage (BitmapEx(BMP_HELP_TOOLBOX_INDEX_OFF)),
- aIndexOnText ( SfxResId( STR_HELP_BUTTON_INDEX_ON ).toString() ),
- aIndexOffText ( SfxResId( STR_HELP_BUTTON_INDEX_OFF ).toString() ),
- aOnStartupText ( SfxResId( RID_HELP_ONSTARTUP_TEXT ).toString() ),
+ aIndexOnText ( SfxResId( STR_HELP_BUTTON_INDEX_ON ) ),
+ aIndexOffText ( SfxResId( STR_HELP_BUTTON_INDEX_OFF ) ),
+ aOnStartupText ( SfxResId( RID_HELP_ONSTARTUP_TEXT ) ),
pHelpWin ( pParent ),
pTextWin ( VclPtr<TextWin_Impl>::Create( this ) ),
pSrchDlg ( nullptr ),
@@ -1891,18 +1891,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, SfxResId( STR_HELP_BUTTON_PREV ).toString() );
+ aToolBox->InsertItem( TBI_BACKWARD, SfxResId( STR_HELP_BUTTON_PREV ) );
aToolBox->SetHelpId( TBI_BACKWARD, HID_HELP_TOOLBOXITEM_BACKWARD );
- aToolBox->InsertItem( TBI_FORWARD, SfxResId( STR_HELP_BUTTON_NEXT ).toString() );
+ aToolBox->InsertItem( TBI_FORWARD, SfxResId( STR_HELP_BUTTON_NEXT ) );
aToolBox->SetHelpId( TBI_FORWARD, HID_HELP_TOOLBOXITEM_FORWARD );
- aToolBox->InsertItem( TBI_START, SfxResId( STR_HELP_BUTTON_START ).toString() );
+ aToolBox->InsertItem( TBI_START, SfxResId( STR_HELP_BUTTON_START ) );
aToolBox->SetHelpId( TBI_START, HID_HELP_TOOLBOXITEM_START );
aToolBox->InsertSeparator();
- aToolBox->InsertItem( TBI_PRINT, SfxResId( STR_HELP_BUTTON_PRINT ).toString() );
+ aToolBox->InsertItem( TBI_PRINT, SfxResId( STR_HELP_BUTTON_PRINT ) );
aToolBox->SetHelpId( TBI_PRINT, HID_HELP_TOOLBOXITEM_PRINT );
- aToolBox->InsertItem( TBI_BOOKMARKS, SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ).toString() );
+ aToolBox->InsertItem( TBI_BOOKMARKS, SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ) );
aToolBox->SetHelpId( TBI_BOOKMARKS, HID_HELP_TOOLBOXITEM_BOOKMARKS );
- aToolBox->InsertItem( TBI_SEARCHDIALOG, SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ).toString() );
+ aToolBox->InsertItem( TBI_SEARCHDIALOG, SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ) );
aToolBox->SetHelpId( TBI_SEARCHDIALOG, HID_HELP_TOOLBOXITEM_SEARCHDIALOG );
InitToolBoxImages();
@@ -2351,40 +2351,40 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
aMenu->SetHelpId( TBI_INDEX, HID_HELP_TOOLBOXITEM_INDEX );
aMenu->InsertSeparator();
aMenu->InsertItem( TBI_BACKWARD,
- SfxResId( STR_HELP_BUTTON_PREV ).toString(),
+ SfxResId( STR_HELP_BUTTON_PREV ),
Image(BitmapEx(BMP_HELP_TOOLBOX_PREV))
);
aMenu->SetHelpId( TBI_BACKWARD, HID_HELP_TOOLBOXITEM_BACKWARD );
aMenu->EnableItem( TBI_BACKWARD, pHelpWin->HasHistoryPredecessor() );
aMenu->InsertItem( TBI_FORWARD,
- SfxResId( STR_HELP_BUTTON_NEXT ).toString(),
+ SfxResId( STR_HELP_BUTTON_NEXT ),
Image(BitmapEx(BMP_HELP_TOOLBOX_NEXT))
);
aMenu->SetHelpId( TBI_FORWARD, HID_HELP_TOOLBOXITEM_FORWARD );
aMenu->EnableItem( TBI_FORWARD, pHelpWin->HasHistorySuccessor() );
aMenu->InsertItem( TBI_START,
- SfxResId( STR_HELP_BUTTON_START ).toString(),
+ SfxResId( STR_HELP_BUTTON_START ),
Image(BitmapEx(BMP_HELP_TOOLBOX_START))
);
aMenu->SetHelpId( TBI_START, HID_HELP_TOOLBOXITEM_START );
aMenu->InsertSeparator();
aMenu->InsertItem( TBI_PRINT,
- SfxResId( STR_HELP_BUTTON_PRINT ).toString(),
+ SfxResId( STR_HELP_BUTTON_PRINT ),
Image(BitmapEx(BMP_HELP_TOOLBOX_PRINT))
);
aMenu->SetHelpId( TBI_PRINT, HID_HELP_TOOLBOXITEM_PRINT );
aMenu->InsertItem( TBI_BOOKMARKS,
- SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ).toString(),
+ SfxResId( STR_HELP_BUTTON_ADDBOOKMARK ),
Image(BitmapEx(BMP_HELP_TOOLBOX_BOOKMARKS))
);
aMenu->SetHelpId( TBI_BOOKMARKS, HID_HELP_TOOLBOXITEM_BOOKMARKS );
aMenu->InsertItem( TBI_SEARCHDIALOG,
- SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ).toString(),
+ SfxResId( STR_HELP_BUTTON_SEARCHDIALOG ),
Image(BitmapEx(BMP_HELP_TOOLBOX_SEARCHDIALOG))
);
aMenu->SetHelpId( TBI_SEARCHDIALOG, HID_HELP_TOOLBOXITEM_SEARCHDIALOG );
aMenu->InsertSeparator();
- aMenu->InsertItem( TBI_SELECTIONMODE, SfxResId( STR_HELP_MENU_TEXT_SELECTION_MODE ).toString() );
+ aMenu->InsertItem( TBI_SELECTIONMODE, SfxResId( STR_HELP_MENU_TEXT_SELECTION_MODE ) );
aMenu->SetHelpId( TBI_SELECTIONMODE, HID_HELP_TEXT_SELECTION_MODE );
URL aURL;
aURL.Complete = ".uno:SelectTextMode";
@@ -2402,7 +2402,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
}
aMenu->InsertSeparator();
aMenu->InsertItem( TBI_COPY,
- SfxResId(STR_HELP_MENU_TEXT_COPY).toString(),
+ SfxResId(STR_HELP_MENU_TEXT_COPY),
Image(BitmapEx(BMP_HELP_TOOLBOX_COPY))
);
aMenu->SetHelpId( TBI_COPY, ".uno:Copy" );
@@ -2411,7 +2411,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if ( bIsDebug )
{
aMenu->InsertSeparator();
- aMenu->InsertItem( TBI_SOURCEVIEW, SfxResId(STR_HELP_BUTTON_SOURCEVIEW).toString() );
+ aMenu->InsertItem( TBI_SOURCEVIEW, SfxResId(STR_HELP_BUTTON_SOURCEVIEW) );
}
if( ! SvtMenuOptions().IsEntryHidingEnabled() )
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 829783c33838..c2871ba641cb 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -156,7 +156,7 @@ short SvxOpenGraphicDialog::Execute()
// could not load?
if ( nFound == USHRT_MAX )
{
- ScopedVclPtrInstance< WarningBox > aWarningBox(nullptr, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ).toString());
+ ScopedVclPtrInstance< WarningBox > aWarningBox(nullptr, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ));
bQuitLoop = aWarningBox->Execute() != RET_RETRY;
}
else
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 7090ae5a7280..a1005ba227f1 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -440,7 +440,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask ,
if (xProps.is())
xProps->setPropertyValue(
"Title",
- makeAny(SfxResId(STR_HELP_WINDOW_TITLE).toString()));
+ makeAny(SfxResId(STR_HELP_WINDOW_TITLE)));
pHelpWindow->setContainerWindow( xParentWindow );
xParentWindow->setVisible(true);
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index c7cc437748fc..9f5f3e917c11 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -309,13 +309,13 @@ OUString ShutdownIcon::GetResString( int id )
::SolarMutexGuard aGuard;
if( ! m_pResMgr )
- m_pResMgr = SfxResId::GetResMgr();
+ m_pResMgr = SfxResMgr::GetResMgr();
ResId aResId( id, *m_pResMgr );
aResId.SetRT( RSC_STRING );
if (!m_pResMgr->IsAvailable(aResId))
return OUString();
- return ResId(id, *m_pResMgr).toString();
+ return ResId(id, *m_pResMgr);
}
@@ -560,7 +560,7 @@ void ShutdownIcon::init()
{
// access resource system and sfx only protected by solarmutex
::SolarMutexGuard aSolarGuard;
- ResMgr *pResMgr = SfxResId::GetResMgr();
+ ResMgr *pResMgr = SfxResMgr::GetResMgr();
::osl::ResettableMutexGuard aGuard( m_aMutex );
m_pResMgr = pResMgr;
@@ -719,11 +719,11 @@ OUString ShutdownIcon::getShortcutName()
#else
OUString aShortcutName( "StarOffice 6.0" );
- ResMgr* pMgr = SfxResId::GetResMgr();
+ ResMgr* pMgr = SfxResMgr::GetResMgr();
if( pMgr )
{
::SolarMutexGuard aGuard;
- aShortcutName = SFX2_RESSTR(STR_QUICKSTART_LNKNAME);
+ aShortcutName = SfxResId(STR_QUICKSTART_LNKNAME);
}
#ifdef _WIN32
aShortcutName += ".lnk";
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index ca8b5623c090..b6fd389d0136 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -501,7 +501,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const std::shared_ptr<const SfxFi
if ( pFilter->GetFilterFlags() & SfxFilterFlags::MUSTINSTALL )
{
// Here could a re-installation be offered
- OUString aText( SfxResId(STR_FILTER_NOT_INSTALLED).toString() );
+ OUString aText( SfxResId(STR_FILTER_NOT_INSTALLED) );
aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() );
ScopedVclPtrInstance< QueryBox > aQuery(nullptr, WB_YES_NO | WB_DEF_YES, aText);
short nRet = aQuery->Execute();
@@ -519,7 +519,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const std::shared_ptr<const SfxFi
}
else if ( pFilter->GetFilterFlags() & SfxFilterFlags::CONSULTSERVICE )
{
- OUString aText( SfxResId(STR_FILTER_CONSULT_SERVICE).toString() );
+ OUString aText( SfxResId(STR_FILTER_CONSULT_SERVICE) );
aText = aText.replaceFirst( "$(FILTER)", pFilter->GetUIName() );
ScopedVclPtrInstance<InfoBox>( nullptr, aText )->Execute();
return false;
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
index fd3774f00767..5fcb091ac888 100644
--- a/sfx2/source/bastyp/sfxresid.cxx
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -21,16 +21,9 @@
#include <sfx2/sfxresid.hxx>
#include "tools/resmgr.hxx"
-
static ResMgr* pMgr=nullptr;
-SfxResId::SfxResId( sal_uInt16 nId ) :
-
- ResId( nId, *GetResMgr() )
-{
-}
-
-ResMgr* SfxResId::GetResMgr()
+ResMgr* SfxResMgr::GetResMgr()
{
if ( !pMgr )
{
@@ -40,7 +33,7 @@ ResMgr* SfxResId::GetResMgr()
return pMgr;
}
-void SfxResId::DeleteResMgr()
+void SfxResMgr::DeleteResMgr()
{
DELETEZ( pMgr );
}
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index e0de09b8d548..39718dd272c0 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -143,15 +143,15 @@ OUString SfxSlotPool::SeekGroup( sal_uInt16 nNo )
}
}
- SfxResId aResId( (sal_uInt16)_vGroups[_nCurGroup] );
+ ResId aResId((sal_uInt16)_vGroups[_nCurGroup], *SfxResMgr::GetResMgr());
aResId.SetRT(RSC_STRING);
- if ( !SfxResId::GetResMgr()->IsAvailable(aResId) )
+ if ( !SfxResMgr::GetResMgr()->IsAvailable(aResId) )
{
OSL_FAIL( "GroupId-Name not defined in SFX!" );
return OUString();
}
- return aResId.toString();
+ return aResId;
}
return OUString();
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index 1520a856f5b4..6e270e4262e2 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -81,8 +81,8 @@ void TemplateDefaultView::MouseButtonDown( const MouseEvent& rMEvt )
void TemplateDefaultView::createContextMenu()
{
ScopedVclPtrInstance<PopupMenu> pItemMenu;
- pItemMenu->InsertItem(MNI_OPEN,SfxResId(STR_OPEN).toString());
- pItemMenu->InsertItem(MNI_EDIT,SfxResId(STR_EDIT_TEMPLATE).toString());
+ pItemMenu->InsertItem(MNI_OPEN,SfxResId(STR_OPEN));
+ pItemMenu->InsertItem(MNI_EDIT,SfxResId(STR_EDIT_TEMPLATE));
deselectItems();
maSelectedItem->setSelection(true);
pItemMenu->SetSelectHdl(LINK(this, TemplateLocalView, ContextMenuSelectHdl));
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index d6432a65ed28..6c5881422b15 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -235,17 +235,17 @@ TemplateContainerItem* TemplateLocalView::getRegion(OUString const & rName)
void TemplateLocalView::createContextMenu(const bool bIsDefault)
{
ScopedVclPtrInstance<PopupMenu> pItemMenu;
- pItemMenu->InsertItem(MNI_OPEN,SfxResId(STR_OPEN).toString());
- pItemMenu->InsertItem(MNI_EDIT,SfxResId(STR_EDIT_TEMPLATE).toString());
+ pItemMenu->InsertItem(MNI_OPEN,SfxResId(STR_OPEN));
+ pItemMenu->InsertItem(MNI_EDIT,SfxResId(STR_EDIT_TEMPLATE));
if(!bIsDefault)
- pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_DEFAULT_TEMPLATE).toString());
+ pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_DEFAULT_TEMPLATE));
else
- pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_RESET_DEFAULT).toString());
+ pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_RESET_DEFAULT));
pItemMenu->InsertSeparator();
- pItemMenu->InsertItem(MNI_RENAME,SfxResId(STR_RENAME).toString());
- pItemMenu->InsertItem(MNI_DELETE,SfxResId(STR_DELETE).toString());
+ pItemMenu->InsertItem(MNI_RENAME,SfxResId(STR_RENAME));
+ pItemMenu->InsertItem(MNI_DELETE,SfxResId(STR_DELETE));
pItemMenu->InsertSeparator();
deselectItems();
maSelectedItem->setSelection(true);
@@ -269,7 +269,7 @@ IMPL_LINK(TemplateLocalView, ContextMenuSelectHdl, Menu*, pMenu, bool)
break;
case MNI_RENAME:
{
- ScopedVclPtrInstance< InputDialog > m_pTitleEditDlg( SfxResId(STR_RENAME_TEMPLATE).toString(), this);
+ ScopedVclPtrInstance< InputDialog > m_pTitleEditDlg( SfxResId(STR_RENAME_TEMPLATE), this);
OUString sOldTitle = maSelectedItem->getTitle();
m_pTitleEditDlg->SetEntryText( sOldTitle );
m_pTitleEditDlg->HideHelpBtn();
@@ -517,7 +517,7 @@ bool TemplateLocalView::moveTemplate (const ThumbnailViewItem *pItem, const sal_
if (bCopy)
{
- OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
+ OUString sQuery = SfxResId(STR_MSG_QUERY_COPY).replaceFirst("$1", pViewItem->maTitle).replaceFirst("$2",
getRegionName(nTargetRegion));
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
@@ -618,13 +618,13 @@ bool TemplateLocalView::moveTemplates(const std::set<const ThumbnailViewItem*, s
if (bCopy)
{
- OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
+ OUString sQuery = SfxResId(STR_MSG_QUERY_COPY).replaceFirst("$1", pViewItem->maTitle).replaceFirst("$2",
getRegionName(nTargetRegion));
ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
{
- OUString sMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE).toString());
+ OUString sMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE));
sMsg = sMsg.replaceFirst("$1",getRegionName(nTargetRegion));
ScopedVclPtrInstance<MessageDialog>(this, sMsg.replaceFirst( "$2",pViewItem->maTitle))->Execute();
@@ -799,7 +799,7 @@ void TemplateLocalView::insertItems(const std::vector<TemplateItemProperties> &r
pChild->setHelpText(pCur->aName);
else
{
- OUString sHelpText = SfxResId(STR_TEMPLATE_TOOLTIP).toString();
+ OUString sHelpText = SfxResId(STR_TEMPLATE_TOOLTIP);
sHelpText = (sHelpText.replaceFirst("$1", pCur->aName)).replaceFirst("$2", pCur->aRegionName);
pChild->setHelpText(sHelpText);
}
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 55e424873dc3..f5fd5c07dadf 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -128,16 +128,16 @@ void TemplateSearchView::Command( const CommandEvent& rCEvt )
void TemplateSearchView::createContextMenu( const bool bIsDefault)
{
ScopedVclPtrInstance<PopupMenu> pItemMenu;
- pItemMenu->InsertItem(MNI_OPEN,SfxResId(STR_OPEN).toString());
- pItemMenu->InsertItem(MNI_EDIT,SfxResId(STR_EDIT_TEMPLATE).toString());
+ pItemMenu->InsertItem(MNI_OPEN,SfxResId(STR_OPEN));
+ pItemMenu->InsertItem(MNI_EDIT,SfxResId(STR_EDIT_TEMPLATE));
if(!bIsDefault)
- pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_DEFAULT_TEMPLATE).toString());
+ pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_DEFAULT_TEMPLATE));
else
- pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_RESET_DEFAULT).toString());
+ pItemMenu->InsertItem(MNI_DEFAULT_TEMPLATE,SfxResId(STR_RESET_DEFAULT));
pItemMenu->InsertSeparator();
- pItemMenu->InsertItem(MNI_DELETE,SfxResId(STR_DELETE).toString());
+ pItemMenu->InsertItem(MNI_DELETE,SfxResId(STR_DELETE));
maSelectedItem->setSelection(true);
maItemStateHdl.Call(maSelectedItem);
pItemMenu->SetSelectHdl(LINK(this, TemplateSearchView, ContextMenuSelectHdl));
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ccacc752731c..83916da238ad 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -104,7 +104,7 @@ namespace {
OUString CreateSizeText( sal_Int64 nSize )
{
OUString aUnitStr(" ");
- aUnitStr += SfxResId(STR_BYTES).toString();
+ aUnitStr += SfxResId(STR_BYTES);
sal_Int64 nSize1 = nSize;
sal_Int64 nSize2 = nSize1;
sal_Int64 nMega = 1024 * 1024;
@@ -116,7 +116,7 @@ OUString CreateSizeText( sal_Int64 nSize )
{
nSize1 /= 1024;
aUnitStr = " ";
- aUnitStr += SfxResId(STR_KB).toString();
+ aUnitStr += SfxResId(STR_KB);
fSize /= 1024;
nDec = 0;
}
@@ -124,7 +124,7 @@ OUString CreateSizeText( sal_Int64 nSize )
{
nSize1 /= nMega;
aUnitStr = " ";
- aUnitStr += SfxResId(STR_MB).toString();
+ aUnitStr += SfxResId(STR_MB);
fSize /= nMega;
nDec = 2;
}
@@ -132,7 +132,7 @@ OUString CreateSizeText( sal_Int64 nSize )
{
nSize1 /= nGiga;
aUnitStr = " ";
- aUnitStr += SfxResId(STR_GB).toString();
+ aUnitStr += SfxResId(STR_GB);
fSize /= nGiga;
nDec = 3;
}
@@ -150,7 +150,7 @@ OUString CreateSizeText( sal_Int64 nSize )
aSizeStr += " (";
aSizeStr += rLocaleWrapper.getNum( nSize2, 0 );
aSizeStr += " ";
- aSizeStr += SfxResId(STR_BYTES).toString();
+ aSizeStr += SfxResId(STR_BYTES);
aSizeStr += ")";
}
return aSizeStr;
@@ -1036,7 +1036,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
INetURLObject aURL(aFile);
OUString aName = aURL.GetName( INetURLObject::DecodeMechanism::WithCharset );
if ( aName.isEmpty() || aURL.GetProtocol() == INetProtocol::PrivSoffice )
- aName = SfxResId( STR_NONAME ).toString();
+ aName = SfxResId( STR_NONAME );
m_pNameED->SetText( aName );
// determine context symbol
@@ -1063,7 +1063,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
OUString aDescription = SvFileInformationManager::GetDescription( INetURLObject(rMainURL) );
if ( aDescription.isEmpty() )
- aDescription = SfxResId( STR_SFX_NEWOFFICEDOC ).toString();
+ aDescription = SfxResId( STR_SFX_NEWOFFICEDOC );
m_pShowTypeFT->SetText( aDescription );
// determine location
@@ -1199,7 +1199,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
aTitle = aTitle.replaceFirst("%1", aFile);
}
else
- aTitle = aTitle.replaceFirst("%1", SfxResId( STR_NONAME ).toString());
+ aTitle = aTitle.replaceFirst("%1", SfxResId( STR_NONAME ));
}
else
{
@@ -1226,7 +1226,7 @@ void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
void SfxDocumentInfoDialog::AddFontTabPage()
{
- AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ).toString(), SfxDocumentFontsPage::Create, nullptr);
+ AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ), SfxDocumentFontsPage::Create, nullptr);
}
// class CustomPropertiesYesNoButton -------------------------------------
@@ -1409,7 +1409,7 @@ namespace
WB_AUTOSIZE|WB_AUTOHSCROLL));
aNameBox->SetPosSizePixel(aNameBox->LogicToPixel(Point(0, 2), MapUnit::MapAppFont),
aNameBox->LogicToPixel(Size(60, 72), MapUnit::MapAppFont));
- ResStringArray aStrArr(SfxResId(SFX_CB_PROPERTY_STRINGARRAY));
+ ResStringArray aStrArr(ResId(SFX_CB_PROPERTY_STRINGARRAY, *SfxResMgr::GetResMgr()));
for (sal_uInt32 i = 0; i < aStrArr.Count(); ++i)
aNameBox->InsertEntry(aStrArr.GetString(i));
return aNameBox;
@@ -1422,7 +1422,7 @@ CustomPropertiesTypeBox::CustomPropertiesTypeBox(vcl::Window* pParent, CustomPro
{
SetPosSizePixel(LogicToPixel(Point(63, 2), MapUnit::MapAppFont),
LogicToPixel(Size(60, 80), MapUnit::MapAppFont));
- ResStringArray aStrArr(SfxResId(SFX_LB_PROPERTY_STRINGARRAY));
+ ResStringArray aStrArr(ResId(SFX_LB_PROPERTY_STRINGARRAY, *SfxResMgr::GetResMgr()));
for (sal_uInt32 i = 0; i < aStrArr.Count(); ++i)
{
InsertEntry(aStrArr.GetString(i));
@@ -1438,7 +1438,7 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) :
m_aValueEdit ( VclPtr<CustomPropertiesEdit>::Create(pParent, WB_BORDER|WB_TABSTOP|WB_LEFT, this ) ),
m_aDateField ( VclPtr<CustomPropertiesDateField>::Create(pParent, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT ) ),
m_aTimeField ( VclPtr<CustomPropertiesTimeField>::Create(pParent, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT ) ),
- m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT ).toString() ),
+ m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT ) ),
m_aDurationField( VclPtr<CustomPropertiesDurationField>::Create(pParent, WB_BORDER|WB_TABSTOP|WB_READONLY, this ) ),
m_aEditButton ( VclPtr<CustomPropertiesEditButton>::Create(pParent, WB_TABSTOP, this) ),
m_aYesNoButton ( VclPtr<CustomPropertiesYesNoButton>::Create(pParent) ),
@@ -1452,9 +1452,9 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) :
m_aDateField->SetExtDateFormat( ExtDateFieldFormat::SystemShortYYYY );
m_aRemoveButton->SetModeImage(Image(BitmapEx(SFX_BMP_PROPERTY_REMOVE)));
- m_aRemoveButton->SetQuickHelpText(SfxResId(STR_SFX_REMOVE_PROPERTY).toString());
+ m_aRemoveButton->SetQuickHelpText(SfxResId(STR_SFX_REMOVE_PROPERTY));
- m_aEditButton->SetText(SfxResId(SFX_ST_EDIT).toString());
+ m_aEditButton->SetText(SfxResId(SFX_ST_EDIT));
}
void CustomPropertyLine::SetRemoved()
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 6ea2e62a316a..2026be6ad82e 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -618,7 +618,7 @@ void FileDialogHelper_Impl::updateVersions()
uno::Sequence < util::RevisionTag > xVersions = SfxMedium::GetVersionList( xStorage );
aEntries.realloc( xVersions.getLength() + 1 );
- aEntries[0] = SfxResId( STR_SFX_FILEDLG_ACTUALVERSION ).toString();
+ aEntries[0] = SfxResId( STR_SFX_FILEDLG_ACTUALVERSION );
for ( sal_Int32 i=0; i<xVersions.getLength(); i++ )
aEntries[ i + 1 ] = xVersions[i].Identifier;
@@ -1092,7 +1092,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
// Export dialog
if ( mbExport )
{
- mxFileDlg->setTitle( SfxResId( STR_SFX_EXPLORERFILE_EXPORT ).toString() );
+ mxFileDlg->setTitle( SfxResId( STR_SFX_EXPLORERFILE_EXPORT ) );
try {
css::uno::Reference < XFilePickerControlAccess > xCtrlAccess( mxFileDlg, UNO_QUERY_THROW );
xCtrlAccess->enableControl( ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR, true );
@@ -1103,7 +1103,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
// Save a copy dialog
if ( nFlags & FileDialogFlags::SaveACopy )
{
- mxFileDlg->setTitle( SfxResId( STR_PB_SAVEACOPY ).toString() );
+ mxFileDlg->setTitle( SfxResId( STR_PB_SAVEACOPY ) );
}
// the "insert file" dialog needs another title
@@ -1111,15 +1111,15 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
{
if ( nFlags & FileDialogFlags::InsertCompare )
{
- mxFileDlg->setTitle( SfxResId( STR_PB_COMPAREDOC ).toString() );
+ mxFileDlg->setTitle( SfxResId( STR_PB_COMPAREDOC ) );
}
else if ( nFlags & FileDialogFlags::InsertMerge )
{
- mxFileDlg->setTitle( SfxResId( STR_PB_MERGEDOC ).toString() );
+ mxFileDlg->setTitle( SfxResId( STR_PB_MERGEDOC ) );
}
else
{
- mxFileDlg->setTitle( SfxResId( STR_SFX_EXPLORERFILE_INSERT ).toString() );
+ mxFileDlg->setTitle( SfxResId( STR_SFX_EXPLORERFILE_INSERT ) );
}
uno::Reference < XFilePickerControlAccess > xExtDlg( mxFileDlg, UNO_QUERY );
if ( xExtDlg.is() )
@@ -1127,7 +1127,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
try
{
xExtDlg->setLabel( CommonFilePickerElementIds::PUSHBUTTON_OK,
- SfxResId( STR_SFX_EXPLORERFILE_BUTTONINSERT ).toString() );
+ SfxResId( STR_SFX_EXPLORERFILE_BUTTONINSERT ) );
}
catch( const IllegalArgumentException& ){}
}
@@ -1845,7 +1845,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
try
{
- OUString aAllFilterName = SfxResId( STR_SFX_IMPORT_ALL ).toString();
+ OUString aAllFilterName = SfxResId( STR_SFX_IMPORT_ALL );
aAllFilterName = ::sfx2::addExtension( aAllFilterName, aExtensions, bIsInOpenMode, *this );
xFltMgr->appendFilter( aAllFilterName, aExtensions );
@@ -2610,7 +2610,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType,
// read-only to discourage editing (which would invalidate existing
// signatures).
if (nFlags & FileDialogFlags::SignPDF)
- pDialog.reset(new FileDialogHelper(nDialogType, nFlags, SfxResId(STR_SFX_FILTERNAME_PDF).toString(), "pdf", rStandardDir, rBlackList));
+ pDialog.reset(new FileDialogHelper(nDialogType, nFlags, SfxResId(STR_SFX_FILTERNAME_PDF), "pdf", rStandardDir, rBlackList));
else
pDialog.reset(new FileDialogHelper(nDialogType, nFlags, rFact, nDialog, SfxFilterFlags::NONE, SfxFilterFlags::NONE, rStandardDir, rBlackList));
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 25f6e8001a5f..f6771e2e15cf 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -753,7 +753,7 @@ namespace sfx2
bool lcl_hasAllFilesFilter( TSortedFilterList& _rFilterMatcher, OUString& /* [out] */ _rAllFilterName )
{
bool bHasAll = false;
- _rAllFilterName = SfxResId( STR_SFX_FILTERNAME_ALL ).toString();
+ _rAllFilterName = SfxResId( STR_SFX_FILTERNAME_ALL );
// check if there's already a filter <ALL>
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index ac01c0fc6e6f..bdf8a34d83d8 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -173,7 +173,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
//used in filter/source/pdf/impdialog.cxx
uno::Sequence< beans::PropertyValue > aFilterDataValue(1);
aFilterDataValue[0].Name = "_OkButtonString";
- aFilterDataValue[0].Value <<= SfxResId(STR_PDF_EXPORT_SEND ).toString();
+ aFilterDataValue[0].Value <<= SfxResId(STR_PDF_EXPORT_SEND );
//add to the filterdata property, the only one the PDF export filter dialog will care for
aPropsForDialog[0].Name = "FilterData";
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index fca6b357efae..f39eec6f5a56 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -156,7 +156,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx
{
if ( pStyle->HasClearParentSupport() )
// the base template can be set to NULL
- m_pBaseLb->InsertEntry( SfxResId(STR_NONE).toString() );
+ m_pBaseLb->InsertEntry( SfxResId(STR_NONE) );
SfxStyleSheetBase* pPoolStyle = pPool->First();
@@ -523,11 +523,11 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet* /*rAttrSet*/ )
pStyle->SetParent( aParent );
if ( aParent.isEmpty() )
- m_pBaseLb->SelectEntry( SfxResId(STR_NONE).toString() );
+ m_pBaseLb->SelectEntry( SfxResId(STR_NONE) );
else
m_pBaseLb->SelectEntry( aParent );
- if ( SfxResId(STR_STANDARD).toString().equals(aName) )
+ if ( SfxResId(STR_STANDARD).equals(aName) )
{
// the default template can not be linked
m_pBaseFt->Disable();
@@ -640,7 +640,7 @@ DeactivateRC SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
{
OUString aParentEntry( m_pBaseLb->GetSelectEntry() );
- if ( SfxResId(STR_NONE).toString().equals(aParentEntry) || aParentEntry == pStyle->GetName() )
+ if ( SfxResId(STR_NONE).equals(aParentEntry) || aParentEntry == pStyle->GetName() )
aParentEntry.clear();
if ( pStyle->GetParent() != aParentEntry )
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
index c41717bfabb0..4b508bc97824 100644
--- a/sfx2/source/dialog/navigat.cxx
+++ b/sfx2/source/dialog/navigat.cxx
@@ -54,7 +54,7 @@ SfxNavigator::SfxNavigator( SfxBindings* pBind ,
nBits )
, pWrapper( pChildWin )
{
- SetText( SfxResId(SID_NAVIGATOR).toString() );
+ SetText( SfxResId(SID_NAVIGATOR) );
}
void SfxNavigator::Resize()
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 5b3b7bd3fda4..0c030ee63f2b 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -84,9 +84,9 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl, Button*, void)
SfxPasswordDialog::SfxPasswordDialog(vcl::Window* pParent, const OUString* pGroupText)
: ModalDialog(pParent, "PasswordDialog", "sfx/ui/password.ui")
- , maMinLenPwdStr(SFX2_RESSTR(STR_PASSWD_MIN_LEN))
- , maMinLenPwdStr1(SFX2_RESSTR(STR_PASSWD_MIN_LEN1))
- , maEmptyPwdStr(SFX2_RESSTR(STR_PASSWD_EMPTY))
+ , maMinLenPwdStr(SfxResId(STR_PASSWD_MIN_LEN))
+ , maMinLenPwdStr1(SfxResId(STR_PASSWD_MIN_LEN1))
+ , maEmptyPwdStr(SfxResId(STR_PASSWD_EMPTY))
, mnMinLen(5)
, mnExtras(SfxShowExtras::NONE)
, mbAsciiOnly(false)
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index d80d89f965a1..7b2a592db670 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -61,8 +61,8 @@ bool SfxRecordingFloatWrapper_Impl::QueryClose()
css::uno::Reference< css::frame::XDispatchRecorder > xRecorder = pBindings->GetRecorder();
if ( xRecorder.is() && !xRecorder->getRecordedMacro().isEmpty() )
{
- ScopedVclPtrInstance< QueryBox > aBox(GetWindow(), WB_YES_NO | WB_DEF_NO , SfxResId(STR_MACRO_LOSS).toString());
- aBox->SetText( SfxResId(STR_CANCEL_RECORDING).toString() );
+ ScopedVclPtrInstance< QueryBox > aBox(GetWindow(), WB_YES_NO | WB_DEF_NO , SfxResId(STR_MACRO_LOSS));
+ aBox->SetText( SfxResId(STR_CANCEL_RECORDING) );
bRet = ( aBox->Execute() == RET_YES );
}
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 20c3dbab9b97..a6c00be522fd 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -124,7 +124,7 @@ static bool lcl_IsPasswordCorrect( const OUString &rPassword )
if (SvPasswordHelper::CompareHashPassword( aPasswordHash, rPassword ))
bRes = true; // password was correct
else
- ScopedVclPtrInstance<InfoBox>(nullptr, SFX2_RESSTR(RID_SVXSTR_INCORRECT_PASSWORD))->Execute();
+ ScopedVclPtrInstance<InfoBox>(nullptr, SfxResId(RID_SVXSTR_INCORRECT_PASSWORD))->Execute();
return bRes;
}
@@ -162,7 +162,7 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage ) :
m_eRedlingMode ( RL_NONE ),
m_bOrigPasswordIsConfirmed ( false ),
m_bNewPasswordIsValid ( false ),
- m_aEndRedliningWarning ( SFX2_RESSTR(RID_SVXSTR_END_REDLINING_WARNING) ),
+ m_aEndRedliningWarning ( SfxResId(RID_SVXSTR_END_REDLINING_WARNING) ),
m_bEndRedliningWarningDone ( false )
{
rTabPage.get(m_pOpenReadonlyCB, "readonly");
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 038f01b241c7..3e174e3eccd5 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -134,7 +134,7 @@ IMPL_LINK_NOARG( SfxStyleDialog, CancelHdl, Button *, void )
OUString SfxStyleDialog::GenerateUnusedName(SfxStyleSheetBasePool &rPool)
{
- OUString aNoName(SfxResId(STR_NONAME).toString());
+ OUString aNoName(SfxResId(STR_NONAME));
sal_uInt16 nNo = 1;
OUString aNo(aNoName);
aNoName += OUString::number(nNo);
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index e4910a28e06c..592f59509829 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -455,7 +455,7 @@ void SfxTabDialog::Init_Impl(bool bFmtFlag)
m_pOKBtn->SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) );
m_pCancelBtn->SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
m_pResetBtn->SetClickHdl( LINK( this, SfxTabDialog, ResetHdl ) );
- m_pResetBtn->SetText( SfxResId( STR_RESET ).toString() );
+ m_pResetBtn->SetText( SfxResId( STR_RESET ) );
m_pTabCtrl->SetActivatePageHdl(
LINK( this, SfxTabDialog, ActivatePageHdl ) );
m_pTabCtrl->SetDeactivatePageHdl(
@@ -477,7 +477,7 @@ void SfxTabDialog::Init_Impl(bool bFmtFlag)
if ( bFmtFlag )
{
- m_pBaseFmtBtn->SetText( SfxResId( STR_STANDARD_SHORTCUT ).toString() );
+ m_pBaseFmtBtn->SetText( SfxResId( STR_STANDARD_SHORTCUT ) );
m_pBaseFmtBtn->SetClickHdl( LINK( this, SfxTabDialog, BaseFmtHdl ) );
m_pBaseFmtBtn->SetHelpId( HID_TABDLG_STANDARD_BTN );
m_pBaseFmtBtn->Show();
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index b2a323aa6fe7..48a874f34996 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -668,7 +668,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl
, m_bWantHierarchical(false)
, bBindingUpdate(true)
{
- aFmtLb->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST).toString());
+ aFmtLb->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
aFmtLb->SetHelpId( HID_TEMPLATE_FMT );
aFilterLb->SetHelpId( HID_TEMPLATE_FILTER );
aFmtLb->SetStyle( aFmtLb->GetStyle() | WB_SORT | WB_HIDESELECTION );
@@ -1116,7 +1116,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags)
aFilterLb->SetUpdateMode(false);
aFilterLb->Clear();
//insert hierarchical at the beginning
- sal_Int32 nPos = aFilterLb->InsertEntry(SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString(), 0);
+ sal_Int32 nPos = aFilterLb->InsertEntry(SfxResId(STR_STYLE_FILTER_HIERARCHICAL), 0);
aFilterLb->SetEntryData( nPos, reinterpret_cast<void*>(SFXSTYLEBIT_ALL) );
const SfxStyleFilter& rFilter = pItem->GetFilterList();
for(const SfxFilterTupel& i : rFilter)
@@ -1138,7 +1138,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags)
// if the tree view again, select family hierarchy
if (pTreeBox || m_bWantHierarchical)
{
- aFilterLb->SelectEntry(SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString());
+ aFilterLb->SelectEntry(SfxResId(STR_STYLE_FILTER_HIERARCHICAL));
EnableHierarchical(true);
}
@@ -1613,7 +1613,7 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable)
pTreeBox->SetOptimalImageIndent();
FillTreeBox();
SelectStyle(aSelectEntry);
- pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST).toString());
+ pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST));
pTreeBox->Show();
}
}
@@ -1631,7 +1631,7 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable)
IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox&, rBox, void )
{
- if (SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString() == rBox.GetSelectEntry())
+ if (SfxResId(STR_STYLE_FILTER_HIERARCHICAL) == rBox.GetSelectEntry())
{
EnableHierarchical(true);
}
@@ -1857,8 +1857,8 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl()
SvTreeListEntry* pEntry = pTreeBox ? pTreeBox->FirstSelected() : aFmtLb->FirstSelected();
const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
- OUString aMsg = SfxResId(STR_DELETE_STYLE_USED).toString()
- + SfxResId(STR_DELETE_STYLE).toString();
+ OUString aMsg = SfxResId(STR_DELETE_STYLE_USED)
+ + SfxResId(STR_DELETE_STYLE);
while (pEntry)
{
@@ -2161,13 +2161,13 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(SfxBindings* pB, SfxTemplatePanel
, m_aActionTbL(VclPtrInstance<DropToolBox_Impl>(pDlgWindow, this))
, m_aActionTbR(VclPtrInstance<ToolBox>(pDlgWindow))
{
- m_aActionTbR->InsertItem(SID_STYLE_WATERCAN, Image(BitmapEx(RID_SFXBMP_WATERCAN)), SfxResId(STR_STYLE_FILL_FORMAT_MODE).toString());
+ m_aActionTbR->InsertItem(SID_STYLE_WATERCAN, Image(BitmapEx(RID_SFXBMP_WATERCAN)), SfxResId(STR_STYLE_FILL_FORMAT_MODE));
m_aActionTbR->SetHelpId(SID_STYLE_WATERCAN, HID_TEMPLDLG_WATERCAN);
- m_aActionTbR->InsertItem(SID_STYLE_NEW_BY_EXAMPLE, Image(BitmapEx(RID_SFXBMP_NEW_BY_EXAMPLE)), SfxResId(STR_STYLE_NEW_STYLE_FROM_SELECTION).toString());
+ m_aActionTbR->InsertItem(SID_STYLE_NEW_BY_EXAMPLE, Image(BitmapEx(RID_SFXBMP_NEW_BY_EXAMPLE)), SfxResId(STR_STYLE_NEW_STYLE_FROM_SELECTION));
m_aActionTbR->SetHelpId(SID_STYLE_NEW_BY_EXAMPLE, HID_TEMPLDLG_NEWBYEXAMPLE);
- m_aActionTbR->InsertItem(SID_STYLE_UPDATE_BY_EXAMPLE, Image(BitmapEx(RID_SFXBMP_UPDATE_BY_EXAMPLE)), SfxResId(STR_STYLE_UPDATE_STYLE).toString());
+ m_aActionTbR->InsertItem(SID_STYLE_UPDATE_BY_EXAMPLE, Image(BitmapEx(RID_SFXBMP_UPDATE_BY_EXAMPLE)), SfxResId(STR_STYLE_UPDATE_STYLE));
m_aActionTbR->SetHelpId(SID_STYLE_UPDATE_BY_EXAMPLE, HID_TEMPLDLG_UPDATEBYEXAMPLE);
Initialize();
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index f884e0d6651d..8d26bba9de82 100644
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.src
@@ -84,41 +84,6 @@ String STR_AUTOMATICVERSION
Text [ en-US ] = "Automatically saved version" ;
};
-String STR_DOCTYPENAME_SW
-{
- Text [ en-US ] = "Text Document";
-};
-
-String STR_DOCTYPENAME_SWWEB
-{
- Text [ en-US ] = "HTML Document";
-};
-
-String STR_DOCTYPENAME_SWGLOB
-{
- Text [ en-US ] = "Master Document";
-};
-
-String STR_DOCTYPENAME_SC
-{
- Text [ en-US ] = "Spreadsheet";
-};
-
-String STR_DOCTYPENAME_SI
-{
- Text [ en-US ] = "Presentation";
-};
-
-String STR_DOCTYPENAME_SD
-{
- Text [ en-US ] = "Drawing";
-};
-
-String STR_DOCTYPENAME_MESSAGE
-{
- Text [ en-US ] = "Message";
-};
-
String STR_EXPORTBUTTON
{
Text [ en-US ] = "Export" ;
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 339c2bb8fed6..6a26e7b8420f 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -61,26 +61,22 @@ typedef std::vector<SfxViewFactory*> SfxViewFactoryArr_Impl;
struct SfxObjectFactory_Impl
{
SfxViewFactoryArr_Impl aViewFactoryArr;// List of <SfxViewFactory>s
- ResId* pNameResId;
OUString aServiceName;
SfxFilterContainer* pFilterContainer;
SfxModule* pModule;
SvGlobalName aClassName;
SfxObjectFactory_Impl() :
- pNameResId ( nullptr ),
pFilterContainer ( nullptr ),
pModule ( nullptr )
{}
};
-
SfxFilterContainer* SfxObjectFactory::GetFilterContainer() const
{
return pImpl->pFilterContainer;
}
-
SfxObjectFactory::SfxObjectFactory
(
const SvGlobalName& rName,
@@ -91,29 +87,11 @@ SfxObjectFactory::SfxObjectFactory
nFlags( nFlagsP )
{
pImpl->pFilterContainer = new SfxFilterContainer( m_sFactoryName );
-
- const OUString aShortName( m_sFactoryName.toAsciiLowerCase() );
pImpl->aClassName = rName;
- if ( aShortName == "swriter" )
- pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SW );
- else if ( aShortName == "swriter/web" )
- pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SWWEB );
- else if ( aShortName == "swriter/globaldocument" )
- pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SWGLOB );
- else if ( aShortName == "scalc" )
- pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SC );
- else if ( aShortName == "simpress" )
- pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SI );
- else if ( aShortName == "sdraw" )
- pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SD );
- else if ( aShortName == "message" )
- pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_MESSAGE );
}
-
SfxObjectFactory::~SfxObjectFactory()
{
- delete pImpl->pNameResId;
delete pImpl->pFilterContainer;
}
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 3689525987c2..ca3ebf2428be 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -494,7 +494,7 @@ OUString SfxDocumentTemplates::ConvertResourceString(const OUString& rString)
for (int i = 0; i < NUM_TEMPLATE_NAMES; ++i)
{
if (rString == aTemplateNames[i])
- return SFX2_RESSTR(STR_TEMPLATE_NAME1 + i);
+ return SfxResId(STR_TEMPLATE_NAME1 + i);
}
return rString;
}
@@ -1604,7 +1604,7 @@ bool SfxDocTemplate_Impl::Construct( )
mbConstructed = true;
maRootURL = aRootContent->getIdentifier()->getContentIdentifier();
- ResStringArray aLongNames( SfxResId( TEMPLATE_LONG_NAMES_ARY ) );
+ ResStringArray aLongNames(ResId(TEMPLATE_LONG_NAMES_ARY, *SfxResMgr::GetResMgr()));
if ( aLongNames.Count() )
maStandardGroup = aLongNames.GetString( 0 );
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 334f2d4eed24..b4e59a4ce3f2 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -487,9 +487,8 @@ void SfxDocTplService_Impl::readFolderList()
{
SolarMutexGuard aGuard;
- ResStringArray aShortNames( SfxResId( TEMPLATE_SHORT_NAMES_ARY ) );
- ResStringArray aLongNames( SfxResId( TEMPLATE_LONG_NAMES_ARY ) );
-
+ ResStringArray aShortNames(ResId(TEMPLATE_SHORT_NAMES_ARY, *SfxResMgr::GetResMgr()));
+ ResStringArray aLongNames(ResId(TEMPLATE_LONG_NAMES_ARY, *SfxResMgr::GetResMgr()));
sal_uInt16 nCount = (sal_uInt16)( std::min( aShortNames.Count(), aLongNames.Count() ) );
@@ -2282,7 +2281,7 @@ void SAL_CALL SfxDocTplService::update()
WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(nullptr, WB_BORDER | WB_3DLOOK)
{
tools::Rectangle aRect = tools::Rectangle(0, 0, 300, 30000);
- maText = SfxResId(RID_CNT_STR_WAITING).toString();
+ maText = SfxResId(RID_CNT_STR_WAITING);
maRect = GetTextRect(aRect, maText, mnTextStyle);
aRect = maRect;
aRect.Right() += 2 * X_OFFSET;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index a9e0b6033a9d..1df20de8d694 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -879,8 +879,8 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
if ( xControlAccess.is() )
{
- xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, SfxResId(STR_EXPORTBUTTON).toString() );
- xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER_LABEL, SfxResId(STR_LABEL_FILEFORMAT).toString() );
+ xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::PUSHBUTTON_OK, SfxResId(STR_EXPORTBUTTON) );
+ xControlAccess->setLabel( ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER_LABEL, SfxResId(STR_LABEL_FILEFORMAT) );
}
}
else
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 82c78426603d..3c5716e9eed3 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -247,7 +247,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox&, rBox, void )
sal_Int32 nc = aSel.indexOf('(');
if (nc != -1 && nc != 0)
aSel = aSel.replaceAt(nc-1, 1, "");
- if ( aSel.compareToIgnoreAsciiCase( SfxResId(STR_STANDARD).toString() ) == 0 )
+ if ( aSel.compareToIgnoreAsciiCase( SfxResId(STR_STANDARD) ) == 0 )
m_pTemplateLb->InsertEntry(aNone);
for (sal_uInt16 i = 0; i < nCount; ++i)
m_pTemplateLb->InsertEntry(aTemplates.GetName(nRegion, i));
@@ -295,7 +295,7 @@ sal_uInt16 SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
sal_Int32 nc = aSel.indexOf('(');
if (nc != -1 && nc != 0)
aSel = aSel.replaceAt(nc-1, 1, "");
- if ( aSel.compareToIgnoreAsciiCase(SfxResId(STR_STANDARD).toString()) != 0 )
+ if ( aSel.compareToIgnoreAsciiCase(SfxResId(STR_STANDARD)) != 0 )
nEntry++;
if (!m_pTemplateLb->GetSelectEntryCount())
nEntry = 0;
@@ -342,7 +342,7 @@ void SfxNewFileDialog_Impl::SetTemplateFlags(SfxTemplateFlags nSet)
SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
SfxNewFileDialog* pAntiImplP, SfxNewFileDialogMode nFl)
- : aNone(SfxResId(STR_NONE).toString())
+ : aNone(SfxResId(STR_NONE))
, nFlags(nFl)
, pAntiImpl(pAntiImplP)
{
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 32ece99f3782..ca419ab37d64 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -461,7 +461,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
bLoad = true;
else if ( bCanUpdateFromTemplate == document::UpdateDocMode::ACCORDING_TO_CONFIG )
{
- const OUString sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString().replaceAll( "$(ARG1)", aTemplName ) );
+ const OUString sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).replaceAll( "$(ARG1)", aTemplName ) );
ScopedVclPtrInstance< sfx2::QueryTemplateBox > aBox(GetDialogParent(), sMessage);
if ( RET_YES == aBox->Execute() )
bLoad = true;
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 543ac85a0416..ddb8cfb7098f 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -759,7 +759,7 @@ OUString SfxObjectShell::GetTitle( sal_uInt16 nMaxLength ) const
return pImpl->aTitle;
// must it be numbered?
- const OUString aNoName(SFX2_RESSTR(STR_NONAME));
+ const OUString aNoName(SfxResId(STR_NONAME));
if (pImpl->bIsNamedVisible)
{
// Append number
@@ -1833,10 +1833,10 @@ bool SfxObjectShell::IsContinueImportOnFilterExceptions(const OUString& aErrMess
if (Application::GetDialogCancelMode() == Application::DialogCancelMode::Off)
{
// Ask the user to try to continue or abort loading
- OUString aMessage = SfxResId(STR_QMSG_ERROR_OPENING_FILE).toString();
+ OUString aMessage = SfxResId(STR_QMSG_ERROR_OPENING_FILE);
if (!aErrMessage.isEmpty())
- aMessage += SfxResId(STR_QMSG_ERROR_OPENING_FILE_DETAILS).toString() + aErrMessage;
- aMessage += SfxResId(STR_QMSG_ERROR_OPENING_FILE_CONTINUE).toString();
+ aMessage += SfxResId(STR_QMSG_ERROR_OPENING_FILE_DETAILS) + aErrMessage;
+ aMessage += SfxResId(STR_QMSG_ERROR_OPENING_FILE_CONTINUE);
ScopedVclPtrInstance< MessageDialog > aBox(nullptr, aMessage, VclMessageType::Question, VclButtonsType::YesNo);
mbContinueImportOnFilterExceptions = (aBox->Execute() == RET_YES) ? yes : no;
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index d7a36c7aac37..6e1f008627df 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -952,7 +952,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
{
if ( !IsReadOnly() )
rSet.Put(SfxStringItem(
- nWhich, SfxResId(STR_SAVEDOC).toString()));
+ nWhich, SfxResId(STR_SAVEDOC)));
else
rSet.DisableItem(nWhich);
}
@@ -968,7 +968,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
if ( GetFlags() & SfxObjectShellFlags::DONTCLOSE )
rSet.DisableItem(nWhich);
else
- rSet.Put(SfxStringItem(nWhich, SfxResId(STR_CLOSEDOC).toString()));
+ rSet.Put(SfxStringItem(nWhich, SfxResId(STR_CLOSEDOC)));
break;
}
@@ -982,7 +982,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
if ( /*!pCombinedFilters ||*/ !GetMedium() )
rSet.DisableItem( nWhich );
else
- rSet.Put( SfxStringItem( nWhich, SfxResId(STR_SAVEASDOC).toString() ) );
+ rSet.Put( SfxStringItem( nWhich, SfxResId(STR_SAVEASDOC) ) );
break;
}
@@ -996,7 +996,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
if ( /*!pCombinedFilters ||*/ !GetMedium() )
rSet.DisableItem( nWhich );
else
- rSet.Put( SfxStringItem( nWhich, SfxResId(STR_SAVEACOPY).toString() ) );
+ rSet.Put( SfxStringItem( nWhich, SfxResId(STR_SAVEACOPY) ) );
break;
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 56fdf502076f..759cc16b987c 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -522,7 +522,7 @@ bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
// empty documents always get their macros from the user, so there is no reason to restrict access
pImpl->aMacroMode.allowMacroExecution();
if ( SfxObjectCreateMode::EMBEDDED == eCreateMode )
- SetTitle(SfxResId(STR_NONAME).toString());
+ SetTitle(SfxResId(STR_NONAME));
uno::Reference< frame::XModel > xModel ( GetModel(), uno::UNO_QUERY );
if ( xModel.is() )
@@ -734,7 +734,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
// set name before ConvertFrom, so that GetSbxObject() already works
bHasName = true;
- SetName( SfxResId(STR_NONAME).toString() );
+ SetName( SfxResId(STR_NONAME) );
if( !bHasStorage )
pMedium->GetInStream();
@@ -2903,7 +2903,7 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl::
if ( SvtSecurityOptions().IsOptionSet( eOption ) )
{
- OUString sMessage( SfxResId(STR_HIDDENINFO_CONTAINS).toString() );
+ OUString sMessage( SfxResId(STR_HIDDENINFO_CONTAINS) );
HiddenInformation nWantedStates = HiddenInformation::RECORDEDCHANGES | HiddenInformation::NOTES;
if ( eFact != HiddenWarningFact::WhenPrinting )
nWantedStates |= HiddenInformation::DOCUMENTVERSIONS;
@@ -2912,19 +2912,19 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl::
if ( nStates & HiddenInformation::RECORDEDCHANGES )
{
- sMessage += SfxResId(STR_HIDDENINFO_RECORDCHANGES).toString();
+ sMessage += SfxResId(STR_HIDDENINFO_RECORDCHANGES);
sMessage += "\n";
bWarning = true;
}
if ( nStates & HiddenInformation::NOTES )
{
- sMessage += SfxResId(STR_HIDDENINFO_NOTES).toString();
+ sMessage += SfxResId(STR_HIDDENINFO_NOTES);
sMessage += "\n";
bWarning = true;
}
if ( nStates & HiddenInformation::DOCUMENTVERSIONS )
{
- sMessage += SfxResId(STR_HIDDENINFO_DOCVERSIONS).toString();
+ sMessage += SfxResId(STR_HIDDENINFO_DOCVERSIONS);
sMessage += "\n";
bWarning = true;
}
@@ -2932,7 +2932,7 @@ sal_Int16 SfxObjectShell::QueryHiddenInformation( HiddenWarningFact eFact, vcl::
if ( bWarning )
{
sMessage += "\n";
- sMessage += SfxResId(nResId).toString();
+ sMessage += SfxResId(nResId);
ScopedVclPtrInstance< WarningBox > aWBox(pParent, WB_YES_NO | WB_DEF_NO, sMessage);
nRet = aWBox->Execute();
}
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 4e097f91b471..d17203cf5328 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -598,7 +598,7 @@ bool SfxObjectShell::PrepareClose
const SfxPoolItem *pPoolItem;
if ( IsSaveVersionOnClose() )
{
- SfxStringItem aItem( SID_DOCINFO_COMMENTS, SfxResId(STR_AUTOMATICVERSION).toString() );
+ SfxStringItem aItem( SID_DOCINFO_COMMENTS, SfxResId(STR_AUTOMATICVERSION) );
SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, nullptr };
pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
diff --git a/sfx2/source/doc/querytemplate.cxx b/sfx2/source/doc/querytemplate.cxx
index f61d8069ba3a..d4fce41f8a5c 100644
--- a/sfx2/source/doc/querytemplate.cxx
+++ b/sfx2/source/doc/querytemplate.cxx
@@ -33,9 +33,9 @@ QueryTemplateBox::QueryTemplateBox( vcl::Window* pParent, const OUString& rMessa
SetImage( QueryBox::GetStandardImage() );
SetHelpId( HID_QUERY_LOAD_TEMPLATE );
- AddButton( SfxResId( STR_QRYTEMPL_UPDATE_BTN ).toString(), RET_YES,
+ AddButton( SfxResId( STR_QRYTEMPL_UPDATE_BTN ), RET_YES,
ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus );
- AddButton( SfxResId(STR_QRYTEMPL_KEEP_BTN).toString(), RET_NO, ButtonDialogFlags::Cancel );
+ AddButton( SfxResId(STR_QRYTEMPL_KEEP_BTN), RET_NO, ButtonDialogFlags::Cancel );
}
} // end of namespace sfx2
diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx
index 746c0ed8fab1..cd4b0ada4c0a 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -52,7 +52,7 @@ SfxSaveAsTemplateDialog::SfxSaveAsTemplateDialog():
mpOKButton->SetClickHdl(LINK(this, SfxSaveAsTemplateDialog, OkClickHdl));
mpOKButton->Disable();
- mpOKButton->SetText(SfxResId(STR_SAVEDOC).toString());
+ mpOKButton->SetText(SfxResId(STR_SAVEDOC));
}
SfxSaveAsTemplateDialog::~SfxSaveAsTemplateDialog()
@@ -81,7 +81,7 @@ IMPL_LINK_NOARG(SfxSaveAsTemplateDialog, OkClickHdl, Button*, void)
if(!IsTemplateNameUnique())
{
- OUString sQueryMsg(SfxResId(STR_QMSG_TEMPLATE_OVERWRITE).toString());
+ OUString sQueryMsg(SfxResId(STR_QMSG_TEMPLATE_OVERWRITE));
sQueryMsg = sQueryMsg.replaceFirst("$1",msTemplateName);
aQueryDlg->set_primary_text(sQueryMsg.replaceFirst("$2", msSelectedCategory));
@@ -93,7 +93,7 @@ IMPL_LINK_NOARG(SfxSaveAsTemplateDialog, OkClickHdl, Button*, void)
Close();
else
{
- OUString sText( SfxResId(STR_ERROR_SAVEAS).toString() );
+ OUString sText( SfxResId(STR_ERROR_SAVEAS) );
ScopedVclPtrInstance<MessageDialog>(this, sText.replaceFirst("$1", msTemplateName))->Execute();
}
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 183ee4ae1aea..7430b1a02b9d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3850,16 +3850,16 @@ OUString SAL_CALL SfxBaseModel::getTitle()
}
const SfxBoolItem* pRepairedDocItem = SfxItemSet::GetItem<SfxBoolItem>(pMedium->GetItemSet(), SID_REPAIRPACKAGE, false);
if ( pRepairedDocItem && pRepairedDocItem->GetValue() )
- aResult += SfxResId(STR_REPAIREDDOCUMENT).toString();
+ aResult += SfxResId(STR_REPAIREDDOCUMENT);
}
if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (pMedium && pMedium->IsReadOnly()) )
- aResult += SfxResId(STR_READONLY).toString();
+ aResult += SfxResId(STR_READONLY);
else if ( m_pData->m_pObjectShell->IsDocShared() )
- aResult += SfxResId(STR_SHARED).toString();
+ aResult += SfxResId(STR_SHARED);
if ( m_pData->m_pObjectShell->GetDocumentSignatureState() == SignatureState::OK )
- aResult += SfxResId(RID_XMLSEC_DOCUMENTSIGNED).toString();
+ aResult += SfxResId(RID_XMLSEC_DOCUMENTSIGNED);
}
return aResult;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index a5ae425edc26..d337fd325240 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -170,17 +170,17 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
// Create popup menus
mpActionMenu = VclPtr<PopupMenu>::Create();
mpActionMenu->InsertItem(MNI_ACTION_NEW_FOLDER,
- SfxResId(STR_CATEGORY_NEW).toString(),
+ SfxResId(STR_CATEGORY_NEW),
Image(BitmapEx(BMP_ACTION_REFRESH)));
mpActionMenu->InsertItem(MNI_ACTION_RENAME_FOLDER,
- SfxResId(STR_CATEGORY_RENAME).toString());
+ SfxResId(STR_CATEGORY_RENAME));
mpActionMenu->InsertItem(MNI_ACTION_DELETE_FOLDER,
- SfxResId(STR_CATEGORY_DELETE).toString());
+ SfxResId(STR_CATEGORY_DELETE));
mpActionMenu->InsertSeparator();
mpActionMenu->InsertItem(MNI_ACTION_REFRESH,
- SfxResId(STR_ACTION_REFRESH).toString(),
+ SfxResId(STR_ACTION_REFRESH),
Image(BitmapEx(BMP_ACTION_REFRESH)));
- mpActionMenu->InsertItem(MNI_ACTION_DEFAULT,SfxResId(STR_ACTION_DEFAULT).toString());
+ mpActionMenu->InsertItem(MNI_ACTION_DEFAULT,SfxResId(STR_ACTION_DEFAULT));
mpActionMenu->SetSelectHdl(LINK(this,SfxTemplateManagerDlg,MenuSelectHdl));
mpTemplateDefaultMenu = VclPtr<PopupMenu>::Create();
@@ -246,7 +246,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
mpExportButton->Disable();
mpMoveButton->Disable();
- mpOKButton->SetText(SfxResId(STR_OPEN).toString());
+ mpOKButton->SetText(SfxResId(STR_OPEN));
mpCBApp->SetSelectHdl(LINK(this, SfxTemplateManagerDlg, SelectApplicationHdl));
mpCBFolder->SetSelectHdl(LINK(this, SfxTemplateManagerDlg, SelectRegionHdl));
@@ -629,7 +629,7 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, ImportClickHdl, Button*, void)
}
else
{
- OUString aMsg( SfxResId(STR_CREATE_ERROR).toString() );
+ OUString aMsg( SfxResId(STR_CREATE_ERROR) );
ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1", sCategory))->Execute();
return;
}
@@ -747,7 +747,7 @@ IMPL_LINK(SfxTemplateManagerDlg, DeleteTemplateHdl, ThumbnailViewItem*, pItem, v
if (!aDeletedTemplate.isEmpty())
{
- OUString aMsg( SfxResId(STR_MSG_ERROR_DELETE_TEMPLATE).toString() );
+ OUString aMsg( SfxResId(STR_MSG_ERROR_DELETE_TEMPLATE) );
ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1",aDeletedTemplate))->Execute();
}
}
@@ -892,12 +892,12 @@ void SfxTemplateManagerDlg::OnTemplateImportCategory(const OUString& sCategory)
sfx2::FileDialogHelper aFileDlg(nDialogType, FileDialogFlags::MultiSelection);
// add "All" filter
- aFileDlg.AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL).toString(),
+ aFileDlg.AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL),
FILEDIALOG_FILTER_ALL );
// add template filter
OUString sFilterExt;
- OUString sFilterName( SfxResId( STR_TEMPLATE_FILTER ).toString() );
+ OUString sFilterName( SfxResId( STR_TEMPLATE_FILTER ) );
// add filters of modules which are installed
SvtModuleOptions aModuleOpt;
@@ -967,7 +967,7 @@ void SfxTemplateManagerDlg::OnTemplateImportCategory(const OUString& sCategory)
if (!aTemplateList.isEmpty())
{
- OUString aMsg(SfxResId(STR_MSG_ERROR_IMPORT).toString());
+ OUString aMsg(SfxResId(STR_MSG_ERROR_IMPORT));
aMsg = aMsg.replaceFirst("$1",pContItem->maTitle);
ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$2",aTemplateList))->Execute();
}
@@ -1057,12 +1057,12 @@ void SfxTemplateManagerDlg::OnTemplateExport()
if (!aTemplateList.isEmpty())
{
- OUString aText( SfxResId(STR_MSG_ERROR_EXPORT).toString() );
+ OUString aText( SfxResId(STR_MSG_ERROR_EXPORT) );
ScopedVclPtrInstance<MessageDialog>(this, aText.replaceFirst("$1",aTemplateList))->Execute();
}
else
{
- OUString sText( SfxResId(STR_MSG_EXPORT_SUCCESS).toString() );
+ OUString sText( SfxResId(STR_MSG_EXPORT_SUCCESS) );
ScopedVclPtrInstance<MessageDialog>(this, sText.replaceFirst("$1", OUString::number(nCount)), VclMessageType::Info)->Execute();
}
}
@@ -1110,7 +1110,7 @@ void SfxTemplateManagerDlg::OnTemplateOpen ()
void SfxTemplateManagerDlg::OnCategoryNew()
{
- ScopedVclPtrInstance< InputDialog > dlg(SfxResId(STR_INPUT_NEW).toString(),this);
+ ScopedVclPtrInstance< InputDialog > dlg(SfxResId(STR_INPUT_NEW),this);
int ret = dlg->Execute();
@@ -1122,7 +1122,7 @@ void SfxTemplateManagerDlg::OnCategoryNew()
mpCBFolder->InsertEntry(aName);
else
{
- OUString aMsg( SfxResId(STR_CREATE_ERROR).toString() );
+ OUString aMsg( SfxResId(STR_CREATE_ERROR) );
ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1", aName))->Execute();
}
}
@@ -1131,7 +1131,7 @@ void SfxTemplateManagerDlg::OnCategoryNew()
void SfxTemplateManagerDlg::OnCategoryRename()
{
OUString sCategory = mpCBFolder->GetSelectEntry();
- ScopedVclPtrInstance< InputDialog > dlg(SfxResId(STR_INPUT_NEW).toString(),this);
+ ScopedVclPtrInstance< InputDialog > dlg(SfxResId(STR_INPUT_NEW),this);
dlg->SetEntryText(sCategory);
int ret = dlg->Execute();
@@ -1152,7 +1152,7 @@ void SfxTemplateManagerDlg::OnCategoryRename()
}
else
{
- OUString aMsg( SfxResId(STR_CREATE_ERROR).toString() );
+ OUString aMsg( SfxResId(STR_CREATE_ERROR) );
ScopedVclPtrInstance<MessageDialog>(this, aMsg.replaceFirst("$1", aName))->Execute();
}
}
@@ -1163,8 +1163,8 @@ void SfxTemplateManagerDlg::OnCategoryDelete()
ScopedVclPtrInstance< SfxTemplateCategoryDialog > aDlg;
aDlg->SetCategoryLBEntries(mpLocalView->getFolderNames());
aDlg->HideNewCategoryOption();
- aDlg->SetText(SfxResId(STR_CATEGORY_DELETE).toString());
- aDlg->SetSelectLabelText(SfxResId(STR_CATEGORY_SELECT).toString());
+ aDlg->SetText(SfxResId(STR_CATEGORY_DELETE));
+ aDlg->SetSelectLabelText(SfxResId(STR_CATEGORY_SELECT));
if (aDlg->Execute() == RET_OK)
{
@@ -1180,7 +1180,7 @@ void SfxTemplateManagerDlg::OnCategoryDelete()
if (!mpLocalView->removeRegion(nItemId))
{
- OUString sMsg( SfxResId(STR_MSG_ERROR_DELETE_FOLDER).toString() );
+ OUString sMsg( SfxResId(STR_MSG_ERROR_DELETE_FOLDER) );
ScopedVclPtrInstance<MessageDialog>(this, sMsg.replaceFirst("$1",sCategory))->Execute();
}
else
@@ -1246,7 +1246,7 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nItemId)
if(!mpLocalView->moveTemplate(pItem,pItem->mnRegionId,nItemId))
{
OUString sDst = mpLocalView->getRegionItemName(nItemId);
- OUString sMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE).toString());
+ OUString sMsg(SfxResId(STR_MSG_ERROR_LOCAL_MOVE));
sMsg = sMsg.replaceFirst("$1",sDst);
ScopedVclPtrInstance<MessageDialog>(this, sMsg.replaceFirst( "$2",pItem->maTitle))->Execute();
}
@@ -1401,7 +1401,7 @@ SfxTemplateSelectionDlg::SfxTemplateSelectionDlg(vcl::Window* pParent):
{
mpCBApp->SelectEntryPos(MNI_IMPRESS);
mpCBFolder->SelectEntryPos(0);
- SetText(SfxResId(STR_TEMPLATE_SELECTION).toString());
+ SetText(SfxResId(STR_TEMPLATE_SELECTION));
if(mpLocalView->IsVisible())
{
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index fe4d0b2aae6e..559139906824 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -65,7 +65,7 @@ void DeckTitleBar::SetCloserVisible (const bool bIsCloserVisible)
maToolBox->InsertItem(mnCloserItemIndex,
Theme::GetImage(Theme::Image_Closer));
maToolBox->SetQuickHelpText(mnCloserItemIndex,
- SFX2_RESSTR(SFX_STR_SIDEBAR_CLOSE_DECK));
+ SfxResId(SFX_STR_SIDEBAR_CLOSE_DECK));
}
else
maToolBox->RemoveItem(maToolBox->GetItemPos(mnCloserItemIndex));
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index fcb5e8f0ff6a..4646fa6c544f 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -96,7 +96,7 @@ void PanelTitleBar::SetMoreOptionsCommand(const OUString& rsCommandName,
maToolBox->SetOutStyle(TOOLBOX_STYLE_FLAT);
maToolBox->SetQuickHelpText(
mnMenuItemIndex,
- SFX2_RESSTR(SFX_STR_SIDEBAR_MORE_OPTIONS));
+ SfxResId(SFX_STR_SIDEBAR_MORE_OPTIONS));
}
}
}
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index b21be2dfbc05..9b6eab64dd97 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -982,15 +982,15 @@ VclPtr<PopupMenu> SidebarController::CreatePopupMenu (
// Add entry for docking or un-docking the tool panel.
if (mpParentWindow->IsFloatingMode())
- pMenu->InsertItem(MID_LOCK_TASK_PANEL, SFX2_RESSTR(STR_SFX_DOCK));
+ pMenu->InsertItem(MID_LOCK_TASK_PANEL, SfxResId(STR_SFX_DOCK));
else
- pMenu->InsertItem(MID_UNLOCK_TASK_PANEL, SFX2_RESSTR(STR_SFX_UNDOCK));
+ pMenu->InsertItem(MID_UNLOCK_TASK_PANEL, SfxResId(STR_SFX_UNDOCK));
- pMenu->InsertItem(MID_HIDE_SIDEBAR, SFX2_RESSTR(SFX_STR_SIDEBAR_HIDE_SIDEBAR));
+ pMenu->InsertItem(MID_HIDE_SIDEBAR, SfxResId(SFX_STR_SIDEBAR_HIDE_SIDEBAR));
pCustomizationMenu->InsertSeparator();
- pCustomizationMenu->InsertItem(MID_RESTORE_DEFAULT, SFX2_RESSTR(SFX_STR_SIDEBAR_RESTORE));
+ pCustomizationMenu->InsertItem(MID_RESTORE_DEFAULT, SfxResId(SFX_STR_SIDEBAR_RESTORE));
- pMenu->InsertItem(MID_CUSTOMIZATION, SFX2_RESSTR(SFX_STR_SIDEBAR_CUSTOMIZATION));
+ pMenu->InsertItem(MID_CUSTOMIZATION, SfxResId(SFX_STR_SIDEBAR_CUSTOMIZATION));
pMenu->SetPopupMenu(MID_CUSTOMIZATION, pCustomizationMenu);
pMenu->RemoveDisabledEntries(false);
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 7d4ee1419ef0..3b969727667e 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -62,7 +62,7 @@ TabBar::TabBar(vcl::Window* pParentWindow,
mpMenuButton->SetModeImage(Theme::GetImage(Theme::Image_TabBarMenu));
mpMenuButton->SetClickHdl(LINK(this, TabBar, OnToolboxClicked));
- mpMenuButton->SetQuickHelpText(SFX2_RESSTR(SFX_STR_SIDEBAR_SETTINGS));
+ mpMenuButton->SetQuickHelpText(SfxResId(SFX_STR_SIDEBAR_SETTINGS));
Layout();
#ifdef DEBUG
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3e3a11ac5360..6b7f5ea63076 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -906,18 +906,18 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
rSet.DisableItem( SID_CLEARHISTORY );
if ( pShUndoMgr && pShUndoMgr->GetUndoActionCount() )
- rSet.Put( SfxStringItem( SID_UNDO, SvtResId(STR_UNDO).toString()+pShUndoMgr->GetUndoActionComment() ) );
+ rSet.Put( SfxStringItem( SID_UNDO, SvtResId(STR_UNDO)+pShUndoMgr->GetUndoActionComment() ) );
else
rSet.DisableItem( SID_UNDO );
if ( pShUndoMgr && pShUndoMgr->GetRedoActionCount() )
- rSet.Put( SfxStringItem( SID_REDO, SvtResId(STR_REDO).toString()+pShUndoMgr->GetRedoActionComment() ) );
+ rSet.Put( SfxStringItem( SID_REDO, SvtResId(STR_REDO)+pShUndoMgr->GetRedoActionComment() ) );
else
rSet.DisableItem( SID_REDO );
SfxRepeatTarget *pTarget = pSh->GetRepeatTarget();
if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() && pShUndoMgr->CanRepeat(*pTarget) )
- rSet.Put( SfxStringItem( SID_REPEAT, SvtResId(STR_REPEAT).toString()+pShUndoMgr->GetRepeatActionComment(*pTarget) ) );
+ rSet.Put( SfxStringItem( SID_REPEAT, SvtResId(STR_REPEAT)+pShUndoMgr->GetRepeatActionComment(*pTarget) ) );
else
rSet.DisableItem( SID_REPEAT );
}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index b107f9b4d269..23fdacc17565 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -333,7 +333,7 @@ void SfxPrinterController::jobFinished( css::view::PrintableState nState )
case view::PrintableState_JOB_FAILED :
{
// "real" problem (not simply printing cancelled by user)
- OUString aMsg( SfxResId(STR_NOSTARTPRINTER).toString() );
+ OUString aMsg( SfxResId(STR_NOSTARTPRINTER) );
if ( !m_bApi )
ScopedVclPtrInstance<MessageDialog>(mpViewShell->GetWindow(), aMsg)->Execute();
SAL_FALLTHROUGH;
@@ -489,17 +489,17 @@ void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
SfxPrinterChangeFlags nNewOpt = SfxPrinterChangeFlags::NONE;
if( bOriChg && bPgSzChg )
{
- aMsg = SfxResId(STR_PRINT_NEWORISIZE).toString();
+ aMsg = SfxResId(STR_PRINT_NEWORISIZE);
nNewOpt = SfxPrinterChangeFlags::CHG_ORIENTATION | SfxPrinterChangeFlags::CHG_SIZE;
}
else if (bOriChg )
{
- aMsg = SfxResId(STR_PRINT_NEWORI).toString();
+ aMsg = SfxResId(STR_PRINT_NEWORI);
nNewOpt = SfxPrinterChangeFlags::CHG_ORIENTATION;
}
else if (bPgSzChg)
{
- aMsg = SfxResId(STR_PRINT_NEWSIZE).toString();
+ aMsg = SfxResId(STR_PRINT_NEWSIZE);
nNewOpt = SfxPrinterChangeFlags::CHG_SIZE;
}