diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-19 15:40:40 +0200 |
commit | 2155e04d6343638ca9815d394cbc4f78c2b17c3a (patch) | |
tree | 0378142f6ce9edb63074291aed45527568e7b254 | |
parent | cee02e81cd3b55fb46eacf5db5713e8bf4363bcd (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>
650 files changed, 2943 insertions, 3007 deletions
diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx index b828efb990b6..c4174f0304d4 100644 --- a/avmedia/source/framework/MediaControlBase.cxx +++ b/avmedia/source/framework/MediaControlBase.cxx @@ -97,27 +97,27 @@ void MediaControlBase::UpdateTimeSlider( MediaItem aMediaItem ) void MediaControlBase::InitializeWidgets() { - mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, GetImage(AVMEDIA_TOOLBOXITEM_PLAY), OUString( AVMEDIA_RESID( AVMEDIA_STR_PLAY ) ), ToolBoxItemBits::CHECKABLE ); + mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, GetImage(AVMEDIA_TOOLBOXITEM_PLAY), OUString( AvmResId( AVMEDIA_STR_PLAY ) ), ToolBoxItemBits::CHECKABLE ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PLAY, HID_AVMEDIA_TOOLBOXITEM_PLAY ); - mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, GetImage(AVMEDIA_TOOLBOXITEM_PAUSE), OUString( AVMEDIA_RESID( AVMEDIA_STR_PAUSE ) ), ToolBoxItemBits::CHECKABLE ); + mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, GetImage(AVMEDIA_TOOLBOXITEM_PAUSE), OUString( AvmResId( AVMEDIA_STR_PAUSE ) ), ToolBoxItemBits::CHECKABLE ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PAUSE, HID_AVMEDIA_TOOLBOXITEM_PAUSE ); - mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_STOP, GetImage(AVMEDIA_TOOLBOXITEM_STOP), OUString( AVMEDIA_RESID( AVMEDIA_STR_STOP ) ), ToolBoxItemBits::CHECKABLE ); + mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_STOP, GetImage(AVMEDIA_TOOLBOXITEM_STOP), OUString( AvmResId( AVMEDIA_STR_STOP ) ), ToolBoxItemBits::CHECKABLE ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_STOP, HID_AVMEDIA_TOOLBOXITEM_STOP ); mpPlayToolBox->InsertSeparator(); - mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, GetImage(AVMEDIA_TOOLBOXITEM_LOOP), OUString( AVMEDIA_RESID( AVMEDIA_STR_LOOP ) ) ); + mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, GetImage(AVMEDIA_TOOLBOXITEM_LOOP), OUString( AvmResId( AVMEDIA_STR_LOOP ) ) ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_LOOP, HID_AVMEDIA_TOOLBOXITEM_LOOP ); - mpMuteToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, GetImage(AVMEDIA_TOOLBOXITEM_MUTE), OUString( AVMEDIA_RESID( AVMEDIA_STR_MUTE ) ) ); + mpMuteToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, GetImage(AVMEDIA_TOOLBOXITEM_MUTE), OUString( AvmResId( AVMEDIA_STR_MUTE ) ) ); mpMuteToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_MUTE, HID_AVMEDIA_TOOLBOXITEM_MUTE ); - mpZoomListBox->InsertEntry( OUString( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_50 ) ), AVMEDIA_ZOOMLEVEL_50 ); - mpZoomListBox->InsertEntry( OUString( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_100 ) ), AVMEDIA_ZOOMLEVEL_100 ); - mpZoomListBox->InsertEntry( OUString( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_200 ) ), AVMEDIA_ZOOMLEVEL_200 ); - mpZoomListBox->InsertEntry( OUString( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_FIT ) ), AVMEDIA_ZOOMLEVEL_FIT ); + mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_50 ) ), AVMEDIA_ZOOMLEVEL_50 ); + mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_100 ) ), AVMEDIA_ZOOMLEVEL_100 ); + mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_200 ) ), AVMEDIA_ZOOMLEVEL_200 ); + mpZoomListBox->InsertEntry( OUString( AvmResId( AVMEDIA_STR_ZOOM_FIT ) ), AVMEDIA_ZOOMLEVEL_FIT ); mpZoomListBox->SetHelpId( HID_AVMEDIA_ZOOMLISTBOX ); const OUString aTimeText( " 00:00:00/00:00:00 " ); diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 698042eb9a73..be6528b44e8b 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -89,7 +89,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl mpZoomListBox->SetSizePixel( Size( mpTimeEdit->GetSizePixel().Width(), 260 ) ); mpZoomListBox->SetSelectHdl( LINK( this, MediaControl, implZoomSelectHdl ) ); - mpZoomToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_ZOOM, OUString( AVMEDIA_RESID( AVMEDIA_STR_ZOOM ) ) ); + mpZoomToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_ZOOM, OUString( AvmResId( AVMEDIA_STR_ZOOM ) ) ); mpZoomToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_ZOOM, HID_AVMEDIA_ZOOMLISTBOX ); mpZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, mpZoomListBox ); @@ -98,7 +98,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl mpZoomToolBox->Show(); maMinSize.Width() += mpZoomToolBox->GetSizePixel().Width(); - const OUString aMediaPath( AVMEDIA_RESID( AVMEDIA_MEDIA_PATH_DEFAULT ) ); + const OUString aMediaPath( AvmResId( AVMEDIA_MEDIA_PATH_DEFAULT ) ); mpMediaPath->SetText(aMediaPath); mpMediaPath->SetUpdateMode( false ); mpMediaPath->SetSizePixel( Size( mpMediaPath->GetTextWidth( aMediaPath ) + 400, mpPlayToolBox->GetSizePixel().Height() ) ); // maybe extend the no. 400 to span the screen width @@ -123,9 +123,9 @@ void MediaControl::InitializeWidgets() { if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE ) { - mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), OUString( AVMEDIA_RESID( AVMEDIA_STR_OPEN ) ) ); + mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), OUString( AvmResId( AVMEDIA_STR_OPEN ) ) ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN ); - mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_INSERT, GetImage(AVMEDIA_TOOLBOXITEM_INSERT), OUString( AVMEDIA_RESID( AVMEDIA_STR_INSERT ) ) ); + mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_INSERT, GetImage(AVMEDIA_TOOLBOXITEM_INSERT), OUString( AvmResId( AVMEDIA_STR_INSERT ) ) ); mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_INSERT, HID_AVMEDIA_TOOLBOXITEM_INSERT ); mpPlayToolBox->InsertSeparator(); } @@ -170,7 +170,7 @@ const Size& MediaControl::getMinSizePixel() const void MediaControl::UpdateURLField(MediaItem tempItem) { - const OUString aURL( OUString(AVMEDIA_RESID(AVMEDIA_MEDIA_PATH)) + ": " + tempItem.getURL() ) ; + const OUString aURL( OUString(AvmResId(AVMEDIA_MEDIA_PATH)) + ": " + tempItem.getURL() ) ; mpMediaPath->SetText(aURL); mpMediaPath->SetUpdateMode( false ); mpMediaPath->SetSizePixel( Size( mpMediaPath->GetTextWidth( aURL ) + 8, mpPlayToolBox->GetSizePixel().Height() ) ); diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index 881ce0760244..0a0c86f88c8c 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -57,7 +57,7 @@ MediaFloater::MediaFloater( SfxBindings* _pBindings, SfxChildWindow* pCW, vcl::W SetPosSizePixel( Point( 0, 0 ), aSize ); SetMinOutputSizePixel( aSize ); - SetText( OUString( AVMEDIA_RESID( AVMEDIA_STR_MEDIAPLAYER ) ) ); + SetText( OUString( AvmResId( AVMEDIA_STR_MEDIAPLAYER ) ) ); mpMediaWindow->show(); } diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index f6db84cc2ecb..aefc6ac49c0b 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -21,10 +21,17 @@ #define INCLUDED_AVMEDIA_SOURCE_INC_MEDIAMISC_HXX #include <config_features.h> +#include <tools/resid.hxx> -class ResMgr; +namespace avmedia +{ + ResMgr* GetResMgr(); +} -#define AVMEDIA_RESID( nId ) ResId( nId, * ::avmedia::GetResMgr() ) +inline OUString AvmResId(sal_uInt16 nId) +{ + return ResId(nId, * ::avmedia::GetResMgr()); +} #define AVMEDIA_MANAGER_SERVICE_PREFERRED "com.sun.star.comp.avmedia.Manager_VLC" #ifdef _WIN32 @@ -48,12 +55,6 @@ class ResMgr; #define AVMEDIA_MIMETYPE_JSON "model/vnd.gltf+json" #endif - -namespace avmedia -{ - ResMgr* GetResMgr(); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index 811ac0e1f7d5..8145cea56b32 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -219,7 +219,7 @@ bool MediaWindow::executeMediaURLDialog(OUString& rURL, bool *const o_pbLink) static const char aSeparator[] = ";"; OUString aAllTypes; - aDlg.SetTitle( AVMEDIA_RESID( (o_pbLink) + aDlg.SetTitle( AvmResId( (o_pbLink) ? AVMEDIA_STR_INSERTMEDIA_DLG : AVMEDIA_STR_OPENMEDIA_DLG ) ); getMediaFilters( aFilters ); @@ -236,7 +236,7 @@ bool MediaWindow::executeMediaURLDialog(OUString& rURL, bool *const o_pbLink) } // add filter for all media types - aDlg.AddFilter( AVMEDIA_RESID( AVMEDIA_STR_ALL_MEDIAFILES ), aAllTypes ); + aDlg.AddFilter( AvmResId( AVMEDIA_STR_ALL_MEDIAFILES ), aAllTypes ); for( FilterNameVector::size_type i = 0; i < aFilters.size(); ++i ) { @@ -255,7 +255,7 @@ bool MediaWindow::executeMediaURLDialog(OUString& rURL, bool *const o_pbLink) } // add filter for all types - aDlg.AddFilter( AVMEDIA_RESID( AVMEDIA_STR_ALL_FILES ), "*.*" ); + aDlg.AddFilter( AvmResId( AVMEDIA_STR_ALL_FILES ), "*.*" ); uno::Reference<ui::dialogs::XFilePicker2> const xFP(aDlg.GetFilePicker()); uno::Reference<ui::dialogs::XFilePickerControlAccess> const xCtrlAcc(xFP, @@ -297,7 +297,7 @@ bool MediaWindow::executeMediaURLDialog(OUString& rURL, bool *const o_pbLink) void MediaWindow::executeFormatErrorBox( vcl::Window* pParent ) { - ScopedVclPtrInstance< MessageDialog > aErrBox( pParent, AVMEDIA_RESID( AVMEDIA_STR_ERR_URL ) ); + ScopedVclPtrInstance< MessageDialog > aErrBox( pParent, AvmResId( AVMEDIA_STR_ERR_URL ) ); aErrBox->Execute(); aErrBox.disposeAndClear(); diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 6dee3ba0f564..f182f15ba311 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -711,7 +711,7 @@ LibInfo::Item::~Item () bool QueryDel( const OUString& rName, const ResId& rId, vcl::Window* pParent ) { - OUString aQuery(rId.toString()); + OUString aQuery(rId); OUStringBuffer aNameBuf( rName ); aNameBuf.append('\''); aNameBuf.insert(0, '\''); diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index f2f2a68961ea..c9e4a153338d 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -104,7 +104,7 @@ void BasicDLL::BasicBreak() { bJustStopping = true; StarBASIC::Stop(); - ScopedVclPtrInstance<InfoBox>(nullptr, BasResId(IDS_SBERR_TERMINATED).toString())->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, BasResId(IDS_SBERR_TERMINATED))->Execute(); bJustStopping = false; } } diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 5e73e62f2db7..8a5d59573d2d 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -826,13 +826,13 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const // initialize the Basic-formater help object: // get resources for predefined output // of the Format()-command, e. g. for "On/Off" - OUString aOnStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_ON).toString(); - OUString aOffStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_OFF).toString(); - OUString aYesStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_YES).toString(); - OUString aNoStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_NO).toString(); - OUString aTrueStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_TRUE).toString(); - OUString aFalseStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_FALSE).toString(); - OUString aCurrencyFormatStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_CURRENCY).toString(); + OUString aOnStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_ON); + OUString aOffStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_OFF); + OUString aYesStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_YES); + OUString aNoStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_NO); + OUString aTrueStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_TRUE); + OUString aFalseStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_FALSE); + OUString aCurrencyFormatStrg = SbxValueFormatResId(STR_BASICKEY_FORMAT_CURRENCY); rAppData.pBasicFormater = o3tl::make_unique<SbxBasicFormater>( cComma,c1000,aOnStrg,aOffStrg, diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 188eb1409974..6c4a4814ae61 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -106,13 +106,13 @@ namespace { OUString lcl_makeColorName(const Color& rColor) { - OUString aStr = SVX_RESSTR(RID_SVXFLOAT3D_FIX_R) + + OUString aStr = SvxResId(RID_SVXFLOAT3D_FIX_R) + OUString::number(rColor.GetRed()) + " " + - SVX_RESSTR(RID_SVXFLOAT3D_FIX_G) + + SvxResId(RID_SVXFLOAT3D_FIX_G) + OUString::number(rColor.GetGreen()) + " " + - SVX_RESSTR(RID_SVXFLOAT3D_FIX_B) + + SvxResId(RID_SVXFLOAT3D_FIX_B) + OUString::number(rColor.GetBlue()); return aStr; } diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 489dbf02bbb9..6c98f4f77015 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -385,7 +385,7 @@ void ChartController::impl_PasteShapes( SdrModel* pModel ) if ( pDestPage ) { Reference< drawing::XShape > xSelShape; - m_pDrawViewWrapper->BegUndo( SVX_RESSTR( RID_SVX_3D_UNDO_EXCHANGE_PASTE ) ); + m_pDrawViewWrapper->BegUndo( SvxResId( RID_SVX_3D_UNDO_EXCHANGE_PASTE ) ); sal_uInt16 nCount = pModel->GetPageCount(); for ( sal_uInt16 i = 0; i < nCount; ++i ) { @@ -470,7 +470,7 @@ void ChartController::impl_PasteStringAsTextShape( const OUString& rString, cons SdrObject* pObj = DrawViewWrapper::getSdrObject( xTextShape ); if ( pObj ) { - m_pDrawViewWrapper->BegUndo( SVX_RESSTR( RID_SVX_3D_UNDO_EXCHANGE_PASTE ) ); + m_pDrawViewWrapper->BegUndo( SvxResId( RID_SVX_3D_UNDO_EXCHANGE_PASTE ) ); m_pDrawViewWrapper->AddUndo( new SdrUndoInsertObj( *pObj ) ); m_pDrawViewWrapper->EndUndo(); diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 22f3bb95ad29..d1e6488c052c 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -93,7 +93,7 @@ bool DrawCommandDispatch::isFeatureSupported( const OUString& rCommandURL ) XLineEndListRef pLineEndList = rModel.GetLineEndList(); if ( pLineEndList.is() ) { - OUString aName( SVX_RESSTR( nResId ) ); + OUString aName( SvxResId( nResId ) ); long nCount = pLineEndList->Count(); for ( long nIndex = 0; nIndex < nCount; ++nIndex ) { @@ -215,7 +215,7 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr ) } } - rAttr.Put( XLineEndItem( SVX_RESSTR( RID_SVXSTR_ARROW ), aArrow ) ); + rAttr.Put( XLineEndItem( SvxResId( RID_SVXSTR_ARROW ), aArrow ) ); rAttr.Put( XLineEndWidthItem( nWidth ) ); } } diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx index ed78d54188eb..25ff8605d9f7 100644 --- a/chart2/source/controller/main/UndoCommandDispatch.cxx +++ b/chart2/source/controller/main/UndoCommandDispatch.cxx @@ -69,9 +69,9 @@ void UndoCommandDispatch::fireStatusEvent( const bool bFireAll = rURL.isEmpty(); uno::Any aUndoState, aRedoState; if( m_xUndoManager->isUndoPossible()) - aUndoState <<= ( SVT_RESSTR( STR_UNDO ) + m_xUndoManager->getCurrentUndoActionTitle()); + aUndoState <<= ( SvtResId( STR_UNDO ) + m_xUndoManager->getCurrentUndoActionTitle()); if( m_xUndoManager->isRedoPossible()) - aRedoState <<= ( SVT_RESSTR( STR_REDO ) + m_xUndoManager->getCurrentRedoActionTitle()); + aRedoState <<= ( SvtResId( STR_REDO ) + m_xUndoManager->getCurrentRedoActionTitle()); if( bFireAll || rURL == ".uno:Undo" ) fireStatusEventForURL( ".uno:Undo", aUndoState, m_xUndoManager->isUndoPossible(), xSingleListener ); diff --git a/chart2/source/inc/ResId.hxx b/chart2/source/inc/ResId.hxx index 802eea9c7277..0eefc83d5362 100644 --- a/chart2/source/inc/ResId.hxx +++ b/chart2/source/inc/ResId.hxx @@ -19,18 +19,13 @@ #ifndef INCLUDED_CHART2_SOURCE_INC_RESID_HXX #define INCLUDED_CHART2_SOURCE_INC_RESID_HXX -#include <tools/resid.hxx> #include <rtl/ustring.hxx> #include "charttoolsdllapi.hxx" namespace chart { -class OOO_DLLPUBLIC_CHARTTOOLS SchResId : public ResId -{ -public: - SchResId( sal_Int16 nId ); -}; +OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(sal_uInt16 nId); } // namespace chart diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx index 84e53f2c514e..59d5cb1b6dee 100644 --- a/chart2/source/tools/InternalData.cxx +++ b/chart2/source/tools/InternalData.cxx @@ -21,6 +21,7 @@ #include "ResId.hxx" #include "Strings.hrc" +#include <osl/diagnose.h> #include <rtl/math.hxx> #ifdef DEBUG_CHART2_TOOLS #define DEBUG_INTERNAL_DATA 1 diff --git a/chart2/source/tools/ResId.cxx b/chart2/source/tools/ResId.cxx index 61e6755f3e90..6bff5b7efc0e 100644 --- a/chart2/source/tools/ResId.cxx +++ b/chart2/source/tools/ResId.cxx @@ -19,15 +19,14 @@ #include "ResId.hxx" #include "ResourceManager.hxx" +#include <tools/resid.hxx> namespace chart { - - SchResId::SchResId( sal_Int16 nId ) - : ResId( nId, ResourceManager::getResourceManager() ) + OUString SchResId(sal_uInt16 nId) { + return ResId(nId, ResourceManager::getResourceManager()); } - } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index f5d90803fc58..0ee24f8631b1 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -725,9 +725,9 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const , m_pStringItem() , m_pFontItem() , m_pFileDlg(nullptr) - , aLoadAccelConfigStr(CUI_RES(RID_SVXSTR_LOADACCELCONFIG)) - , aSaveAccelConfigStr(CUI_RES(RID_SVXSTR_SAVEACCELCONFIG)) - , aFilterCfgStr(CUI_RES(RID_SVXSTR_FILTERNAME_CFG)) + , aLoadAccelConfigStr(CuiResId(RID_SVXSTR_LOADACCELCONFIG)) + , aSaveAccelConfigStr(CuiResId(RID_SVXSTR_SAVEACCELCONFIG)) + , aFilterCfgStr(CuiResId(RID_SVXSTR_FILTERNAME_CFG)) , m_bStylesInfoInitialized(false) , m_xGlobal() , m_xModule() diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index d01b948205b3..c28e5f4528fb 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -2283,7 +2283,7 @@ IMPL_LINK_NOARG( SvxConfigPage, AsyncInfoMsg, void*, void ) { // Asynchronous msg because of D&D ScopedVclPtrInstance<MessageDialog>(this, - CUI_RES( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ), + CuiResId( RID_SVXSTR_MNUCFG_ALREADY_INCLUDED ), VclMessageType::Info)->Execute(); } @@ -2421,7 +2421,7 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe if ( !bIsMenuBar ) { - m_pTopLevel->set_label( CUI_RES( RID_SVXSTR_PRODUCTNAME_CONTEXTMENUS ) ); + m_pTopLevel->set_label( CuiResId( RID_SVXSTR_PRODUCTNAME_CONTEXTMENUS ) ); m_pNewTopLevelButton->Hide(); pMenu->HideItem( pMenu->GetItemId( "move" ) ); pMenu->HideItem( pMenu->GetItemId( "menuitem3" ) ); @@ -2561,7 +2561,7 @@ void SvxMenuConfigPage::DeleteSelectedContent() short SvxMenuConfigPage::QueryReset() { - OUString msg = CUI_RES( RID_SVXSTR_CONFIRM_MENU_RESET ); + OUString msg = CuiResId( RID_SVXSTR_CONFIRM_MENU_RESET ); OUString saveInName = m_pSaveInListBox->GetEntry( m_pSaveInListBox->GetSelectEntryPos() ); @@ -2617,11 +2617,11 @@ IMPL_LINK( SvxMenuConfigPage, MenuSelectHdl, MenuButton *, pButton, void ) SvxConfigEntry* pMenuData = GetTopLevelSelection(); OUString aNewName( stripHotKey( pMenuData->GetName() ) ); - OUString aDesc = CUI_RES( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME ); VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU ); - pNameDialog->SetText( CUI_RES( RID_SVXSTR_RENAME_MENU ) ); + pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_MENU ) ); if ( pNameDialog->Execute() == RET_OK ) { pNameDialog->GetName( aNewName ); @@ -2661,11 +2661,11 @@ IMPL_LINK( SvxMenuConfigPage, EntrySelectHdl, MenuButton *, pButton, void ) static_cast<SvxConfigEntry*>(pActEntry->GetUserData()); OUString aNewName( stripHotKey( pEntry->GetName() ) ); - OUString aDesc = CUI_RES( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME ); VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM ); - pNameDialog->SetText( CUI_RES( RID_SVXSTR_RENAME_MENU ) ); + pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_MENU ) ); if ( pNameDialog->Execute() == RET_OK ) { pNameDialog->GetName(aNewName); @@ -2716,7 +2716,7 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, AddCommandsHdl, Button *, void ) m_pSelectorDlg->SetAddHdl( LINK( this, SvxMenuConfigPage, AddFunctionHdl ) ); - m_pSelectorDlg->SetDialogDescription( CUI_RES( RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION ) ); + m_pSelectorDlg->SetDialogDescription( CuiResId( RID_SVXSTR_MENU_ADDCOMMANDS_DESCRIPTION ) ); } // Position the Script Selector over the Add button so it is @@ -2743,11 +2743,11 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, AddSeparatorHdl, Button *, void ) IMPL_LINK_NOARG( SvxMenuConfigPage, AddSubmenuHdl, Button *, void ) { OUString aNewName; - OUString aDesc = CUI_RES( RID_SVXSTR_SUBMENU_NAME ); + OUString aDesc = CuiResId( RID_SVXSTR_SUBMENU_NAME ); VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_NAME_SUBMENU ); - pNameDialog->SetText( CUI_RES( RID_SVXSTR_ADD_SUBMENU ) ); + pNameDialog->SetText( CuiResId( RID_SVXSTR_ADD_SUBMENU ) ); if ( pNameDialog->Execute() == RET_OK ) { @@ -2828,7 +2828,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( if ( bCreateMenu ) { // Generate custom name for new menu - OUString prefix = CUI_RES( RID_SVXSTR_NEW_MENU ); + OUString prefix = CuiResId( RID_SVXSTR_NEW_MENU ); OUString newname = generateCustomName( prefix, entries ); OUString newurl = generateCustomMenuURL( mpEntries ); @@ -2859,7 +2859,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog( // hide name label and textfield m_pMenuBox->Hide(); // change the title - SetText( CUI_RES( RID_SVXSTR_MOVE_MENU ) ); + SetText( CuiResId( RID_SVXSTR_MOVE_MENU ) ); } m_pMenuListBox->SetSelectHdl( @@ -3072,12 +3072,12 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(vcl::Window *pParent, const SfxItemSe m_pMoveDownButton->SetHelpId( HID_SVX_DOWN_TOOLBAR_ITEM ); m_pDescriptionField->SetHelpId ( HID_SVX_DESCFIELD ); - m_pTopLevel->set_label(CUI_RES(RID_SVXSTR_PRODUCTNAME_TOOLBARS)); + m_pTopLevel->set_label(CuiResId(RID_SVXSTR_PRODUCTNAME_TOOLBARS)); - m_pTopLevelLabel->SetText( CUI_RES( RID_SVXSTR_TOOLBAR ) ); - m_pModifyTopLevelButton->SetText( CUI_RES( RID_SVXSTR_TOOLBAR ) ); - m_pContents->set_label(CUI_RES(RID_SVXSTR_TOOLBAR_CONTENT)); - m_pContentsLabel->SetText( CUI_RES( RID_SVXSTR_COMMANDS ) ); + m_pTopLevelLabel->SetText( CuiResId( RID_SVXSTR_TOOLBAR ) ); + m_pModifyTopLevelButton->SetText( CuiResId( RID_SVXSTR_TOOLBAR ) ); + m_pContents->set_label(CuiResId(RID_SVXSTR_TOOLBAR_CONTENT)); + m_pContentsLabel->SetText( CuiResId( RID_SVXSTR_COMMANDS ) ); // The reset button will be used in the toolbar config tab m_pResetTopLevelButton->Show(); @@ -3239,7 +3239,7 @@ void SvxToolbarConfigPage::DeleteSelectedContent() GetTopLevelSelection()->IsDeletable() ) { ScopedVclPtrInstance<MessageDialog> qbox(this, - CUI_RES(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VclMessageType::Question, VclButtonsType::YesNo); + CuiResId(RID_SXVSTR_CONFIRM_DELETE_TOOLBAR), VclMessageType::Question, VclButtonsType::YesNo); if ( qbox->Execute() == RET_YES ) { @@ -3288,11 +3288,11 @@ IMPL_LINK( SvxToolbarConfigPage, ToolbarSelectHdl, MenuButton *, pButton, void ) else if (sCommand == "modtoolrename") { OUString aNewName( stripHotKey( pToolbar->GetName() ) ); - OUString aDesc = CUI_RES( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME ); VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR ); - pNameDialog->SetText( CUI_RES( RID_SVXSTR_RENAME_TOOLBAR ) ); + pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_TOOLBAR ) ); if ( pNameDialog->Execute() == RET_OK ) { @@ -3327,11 +3327,11 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void ) static_cast<SvxConfigEntry*>(pActEntry->GetUserData()); OUString aNewName( stripHotKey( pEntry->GetName() ) ); - OUString aDesc = CUI_RES( RID_SVXSTR_LABEL_NEW_NAME ); + OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME ); VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc ); pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_TOOLBAR_ITEM ); - pNameDialog->SetText( CUI_RES( RID_SVXSTR_RENAME_TOOLBAR ) ); + pNameDialog->SetText( CuiResId( RID_SVXSTR_RENAME_TOOLBAR ) ); if ( pNameDialog->Execute() == RET_OK ) { pNameDialog->GetName(aNewName); @@ -4413,7 +4413,7 @@ void SvxToolbarConfigPage::UpdateButtonStates() short SvxToolbarConfigPage::QueryReset() { - OUString msg = CUI_RES( RID_SVXSTR_CONFIRM_TOOLBAR_RESET ); + OUString msg = CuiResId( RID_SVXSTR_CONFIRM_TOOLBAR_RESET ); OUString saveInName = m_pSaveInListBox->GetEntry( m_pSaveInListBox->GetSelectEntryPos() ); @@ -4539,7 +4539,7 @@ IMPL_LINK( SvxToolbarConfigPage, StyleChangeHdl, Button*, pButton, void ) IMPL_LINK_NOARG( SvxToolbarConfigPage, NewToolbarHdl, Button *, void ) { - OUString prefix = CUI_RES( RID_SVXSTR_NEW_TOOLBAR ); + OUString prefix = CuiResId( RID_SVXSTR_NEW_TOOLBAR ); OUString aNewName = generateCustomName( prefix, GetSaveInData()->GetEntries() ); @@ -4646,7 +4646,7 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, ResetTopLevelHdl, Button *, void ) static_cast<SvxConfigEntry*>(m_pTopLevelListBox->GetEntryData( nSelectionPos )); ScopedVclPtrInstance<MessageDialog> qbox(this, - CUI_RES(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VclButtonsType::YesNo); + CuiResId(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT), VclMessageType::Question, VclButtonsType::YesNo); if ( qbox->Execute() == RET_YES ) { @@ -5204,7 +5204,7 @@ IMPL_LINK_NOARG( SvxIconSelectorDialog, ImportHdl, Button *, void) IMPL_LINK_NOARG( SvxIconSelectorDialog, DeleteHdl, Button *, void ) { - OUString message = CUI_RES( RID_SVXSTR_DELETE_ICON_CONFIRM ); + OUString message = CuiResId( RID_SVXSTR_DELETE_ICON_CONFIRM ); if (ScopedVclPtrInstance<WarningBox>(this, WinBits(WB_OK_CANCEL), message)->Execute() == RET_OK) { ToolBox::ImplToolItems::size_type nCount = pTbSymbol->GetItemCount(); @@ -5492,21 +5492,21 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL ) SvxIconReplacementDialog::SvxIconReplacementDialog( vcl::Window *pWindow, const OUString& aMessage, bool /*bYestoAll*/ ) : -MessBox( pWindow, WB_DEF_YES, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) +MessBox( pWindow, WB_DEF_YES, CuiResId( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CuiResId( RID_SVXSTR_REPLACE_ICON_WARNING ) ) { SetImage( WarningBox::GetStandardImage() ); SetMessText( ReplaceIconName( aMessage ) ); RemoveButton( 1 ); AddButton( StandardButtonType::Yes, 2); - AddButton( CUI_RES( RID_SVXSTR_YESTOALL ), 5); + AddButton( CuiResId( RID_SVXSTR_YESTOALL ), 5); AddButton( StandardButtonType::No, 3); AddButton( StandardButtonType::Cancel, 4); } SvxIconReplacementDialog::SvxIconReplacementDialog( vcl::Window *pWindow, const OUString& aMessage ) - : MessBox( pWindow, WB_YES_NO_CANCEL, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) ) + : MessBox( pWindow, WB_YES_NO_CANCEL, CuiResId( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CuiResId( RID_SVXSTR_REPLACE_ICON_WARNING ) ) { SetImage( WarningBox::GetStandardImage() ); SetMessText( ReplaceIconName( aMessage )); @@ -5515,7 +5515,7 @@ SvxIconReplacementDialog::SvxIconReplacementDialog( OUString SvxIconReplacementDialog::ReplaceIconName( const OUString& rMessage ) { OUString name; - OUString message = CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ); + OUString message = CuiResId( RID_SVXSTR_REPLACE_ICON_WARNING ); OUString placeholder("%ICONNAME" ); sal_Int32 pos = message.indexOf( placeholder ); if ( pos != -1 ) diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 1d43a3182fac..93e86d1bb437 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -388,11 +388,11 @@ SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() : m_libImage(BitmapEx(RID_CUIBMP_LIB)), m_macImage(BitmapEx(RID_CUIBMP_MACRO)), m_docImage(BitmapEx(RID_CUIBMP_DOC)), - m_sMyMacros(CUI_RES(RID_SVXSTR_MYMACROS)), - m_sProdMacros(CUI_RES(RID_SVXSTR_PRODMACROS)), - m_sMacros(CUI_RES(RID_SVXSTR_BASICMACROS)), - m_sDlgMacros(CUI_RES(RID_SVXSTR_PRODMACROS)), - m_aStrGroupStyles(CUI_RES(RID_SVXSTR_GROUP_STYLES)), + m_sMyMacros(CuiResId(RID_SVXSTR_MYMACROS)), + m_sProdMacros(CuiResId(RID_SVXSTR_PRODMACROS)), + m_sMacros(CuiResId(RID_SVXSTR_BASICMACROS)), + m_sDlgMacros(CuiResId(RID_SVXSTR_PRODMACROS)), + m_aStrGroupStyles(CuiResId(RID_SVXSTR_GROUP_STYLES)), m_collapsedImage(BitmapEx(RID_CUIBMP_COLLAPSED)), m_expandedImage(BitmapEx(RID_CUIBMP_EXPANDED)) { @@ -461,7 +461,7 @@ void SfxConfigGroupListBox::InitModule() if ( c1 ) { // Add All Commands category - SvTreeListEntry* pEntry = InsertEntry( CUI_RES(RID_SVXSTR_ALLFUNCTIONS) ); + SvTreeListEntry* pEntry = InsertEntry( CuiResId(RID_SVXSTR_ALLFUNCTIONS) ); aArr.push_back( o3tl::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::GROUP_ALLFUNCTIONS, 0 ) ); pEntry->SetUserData(aArr.back().get()); } @@ -1176,7 +1176,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog( if (m_bShowSlots) { // If we are showing Slot API commands update labels in the UI - SetText(CUI_RES(RID_SVXSTR_SELECTOR_ADD_COMMANDS)); + SetText(CuiResId(RID_SVXSTR_SELECTOR_ADD_COMMANDS)); get(m_pCancelButton, "close"); get(m_pDialogDescription, "helptoolbar"); get(m_pOKButton, "add"); @@ -1306,7 +1306,7 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton, void ) void SvxScriptSelectorDialog::SetRunLabel() { - m_pOKButton->SetText(CUI_RES(RID_SVXSTR_SELECTOR_RUN)); + m_pOKButton->SetText(CuiResId(RID_SVXSTR_SELECTOR_RUN)); } void diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 343fd5dabb10..1175bd9ec45e 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -530,7 +530,7 @@ void SvxMacroTabPage_::DisplayAppEvents( bool appEvents) } OUString eventURL = h_it->second.second; - OUString displayName(CUI_RES(displayableEvent->nEventResourceID)); + OUString displayName(CuiResId(displayableEvent->nEventResourceID)); displayName += "\t"; diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 01db8f5688e8..e88feb3fafcf 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -247,7 +247,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni RID_STR_SEARCH_WHOLE }; for (unsigned short nResId : nResIds) - m_plbPosition->InsertEntry( OUString( CUI_RES( nResId ) ) ); + m_plbPosition->InsertEntry( OUString( CuiResId( nResId ) ) ); m_plbPosition->SelectEntryPos(MATCHING_ANYWHERE); // the field listbox @@ -438,7 +438,7 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox&, rBox, void) // direction -> pass on and reset the checkbox-text for StartOver else if (&rBox == m_pcbBackwards) { - m_pcbStartOver->SetText( OUString( CUI_RES( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) ) ); + m_pcbStartOver->SetText( OUString( CuiResId( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) ) ); m_pSearchEngine->SetDirection(!bChecked); } // similarity-search or regular expression @@ -702,7 +702,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, const FmSearchProgress*, pProgress, case FmSearchProgress::State::Progress: if (pProgress->bOverflow) { - OUString sHint( CUI_RES( m_pcbBackwards->IsChecked() ? RID_STR_OVERFLOW_BACKWARD : RID_STR_OVERFLOW_FORWARD ) ); + OUString sHint( CuiResId( m_pcbBackwards->IsChecked() ? RID_STR_OVERFLOW_BACKWARD : RID_STR_OVERFLOW_FORWARD ) ); m_pftHint->SetText( sHint ); m_pftHint->Invalidate(); } @@ -712,7 +712,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, const FmSearchProgress*, pProgress, break; case FmSearchProgress::State::ProgressCounting: - m_pftHint->SetText(CUI_RES(RID_STR_SEARCH_COUNTING)); + m_pftHint->SetText(CuiResId(RID_STR_SEARCH_COUNTING)); m_pftHint->Invalidate(); m_pftRecord->SetText(OUString::number(pProgress->nCurrentRecord)); @@ -730,7 +730,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, const FmSearchProgress*, pProgress, sal_uInt16 nErrorId = (FmSearchProgress::State::Error == pProgress->aSearchState) ? RID_STR_SEARCH_GENERAL_ERROR : RID_STR_SEARCH_NORECORD; - ScopedVclPtrInstance<MessageDialog>(this, CUI_RES(nErrorId))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, CuiResId(nErrorId))->Execute(); SAL_FALLTHROUGH; } case FmSearchProgress::State::Canceled: diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index ff298167227d..273363e384cd 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -559,7 +559,7 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl, Button*, void) if( ( pInfo->GetId() == nId ) && ( pInfo->GetThemeName() != pThm->GetName() ) ) { - OUString aStr( CUI_RES( RID_SVXSTR_GALLERY_ID_EXISTS ) ); + OUString aStr( CuiResId( RID_SVXSTR_GALLERY_ID_EXISTS ) ); aStr += " (" + pInfo->GetThemeName() + ")"; @@ -592,7 +592,7 @@ GalleryThemeProperties::GalleryThemeProperties(vcl::Window* pParent, OUString aText = GetText() + pData->pTheme->GetName(); if( pData->pTheme->IsReadOnly() ) - aText += CUI_RES( RID_SVXSTR_GALLERY_READONLY ); + aText += CuiResId( RID_SVXSTR_GALLERY_READONLY ); SetText( aText ); } @@ -645,9 +645,9 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) GalleryTheme* pThm = pData->pTheme; OUString aOutStr( OUString::number(pThm->GetObjectCount()) ); - OUString aObjStr( CUI_RES( RID_SVXSTR_GALLERYPROPS_OBJECT ) ); + OUString aObjStr( CuiResId( RID_SVXSTR_GALLERYPROPS_OBJECT ) ); OUString aAccess; - OUString aType( SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ); + OUString aType( SvxResId( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ); bool bReadOnly = pThm->IsReadOnly(); m_pEdtMSName->SetText( pThm->GetName() ); @@ -659,7 +659,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData ) m_pEdtMSName->Enable(); if( pThm->IsReadOnly() ) - aType += CUI_RES( RID_SVXSTR_GALLERY_READONLY ); + aType += CuiResId( RID_SVXSTR_GALLERY_READONLY ); m_pFtMSShowType->SetText( aType ); m_pFtMSShowPath->SetText( pThm->GetSdgURL().GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ) ); @@ -748,7 +748,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) m_pCbbFileType->EnableDDAutoWidth( false ); m_pLbxFound->SetDoubleClickHdl(LINK(this, TPGalleryThemeProperties, DClickFoundHdl)); m_pLbxFound->SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFoundHdl)); - m_pLbxFound->InsertEntry(OUString(CUI_RES(RID_SVXSTR_GALLERY_NOFILES))); + m_pLbxFound->InsertEntry(OUString(CuiResId(RID_SVXSTR_GALLERY_NOFILES))); m_pLbxFound->Show(); FillFilterList(); @@ -947,7 +947,7 @@ void TPGalleryThemeProperties::FillFilterList() #endif pFilterEntry = new FilterEntry; - pFilterEntry->aFilterName = CUI_RES(RID_SVXSTR_GALLERY_ALLFILES); + pFilterEntry->aFilterName = CuiResId(RID_SVXSTR_GALLERY_ALLFILES); pFilterEntry->aFilterName = addExtension( pFilterEntry->aFilterName, aExtensions ); size_t pos = m_pCbbFileType->InsertEntry( pFilterEntry->aFilterName, 0 ); if ( pos < aFilterEntryList.size() ) { @@ -1182,7 +1182,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, EndSearchProgressHdl, Dialog&, void) } else { - m_pLbxFound->InsertEntry( OUString( CUI_RES( RID_SVXSTR_GALLERY_NOFILES ) ) ); + m_pLbxFound->InsertEntry( OUString( CuiResId( RID_SVXSTR_GALLERY_NOFILES ) ) ); m_pBtnTakeAll->Disable(); m_pCbxPreview->Disable(); bEntriesFound = false; diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 9f9e01406f89..6830ff7b320b 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -98,21 +98,21 @@ SvxHpLinkDlg::SvxHpLinkDlg (vcl::Window* pParent, SfxBindings* pBindings) aBitmap.Scale(GetDPIScaleFactor(),GetDPIScaleFactor(),BmpScaleFlag::BestQuality); aImage = Image(aBitmap); } - aStrTitle = CUI_RES( RID_SVXSTR_HYPERDLG_HLINETTP ); + aStrTitle = CuiResId( RID_SVXSTR_HYPERDLG_HLINETTP ); pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_INTERNET, aStrTitle, imgVector[0], SvxHyperlinkInternetTp::Create ); - pEntry->SetQuickHelpText( CUI_RES( RID_SVXSTR_HYPERDLG_HLINETTP_HELP ) ); - aStrTitle = CUI_RES( RID_SVXSTR_HYPERDLG_HLMAILTP ); + pEntry->SetQuickHelpText( CuiResId( RID_SVXSTR_HYPERDLG_HLINETTP_HELP ) ); + aStrTitle = CuiResId( RID_SVXSTR_HYPERDLG_HLMAILTP ); pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_MAIL, aStrTitle, imgVector[1], SvxHyperlinkMailTp::Create ); - pEntry->SetQuickHelpText( CUI_RES( RID_SVXSTR_HYPERDLG_HLMAILTP_HELP ) ); - aStrTitle = CUI_RES( RID_SVXSTR_HYPERDLG_HLDOCTP ); + pEntry->SetQuickHelpText( CuiResId( RID_SVXSTR_HYPERDLG_HLMAILTP_HELP ) ); + aStrTitle = CuiResId( RID_SVXSTR_HYPERDLG_HLDOCTP ); pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_DOCUMENT, aStrTitle, imgVector[2], SvxHyperlinkDocTp::Create ); - pEntry->SetQuickHelpText( CUI_RES( RID_SVXSTR_HYPERDLG_HLDOCTP_HELP ) ); - aStrTitle = CUI_RES( RID_SVXSTR_HYPERDLG_HLDOCNTP ); + pEntry->SetQuickHelpText( CuiResId( RID_SVXSTR_HYPERDLG_HLDOCTP_HELP ) ); + aStrTitle = CuiResId( RID_SVXSTR_HYPERDLG_HLDOCNTP ); pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT, aStrTitle, imgVector[3], SvxHyperlinkNewDocTp::Create ); - pEntry->SetQuickHelpText( CUI_RES( RID_SVXSTR_HYPERDLG_HLDOCNTP_HELP ) ); + pEntry->SetQuickHelpText( CuiResId( RID_SVXSTR_HYPERDLG_HLDOCNTP_HELP ) ); // set OK/Cancel - button - GetCancelButton().SetText ( CUI_RES(RID_SVXSTR_HYPDLG_CLOSEBUT) ); + GetCancelButton().SetText ( CuiResId(RID_SVXSTR_HYPDLG_CLOSEBUT) ); // create itemset for tabpages mpItemSet = new SfxItemSet( SfxGetpApp()->GetPool(), SID_HYPERLINK_GETLINK, diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index cb959b327987..dc33da086b0b 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -574,8 +574,8 @@ namespace svx m_pSuggestions->set_height_request( m_pSuggestions->GetTextHeight() * 5 ); m_pSuggestions->set_width_request( m_pSuggestions->approximate_char_width() * 48 ); - const OUString sHangul(CUI_RES(RID_SVXSTR_HANGUL)); - const OUString sHanja(CUI_RES(RID_SVXSTR_HANJA)); + const OUString sHangul(CuiResId(RID_SVXSTR_HANGUL)); + const OUString sHanja(CuiResId(RID_SVXSTR_HANJA)); m_pHanjaAbove->init( sHangul, sHanja, PseudoRubyText::eAbove ); m_pHanjaBelow->init( sHangul, sHanja, PseudoRubyText::eBelow ); m_pHangulAbove->init( sHanja, sHangul, PseudoRubyText::eAbove ); @@ -1730,7 +1730,7 @@ namespace svx HangulHanjaEditDictDialog::HangulHanjaEditDictDialog( vcl::Window* _pParent, HHDictList& _rDictList, sal_uInt32 _nSelDict ) :ModalDialog ( _pParent, "HangulHanjaEditDictDialog", "cui/ui/hangulhanjaeditdictdialog.ui" ) - ,m_aEditHintText ( CUI_RES(RID_SVXSTR_EDITHINT) ) + ,m_aEditHintText ( CuiResId(RID_SVXSTR_EDITHINT) ) ,m_rDictList ( _rDictList ) ,m_nCurrentDict ( 0xFFFFFFFF ) ,m_pSuggestions ( nullptr ) diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 112c27359e82..d37c5991ce80 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -275,7 +275,7 @@ bool SvxHyperlinkNewDocTp::AskApply() bool bRet = ImplGetURLObject( m_pCbbPath->GetText(), m_pCbbPath->GetBaseURL(), aINetURLObject ); if ( !bRet ) { - ScopedVclPtrInstance< WarningBox > aWarning( this, WB_OK, CUI_RES(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ); + ScopedVclPtrInstance< WarningBox > aWarning( this, WB_OK, CuiResId(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) ); aWarning->Execute(); } return bRet; @@ -323,7 +323,7 @@ void SvxHyperlinkNewDocTp::DoApply () if( bOk ) { - ScopedVclPtrInstance<WarningBox> aWarning( this, WB_YES_NO, CUI_RES(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) ); + ScopedVclPtrInstance<WarningBox> aWarning( this, WB_YES_NO, CuiResId(RID_SVXSTR_HYPERDLG_QUERYOVERWRITE) ); bCreate = aWarning->Execute() == RET_YES; } } diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx index db14236bfa33..a055a0a243ad 100644 --- a/cui/source/dialogs/hlmarkwn.cxx +++ b/cui/source/dialogs/hlmarkwn.cxx @@ -109,10 +109,10 @@ void SvxHlmarkTreeLBox::Paint(vcl::RenderContext& rRenderContext, const ::tools: switch (mpParentWnd->mnError) { case LERR_NOENTRIES : - aStrMessage = CUI_RES( RID_SVXSTR_HYPDLG_ERR_LERR_NOENTRIES ); + aStrMessage = CuiResId( RID_SVXSTR_HYPDLG_ERR_LERR_NOENTRIES ); break; case LERR_DOCNOTOPEN : - aStrMessage = CUI_RES( RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN ); + aStrMessage = CuiResId( RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN ); break; } diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index bc4172da4c4b..15e43da019e7 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -246,8 +246,8 @@ void SvxHyperlinkTabPageBase::FillStandardDlgFields ( const SvxHyperlinkItem* pH mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() ); // Form - OUString aStrFormText = CUI_RES( RID_SVXSTR_HYPERDLG_FROM_TEXT ); - OUString aStrFormButton = CUI_RES( RID_SVXSTR_HYPERDLG_FORM_BUTTON ); + OUString aStrFormText = CuiResId( RID_SVXSTR_HYPERDLG_FROM_TEXT ); + OUString aStrFormButton = CuiResId( RID_SVXSTR_HYPERDLG_FORM_BUTTON ); if( pHyperlinkItem->GetInsertMode() & HLINK_HTMLMODE ) { @@ -340,13 +340,13 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, Button*, void) SfxMacroTabPage *pMacroPage = static_cast<SfxMacroTabPage*>( aDlg->GetTabPage() ); if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseOverObject ) - pMacroPage->AddEvent( OUString( CUI_RES(RID_SVXSTR_HYPDLG_MACROACT1) ), + pMacroPage->AddEvent( OUString( CuiResId(RID_SVXSTR_HYPDLG_MACROACT1) ), SFX_EVENT_MOUSEOVER_OBJECT ); if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseClickObject ) - pMacroPage->AddEvent( OUString( CUI_RES(RID_SVXSTR_HYPDLG_MACROACT2) ), + pMacroPage->AddEvent( OUString( CuiResId(RID_SVXSTR_HYPDLG_MACROACT2) ), SFX_EVENT_MOUSECLICK_OBJECT); if ( pHyperlinkItem->GetMacroEvents() & HyperDialogEvent::MouseOutObject ) - pMacroPage->AddEvent( OUString( CUI_RES(RID_SVXSTR_HYPDLG_MACROACT3) ), + pMacroPage->AddEvent( OUString( CuiResId(RID_SVXSTR_HYPDLG_MACROACT3) ), SFX_EVENT_MOUSEOUT_OBJECT); if ( bIsInputEnabled ) diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 7f64b780fee7..a5f16c8f6b0d 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -637,7 +637,7 @@ IMPL_LINK_NOARG( SfxInsertFloatingFrameDialog, OpenHdl, Button*, void) ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, OUString() ); // set the title - aFileDlg.SetTitle(CUI_RES(RID_SVXSTR_SELECT_FILE_IFRAME)); + aFileDlg.SetTitle(CuiResId(RID_SVXSTR_SELECT_FILE_IFRAME)); // show the dialog if ( aFileDlg.Execute() == ERRCODE_NONE ) diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx index 4c907d34635f..1f32977a0eb1 100644 --- a/cui/source/dialogs/insrc.cxx +++ b/cui/source/dialogs/insrc.cxx @@ -34,8 +34,8 @@ sal_uInt16 SvxInsRowColDlg::getInsertCount() const SvxInsRowColDlg::SvxInsRowColDlg(vcl::Window* pParent, bool bCol, const OString& sHelpId ) : m_pDialog(VclPtr<ModalDialog>::Create(pParent, "InsertRowColumnDialog", "cui/ui/insertrowcolumn.ui")) - , aRow(CUI_RES(RID_SVXSTR_ROW)) - , aCol(CUI_RES(RID_SVXSTR_COL)) + , aRow(CuiResId(RID_SVXSTR_ROW)) + , aCol(CuiResId(RID_SVXSTR_COL)) , bColumn(bCol) { m_pDialog->get(m_pCountEdit, "insert_number"); diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 7e758c4bbbc1..da9c08262ec0 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -88,12 +88,12 @@ static long nTabs[] = SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool bHtml ) : ModalDialog( pParent, "BaseLinksDialog", "cui/ui/baselinksdialog.ui"), - aStrAutolink( CUI_RES( STR_AUTOLINK ) ), - aStrManuallink( CUI_RES( STR_MANUALLINK ) ), - aStrBrokenlink( CUI_RES( STR_BROKENLINK ) ), - aStrCloselinkmsg( CUI_RES( STR_CLOSELINKMSG ) ), - aStrCloselinkmsgMulti( CUI_RES( STR_CLOSELINKMSG_MULTI ) ), - aStrWaitinglink( CUI_RES( STR_WAITINGLINK ) ), + aStrAutolink( CuiResId( STR_AUTOLINK ) ), + aStrManuallink( CuiResId( STR_MANUALLINK ) ), + aStrBrokenlink( CuiResId( STR_BROKENLINK ) ), + aStrCloselinkmsg( CuiResId( STR_CLOSELINKMSG ) ), + aStrCloselinkmsgMulti( CuiResId( STR_CLOSELINKMSG_MULTI ) ), + aStrWaitinglink( CuiResId( STR_WAITINGLINK ) ), pLinkMgr( nullptr ), bHtmlMode(bHtml), aUpdateIdle("cui SvBaseLinksDlg UpdateIdle") diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx index 145077bd5c89..0bdc805d7381 100644 --- a/cui/source/dialogs/multipat.cxx +++ b/cui/source/dialogs/multipat.cxx @@ -90,7 +90,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, Button*, void) } else { - OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); + OUString sMsg( CuiResId( RID_MULTIPATH_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sInsPath ); ScopedVclPtrInstance<InfoBox>(this, sMsg)->Execute(); } @@ -114,7 +114,7 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, Button*, void) if ( LISTBOX_ENTRY_NOTFOUND != m_pPathLB->GetEntryPos( sInsPath ) ) { - OUString sMsg( CUI_RES( RID_MULTIPATH_DBL_ERR ) ); + OUString sMsg( CuiResId( RID_MULTIPATH_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sInsPath ); ScopedVclPtrInstance<InfoBox>(this, sMsg)->Execute(); } diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 92866f30d842..8db8d4f633d3 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -61,10 +61,10 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify ) : m_pParent( pParent ) - , m_aOneMismatch( CUI_RES( RID_SVXSTR_ONE_PASSWORD_MISMATCH ) ) - , m_aTwoMismatch( CUI_RES( RID_SVXSTR_TWO_PASSWORDS_MISMATCH ) ) - , m_aInvalidStateForOkButton( CUI_RES( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON ) ) - , m_aInvalidStateForOkButton_v2( CUI_RES( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ) + , m_aOneMismatch( CuiResId( RID_SVXSTR_ONE_PASSWORD_MISMATCH ) ) + , m_aTwoMismatch( CuiResId( RID_SVXSTR_TWO_PASSWORDS_MISMATCH ) ) + , m_aInvalidStateForOkButton( CuiResId( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON ) ) + , m_aInvalidStateForOkButton_v2( CuiResId( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ) , m_bIsPasswordToModify( bIsPasswordToModify ) { pParent->get(m_pPasswdToOpenED, "newpassEntry"); diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index 5b02b861473a..b1922cbc4573 100644 --- a/cui/source/dialogs/screenshotannotationdlg.cxx +++ b/cui/source/dialogs/screenshotannotationdlg.cxx @@ -204,7 +204,7 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl( mpPicture(nullptr), mpText(nullptr), mpSave(nullptr), - maSaveAsText(CUI_RES(RID_SVXSTR_SAVE_SCREENSHOT_AS)) + maSaveAsText(CuiResId(RID_SVXSTR_SAVE_SCREENSHOT_AS)) { // image ain't empty assert(!maParentDialogBitmap.IsEmpty()); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 9b5b753c2e9a..bc625d315003 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -82,8 +82,8 @@ SFTreeListBox::SFTreeListBox(vcl::Window* pParent) , m_libImage(BitmapEx(RID_CUIBMP_LIB)) , m_macImage(BitmapEx(RID_CUIBMP_MACRO)) , m_docImage(BitmapEx(RID_CUIBMP_DOC)) - , m_sMyMacros(CUI_RES(RID_SVXSTR_MYMACROS)) - , m_sProdMacros(CUI_RES(RID_SVXSTR_PRODMACROS)) + , m_sMyMacros(CuiResId(RID_SVXSTR_MYMACROS)) + , m_sProdMacros(CuiResId(RID_SVXSTR_PRODMACROS)) { SetSelectionMode( SelectionMode::Single ); @@ -451,15 +451,15 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( vcl::Window* pParent, const OUString& la : SfxModalDialog(pParent, "ScriptOrganizerDialog", "cui/ui/scriptorganizer.ui") , m_sLanguage(language) - , m_delErrStr(CUI_RES(RID_SVXSTR_DELFAILED)) - , m_delErrTitleStr(CUI_RES(RID_SVXSTR_DELFAILED_TITLE)) - , m_delQueryStr(CUI_RES(RID_SVXSTR_DELQUERY)) - , m_delQueryTitleStr(CUI_RES(RID_SVXSTR_DELQUERY_TITLE)) - , m_createErrStr(CUI_RES(RID_SVXSTR_CREATEFAILED)) - , m_createDupStr(CUI_RES(RID_SVXSTR_CREATEFAILEDDUP)) - , m_createErrTitleStr(CUI_RES(RID_SVXSTR_CREATEFAILED_TITLE)) - , m_renameErrStr(CUI_RES(RID_SVXSTR_RENAMEFAILED)) - , m_renameErrTitleStr(CUI_RES(RID_SVXSTR_RENAMEFAILED_TITLE)) + , m_delErrStr(CuiResId(RID_SVXSTR_DELFAILED)) + , m_delErrTitleStr(CuiResId(RID_SVXSTR_DELFAILED_TITLE)) + , m_delQueryStr(CuiResId(RID_SVXSTR_DELQUERY)) + , m_delQueryTitleStr(CuiResId(RID_SVXSTR_DELQUERY_TITLE)) + , m_createErrStr(CuiResId(RID_SVXSTR_CREATEFAILED)) + , m_createDupStr(CuiResId(RID_SVXSTR_CREATEFAILEDDUP)) + , m_createErrTitleStr(CuiResId(RID_SVXSTR_CREATEFAILED_TITLE)) + , m_renameErrStr(CuiResId(RID_SVXSTR_RENAMEFAILED)) + , m_renameErrTitleStr(CuiResId(RID_SVXSTR_RENAMEFAILED_TITLE)) { get(m_pScriptsBox, "scripts"); get(m_pRunButton, "run"); @@ -1227,12 +1227,12 @@ OUString FormatErrorString( if ( !type.isEmpty() ) { - result += "\n\n" + OUString(CUI_RES(RID_SVXSTR_ERROR_TYPE_LABEL)) + " " + type; + result += "\n\n" + OUString(CuiResId(RID_SVXSTR_ERROR_TYPE_LABEL)) + " " + type; } if ( !message.isEmpty() ) { - result += "\n\n" + OUString(CUI_RES(RID_SVXSTR_ERROR_MESSAGE_LABEL)) + " " + message; + result += "\n\n" + OUString(CuiResId(RID_SVXSTR_ERROR_MESSAGE_LABEL)) + " " + message; } return result; @@ -1241,7 +1241,7 @@ OUString FormatErrorString( OUString GetErrorMessage( const provider::ScriptErrorRaisedException& eScriptError ) { - OUString unformatted = CUI_RES( RID_SVXSTR_ERROR_AT_LINE ); + OUString unformatted = CuiResId( RID_SVXSTR_ERROR_AT_LINE ); OUString unknown("UNKNOWN"); OUString language = unknown; @@ -1267,11 +1267,11 @@ OUString GetErrorMessage( if ( eScriptError.lineNum != -1 ) { line = OUString::number( eScriptError.lineNum ); - unformatted = CUI_RES( RID_SVXSTR_ERROR_AT_LINE ); + unformatted = CuiResId( RID_SVXSTR_ERROR_AT_LINE ); } else { - unformatted = CUI_RES( RID_SVXSTR_ERROR_RUNNING ); + unformatted = CuiResId( RID_SVXSTR_ERROR_RUNNING ); } return FormatErrorString( @@ -1281,7 +1281,7 @@ OUString GetErrorMessage( OUString GetErrorMessage( const provider::ScriptExceptionRaisedException& eScriptException ) { - OUString unformatted = CUI_RES( RID_SVXSTR_EXCEPTION_AT_LINE ); + OUString unformatted = CuiResId( RID_SVXSTR_EXCEPTION_AT_LINE ); OUString unknown("UNKNOWN"); OUString language = unknown; @@ -1307,11 +1307,11 @@ OUString GetErrorMessage( if ( eScriptException.lineNum != -1 ) { line = OUString::number( eScriptException.lineNum ); - unformatted = CUI_RES( RID_SVXSTR_EXCEPTION_AT_LINE ); + unformatted = CuiResId( RID_SVXSTR_EXCEPTION_AT_LINE ); } else { - unformatted = CUI_RES( RID_SVXSTR_EXCEPTION_RUNNING ); + unformatted = CuiResId( RID_SVXSTR_EXCEPTION_RUNNING ); } if ( !eScriptException.exceptionType.isEmpty() ) @@ -1326,7 +1326,7 @@ OUString GetErrorMessage( OUString GetErrorMessage( const provider::ScriptFrameworkErrorException& sError ) { - OUString unformatted = CUI_RES( RID_SVXSTR_FRAMEWORK_ERROR_RUNNING ); + OUString unformatted = CuiResId( RID_SVXSTR_FRAMEWORK_ERROR_RUNNING ); OUString language("UNKNOWN"); @@ -1345,7 +1345,7 @@ OUString GetErrorMessage( if ( sError.errorType == provider::ScriptFrameworkErrorType::NOTSUPPORTED ) { message = OUString( - CUI_RES( RID_SVXSTR_ERROR_LANG_NOT_SUPPORTED ) ); + CuiResId( RID_SVXSTR_ERROR_LANG_NOT_SUPPORTED ) ); message = ReplaceString(message, "%LANGUAGENAME", language ); } @@ -1440,11 +1440,11 @@ IMPL_STATIC_LINK( SvxScriptErrorDialog, ShowDialog, void*, p, void ) } else { - message = OUString( CUI_RES( RID_SVXSTR_ERROR_TITLE ) ); + message = OUString( CuiResId( RID_SVXSTR_ERROR_TITLE ) ); } ScopedVclPtrInstance<MessageDialog> pBox( nullptr, message, VclMessageType::Warning ); - pBox->SetText( CUI_RES( RID_SVXSTR_ERROR_TITLE ) ); + pBox->SetText( CuiResId( RID_SVXSTR_ERROR_TITLE ) ); pBox->Execute(); delete pMessage; diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index 23342dd3c3fc..ea01bcb7a1cc 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -137,7 +137,7 @@ SvxSearchAttributeDialog::SvxSearchAttributeDialog(vcl::Window* pParent, SfxObjectShell* pSh = SfxObjectShell::Current(); DBG_ASSERT( pSh, "No DocShell" ); - ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) ); + ResStringArray aAttrNames(ResId(RID_ATTR_NAMES, DIALOG_MGR())); SfxItemPool& rPool = pSh->GetPool(); SfxItemSet aSet( rPool, pWhRanges ); SfxWhichIter aIter( aSet ); diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index f0ebda71297a..51fae3d5ceea 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -443,7 +443,7 @@ SvxThesaurusDialog::SvxThesaurusDialog( const OUString &rWord, LanguageType nLanguage) : SvxStandardDialog(pParent, "ThesaurusDialog", "cui/ui/thesaurus.ui") - , m_aErrStr(CUI_RES(RID_SVXSTR_ERR_TEXTNOTFOUND)) + , m_aErrStr(CuiResId(RID_SVXSTR_ERR_TEXTNOTFOUND)) , xThesaurus(nullptr) , aLookUpText() , nLookUpLanguage(LANGUAGE_NONE) diff --git a/cui/source/inc/dialmgr.hxx b/cui/source/inc/dialmgr.hxx index 07226a0063e3..e323ba987c7e 100644 --- a/cui/source/inc/dialmgr.hxx +++ b/cui/source/inc/dialmgr.hxx @@ -24,14 +24,17 @@ // forward --------------------------------------------------------------- #define CUI_MGR() (*CuiResMgr::GetResMgr()) -#define CUI_RES(i) ResId(i,CUI_MGR()) -class ResMgr; struct CuiResMgr { static ResMgr* GetResMgr(); }; +inline OUString CuiResId(sal_uInt16 nId) +{ + return ResId(nId, CUI_MGR()); +} + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx index 662ce50234f2..67ec485efaeb 100644 --- a/cui/source/options/cfgchart.cxx +++ b/cui/source/options/cfgchart.cxx @@ -129,7 +129,7 @@ OUString SvxChartColorTable::getDefaultName( size_t _nIndex ) if (sDefaultNamePrefix.getLength() == 0) { - OUString aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) ); + OUString aResName( CuiResId( RID_SVXSTR_DIAGRAM_ROW ) ); sal_Int32 nPos = aResName.indexOf( "$(ROW)" ); if( nPos != -1 ) { @@ -217,7 +217,7 @@ bool SvxChartOptions::RetrieveOptions() Color aCol; // create strings for entry names - OUString aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) ); + OUString aResName( CuiResId( RID_SVXSTR_DIAGRAM_ROW ) ); OUString aPrefix, aPostfix, aName; sal_Int32 nPos = aResName.indexOf( "$(ROW)" ); if( nPos != -1 ) diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index faaeeccfc3d8..5e8d53471b15 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -91,8 +91,8 @@ namespace offapp :EditBrowseBox(_pParent, EditBrowseBoxFlags::NO_HANDLE_COLUMN_CONTENT, WB_BORDER, BrowserMode::AUTO_VSCROLL | BrowserMode::AUTO_HSCROLL | BrowserMode::HIDECURSOR | BrowserMode::AUTOSIZE_LASTCOL | BrowserMode::KEEPHIGHLIGHT) ,m_aSeekRow(m_aSettings.end()) - ,m_sYes(CUI_RES(RID_SVXSTR_YES)) - ,m_sNo(CUI_RES(RID_SVXSTR_NO)) + ,m_sYes(CuiResId(RID_SVXSTR_YES)) + ,m_sNo(CuiResId(RID_SVXSTR_NO)) { SetStyle((GetStyle() & ~WB_HSCROLL) | WB_AUTOHSCROLL); } @@ -128,11 +128,11 @@ namespace offapp EditBrowseBox::Init(); Size aColWidth = LogicToPixel(Size(160, 0), MapUnit::MapAppFont); - InsertDataColumn(1, OUString(CUI_RES(RID_SVXSTR_DRIVER_NAME)), aColWidth.Width()); + InsertDataColumn(1, OUString(CuiResId(RID_SVXSTR_DRIVER_NAME)), aColWidth.Width()); aColWidth = LogicToPixel(Size(30, 0), MapUnit::MapAppFont); - InsertDataColumn(2, OUString(CUI_RES(RID_SVXSTR_POOLED_FLAG)), aColWidth.Width()); + InsertDataColumn(2, OUString(CuiResId(RID_SVXSTR_POOLED_FLAG)), aColWidth.Width()); aColWidth = LogicToPixel(Size(60, 0), MapUnit::MapAppFont); - InsertDataColumn(3, OUString(CUI_RES(RID_SVXSTR_POOL_TIMEOUT)), aColWidth.Width()); + InsertDataColumn(3, OUString(CuiResId(RID_SVXSTR_POOL_TIMEOUT)), aColWidth.Width()); // Attention: the resource of the string is local to the resource of the enclosing dialog! } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index 082b74ee7b9d..4324762b3433 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -102,8 +102,8 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons SfxTabPage( pParent, "DbRegisterPage", "cui/ui/dbregisterpage.ui", &rSet ), - m_aTypeText ( CUI_RES( RID_SVXSTR_TYPE ) ), - m_aPathText ( CUI_RES( RID_SVXSTR_PATH ) ), + m_aTypeText ( CuiResId( RID_SVXSTR_TYPE ) ), + m_aPathText ( CuiResId( RID_SVXSTR_PATH ) ), m_pPathBox ( nullptr ), m_pCurEntry ( nullptr ), m_nOldCount ( 0 ), @@ -275,7 +275,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl, Button*, void) SvTreeListEntry* pEntry = m_pPathBox->FirstSelected(); if ( pEntry ) { - ScopedVclPtrInstance< MessageDialog > aQuery(this, CUI_RES(RID_SVXSTR_QUERY_DELETE_CONFIRM), VclMessageType::Question, VclButtonsType::YesNo); + ScopedVclPtrInstance< MessageDialog > aQuery(this, CuiResId(RID_SVXSTR_QUERY_DELETE_CONFIRM), VclMessageType::Question, VclButtonsType::YesNo); if ( aQuery->Execute() == RET_YES ) m_pPathBox->GetModel()->Remove(pEntry); } diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index 34b961a6e56d..4cd538b28ee7 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -124,7 +124,7 @@ namespace svx if (!bFileExists) { - OUString sMsg = CUI_RES(STR_LINKEDDOC_DOESNOTEXIST); + OUString sMsg = CuiResId(STR_LINKEDDOC_DOESNOTEXIST); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); ScopedVclPtrInstance< MessageDialog > aError(this, sMsg); aError->Execute(); @@ -133,7 +133,7 @@ namespace svx INetURLObject aURL( sURL ); if ( aURL.GetProtocol() != INetProtocol::File ) { - OUString sMsg = CUI_RES(STR_LINKEDDOC_NO_SYSTEM_FILE); + OUString sMsg = CuiResId(STR_LINKEDDOC_NO_SYSTEM_FILE); sMsg = sMsg.replaceFirst("$file$", m_pURL->GetText()); ScopedVclPtrInstance< MessageDialog > aError(this, sMsg); aError->Execute(); @@ -145,7 +145,7 @@ namespace svx { if ( !m_aNameValidator.Call( sCurrentText ) ) { - OUString sMsg = CUI_RES(STR_NAME_CONFLICT); + OUString sMsg = CuiResId(STR_NAME_CONFLICT); sMsg = sMsg.replaceFirst("$file$", sCurrentText); ScopedVclPtrInstance< MessageDialog > aError(this, sMsg, VclMessageType::Info); aError->Execute(); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index ec9a663100a5..27203a99ac7d 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -1151,10 +1151,10 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, void ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); ScopedVclPtr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( pButton, - sName, CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE2) )); + sName, CuiResId(RID_SVXSTR_COLOR_CONFIG_SAVE2) )); DBG_ASSERT(aNameDlg, "Dialog creation failed!"); aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, CheckNameHdl_Impl)); - aNameDlg->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_SAVE1)); + aNameDlg->SetText(CuiResId(RID_SVXSTR_COLOR_CONFIG_SAVE1)); aNameDlg->SetHelpId(HID_OPTIONS_COLORCONFIG_SAVE_SCHEME); aNameDlg->SetCheckNameHdl( LINK(this, SvxColorOptionsTabPage, CheckNameHdl_Impl)); if(RET_OK == aNameDlg->Execute()) @@ -1170,8 +1170,8 @@ IMPL_LINK(SvxColorOptionsTabPage, SaveDeleteHdl_Impl, Button*, pButton, void ) else { DBG_ASSERT(m_pColorSchemeLB->GetEntryCount() > 1, "don't delete the last scheme"); - ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE), VclMessageType::Question, VclButtonsType::YesNo); - aQuery->SetText(CUI_RES(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE)); + ScopedVclPtrInstance< MessageDialog > aQuery(pButton, CuiResId(RID_SVXSTR_COLOR_CONFIG_DELETE), VclMessageType::Question, VclButtonsType::YesNo); + aQuery->SetText(CuiResId(RID_SVXSTR_COLOR_CONFIG_DELETE_TITLE)); if(RET_YES == aQuery->Execute()) { OUString sDeleteScheme(m_pColorSchemeLB->GetSelectEntry()); diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index b09975f0a9b9..437c2cb7f97e 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -153,7 +153,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl, Button*, void) if ( bFound ) { // duplicate names? - ScopedVclPtrInstance<MessageDialog>(this, CUI_RES(RID_SVXSTR_OPT_DOUBLE_DICTS), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, CuiResId(RID_SVXSTR_OPT_DOUBLE_DICTS), VclMessageType::Info)->Execute(); pNameEdit->GrabFocus(); return; } @@ -217,7 +217,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog( ModalDialog( pParent, "EditDictionaryDialog" ,"cui/ui/editdictionarydialog.ui" ), - sModify (CUI_RES(STR_MODIFY)), + sModify (CuiResId(STR_MODIFY)), nOld ( NOACTDICT ), bFirstSelect (true), bDoNothing (false), @@ -452,7 +452,7 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox&, void) if ( nLang != nOldLang ) { - ScopedVclPtrInstance< MessageDialog > aBox(this, CUI_RES( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VclMessageType::Question, VclButtonsType::YesNo); + ScopedVclPtrInstance< MessageDialog > aBox(this, CuiResId( RID_SVXSTR_CONFIRM_SET_LANGUAGE), VclMessageType::Question, VclButtonsType::YesNo); OUString sTxt(aBox->get_primary_text()); sTxt = sTxt.replaceFirst( "%1", pAllDictsLB->GetSelectEntry() ); aBox->set_primary_text(sTxt); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index 7f997c735fd1..8723c18e77be 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -143,13 +143,13 @@ void OfaMSFilterTabPage::Reset( const SfxItemSet* ) OfaMSFilterTabPage2::OfaMSFilterTabPage2( vcl::Window* pParent, const SfxItemSet& rSet ) : SfxTabPage( pParent, "OptFilterPage", "cui/ui/optfltrembedpage.ui", &rSet ), - sHeader1(CUI_RES(RID_SVXSTR_HEADER1)), - sHeader2(CUI_RES(RID_SVXSTR_HEADER2)), - sChgToFromMath(CUI_RES(RID_SVXSTR_CHG_MATH)), - sChgToFromWriter(CUI_RES(RID_SVXSTR_CHG_WRITER)), - sChgToFromCalc(CUI_RES(RID_SVXSTR_CHG_CALC)), - sChgToFromImpress(CUI_RES(RID_SVXSTR_CHG_IMPRESS)), - sChgToFromSmartArt(CUI_RES(RID_SVXSTR_CHG_SMARTART)), + sHeader1(CuiResId(RID_SVXSTR_HEADER1)), + sHeader2(CuiResId(RID_SVXSTR_HEADER2)), + sChgToFromMath(CuiResId(RID_SVXSTR_CHG_MATH)), + sChgToFromWriter(CuiResId(RID_SVXSTR_CHG_WRITER)), + sChgToFromCalc(CuiResId(RID_SVXSTR_CHG_CALC)), + sChgToFromImpress(CuiResId(RID_SVXSTR_CHG_IMPRESS)), + sChgToFromSmartArt(CuiResId(RID_SVXSTR_CHG_SMARTART)), pCheckButtonData(nullptr) { get(m_pCheckLBContainer, "checklbcontainer"); diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 379067fda6f0..cea8b66cdbe3 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -132,7 +132,7 @@ void SvxNoSpaceEdit::Modify() if ( !comphelper::string::isdigitAsciiString(aValue) || (long)aValue.toInt32() > USHRT_MAX ) // the maximum value of a port number is USHRT_MAX - ScopedVclPtrInstance<MessageDialog>(this, CUI_RES( RID_SVXSTR_OPT_PROXYPORTS))->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, CuiResId( RID_SVXSTR_OPT_PROXYPORTS))->Execute(); } } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 1213b3d10a69..292558a6365d 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -545,12 +545,12 @@ void SvxJavaOptionsPage::AddFolder( const OUString& _rFolder ) } else if ( JFW_E_NOT_RECOGNIZED == eErr ) { - ScopedVclPtrInstance< MessageDialog > aErrBox( this, CUI_RES( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ); + ScopedVclPtrInstance< MessageDialog > aErrBox( this, CuiResId( RID_SVXSTR_JRE_NOT_RECOGNIZED ) ); aErrBox->Execute(); } else if ( JFW_E_FAILED_VERSION == eErr ) { - ScopedVclPtrInstance< MessageDialog > aErrBox( this, CUI_RES( RID_SVXSTR_JRE_FAILED_VERSION ) ); + ScopedVclPtrInstance< MessageDialog > aErrBox( this, CuiResId( RID_SVXSTR_JRE_FAILED_VERSION ) ); aErrBox->Execute(); } @@ -810,7 +810,7 @@ void SvxJavaParameterDlg::EditParameter() if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - ScopedVclPtrInstance< InputDialog > pParamEditDlg(CUI_RES(RID_SVXSTR_JAVA_START_PARAM), this); + ScopedVclPtrInstance< InputDialog > pParamEditDlg(CuiResId(RID_SVXSTR_JAVA_START_PARAM), this); OUString editableClassPath = m_pAssignedList->GetSelectEntry(); pParamEditDlg->SetEntryText( editableClassPath ); pParamEditDlg->HideHelpBtn(); @@ -911,8 +911,8 @@ void SvxJavaClassPathDlg::dispose() IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void) { sfx2::FileDialogHelper aDlg( TemplateDescription::FILEOPEN_SIMPLE ); - aDlg.SetTitle( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE ) ); - aDlg.AddFilter( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ), "*.jar;*.zip" ); + aDlg.SetTitle( CuiResId( RID_SVXSTR_ARCHIVE_TITLE ) ); + aDlg.AddFilter( CuiResId( RID_SVXSTR_ARCHIVE_HEADLINE ), "*.jar;*.zip" ); OUString sFolder; if ( m_pPathList->GetSelectEntryCount() > 0 ) { @@ -934,7 +934,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void) } else { - OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); + OUString sMsg( CuiResId( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sFile ); ScopedVclPtrInstance<MessageDialog>(this, sMsg)->Execute(); } @@ -969,7 +969,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl, Button*, void) } else { - OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); + OUString sMsg( CuiResId( RID_SVXSTR_MULTIFILE_DBL_ERR ) ); sMsg = sMsg.replaceFirst( "%1", sNewFolder ); ScopedVclPtrInstance<MessageDialog>(this, sMsg)->Execute(); } diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 37edc4c67692..33816f716d46 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -986,16 +986,16 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, bool bEnable SvxLinguTabPage::SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, "OptLinguPage", "cui/ui/optlingupage.ui", &rSet), - sCapitalWords (CUI_RES(RID_SVXSTR_CAPITAL_WORDS)), - sWordsWithDigits(CUI_RES(RID_SVXSTR_WORDS_WITH_DIGITS)), - sSpellSpecial (CUI_RES(RID_SVXSTR_SPELL_SPECIAL)), - sSpellAuto (CUI_RES(RID_SVXSTR_SPELL_AUTO)), - sGrammarAuto (CUI_RES(RID_SVXSTR_GRAMMAR_AUTO)), - sNumMinWordlen (CUI_RES(RID_SVXSTR_NUM_MIN_WORDLEN)), - sNumPreBreak (CUI_RES(RID_SVXSTR_NUM_PRE_BREAK)), - sNumPostBreak (CUI_RES(RID_SVXSTR_NUM_POST_BREAK)), - sHyphAuto (CUI_RES(RID_SVXSTR_HYPH_AUTO)), - sHyphSpecial (CUI_RES(RID_SVXSTR_HYPH_SPECIAL)), + sCapitalWords (CuiResId(RID_SVXSTR_CAPITAL_WORDS)), + sWordsWithDigits(CuiResId(RID_SVXSTR_WORDS_WITH_DIGITS)), + sSpellSpecial (CuiResId(RID_SVXSTR_SPELL_SPECIAL)), + sSpellAuto (CuiResId(RID_SVXSTR_SPELL_AUTO)), + sGrammarAuto (CuiResId(RID_SVXSTR_GRAMMAR_AUTO)), + sNumMinWordlen (CuiResId(RID_SVXSTR_NUM_MIN_WORDLEN)), + sNumPreBreak (CuiResId(RID_SVXSTR_NUM_PRE_BREAK)), + sNumPostBreak (CuiResId(RID_SVXSTR_NUM_POST_BREAK)), + sHyphAuto (CuiResId(RID_SVXSTR_HYPH_AUTO)), + sHyphSpecial (CuiResId(RID_SVXSTR_HYPH_SPECIAL)), pLinguData(nullptr) { @@ -1751,10 +1751,10 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp ) SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rData) : ModalDialog( pParent, "EditModulesDialog", "cui/ui/editmodulesdialog.ui") - , sSpell(CUI_RES(RID_SVXSTR_SPELL)) - , sHyph(CUI_RES(RID_SVXSTR_HYPH)) - , sThes(CUI_RES(RID_SVXSTR_THES)) - , sGrammar(CUI_RES(RID_SVXSTR_GRAMMAR)) + , sSpell(CuiResId(RID_SVXSTR_SPELL)) + , sHyph(CuiResId(RID_SVXSTR_HYPH)) + , sThes(CuiResId(RID_SVXSTR_THES)) + , sGrammar(CuiResId(RID_SVXSTR_GRAMMAR)) , rLinguData(rData) { get(m_pClosePB, "close"); diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index ecdce1d3971c..4706951f129a 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -102,7 +102,7 @@ bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* ) if (bModified) { - ScopedVclPtrInstance<MessageDialog> aWarnBox(this, CUI_RES(RID_SVXSTR_OPTIONS_RESTART), VclMessageType::Info); + ScopedVclPtrInstance<MessageDialog> aWarnBox(this, CuiResId(RID_SVXSTR_OPTIONS_RESTART), VclMessageType::Info); aWarnBox->Execute(); batch->commit(); } diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index af910b355f37..ab292153757f 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -312,7 +312,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* ) if (i == SvtPathOptions::PATH_CLASSIFICATION) // RID_SVXSTR_KEY_USERDICTIONARY_DIR already took our slot, so name the key explicitly. nId = RID_SVXSTR_KEY_CLASSIFICATION_PATH; - OUString aStr(CUI_RES(nId)); + OUString aStr(CuiResId(nId)); nWidth1 = std::max(nWidth1, pPathBox->GetTextWidth(aStr)); aStr += "\t"; diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index b07433d5985c..fa4d7f452072 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -58,7 +58,7 @@ SelectPersonaDialog::SelectPersonaDialog( vcl::Window *pParent ) get( m_vSearchSuggestions[4], "suggestion5" ); get( m_vSearchSuggestions[5], "suggestion6" ); - ResStringArray aCategoriesArr(CUI_RES(RID_SVXSTR_PERSONA_CATEGORIES)); + ResStringArray aCategoriesArr(ResId(RID_SVXSTR_PERSONA_CATEGORIES, CUI_MGR())); assert(aCategoriesArr.Count() >= CATEGORYCOUNT); for(sal_uInt32 i = 0; i < CATEGORYCOUNT; ++i) { @@ -209,7 +209,7 @@ IMPL_LINK( SelectPersonaDialog, SelectPersona, Button*, pButton, void ) // get the persona name from the setting variable to show in the progress. sal_Int32 nNameIndex = m_aSelectedPersona.indexOf( ';' ); OUString aName = m_aSelectedPersona.copy( 0, nNameIndex ); - OUString aProgress = OUString(CUI_RES(RID_SVXSTR_SELECTEDPERSONA)) + aName; + OUString aProgress = OUString(CuiResId(RID_SVXSTR_SELECTEDPERSONA)) + aName; SetProgress( aProgress ); } break; @@ -676,7 +676,7 @@ void SearchAndParseThread::execute() if( m_aURL.startsWith( "https://" ) ) { m_pPersonaDialog->ClearSearchResults(); - OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHING ) ), sError; + OUString sProgress( CuiResId( RID_SVXSTR_SEARCHING ) ), sError; m_pPersonaDialog->SetProgress( sProgress ); PersonasDocHandler* pHandler = new PersonasDocHandler(); @@ -703,7 +703,7 @@ void SearchAndParseThread::execute() { // in case of a returned CommandFailedException // SimpleFileAccess serves it, returning an empty stream - sError = CUI_RES(RID_SVXSTR_SEARCHERROR); + sError = CuiResId(RID_SVXSTR_SEARCHERROR); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); ScopedVclPtrInstance< ErrorBox > aBox( nullptr, WB_OK, sError); @@ -715,7 +715,7 @@ void SearchAndParseThread::execute() { // a catch all clause, in case the exception is not // served elsewhere - sError = CUI_RES(RID_SVXSTR_SEARCHERROR); + sError = CuiResId(RID_SVXSTR_SEARCHERROR); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); ScopedVclPtrInstance< ErrorBox > aBox( nullptr, WB_OK, sError ); @@ -729,7 +729,7 @@ void SearchAndParseThread::execute() if( !pHandler->hasResults() ) { - sProgress = CUI_RES( RID_SVXSTR_NORESULTS ); + sProgress = CuiResId( RID_SVXSTR_NORESULTS ); m_pPersonaDialog->SetProgress( sProgress ); return; } @@ -755,7 +755,7 @@ void SearchAndParseThread::execute() { if( m_bDirectURL ) { - sError = CUI_RES(RID_SVXSTR_SEARCHERROR); + sError = CuiResId(RID_SVXSTR_SEARCHERROR); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); ScopedVclPtrInstance< ErrorBox > aBox( nullptr, WB_OK, sError); @@ -789,7 +789,7 @@ void SearchAndParseThread::execute() else { - OUString sProgress( CUI_RES( RID_SVXSTR_APPLYPERSONA ) ), sError; + OUString sProgress( CuiResId( RID_SVXSTR_APPLYPERSONA ) ), sError; m_pPersonaDialog->SetProgress( sProgress ); uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), uno::UNO_QUERY ); @@ -838,7 +838,7 @@ void SearchAndParseThread::execute() } catch ( const uno::Exception & ) { - sError = CUI_RES( RID_SVXSTR_SEARCHERROR ); + sError = CuiResId( RID_SVXSTR_SEARCHERROR ); sError = sError.replaceAll("%1", m_aURL); m_pPersonaDialog->SetProgress( OUString() ); ScopedVclPtrInstance< ErrorBox > aBox( nullptr, WB_OK, sError); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 583e930916fa..e0b799b73da8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -484,7 +484,7 @@ struct OptionsGroupInfo #define INI_LIST() \ pCurrentPageEntry ( nullptr ),\ sTitle ( GetText() ),\ - sNotLoadedError ( CUI_RES( RID_SVXSTR_LOAD_ERROR ) ),\ + sNotLoadedError ( CuiResId( RID_SVXSTR_LOAD_ERROR ) ),\ bForgetSelection ( false ),\ bIsFromExtensionManager( false ), \ bIsForSetDocumentLanguage( false ) @@ -1102,18 +1102,18 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() } OfaPageResource::OfaPageResource() : - aGeneralDlgAry(CUI_RES(SID_GENERAL_OPTIONS)), - aInetDlgAry(CUI_RES(SID_INET_DLG)), - aLangDlgAry(CUI_RES(SID_LANGUAGE_OPTIONS)), - aTextDlgAry(CUI_RES(SID_SW_EDITOPTIONS)), - aHTMLDlgAry(CUI_RES(SID_SW_ONLINEOPTIONS)), - aCalcDlgAry(CUI_RES(SID_SC_EDITOPTIONS)), - aStarMathDlgAry(CUI_RES(SID_SM_EDITOPTIONS)), - aImpressDlgAry(CUI_RES(SID_SD_EDITOPTIONS)), - aDrawDlgAry(CUI_RES(SID_SD_GRAPHIC_OPTIONS)), - aChartDlgAry(CUI_RES(SID_SCH_EDITOPTIONS)), - aFilterDlgAry(CUI_RES(SID_FILTER_DLG)), - aDatasourcesDlgAry(CUI_RES(SID_SB_STARBASEOPTIONS)) + aGeneralDlgAry(ResId(SID_GENERAL_OPTIONS, CUI_MGR())), + aInetDlgAry(ResId(SID_INET_DLG, CUI_MGR())), + aLangDlgAry(ResId(SID_LANGUAGE_OPTIONS, CUI_MGR())), + aTextDlgAry(ResId(SID_SW_EDITOPTIONS, CUI_MGR())), + aHTMLDlgAry(ResId(SID_SW_ONLINEOPTIONS, CUI_MGR())), + aCalcDlgAry(ResId(SID_SC_EDITOPTIONS, CUI_MGR())), + aStarMathDlgAry(ResId(SID_SM_EDITOPTIONS, CUI_MGR())), + aImpressDlgAry(ResId(SID_SD_EDITOPTIONS, CUI_MGR())), + aDrawDlgAry(ResId(SID_SD_GRAPHIC_OPTIONS, CUI_MGR())), + aChartDlgAry(ResId(SID_SCH_EDITOPTIONS, CUI_MGR())), + aFilterDlgAry(ResId(SID_FILTER_DLG, CUI_MGR())), + aDatasourcesDlgAry(ResId(SID_SB_STARBASEOPTIONS, CUI_MGR())) { } diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 8a16acd0b546..2586a454f71e 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -212,9 +212,9 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, const SfxItemSet& rCor // Asian vertical mode m_pCbAsianMode->Show( SvtCJKOptions().IsVerticalTextEnabled() ); - m_pLbFrameDir->InsertEntryValue( CUI_RES( RID_SVXSTR_FRAMEDIR_LTR ), SvxFrameDirection::Horizontal_LR_TB ); - m_pLbFrameDir->InsertEntryValue( CUI_RES( RID_SVXSTR_FRAMEDIR_RTL ), SvxFrameDirection::Horizontal_RL_TB ); - m_pLbFrameDir->InsertEntryValue( CUI_RES( RID_SVXSTR_FRAMEDIR_SUPER ), SvxFrameDirection::Environment ); + m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_LTR ), SvxFrameDirection::Horizontal_LR_TB ); + m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_RTL ), SvxFrameDirection::Horizontal_RL_TB ); + m_pLbFrameDir->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_SUPER ), SvxFrameDirection::Environment ); // This page needs ExchangeSupport. SetExchangeSupport(); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 96445f32a1b3..758859897bf9 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -193,14 +193,14 @@ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox&, rBox, void) OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "AutocorrectOptionsPage", "cui/ui/acoroptionspage.ui", &rSet) - , m_sInput(CUI_RES(RID_SVXSTR_USE_REPLACE)) - , m_sDoubleCaps(CUI_RES(RID_SVXSTR_CPTL_STT_WORD)) - , m_sStartCap(CUI_RES(RID_SVXSTR_CPTL_STT_SENT)) - , m_sBoldUnderline(CUI_RES(RID_SVXSTR_BOLD_UNDER)) - , m_sURL(CUI_RES(RID_SVXSTR_DETECT_URL)) - , m_sNoDblSpaces(CUI_RES(RID_SVXSTR_NO_DBL_SPACES)) - , m_sDash(CUI_RES(RID_SVXSTR_DASH)) - , m_sAccidentalCaps(CUI_RES(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK)) + , m_sInput(CuiResId(RID_SVXSTR_USE_REPLACE)) + , m_sDoubleCaps(CuiResId(RID_SVXSTR_CPTL_STT_WORD)) + , m_sStartCap(CuiResId(RID_SVXSTR_CPTL_STT_SENT)) + , m_sBoldUnderline(CuiResId(RID_SVXSTR_BOLD_UNDER)) + , m_sURL(CuiResId(RID_SVXSTR_DETECT_URL)) + , m_sNoDblSpaces(CuiResId(RID_SVXSTR_NO_DBL_SPACES)) + , m_sDash(CuiResId(RID_SVXSTR_DASH)) + , m_sAccidentalCaps(CuiResId(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK)) { get(m_pCheckLB, "checklist"); } @@ -413,24 +413,24 @@ enum OfaAutoFmtOptions OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage( vcl::Window* pParent, const SfxItemSet& rSet ) : SfxTabPage(pParent, "ApplyAutoFmtPage", "cui/ui/applyautofmtpage.ui", &rSet) - , sDeleteEmptyPara(CUI_RES(RID_SVXSTR_DEL_EMPTY_PARA)) - , sUseReplaceTbl(CUI_RES(RID_SVXSTR_USE_REPLACE)) - , sCapitalStartWord(CUI_RES(RID_SVXSTR_CPTL_STT_WORD)) - , sCapitalStartSentence(CUI_RES(RID_SVXSTR_CPTL_STT_SENT)) - , sUserStyle(CUI_RES(RID_SVXSTR_USER_STYLE)) - , sBullet(CUI_RES(RID_SVXSTR_BULLET)) - , sBoldUnder(CUI_RES(RID_SVXSTR_BOLD_UNDER)) - , sNoDblSpaces(CUI_RES(RID_SVXSTR_NO_DBL_SPACES)) - , sCorrectCapsLock(CUI_RES(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK)) - , sDetectURL(CUI_RES(RID_SVXSTR_DETECT_URL)) - , sDash(CUI_RES(RID_SVXSTR_DASH)) - , sRightMargin(CUI_RES(RID_SVXSTR_RIGHT_MARGIN)) - , sNum(CUI_RES(RID_SVXSTR_NUM)) - , sBorder(CUI_RES(RID_SVXSTR_BORDER)) - , sTable(CUI_RES(RID_SVXSTR_CREATE_TABLE)) - , sReplaceTemplates(CUI_RES(RID_SVXSTR_REPLACE_TEMPLATES)) - , sDelSpaceAtSttEnd(CUI_RES(RID_SVXSTR_DEL_SPACES_AT_STT_END)) - , sDelSpaceBetweenLines(CUI_RES(RID_SVXSTR_DEL_SPACES_BETWEEN_LINES)) + , sDeleteEmptyPara(CuiResId(RID_SVXSTR_DEL_EMPTY_PARA)) + , sUseReplaceTbl(CuiResId(RID_SVXSTR_USE_REPLACE)) + , sCapitalStartWord(CuiResId(RID_SVXSTR_CPTL_STT_WORD)) + , sCapitalStartSentence(CuiResId(RID_SVXSTR_CPTL_STT_SENT)) + , sUserStyle(CuiResId(RID_SVXSTR_USER_STYLE)) + , sBullet(CuiResId(RID_SVXSTR_BULLET)) + , sBoldUnder(CuiResId(RID_SVXSTR_BOLD_UNDER)) + , sNoDblSpaces(CuiResId(RID_SVXSTR_NO_DBL_SPACES)) + , sCorrectCapsLock(CuiResId(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK)) + , sDetectURL(CuiResId(RID_SVXSTR_DETECT_URL)) + , sDash(CuiResId(RID_SVXSTR_DASH)) + , sRightMargin(CuiResId(RID_SVXSTR_RIGHT_MARGIN)) + , sNum(CuiResId(RID_SVXSTR_NUM)) + , sBorder(CuiResId(RID_SVXSTR_BORDER)) + , sTable(CuiResId(RID_SVXSTR_CREATE_TABLE)) + , sReplaceTemplates(CuiResId(RID_SVXSTR_REPLACE_TEMPLATES)) + , sDelSpaceAtSttEnd(CuiResId(RID_SVXSTR_DEL_SPACES_AT_STT_END)) + , sDelSpaceBetweenLines(CuiResId(RID_SVXSTR_DEL_SPACES_BETWEEN_LINES)) , nPercent(50) , pCheckButtonData(nullptr) { @@ -1812,8 +1812,8 @@ SvTreeListEntry* OfaQuoteTabPage::CreateEntry(OUString& rTxt, sal_uInt16 nCol) OfaQuoteTabPage::OfaQuoteTabPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "ApplyLocalizedPage", "cui/ui/applylocalizedpage.ui", &rSet) - , sNonBrkSpace(CUI_RES(RID_SVXSTR_NON_BREAK_SPACE)) - , sOrdinal(CUI_RES(RID_SVXSTR_ORDINAL)) + , sNonBrkSpace(CuiResId(RID_SVXSTR_NON_BREAK_SPACE)) + , sOrdinal(CuiResId(RID_SVXSTR_ORDINAL)) , pCheckButtonData(nullptr) , cSglStartQuote(0) , cSglEndQuote(0) @@ -2060,7 +2060,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, Button*, pBtn, void ) ScopedVclPtrInstance< SvxCharacterMap > pMap( this, true ); pMap->SetCharFont( OutputDevice::GetDefaultFont(DefaultFontType::LATIN_TEXT, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::OnlyOne )); - pMap->SetText(nMode < SGL_END ? CUI_RES(RID_SVXSTR_STARTQUOTE) : CUI_RES(RID_SVXSTR_ENDQUOTE) ); + pMap->SetText(nMode < SGL_END ? CuiResId(RID_SVXSTR_STARTQUOTE) : CuiResId(RID_SVXSTR_ENDQUOTE) ); sal_UCS4 cDlg; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 2f332aee4232..407550d2bf3f 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -382,7 +382,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe m_pBackgroundColorSet->SetSelectHdl( HDL(BackgroundColorHdl_Impl) ); m_pBackgroundColorSet->SetStyle(m_pBackgroundColorSet->GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD); - m_pBackgroundColorSet->SetText(SVX_RESSTR(RID_SVXSTR_NOFILL)); + m_pBackgroundColorSet->SetText(SvxResId(RID_SVXSTR_NOFILL)); } SvxBackgroundTabPage::~SvxBackgroundTabPage() @@ -1528,7 +1528,7 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet) } if ( nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING ) { - m_pBackGroundColorLabelFT->SetText(CUI_RES(RID_SVXSTR_CHARNAME_HIGHLIGHTING)); + m_pBackGroundColorLabelFT->SetText(CuiResId(RID_SVXSTR_CHARNAME_HIGHLIGHTING)); bHighlighting = true; } } diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 73c912d15d0a..606e66309205 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -1014,7 +1014,7 @@ void SvxBorderTabPage::FillPresetVS() { m_pWndPresets->InsertItem( nVSIdx ); m_pWndPresets->SetItemImage(nVSIdx, Image(m_aBorderImgVec[nVSIdx-1])); - m_pWndPresets->SetItemText( nVSIdx, CUI_RES( GetPresetStringId( nVSIdx ) ) ); + m_pWndPresets->SetItemText( nVSIdx, CuiResId( GetPresetStringId( nVSIdx ) ) ); } // show the control @@ -1037,7 +1037,7 @@ void SvxBorderTabPage::FillShadowVS() { m_pWndShadows->InsertItem( nVSIdx ); m_pWndShadows->SetItemImage(nVSIdx, Image(m_aShadowImgVec[nVSIdx-1])); - m_pWndShadows->SetItemText( nVSIdx, CUI_RES( pnStrIds[ nVSIdx - 1 ] ) ); + m_pWndShadows->SetItemText( nVSIdx, CuiResId( pnStrIds[ nVSIdx - 1 ] ) ); } // show the control @@ -1096,7 +1096,7 @@ void SvxBorderTabPage::FillLineListBox_Impl() m_pLbLineStyle->SetSourceUnit( FUNIT_TWIP ); - m_pLbLineStyle->SetNone( SVX_RESSTR( RID_SVXSTR_NONE ) ); + m_pLbLineStyle->SetNone( SvxResId( RID_SVXSTR_NONE ) ); for (size_t i = 0, n = SAL_N_ELEMENTS(aLines); i < n; ++i) { diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index ae83f627e6f3..667e09955298 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -254,7 +254,7 @@ SvxCharNamePage::SvxCharNamePage( vcl::Window* pParent, const SfxItemSet& rInSet : SvxCharBasePage(pParent, "CharNamePage", "cui/ui/charnamepage.ui", rInSet) , m_pImpl(new SvxCharNamePage_Impl) { - m_pImpl->m_aNoStyleText = CUI_RES( RID_SVXSTR_CHARNAME_NOSTYLE ); + m_pImpl->m_aNoStyleText = CuiResId( RID_SVXSTR_CHARNAME_NOSTYLE ); SvtLanguageOptions aLanguageOptions; bool bShowCJK = aLanguageOptions.IsCJKFontEnabled(); @@ -319,18 +319,18 @@ SvxCharNamePage::SvxCharNamePage( vcl::Window* pParent, const SfxItemSet& rInSet //In Windows the standard dialogs name font-name, font-style as //Font, Style #ifdef _WIN32 - OUString sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FONT)); + OUString sFontFamilyString(CuiResId(RID_SVXSTR_CHARNAME_FONT)); #else - OUString sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FAMILY)); + OUString sFontFamilyString(CuiResId(RID_SVXSTR_CHARNAME_FAMILY)); #endif m_pWestFontNameFT->SetText(sFontFamilyString); m_pEastFontNameFT->SetText(sFontFamilyString); m_pCTLFontNameFT->SetText(sFontFamilyString); #ifdef MACOSX - OUString sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_TYPEFACE)); + OUString sFontStyleString(CuiResId(RID_SVXSTR_CHARNAME_TYPEFACE)); #else - OUString sFontStyleString(CUI_RES(RID_SVXSTR_CHARNAME_STYLE)); + OUString sFontStyleString(CuiResId(RID_SVXSTR_CHARNAME_STYLE)); #endif m_pWestFontStyleFT->SetText(sFontStyleString); m_pEastFontStyleFT->SetText(sFontStyleString); diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index ed1d7e6dfecd..f4d566875385 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -59,7 +59,7 @@ SvxConnectionDialog::SvxConnectionDialog( vcl::Window* pParent, const SfxItemSet _pPage->Construct(); SetTabPage( _pPage ); - SetText(CUI_RES( RID_SVXSTR_CONNECTOR )); + SetText(CuiResId( RID_SVXSTR_CONNECTOR )); } /************************************************************************* diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 9df84cd66d4e..b0e0325e8995 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -708,7 +708,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) sal_Int32 ay = sal_Int32(floor((float)aOrigPixelSize.Height() / ((float)aOrigSize.Height()/TWIP_TO_INCH)+0.5)); sTemp += " "; - sTemp += CUI_RES( RID_SVXSTR_PPI ); + sTemp += CuiResId( RID_SVXSTR_PPI ); OUString sPPI = OUString::number(ax); if (abs(ax - ay) > 1) { sPPI += OUStringLiteral1(0x00D7) + OUString::number(ay); diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index e6466fb640c2..8f90eac08a6d 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -69,7 +69,7 @@ SvxMeasureDialog::SvxMeasureDialog( vcl::Window* pParent, const SfxItemSet& rInA _pPage->Construct(); SetTabPage(_pPage ); - SetText(CUI_RES(RID_SVXSTR_DIMENSION_LINE)); + SetText(CuiResId(RID_SVXSTR_DIMENSION_LINE)); } /************************************************************************* @@ -804,7 +804,7 @@ void SvxMeasurePage::ChangeAttrHdl_Impl( void* p ) void SvxMeasurePage::FillUnitLB() { // fill ListBox with metrics - SvxStringArray aMetricArr( SVX_RES( RID_SVXSTR_FIELDUNIT_TABLE ) ); + SvxStringArray aMetricArr(ResId(RID_SVXSTR_FIELDUNIT_TABLE, DIALOG_MGR())); sal_IntPtr nUnit = FUNIT_NONE; OUString aStrMetric( m_pFtAutomatic->GetText()); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 6a48ae3316d1..8e7944d5c625 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -237,7 +237,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage(vcl::Window* pParent, , pNumItem(nullptr) , pNumFmtShell(nullptr) , nInitFormat(ULONG_MAX) - , sAutomaticEntry(CUI_RES(RID_SVXSTR_AUTO_ENTRY)) + , sAutomaticEntry(CuiResId(RID_SVXSTR_AUTO_ENTRY)) , pLastActivWindow(nullptr) { get(m_pFtCategory, "categoryft"); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index e6d35cf4e517..0c3d313c8686 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -990,7 +990,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, Button*, void) { sfx2::FileDialogHelper aFileDialog(0); - aFileDialog.SetTitle(CUI_RES(RID_SVXSTR_ADD_IMAGE)); + aFileDialog.SetTitle(CuiResId(RID_SVXSTR_ADD_IMAGE)); if ( aFileDialog.Execute() != ERRCODE_NONE ) return; @@ -1178,7 +1178,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent, eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); // Fill ListBox with predefined / translated numbering types. - ResStringArray aNames( SVX_RES( RID_SVXSTRARY_NUMBERINGTYPE )); + ResStringArray aNames(ResId(RID_SVXSTRARY_NUMBERINGTYPE, DIALOG_MGR())); sal_uInt32 nCount = aNames.Count(); for (sal_uInt32 i = 0; i < nCount; ++i) { @@ -1950,7 +1950,7 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton, void ) OUString aGrfName; Size aSize; bool bSucc(false); - SvxOpenGraphicDialog aGrfDlg( CUI_RES(RID_SVXSTR_EDIT_GRAPHIC) ); + SvxOpenGraphicDialog aGrfDlg( CuiResId(RID_SVXSTR_EDIT_GRAPHIC) ); if(MN_GALLERY_ENTRY <= nItemId ) { diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index e0f701220d48..16100cc46413 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -218,11 +218,11 @@ SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr // fill text flow listbox with valid entries - m_pTextFlowBox->InsertEntryValue( CUI_RES( RID_SVXSTR_PAGEDIR_LTR_HORI ), SvxFrameDirection::Horizontal_LR_TB ); + m_pTextFlowBox->InsertEntryValue( CuiResId( RID_SVXSTR_PAGEDIR_LTR_HORI ), SvxFrameDirection::Horizontal_LR_TB ); if( bCTL ) - m_pTextFlowBox->InsertEntryValue( CUI_RES( RID_SVXSTR_PAGEDIR_RTL_HORI ), SvxFrameDirection::Horizontal_RL_TB ); + m_pTextFlowBox->InsertEntryValue( CuiResId( RID_SVXSTR_PAGEDIR_RTL_HORI ), SvxFrameDirection::Horizontal_RL_TB ); // #109989# do not show vertical directions in Writer/Web @@ -230,8 +230,8 @@ SvxPageDescPage::SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rAttr { if( bCJK ) { - m_pTextFlowBox->InsertEntryValue( CUI_RES( RID_SVXSTR_PAGEDIR_RTL_VERT ), SvxFrameDirection::Vertical_RL_TB ); - m_pTextFlowBox->InsertEntryValue( CUI_RES( RID_SVXSTR_PAGEDIR_LTR_VERT ), SvxFrameDirection::Vertical_LR_TB ); + m_pTextFlowBox->InsertEntryValue( CuiResId( RID_SVXSTR_PAGEDIR_RTL_VERT ), SvxFrameDirection::Vertical_RL_TB ); + m_pTextFlowBox->InsertEntryValue( CuiResId( RID_SVXSTR_PAGEDIR_LTR_VERT ), SvxFrameDirection::Vertical_LR_TB ); } } diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index fece2c82efe8..986f433852e0 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1044,9 +1044,9 @@ SvxParaAlignTabPage::SvxParaAlignTabPage( vcl::Window* pParent, const SfxItemSet m_pLastLineLB->SetSelectHdl( LINK( this, SvxParaAlignTabPage, LastLineHdl_Impl ) ); m_pTextDirectionLB->SetSelectHdl( LINK( this, SvxParaAlignTabPage, TextDirectionHdl_Impl ) ); - m_pTextDirectionLB->InsertEntryValue( CUI_RES( RID_SVXSTR_FRAMEDIR_SUPER ), SvxFrameDirection::Environment ); - m_pTextDirectionLB->InsertEntryValue( CUI_RES( RID_SVXSTR_FRAMEDIR_LTR ), SvxFrameDirection::Horizontal_LR_TB ); - m_pTextDirectionLB->InsertEntryValue( CUI_RES( RID_SVXSTR_FRAMEDIR_RTL ), SvxFrameDirection::Horizontal_RL_TB ); + m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_SUPER ), SvxFrameDirection::Environment ); + m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_LTR ), SvxFrameDirection::Horizontal_LR_TB ); + m_pTextDirectionLB->InsertEntryValue( CuiResId( RID_SVXSTR_FRAMEDIR_RTL ), SvxFrameDirection::Horizontal_RL_TB ); setPreviewsToSamePlace(pParent, this); } diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 1bdbe8ac7752..d4f2513d8b98 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -557,7 +557,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickRenameHdl, SvxPresetListBox*, void) if( nPos != VALUESET_ITEM_NOTFOUND ) { - OUString aDesc( CUI_RES( RID_SVXSTR_DESC_NEW_BITMAP ) ); + OUString aDesc( CuiResId( RID_SVXSTR_DESC_NEW_BITMAP ) ); OUString aName( m_pBitmapList->GetBitmap( nPos )->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 848e476313cd..232dc45e2f64 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -352,8 +352,8 @@ IMPL_LINK(SvxColorTabPage, ModifiedHdl_Impl, Edit&, rEdit, void) IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, Button*, void) { - OUString aNewName( SVX_RES( RID_SVXSTR_COLOR ) ); - OUString aDesc( CUI_RES( RID_SVXSTR_DESC_COLOR ) ); + OUString aNewName( SvxResId( RID_SVXSTR_COLOR ) ); + OUString aDesc( CuiResId( RID_SVXSTR_DESC_COLOR ) ); OUString aName; long j = 1; diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index c82d4bf4b5f7..f7f2de67e2ae 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -187,7 +187,7 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& rSet ) // determining (and possibly cutting) the name and // displaying it in the GroupBox - OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); + OUString aString( CuiResId( RID_SVXSTR_TABLE ) ); aString += ": "; INetURLObject aURL( m_pGradientList->GetPath() ); @@ -360,8 +360,8 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void* pControl ) IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, Button*, void) { - OUString aNewName( SVX_RES( RID_SVXSTR_GRADIENT ) ); - OUString aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) ); + OUString aNewName( SvxResId( RID_SVXSTR_GRADIENT ) ); + OUString aDesc( CuiResId( RID_SVXSTR_DESC_GRADIENT ) ); OUString aName; long nCount = m_pGradientList->Count(); @@ -501,7 +501,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void if ( nPos != VALUESET_ITEM_NOTFOUND ) { - OUString aDesc( CUI_RES( RID_SVXSTR_DESC_GRADIENT ) ); + OUString aDesc( CuiResId( RID_SVXSTR_DESC_GRADIENT ) ); OUString aName( m_pGradientList->GetGradient( nPos )->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 377400f56ce7..42e7c6e39231 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -174,7 +174,7 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet ) // determining (possibly cutting) the name // and displaying it in the GroupBox - OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); + OUString aString( CuiResId( RID_SVXSTR_TABLE ) ); aString += ": "; INetURLObject aURL( m_pHatchingList->GetPath() ); @@ -431,8 +431,8 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl() IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void) { - OUString aNewName( SVX_RES( RID_SVXSTR_HATCH ) ); - OUString aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) ); + OUString aNewName( SvxResId( RID_SVXSTR_HATCH ) ); + OUString aDesc( CuiResId( RID_SVXSTR_DESC_HATCH ) ); OUString aName; long nCount = m_pHatchingList->Count(); @@ -563,7 +563,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void ) if( nPos != VALUESET_ITEM_NOTFOUND ) { - OUString aDesc( CUI_RES( RID_SVXSTR_DESC_HATCH ) ); + OUString aDesc( CuiResId( RID_SVXSTR_DESC_HATCH ) ); OUString aName( m_pHatchingList->GetHatch( nPos )->GetName() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 437cda7f6cd6..52830e93919f 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -463,7 +463,7 @@ void SvxLineTabPage::SymbolSelected(MenuButton* pButton) break; default: { - SvxOpenGraphicDialog aGrfDlg(CUI_RES(RID_SVXSTR_EDIT_GRAPHIC)); + SvxOpenGraphicDialog aGrfDlg(CuiResId(RID_SVXSTR_EDIT_GRAPHIC)); aGrfDlg.EnableLink(false); aGrfDlg.AsLink(false); if( !aGrfDlg.Execute() ) @@ -525,7 +525,7 @@ void SvxLineTabPage::FillListboxes() m_pLbLineStyle->SelectEntryPos( nOldSelect ); // Line end style - OUString sNone( SVX_RES( RID_SVXSTR_NONE ) ); + OUString sNone( SvxResId( RID_SVXSTR_NONE ) ); nOldSelect = m_pLbStartStyle->GetSelectEntryPos(); m_pLbStartStyle->Clear(); m_pLbStartStyle->InsertEntry( sNone ); @@ -562,8 +562,8 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) nPos = m_pLbLineStyle->GetSelectEntryPos(); m_pLbLineStyle->Clear(); - m_pLbLineStyle->InsertEntry( SVX_RESSTR( RID_SVXSTR_INVISIBLE ) ); - m_pLbLineStyle->InsertEntry( SVX_RESSTR( RID_SVXSTR_SOLID ) ); + m_pLbLineStyle->InsertEntry( SvxResId( RID_SVXSTR_INVISIBLE ) ); + m_pLbLineStyle->InsertEntry( SvxResId( RID_SVXSTR_SOLID ) ); m_pLbLineStyle->Fill( m_pDashList ); nCount = m_pLbLineStyle->GetEntryCount(); @@ -589,7 +589,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) *m_pnLineEndListState = ChangeType::NONE; nPos = m_pLbLineStyle->GetSelectEntryPos(); - OUString sNone( SVX_RES( RID_SVXSTR_NONE ) ); + OUString sNone( SvxResId( RID_SVXSTR_NONE ) ); m_pLbStartStyle->Clear(); m_pLbStartStyle->InsertEntry( sNone ); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 1708ed4bf7d3..12aaf3c9c964 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -203,7 +203,7 @@ void SvxLineDefTabPage::ActivatePage( const SfxItemSet& ) // determining (and possibly cutting) the name // and displaying it in the GroupBox -// OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); +// OUString aString( CuiResId( RID_SVXSTR_TABLE ) ); // aString += ": "; INetURLObject aURL( pDashList->GetPath() ); @@ -244,7 +244,7 @@ void SvxLineDefTabPage::CheckChanges_Impl() ResMgr& rMgr = CUI_MGR(); Image aWarningBoxImage = WarningBox::GetStandardImage(); ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(), - SVX_RESSTR( RID_SVXSTR_LINESTYLE ), + SvxResId( RID_SVXSTR_LINESTYLE ), OUString( ResId( RID_SVXSTR_ASK_CHANGE_LINESTYLE, rMgr ) ), &aWarningBoxImage ); DBG_ASSERT(aMessDlg, "Dialog creation failed!"); @@ -534,7 +534,7 @@ void SvxLineDefTabPage::SelectTypeHdl_Impl(ListBox* p) IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, Button*, void) { ResMgr& rMgr = CUI_MGR(); - OUString aNewName( SVX_RES( RID_SVXSTR_LINESTYLE ) ); + OUString aNewName( SvxResId( RID_SVXSTR_LINESTYLE ) ); OUString aDesc( ResId( RID_SVXSTR_DESC_LINESTYLE, rMgr ) ); OUString aName; diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 2eaac554ff91..924a9895dc70 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -419,7 +419,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, Button*, void) SdrObject::Free( pConvPolyObj ); ResMgr& rMgr = CUI_MGR(); - OUString aNewName( SVX_RES( RID_SVXSTR_LINEEND ) ); + OUString aNewName( SvxResId( RID_SVXSTR_LINEEND ) ); OUString aDesc( ResId( RID_SVXSTR_DESC_LINEEND, rMgr ) ); OUString aName; diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 5bed8420105b..df6a58249fec 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -176,7 +176,7 @@ void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet ) // determining (possibly cutting) the name and // displaying it in the GroupBox - OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); + OUString aString( CuiResId( RID_SVXSTR_TABLE ) ); aString += ": "; INetURLObject aURL( m_pPatternList->GetPath() ); @@ -350,8 +350,8 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void) IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, Button*, void) { - OUString aNewName( SVX_RES( RID_SVXSTR_PATTERN_UNTITLED ) ); - OUString aDesc( CUI_RES( RID_SVXSTR_DESC_NEW_PATTERN ) ); + OUString aNewName( SvxResId( RID_SVXSTR_PATTERN_UNTITLED ) ); + OUString aDesc( CuiResId( RID_SVXSTR_DESC_NEW_PATTERN ) ); OUString aName; long nCount = m_pPatternList->Count(); diff --git a/desktop/inc/dp_gui_shared.hxx b/desktop/inc/dp_gui_shared.hxx index bd175cb3bfa5..63496c860867 100644 --- a/desktop/inc/dp_gui_shared.hxx +++ b/desktop/inc/dp_gui_shared.hxx @@ -33,13 +33,10 @@ struct DeploymentGuiResMgr : } }; -class DpGuiResId : public ResId +inline OUString DpGuiResId(sal_uInt16 nId) { -public: - explicit DpGuiResId( sal_uInt16 nId ):ResId( nId, *DeploymentGuiResMgr::get() ) {} -}; - -#define DPGUI_RESSTR(i) DpGuiResId(i).toString() + return ResId(nId, *DeploymentGuiResMgr::get()); +} } // namespace dp_gui diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 627cf6a2db92..5ec52681c5a7 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -374,7 +374,7 @@ OUString GetMsgString( { ResMgr* resMgr = Desktop::GetDesktopResManager(); if ( resMgr ) - return ResId(nId, *resMgr).toString(); + return ResId(nId, *resMgr); } return aFallbackMsg; } @@ -402,7 +402,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg ) ResMgr* pResMgr = Desktop::GetDesktopResManager(); if ( pResMgr ) - aDiagnosticMessage.append( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr).toString() ); + aDiagnosticMessage.append( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr) ); else aDiagnosticMessage.append( "The program cannot be started." ); @@ -410,7 +410,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg ) { aDiagnosticMessage.append( "\n\n" ); if ( pResMgr ) - aDiagnosticMessage.append( ResId(STR_INTERNAL_ERRMSG, *pResMgr).toString() ); + aDiagnosticMessage.append( ResId(STR_INTERNAL_ERRMSG, *pResMgr) ); else aDiagnosticMessage.append( "The following internal error has occurred:\n\n" ); aDiagnosticMessage.append( aInternalErrMsg ); @@ -1163,7 +1163,7 @@ void restartOnMac(bool passArguments) { #if HAVE_FEATURE_MACOSX_SANDBOX (void) passArguments; // avoid warnings ResMgr *resMgr = Desktop::GetDesktopResManager(); - OUString aMessage = ResId(STR_LO_MUST_BE_RESTARTED, *resMgr).toString(); + OUString aMessage = ResId(STR_LO_MUST_BE_RESTARTED, *resMgr); MessageDialog aRestartBox(NULL, aMessage); aRestartBox.Execute(); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index a7ff752f9fa3..dc75acbb8264 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -92,7 +92,7 @@ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles > const SolarMutexGuard guard; std::unique_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) ); OSL_ASSERT( resmgr.get() != nullptr ); - return ResId(STR_FILTERNAME_ALL, *resmgr.get()).toString(); + return ResId(STR_FILTERNAME_ALL, *resmgr.get()); } }; @@ -358,7 +358,7 @@ ResId DialogHelper::getResId( sal_uInt16 nId ) OUString DialogHelper::getResourceString(sal_uInt16 id) { const SolarMutexGuard guard; - OUString ret(ResId(id, *DeploymentGuiResMgr::get()).toString()); + OUString ret(ResId(id, *DeploymentGuiResMgr::get())); if (ret.indexOf("%PRODUCTNAME" ) != -1) { ret = ret.replaceAll("%PRODUCTNAME", utl::ConfigManager::getProductName()); diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index a7970b81297e..d8f4abc5b06e 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -436,15 +436,15 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & //hypothetical: requires two instances of an extension with the same //version to have different display names. Probably the developer forgot //to change the version. - s = ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()).toString(); + s = ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()); } else if (id == RID_STR_WARNING_VERSION_LESS) { - s = ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()).toString(); + s = ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()); } else if (id == RID_STR_WARNING_VERSION_GREATER) { - s = ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()).toString(); + s = ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()); } s = s.replaceAll("$NAME", verExc.NewDisplayName); s = s.replaceAll("$OLDNAME", verExc.Deployed->getDisplayName()); @@ -477,7 +477,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & else if (request >>= platExc) { SolarMutexGuard guard; - OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()).toString()); + OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get())); sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName()); ScopedVclPtrInstance< MessageDialog > box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, sMsg); box->Execute(); diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 9f9760607725..51c213c5d97b 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -482,17 +482,17 @@ UpdateDialog::UpdateDialog( std::vector< dp_gui::UpdateData > * updateData): ModalDialog(parent, "UpdateDialog", "desktop/ui/updatedialog.ui"), m_context(context), - m_none(DPGUI_RESSTR(RID_DLG_UPDATE_NONE)), - m_noInstallable(DPGUI_RESSTR(RID_DLG_UPDATE_NOINSTALLABLE)), - m_failure(DPGUI_RESSTR(RID_DLG_UPDATE_FAILURE)), - m_unknownError(DPGUI_RESSTR(RID_DLG_UPDATE_UNKNOWNERROR)), - m_noDescription(DPGUI_RESSTR(RID_DLG_UPDATE_NODESCRIPTION)), - m_noInstall(DPGUI_RESSTR(RID_DLG_UPDATE_NOINSTALL)), - m_noDependency(DPGUI_RESSTR(RID_DLG_UPDATE_NODEPENDENCY)), - m_noDependencyCurVer(DPGUI_RESSTR(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER)), - m_browserbased(DPGUI_RESSTR(RID_DLG_UPDATE_BROWSERBASED)), - m_version(DPGUI_RESSTR(RID_DLG_UPDATE_VERSION)), - m_ignoredUpdate(DPGUI_RESSTR(RID_DLG_UPDATE_IGNORED_UPDATE)), + m_none(DpGuiResId(RID_DLG_UPDATE_NONE)), + m_noInstallable(DpGuiResId(RID_DLG_UPDATE_NOINSTALLABLE)), + m_failure(DpGuiResId(RID_DLG_UPDATE_FAILURE)), + m_unknownError(DpGuiResId(RID_DLG_UPDATE_UNKNOWNERROR)), + m_noDescription(DpGuiResId(RID_DLG_UPDATE_NODESCRIPTION)), + m_noInstall(DpGuiResId(RID_DLG_UPDATE_NOINSTALL)), + m_noDependency(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY)), + m_noDependencyCurVer(DpGuiResId(RID_DLG_UPDATE_NODEPENDENCY_CUR_VER)), + m_browserbased(DpGuiResId(RID_DLG_UPDATE_BROWSERBASED)), + m_version(DpGuiResId(RID_DLG_UPDATE_VERSION)), + m_ignoredUpdate(DpGuiResId(RID_DLG_UPDATE_IGNORED_UPDATE)), m_updateData(*updateData), m_thread( new UpdateDialog::Thread( @@ -598,9 +598,9 @@ short UpdateDialog::Execute() { UpdateDialog::CheckListBox::CheckListBox( vcl::Window* pParent, UpdateDialog & dialog): SvxCheckListBox( pParent, WinBits(WB_BORDER) ), - m_ignoreUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE ) ), - m_ignoreAllUpdates( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE_ALL ) ), - m_enableUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_ENABLE ) ), + m_ignoreUpdate( DpGuiResId( RID_DLG_UPDATE_IGNORE ) ), + m_ignoreAllUpdates( DpGuiResId( RID_DLG_UPDATE_IGNORE_ALL ) ), + m_enableUpdate( DpGuiResId( RID_DLG_UPDATE_ENABLE ) ), m_dialog(dialog) { SetNormalStaticImage(Image(BitmapEx(RID_DLG_UPDATE_NORMALALERT))); diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 8f18c13c8060..ddadb5f7afd1 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -205,14 +205,14 @@ UpdateInstallDialog::UpdateInstallDialog( m_thread(new Thread(xCtx, *this, aVecUpdateData)), m_bError(false), m_bNoEntry(true), - m_sInstalling(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_INSTALLING)), - m_sFinished(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_FINISHED)), - m_sNoErrors(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_NO_ERRORS)), - m_sErrorDownload(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD)), - m_sErrorInstallation(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION)), - m_sErrorLicenseDeclined(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED)), - m_sNoInstall(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL)), - m_sThisErrorOccurred(DPGUI_RESSTR(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED)) + m_sInstalling(DpGuiResId(RID_DLG_UPDATE_INSTALL_INSTALLING)), + m_sFinished(DpGuiResId(RID_DLG_UPDATE_INSTALL_FINISHED)), + m_sNoErrors(DpGuiResId(RID_DLG_UPDATE_INSTALL_NO_ERRORS)), + m_sErrorDownload(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD)), + m_sErrorInstallation(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION)), + m_sErrorLicenseDeclined(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED)), + m_sNoInstall(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL)), + m_sThisErrorOccurred(DpGuiResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED)) { get(m_pFt_action, "DOWNLOADING"); get(m_pStatusbar, "STATUSBAR"); diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 10d10f292765..6112ad114593 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -85,7 +85,7 @@ OUString produceErrorText( { return reason.replaceFirst("%VERSION", (version.isEmpty() - ? dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN).toString() + ? dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN) : version)); } @@ -156,27 +156,27 @@ OUString getErrorText( if ( dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == minimalVersionOpenOfficeOrg ) { return produceErrorText( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN).toString(), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN), dependency->getAttribute("value")); } else if (dependency->getNamespaceURI() == namespaceOpenOfficeOrg && dependency->getTagName() == maximalVersionOpenOfficeOrg ) { return produceErrorText( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX).toString(), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MAX), dependency->getAttribute("value")); } else if (dependency->getNamespaceURI() == namespaceLibreOffice && dependency->getTagName() == minimalVersionLibreOffice ) { return produceErrorText( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MIN).toString(), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_LO_MIN), dependency->getAttribute("value")); } else if (dependency->hasAttributeNS(namespaceOpenOfficeOrg, minimalVersionOpenOfficeOrg)) { return produceErrorText( - dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN).toString(), + dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_OOO_MIN), dependency->getAttributeNS(namespaceOpenOfficeOrg, minimalVersionOpenOfficeOrg)); } else { - return dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN).toString(); + return dp_misc::getResId(RID_DEPLOYMENT_DEPENDENCIES_UNKNOWN); } } diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx index f03633df7fe8..b7f3739c85a2 100644 --- a/desktop/source/deployment/misc/dp_resource.cxx +++ b/desktop/source/deployment/misc/dp_resource.cxx @@ -68,7 +68,7 @@ ResId getResId( sal_uInt16 id ) OUString getResourceString( sal_uInt16 id ) { const osl::MutexGuard guard(theResourceMutex::get()); - OUString ret(ResId(id, *DeploymentResMgr::get()).toString()); + OUString ret(ResId(id, *DeploymentResMgr::get())); return ret.replaceAll("%PRODUCTNAME", utl::ConfigManager::getProductName()); } diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 99bd66bbeea2..572bdd0eaef4 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2493,7 +2493,7 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand) { boost::property_tree::ptree aChild; - OUString sClearFormat = SVX_RESSTR( RID_SVXSTR_CLEARFORM ); + OUString sClearFormat = SvxResId(RID_SVXSTR_CLEARFORM); boost::property_tree::ptree aName; aName.put("", sClearFormat.toUtf8()); diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index 80ed1bcec910..0eb7feff44e4 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -137,15 +137,15 @@ void CommandEnvironmentImpl::printLicense( const OUString & sName, const OUString& sLicense, bool & accept, bool &decline) { ResMgr * pResMgr = DeploymentResMgr::get(); - OUString s1tmp(ResId(RID_STR_UNOPKG_ACCEPT_LIC_1, *pResMgr).toString()); + OUString s1tmp(ResId(RID_STR_UNOPKG_ACCEPT_LIC_1, *pResMgr)); OUString s1(s1tmp.replaceAll("$NAME", sName)); - OUString s2 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_2, *pResMgr).toString(); - OUString s3 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_3, *pResMgr).toString(); - OUString s4 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_4, *pResMgr).toString(); - OUString sYES = ResId(RID_STR_UNOPKG_ACCEPT_LIC_YES, *pResMgr).toString(); - OUString sY = ResId(RID_STR_UNOPKG_ACCEPT_LIC_Y, *pResMgr).toString(); - OUString sNO = ResId(RID_STR_UNOPKG_ACCEPT_LIC_NO, *pResMgr).toString(); - OUString sN = ResId(RID_STR_UNOPKG_ACCEPT_LIC_N, *pResMgr).toString(); + OUString s2 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_2, *pResMgr); + OUString s3 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_3, *pResMgr); + OUString s4 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_4, *pResMgr); + OUString sYES = ResId(RID_STR_UNOPKG_ACCEPT_LIC_YES, *pResMgr); + OUString sY = ResId(RID_STR_UNOPKG_ACCEPT_LIC_Y, *pResMgr); + OUString sNO = ResId(RID_STR_UNOPKG_ACCEPT_LIC_NO, *pResMgr); + OUString sN = ResId(RID_STR_UNOPKG_ACCEPT_LIC_N, *pResMgr); OUString sNewLine("\n"); @@ -264,7 +264,7 @@ void CommandEnvironmentImpl::handle( } else if (request >>= platExc) { - OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get()).toString()); + OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get())); sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName()); dp_misc::writeConsole("\n" + sMsg + "\n\n"); approve = true; diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 7859182105a6..4c56318fad8b 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -105,7 +105,7 @@ namespace abp #else m_aSettings.eType = AST_OTHER; #endif - m_aSettings.sDataSourceName = ModuleRes(RID_STR_DEFAULT_NAME).toString(); + m_aSettings.sDataSourceName = ModuleRes(RID_STR_DEFAULT_NAME); m_aSettings.bRegisterDataSource = false; m_aSettings.bEmbedDataSource = false; m_aSettings.bIgnoreNoTable = false; @@ -116,7 +116,7 @@ namespace abp typeSelectionChanged( m_aSettings.eType ); - OUString sDialogTitle = ModuleRes(RID_STR_ABSOURCEDIALOGTITLE).toString(); + OUString sDialogTitle = ModuleRes(RID_STR_ABSOURCEDIALOGTITLE); setTitleBase(sDialogTitle); SetHelpId(HID_ABSPILOT); } @@ -137,7 +137,7 @@ namespace abp OUString sDisplayName; if ( nResId ) { - sDisplayName = ModuleRes(nResId).toString(); + sDisplayName = ModuleRes(nResId); } return sDisplayName; diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx index efd3b6f6265c..71c459a7b5db 100644 --- a/extensions/source/abpilot/admininvokationimpl.cxx +++ b/extensions/source/abpilot/admininvokationimpl.cxx @@ -74,7 +74,7 @@ namespace abp *pArguments++ <<= PropertyValue("ParentWindow", -1, makeAny(xDialogParent), PropertyState_DIRECT_VALUE); // the title of the dialog - OUString sAdminDialogTitle(ModuleRes(RID_STR_ADMINDIALOGTITLE).toString()); + OUString sAdminDialogTitle(ModuleRes(RID_STR_ADMINDIALOGTITLE)); *pArguments++ <<= PropertyValue("Title", -1, makeAny(sAdminDialogTitle), PropertyState_DIRECT_VALUE); // the name of the new data source diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index d8d5ec7d03b1..b7a2c3492e7c 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -584,8 +584,8 @@ namespace abp { // prepend some context info SQLContext aDetailedError; - aDetailedError.Message = ModuleRes(RID_STR_NOCONNECTION).toString(); - aDetailedError.Details = ModuleRes(RID_STR_PLEASECHECKSETTINGS).toString(); + aDetailedError.Message = ModuleRes(RID_STR_NOCONNECTION); + aDetailedError.Details = ModuleRes(RID_STR_PLEASECHECKSETTINGS); aDetailedError.NextException = aError; // handle (aka display) the new context info xInteractions->handle( new OInteractionRequest( makeAny( aDetailedError ) ) ); diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index a4f1c5376a8c..1aba04832332 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -73,7 +73,7 @@ namespace abp // create an instance of the dialog service Reference< XWindow > xDialogParent = VCLUnoHelper::GetInterface( _pParent ); - OUString sTitle(ModuleRes(RID_STR_FIELDDIALOGTITLE).toString()); + OUString sTitle(ModuleRes(RID_STR_FIELDDIALOGTITLE)); Reference< XExecutableDialog > xDialog = AddressBookSourceDialog::createWithDataSource(_rxORB, // the parent window xDialogParent, diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx index 93ebe3f22710..0c357bf8d996 100644 --- a/extensions/source/abpilot/fieldmappingpage.cxx +++ b/extensions/source/abpilot/fieldmappingpage.cxx @@ -67,7 +67,7 @@ namespace abp const AddressSettings& rSettings = getSettings(); OUString sHint; if ( rSettings.aFieldMapping.empty() ) - sHint = ModuleRes(RID_STR_NOFIELDSASSIGNED).toString(); + sHint = ModuleRes(RID_STR_NOFIELDSASSIGNED); m_pHint->SetText( sHint ); } diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index a30f9cf81bc3..86d2cf3c71af 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -233,7 +233,7 @@ void BibliographyLoader::load(const Reference< XFrame > & rFrame, const OUString if(xPrSet.is()) { Any aTitle; - aTitle <<= BibResId(RID_BIB_STR_FRAME_TITLE).toString(); + aTitle <<= BibResId(RID_BIB_STR_FRAME_TITLE); xPrSet->setPropertyValue("Title", aTitle); } if(aPartName == "View" || aPartName == "View1") diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx index 60ec774d3797..06638a88f7d1 100644 --- a/extensions/source/bibliography/bibmod.cxx +++ b/extensions/source/bibliography/bibmod.cxx @@ -60,11 +60,13 @@ void CloseBibModul(HdlBibModul ppBibModul) } } -BibResId::BibResId( sal_uInt16 nId ) : - ResId( nId, *pBibModul->GetResMgr() ) +OUString BibResId(sal_uInt16 nId) { + return ResId(nId, *pBibModul->GetResMgr()); } + BibConfig* BibModul::pBibConfig = nullptr; + BibModul::BibModul() { pResMgr = ResMgr::CreateResMgr( "bib" ); diff --git a/extensions/source/bibliography/bibresid.hxx b/extensions/source/bibliography/bibresid.hxx index f3a393c3b576..1855a8427b88 100644 --- a/extensions/source/bibliography/bibresid.hxx +++ b/extensions/source/bibliography/bibresid.hxx @@ -20,16 +20,9 @@ #ifndef INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBRESID_HXX #define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBRESID_HXX -#include <tools/resid.hxx> +#include <rtl/ustring.hxx> - -class BibResId : public ResId -{ - public: - explicit BibResId(sal_uInt16 nId); -}; - -#define BIB_RESSTR(i) BibResId(i).toString() +OUString BibResId(sal_uInt16 nId); #endif // INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBRESID_HXX diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index 32739be7ce4b..ae993379c67f 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -140,7 +140,7 @@ namespace bib else if(bExecute) { sErrorString += "\n"; - sErrorString += BIB_RESSTR(RID_MAP_QUESTION); + sErrorString += BibResId(RID_MAP_QUESTION); ScopedVclPtrInstance< QueryBox > aQuery(this, WB_YES_NO, sErrorString); aQuery->SetDefaultCheckBoxText(); short nResult = aQuery->Execute(); diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index a6c5deba6924..756d488078b9 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -258,7 +258,7 @@ static sal_uInt16 lcl_FindLogicalName(BibConfig* pConfig , MappingDialog_Impl::MappingDialog_Impl(vcl::Window* pParent, BibDataManager* pMan) : ModalDialog(pParent, "MappingDialog", "modules/sbibliography/ui/mappingdialog.ui") , pDatMan(pMan) - , sNone(BIB_RESSTR(RID_BIB_STR_NONE)) + , sNone(BibResId(RID_BIB_STR_NONE)) , bModified(false) { get(pOKBT, "ok"); @@ -1336,28 +1336,28 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( uno::Sequence<OUString> aValues(TYPE_COUNT + 1); OUString* pValuesArr = aValues.getArray(); - pValuesArr[0] = BIB_RESSTR(ST_TYPE_ARTICLE); - pValuesArr[1] = BIB_RESSTR(ST_TYPE_BOOK); - pValuesArr[2] = BIB_RESSTR(ST_TYPE_BOOKLET); - pValuesArr[3] = BIB_RESSTR(ST_TYPE_CONFERENCE); - pValuesArr[4] = BIB_RESSTR(ST_TYPE_INBOOK ); - pValuesArr[5] = BIB_RESSTR(ST_TYPE_INCOLLECTION); - pValuesArr[6] = BIB_RESSTR(ST_TYPE_INPROCEEDINGS); - pValuesArr[7] = BIB_RESSTR(ST_TYPE_JOURNAL ); - pValuesArr[8] = BIB_RESSTR(ST_TYPE_MANUAL ); - pValuesArr[9] = BIB_RESSTR(ST_TYPE_MASTERSTHESIS); - pValuesArr[10] = BIB_RESSTR(ST_TYPE_MISC ); - pValuesArr[11] = BIB_RESSTR(ST_TYPE_PHDTHESIS ); - pValuesArr[12] = BIB_RESSTR(ST_TYPE_PROCEEDINGS ); - pValuesArr[13] = BIB_RESSTR(ST_TYPE_TECHREPORT ); - pValuesArr[14] = BIB_RESSTR(ST_TYPE_UNPUBLISHED ); - pValuesArr[15] = BIB_RESSTR(ST_TYPE_EMAIL ); - pValuesArr[16] = BIB_RESSTR(ST_TYPE_WWW ); - pValuesArr[17] = BIB_RESSTR(ST_TYPE_CUSTOM1 ); - pValuesArr[18] = BIB_RESSTR(ST_TYPE_CUSTOM2 ); - pValuesArr[19] = BIB_RESSTR(ST_TYPE_CUSTOM3 ); - pValuesArr[20] = BIB_RESSTR(ST_TYPE_CUSTOM4 ); - pValuesArr[21] = BIB_RESSTR(ST_TYPE_CUSTOM5 ); + pValuesArr[0] = BibResId(ST_TYPE_ARTICLE); + pValuesArr[1] = BibResId(ST_TYPE_BOOK); + pValuesArr[2] = BibResId(ST_TYPE_BOOKLET); + pValuesArr[3] = BibResId(ST_TYPE_CONFERENCE); + pValuesArr[4] = BibResId(ST_TYPE_INBOOK ); + pValuesArr[5] = BibResId(ST_TYPE_INCOLLECTION); + pValuesArr[6] = BibResId(ST_TYPE_INPROCEEDINGS); + pValuesArr[7] = BibResId(ST_TYPE_JOURNAL ); + pValuesArr[8] = BibResId(ST_TYPE_MANUAL ); + pValuesArr[9] = BibResId(ST_TYPE_MASTERSTHESIS); + pValuesArr[10] = BibResId(ST_TYPE_MISC ); + pValuesArr[11] = BibResId(ST_TYPE_PHDTHESIS ); + pValuesArr[12] = BibResId(ST_TYPE_PROCEEDINGS ); + pValuesArr[13] = BibResId(ST_TYPE_TECHREPORT ); + pValuesArr[14] = BibResId(ST_TYPE_UNPUBLISHED ); + pValuesArr[15] = BibResId(ST_TYPE_EMAIL ); + pValuesArr[16] = BibResId(ST_TYPE_WWW ); + pValuesArr[17] = BibResId(ST_TYPE_CUSTOM1 ); + pValuesArr[18] = BibResId(ST_TYPE_CUSTOM2 ); + pValuesArr[19] = BibResId(ST_TYPE_CUSTOM3 ); + pValuesArr[20] = BibResId(ST_TYPE_CUSTOM4 ); + pValuesArr[21] = BibResId(ST_TYPE_CUSTOM5 ); // empty string if an invalid value no values is set pValuesArr[TYPE_COUNT].clear(); diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 9a3866c991b2..9eccfef67a0d 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -167,7 +167,7 @@ void BibPosListener::disposing(const lang::EventObject& /*Source*/) BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan): TabPage(pParent, "GeneralPage", "modules/sbibliography/ui/generalpage.ui"), BibShortCutHandler( this ), - sErrorPrefix(BIB_RESSTR(ST_ERROR_PREFIX)), + sErrorPrefix(BibResId(ST_ERROR_PREFIX)), mxBibGeneralPageFocusListener(new BibGeneralPageFocusListener(this)), pDatMan(pMan) { @@ -334,7 +334,7 @@ BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan): if(!sTableErrorString.isEmpty()) sTableErrorString = sErrorPrefix + sTableErrorString; - SetText(BIB_RESSTR(ST_TYPE_TITLE)); + SetText(BibResId(ST_TYPE_TITLE)); Size aSize(LogicToPixel(Size(0, 209), MapMode(MapUnit::MapAppFont))); set_height_request(aSize.Height()); diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 68bc88dae26a..6d4d476c173c 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -231,7 +231,7 @@ namespace dbp nCommandTypeResourceId = RID_STR_TYPE_COMMAND; break; } - m_pFormContentType->SetText(ModuleRes(nCommandTypeResourceId).toString()); + m_pFormContentType->SetText(ModuleRes(nCommandTypeResourceId)); } OControlWizardPage_Base::initializePage(); @@ -607,7 +607,7 @@ namespace dbp // prepend an extra SQLContext explaining what we were doing SQLContext aContext; - aContext.Message = ModuleRes(RID_STR_COULDNOTOPENTABLE).toString(); + aContext.Message = ModuleRes(RID_STR_COULDNOTOPENTABLE); aContext.NextException = aSQLException; // create an interaction handler to display this exception diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 8be4a22e91e9..9db743904aa4 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -60,7 +60,7 @@ namespace dbp m_pNextPage->SetHelpId(HID_GRIDWIZARD_NEXT); m_pCancel->SetHelpId(HID_GRIDWIZARD_CANCEL); m_pFinish->SetHelpId(HID_GRIDWIZARD_FINISH); - setTitleBase(ModuleRes(RID_STR_GRIDWIZARD_TITLE).toString()); + setTitleBase(ModuleRes(RID_STR_GRIDWIZARD_TITLE)); // if we do not need the data source selection page ... if (!needDatasourceSelection()) @@ -160,11 +160,11 @@ namespace dbp case DataType::TIMESTAMP: aColumnServiceNames.push_back(OUString("DateField")); - aColumnLabelPostfixes.push_back(ModuleRes(RID_STR_DATEPOSTFIX).toString()); + aColumnLabelPostfixes.push_back(ModuleRes(RID_STR_DATEPOSTFIX)); aFormFieldNames.push_back(*pSelectedFields); aColumnServiceNames.push_back(OUString("TimeField")); - aColumnLabelPostfixes.push_back(ModuleRes(RID_STR_TIMEPOSTFIX).toString()); + aColumnLabelPostfixes.push_back(ModuleRes(RID_STR_TIMEPOSTFIX)); break; default: diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index ddb34e420b60..ab44cefe5bb1 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -55,7 +55,7 @@ namespace dbp m_pNextPage->SetHelpId(HID_GROUPWIZARD_NEXT); m_pCancel->SetHelpId(HID_GROUPWIZARD_CANCEL); m_pFinish->SetHelpId(HID_GROUPWIZARD_FINISH); - setTitleBase(ModuleRes(RID_STR_GROUPWIZARD_TITLE).toString()); + setTitleBase(ModuleRes(RID_STR_GROUPWIZARD_TITLE)); } @@ -468,7 +468,7 @@ namespace dbp OOptionDBFieldPage::OOptionDBFieldPage( OControlWizard* _pParent ) :ODBFieldPage(_pParent) { - setDescriptionText(ModuleRes(RID_STR_GROUPWIZ_DBFIELD).toString()); + setDescriptionText(ModuleRes(RID_STR_GROUPWIZ_DBFIELD)); } diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index d935d0a98b0c..b3bb2e6ffbad 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -73,11 +73,11 @@ namespace dbp { case FormComponentType::LISTBOX: m_bListBox = true; - setTitleBase(ModuleRes(RID_STR_LISTWIZARD_TITLE).toString()); + setTitleBase(ModuleRes(RID_STR_LISTWIZARD_TITLE)); return true; case FormComponentType::COMBOBOX: m_bListBox = false; - setTitleBase(ModuleRes(RID_STR_COMBOWIZARD_TITLE).toString()); + setTitleBase(ModuleRes(RID_STR_COMBOWIZARD_TITLE)); return true; } return false; @@ -354,7 +354,7 @@ namespace dbp get(m_pSelectTableField, "selectfield"); get(m_pDisplayedField, "displayfield"); get(m_pInfo, "info"); - m_pInfo->SetText(ModuleRes( isListBox() ? RID_STR_FIELDINFO_LISTBOX : RID_STR_FIELDINFO_COMBOBOX).toString()); + m_pInfo->SetText(ModuleRes( isListBox() ? RID_STR_FIELDINFO_LISTBOX : RID_STR_FIELDINFO_COMBOBOX)); m_pSelectTableField->SetSelectHdl(LINK(this, OContentFieldSelection, OnFieldSelected)); m_pSelectTableField->SetDoubleClickHdl(LINK(this, OContentFieldSelection, OnTableDoubleClicked)); } @@ -505,7 +505,7 @@ namespace dbp OComboDBFieldPage::OComboDBFieldPage( OControlWizard* _pParent ) :ODBFieldPage(_pParent) { - setDescriptionText(ModuleRes(RID_STR_COMBOWIZ_DBFIELD).toString()); + setDescriptionText(ModuleRes(RID_STR_COMBOWIZ_DBFIELD)); } diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index b08ad0843f6c..0527b1268590 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -173,7 +173,7 @@ namespace pcr for ( sal_Int32 i=0; i<nCategories; ++i, ++pReturn ) { pReturn->ProgrammaticName = OUString::createFromAscii( aCategories[i].programmaticName ); - pReturn->UIName = PcrRes( aCategories[i].uiNameResId ).toString(); + pReturn->UIName = PcrRes( aCategories[i].uiNameResId ); pReturn->HelpURL = HelpIdUrl::getHelpURL( aCategories[i].helpId ); } diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index ce25451ef572..c468edd23fa2 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -542,7 +542,7 @@ namespace pcr if ( xBinding.is() ) { // find a nice name for it - OUString sBaseName(PcrRes(RID_STR_BINDING_UI_NAME).toString()); + OUString sBaseName(PcrRes(RID_STR_BINDING_UI_NAME)); sBaseName += " "; OUString sNewName; sal_Int32 nNumber = 1; diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 025199837fbf..964c3ee1e800 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -138,7 +138,7 @@ namespace pcr EventDescription::EventDescription( EventId _nId, const sal_Char* _pListenerNamespaceAscii, const sal_Char* _pListenerClassAsciiName, const sal_Char* _pListenerMethodAsciiName, sal_uInt16 _nDisplayNameResId, const OString& _sHelpId, const OString& _sUniqueBrowseId ) - :sDisplayName(PcrRes( _nDisplayNameResId ).toString()) + :sDisplayName(PcrRes( _nDisplayNameResId )) ,sListenerMethodName( OUString::createFromAscii( _pListenerMethodAsciiName ) ) ,sHelpId( _sHelpId ) ,sUniqueBrowseId( _sUniqueBrowseId ) diff --git a/extensions/source/propctrlr/formbrowsertools.cxx b/extensions/source/propctrlr/formbrowsertools.cxx index 12a5d4afec70..fd01daebb8af 100644 --- a/extensions/source/propctrlr/formbrowsertools.cxx +++ b/extensions/source/propctrlr/formbrowsertools.cxx @@ -48,12 +48,12 @@ namespace pcr { Reference< XInterface > xIFace; aUnoObj >>= xIFace; - sClassName = PcrRes(RID_STR_PROPTITLE_EDIT).toString(); + sClassName = PcrRes(RID_STR_PROPTITLE_EDIT); if (xIFace.is()) { // we have a chance to check if it's a formatted field model Reference< XServiceInfo > xInfo(xIFace, UNO_QUERY); if (xInfo.is() && (xInfo->supportsService(SERVICE_COMPONENT_FORMATTEDFIELD))) - sClassName = PcrRes(RID_STR_PROPTITLE_FORMATTED).toString(); + sClassName = PcrRes(RID_STR_PROPTITLE_FORMATTED); else if (!xInfo.is()) { // couldn't distinguish between formatted and edit with the service name, so try with the properties @@ -62,7 +62,7 @@ namespace pcr { Reference< XPropertySetInfo > xPropsInfo = xProps->getPropertySetInfo(); if (xPropsInfo.is() && xPropsInfo->hasPropertyByName(PROPERTY_FORMATSSUPPLIER)) - sClassName = PcrRes(RID_STR_PROPTITLE_FORMATTED).toString(); + sClassName = PcrRes(RID_STR_PROPTITLE_FORMATTED); } } } @@ -70,44 +70,44 @@ namespace pcr break; case FormComponentType::COMMANDBUTTON: - sClassName = PcrRes(RID_STR_PROPTITLE_PUSHBUTTON).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_PUSHBUTTON); break; case FormComponentType::RADIOBUTTON: - sClassName = PcrRes(RID_STR_PROPTITLE_RADIOBUTTON).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_RADIOBUTTON); break; case FormComponentType::CHECKBOX: - sClassName = PcrRes(RID_STR_PROPTITLE_CHECKBOX).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_CHECKBOX); break; case FormComponentType::LISTBOX: - sClassName = PcrRes(RID_STR_PROPTITLE_LISTBOX).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_LISTBOX); break; case FormComponentType::COMBOBOX: - sClassName = PcrRes(RID_STR_PROPTITLE_COMBOBOX).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_COMBOBOX); break; case FormComponentType::GROUPBOX: - sClassName = PcrRes(RID_STR_PROPTITLE_GROUPBOX).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_GROUPBOX); break; case FormComponentType::IMAGEBUTTON: - sClassName = PcrRes(RID_STR_PROPTITLE_IMAGEBUTTON).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_IMAGEBUTTON); break; case FormComponentType::FIXEDTEXT: - sClassName = PcrRes(RID_STR_PROPTITLE_FIXEDTEXT).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_FIXEDTEXT); break; case FormComponentType::GRIDCONTROL: - sClassName = PcrRes(RID_STR_PROPTITLE_DBGRID).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_DBGRID); break; case FormComponentType::FILECONTROL: - sClassName = PcrRes(RID_STR_PROPTITLE_FILECONTROL).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_FILECONTROL); break; case FormComponentType::DATEFIELD: - sClassName = PcrRes(RID_STR_PROPTITLE_DATEFIELD).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_DATEFIELD); break; case FormComponentType::TIMEFIELD: - sClassName = PcrRes(RID_STR_PROPTITLE_TIMEFIELD).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_TIMEFIELD); break; case FormComponentType::NUMERICFIELD: - sClassName = PcrRes(RID_STR_PROPTITLE_NUMERICFIELD).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_NUMERICFIELD); break; case FormComponentType::CURRENCYFIELD: - sClassName = PcrRes(RID_STR_PROPTITLE_CURRENCYFIELD).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_CURRENCYFIELD); break; case FormComponentType::PATTERNFIELD: - sClassName = PcrRes(RID_STR_PROPTITLE_PATTERNFIELD).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_PATTERNFIELD); break; case FormComponentType::IMAGECONTROL: - sClassName = PcrRes(RID_STR_PROPTITLE_IMAGECONTROL).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_IMAGECONTROL); break; case FormComponentType::HIDDENCONTROL: - sClassName = PcrRes(RID_STR_PROPTITLE_HIDDENCONTROL).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_HIDDENCONTROL); break; case FormComponentType::CONTROL: default: - sClassName = PcrRes(RID_STR_PROPTITLE_UNKNOWNCONTROL).toString(); break; + sClassName = PcrRes(RID_STR_PROPTITLE_UNKNOWNCONTROL); break; } return sClassName; diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 71fb21a05f43..b3e760c447c5 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -144,7 +144,7 @@ namespace pcr FormComponentPropertyHandler::FormComponentPropertyHandler( const Reference< XComponentContext >& _rxContext ) :FormComponentPropertyHandler_Base( _rxContext ) ,::comphelper::OPropertyContainer(FormComponentPropertyHandler_Base::rBHelper) - ,m_sDefaultValueString( PcrRes(RID_STR_STANDARD).toString() ) + ,m_sDefaultValueString( PcrRes(RID_STR_STANDARD) ) ,m_eComponentClass( eUnknown ) ,m_bComponentIsSubForm( false ) ,m_bHaveListSource( false ) @@ -551,7 +551,7 @@ namespace pcr OUString sControlValue; OSL_VERIFY( _rControlValue >>= sControlValue ); // Don't convert a placeholder - if ( nPropId == PROPERTY_ID_IMAGE_URL && sControlValue.equals( PcrRes(RID_EMBED_IMAGE_PLACEHOLDER).toString() ) ) + if ( nPropId == PROPERTY_ID_IMAGE_URL && sControlValue.equals( PcrRes(RID_EMBED_IMAGE_PLACEHOLDER) ) ) aPropertyValue <<= sControlValue; else { @@ -747,7 +747,7 @@ namespace pcr OUStringBuffer displayName; if ( aFont.Name.isEmpty() ) { - displayName.append( PcrRes(RID_STR_FONT_DEFAULT).toString() ); + displayName.append( PcrRes(RID_STR_FONT_DEFAULT) ); } else { @@ -770,7 +770,7 @@ namespace pcr if ( eWeight > WEIGHT_NORMAL ) nStyleResID = RID_STR_FONTSTYLE_BOLD; } - displayName.append(PcrRes(nStyleResID).toString()); + displayName.append(PcrRes(nStyleResID)); // font size if ( aFont.Height ) @@ -2680,7 +2680,7 @@ namespace pcr SvNumberFormatter* pFormatter = pSupplier->GetNumberFormatter(); double dPreviewVal = OFormatSampleControl::getPreviewValue(pFormatter,nFormatKey); - SvxNumberInfoItem aFormatter( pFormatter, dPreviewVal, PcrRes(RID_STR_TEXT_FORMAT).toString(), SID_ATTR_NUMBERFORMAT_INFO ); + SvxNumberInfoItem aFormatter( pFormatter, dPreviewVal, PcrRes(RID_STR_TEXT_FORMAT), SID_ATTR_NUMBERFORMAT_INFO ); aCoreSet.Put( aFormatter ); // a tab dialog with a single page diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 5a1b0f71bcc7..601e4585b1d8 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -296,7 +296,7 @@ namespace pcr { if ( m_sDetailLabel.isEmpty() ) { - m_sDetailLabel = PcrRes(STR_DETAIL_FORM).toString(); + m_sDetailLabel = PcrRes(STR_DETAIL_FORM); } sDetailType = m_sDetailLabel; } @@ -308,7 +308,7 @@ namespace pcr { if ( m_sMasterLabel.isEmpty() ) { - m_sMasterLabel = PcrRes(STR_MASTER_FORM).toString(); + m_sMasterLabel = PcrRes(STR_MASTER_FORM); } sMasterType = m_sMasterLabel; } @@ -450,7 +450,7 @@ namespace pcr { OUString sErrorMessage; { - sErrorMessage = PcrRes(STR_ERROR_RETRIEVING_COLUMNS).toString(); + sErrorMessage = PcrRes(STR_ERROR_RETRIEVING_COLUMNS); sErrorMessage = sErrorMessage.replaceFirst("#", sCommand); } diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index bb4edca2a414..d15a8190c824 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -36,7 +36,7 @@ namespace pcr { SetBackground(); SetPaintTransparent(true); - m_aSeparator->SetText( PcrRes(RID_STR_HELP_SECTION_LABEL).toString() ); + m_aSeparator->SetText( PcrRes(RID_STR_HELP_SECTION_LABEL) ); m_aSeparator->SetBackground(); m_aSeparator->Show(); diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 296bcfb2f20b..6f150c9d4622 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1345,7 +1345,7 @@ namespace pcr { try { - OUString sPlcHolder = PcrRes(RID_EMBED_IMAGE_PLACEHOLDER).toString(); + OUString sPlcHolder = PcrRes(RID_EMBED_IMAGE_PLACEHOLDER); bool bIsPlaceHolderValue = false; if ( rName == PROPERTY_IMAGE_URL ) diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index ffec0db1ca00..36edf9b6313e 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -112,7 +112,7 @@ namespace pcr // insert the root Image aRootImage(BitmapEx(RID_EXTBMP_FORMS)); - SvTreeListEntry* pRoot = m_pControlTree->InsertEntry(PcrRes(RID_STR_FORMS).toString(), aRootImage, aRootImage); + SvTreeListEntry* pRoot = m_pControlTree->InsertEntry(PcrRes(RID_STR_FORMS), aRootImage, aRootImage); // build the tree m_pInitialSelection = nullptr; diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index c5c7c1e85ae7..b05f78860d58 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -107,7 +107,7 @@ namespace pcr const bool bIsTextFormat = ( pEntry && pEntry->IsTextFormat() ); if ( bIsTextFormat ) - getTypedControlWindow()->SetText( PcrRes( RID_STR_TEXT_FORMAT ).toString() ); + getTypedControlWindow()->SetText( PcrRes( RID_STR_TEXT_FORMAT ) ); else getTypedControlWindow()->SetValue( pEntry ? getPreviewValue( *pEntry ) : 1234.56789 ); } @@ -265,7 +265,7 @@ namespace pcr :OFileUrlControl_Base( PropertyControlType::Unknown, pParent, WB_TABSTOP | WB_BORDER | WB_DROPDOWN ) { getTypedControlWindow()->SetDropDownLineCount( 10 ); - getTypedControlWindow()->SetPlaceHolder( PcrRes( RID_EMBED_IMAGE_PLACEHOLDER ).toString() ) ; + getTypedControlWindow()->SetPlaceHolder( PcrRes( RID_EMBED_IMAGE_PLACEHOLDER ) ) ; } diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 598f6f0bbed5..9b81f7b9dff0 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -523,7 +523,7 @@ namespace pcr } // confirmation message - OUString sConfirmation( PcrRes( RID_STR_CONFIRM_DELETE_DATA_TYPE ).toString() ); + OUString sConfirmation( PcrRes( RID_STR_CONFIRM_DELETE_DATA_TYPE ) ); sConfirmation = sConfirmation.replaceFirst( "#type#", pType->getName() ); ScopedVclPtrInstance<QueryBox> aQuery( nullptr, WB_YES_NO, sConfirmation ); // TODO/eForms: proper parent if ( aQuery->Execute() != RET_YES ) diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index dc9112c74a12..cad566aeb667 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -446,7 +446,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag() ); if( pResMgr ) { - ScopedVclPtrInstance< InfoBox > aInfoBox( nullptr, ResId(KEY_VERSION_CHECK, *pResMgr).toString() ); + ScopedVclPtrInstance< InfoBox > aInfoBox( nullptr, ResId(KEY_VERSION_CHECK, *pResMgr) ); aInfoBox->Execute(); delete pResMgr; } diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 6bcd6f24fc7e..31051679b3c5 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -84,8 +84,13 @@ EnsureResMgr::~EnsureResMgr() pXSLTResMgr = nullptr; } -#define RESID(x) ResId(x, *getXSLTDialogResMgr()) -#define RESIDSTR(x) RESID(x).toString() +namespace +{ + OUString XsltResId(sal_uInt16 nId) + { + return ResId(nId, *getXSLTDialogResMgr()); + } +} XMLFilterSettingsDialog::XMLFilterSettingsDialog(vcl::Window* pParent, const css::uno::Reference<css::uno::XComponentContext>& rxContext, @@ -109,7 +114,7 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog(vcl::Window* pParent, m_pFilterListBox->SetSelectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) ); m_pFilterListBox->SetDeselectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) ); m_pFilterListBox->SetDoubleClickHdl( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) ); - m_pFilterListBox->SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX)); + m_pFilterListBox->SetAccessibleName(XsltResId(STR_XML_FILTER_LISTBOX)); m_pFilterListBox->SetHelpId(m_pCtrlFilterList->GetHelpId()); m_pPBNew->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) ); @@ -248,13 +253,13 @@ void XMLFilterSettingsDialog::onNew() filter_info_impl aTempInfo; // create a unique filter name - aTempInfo.maFilterName = createUniqueFilterName(RESIDSTR(STR_DEFAULT_FILTER_NAME)); + aTempInfo.maFilterName = createUniqueFilterName(XsltResId(STR_DEFAULT_FILTER_NAME)); // init default extension aTempInfo.maExtension = STR_DEFAULT_EXTENSION; // set default ui name - aTempInfo.maInterfaceName = createUniqueInterfaceName(RESIDSTR(STR_DEFAULT_UI_NAME)); + aTempInfo.maInterfaceName = createUniqueInterfaceName(XsltResId(STR_DEFAULT_UI_NAME)); // set default application aTempInfo.maDocumentService = "com.sun.star.text.TextDocument"; @@ -802,7 +807,7 @@ void XMLFilterSettingsDialog::onDelete() filter_info_impl* pInfo = static_cast<filter_info_impl*>(pEntry->GetUserData()); OUString aPlaceHolder( "%s" ); - OUString aMessage(RESIDSTR(STR_WARN_DELETE)); + OUString aMessage(XsltResId(STR_WARN_DELETE)); aMessage = aMessage.replaceFirst( aPlaceHolder, pInfo->maFilterName ); ScopedVclPtrInstance< WarningBox > aWarnBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage ); @@ -904,7 +909,7 @@ void XMLFilterSettingsDialog::onSave() css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION ); OUString aExtensions( "*.jar" ); - OUString aFilterName(RESIDSTR(STR_FILTER_PACKAGE)); + OUString aFilterName(XsltResId(STR_FILTER_PACKAGE)); aFilterName += " (" + aExtensions + ")"; aDlg.AddFilter( aFilterName, aExtensions ); @@ -921,13 +926,13 @@ void XMLFilterSettingsDialog::onSave() OUString aMsg; if( nFilters > 0 ) { - aMsg = RESIDSTR(STR_FILTERS_HAVE_BEEN_SAVED); + aMsg = XsltResId(STR_FILTERS_HAVE_BEEN_SAVED); aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) ); aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() ); } else { - aMsg = RESIDSTR(STR_FILTER_HAS_BEEN_SAVED); + aMsg = XsltResId(STR_FILTER_HAS_BEEN_SAVED); aMsg = aMsg.replaceFirst( sPlaceholder, (*aFilters.begin())->maFilterName ); aMsg = aMsg.replaceFirst( sPlaceholder, aURL.GetName() ); } @@ -946,7 +951,7 @@ void XMLFilterSettingsDialog::onOpen() css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE ); OUString aExtensions( "*.jar" ); - OUString aFilterName(RESIDSTR(STR_FILTER_PACKAGE)); + OUString aFilterName(XsltResId(STR_FILTER_PACKAGE)); aFilterName += " (" + aExtensions + ")"; aDlg.AddFilter( aFilterName, aExtensions ); @@ -981,18 +986,18 @@ void XMLFilterSettingsDialog::onOpen() if( nFilters == 0 ) { INetURLObject aURLObj( aURL ); - aMsg = RESIDSTR(STR_NO_FILTERS_FOUND); + aMsg = XsltResId(STR_NO_FILTERS_FOUND); aMsg = aMsg.replaceFirst( sPlaceholder, aURLObj.GetName() ); } else if( nFilters == 1 ) { - aMsg = RESIDSTR(STR_FILTER_INSTALLED); + aMsg = XsltResId(STR_FILTER_INSTALLED); aMsg = aMsg.replaceFirst( sPlaceholder, aFilterName ); } else { - aMsg = RESIDSTR(STR_FILTERS_INSTALLED); + aMsg = XsltResId(STR_FILTERS_INSTALLED); aMsg = aMsg.replaceFirst( sPlaceholder, OUString::number( nFilters ) ); } @@ -1306,7 +1311,7 @@ OUString getApplicationUIName( const OUString& rServiceName ) } else { - OUString aRet = RESIDSTR(STR_UNKNOWN_APPLICATION); + OUString aRet = XsltResId(STR_UNKNOWN_APPLICATION); if( !rServiceName.isEmpty() ) { aRet += " (" + rServiceName + ")"; @@ -1410,8 +1415,8 @@ XMLFilterListBox::XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl m_pHeaderBar->SetEndDragHdl( LINK( this, XMLFilterListBox, HeaderEndDrag_Impl ) ); - OUString aStr1(RESIDSTR(STR_COLUMN_HEADER_NAME)); - OUString aStr2(RESIDSTR(STR_COLUMN_HEADER_TYPE)); + OUString aStr1(XsltResId(STR_COLUMN_HEADER_NAME)); + OUString aStr2(XsltResId(STR_COLUMN_HEADER_TYPE)); long nTabSize = aBoxSize.Width() / 2; @@ -1510,20 +1515,20 @@ OUString XMLFilterListBox::getEntryString( const filter_info_impl* pInfo ) { if( pInfo->maFlags & 2 ) { - aEntryStr += RESIDSTR(STR_IMPORT_EXPORT); + aEntryStr += XsltResId(STR_IMPORT_EXPORT); } else { - aEntryStr += RESIDSTR(STR_IMPORT_ONLY); + aEntryStr += XsltResId(STR_IMPORT_ONLY); } } else if( pInfo->maFlags & 2 ) { - aEntryStr += RESIDSTR(STR_EXPORT_ONLY); + aEntryStr += XsltResId(STR_EXPORT_ONLY); } else { - aEntryStr += RESIDSTR(STR_UNDEFINED_FILTER); + aEntryStr += XsltResId(STR_UNDEFINED_FILTER); } return aEntryStr; diff --git a/include/editeng/eerdll.hxx b/include/editeng/eerdll.hxx index 05ad3d64dce7..4af426358849 100644 --- a/include/editeng/eerdll.hxx +++ b/include/editeng/eerdll.hxx @@ -35,7 +35,7 @@ class EDITENG_DLLPUBLIC EditResId: public ResId public: EditResId( sal_uInt16 nId ); static OUString GetString(sal_uInt16 nId) - { return EditResId(nId).toString(); } + { return EditResId(nId); } }; class EditDLL diff --git a/include/sfx2/sfxresid.hxx b/include/sfx2/sfxresid.hxx index f66fc8014a2f..945d79939cdb 100644 --- a/include/sfx2/sfxresid.hxx +++ b/include/sfx2/sfxresid.hxx @@ -22,15 +22,16 @@ #include <sfx2/dllapi.h> #include <tools/resid.hxx> -class SFX2_DLLPUBLIC SfxResId: public ResId +struct SFX2_DLLPUBLIC SfxResMgr { -public: - SfxResId( sal_uInt16 nId ); static ResMgr* GetResMgr(); static void DeleteResMgr(); }; -#define SFX2_RESSTR(x) SfxResId(x).toString() +inline OUString SfxResId(sal_uInt16 nId) +{ + return ResId(nId, *SfxResMgr::GetResMgr()); +} #endif diff --git a/include/svtools/svtresid.hxx b/include/svtools/svtresid.hxx index f238b298c2c0..374406b1e455 100644 --- a/include/svtools/svtresid.hxx +++ b/include/svtools/svtresid.hxx @@ -24,14 +24,16 @@ #include <tools/resid.hxx> #include <com/sun/star/lang/Locale.hpp> -class SVT_DLLPUBLIC SvtResId: public ResId +struct SVT_DLLPUBLIC SvtResMgr { -public: - SvtResId(sal_uInt16 nId); + static ResMgr* GetResMgr(); static void DeleteResMgr(); }; -#define SVT_RESSTR(i) SvtResId(i).toString() +inline OUString SvtResId(sal_uInt16 nId) +{ + return ResId(nId, *SvtResMgr::GetResMgr()); +} #endif // INCLUDED_SVTOOLS_SVTRESID_HXX diff --git a/include/svx/dialmgr.hxx b/include/svx/dialmgr.hxx index 0aadfbdc6d60..54951aaee993 100644 --- a/include/svx/dialmgr.hxx +++ b/include/svx/dialmgr.hxx @@ -24,15 +24,17 @@ // forward --------------------------------------------------------------- -class ResMgr; struct SVX_DLLPUBLIC DialogsResMgr { static ResMgr* GetResMgr(); }; #define DIALOG_MGR() (*DialogsResMgr::GetResMgr()) -#define SVX_RES(i) ResId(i,DIALOG_MGR()) -#define SVX_RESSTR(i) SVX_RES(i).toString() + +inline OUString SvxResId(sal_uInt16 nId) +{ + return ResId(nId, DIALOG_MGR()); +} #endif diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 3fb3929b154d..ce89ab0ec5de 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -31,6 +31,7 @@ #include <svx/svxdllapi.h> #include <tools/date.hxx> #include <tools/time.hxx> +#include <tools/resid.hxx> class GalleryTheme; class SotStorageStream; @@ -62,8 +63,15 @@ enum class SgaObjKind #define ID_IMAPINFO 2 -#define GAL_RES(nId) ResId(nId, *GetGalleryResMgr()) -#define GAL_RESSTR(nId) GAL_RES(nId).toString() +class ResMgr; + +SVX_DLLPUBLIC ResMgr* GetGalleryResMgr(); + +inline OUString GalResId(sal_uInt16 nId) +{ + return ResId(nId, *GetGalleryResMgr()); +} + #define STREAMBUF_SIZE 16384L enum class GalleryGraphicImportRet @@ -77,15 +85,12 @@ enum class GalleryGraphicImportRet #define GALLERY_BG_COLOR Application::GetSettings().GetStyleSettings().GetWindowColor() #define GALLERY_DLG_COLOR Application::GetSettings().GetStyleSettings().GetDialogColor() -class ResMgr; class SvStream; class Graphic; class FmFormModel; class ImageMap; class Gallery; -SVX_DLLPUBLIC ResMgr* - GetGalleryResMgr(); GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, OUString& rFilterName, bool bShowProgress = false ); bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ); bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ); diff --git a/sc/inc/scresid.hxx b/sc/inc/scresid.hxx index d74c870d8101..d754f8eeea8f 100644 --- a/sc/inc/scresid.hxx +++ b/sc/inc/scresid.hxx @@ -20,16 +20,10 @@ #ifndef INCLUDED_SC_INC_SCRESID_HXX #define INCLUDED_SC_INC_SCRESID_HXX -#include <tools/resid.hxx> +#include <rtl/ustring.hxx> #include "scdllapi.h" -class SC_DLLPUBLIC ScResId : public ResId -{ - public: - ScResId( sal_uInt16 nId ); // in scdll.cxx -}; - -#define SC_RESSTR(x) ScResId(x).toString() +OUString SC_DLLPUBLIC ScResId(sal_uInt16 nId); #endif // SC_SCRESMGR_HXX diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index ee6441535450..9e6b65ec4a5f 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -206,7 +206,7 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID) { const OString aEmpty(""); pReturnDialog = mpFact->CreateScStringInputDlg(mpViewShell->GetDialogParent(), - OUString(ScResId(SCSTR_APDTABLE)), OUString(ScResId(SCSTR_NAME)), + ScResId(SCSTR_APDTABLE), ScResId(SCSTR_NAME), aDefaultSheetName, aEmpty, aEmpty ); break; } @@ -214,8 +214,8 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID) case 9: // "modules/scalc/ui/tabcolordialog.ui" { pReturnDialog = mpFact->CreateScTabBgColorDlg(mpViewShell->GetDialogParent(), - OUString(ScResId(SCSTR_SET_TAB_BG_COLOR)), - OUString(ScResId(SCSTR_NO_TAB_BG_COLOR)), Color(0xff00ff) ); + ScResId(SCSTR_SET_TAB_BG_COLOR), + ScResId(SCSTR_NO_TAB_BG_COLOR), Color(0xff00ff) ); break; } diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 4c6b9b51a19b..418de1e29fa1 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -814,7 +814,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin) sc::WaitPointerSwitch aWaitSwitch(pWin); pExternalRefMgr->enableDocTimer(false); - ScProgress aProgress(GetDocumentShell(), ScResId(SCSTR_UPDATE_EXTDOCS).toString(), aRefLinks.size(), true); + ScProgress aProgress(GetDocumentShell(), ScResId(SCSTR_UPDATE_EXTDOCS), aRefLinks.size(), true); for (size_t i = 0, n = aRefLinks.size(); i < n; ++i) { aProgress.SetState(i+1); @@ -835,7 +835,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin) aFile = aUrl.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous); OUStringBuffer aBuf; - aBuf.append(OUString(ScResId(SCSTR_EXTDOC_NOT_LOADED))); + aBuf.append(ScResId(SCSTR_EXTDOC_NOT_LOADED)); aBuf.append("\n\n"); aBuf.append(aFile); ScopedVclPtrInstance< MessageDialog > aBox(pWin, aBuf.makeStringAndClear()); diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index 1a67cb577fc4..3ecc2ee04e75 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp> #include <svl/zforlist.hxx> +#include <osl/diagnose.h> #include <rtl/math.hxx> #include <algorithm> diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index b8c02b9d4963..d9fe4a1aaadd 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -977,13 +977,13 @@ void ScDPOutput::Output() FieldCell(nHdrCol, nHdrRow, nTab, pPageFields[nField], false); SCCOL nFldCol = nHdrCol + 1; - OUString aPageValue = ScResId(SCSTR_ALL).toString(); + OUString aPageValue = ScResId(SCSTR_ALL); const uno::Sequence<sheet::MemberResult>& rRes = pPageFields[nField].maResult; sal_Int32 n = rRes.getLength(); if (n == 1) aPageValue = rRes[0].Caption; else if (n > 1) - aPageValue = ScResId(SCSTR_MULTIPLE).toString(); + aPageValue = ScResId(SCSTR_MULTIPLE); ScSetStringParam aParam; aParam.setTextInput(); diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index a5c825a462dc..012308cc99bc 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -810,7 +810,7 @@ ScFunctionList::ScFunctionList() // OpCodes, which is utopian... for (sal_uInt16 i = 0; i <= SC_OPCODE_LAST_OPCODE_ID; ++i) { - ScResId aRes(RID_SC_FUNC_DESCRIPTIONS_START + i); + ResId aRes(RID_SC_FUNC_DESCRIPTIONS_START + i, *SC_MOD()->GetResMgr()); aRes.SetRT(RSC_STRINGARRAY); // Opcode Resource available? if (SC_MOD()->GetResMgr()->IsAvailable(aRes)) @@ -1179,7 +1179,7 @@ OUString ScFunctionMgr::GetCategoryName(sal_uInt32 _nCategoryNumber ) return OUString(); } - ResStringArray aStringArray(ScResId(RID_FUNCTION_CATEGORIES)); + ResStringArray aStringArray(ResId(RID_FUNCTION_CATEGORIES, *SC_MOD()->GetResMgr())); return aStringArray.GetString(_nCategoryNumber); } diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 045581c3d4ba..6b7cd8b84452 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -773,7 +773,7 @@ bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions ) if( RID_SVXSTR_TBLAFMT_BEGIN <= nId && nId < RID_SVXSTR_TBLAFMT_END ) { - aName = SVX_RESSTR( nId ); + aName = SvxResId( nId ); } else nStrResId = USHRT_MAX; diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx index 4337194a425a..b2cdf34646b4 100644 --- a/sc/source/core/tool/inputopt.cxx +++ b/sc/source/core/tool/inputopt.cxx @@ -19,6 +19,7 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> +#include <osl/diagnose.h> #include "cfgids.hxx" #include "inputopt.hxx" diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index ea0dbf962be8..0d8ee77dd82d 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -18,6 +18,7 @@ */ #include <memory> +#include <osl/diagnose.h> #include "rangeutl.hxx" #include "document.hxx" #include "global.hxx" diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 2fbabe9efa36..e2336902a3bd 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -1566,7 +1566,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { mpTempAccEdit = new ScAccessibleEditObject(this, rViewData.GetEditView(meSplitPos), mpViewShell->GetWindowByPos(meSplitPos), GetCurrentCellName(), - OUString(ScResId(STR_ACC_EDITLINE_DESCR)), ScAccessibleEditObject::CellInEditMode); + ScResId(STR_ACC_EDITLINE_DESCR), ScAccessibleEditObject::CellInEditMode); uno::Reference<XAccessible> xAcc = mpTempAccEdit; AddChild(xAcc, true); @@ -2120,7 +2120,7 @@ OUString SAL_CALL { SolarMutexGuard aGuard; IsObjectValid(); - OUString sName = OUString(ScResId(STR_ACC_DOC_NAME)); + OUString sName = ScResId(STR_ACC_DOC_NAME); sal_Int32 nNumber(sal_Int32(meSplitPos) + 1); sName += OUString::number(nNumber); return sName; @@ -2238,7 +2238,7 @@ void ScAccessibleDocument::RemoveChild(const uno::Reference<XAccessible>& xAcc, OUString ScAccessibleDocument::GetCurrentCellName() const { - OUString sName(SC_RESSTR(STR_ACC_CELL_NAME)); + OUString sName(ScResId(STR_ACC_CELL_NAME)); if (mpViewShell) { // Document not needed, because only the cell address, but not the tablename is needed diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 21e84ddaaca7..4a76e4abb9f5 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -1521,7 +1521,7 @@ OUString SAL_CALL ScAccessibleDocumentPagePreview::createAccessibleDescription() OUString SAL_CALL ScAccessibleDocumentPagePreview::createAccessibleName() { - OUString sName = OUString(ScResId(STR_ACC_PREVIEWDOC_NAME)); + OUString sName = ScResId(STR_ACC_PREVIEWDOC_NAME); return sName; } diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx index 7bc640910bdf..80f33b6e9516 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx @@ -299,13 +299,13 @@ uno::Sequence<OUString> SAL_CALL ScAccessiblePageHeader::getSupportedServiceName OUString SAL_CALL ScAccessiblePageHeader::createAccessibleDescription() { OUString sDesc(mbHeader ? OUString(STR_ACC_HEADER_DESCR) : OUString(STR_ACC_FOOTER_DESCR)); - return sDesc.replaceFirst("%1", SC_RESSTR(SCSTR_UNKNOWN)); + return sDesc.replaceFirst("%1", ScResId(SCSTR_UNKNOWN)); } OUString SAL_CALL ScAccessiblePageHeader::createAccessibleName() { - OUString sName(SC_RESSTR(mbHeader ? STR_ACC_HEADER_NAME : STR_ACC_FOOTER_NAME)); - return sName.replaceFirst("%1", SC_RESSTR(SCSTR_UNKNOWN)); + OUString sName(ScResId(mbHeader ? STR_ACC_HEADER_NAME : STR_ACC_FOOTER_NAME)); + return sName.replaceFirst("%1", ScResId(SCSTR_UNKNOWN)); } tools::Rectangle ScAccessiblePageHeader::GetBoundingBoxOnScreen() const diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx index 5f05a33da2cb..da2c3bcc02c3 100644 --- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx +++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx @@ -229,13 +229,13 @@ OUString SAL_CALL ScAccessiblePageHeaderArea::createAccessibleName() switch (meAdjust) { case SvxAdjust::Left : - sName = OUString(ScResId(STR_ACC_LEFTAREA_NAME)); + sName = ScResId(STR_ACC_LEFTAREA_NAME); break; case SvxAdjust::Right: - sName = OUString(ScResId(STR_ACC_RIGHTAREA_NAME)); + sName = ScResId(STR_ACC_RIGHTAREA_NAME); break; case SvxAdjust::Center: - sName = OUString(ScResId(STR_ACC_CENTERAREA_NAME)); + sName = ScResId(STR_ACC_CENTERAREA_NAME); break; default: OSL_FAIL("wrong adjustment found"); diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx index e4b47a759da7..7354b92bf90e 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx @@ -586,7 +586,7 @@ OUString SAL_CALL ScAccessiblePreviewTable::createAccessibleDescription() OUString SAL_CALL ScAccessiblePreviewTable::createAccessibleName() { - OUString sName(SC_RESSTR(STR_ACC_TABLE_NAME)); + OUString sName(ScResId(STR_ACC_TABLE_NAME)); if (mpViewShell) { diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx index e83a421e542c..b598dba0953a 100644 --- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx @@ -349,7 +349,7 @@ OUString SAL_CALL OUString SAL_CALL ScAccessibleTableBase::createAccessibleName() { - OUString sName(SC_RESSTR(STR_ACC_TABLE_NAME)); + OUString sName(ScResId(STR_ACC_TABLE_NAME)); OUString sCoreName; if (mpDoc && mpDoc->GetName( maRange.aStart.Tab(), sCoreName )) sName = sName.replaceFirst("%1", sCoreName); diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index 26918937235f..4c62091840f8 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -182,7 +182,7 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke else { sal_Int16 aLabelId = (aGroupedBy == BY_COLUMN) ? STR_COLUMN_LABEL_TEMPLATE : STR_ROW_LABEL_TEMPLATE; - OUString aLabelTemplate(SC_RESSTR(aLabelId)); + OUString aLabelTemplate(ScResId(aLabelId)); for (size_t i = 0; i < rRangeList.size(); i++) { @@ -198,11 +198,11 @@ void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalke void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, FormulaTemplate& aTemplate) { - output.writeBoldString(SC_RESSTR(STR_ANOVA_SINGLE_FACTOR_LABEL)); + output.writeBoldString(ScResId(STR_ANOVA_SINGLE_FACTOR_LABEL)); output.newLine(); double aAlphaValue = mpAlphaField->GetValue() / 100.0; - output.writeString(SC_RESSTR(STR_LABEL_ALPHA)); + output.writeString(ScResId(STR_LABEL_ALPHA)); output.nextColumn(); output.writeValue(aAlphaValue); aTemplate.autoReplaceAddress("%ALPHA%", output.current()); @@ -212,7 +212,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, // Write labels for(sal_Int32 i = 0; lclBasicStatistics[i].aLabelId != 0; i++) { - output.writeString(SC_RESSTR(lclBasicStatistics[i].aLabelId)); + output.writeString(ScResId(lclBasicStatistics[i].aLabelId)); output.nextColumn(); } output.newLine(); @@ -244,7 +244,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, output.resetColumn(); for(sal_Int32 i = 0; lclAnovaLabels[i] != 0; i++) { - output.writeString(SC_RESSTR(lclAnovaLabels[i])); + output.writeString(ScResId(lclAnovaLabels[i])); output.nextColumn(); } output.nextRow(); @@ -255,7 +255,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, { // Label output.resetColumn(); - output.writeString(SC_RESSTR(STR_ANOVA_LABEL_BETWEEN_GROUPS)); + output.writeString(ScResId(STR_ANOVA_LABEL_BETWEEN_GROUPS)); output.nextColumn(); // Sum of Squares @@ -301,7 +301,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, { // Label output.resetColumn(); - output.writeString(SC_RESSTR(STR_ANOVA_LABEL_WITHIN_GROUPS)); + output.writeString(ScResId(STR_ANOVA_LABEL_WITHIN_GROUPS)); output.nextColumn(); // Sum of Squares @@ -328,7 +328,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, { // Label output.resetColumn(); - output.writeString(SC_RESSTR(STR_ANOVA_LABEL_TOTAL)); + output.writeString(ScResId(STR_ANOVA_LABEL_TOTAL)); output.nextColumn(); // Sum of Squares @@ -346,7 +346,7 @@ void ScAnalysisOfVarianceDialog::AnovaSingleFactor(AddressWalkerWriter& output, void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, FormulaTemplate& aTemplate) { - output.writeBoldString(SC_RESSTR(STR_ANOVA_TWO_FACTOR_LABEL)); + output.writeBoldString(ScResId(STR_ANOVA_TWO_FACTOR_LABEL)); output.newLine(); double aAlphaValue = mpAlphaField->GetValue() / 100.0; @@ -360,7 +360,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For // Write labels for(sal_Int32 i = 0; lclBasicStatistics[i].aLabelId != 0; i++) { - output.writeString(SC_RESSTR(lclBasicStatistics[i].aLabelId)); + output.writeString(ScResId(lclBasicStatistics[i].aLabelId)); output.nextColumn(); } output.newLine(); @@ -409,7 +409,7 @@ void ScAnalysisOfVarianceDialog::AnovaTwoFactor(AddressWalkerWriter& output, For // Write ANOVA labels for(sal_Int32 i = 0; lclAnovaLabels[i] != 0; i++) { - output.writeString(SC_RESSTR(lclAnovaLabels[i])); + output.writeString(ScResId(lclAnovaLabels[i])); output.nextColumn(); } output.nextRow(); diff --git a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx index 0e5e1b3df014..1a7591a121e1 100644 --- a/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx @@ -31,7 +31,7 @@ ScChiSquareTestDialog::ScChiSquareTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "ChiSquareTestDialog", "modules/scalc/ui/chisquaretestdialog.ui" ) { - SetText(SC_RESSTR(STR_CHI_SQUARE_TEST)); + SetText(ScResId(STR_CHI_SQUARE_TEST)); } ScChiSquareTestDialog::~ScChiSquareTestDialog() @@ -55,18 +55,18 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%RANGE%", mInputRange); - aOutput.writeBoldString(SC_RESSTR(STR_CHI_SQUARE_TEST)); + aOutput.writeBoldString(ScResId(STR_CHI_SQUARE_TEST)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); + aOutput.writeString(ScResId(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); // DF - aOutput.writeString(SC_RESSTR(STR_DEGREES_OF_FREEDOM_LABEL)); + aOutput.writeString(ScResId(STR_DEGREES_OF_FREEDOM_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=(COLUMNS(%RANGE%) - 1) * (ROWS(%RANGE%) - 1)"); aTemplate.autoReplaceAddress("%DEGREES_OF_FREEDOM%", aOutput.current()); @@ -74,7 +74,7 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // p Value - aOutput.writeString(SC_RESSTR(STR_P_VALUE_LABEL)); + aOutput.writeString(ScResId(STR_P_VALUE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=CHITEST(%RANGE%; MMULT(MMULT(%RANGE%;TRANSPOSE(IF(COLUMN(%RANGE%))));MMULT(TRANSPOSE(IF(ROW(%RANGE%)));%RANGE%)) / SUM(%RANGE%))"); aTemplate.autoReplaceAddress("%P_VALUE%", aOutput.current()); @@ -82,14 +82,14 @@ ScRange ScChiSquareTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Test Statistic - aOutput.writeString(SC_RESSTR(STR_TEST_STATISTIC_LABEL)); + aOutput.writeString(ScResId(STR_TEST_STATISTIC_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=CHIINV(%P_VALUE%; %DEGREES_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // Critical value - aOutput.writeString(SC_RESSTR(STR_CRITICAL_VALUE_LABEL)); + aOutput.writeString(ScResId(STR_CRITICAL_VALUE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=CHIINV(%ALPHA%; %DEGREES_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx index 09254e39af72..7eafe239aa40 100644 --- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx @@ -28,7 +28,7 @@ bool ScCorrelationDialog::Close() const OUString ScCorrelationDialog::getLabel() { - return SC_RESSTR(STR_CORRELATION_LABEL); + return ScResId(STR_CORRELATION_LABEL); } const OUString ScCorrelationDialog::getTemplate() diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx index bb35aa7dce0e..5506444bfd41 100644 --- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx @@ -33,7 +33,7 @@ bool ScCovarianceDialog::Close() const OUString ScCovarianceDialog::getLabel() { - return SC_RESSTR(STR_COVARIANCE_LABEL); + return ScResId(STR_COVARIANCE_LABEL); } const OUString ScCovarianceDialog::getTemplate() diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx index ce309cb135e9..2dcc463a840e 100644 --- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx @@ -97,9 +97,9 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell) for( ; pIterator->hasNext(); pIterator->next() ) { if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1); aOutput.writeBoldString(aTemplate.getTemplate()); @@ -112,7 +112,7 @@ ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell) // Write calculation labels for(sal_Int32 i = 0; lclCalcDefinitions[i].aFormula != nullptr; i++) { - OUString aLabel(SC_RESSTR(lclCalcDefinitions[i].aCalculationNameId)); + OUString aLabel(ScResId(lclCalcDefinitions[i].aCalculationNameId)); aOutput.writeString(aLabel); aOutput.nextRow(); } diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx index 0a7e5785340b..f5d679c3d339 100644 --- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx @@ -66,7 +66,7 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell) double aSmoothingFactor = mpSmoothingFactor->GetValue() / 100.0; // Alpha - output.writeBoldString(SC_RESSTR(STR_LABEL_ALPHA)); + output.writeBoldString(ScResId(STR_LABEL_ALPHA)); output.nextRow(); // Alpha Value @@ -91,9 +91,9 @@ ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell) // Write column label if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1); output.writeBoldString(aTemplate.getTemplate()); output.nextRow(); diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx index 57b4ac77e0f0..a3cc2cb8b2b1 100644 --- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx @@ -32,7 +32,7 @@ ScFTestDialog::ScFTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "TTestDialog", "modules/scalc/ui/ttestdialog.ui" ) { - SetText(SC_RESSTR(STR_FTEST)); + SetText(ScResId(STR_FTEST)); } ScFTestDialog::~ScFTestDialog() @@ -69,23 +69,23 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_RESSTR(STR_FTEST_UNDO_NAME)); + aOutput.writeBoldString(ScResId(STR_FTEST_UNDO_NAME)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); + aOutput.writeString(ScResId(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); aOutput.nextColumn(); - aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_1_LABEL)); + aOutput.writeBoldString(ScResId(STR_VARIABLE_1_LABEL)); aOutput.nextColumn(); - aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_2_LABEL)); + aOutput.writeBoldString(ScResId(STR_VARIABLE_2_LABEL)); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STRID_CALC_MEAN)); + aOutput.writeString(ScResId(STRID_CALC_MEAN)); aOutput.nextColumn(); aTemplate.setTemplate("=AVERAGE(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -94,7 +94,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STRID_CALC_VARIANCE)); + aOutput.writeString(ScResId(STRID_CALC_VARIANCE)); aOutput.nextColumn(); aTemplate.setTemplate("=VAR(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -105,7 +105,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceAddress("%VARIABLE2_VARIANCE%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_OBSERVATIONS_LABEL)); + aOutput.writeString(ScResId(STR_OBSERVATIONS_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -116,7 +116,7 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceAddress("%VARIABLE2_OBSERVATIONS%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_ANOVA_LABEL_DF)); + aOutput.writeString(ScResId(STR_ANOVA_LABEL_DF)); aOutput.nextColumn(); aTemplate.setTemplate("=%VARIABLE1_OBSERVATIONS% - 1"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -127,46 +127,46 @@ ScRange ScFTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceAddress("%VARIABLE2_DEGREE_OF_FREEDOM%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_ANOVA_LABEL_F)); + aOutput.writeString(ScResId(STR_ANOVA_LABEL_F)); aOutput.nextColumn(); aTemplate.setTemplate("=%VARIABLE1_VARIANCE% / %VARIABLE2_VARIANCE%"); aOutput.writeFormula(aTemplate.getTemplate()); aTemplate.autoReplaceAddress("%F_VALUE%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_FTEST_P_RIGHT_TAIL)); + aOutput.writeString(ScResId(STR_FTEST_P_RIGHT_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=FDIST(%F_VALUE%; %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aTemplate.autoReplaceAddress("%P_RIGHT_TAIL_VALUE%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_FTEST_F_CRITICAL_RIGHT_TAIL)); + aOutput.writeString(ScResId(STR_FTEST_F_CRITICAL_RIGHT_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=FINV(%ALPHA%; %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_FTEST_P_LEFT_TAIL)); + aOutput.writeString(ScResId(STR_FTEST_P_LEFT_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=1 - %P_RIGHT_TAIL_VALUE%"); aOutput.writeFormula(aTemplate.getTemplate()); aTemplate.autoReplaceAddress("%P_LEFT_TAIL_VALUE%", aOutput.current()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_FTEST_F_CRITICAL_LEFT_TAIL)); + aOutput.writeString(ScResId(STR_FTEST_F_CRITICAL_LEFT_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=FINV(1-%ALPHA%; %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_FTEST_P_TWO_TAIL)); + aOutput.writeString(ScResId(STR_FTEST_P_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=2*MIN(%P_RIGHT_TAIL_VALUE%; %P_LEFT_TAIL_VALUE%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STR_FTEST_F_CRITICAL_TWO_TAIL)); + aOutput.writeString(ScResId(STR_FTEST_F_CRITICAL_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=FINV(1-(%ALPHA%/2); %VARIABLE1_DEGREE_OF_FREEDOM%; %VARIABLE2_DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx index 413e8c9be2ab..5d02286c98e9 100644 --- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx +++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx @@ -86,9 +86,9 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell) for (size_t i = 0; i < aRangeList.size(); i++) { if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber(strWildcardNumber, i + 1); output.writeString(aTemplate.getTemplate()); @@ -101,9 +101,9 @@ ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell) for (size_t i = 0; i < aRangeList.size(); i++) { if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber(strWildcardNumber, i + 1); output.writeString(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx index 7ea5fadbbff5..540dd33e721c 100644 --- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx @@ -77,9 +77,9 @@ ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell) // Write label if (mGroupedBy == BY_COLUMN) - aTemplate.setTemplate(SC_RESSTR(STR_COLUMN_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_COLUMN_LABEL_TEMPLATE)); else - aTemplate.setTemplate(SC_RESSTR(STR_ROW_LABEL_TEMPLATE)); + aTemplate.setTemplate(ScResId(STR_ROW_LABEL_TEMPLATE)); aTemplate.applyNumber("%NUMBER%", pIterator->index() + 1); output.writeBoldString(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index eb639e60cc92..1c6e40b5a60a 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -281,8 +281,8 @@ void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers() template<class RNG> void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const sal_Int16 aDistributionStringId, boost::optional<sal_Int8> aDecimalPlaces) { - OUString aUndo = SC_RESSTR(STR_UNDO_DISTRIBUTION_TEMPLATE); - OUString aDistributionName = SC_RESSTR(aDistributionStringId); + OUString aUndo = ScResId(STR_UNDO_DISTRIBUTION_TEMPLATE); + OUString aDistributionName = ScResId(aDistributionStringId); aUndo = aUndo.replaceAll("$(DISTRIBUTION)", aDistributionName); ScDocShell* pDocShell = mpViewData->GetDocShell(); @@ -435,19 +435,19 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo { case DIST_UNIFORM: { - mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MINIMUM)); - mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MAXIMUM)); + mpParameter1Text->SetText(ScResId(STR_RNG_PARAMETER_MINIMUM)); + mpParameter2Text->SetText(ScResId(STR_RNG_PARAMETER_MAXIMUM)); mpParameter2Text->Show(); mpParameter2Value->Show(); break; } case DIST_UNIFORM_INTEGER: { - mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MINIMUM)); + mpParameter1Text->SetText(ScResId(STR_RNG_PARAMETER_MINIMUM)); mpParameter1Value->SetDecimalDigits(0); mpParameter1Value->SetSpinSize(1); - mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MAXIMUM)); + mpParameter2Text->SetText(ScResId(STR_RNG_PARAMETER_MAXIMUM)); mpParameter2Value->SetDecimalDigits(0); mpParameter2Value->SetSpinSize(1); @@ -457,16 +457,16 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo } case DIST_NORMAL: { - mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_MEAN)); - mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_DEVIATION)); + mpParameter1Text->SetText(ScResId(STR_RNG_PARAMETER_MEAN)); + mpParameter2Text->SetText(ScResId(STR_RNG_PARAMETER_STANDARD_DEVIATION)); mpParameter2Text->Show(); mpParameter2Value->Show(); break; } case DIST_CAUCHY: { - mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_MEDIAN)); - mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_SIGMA)); + mpParameter1Text->SetText(ScResId(STR_RNG_PARAMETER_STANDARD_MEDIAN)); + mpParameter2Text->SetText(ScResId(STR_RNG_PARAMETER_STANDARD_SIGMA)); mpParameter2Text->Show(); mpParameter2Value->Show(); break; @@ -474,7 +474,7 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo case DIST_BERNOULLI: case DIST_GEOMETRIC: { - mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_PROBABILITY)); + mpParameter1Text->SetText(ScResId(STR_RNG_PARAMETER_STANDARD_PROBABILITY)); mpParameter1Value->SetMin( 0 ); mpParameter1Value->SetMax( PERCISION ); mpParameter1Value->SetSpinSize(1000); @@ -486,12 +486,12 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo case DIST_BINOMIAL: case DIST_NEGATIVE_BINOMIAL: { - mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_PROBABILITY)); + mpParameter1Text->SetText(ScResId(STR_RNG_PARAMETER_STANDARD_PROBABILITY)); mpParameter1Value->SetMin( 0 ); mpParameter1Value->SetMax( PERCISION ); mpParameter1Value->SetSpinSize(1000); - mpParameter2Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS)); + mpParameter2Text->SetText(ScResId(STR_RNG_PARAMETER_STANDARD_NUMBER_OF_TRIALS)); mpParameter2Value->SetDecimalDigits(0); mpParameter2Value->SetSpinSize(1); mpParameter2Value->SetMin(0); @@ -502,7 +502,7 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, vo } case DIST_CHI_SQUARED: { - mpParameter1Text->SetText(SC_RESSTR(STR_RNG_PARAMETER_STANDARD_NU_VALUE)); + mpParameter1Text->SetText(ScResId(STR_RNG_PARAMETER_STANDARD_NU_VALUE)); mpParameter2Text->Hide(); mpParameter2Value->Hide(); diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx index 272b4b541c1f..6950c8dea61f 100644 --- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx @@ -128,31 +128,31 @@ ScRange ScRegressionDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_RESSTR(STR_REGRESSION)); + aOutput.writeBoldString(ScResId(STR_REGRESSION)); aOutput.newLine(); aOutput.newLine(); aOutput.push(); // REGRESSION MODEL - aOutput.writeString(SC_RESSTR(STR_LABEL_REGRESSION_MODEL)); + aOutput.writeString(ScResId(STR_LABEL_REGRESSION_MODEL)); aOutput.nextRow(); // RSQUARED - aOutput.writeString(SC_RESSTR(STR_LABEL_RSQUARED)); + aOutput.writeString(ScResId(STR_LABEL_RSQUARED)); aOutput.nextRow(); // Standard Error - aOutput.writeString(SC_RESSTR(STRID_CALC_STD_ERROR)); + aOutput.writeString(ScResId(STRID_CALC_STD_ERROR)); aOutput.nextRow(); aOutput.nextRow(); // Slope - aOutput.writeString(SC_RESSTR(STR_LABEL_SLOPE)); + aOutput.writeString(ScResId(STR_LABEL_SLOPE)); aOutput.nextRow(); // Intercept - aOutput.writeString(SC_RESSTR(STR_LABEL_INTERCEPT)); + aOutput.writeString(ScResId(STR_LABEL_INTERCEPT)); aOutput.nextRow(); aOutput.nextRow(); @@ -192,7 +192,7 @@ ScRange ScRegressionDialog::ApplyOutput(ScDocShell* pDocShell) nColumn += 1; // REGRESSION MODEL - aOutput.writeString(SC_RESSTR(constRegressionModel[nRegressionIndex])); + aOutput.writeString(ScResId(constRegressionModel[nRegressionIndex])); aOutput.nextRow(); // RSQUARED diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index dd31179d3bcf..7f683556bb65 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -265,7 +265,7 @@ ScRange ScSamplingDialog::PerformRandomSampling(ScDocShell* pDocShell) void ScSamplingDialog::PerformSampling() { - OUString aUndo(SC_RESSTR(STR_SAMPLING_UNDO_NAME)); + OUString aUndo(ScResId(STR_SAMPLING_UNDO_NAME)); ScDocShell* pDocShell = mViewData->GetDocShell(); svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager(); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx index 5d6025ac7449..ef60c05147e2 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx @@ -283,7 +283,7 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler, Edit&, vo void ScStatisticsInputOutputDialog::CalculateInputAndWriteToOutput() { - OUString aUndo(SC_RESSTR(GetUndoNameId())); + OUString aUndo(ScResId(GetUndoNameId())); ScDocShell* pDocShell = mViewData->GetDocShell(); svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager(); pUndoManager->EnterListAction( aUndo, aUndo, 0, mViewData->GetViewShell()->GetViewShellId() ); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx index 90dcea171573..c66d7173ac84 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx @@ -322,7 +322,7 @@ IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, RefInputModifyHandler, Edit&, vo void ScStatisticsTwoVariableDialog::CalculateInputAndWriteToOutput() { - OUString aUndo(SC_RESSTR(GetUndoNameId())); + OUString aUndo(ScResId(GetUndoNameId())); ScDocShell* pDocShell = mViewData->GetDocShell(); svl::IUndoManager* pUndoManager = pDocShell->GetUndoManager(); pUndoManager->EnterListAction( aUndo, aUndo, 0, mViewData->GetViewShell()->GetViewShellId() ); diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx index 8509f72d6226..a94c82943dd6 100644 --- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx @@ -32,7 +32,7 @@ ScTTestDialog::ScTTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "TTestDialog", "modules/scalc/ui/ttestdialog.ui" ) { - SetText(SC_RESSTR(STR_TTEST)); + SetText(ScResId(STR_TTEST)); } ScTTestDialog::~ScTTestDialog() @@ -69,30 +69,30 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_RESSTR(STR_TTEST_UNDO_NAME)); + aOutput.writeBoldString(ScResId(STR_TTEST_UNDO_NAME)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); + aOutput.writeString(ScResId(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); // Hypothesized mean difference - aOutput.writeString(SC_RESSTR(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(ScResId(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); aOutput.nextColumn(); aOutput.writeValue(0); aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current()); aOutput.newLine(); aOutput.nextColumn(); - aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_1_LABEL)); + aOutput.writeBoldString(ScResId(STR_VARIABLE_1_LABEL)); aOutput.nextColumn(); - aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_2_LABEL)); + aOutput.writeBoldString(ScResId(STR_VARIABLE_2_LABEL)); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STRID_CALC_MEAN)); + aOutput.writeString(ScResId(STRID_CALC_MEAN)); aOutput.nextColumn(); aTemplate.setTemplate("=AVERAGE(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -101,7 +101,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); - aOutput.writeString(SC_RESSTR(STRID_CALC_VARIANCE)); + aOutput.writeString(ScResId(STRID_CALC_VARIANCE)); aOutput.nextColumn(); aTemplate.setTemplate("=VAR(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -111,7 +111,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Observations - aOutput.writeString(SC_RESSTR(STR_OBSERVATIONS_LABEL)); + aOutput.writeString(ScResId(STR_OBSERVATIONS_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -121,14 +121,14 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Pearson Correlation - aOutput.writeString(SC_RESSTR(STR_TTEST_PEARSON_CORRELATION)); + aOutput.writeString(ScResId(STR_TTEST_PEARSON_CORRELATION)); aOutput.nextColumn(); aTemplate.setTemplate("=CORREL(%VARIABLE1_RANGE%;%VARIABLE2_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // Observed mean difference - aOutput.writeString(SC_RESSTR(STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(ScResId(STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=AVERAGE(IF(ISODD(IF(ISNUMBER(%VARIABLE1_RANGE%); 1; 0) * IF(ISNUMBER(%VARIABLE2_RANGE%); 1; 0)); %VARIABLE1_RANGE% - %VARIABLE2_RANGE%; \"NA\"))"); aOutput.writeMatrixFormula(aTemplate.getTemplate()); @@ -136,7 +136,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Variance of the Differences - aOutput.writeString(SC_RESSTR(STR_TTEST_VARIANCE_OF_THE_DIFFERENCES)); + aOutput.writeString(ScResId(STR_TTEST_VARIANCE_OF_THE_DIFFERENCES)); aOutput.nextColumn(); aTemplate.setTemplate("=VAR(IF(ISODD(IF(ISNUMBER(%VARIABLE1_RANGE%); 1; 0) * IF(ISNUMBER(%VARIABLE2_RANGE%); 1; 0)); %VARIABLE1_RANGE% - %VARIABLE2_RANGE%; \"NA\"))"); aOutput.writeMatrixFormula(aTemplate.getTemplate()); @@ -144,7 +144,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // df - aOutput.writeString(SC_RESSTR(STR_ANOVA_LABEL_DF)); + aOutput.writeString(ScResId(STR_ANOVA_LABEL_DF)); aOutput.nextColumn(); aTemplate.setTemplate("=SUM(IF(ISNUMBER(%VARIABLE1_RANGE%); 1; 0) * IF(ISNUMBER(%VARIABLE2_RANGE%); 1; 0)) - 1"); aOutput.writeMatrixFormula(aTemplate.getTemplate()); @@ -152,7 +152,7 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // t stat - aOutput.writeString(SC_RESSTR(STR_TTEST_T_STAT)); + aOutput.writeString(ScResId(STR_TTEST_T_STAT)); aOutput.nextColumn(); aTemplate.setTemplate("=(%OBSERVED_MEAN_DIFFERENCE% - %HYPOTHESIZED_MEAN_DIFFERENCE%) / (%VARIANCE_OF_DIFFERENCES% / ( %DEGREE_OF_FREEDOM% + 1)) ^ 0.5"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -160,28 +160,28 @@ ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // P one-tail - aOutput.writeString(SC_RESSTR(STR_TTEST_P_ONE_TAIL)); + aOutput.writeString(ScResId(STR_TTEST_P_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TDIST(ABS(%T_STAT%); %DEGREE_OF_FREEDOM%; 1)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // T critical one-tail - aOutput.writeString(SC_RESSTR(STR_TTEST_T_CRITICAL_ONE_TAIL)); + aOutput.writeString(ScResId(STR_TTEST_T_CRITICAL_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TINV(2*%ALPHA%; %DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // P two-tail - aOutput.writeString(SC_RESSTR(STR_TTEST_P_TWO_TAIL)); + aOutput.writeString(ScResId(STR_TTEST_P_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TDIST(ABS(%T_STAT%); %DEGREE_OF_FREEDOM%; 2)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // T critical two-tail - aOutput.writeString(SC_RESSTR(STR_TTEST_T_CRITICAL_TWO_TAIL)); + aOutput.writeString(ScResId(STR_TTEST_T_CRITICAL_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=TINV(%ALPHA%; %DEGREE_OF_FREEDOM%)"); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx index 91460d3778c7..b7a3f67ebd71 100644 --- a/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ZTestDialog.cxx @@ -32,7 +32,7 @@ ScZTestDialog::ScZTestDialog( pSfxBindings, pChildWindow, pParent, pViewData, "ZTestDialog", "modules/scalc/ui/ztestdialog.ui" ) { - SetText(SC_RESSTR(STR_ZTEST)); + SetText(ScResId(STR_ZTEST)); } ScZTestDialog::~ScZTestDialog() @@ -69,18 +69,18 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aTemplate.autoReplaceRange("%VARIABLE1_RANGE%", pVariable1Iterator->get()); aTemplate.autoReplaceRange("%VARIABLE2_RANGE%", pVariable2Iterator->get()); - aOutput.writeBoldString(SC_RESSTR(STR_ZTEST)); + aOutput.writeBoldString(ScResId(STR_ZTEST)); aOutput.newLine(); // Alpha - aOutput.writeString(SC_RESSTR(STR_LABEL_ALPHA)); + aOutput.writeString(ScResId(STR_LABEL_ALPHA)); aOutput.nextColumn(); aOutput.writeValue(0.05); aTemplate.autoReplaceAddress("%ALPHA%", aOutput.current()); aOutput.newLine(); // Hypothesized mean difference - aOutput.writeString(SC_RESSTR(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(ScResId(STR_HYPOTHESIZED_MEAN_DIFFERENCE_LABEL)); aOutput.nextColumn(); aOutput.writeValue(0); aTemplate.autoReplaceAddress("%HYPOTHESIZED_MEAN_DIFFERENCE%", aOutput.current()); @@ -88,13 +88,13 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) // Variable Label aOutput.nextColumn(); - aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_1_LABEL)); + aOutput.writeBoldString(ScResId(STR_VARIABLE_1_LABEL)); aOutput.nextColumn(); - aOutput.writeBoldString(SC_RESSTR(STR_VARIABLE_2_LABEL)); + aOutput.writeBoldString(ScResId(STR_VARIABLE_2_LABEL)); aOutput.newLine(); // Known Variance - aOutput.writeString(SC_RESSTR(STR_ZTEST_KNOWN_VARIANCE)); + aOutput.writeString(ScResId(STR_ZTEST_KNOWN_VARIANCE)); aOutput.nextColumn(); aOutput.writeValue(0); aTemplate.autoReplaceAddress("%KNOWN_VARIANCE_VARIABLE1%", aOutput.current()); @@ -104,7 +104,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Mean - aOutput.writeString(SC_RESSTR(STRID_CALC_MEAN)); + aOutput.writeString(ScResId(STRID_CALC_MEAN)); aOutput.nextColumn(); aTemplate.setTemplate("=AVERAGE(%VARIABLE1_RANGE%)"); aTemplate.autoReplaceAddress("%MEAN_VARIABLE1%", aOutput.current()); @@ -116,7 +116,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Observations - aOutput.writeString(SC_RESSTR(STR_OBSERVATIONS_LABEL)); + aOutput.writeString(ScResId(STR_OBSERVATIONS_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=COUNT(%VARIABLE1_RANGE%)"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -128,7 +128,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // Observed mean difference - aOutput.writeString(SC_RESSTR(STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); + aOutput.writeString(ScResId(STR_OBSERVED_MEAN_DIFFERENCE_LABEL)); aOutput.nextColumn(); aTemplate.setTemplate("=%MEAN_VARIABLE1% - %MEAN_VARIABLE2%"); aOutput.writeMatrixFormula(aTemplate.getTemplate()); @@ -136,7 +136,7 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // z - aOutput.writeString(SC_RESSTR(STR_ZTEST_Z_VALUE)); + aOutput.writeString(ScResId(STR_ZTEST_Z_VALUE)); aOutput.nextColumn(); aTemplate.setTemplate("=(%OBSERVED_MEAN_DIFFERENCE% - %HYPOTHESIZED_MEAN_DIFFERENCE%) / SQRT( %KNOWN_VARIANCE_VARIABLE1% / %OBSERVATION_VARIABLE1% + %KNOWN_VARIANCE_VARIABLE2% / %OBSERVATION_VARIABLE2% )"); aOutput.writeFormula(aTemplate.getTemplate()); @@ -144,28 +144,28 @@ ScRange ScZTestDialog::ApplyOutput(ScDocShell* pDocShell) aOutput.newLine(); // P one-tail - aOutput.writeString(SC_RESSTR(STR_ZTEST_P_ONE_TAIL)); + aOutput.writeString(ScResId(STR_ZTEST_P_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=1 - NORMSDIST(ABS(%Z_STAT%))"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // z critical one-tail - aOutput.writeString(SC_RESSTR(STR_ZTEST_Z_CRITICAL_ONE_TAIL)); + aOutput.writeString(ScResId(STR_ZTEST_Z_CRITICAL_ONE_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=-NORMSINV(%ALPHA%)"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // P two-tail - aOutput.writeString(SC_RESSTR(STR_ZTEST_P_TWO_TAIL)); + aOutput.writeString(ScResId(STR_ZTEST_P_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=2 * NORMSDIST(-ABS(%Z_STAT%))"); aOutput.writeFormula(aTemplate.getTemplate()); aOutput.newLine(); // z critical two-tail - aOutput.writeString(SC_RESSTR(STR_ZTEST_Z_CRITICAL_TWO_TAIL)); + aOutput.writeString(ScResId(STR_ZTEST_Z_CRITICAL_TWO_TAIL)); aOutput.nextColumn(); aTemplate.setTemplate("=-NORMSINV(%ALPHA%/2)"); aOutput.writeFormula(aTemplate.getTemplate()); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 15dd433c418a..70957b3aa601 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1721,8 +1721,8 @@ void ScTextWnd::ImplInitSettings() css::uno::Reference< css::accessibility::XAccessible > ScTextWnd::CreateAccessible() { return new ScAccessibleEditObject(GetAccessibleParentWindow()->GetAccessible(), nullptr, this, - OUString(ScResId(STR_ACC_EDITLINE_NAME)), - OUString(ScResId(STR_ACC_EDITLINE_DESCR)), ScAccessibleEditObject::EditLine); + ScResId(STR_ACC_EDITLINE_NAME), + ScResId(STR_ACC_EDITLINE_DESCR), ScAccessibleEditObject::EditLine); } void ScTextWnd::InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 18ec897177fa..d75a481b1a3d 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -106,9 +106,9 @@ #include <o3tl/make_unique.hxx> #include "scabstdlg.hxx" -ScResId::ScResId( sal_uInt16 nId ) : - ResId( nId, *SC_MOD()->GetResMgr() ) +OUString ScResId(sal_uInt16 nId) { + return ResId(nId, *SC_MOD()->GetResMgr()); } void ScDLL::Init() diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 5778f38725ff..863f328c28e7 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2283,12 +2283,12 @@ SfxStyleFamilies* ScModule::CreateStyleFamilies() pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para, ScGlobal::GetRscString(STR_STYLE_FAMILY_CELL), Image(BitmapEx(BMP_STYLES_FAMILY_CELL)), - ScResId(RID_CELLSTYLEFAMILY))); + ResId(RID_CELLSTYLEFAMILY, *SC_MOD()->GetResMgr()))); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Page, ScGlobal::GetRscString(STR_STYLE_FAMILY_PAGE), Image(BitmapEx(BMP_STYLES_FAMILY_PAGE)), - ScResId(RID_PAGESTYLEFAMILY))); + ResId(RID_PAGESTYLEFAMILY, *SC_MOD()->GetResMgr()))); return pStyleFamilies; } diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 347021ca3757..d3ed848145da 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1082,7 +1082,7 @@ void ScCheckListMenuWindow::packWindow() maEdSearch->SetPosSizePixel(aPos, aSize); maEdSearch->SetFont(getLabelFont()); maEdSearch->SetControlBackground(rStyle.GetFieldColor()); - maEdSearch->SetPlaceholderText(SC_RESSTR(STR_EDIT_SEARCH_ITEMS)); + maEdSearch->SetPlaceholderText(ScResId(STR_EDIT_SEARCH_ITEMS)); maEdSearch->SetModifyHdl( LINK(this, ScCheckListMenuWindow, EdModifyHdl) ); maEdSearch->Show(); @@ -1095,7 +1095,7 @@ void ScCheckListMenuWindow::packWindow() getSectionPosSize(aPos, aSize, CHECK_TOGGLE_ALL); maChkToggleAll->SetPosSizePixel(aPos, aSize); maChkToggleAll->SetFont(getLabelFont()); - maChkToggleAll->SetText(SC_RESSTR(STR_BTN_TOGGLE_ALL)); + maChkToggleAll->SetText(ScResId(STR_BTN_TOGGLE_ALL)); maChkToggleAll->SetTextColor(rStyle.GetMenuTextColor()); maChkToggleAll->SetControlBackground(rStyle.GetMenuColor()); maChkToggleAll->SetClickHdl( LINK(this, ScCheckListMenuWindow, TriStateHdl) ); @@ -1110,7 +1110,7 @@ void ScCheckListMenuWindow::packWindow() getSectionPosSize(aPos, aSize, BTN_SINGLE_SELECT); maBtnSelectSingle->SetPosSizePixel(aPos, aSize); - maBtnSelectSingle->SetQuickHelpText(SC_RESSTR(STR_BTN_SELECT_CURRENT)); + maBtnSelectSingle->SetQuickHelpText(ScResId(STR_BTN_SELECT_CURRENT)); maBtnSelectSingle->SetModeImage(aSingleSelect); maBtnSelectSingle->SetClickHdl( LINK(this, ScCheckListMenuWindow, ButtonHdl) ); maBtnSelectSingle->Show(); @@ -1122,7 +1122,7 @@ void ScCheckListMenuWindow::packWindow() getSectionPosSize(aPos, aSize, BTN_SINGLE_UNSELECT); maBtnUnselectSingle->SetPosSizePixel(aPos, aSize); - maBtnUnselectSingle->SetQuickHelpText(SC_RESSTR(STR_BTN_UNSELECT_CURRENT)); + maBtnUnselectSingle->SetQuickHelpText(ScResId(STR_BTN_UNSELECT_CURRENT)); maBtnUnselectSingle->SetModeImage(aSingleUnselect); maBtnUnselectSingle->SetClickHdl( LINK(this, ScCheckListMenuWindow, ButtonHdl) ); maBtnUnselectSingle->Show(); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 241838ef171d..d52452b6391c 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -42,7 +42,7 @@ ScCondFrmtEntry::ScCondFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const S : VclContainer(pParent, WB_CLIPCHILDREN | WB_BORDER) , mbActive(false) , mnIndex(0) - , maStrCondition(ScResId(SCSTR_CONDITION).toString()) + , maStrCondition(ScResId(SCSTR_CONDITION)) , mpDoc(pDoc) , maPos(rPos) { diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 69dfa163c1b6..6ce9b10bed84 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -52,11 +52,11 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pPar const SfxItemSet& rArgSet) : ScAnyRefDlg ( pB, pCW, pParent, "StandardFilterDialog", "modules/scalc/ui/standardfilterdialog.ui" ) - , aStrUndefined(SC_RESSTR(SCSTR_UNDEFINED)) - , aStrNone(SC_RESSTR(SCSTR_NONE)) - , aStrEmpty(SC_RESSTR(SCSTR_FILTER_EMPTY)) - , aStrNotEmpty(SC_RESSTR(SCSTR_FILTER_NOTEMPTY)) - , aStrColumn(SC_RESSTR(SCSTR_COLUMN)) + , aStrUndefined(ScResId(SCSTR_UNDEFINED)) + , aStrNone(ScResId(SCSTR_NONE)) + , aStrEmpty(ScResId(SCSTR_FILTER_EMPTY)) + , aStrNotEmpty(ScResId(SCSTR_FILTER_NOTEMPTY)) + , aStrColumn(ScResId(SCSTR_COLUMN)) , pOptionsMgr(nullptr) , nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY)) , theQueryData(static_cast<const ScQueryItem&>(rArgSet.Get(nWhichQuery)).GetQueryData()) diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index e0f0e9ec3b06..209b7ceed17f 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -44,10 +44,10 @@ ScPivotFilterDlg::ScPivotFilterDlg(vcl::Window* pParent, const SfxItemSet& rArgS "modules/scalc/ui/pivotfilterdialog.ui" ) , - aStrNone ( SC_RESSTR(SCSTR_NONE) ), - aStrEmpty ( SC_RESSTR(SCSTR_FILTER_EMPTY) ), - aStrNotEmpty ( SC_RESSTR(SCSTR_FILTER_NOTEMPTY) ), - aStrColumn ( SC_RESSTR(SCSTR_COLUMN) ), + aStrNone ( ScResId(SCSTR_NONE) ), + aStrEmpty ( ScResId(SCSTR_FILTER_EMPTY) ), + aStrNotEmpty ( ScResId(SCSTR_FILTER_NOTEMPTY) ), + aStrColumn ( ScResId(SCSTR_COLUMN) ), nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ), theQueryData ( static_cast<const ScQueryItem&>( diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 7bf29db6c805..042ddc4907d3 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -35,6 +35,7 @@ #include "dpobject.hxx" #include "dpsave.hxx" #include "scres.hrc" +#include "scmod.hxx" #include "globstr.hrc" #include "dputil.hxx" @@ -180,7 +181,7 @@ void ScDPFunctionListBox::FillFunctionNames() { OSL_ENSURE( !GetEntryCount(), "ScDPMultiFuncListBox::FillFunctionNames - do not add texts to resource" ); Clear(); - ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) ); + ResStringArray aArr(ResId(SCSTR_DPFUNCLISTBOX, *SC_MOD()->GetResMgr())); for( sal_uInt16 nIndex = 0, nCount = sal::static_int_cast<sal_uInt16>(aArr.Count()); nIndex < nCount; ++nIndex ) InsertEntry( aArr.GetString( nIndex ) ); assert(GetEntryCount() == SAL_N_ELEMENTS(spnFunctions)); diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index dbd9132c6a59..cb45ed52b803 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -135,8 +135,8 @@ ScImportOptionsDlg::ScImportOptionsDlg( get(m_pBtnOk, "ok"); OUString sFieldSep(SCSTR_FIELDSEP); - sFieldSep = sFieldSep.replaceFirst( "%TAB", SC_RESSTR(SCSTR_FIELDSEP_TAB) ); - sFieldSep = sFieldSep.replaceFirst( "%SPACE", SC_RESSTR(SCSTR_FIELDSEP_SPACE) ); + sFieldSep = sFieldSep.replaceFirst( "%TAB", ScResId(SCSTR_FIELDSEP_TAB) ); + sFieldSep = sFieldSep.replaceFirst( "%SPACE", ScResId(SCSTR_FIELDSEP_SPACE) ); // not possible in the Ctor initializer (MSC cannot do that): pFieldSepTab = new ScDelimiterTable(sFieldSep); diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index be4c9a06cd91..59a7caceb59c 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -47,7 +47,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vc : ScAnyRefDlg ( pB, pCW, pParent, "AdvancedFilterDialog", "modules/scalc/ui/advancedfilterdialog.ui" ), - aStrUndefined ( SC_RESSTR(SCSTR_UNDEFINED) ), + aStrUndefined ( ScResId(SCSTR_UNDEFINED) ), pOptionsMgr ( nullptr ), nWhichQuery ( rArgSet.GetPool()->GetWhich( SID_QUERY ) ), theQueryData ( static_cast<const ScQueryItem&>( diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 78bfa428a6b1..3ee1093e18a3 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -73,9 +73,9 @@ ScTabPageSortFields::ScTabPageSortFields(vcl::Window* pParent, "modules/scalc/ui/sortcriteriapage.ui", &rArgSet) , - aStrUndefined ( SC_RESSTR( SCSTR_UNDEFINED ) ), - aStrColumn ( SC_RESSTR( SCSTR_COLUMN ) ), - aStrRow ( SC_RESSTR( SCSTR_ROW ) ), + aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), + aStrColumn ( ScResId( SCSTR_COLUMN ) ), + aStrRow ( ScResId( SCSTR_ROW ) ), nWhichSort ( rArgSet.GetPool()->GetWhich( SID_SORT ) ), pDlg ( static_cast<ScSortDlg*>(GetParentDialog()) ), @@ -488,9 +488,9 @@ ScTabPageSortOptions::ScTabPageSortOptions( vcl::Window* pParent, const SfxItemSet& rArgSet ) : SfxTabPage(pParent, "SortOptionsPage", "modules/scalc/ui/sortoptionspage.ui", &rArgSet) - , aStrRowLabel(SC_RESSTR(SCSTR_ROW_LABEL)) - , aStrColLabel(SC_RESSTR(SCSTR_COL_LABEL)) - , aStrUndefined(SC_RESSTR(SCSTR_UNDEFINED)) + , aStrRowLabel(ScResId(SCSTR_ROW_LABEL)) + , aStrColLabel(ScResId(SCSTR_COL_LABEL)) + , aStrUndefined(ScResId(SCSTR_UNDEFINED)) , nWhichSort(rArgSet.GetPool()->GetWhich(SID_SORT)) , aSortData(static_cast<const ScSortItem&>(rArgSet.Get(nWhichSort)).GetSortData()) , pViewData(nullptr) diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index 5771d16e4d13..0d3b1e1747b9 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -39,8 +39,8 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( vcl::Window* pParent, : SfxTabPage ( pParent, "SubTotalGrpPage", "modules/scalc/ui/subtotalgrppage.ui", &rArgSet ), - aStrNone ( SC_RESSTR( SCSTR_NONE ) ), - aStrColumn ( SC_RESSTR( SCSTR_COLUMN ) ), + aStrNone ( ScResId( SCSTR_NONE ) ), + aStrColumn ( ScResId( SCSTR_COLUMN ) ), pViewData ( nullptr ), pDoc ( nullptr ), nWhichSubTotals ( rArgSet.GetPool()->GetWhich( SID_SUBTOTALS ) ), diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index 4f8e65a71b75..d0f343035a72 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -37,7 +37,7 @@ SearchResultsDlg::SearchResultsDlg( SfxBindings* _pBindings, vcl::Window* pParen mpList = VclPtr<SvSimpleTable>::Create(*pContainer); long nTabs[] = {3, 0, 40, 60}; mpList->SetTabs(&nTabs[0]); - mpList->InsertHeaderEntry(SC_RESSTR(STR_SHEET) + "\t" + SC_RESSTR(STR_CELL) + "\t" + SC_RESSTR(STR_CONTENT)); + mpList->InsertHeaderEntry(ScResId(STR_SHEET) + "\t" + ScResId(STR_CELL) + "\t" + ScResId(STR_CONTENT)); mpList->SetSelectHdl( LINK(this, SearchResultsDlg, ListSelectHdl) ); } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index c1097630d48b..77db8cd073f4 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -194,7 +194,7 @@ void ScDocShell::FillClass( SvGlobalName* pClassName, *pClassName = SvGlobalName( SO3_SC_CLASSID_60 ); *pFormat = bTemplate ? SotClipboardFormatId::STARCALC_8_TEMPLATE : SotClipboardFormatId::STARCALC_8; *pFullTypeName = "calc8"; - *pShortTypeName = ScResId(SCSTR_SHORT_SCDOC_NAME).toString(); + *pShortTypeName = ScResId(SCSTR_SHORT_SCDOC_NAME); } else { diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx index 71b7fba56d3b..cdabc4674044 100644 --- a/sc/source/ui/docshell/documentlinkmgr.cxx +++ b/sc/source/ui/docshell/documentlinkmgr.cxx @@ -177,7 +177,7 @@ bool DocumentLinkManager::updateDdeOrOleLinks( vcl::Window* pWin ) OUString aType = pDdeLink->GetAppl(); OUStringBuffer aBuf; - aBuf.append(OUString(ScResId(SCSTR_DDEDOC_NOT_LOADED))); + aBuf.append(ScResId(SCSTR_DDEDOC_NOT_LOADED)); aBuf.append("\n\n"); aBuf.append("Source : "); aBuf.append(aFile); diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index d9e476260573..3e0742bc5c6f 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -64,7 +64,7 @@ namespace { if( pLineEndList.is() ) { - OUString aArrowName( SVX_RES(nResId) ); + OUString aArrowName( SvxResId(nResId) ); long nCount = pLineEndList->Count(); long nIndex; for( nIndex = 0L; nIndex < nCount; nIndex++ ) @@ -279,9 +279,9 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt1 case SID_LINE_ARROWS: { // connector with arrow ends - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineStartWidthItem(nWidth)); - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -291,7 +291,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt1 case SID_LINE_ARROW_SQUARE: { // connector with arrow start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; @@ -301,7 +301,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt1 case SID_LINE_SQUARE_ARROW: { // connector with arrow end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -313,7 +313,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt1 case SID_LINE_ARROW_CIRCLE: { // circle end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -321,7 +321,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt1 case SID_LINE_CIRCLE_ARROW: { // circle start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; @@ -329,7 +329,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt1 case SID_LINE_ARROW_SQUARE: { // square end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_SQUARE), aSquare)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_SQUARE), aSquare)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -337,7 +337,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt1 case SID_LINE_SQUARE_ARROW: { // square start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_SQUARE), aSquare)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_SQUARE), aSquare)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 7077711154fa..9c1dfe325e49 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -123,7 +123,7 @@ void ScGraphicShell::ExecuteFilter( SfxRequest& rReq ) if( pPageView ) { SdrGrafObj* pFilteredObj = static_cast<SdrGrafObj*>(pObj->Clone()); - OUString aStr = pView->GetDescriptionOfMarkedObjects() + " " + OUString(ScResId( SCSTR_UNDO_GRAFFILTER )); + OUString aStr = pView->GetDescriptionOfMarkedObjects() + " " + ScResId(SCSTR_UNDO_GRAFFILTER); pView->BegUndo( aStr ); pFilteredObj->SetGraphicObject( aFilterObj ); pView->ReplaceObjectAtView( pObj, *pPageView, pFilteredObj ); diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index 996f0719c2d7..e7f2c3964722 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -81,22 +81,22 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window m_xPopup(get_menu("calcmenu")), pViewData ( ptrViewData ), pDoc ( ptrViewData->GetDocument() ), - aStrInsertCols (SC_RESSTR(STR_CHG_INSERT_COLS)), - aStrInsertRows (SC_RESSTR(STR_CHG_INSERT_ROWS)), - aStrInsertTabs (SC_RESSTR(STR_CHG_INSERT_TABS)), - aStrDeleteCols (SC_RESSTR(STR_CHG_DELETE_COLS)), - aStrDeleteRows (SC_RESSTR(STR_CHG_DELETE_ROWS)), - aStrDeleteTabs (SC_RESSTR(STR_CHG_DELETE_TABS)), - aStrMove (SC_RESSTR(STR_CHG_MOVE)), - aStrContent (SC_RESSTR(STR_CHG_CONTENT)), - aStrReject (SC_RESSTR(STR_CHG_REJECT)), - aStrAllAccepted (SC_RESSTR(STR_CHG_ACCEPTED)), - aStrAllRejected (SC_RESSTR(STR_CHG_REJECTED)), - aStrNoEntry (SC_RESSTR(STR_CHG_NO_ENTRY)), - aStrContentWithChild (SC_RESSTR(STR_CHG_CONTENT_WITH_CHILD)), - aStrChildContent (SC_RESSTR(STR_CHG_CHILD_CONTENT)), - aStrChildOrgContent (SC_RESSTR(STR_CHG_CHILD_ORGCONTENT)), - aStrEmpty (SC_RESSTR(STR_CHG_EMPTY)), + aStrInsertCols (ScResId(STR_CHG_INSERT_COLS)), + aStrInsertRows (ScResId(STR_CHG_INSERT_ROWS)), + aStrInsertTabs (ScResId(STR_CHG_INSERT_TABS)), + aStrDeleteCols (ScResId(STR_CHG_DELETE_COLS)), + aStrDeleteRows (ScResId(STR_CHG_DELETE_ROWS)), + aStrDeleteTabs (ScResId(STR_CHG_DELETE_TABS)), + aStrMove (ScResId(STR_CHG_MOVE)), + aStrContent (ScResId(STR_CHG_CONTENT)), + aStrReject (ScResId(STR_CHG_REJECT)), + aStrAllAccepted (ScResId(STR_CHG_ACCEPTED)), + aStrAllRejected (ScResId(STR_CHG_REJECTED)), + aStrNoEntry (ScResId(STR_CHG_NO_ENTRY)), + aStrContentWithChild (ScResId(STR_CHG_CONTENT_WITH_CHILD)), + aStrChildContent (ScResId(STR_CHG_CHILD_CONTENT)), + aStrChildOrgContent (ScResId(STR_CHG_CHILD_ORGCONTENT)), + aStrEmpty (ScResId(STR_CHG_EMPTY)), aUnknown("Unknown"), bAcceptEnableFlag(true), bRejectEnableFlag(true), diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 66e47cc3629d..a984cb5a030f 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -42,7 +42,7 @@ ScFillSeriesDlg::ScFillSeriesDlg( vcl::Window* pParent, sal_uInt16 nPossDir ) : ModalDialog(pParent, "FillSeriesDialog", "modules/scalc/ui/filldlg.ui"), aStartStrVal ( aStartStr), - aErrMsgInvalidVal( SC_RESSTR(SCSTR_VALERR) ), + aErrMsgInvalidVal( ScResId(SCSTR_VALERR) ), rDoc ( rDocument ), theFillDir ( eFillDir ), theFillCmd ( eFillCmd ), diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index ca1e861c738e..9b2819281c02 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -500,9 +500,9 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) aTbxCmd->SetLineCount(2); aLbDocuments->SetDropDownLineCount(9); aLbDocuments->SetSelectHdl(LINK(this, ScNavigatorDlg, DocumentSelectHdl)); - aStrActive = " (" + OUString(ScResId(SCSTR_ACTIVE)) + ")"; // " (active)" - aStrNotActive = " (" + OUString(ScResId(SCSTR_NOTACTIVE)) + ")"; // " (not active)" - aStrHidden = " (" + OUString(ScResId(SCSTR_HIDDEN)) + ")"; // " (hidden)" + aStrActive = " (" + ScResId(SCSTR_ACTIVE) + ")"; // " (active)" + aStrNotActive = " (" + ScResId(SCSTR_NOTACTIVE) + ")"; // " (not active)" + aStrHidden = " (" + ScResId(SCSTR_HIDDEN) + ")"; // " (hidden)" aTitleBase = GetText(); diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index dd047ff813ff..376a22681259 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -49,9 +49,9 @@ ScTpFormulaOptions::ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& r get(mpLbOOXMLRecalcOptions, "ooxmlrecalc"); get(mpLbODFRecalcOptions, "odfrecalc"); - mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_CALC_A1).toString()); - mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_A1).toString()); - mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_R1C1).toString()); + mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_CALC_A1)); + mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_A1)); + mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_R1C1)); Link<Button*,void> aLink2 = LINK( this, ScTpFormulaOptions, ButtonHdl ); mpBtnSepReset->SetClickHdl(aLink2); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 38aa83ea6f4d..bf47a82f5b62 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -329,7 +329,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( vcl::Window* pParent, const SfxItemSet& rArgSet ) : SfxTabPage( pParent, "ScGeneralPage", "modules/scalc/ui/scgeneralpage.ui", &rArgSet), - aUnitArr( ScResId(SCSTR_UNIT )), + aUnitArr(ResId(SCSTR_UNIT, *SC_MOD()->GetResMgr())), pDoc(nullptr) { get( m_pUnitLB, "unitlb"); diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index ca1b9f43a116..a0a73ce8cae8 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -314,17 +314,17 @@ css::uno::Reference< css::accessibility::XAccessible > ScEditWindow::CreateAcces { case Left: { - sName = OUString(ScResId(STR_ACC_LEFTAREA_NAME)); + sName = ScResId(STR_ACC_LEFTAREA_NAME); } break; case Center: { - sName = OUString(ScResId(STR_ACC_CENTERAREA_NAME)); + sName = ScResId(STR_ACC_CENTERAREA_NAME); } break; case Right: { - sName = OUString(ScResId(STR_ACC_RIGHTAREA_NAME)); + sName = ScResId(STR_ACC_RIGHTAREA_NAME); } break; } diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index a9d453454918..d412265b033c 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -511,11 +511,11 @@ void PivotTableDataProvider::collectPivotTableData() if (aMembers.size() == 1) aFieldOutputDescription = aMembers[0]; else - aFieldOutputDescription = ScResId(SCSTR_MULTIPLE).toString(); + aFieldOutputDescription = ScResId(SCSTR_MULTIPLE); } else { - aFieldOutputDescription = ScResId(SCSTR_ALL).toString(); + aFieldOutputDescription = ScResId(SCSTR_ALL); } m_aFieldOutputDescriptionMap[nDim] = aFieldOutputDescription; } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 0e5c0ab6bb84..5df2608e73e6 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -255,30 +255,30 @@ ScPrintUIOptions::ScPrintUIOptions() // create Section for spreadsheet (results in an extra tab page in dialog) SvtModuleOptions aOpt; - OUString aAppGroupname( SC_RESSTR( SCSTR_PRINTOPT_PRODNAME ) ); + OUString aAppGroupname( ScResId( SCSTR_PRINTOPT_PRODNAME ) ); aAppGroupname = aAppGroupname.replaceFirst( "%s", aOpt.GetModuleName( SvtModuleOptions::EModule::CALC ) ); m_aUIProperties[nIdx++].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, OUString()); // show subgroup for pages - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("pages", SC_RESSTR( SCSTR_PRINTOPT_PAGES ), OUString()); + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("pages", ScResId( SCSTR_PRINTOPT_PAGES ), OUString()); // create a bool option for empty pages - m_aUIProperties[nIdx++].Value = setBoolControlOpt("suppressemptypages", SC_RESSTR( SCSTR_PRINTOPT_SUPPRESSEMPTY ), + m_aUIProperties[nIdx++].Value = setBoolControlOpt("suppressemptypages", ScResId( SCSTR_PRINTOPT_SUPPRESSEMPTY ), ".HelpID:vcl:PrintDialog:IsSuppressEmptyPages:CheckBox", "IsSuppressEmptyPages", bSuppress); // show Subgroup for print content vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = "PrintRange"; - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", SC_RESSTR( SCSTR_PRINTOPT_PRNTCONTENT ), + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", ScResId( SCSTR_PRINTOPT_PRNTCONTENT ), OUString(), aPrintRangeOpt); // create a choice for the content to create uno::Sequence< OUString > aChoices{ - SC_RESSTR( SCSTR_PRINTOPT_ALLSHEETS ), - SC_RESSTR( SCSTR_PRINTOPT_SELECTEDSHEETS ), - SC_RESSTR( SCSTR_PRINTOPT_SELECTEDCELLS )}; + ScResId( SCSTR_PRINTOPT_ALLSHEETS ), + ScResId( SCSTR_PRINTOPT_SELECTEDSHEETS ), + ScResId( SCSTR_PRINTOPT_SELECTEDCELLS )}; uno::Sequence< OUString > aHelpIds{ ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0", ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1", @@ -293,7 +293,7 @@ ScPrintUIOptions::ScPrintUIOptions() // show Subgroup for print range aPrintRangeOpt.mbInternalOnly = true; - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("fromwhich", SC_RESSTR( SCSTR_PRINTOPT_FROMWHICH ), + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("fromwhich", ScResId( SCSTR_PRINTOPT_FROMWHICH ), OUString(), aPrintRangeOpt); @@ -302,10 +302,10 @@ ScPrintUIOptions::ScPrintUIOptions() aChoices.realloc( 2 ); aHelpIds.realloc( 2 ); aWidgetIds.realloc( 2 ); - aChoices[0] = SC_RESSTR( SCSTR_PRINTOPT_ALLPAGES ); + aChoices[0] = ScResId( SCSTR_PRINTOPT_ALLPAGES ); aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0"; aWidgetIds[0] = "printallpages"; - aChoices[1] = SC_RESSTR( SCSTR_PRINTOPT_PAGES_ ); + aChoices[1] = ScResId( SCSTR_PRINTOPT_PAGES_ ); aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1"; aWidgetIds[1] = "printpages"; m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx index 346d3d85cfcb..daf4666a15ab 100644 --- a/sc/source/ui/view/drawvie3.cxx +++ b/sc/source/ui/view/drawvie3.cxx @@ -62,7 +62,7 @@ void ScDrawView::SetPageAnchored() const SdrMarkList* pMark = &GetMarkedObjectList(); const size_t nCount = pMark->GetMarkCount(); - BegUndo( OUString(ScResId( SCSTR_UNDO_PAGE_ANCHOR )) ); + BegUndo(ScResId(SCSTR_UNDO_PAGE_ANCHOR)); for( size_t i=0; i<nCount; ++i ) { SdrObject* pObj = pMark->GetMark(i)->GetMarkedSdrObj(); @@ -90,7 +90,7 @@ void ScDrawView::SetCellAnchored() const SdrMarkList* pMark = &GetMarkedObjectList(); const size_t nCount = pMark->GetMarkCount(); - BegUndo( OUString(ScResId( SCSTR_UNDO_CELL_ANCHOR )) ); + BegUndo(ScResId(SCSTR_UNDO_CELL_ANCHOR)); for( size_t i=0; i<nCount; ++i ) { SdrObject* pObj = pMark->GetMark(i)->GetMarkedSdrObj(); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 95ffc0e67ba5..a464447c20fd 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -680,21 +680,21 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) // Populate the menu. mpAutoFilterPopup->addMenuItem( - SC_RESSTR(STR_MENU_SORT_ASC), + ScResId(STR_MENU_SORT_ASC), new AutoFilterAction(this, SortAscending)); mpAutoFilterPopup->addMenuItem( - SC_RESSTR(STR_MENU_SORT_DESC), + ScResId(STR_MENU_SORT_DESC), new AutoFilterAction(this, SortDescending)); mpAutoFilterPopup->addSeparator(); mpAutoFilterPopup->addMenuItem( - SC_RESSTR(SCSTR_TOP10FILTER), new AutoFilterAction(this, Top10)); + ScResId(SCSTR_TOP10FILTER), new AutoFilterAction(this, Top10)); mpAutoFilterPopup->addMenuItem( - SC_RESSTR(SCSTR_FILTER_EMPTY), new AutoFilterAction(this, Empty)); + ScResId(SCSTR_FILTER_EMPTY), new AutoFilterAction(this, Empty)); mpAutoFilterPopup->addMenuItem( - SC_RESSTR(SCSTR_FILTER_NOTEMPTY), new AutoFilterAction(this, NonEmpty)); + ScResId(SCSTR_FILTER_NOTEMPTY), new AutoFilterAction(this, NonEmpty)); mpAutoFilterPopup->addSeparator(); mpAutoFilterPopup->addMenuItem( - SC_RESSTR(SCSTR_STDFILTER), new AutoFilterAction(this, Custom)); + ScResId(SCSTR_STDFILTER), new AutoFilterAction(this, Custom)); ScCheckListMenuWindow::Config aConfig; aConfig.mbAllowEmptySet = false; diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 653776227e0e..ebd9a63f2a2d 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -509,13 +509,13 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& rScrPos, const Size& rScr // Populate the menus. ScTabViewShell* pViewShell = pViewData->GetViewShell(); mpDPFieldPopup->addMenuItem( - SC_RESSTR(STR_MENU_SORT_ASC), + ScResId(STR_MENU_SORT_ASC), new PopupSortAction(pDPObj, nDimIndex, PopupSortAction::ASCENDING, 0, pViewShell)); mpDPFieldPopup->addMenuItem( - SC_RESSTR(STR_MENU_SORT_DESC), + ScResId(STR_MENU_SORT_DESC), new PopupSortAction(pDPObj, nDimIndex, PopupSortAction::DESCENDING, 0, pViewShell)); ScMenuFloatingWindow* pSubMenu = mpDPFieldPopup->addSubMenuItem( - SC_RESSTR(STR_MENU_SORT_CUSTOM), !aUserSortNames.empty()); + ScResId(STR_MENU_SORT_CUSTOM), !aUserSortNames.empty()); if (pSubMenu && !aUserSortNames.empty()) { diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index d2980486bb4e..03b35199c6b2 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -372,13 +372,13 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) switch ( nSlot ) { case FID_TAB_APPEND: - aDlgTitle = OUString(ScResId(SCSTR_APDTABLE)); + aDlgTitle = ScResId(SCSTR_APDTABLE); pDoc->CreateValidTabName( aName ); pHelpId = HID_SC_APPEND_NAME; break; case FID_TAB_RENAME: - aDlgTitle = OUString(ScResId(SCSTR_RENAMETAB)); + aDlgTitle = ScResId(SCSTR_RENAMETAB); pDoc->GetName( rViewData.GetTabNo(), aName ); pHelpId = HID_SC_RENAME_NAME; break; @@ -388,7 +388,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScStringInputDlg> pDlg(pFact->CreateScStringInputDlg( - GetDialogParent(), aDlgTitle, OUString(ScResId(SCSTR_NAME)), + GetDialogParent(), aDlgTitle, ScResId(SCSTR_NAME), aName, GetStaticInterface()->GetSlot(nSlot)->GetCommand(), pHelpId)); @@ -773,8 +773,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScTabBgColorDlg> pDlg(pFact->CreateScTabBgColorDlg( GetDialogParent(), - OUString(ScResId(SCSTR_SET_TAB_BG_COLOR)), - OUString(ScResId(SCSTR_NO_TAB_BG_COLOR)), + ScResId(SCSTR_SET_TAB_BG_COLOR), + ScResId(SCSTR_NO_TAB_BG_COLOR), aTabBgColor)); while ( !bDone && nRet == RET_OK ) { diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx index dd023dd473d3..344d5aa0f54a 100644 --- a/scaddins/source/analysis/analysis.cxx +++ b/scaddins/source/analysis/analysis.cxx @@ -241,7 +241,7 @@ OUString SAL_CALL AnalysisAddIn::getDisplayFunctionName( const OUString& aProgra auto it = std::find_if(pFD->begin(), pFD->end(), FindFuncData( aProgrammaticName ) ); if( it != pFD->end() ) { - aRet = AnalysisResId(it->GetUINameID(), GetResMgr()).toString(); + aRet = AnalysisResId(it->GetUINameID(), GetResMgr()); if( it->IsDouble() ) { const OUString& rSuffix = it->GetSuffix(); diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx index 055f7bcc5525..d2a33ccf5398 100644 --- a/scaddins/source/datefunc/datefunc.cxx +++ b/scaddins/source/datefunc/datefunc.cxx @@ -252,7 +252,7 @@ OUString SAL_CALL ScaDateAddIn::getDisplayFunctionName( const OUString& aProgram FindScaFuncData( aProgrammaticName ) ); if( fDataIt != pFuncDataList->end() ) { - aRet = ScaResId(fDataIt->GetUINameID(), GetResMgr()).toString(); + aRet = ScaResId(fDataIt->GetUINameID(), GetResMgr()); if( fDataIt->IsDouble() ) aRet += "_ADD"; } diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx index e1843cf5b396..7824f0c4a67e 100644 --- a/scaddins/source/pricing/pricing.cxx +++ b/scaddins/source/pricing/pricing.cxx @@ -275,7 +275,7 @@ OUString SAL_CALL ScaPricingAddIn::getDisplayFunctionName( const OUString& aProg FindScaFuncData( aProgrammaticName ) ); if(fDataIt != pFuncDataList->end() ) { - aRet = ScaResId(fDataIt->GetUINameID(), GetResMgr()).toString(); + aRet = ScaResId(fDataIt->GetUINameID(), GetResMgr()); if( fDataIt->IsDouble() ) aRet += "_ADD"; } diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 36ac7d7b5808..62a4c3775e47 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -191,7 +191,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/app/sdmod1 \ sd/source/ui/app/sdmod2 \ sd/source/ui/app/sdpopup \ - sd/source/ui/app/sdresid \ sd/source/ui/app/sdxfer \ sd/source/ui/app/tmplctrl \ sd/source/ui/controller/slidelayoutcontroller \ diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 5372a83252d5..f39b7d369332 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -54,7 +54,6 @@ class SdrModel; class SdrView; class Bitmap; class List; -class SdResId; namespace vcl { class Window; } class SdPage; class TabPage; diff --git a/sd/inc/sdresid.hxx b/sd/inc/sdresid.hxx index 95397b38b06b..2fdb9e30d236 100644 --- a/sd/inc/sdresid.hxx +++ b/sd/inc/sdresid.hxx @@ -22,14 +22,12 @@ #include <tools/resid.hxx> #include "sddllapi.h" +#include "sdmod.hxx" -class SD_DLLPUBLIC SdResId : public ResId +inline OUString SdResId(sal_uInt16 nId) { -public: - SdResId(sal_uInt16 nId); -}; - -#define SD_RESSTR(x) SdResId(x).toString() + return ResId(nId, *SD_MOD()->GetResMgr()); +} #endif /* _SD_SDRESID_HXX */ diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 3637c27831de..aa0837ecf3ce 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -367,7 +367,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); CPPUNIT_ASSERT(pDrawDoc); SfxItemSet aNewAttr(pDrawDoc->GetItemPool(), ATTR_LAYER_START, ATTR_LAYER_END); - const OUString aLayerName = SD_RESSTR(STR_LAYER); // + OUString::number(2); + const OUString aLayerName = SdResId(STR_LAYER); // + OUString::number(2); aNewAttr.Put(makeSdAttrLayerName(aLayerName)); aNewAttr.Put(makeSdAttrLayerTitle()); aNewAttr.Put(makeSdAttrLayerDesc()); @@ -379,7 +379,7 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) getViewShell()->GetActiveWindow(), aNewAttr, true, // alternative: false - SD_RESSTR(STR_INSERTLAYER) /* alternative: STR_MODIFYLAYER */); + SdResId(STR_INSERTLAYER) /* alternative: STR_MODIFYLAYER */); break; } case 9: diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index a30fdb097d6e..fba824d42a94 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -348,14 +348,14 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) */ { - OUString aControlLayerName( SD_RESSTR(STR_LAYER_CONTROLS) ); + OUString aControlLayerName( SdResId(STR_LAYER_CONTROLS) ); SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_LAYOUT) ); - rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_BCKGRND) ); - rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) ); + rLayerAdmin.NewLayer( SdResId(STR_LAYER_LAYOUT) ); + rLayerAdmin.NewLayer( SdResId(STR_LAYER_BCKGRND) ); + rLayerAdmin.NewLayer( SdResId(STR_LAYER_BCKGRNDOBJ) ); rLayerAdmin.NewLayer( aControlLayerName ); - rLayerAdmin.NewLayer( SD_RESSTR(STR_LAYER_MEASURELINES) ); + rLayerAdmin.NewLayer( SdResId(STR_LAYER_MEASURELINES) ); rLayerAdmin.SetControlLayerName(aControlLayerName); } @@ -627,11 +627,11 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) } // Set default style of Drawing Engine - OUString aName( SD_RESSTR(STR_STANDARD_STYLESHEET_NAME)); + OUString aName( SdResId(STR_STANDARD_STYLESHEET_NAME)); SetDefaultStyleSheet(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(aName, SD_STYLE_FAMILY_GRAPHICS))); // #i119287# Set default StyleSheet for SdrGrafObj and SdrOle2Obj - SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(SD_RESSTR(STR_POOLSHEET_OBJNOLINENOFILL), SD_STYLE_FAMILY_GRAPHICS))); + SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(static_cast<SfxStyleSheet*>(mxStyleSheetPool->Find(SdResId(STR_POOLSHEET_OBJNOLINENOFILL), SD_STYLE_FAMILY_GRAPHICS))); // Initialize DrawOutliner and DocumentOutliner, but don't initialize the // global outliner, as it is not document specific like StyleSheetPool and diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index baa71139cce2..917c486c7408 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -309,7 +309,7 @@ void SdDrawDocument::UpdatePageRelativeURLs(const OUString& rOldName, const OUSt } else { - const OUString sNotes(SD_RESSTR(STR_NOTES)); + const OUString sNotes(SdResId(STR_NOTES)); if (aURL.getLength() == rOldName.getLength() + 2 + sNotes.getLength() && aURL.indexOf(sNotes, rOldName.getLength() + 2) == rOldName.getLength() + 2) { @@ -346,12 +346,12 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_ if (!aURL.isEmpty() && (aURL[0] == 35)) { OUString aHashSlide("#"); - aHashSlide += SD_RESSTR(STR_PAGE); + aHashSlide += SdResId(STR_PAGE); if (aURL.startsWith(aHashSlide)) { OUString aURLCopy = aURL; - const OUString sNotes(SD_RESSTR(STR_NOTES)); + const OUString sNotes(SdResId(STR_NOTES)); aURLCopy = aURLCopy.replaceAt(0, aHashSlide.getLength(), ""); @@ -547,7 +547,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ ) } pHandoutPage->SetPageKind(PageKind::Handout); - pHandoutPage->SetName( SD_RESSTR(STR_HANDOUT) ); + pHandoutPage->SetName( SdResId(STR_HANDOUT) ); InsertPage(pHandoutPage, 0); // Insert master page and register this with the handout page @@ -760,7 +760,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage) const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SD_RESSTR(STR_UNDO_MOVEPAGES)); + BegUndo(SdResId(STR_UNDO_MOVEPAGES)); // List of selected pages std::vector<SdPage*> aPageList; @@ -1346,8 +1346,8 @@ sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum) // Get background flags SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); SdrLayerIDSet aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers(); return DuplicatePage ( @@ -1490,8 +1490,8 @@ void SdDrawDocument::SetupNewPage ( if (pPreviousPage != nullptr) { SdrLayerAdmin& rLayerAdmin = GetLayerAdmin(); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); SdrLayerIDSet aVisibleLayers = pPreviousPage->TRG_GetMasterPageVisibleLayers(); aVisibleLayers.Set(aBckgrnd, bIsPageBack); aVisibleLayers.Set(aBckgrndObj, bIsPageObj); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index f4030c714cfa..dada8f687e41 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -246,7 +246,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium* pMedium) if (!bOK) { - ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SD_RESSTR(STR_READ_DATA_ERROR)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SdResId(STR_READ_DATA_ERROR)); aErrorBox->Execute(); CloseBookmarkDoc(); @@ -467,7 +467,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( pBMPage->GetUppBorder() != pRefPage->GetUppBorder() || pBMPage->GetLwrBorder() != pRefPage->GetLwrBorder()) { - OUString aStr(SD_RESSTR(STR_SCALE_OBJECTS)); + OUString aStr(SdResId(STR_SCALE_OBJECTS)); sal_uInt16 nBut = ScopedVclPtrInstance<QueryBox>(nullptr, WB_YES_NO_CANCEL, aStr)->Execute(); bScaleObjects = nBut == RET_YES; @@ -489,7 +489,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( ViewShellId nViewShellId(-1); if (sd::ViewShell* pViewShell = mpDocSh->GetViewShell()) nViewShellId = pViewShell->GetViewShellBase().GetViewShellId(); - pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_INSERTPAGES), "", 0, nViewShellId); + pUndoMgr->EnterListAction(SdResId(STR_UNDO_INSERTPAGES), "", 0, nViewShellId); } // Refactored copy'n'pasted layout name collection into IterateBookmarkPages @@ -544,7 +544,7 @@ bool SdDrawDocument::InsertBookmarkAsPage( const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SD_RESSTR(STR_UNDO_INSERTPAGES)); + BegUndo(SdResId(STR_UNDO_INSERTPAGES)); if (rBookmarkList.empty()) { @@ -1418,7 +1418,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, ViewShellId nViewShellId(-1); if (sd::ViewShell* pViewShell = mpDocSh->GetViewShell()) nViewShellId = pViewShell->GetViewShellBase().GetViewShellId(); - pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_SET_PRESLAYOUT), OUString(), 0, nViewShellId); + pUndoMgr->EnterListAction(SdResId(STR_UNDO_SET_PRESLAYOUT), OUString(), 0, nViewShellId); } SdPage* pSelectedPage = GetSdPage(nSdPageNum, PageKind::Standard); diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 79c882a5e6d3..d4290d037a27 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -127,7 +127,7 @@ void SdDrawDocument::CreateLayoutTemplates() SdStyleSheetPool* pSSPool = static_cast<SdStyleSheetPool*>(GetStyleSheetPool()); SfxStyleSheetBase* pSheet = nullptr; OUString aHelpFile; - OUString aStdName(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME)); + OUString aStdName(SdResId(STR_STANDARD_STYLESHEET_NAME)); // Default style @@ -253,7 +253,7 @@ void SdDrawDocument::CreateLayoutTemplates() SfxItemSet* pISet = nullptr; // Object with arrowhead - aName = SD_RESSTR(STR_POOLSHEET_OBJWITHARROW); + aName = SdResId(STR_POOLSHEET_OBJWITHARROW); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHARROW ); @@ -268,14 +268,14 @@ void SdDrawDocument::CreateLayoutTemplates() aArrow.append(::basegfx::B2DPoint(0.0, 30.0)); aArrow.append(::basegfx::B2DPoint(20.0, 30.0)); aArrow.setClosed(true); - pISet->Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow))); + pISet->Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow))); pISet->Put(XLineStartWidthItem(700)); pISet->Put(XLineEndWidthItem(300)); pISet->Put(XLineStartCenterItem(true)); // Object with Shadow - aName = SD_RESSTR(STR_POOLSHEET_OBJWITHSHADOW); + aName = SdResId(STR_POOLSHEET_OBJWITHSHADOW); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHSHADOW ); @@ -287,7 +287,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(makeSdrShadowYDistItem(200)); // Object without filling - aName = SD_RESSTR(STR_POOLSHEET_OBJWITHOUTFILL); + aName = SdResId(STR_POOLSHEET_OBJWITHOUTFILL); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHOUTFILL ); @@ -298,7 +298,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Object no fill no line - aName = SD_RESSTR(STR_POOLSHEET_OBJNOLINENOFILL); + aName = SdResId(STR_POOLSHEET_OBJNOLINENOFILL); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJNOLINENOFILL ); @@ -309,7 +309,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Text - aName = SD_RESSTR(STR_POOLSHEET_TEXT); + aName = SdResId(STR_POOLSHEET_TEXT); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXT ); @@ -319,7 +319,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); // Text body - aName = SD_RESSTR(STR_POOLSHEET_TEXTBODY); + aName = SdResId(STR_POOLSHEET_TEXTBODY); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY ); @@ -331,7 +331,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(SvxFontHeightItem(564, 100, EE_CHAR_FONTHEIGHT)); // 16 pt // Text body, justified - aName = SD_RESSTR(STR_POOLSHEET_TEXTBODY_JUSTIFY); + aName = SdResId(STR_POOLSHEET_TEXTBODY_JUSTIFY); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY_JUSTIFY ); @@ -343,7 +343,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(SvxAdjustItem(SvxAdjust::Block, EE_PARA_JUST )); // Text body, indented - aName = SD_RESSTR(STR_POOLSHEET_TEXTBODY_INDENT); + aName = SdResId(STR_POOLSHEET_TEXTBODY_INDENT); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY_INDENT ); @@ -358,7 +358,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Title - aName = SD_RESSTR(STR_POOLSHEET_TITLE); + aName = SdResId(STR_POOLSHEET_TITLE); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE ); @@ -370,7 +370,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(SvxFontHeightItem(1551, 100, EE_CHAR_FONTHEIGHT )); // 44 pt // Title1 - aName = SD_RESSTR(STR_POOLSHEET_TITLE1); + aName = SdResId(STR_POOLSHEET_TITLE1); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE1 ); @@ -391,7 +391,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Title2 - aName = SD_RESSTR(STR_POOLSHEET_TITLE2); + aName = SdResId(STR_POOLSHEET_TITLE2); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE2 ); @@ -420,7 +420,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Headline - aName = SD_RESSTR(STR_POOLSHEET_HEADLINE); + aName = SdResId(STR_POOLSHEET_HEADLINE); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE ); @@ -435,7 +435,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Paragraph margin below: 2,1 mm // Headline1 - aName = SD_RESSTR(STR_POOLSHEET_HEADLINE1); + aName = SdResId(STR_POOLSHEET_HEADLINE1); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE1 ); @@ -452,7 +452,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Paragraph margin below: 2,1 mm // Headline2 - aName = SD_RESSTR(STR_POOLSHEET_HEADLINE2); + aName = SdResId(STR_POOLSHEET_HEADLINE2); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE2 ); @@ -470,7 +470,7 @@ void SdDrawDocument::CreateLayoutTemplates() // Paragraph margin below: 2,1 mm // Measurements - aName = SD_RESSTR(STR_POOLSHEET_MEASURE); + aName = SdResId(STR_POOLSHEET_MEASURE); pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask)); pSheet->SetParent(aStdName); pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_MEASURE ); @@ -481,15 +481,15 @@ void SdDrawDocument::CreateLayoutTemplates() pISet->Put(SvxFontHeightItem(423, 100, EE_CHAR_FONTHEIGHT )); // 12 pt - pISet->Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow))); + pISet->Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow))); pISet->Put(XLineStartWidthItem(200)); - pISet->Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow))); + pISet->Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow))); pISet->Put(XLineEndWidthItem(200)); pISet->Put(XLineStyleItem(drawing::LineStyle_SOLID)); pISet->Put(SdrYesNoItem(SDRATTR_MEASURESHOWUNIT, true)); // Generate presentation templates for default layout. - OUString aPrefix = SD_RESSTR(STR_LAYOUT_DEFAULT_NAME); + OUString aPrefix = SdResId(STR_LAYOUT_DEFAULT_NAME); pSSPool->CreateLayoutStyleSheets(aPrefix); } @@ -1006,23 +1006,23 @@ void SdDrawDocument::RestoreLayerNames() if (aLayerName == "LAYER_LAYOUT") { - pLayer->SetName(SD_RESSTR(STR_LAYER_LAYOUT)); + pLayer->SetName(SdResId(STR_LAYER_LAYOUT)); } else if (aLayerName == "LAYER_BCKGRND") { - pLayer->SetName(SD_RESSTR(STR_LAYER_BCKGRND)); + pLayer->SetName(SdResId(STR_LAYER_BCKGRND)); } else if (aLayerName == "LAYER_BACKGRNDOBJ") { - pLayer->SetName(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + pLayer->SetName(SdResId(STR_LAYER_BCKGRNDOBJ)); } else if (aLayerName == "LAYER_CONTROLS") { - pLayer->SetName(SD_RESSTR(STR_LAYER_CONTROLS)); + pLayer->SetName(SdResId(STR_LAYER_CONTROLS)); } else if (aLayerName == "LAYER_MEASURELINES") { - pLayer->SetName(SD_RESSTR(STR_LAYER_MEASURELINES)); + pLayer->SetName(SdResId(STR_LAYER_MEASURELINES)); } } } diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index f334f155d2e3..6cb7963bcacd 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -542,7 +542,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t // background objects of the master page pSdrObj->SetLayer( rLayerAdmin. - GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)) ); + GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)) ); } // Subscribe object at the style sheet @@ -2459,22 +2459,22 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO { pOutl->SetStyleSheet( 0, GetStyleSheetForPresObj(eObjKind) ); aString += "\n\t\t"; - aString += SD_RESSTR(STR_PRESOBJ_MPOUTLLAYER2); + aString += SdResId(STR_PRESOBJ_MPOUTLLAYER2); aString += "\n\t\t\t"; - aString += SD_RESSTR(STR_PRESOBJ_MPOUTLLAYER3); + aString += SdResId(STR_PRESOBJ_MPOUTLLAYER3); aString += "\n\t\t\t\t"; - aString += SD_RESSTR(STR_PRESOBJ_MPOUTLLAYER4); + aString += SdResId(STR_PRESOBJ_MPOUTLLAYER4); aString += "\n\t\t\t\t\t"; - aString += SD_RESSTR(STR_PRESOBJ_MPOUTLLAYER5); + aString += SdResId(STR_PRESOBJ_MPOUTLLAYER5); aString += "\n\t\t\t\t\t\t"; - aString += SD_RESSTR(STR_PRESOBJ_MPOUTLLAYER6); + aString += SdResId(STR_PRESOBJ_MPOUTLLAYER6); aString += "\n\t\t\t\t\t\t\t"; - aString += SD_RESSTR(STR_PRESOBJ_MPOUTLLAYER7); + aString += SdResId(STR_PRESOBJ_MPOUTLLAYER7); } } @@ -2581,7 +2581,7 @@ const OUString& SdPage::GetName() const // default name for handout pages sal_uInt16 nNum = (GetPageNum() + 1) / 2; - aCreatedPageName = SD_RESSTR(STR_PAGE); + aCreatedPageName = SdResId(STR_PAGE); aCreatedPageName += " "; if( GetModel()->GetPageNumType() == css::style::NumberingType::NUMBER_NONE ) { @@ -2600,7 +2600,7 @@ const OUString& SdPage::GetName() const /****************************************************************** * default name for note pages ******************************************************************/ - aCreatedPageName = SD_RESSTR(STR_LAYOUT_DEFAULT_NAME); + aCreatedPageName = SdResId(STR_LAYOUT_DEFAULT_NAME); } } else @@ -2611,12 +2611,12 @@ const OUString& SdPage::GetName() const if (mePageKind == PageKind::Notes) { aCreatedPageName += " "; - aCreatedPageName += SD_RESSTR(STR_NOTES); + aCreatedPageName += SdResId(STR_NOTES); } else if (mePageKind == PageKind::Handout && mbMaster) { aCreatedPageName += " ("; - aCreatedPageName += SD_RESSTR(STR_HANDOUT); + aCreatedPageName += SdResId(STR_HANDOUT); aCreatedPageName += ")"; } @@ -2650,63 +2650,63 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const { if (mePageKind != PageKind::Notes) { - aString = SD_RESSTR( STR_PRESOBJ_MPTITLE ); + aString = SdResId( STR_PRESOBJ_MPTITLE ); } else { - aString = SD_RESSTR( STR_PRESOBJ_MPNOTESTITLE ); + aString = SdResId( STR_PRESOBJ_MPNOTESTITLE ); } } else { - aString = SD_RESSTR( STR_PRESOBJ_TITLE ); + aString = SdResId( STR_PRESOBJ_TITLE ); } } else if (eObjKind == PRESOBJ_OUTLINE) { if (mbMaster) { - aString = SD_RESSTR( STR_PRESOBJ_MPOUTLINE ); + aString = SdResId( STR_PRESOBJ_MPOUTLINE ); } else { - aString = SD_RESSTR( STR_PRESOBJ_OUTLINE ); + aString = SdResId( STR_PRESOBJ_OUTLINE ); } } else if (eObjKind == PRESOBJ_NOTES) { if (mbMaster) { - aString = SD_RESSTR( STR_PRESOBJ_MPNOTESTEXT ); + aString = SdResId( STR_PRESOBJ_MPNOTESTEXT ); } else { - aString = SD_RESSTR( STR_PRESOBJ_NOTESTEXT ); + aString = SdResId( STR_PRESOBJ_NOTESTEXT ); } } else if (eObjKind == PRESOBJ_TEXT) { - aString = SD_RESSTR( STR_PRESOBJ_TEXT ); + aString = SdResId( STR_PRESOBJ_TEXT ); } else if (eObjKind == PRESOBJ_GRAPHIC) { - aString = SD_RESSTR( STR_PRESOBJ_GRAPHIC ); + aString = SdResId( STR_PRESOBJ_GRAPHIC ); } else if (eObjKind == PRESOBJ_OBJECT) { - aString = SD_RESSTR( STR_PRESOBJ_OBJECT ); + aString = SdResId( STR_PRESOBJ_OBJECT ); } else if (eObjKind == PRESOBJ_CHART) { - aString = SD_RESSTR( STR_PRESOBJ_CHART ); + aString = SdResId( STR_PRESOBJ_CHART ); } else if (eObjKind == PRESOBJ_ORGCHART) { - aString = SD_RESSTR( STR_PRESOBJ_ORGCHART ); + aString = SdResId( STR_PRESOBJ_ORGCHART ); } else if (eObjKind == PRESOBJ_CALC) { - aString = SD_RESSTR( STR_PRESOBJ_TABLE ); + aString = SdResId( STR_PRESOBJ_TABLE ); } return aString; diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index ee8db41641a6..04bec070c509 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -493,8 +493,8 @@ Any SdStyleFamily::getPropertyValue( const OUString& PropertyName ) switch( mnFamily ) { case SD_STYLE_FAMILY_MASTERPAGE: sDisplayName = getName(); break; - case SD_STYLE_FAMILY_CELL: sDisplayName = SD_RESSTR(STR_CELL_STYLE_FAMILY); break; - default: sDisplayName = SD_RESSTR(STR_GRAPHICS_STYLE_FAMILY); break; + case SD_STYLE_FAMILY_CELL: sDisplayName = SdResId(STR_CELL_STYLE_FAMILY); break; + default: sDisplayName = SdResId(STR_GRAPHICS_STYLE_FAMILY); break; } return Any( sDisplayName ); } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 624f329ca45d..396f58a9000b 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -845,7 +845,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() sal_uInt16 nUsedMask = SFXSTYLEBIT_USED; - aName = SD_RESSTR(STR_PSEUDOSHEET_TITLE); + aName = SdResId(STR_PSEUDOSHEET_TITLE); if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr ) { pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask); @@ -854,7 +854,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() } pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_TITLE ); - aName = SD_RESSTR(STR_PSEUDOSHEET_SUBTITLE); + aName = SdResId(STR_PSEUDOSHEET_SUBTITLE); if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr ) { pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask); @@ -863,7 +863,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() } pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_SUBTITLE ); - aName = SD_RESSTR(STR_PSEUDOSHEET_BACKGROUNDOBJECTS); + aName = SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS); if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr ) { pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask); @@ -872,7 +872,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() } pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS ); - aName = SD_RESSTR(STR_PSEUDOSHEET_BACKGROUND); + aName = SdResId(STR_PSEUDOSHEET_BACKGROUND); if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr ) { pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask); @@ -881,7 +881,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() } pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUND ); - aName = SD_RESSTR(STR_PSEUDOSHEET_NOTES); + aName = SdResId(STR_PSEUDOSHEET_NOTES); if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr ) { pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask); @@ -892,7 +892,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary() pParent = nullptr; SetSearchMask(SD_STYLE_FAMILY_PSEUDO); - aName = SD_RESSTR(STR_PSEUDOSHEET_OUTLINE); + aName = SdResId(STR_PSEUDOSHEET_OUTLINE); for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++) { OUString aLevelName( aName + " " + OUString::number( nLevel ) ); @@ -1002,7 +1002,7 @@ void SdStyleSheetPool::UpdateStdNames() { if( nNameId ) { - aNewName = SD_RESSTR( nNameId ); + aNewName = SdResId( nNameId ); if( nNameId == STR_PSEUDOSHEET_OUTLINE ) { aNewName += " " + OUString::number( sal_Int32( nHelpId - HID_PSEUDOSHEET_OUTLINE ) ); diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 9d984d001d02..ea125d3a8aad 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -417,23 +417,23 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const OUString aInternalName; OUString aStyleName(aName); - if (aStyleName == OUString(SdResId(STR_PSEUDOSHEET_TITLE))) + if (aStyleName == SdResId(STR_PSEUDOSHEET_TITLE)) { aInternalName = STR_LAYOUT_TITLE; } - else if (aStyleName == OUString(SdResId(STR_PSEUDOSHEET_SUBTITLE))) + else if (aStyleName == SdResId(STR_PSEUDOSHEET_SUBTITLE)) { aInternalName = STR_LAYOUT_SUBTITLE; } - else if (aStyleName == OUString(SdResId(STR_PSEUDOSHEET_BACKGROUND))) + else if (aStyleName == SdResId(STR_PSEUDOSHEET_BACKGROUND)) { aInternalName = STR_LAYOUT_BACKGROUND; } - else if (aStyleName == OUString(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS))) + else if (aStyleName == SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS)) { aInternalName = STR_LAYOUT_BACKGROUNDOBJECTS; } - else if (aStyleName == OUString(SdResId(STR_PSEUDOSHEET_NOTES))) + else if (aStyleName == SdResId(STR_PSEUDOSHEET_NOTES)) { aInternalName = STR_LAYOUT_NOTES; } @@ -482,23 +482,23 @@ SdStyleSheet* SdStyleSheet::GetPseudoStyleSheet() const if (aStyleName == STR_LAYOUT_TITLE) { - aStyleName = OUString(SdResId(STR_PSEUDOSHEET_TITLE)); + aStyleName = SdResId(STR_PSEUDOSHEET_TITLE); } else if (aStyleName == STR_LAYOUT_SUBTITLE) { - aStyleName = OUString(SdResId(STR_PSEUDOSHEET_SUBTITLE)); + aStyleName = SdResId(STR_PSEUDOSHEET_SUBTITLE); } else if (aStyleName == STR_LAYOUT_BACKGROUND) { - aStyleName = OUString(SdResId(STR_PSEUDOSHEET_BACKGROUND)); + aStyleName = SdResId(STR_PSEUDOSHEET_BACKGROUND); } else if (aStyleName == STR_LAYOUT_BACKGROUNDOBJECTS) { - aStyleName = OUString(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS)); + aStyleName = SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS); } else if (aStyleName == STR_LAYOUT_NOTES) { - aStyleName = OUString(SdResId(STR_PSEUDOSHEET_NOTES)); + aStyleName = SdResId(STR_PSEUDOSHEET_NOTES); } else { @@ -507,7 +507,7 @@ SdStyleSheet* SdStyleSheet::GetPseudoStyleSheet() const if (nPos != -1) { OUString aNumStr(aStyleName.copy(aOutlineStr.getLength())); - aStyleName = OUString(SdResId(STR_PSEUDOSHEET_OUTLINE)); + aStyleName = SdResId(STR_PSEUDOSHEET_OUTLINE); aStyleName += aNumStr; } } @@ -1331,7 +1331,7 @@ void SdStyleSheet::BroadcastSdStyleSheetChange(SfxStyleSheetBase* pStyleSheet, if( (ePO >= PO_OUTLINE_1) && (ePO <= PO_OUTLINE_8) ) { - OUString sStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " "); + OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " "); for( sal_uInt16 n = (sal_uInt16)(ePO - PO_OUTLINE_1 + 2); n < 10; n++ ) { diff --git a/sd/source/core/undoanim.cxx b/sd/source/core/undoanim.cxx index dd9b68b00dee..bc7215554e21 100644 --- a/sd/source/core/undoanim.cxx +++ b/sd/source/core/undoanim.cxx @@ -105,7 +105,7 @@ void UndoAnimation::Redo() OUString UndoAnimation::GetComment() const { - return SdResId(STR_UNDO_ANIMATION).toString(); + return SdResId(STR_UNDO_ANIMATION); } struct UndoAnimationPathImpl @@ -180,7 +180,7 @@ void UndoAnimationPath::Redo() OUString UndoAnimationPath::GetComment() const { - return SdResId(STR_UNDO_ANIMATION).toString(); + return SdResId(STR_UNDO_ANIMATION); } struct UndoTransitionImpl @@ -270,7 +270,7 @@ void UndoTransition::Redo() OUString UndoTransition::GetComment() const { - return SdResId(STR_UNDO_SLIDE_PARAMS).toString(); + return SdResId(STR_UNDO_SLIDE_PARAMS); } } diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index 8a22c88e46bb..7e668a0ab53f 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -159,7 +159,7 @@ void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong n ErrorHandler::HandleError( ERRCODE_IO_GENERAL ); else { - ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SD_RESSTR(nId)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SdResId(nId)); aErrorBox->Execute(); } } diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx index 782e599861c6..d845494d1801 100644 --- a/sd/source/filter/html/htmlattr.cxx +++ b/sd/source/filter/html/htmlattr.cxx @@ -49,19 +49,19 @@ void SdHtmlAttrPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools: aTextRect.Bottom() = nHeight + aTextRect.Top(); rRenderContext.SetTextColor(m_aTextColor); - rRenderContext.DrawText(aTextRect, SD_RESSTR(STR_HTMLATTR_TEXT), DrawTextFlags::Center | DrawTextFlags::VCenter); + rRenderContext.DrawText(aTextRect, SdResId(STR_HTMLATTR_TEXT), DrawTextFlags::Center | DrawTextFlags::VCenter); aTextRect.Move(0,nHeight); rRenderContext.SetTextColor(m_aLinkColor); - rRenderContext.DrawText(aTextRect, SD_RESSTR(STR_HTMLATTR_LINK), DrawTextFlags::Center | DrawTextFlags::VCenter); + rRenderContext.DrawText(aTextRect, SdResId(STR_HTMLATTR_LINK), DrawTextFlags::Center | DrawTextFlags::VCenter); aTextRect.Move(0,nHeight); rRenderContext.SetTextColor(m_aALinkColor); - rRenderContext.DrawText(aTextRect, SD_RESSTR(STR_HTMLATTR_ALINK), DrawTextFlags::Center | DrawTextFlags::VCenter); + rRenderContext.DrawText(aTextRect, SdResId(STR_HTMLATTR_ALINK), DrawTextFlags::Center | DrawTextFlags::VCenter); aTextRect.Move(0,nHeight); rRenderContext.SetTextColor(m_aVLinkColor); - rRenderContext.DrawText(aTextRect, SD_RESSTR(STR_HTMLATTR_VLINK), DrawTextFlags::Center | DrawTextFlags::VCenter); + rRenderContext.DrawText(aTextRect, SdResId(STR_HTMLATTR_VLINK), DrawTextFlags::Center | DrawTextFlags::VCenter); } void SdHtmlAttrPreview::SetColors(Color& aBack, Color& aText, Color& aLink, diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 275b50fe5da0..06babc1c576b 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -95,7 +95,7 @@ using namespace ::com::sun::star::document; using namespace sdr::table; // get parameter from Itemset -#define RESTOHTML( res ) StringToHTMLString(SD_RESSTR(res)) +#define RESTOHTML( res ) StringToHTMLString(SdResId(res)) const char * const pButtonNames[] = { @@ -846,7 +846,7 @@ void HtmlExport::SetDocColors( SdPage* pPage ) void HtmlExport::InitProgress( sal_uInt16 nProgrCount ) { - mpProgress = new SfxProgress( mpDocSh, SD_RESSTR(STR_CREATE_PAGES), nProgrCount ); + mpProgress = new SfxProgress( mpDocSh, SdResId(STR_CREATE_PAGES), nProgrCount ); } void HtmlExport::ResetProgress() @@ -2417,7 +2417,7 @@ bool HtmlExport::CreateNavBarFrames() aStr.append("<center>\r\n"); // first page - aButton = SD_RESSTR(STR_HTMLEXP_FIRSTPAGE); + aButton = SdResId(STR_HTMLEXP_FIRSTPAGE); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName((nFile == 0 || mnSdPageCount == 1? BTN_FIRST_0:BTN_FIRST_1)), aButton); @@ -2429,7 +2429,7 @@ bool HtmlExport::CreateNavBarFrames() aStr.append("\r\n"); // to the previous page - aButton = SD_RESSTR(STR_PUBLISH_BACK); + aButton = SdResId(STR_PUBLISH_BACK); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName((nFile == 0 || mnSdPageCount == 1? BTN_PREV_0:BTN_PREV_1)), aButton); @@ -2441,7 +2441,7 @@ bool HtmlExport::CreateNavBarFrames() aStr.append("\r\n"); // to the next page - aButton = SD_RESSTR(STR_PUBLISH_NEXT); + aButton = SdResId(STR_PUBLISH_NEXT); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName((nFile ==2 || mnSdPageCount == 1? BTN_NEXT_0:BTN_NEXT_1)), aButton); @@ -2453,7 +2453,7 @@ bool HtmlExport::CreateNavBarFrames() aStr.append("\r\n"); // to the last page - aButton = SD_RESSTR(STR_HTMLEXP_LASTPAGE); + aButton = SdResId(STR_HTMLEXP_LASTPAGE); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName((nFile ==2 || mnSdPageCount == 1? BTN_LAST_0:BTN_LAST_1)), aButton); @@ -2472,7 +2472,7 @@ bool HtmlExport::CreateNavBarFrames() // content if (mbContentsPage) { - aButton = SD_RESSTR(STR_PUBLISH_OUTLINE); + aButton = SdResId(STR_PUBLISH_OUTLINE); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName(BTN_INDEX), aButton); @@ -2484,7 +2484,7 @@ bool HtmlExport::CreateNavBarFrames() // text mode if(mbImpress) { - aButton = SD_RESSTR(STR_HTMLEXP_SETTEXT); + aButton = SdResId(STR_HTMLEXP_SETTEXT); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName(BTN_TEXT), aButton); @@ -2515,7 +2515,7 @@ bool HtmlExport::CreateNavBarFrames() aStr.append("</title>\r\n</head>\r\n"); aStr.append(CreateBodyTag()); - aButton = SD_RESSTR(STR_HTMLEXP_OUTLINE); + aButton = SdResId(STR_HTMLEXP_OUTLINE); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName(BTN_MORE), aButton); @@ -2538,7 +2538,7 @@ bool HtmlExport::CreateNavBarFrames() aStr.append("</title>\r\n</head>\r\n"); aStr.append(CreateBodyTag()); - aButton = SD_RESSTR(STR_HTMLEXP_NOOUTLINE); + aButton = SdResId(STR_HTMLEXP_NOOUTLINE); if(mnButtonThema != -1) aButton = CreateImage(GetButtonName(BTN_LESS), aButton); @@ -2559,19 +2559,19 @@ bool HtmlExport::CreateNavBarFrames() OUString HtmlExport::CreateNavBar( sal_uInt16 nSdPage, bool bIsText ) const { // prepare button bar - OUString aStrNavFirst(SD_RESSTR(STR_HTMLEXP_FIRSTPAGE)); - OUString aStrNavPrev(SD_RESSTR(STR_PUBLISH_BACK)); - OUString aStrNavNext(SD_RESSTR(STR_PUBLISH_NEXT)); - OUString aStrNavLast(SD_RESSTR(STR_HTMLEXP_LASTPAGE)); - OUString aStrNavContent(SD_RESSTR(STR_PUBLISH_OUTLINE)); + OUString aStrNavFirst(SdResId(STR_HTMLEXP_FIRSTPAGE)); + OUString aStrNavPrev(SdResId(STR_PUBLISH_BACK)); + OUString aStrNavNext(SdResId(STR_PUBLISH_NEXT)); + OUString aStrNavLast(SdResId(STR_HTMLEXP_LASTPAGE)); + OUString aStrNavContent(SdResId(STR_PUBLISH_OUTLINE)); OUString aStrNavText; if( bIsText ) { - aStrNavText = SD_RESSTR(STR_HTMLEXP_SETGRAPHIC); + aStrNavText = SdResId(STR_HTMLEXP_SETGRAPHIC); } else { - aStrNavText = SD_RESSTR(STR_HTMLEXP_SETTEXT); + aStrNavText = SdResId(STR_HTMLEXP_SETTEXT); } if(!bIsText && mnButtonThema != -1) @@ -3101,7 +3101,7 @@ bool HtmlExport::checkForExistingFiles() if( pResMgr ) { ResId aResId( 4077, *pResMgr ); - OUString aMsg( aResId.toString() ); + OUString aMsg( aResId ); OUString aSystemPath; osl::FileBase::getSystemPathFromFileURL( maExportPath, aSystemPath ); @@ -3232,7 +3232,7 @@ bool HtmlErrorContext::GetString( sal_uInt32, OUString& rCtxStr ) if( mnResId == 0 ) return false; - rCtxStr = SdResId( mnResId ).toString(); + rCtxStr = SdResId(mnResId); rCtxStr = rCtxStr.replaceAll( "$(URL1)", maURL1 ); rCtxStr = rCtxStr.replaceAll( "$(URL2)", maURL2 ); diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 9526ab2bdf4c..7b269d760061 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -1153,7 +1153,7 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl, Button*, void) if (iter != m_aDesignList.end()) { - ScopedVclPtrInstance<MessageDialog> aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME), + ScopedVclPtrInstance<MessageDialog> aErrorBox(this, SdResId(STR_PUBDLG_SAMENAME), VclMessageType::Error, VclButtonsType::YesNo); bRetry = aErrorBox->Execute() == RET_NO; diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 0101a5243034..be701d617712 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -246,8 +246,8 @@ bool ImplSdPPTImport::Import() ((EditEngine&)rOutl.GetEditEngine()).SetControlWord( nControlWord ); SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin(); - mnBackgroundLayerID = rAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRND ) ); - mnBackgroundObjectsLayerID = rAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRNDOBJ ) ); + mnBackgroundLayerID = rAdmin.GetLayerID( SdResId( STR_LAYER_BCKGRND ) ); + mnBackgroundObjectsLayerID = rAdmin.GetLayerID( SdResId( STR_LAYER_BCKGRNDOBJ ) ); ::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh(); if ( pDocShell ) @@ -564,7 +564,7 @@ bool ImplSdPPTImport::Import() if (!utl::ConfigManager::IsAvoidConfig()) { xStbMgr.reset(new SfxProgress(pDocShell, - SD_RESSTR( STR_POWERPOINT_IMPORT), + SdResId( STR_POWERPOINT_IMPORT), m_pMasterPages->size() + m_pSlidePages->size() + m_pNotePages->size())); } @@ -598,7 +598,7 @@ bool ImplSdPPTImport::Import() if ( nMasterNum == 1 ) { // standardsheet - pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME), SD_STYLE_FAMILY_GRAPHICS )); + pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_STANDARD_STYLESHEET_NAME), SD_STYLE_FAMILY_GRAPHICS )); if ( pSheet ) { SfxItemSet& rItemSet = pSheet->GetItemSet(); @@ -611,7 +611,7 @@ bool ImplSdPPTImport::Import() } // PSEUDO - pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SD_RESSTR(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SD_STYLE_FAMILY_PSEUDO )); + pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SD_STYLE_FAMILY_PSEUDO )); if ( pSheet ) { SfxItemSet& rItemSet = pSheet->GetItemSet(); @@ -625,12 +625,12 @@ bool ImplSdPPTImport::Import() // create layoutstylesheets, set layoutname and stylesheet // (only on standard and not pages) - OUString aLayoutName( SD_RESSTR( STR_LAYOUT_DEFAULT_NAME ) ); + OUString aLayoutName( SdResId( STR_LAYOUT_DEFAULT_NAME ) ); if ( nMasterNum > 2 ) { if ( ePgKind == PageKind::Standard ) { // standard page: create new presentation layout - aLayoutName = SD_RESSTR( STR_LAYOUT_DEFAULT_TITLE_NAME ); + aLayoutName = SdResId( STR_LAYOUT_DEFAULT_TITLE_NAME ); aLayoutName += OUString::number( (sal_Int32)( ( nMasterNum + 1 ) / 2 - 1 ) ); static_cast<SdStyleSheetPool*>( mpDoc->GetStyleSheetPool() )->CreateLayoutStyleSheets( aLayoutName ); } @@ -2279,10 +2279,10 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj case PRESOBJ_SLIDENUMBER : case PRESOBJ_FOOTER : case PRESOBJ_HEADER : - pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SD_RESSTR(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SD_STYLE_FAMILY_PSEUDO )); + pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS), SD_STYLE_FAMILY_PSEUDO )); break; default : - pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME), SD_STYLE_FAMILY_GRAPHICS )); + pSheet = static_cast<SfxStyleSheet*>(mpDoc->GetStyleSheetPool()->Find(SdResId(STR_STANDARD_STYLESHEET_NAME), SD_STYLE_FAMILY_GRAPHICS )); } } break; diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index c4df696242b2..b84854e68b94 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -523,7 +523,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) { sal_Int32 nProgressRange(1000000); sal_Int32 nProgressCurrent(0); - OUString aMsg(SD_RESSTR(STR_LOAD_DOC)); + OUString aMsg(SdResId(STR_LOAD_DOC)); mxStatusIndicator->start(aMsg, nProgressRange); // set ProgressRange @@ -892,7 +892,7 @@ bool SdXMLFilter::Export() { sal_Int32 nProgressRange(1000000); sal_Int32 nProgressCurrent(0); - OUString aMsg(SD_RESSTR(STR_SAVE_DOC)); + OUString aMsg(SdResId(STR_SAVE_DOC)); mxStatusIndicator->start(aMsg, nProgressRange); // set ProgressRange diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 6a597c6d95ce..d23f72b82d94 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -545,26 +545,26 @@ OUString AccessibleDrawDocumentView::CreateAccessibleName() { SolarMutexGuard aGuard; - sName = SD_RESSTR(SID_SD_A11Y_I_DRAWVIEW_N); + sName = SdResId(SID_SD_A11Y_I_DRAWVIEW_N); } else { SolarMutexGuard aGuard; - sName = SD_RESSTR(SID_SD_A11Y_D_DRAWVIEW_N); + sName = SdResId(SID_SD_A11Y_D_DRAWVIEW_N); } } else if ( sFirstService == "com.sun.star.presentation.NotesView" ) { SolarMutexGuard aGuard; - sName = SD_RESSTR(SID_SD_A11Y_I_NOTESVIEW_N); + sName = SdResId(SID_SD_A11Y_I_NOTESVIEW_N); } else if ( sFirstService == "com.sun.star.presentation.HandoutView" ) { SolarMutexGuard aGuard; - sName = SD_RESSTR(SID_SD_A11Y_I_HANDOUTVIEW_N); + sName = SdResId(SID_SD_A11Y_I_HANDOUTVIEW_N); } else { @@ -597,26 +597,26 @@ OUString { SolarMutexGuard aGuard; - sDescription = SD_RESSTR(SID_SD_A11Y_I_DRAWVIEW_D); + sDescription = SdResId(SID_SD_A11Y_I_DRAWVIEW_D); } else { SolarMutexGuard aGuard; - sDescription = SD_RESSTR(SID_SD_A11Y_D_DRAWVIEW_D); + sDescription = SdResId(SID_SD_A11Y_D_DRAWVIEW_D); } } else if ( sFirstService == "com.sun.star.presentation.NotesView" ) { SolarMutexGuard aGuard; - sDescription = SD_RESSTR(SID_SD_A11Y_I_NOTESVIEW_D); + sDescription = SdResId(SID_SD_A11Y_I_NOTESVIEW_D); } else if ( sFirstService == "com.sun.star.presentation.HandoutView" ) { SolarMutexGuard aGuard; - sDescription = SD_RESSTR(SID_SD_A11Y_I_HANDOUTVIEW_D); + sDescription = SdResId(SID_SD_A11Y_I_HANDOUTVIEW_D); } else { diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx index 0d627e3b99fd..4b77cce1ef73 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx @@ -243,7 +243,7 @@ OUString { SolarMutexGuard aGuard; - return SD_RESSTR(SID_SD_A11Y_I_OUTLINEVIEW_N); + return SdResId(SID_SD_A11Y_I_OUTLINEVIEW_N); } /** Create a description for this view. Use the model's description or URL @@ -254,7 +254,7 @@ OUString { SolarMutexGuard aGuard; - return SD_RESSTR(SID_SD_A11Y_I_OUTLINEVIEW_D); + return SdResId(SID_SD_A11Y_I_OUTLINEVIEW_D); } void AccessibleOutlineView::UpdateChildren() diff --git a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx index 0cfc2e52f120..c06f1e4de365 100644 --- a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx +++ b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx @@ -88,17 +88,17 @@ OUString { case PRESENTATION_OLE: aDG.Initialize ("PresentationOLEShape"); - //SVX_RESSTR(RID_SVXSTR_A11Y_ST_RECTANGLE)); + //SvxResId(RID_SVXSTR_A11Y_ST_RECTANGLE)); aDG.AddProperty ("CLSID" ,DescriptionGenerator::PropertyType::String); break; case PRESENTATION_CHART: aDG.Initialize ("PresentationChartShape"); - //SVX_RESSTR(RID_SVXSTR_A11Y_ST_RECTANGLE)); + //SvxResId(RID_SVXSTR_A11Y_ST_RECTANGLE)); aDG.AddProperty ( "CLSID" , DescriptionGenerator::PropertyType::String); break; case PRESENTATION_TABLE: aDG.Initialize ("PresentationTableShape"); - //SVX_RESSTR(RID_SVXSTR_A11Y_ST_RECTANGLE)); + //SvxResId(RID_SVXSTR_A11Y_ST_RECTANGLE)); aDG.AddProperty ("CLSID" , DescriptionGenerator::PropertyType::String); break; default: diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx index 6f2c5853b352..de850ce3564d 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx @@ -163,7 +163,7 @@ sal_Int16 SAL_CALL AccessibleSlideSorterObject::getAccessibleRole() OUString SAL_CALL AccessibleSlideSorterObject::getAccessibleDescription() { ThrowIfDisposed(); - return SD_RESSTR(STR_PAGE); + return SdResId(STR_PAGE); } OUString SAL_CALL AccessibleSlideSorterObject::getAccessibleName() diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index c3ac9d6aa3cf..87341404435d 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -261,7 +261,7 @@ OUString SAL_CALL AccessibleSlideSorterView::getAccessibleDescription() ThrowIfDisposed(); SolarMutexGuard aGuard; - return SD_RESSTR(SID_SD_A11Y_I_SLIDEVIEW_D); + return SdResId(SID_SD_A11Y_I_SLIDEVIEW_D); } OUString SAL_CALL AccessibleSlideSorterView::getAccessibleName() @@ -269,7 +269,7 @@ OUString SAL_CALL AccessibleSlideSorterView::getAccessibleName() ThrowIfDisposed(); SolarMutexGuard aGuard; - return SD_RESSTR(SID_SD_A11Y_I_SLIDEVIEW_N); + return SdResId(SID_SD_A11Y_I_SLIDEVIEW_N); } Reference<XAccessibleRelationSet> SAL_CALL diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 564963f923af..115abbb07053 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -900,7 +900,7 @@ FontStylePropertyBox::FontStylePropertyBox( sal_Int32 nControlType, vcl::Window* , maModifyHdl( rModifyHdl ) { mpEdit.set( VclPtr<Edit>::Create( pParent, WB_TABSTOP|WB_IGNORETAB|WB_NOBORDER|WB_READONLY) ); - mpEdit->SetText( SD_RESSTR(STR_CUSTOMANIMATION_SAMPLE) ); + mpEdit->SetText( SdResId(STR_CUSTOMANIMATION_SAMPLE) ); mpMenu = maBuilder.get_menu("menu"); mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpEdit, mpMenu ); @@ -1455,14 +1455,14 @@ void CustomAnimationEffectTabPage::fillSoundListBox() GalleryExplorer::FillObjList( GALLERY_THEME_SOUNDS, maSoundList ); GalleryExplorer::FillObjList( GALLERY_THEME_USERSOUNDS, maSoundList ); - mpLBSound->InsertEntry( SD_RESSTR(STR_CUSTOMANIMATION_NO_SOUND) ); - mpLBSound->InsertEntry( SD_RESSTR(STR_CUSTOMANIMATION_STOP_PREVIOUS_SOUND) ); + mpLBSound->InsertEntry( SdResId(STR_CUSTOMANIMATION_NO_SOUND) ); + mpLBSound->InsertEntry( SdResId(STR_CUSTOMANIMATION_STOP_PREVIOUS_SOUND) ); for(const OUString & rString : maSoundList) { INetURLObject aURL( rString ); mpLBSound->InsertEntry( aURL.GetBase() ); } - mpLBSound->InsertEntry( SD_RESSTR(STR_CUSTOMANIMATION_BROWSE_SOUND) ); + mpLBSound->InsertEntry( SdResId(STR_CUSTOMANIMATION_BROWSE_SOUND) ); } void CustomAnimationEffectTabPage::clearSoundListBox() @@ -1516,7 +1516,7 @@ void CustomAnimationEffectTabPage::openSoundFileDialog() } else { - OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE)); + OUString aStrWarning(SdResId(STR_WARNING_NOSOUNDFILE)); aStrWarning = aStrWarning.replaceFirst("%", aFile); ScopedVclPtrInstance< WarningBox > aWarningBox( nullptr, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ); aWarningBox->SetModalInputMode (true); diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 96bf05f32ccd..fa7aa1281bbd 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -231,13 +231,13 @@ CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDes switch(mpEffect->getPresetClass()) { case EffectPresetClass::ENTRANCE: - msEffectName = SD_RESSTR(STR_CUSTOMANIMATION_ENTRANCE); break; + msEffectName = SdResId(STR_CUSTOMANIMATION_ENTRANCE); break; case EffectPresetClass::EXIT: - msEffectName = SD_RESSTR(STR_CUSTOMANIMATION_EXIT); break; + msEffectName = SdResId(STR_CUSTOMANIMATION_EXIT); break; case EffectPresetClass::EMPHASIS: - msEffectName = SD_RESSTR(STR_CUSTOMANIMATION_EMPHASIS); break; + msEffectName = SdResId(STR_CUSTOMANIMATION_EMPHASIS); break; case EffectPresetClass::MOTIONPATH: - msEffectName = SD_RESSTR(STR_CUSTOMANIMATION_MOTION_PATHS); break; + msEffectName = SdResId(STR_CUSTOMANIMATION_MOTION_PATHS); break; } msEffectName = msEffectName.replaceFirst( "%1" , mpCustomAnimationPresets->getUINameForPresetId(mpEffect->getPresetId())); } @@ -635,7 +635,7 @@ void CustomAnimationList::update() { SvTreeListEntry* pLBoxEntry = new CustomAnimationListEntry; pLBoxEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); - OUString aDescription = SD_RESSTR(STR_CUSTOMANIMATION_TRIGGER); + OUString aDescription = SdResId(STR_CUSTOMANIMATION_TRIGGER); aDescription += ": "; aDescription += getShapeDescription( xShape, false ); pLBoxEntry->AddItem(o3tl::make_unique<CustomAnimationTriggerEntryItem>(aDescription)); @@ -960,7 +960,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const ::tool aRect.Right() -= aOffset.X(); aRect.Bottom() -= aOffset.Y(); - rRenderContext.DrawText(aRect, SD_RESSTR(STR_CUSTOMANIMATION_LIST_HELPTEXT), + rRenderContext.DrawText(aRect, SdResId(STR_CUSTOMANIMATION_LIST_HELPTEXT), DrawTextFlags::MultiLine | DrawTextFlags::WordBreak | DrawTextFlags::Center | DrawTextFlags::VCenter ); rRenderContext.SetTextColor(aOldColor); diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index e089514c0133..715bdc97b327 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -109,7 +109,7 @@ namespace sd { void fillRepeatComboBox( ListBox* pBox ) { - OUString aNone( SD_RESSTR( STR_CUSTOMANIMATION_REPEAT_NONE ) ); + OUString aNone( SdResId( STR_CUSTOMANIMATION_REPEAT_NONE ) ); pBox->InsertEntry(aNone); pBox->InsertEntry(OUString::number(2)); pBox->InsertEntry(OUString::number(3)); @@ -117,10 +117,10 @@ void fillRepeatComboBox( ListBox* pBox ) pBox->InsertEntry(OUString::number(5)); pBox->InsertEntry(OUString::number(10)); - OUString aUntilClick( SD_RESSTR( STR_CUSTOMANIMATION_REPEAT_UNTIL_NEXT_CLICK ) ); + OUString aUntilClick( SdResId( STR_CUSTOMANIMATION_REPEAT_UNTIL_NEXT_CLICK ) ); pBox->InsertEntry(aUntilClick); - OUString aEndOfSlide( SD_RESSTR( STR_CUSTOMANIMATION_REPEAT_UNTIL_END_OF_SLIDE ) ); + OUString aEndOfSlide( SdResId( STR_CUSTOMANIMATION_REPEAT_UNTIL_END_OF_SLIDE ) ); pBox->InsertEntry(aEndOfSlide); } @@ -441,55 +441,55 @@ OUString getPropertyName( sal_Int32 nPropertyType ) switch( nPropertyType ) { case nPropertyTypeDirection: - return SD_RESSTR(STR_CUSTOMANIMATION_DIRECTION_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_DIRECTION_PROPERTY); case nPropertyTypeSpokes: - return SD_RESSTR(STR_CUSTOMANIMATION_SPOKES_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_SPOKES_PROPERTY); case nPropertyTypeFirstColor: - return SD_RESSTR(STR_CUSTOMANIMATION_FIRST_COLOR_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_FIRST_COLOR_PROPERTY); case nPropertyTypeSecondColor: - return SD_RESSTR(STR_CUSTOMANIMATION_SECOND_COLOR_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_SECOND_COLOR_PROPERTY); case nPropertyTypeZoom: - return SD_RESSTR(STR_CUSTOMANIMATION_ZOOM_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_ZOOM_PROPERTY); case nPropertyTypeFillColor: - return SD_RESSTR(STR_CUSTOMANIMATION_FILL_COLOR_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_FILL_COLOR_PROPERTY); case nPropertyTypeColorStyle: - return SD_RESSTR(STR_CUSTOMANIMATION_STYLE_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_STYLE_PROPERTY); case nPropertyTypeFont: - return SD_RESSTR(STR_CUSTOMANIMATION_FONT_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_FONT_PROPERTY); case nPropertyTypeCharHeight: - return SD_RESSTR(STR_CUSTOMANIMATION_SIZE_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_SIZE_PROPERTY); case nPropertyTypeCharColor: - return SD_RESSTR(STR_CUSTOMANIMATION_FONT_COLOR_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_FONT_COLOR_PROPERTY); case nPropertyTypeCharHeightStyle: - return SD_RESSTR(STR_CUSTOMANIMATION_FONT_SIZE_STYLE_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_FONT_SIZE_STYLE_PROPERTY); case nPropertyTypeCharDecoration: - return SD_RESSTR(STR_CUSTOMANIMATION_FONT_STYLE_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_FONT_STYLE_PROPERTY); case nPropertyTypeLineColor: - return SD_RESSTR(STR_CUSTOMANIMATION_LINE_COLOR_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_LINE_COLOR_PROPERTY); case nPropertyTypeRotate: - return SD_RESSTR(STR_CUSTOMANIMATION_AMOUNT_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_AMOUNT_PROPERTY); case nPropertyTypeColor: - return SD_RESSTR(STR_CUSTOMANIMATION_COLOR_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_COLOR_PROPERTY); case nPropertyTypeTransparency: - return SD_RESSTR(STR_CUSTOMANIMATION_AMOUNT_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_AMOUNT_PROPERTY); case nPropertyTypeScale: - return SD_RESSTR(STR_CUSTOMANIMATION_SCALE_PROPERTY); + return SdResId(STR_CUSTOMANIMATION_SCALE_PROPERTY); } return OUString(); @@ -2210,7 +2210,7 @@ sal_uInt32 CustomAnimationPane::fillAnimationLB( bool bHasText ) if(nPosition == mnMotionPathPos) { - OUString sMotionPathLabel( SD_RESSTR( STR_CUSTOMANIMATION_USERPATH ) ); + OUString sMotionPathLabel( SdResId( STR_CUSTOMANIMATION_USERPATH ) ); mpLBAnimation->InsertCategory( sMotionPathLabel ); mnCurvePathPos = mpLBAnimation->InsertEntry( sdr::GetResourceString(STR_ObjNameSingulCOMBLINE) ); mnPolygonPathPos = mpLBAnimation->InsertEntry( sdr::GetResourceString(STR_ObjNameSingulPOLY) ); diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 387b8172db66..c6aef5197813 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -462,7 +462,7 @@ void SlideTransitionPane::Initialize(SdDrawDocument* pDoc) // dummy list box of slide transitions for startup. mpVS_TRANSITION_ICONS->InsertItem( 0, Image( BitmapEx( "sd/cmd/transition-none.png" ) ), - SD_RESSTR( STR_SLIDETRANSITION_NONE ), + SdResId( STR_SLIDETRANSITION_NONE ), VALUESET_APPEND, /* show legend */ true ); mpVS_TRANSITION_ICONS->RecalculateItemSizes(); @@ -763,7 +763,7 @@ void SlideTransitionPane::openSoundFileDialog() } else { - OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE)); + OUString aStrWarning(SdResId(STR_WARNING_NOSOUNDFILE)); aStrWarning = aStrWarning.replaceFirst("%", aFile); ScopedVclPtrInstance< WarningBox > aWarningBox( nullptr, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ); aWarningBox->SetModalInputMode (true); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 3701957bc67a..9a0e7f0420f5 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -478,7 +478,7 @@ void AnnotationManagerImpl::InsertAnnotation(const OUString& rText) if( pPage ) { if( mpDoc->IsUndoEnabled() ) - mpDoc->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_INSERT ) ); + mpDoc->BegUndo( SdResId( STR_ANNOTATION_UNDO_INSERT ) ); // find free space for new annotation int y = 0, x = 0; @@ -600,10 +600,10 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) SdDrawDocument::SetCalcFieldValueHdl( pOutliner.get() ); pOutliner->SetUpdateMode( true ); - OUString aStr(SD_RESSTR(STR_ANNOTATION_REPLY)); + OUString aStr(SdResId(STR_ANNOTATION_REPLY)); OUString sAuthor( xAnnotation->getAuthor() ); if( sAuthor.isEmpty() ) - sAuthor = SD_RESSTR( STR_ANNOTATION_NOAUTHOR ); + sAuthor = SdResId( STR_ANNOTATION_NOAUTHOR ); aStr = aStr.replaceFirst("%1", sAuthor); @@ -671,7 +671,7 @@ void AnnotationManagerImpl::DeleteAnnotation( const Reference< XAnnotation >& xA if( xAnnotation.is() && pPage ) { if( mpDoc->IsUndoEnabled() ) - mpDoc->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_DELETE ) ); + mpDoc->BegUndo( SdResId( STR_ANNOTATION_UNDO_DELETE ) ); pPage->removeAnnotation( xAnnotation ); @@ -685,7 +685,7 @@ void AnnotationManagerImpl::DeleteAnnotation( const Reference< XAnnotation >& xA void AnnotationManagerImpl::DeleteAnnotationsByAuthor( const OUString& sAuthor ) { if( mpDoc->IsUndoEnabled() ) - mpDoc->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_DELETE ) ); + mpDoc->BegUndo( SdResId( STR_ANNOTATION_UNDO_DELETE ) ); SdPage* pPage = nullptr; do @@ -715,7 +715,7 @@ void AnnotationManagerImpl::DeleteAnnotationsByAuthor( const OUString& sAuthor ) void AnnotationManagerImpl::DeleteAllAnnotations() { if( mpDoc->IsUndoEnabled() ) - mpDoc->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_DELETE ) ); + mpDoc->BegUndo( SdResId( STR_ANNOTATION_UNDO_DELETE ) ); SdPage* pPage = nullptr; do @@ -887,7 +887,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) // Pop up question box that asks the user whether to wrap around. // The dialog is made modal with respect to the whole application. - ScopedVclPtrInstance< QueryBox > aQuestionBox( nullptr, (WB_YES_NO | WB_DEF_YES), SD_RESSTR(nStringId)); + ScopedVclPtrInstance< QueryBox > aQuestionBox( nullptr, (WB_YES_NO | WB_DEF_YES), SdResId(nStringId)); aQuestionBox->SetImage( QueryBox::GetStandardImage() ); if (aQuestionBox->Execute() != RET_YES) break; @@ -1145,7 +1145,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnno OUString aStr(pMenu->GetItemText(pMenu->GetItemId("deleteby"))); OUString aReplace( sAuthor ); if( aReplace.isEmpty() ) - aReplace = SD_RESSTR( STR_ANNOTATION_NOAUTHOR ); + aReplace = SdResId( STR_ANNOTATION_NOAUTHOR ); aStr = aStr.replaceFirst("%1", aReplace); pMenu->SetItemText(pMenu->GetItemId("deleteby"), aStr); pMenu->EnableItem(pMenu->GetItemId("reply"), (sAuthor != sCurrentAuthor) && !bReadOnly); diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index 78e53f9eff68..9006600efde4 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -365,7 +365,7 @@ void AnnotationTag::Move( int nDX, int nDY ) if( mxAnnotation.is() ) { if( mrManager.GetDoc()->IsUndoEnabled() ) - mrManager.GetDoc()->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_MOVE ) ); + mrManager.GetDoc()->BegUndo( SdResId( STR_ANNOTATION_UNDO_MOVE ) ); RealPoint2D aPosition( mxAnnotation->getPosition() ); aPosition.X += (double)nDX / 100.0; diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 18bca50855a1..e3c30d990109 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -611,7 +611,7 @@ void AnnotationWindow::Deactivate() if( pOPO ) { if( mpDoc->IsUndoEnabled() ) - mpDoc->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_EDIT ) ); + mpDoc->BegUndo( SdResId( STR_ANNOTATION_UNDO_EDIT ) ); pTextApi->SetText( *pOPO ); delete pOPO; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 53d0750ede7b..094becb271fc 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -232,7 +232,7 @@ void SdModule::Execute(SfxRequest& rReq) } else { - ScopedVclPtrInstance<MessageDialog>(nullptr, SD_RESSTR(STR_CANT_PERFORM_IN_LIVEMODE))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SdResId(STR_CANT_PERFORM_IN_LIVEMODE))->Execute(); const SfxLinkItem* pLinkItem = rReq.GetArg<SfxLinkItem>(SID_DONELINK); if( pLinkItem ) diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index c19ae34d1919..4ddeb6ff5eec 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -245,7 +245,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void) aRepresentation = pDoc->CreatePageNumValue((sal_uInt16)nPgNum); } else - aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_NUMBER).toString(); + aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_NUMBER); pInfo->SetRepresentation( aRepresentation ); } @@ -275,8 +275,8 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void) { DocumentType eDocType = pDoc ? pDoc->GetDocumentType() : DocumentType::Impress; aRepresentation = ( ( eDocType == DocumentType::Impress ) - ? SdResId(STR_FIELD_PLACEHOLDER_SLIDENAME).toString() - : SdResId(STR_FIELD_PLACEHOLDER_PAGENAME).toString() ); + ? SdResId(STR_FIELD_PLACEHOLDER_SLIDENAME) + : SdResId(STR_FIELD_PLACEHOLDER_PAGENAME) ); } pInfo->SetRepresentation( aRepresentation ); @@ -315,7 +315,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void) if( nPageCount > 0 ) aRepresentation = pDoc->CreatePageNumValue(nPageCount); else - aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_COUNT).toString(); + aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_COUNT); pInfo->SetRepresentation( aRepresentation ); } @@ -361,11 +361,11 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void) if( (pPage == nullptr) || bMasterView ) { if( bHeaderField ) - aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_HEADER).toString(); + aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_HEADER); else if (bFooterField ) - aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_FOOTER).toString(); + aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_FOOTER); else if (bDateTimeField ) - aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_DATETIME).toString(); + aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_DATETIME); } else { @@ -806,14 +806,14 @@ SfxStyleFamilies* SdModule::CreateStyleFamilies() SfxStyleFamilies *pStyleFamilies = new SfxStyleFamilies; pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para, - SD_RESSTR(STR_GRAPHICS_STYLE_FAMILY), + SdResId(STR_GRAPHICS_STYLE_FAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_GRAPHICS)), - SdResId(RID_GRAPHICSTYLEFAMILY))); + ResId(RID_GRAPHICSTYLEFAMILY, *SD_MOD()->GetResMgr()))); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Pseudo, - SD_RESSTR(STR_PRESENTATIONS_STYLE_FAMILY), + SdResId(STR_PRESENTATIONS_STYLE_FAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_PRESENTATIONS)), - SdResId(RID_PRESENTATIONSTYLEFAMILY))); + ResId(RID_PRESENTATIONSTYLEFAMILY, *SD_MOD()->GetResMgr()))); return pStyleFamilies; } diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx index 02c7ff23c0c6..0f0efa786622 100644 --- a/sd/source/ui/app/sdpopup.cxx +++ b/sd/source/ui/app/sdpopup.cxx @@ -51,8 +51,8 @@ void SdFieldPopup::Fill( LanguageType eLanguage ) { sal_uInt16 nID = 1; MenuItemBits nStyle = MenuItemBits::RADIOCHECK | MenuItemBits::AUTOCHECK; - InsertItem( nID++, SD_RESSTR( STR_FIX ), nStyle ); - InsertItem( nID++, SD_RESSTR( STR_VAR ), nStyle ); + InsertItem( nID++, SdResId( STR_FIX ), nStyle ); + InsertItem( nID++, SdResId( STR_VAR ), nStyle ); InsertSeparator(); if( dynamic_cast< const SvxDateField *>( pField ) != nullptr ) @@ -67,8 +67,8 @@ void SdFieldPopup::Fill( LanguageType eLanguage ) //SVXDATEFORMAT_APPDEFAULT, // is not used //SVXDATEFORMAT_SYSTEM, // is not used - InsertItem( nID++, SD_RESSTR( STR_STANDARD_SMALL ), nStyle ); - InsertItem( nID++, SD_RESSTR( STR_STANDARD_BIG ), nStyle ); + InsertItem( nID++, SdResId( STR_STANDARD_SMALL ), nStyle ); + InsertItem( nID++, SdResId( STR_STANDARD_BIG ), nStyle ); SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); aDateField.SetFormat( SVXDATEFORMAT_A ); // 13.02.96 @@ -99,7 +99,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage ) //SVXTIMEFORMAT_APPDEFAULT, // is not used //SVXTIMEFORMAT_SYSTEM, // is not used - InsertItem( nID++, SD_RESSTR( STR_STANDARD_NORMAL ), nStyle ); + InsertItem( nID++, SdResId( STR_STANDARD_NORMAL ), nStyle ); SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); aTimeField.SetFormat( SVXTIMEFORMAT_24_HM ); // 13:49 @@ -131,10 +131,10 @@ void SdFieldPopup::Fill( LanguageType eLanguage ) else CheckItem( 2 ); - InsertItem( nID++, SD_RESSTR( STR_FILEFORMAT_NAME_EXT ), nStyle ); - InsertItem( nID++, SD_RESSTR( STR_FILEFORMAT_FULLPATH ), nStyle ); - InsertItem( nID++, SD_RESSTR( STR_FILEFORMAT_PATH ), nStyle ); - InsertItem( nID++, SD_RESSTR( STR_FILEFORMAT_NAME ), nStyle ); + InsertItem( nID++, SdResId( STR_FILEFORMAT_NAME_EXT ), nStyle ); + InsertItem( nID++, SdResId( STR_FILEFORMAT_FULLPATH ), nStyle ); + InsertItem( nID++, SdResId( STR_FILEFORMAT_PATH ), nStyle ); + InsertItem( nID++, SdResId( STR_FILEFORMAT_NAME ), nStyle ); CheckItem( (sal_uInt16) ( pFileField->GetFormat() ) + 3 ); } diff --git a/sd/source/ui/app/sdresid.cxx b/sd/source/ui/app/sdresid.cxx deleted file mode 100644 index c91e982a0b7c..000000000000 --- a/sd/source/ui/app/sdresid.cxx +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "sdmod.hxx" -#include "sdresid.hxx" -#include <sal/types.h> - -// Ctor -SdResId::SdResId(sal_uInt16 nId) : - ResId(nId, *SD_MOD()->GetResMgr()) -{ -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx index ea5db97a6d64..685d39d6d889 100644 --- a/sd/source/ui/app/tmplctrl.cxx +++ b/sd/source/ui/app/tmplctrl.cxx @@ -66,7 +66,7 @@ SdTemplateControl::SdTemplateControl( sal_uInt16 _nSlotId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ) { - GetStatusBar().SetQuickHelpText(GetId(), SD_RESSTR(STR_STATUSBAR_MASTERPAGE)); + GetStatusBar().SetQuickHelpText(GetId(), SdResId(STR_STATUSBAR_MASTERPAGE)); } SdTemplateControl::~SdTemplateControl() diff --git a/sd/source/ui/controller/displaymodecontroller.cxx b/sd/source/ui/controller/displaymodecontroller.cxx index 725e2332a2b0..29748337eca4 100644 --- a/sd/source/ui/controller/displaymodecontroller.cxx +++ b/sd/source/ui/controller/displaymodecontroller.cxx @@ -119,7 +119,7 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info* pIn Size aLayoutItemSize; for( ; pInfo->mnId; pInfo++ ) { - OUString aText( SD_RESSTR( pInfo->mnStrResId ) ); + OUString aText( SdResId( pInfo->mnStrResId ) ); BitmapEx aBmp(OUString::createFromAscii(pInfo->msBmpResId)); pValue->InsertItem(pInfo->mnId, Image(aBmp), aText); @@ -140,8 +140,8 @@ DisplayModeToolbarMenu::DisplayModeToolbarMenu( DisplayModeController& rControll { const sal_Int32 LAYOUT_BORDER_PIX = 7; - OUString aTitle1( SD_RESSTR( STR_DISPLAYMODE_EDITMODES ) ); - OUString aTitle2( SD_RESSTR( STR_DISPLAYMODE_MASTERMODES ) ); + OUString aTitle1( SdResId( STR_DISPLAYMODE_EDITMODES ) ); + OUString aTitle2( SdResId( STR_DISPLAYMODE_MASTERMODES ) ); SetSelectHdl( LINK( this, DisplayModeToolbarMenu, SelectToolbarMenuHdl ) ); diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 759c9eacd8da..1f61a4c1f07d 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -138,7 +138,7 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layo Size aLayoutItemSize; for( ; pInfo->mnStrResId; pInfo++ ) { - OUString aText( SD_RESSTR( pInfo->mnStrResId ) ); + OUString aText( SdResId( pInfo->mnStrResId ) ); BitmapEx aBmp(OUString::createFromAscii(pInfo->msBmpResId)); pValue->InsertItem(static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, @@ -176,8 +176,8 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, vcl::W const sal_Int32 LAYOUT_BORDER_PIX = 7; - OUString aTitle1( SD_RESSTR( STR_GLUE_ESCDIR_HORZ ) ); - OUString aTitle2( SD_RESSTR( STR_GLUE_ESCDIR_VERT ) ); + OUString aTitle1( SdResId( STR_GLUE_ESCDIR_HORZ ) ); + OUString aTitle2( SdResId( STR_GLUE_ESCDIR_VERT ) ); SvtLanguageOptions aLanguageOptions; const bool bVerticalEnabled = aLanguageOptions.IsVerticalTextEnabled(); @@ -248,7 +248,7 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, vcl::W if( bInsertPage ) sSlotTitle = vcl::CommandInfoProvider::GetLabelForCommand( sSlotStr, rController.getModuleName() ); else - sSlotTitle = SD_RESSTR( STR_RESET_LAYOUT ); + sSlotTitle = SdResId( STR_RESET_LAYOUT ); appendEntry( 2, sSlotTitle, aSlotImage); } } diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx index a62a59603403..edc4be63b315 100644 --- a/sd/source/ui/dlg/LayerTabBar.cxx +++ b/sd/source/ui/dlg/LayerTabBar.cxx @@ -170,11 +170,11 @@ bool LayerTabBar::StartRenaming() { bool bOK = true; OUString aLayerName = GetPageText( GetEditPageId() ); - OUString aLayoutLayer = SD_RESSTR(STR_LAYER_LAYOUT); - OUString aControlsLayer = SD_RESSTR(STR_LAYER_CONTROLS); - OUString aMeasureLinesLayer = SD_RESSTR(STR_LAYER_MEASURELINES); - OUString aBackgroundLayer = SD_RESSTR(STR_LAYER_BCKGRND); - OUString aBackgroundObjLayer = SD_RESSTR(STR_LAYER_BCKGRNDOBJ); + OUString aLayoutLayer = SdResId(STR_LAYER_LAYOUT); + OUString aControlsLayer = SdResId(STR_LAYER_CONTROLS); + OUString aMeasureLinesLayer = SdResId(STR_LAYER_MEASURELINES); + OUString aBackgroundLayer = SdResId(STR_LAYER_BCKGRND); + OUString aBackgroundObjLayer = SdResId(STR_LAYER_BCKGRNDOBJ); if ( aLayerName == aLayoutLayer || aLayerName == aControlsLayer || aLayerName == aMeasureLinesLayer || @@ -212,18 +212,18 @@ TabBarAllowRenamingReturnCode LayerTabBar::AllowRenaming() { // Name already exists ScopedVclPtrInstance<WarningBox> aWarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ), - SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ); + SdResId( STR_WARN_NAME_DUPLICATE ) ); aWarningBox->Execute(); bOK = false; } if (bOK) { - OUString aLayoutLayer = SD_RESSTR(STR_LAYER_LAYOUT); - OUString aControlsLayer = SD_RESSTR(STR_LAYER_CONTROLS); - OUString aMeasureLinesLayer = SD_RESSTR(STR_LAYER_MEASURELINES); - OUString aBackgroundLayer = SD_RESSTR(STR_LAYER_BCKGRND); - OUString aBackgroundObjLayer = SD_RESSTR(STR_LAYER_BCKGRNDOBJ); + OUString aLayoutLayer = SdResId(STR_LAYER_LAYOUT); + OUString aControlsLayer = SdResId(STR_LAYER_CONTROLS); + OUString aMeasureLinesLayer = SdResId(STR_LAYER_MEASURELINES); + OUString aBackgroundLayer = SdResId(STR_LAYER_BCKGRND); + OUString aBackgroundObjLayer = SdResId(STR_LAYER_BCKGRNDOBJ); if ( aNewName == aLayoutLayer || aNewName == aControlsLayer || aNewName == aMeasureLinesLayer || diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx index a441b1a0a548..cd83474c0af4 100644 --- a/sd/source/ui/dlg/PaneChildWindows.cxx +++ b/sd/source/ui/dlg/PaneChildWindows.cxx @@ -50,7 +50,7 @@ PaneChildWindow::PaneChildWindow ( pBindings, this, pParentWindow, - SD_RESSTR(nTitleBarResId))); + SdResId(nTitleBarResId))); SetAlignment(SfxChildAlignment::LEFT); static_cast<SfxDockingWindow*>(GetWindow())->Initialize(pInfo); SetHideNotDelete(true); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index c2f03a7cf7cc..ffc73486e2c3 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -109,7 +109,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, void) { if (pImagesLst->GetEntryCount() == 0) { - ScopedVclPtrInstance< WarningBox > aWarning(this, WB_OK, SD_RESSTR(STR_PHOTO_ALBUM_EMPTY_WARNING)); + ScopedVclPtrInstance< WarningBox > aWarning(this, WB_OK, SdResId(STR_PHOTO_ALBUM_EMPTY_WARNING)); aWarning->Execute(); } else @@ -610,7 +610,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl, ListBox&, void) OUString* pData = static_cast<OUString*>(pImagesLst->GetSelectEntryData()); OUString sImgUrl = pData ? OUString(*pData) : ""; - if (sImgUrl != SD_RESSTR(STR_PHOTO_ALBUM_TEXTBOX)) + if (sImgUrl != SdResId(STR_PHOTO_ALBUM_TEXTBOX)) { GraphicFilter aCurFilter; Graphic aGraphic; diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index f0933ba5e7e9..d0583395923f 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -80,7 +80,7 @@ ClientBox::ClientBox( vcl::Window* pParent, WinBits nStyle ) : m_aScrollBar->EnableDrag(); m_aPinBox->SetUseThousandSep(false); - m_aDeauthoriseButton->SetText( SD_RESSTR(STR_DEAUTHORISE_CLIENT) ); + m_aDeauthoriseButton->SetText( SdResId(STR_DEAUTHORISE_CLIENT) ); m_aDeauthoriseButton->SetClickHdl( LINK( this, ClientBox, DeauthoriseHdl ) ); SetPosPixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ) ); @@ -331,7 +331,7 @@ void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const ::tools::Recta aPos.Y() += aTextHeight; if (rEntry->m_bActive) { - OUString sPinText(SD_RESSTR(STR_ENTER_PIN)); + OUString sPinText(SdResId(STR_ENTER_PIN)); DrawText(m_sPinTextRect, sPinText); } @@ -373,7 +373,7 @@ void ClientBox::RecalcAll() aEntryRect.Right(), aEntryRect.Bottom() - TOP_OFFSET); - OUString sPinText(SD_RESSTR(STR_ENTER_PIN)); + OUString sPinText(SdResId(STR_ENTER_PIN)); aPos = Point( aEntryRect.Left() + GetTextWidth( sPinText ), aEntryRect.Bottom() - TOP_OFFSET - aPinBoxSize.Height() ); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 6588b105b646..22117cb810f2 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -441,7 +441,7 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, Button*, pBtn, void ) } else // delete everything { - ScopedVclPtrInstance< WarningBox > aWarnBox( this, WB_YES_NO, SD_RESSTR( STR_ASK_DELETE_ALL_PICTURES ) ); + ScopedVclPtrInstance< WarningBox > aWarnBox( this, WB_YES_NO, SdResId( STR_ASK_DELETE_ALL_PICTURES ) ); short nReturn = aWarnBox->Execute(); if( nReturn == RET_YES ) diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx index 6f8fee9961bf..e6da3e880f27 100644 --- a/sd/source/ui/dlg/brkdlg.cxx +++ b/sd/source/ui/dlg/brkdlg.cxx @@ -58,7 +58,7 @@ BreakDlg::BreakDlg( m_pBtnCancel->SetClickHdl( LINK( this, BreakDlg, CancelButtonHdl)); - mpProgress = new SfxProgress( pShell, SD_RESSTR(STR_BREAK_METAFILE), nSumActionCount*3 ); + mpProgress = new SfxProgress( pShell, SdResId(STR_BREAK_METAFILE), nSumActionCount*3 ); pProgrInfo = new SvdProgressInfo( LINK(this, BreakDlg, UpDate) ); // every action is edited 3 times in DoImport() @@ -107,7 +107,7 @@ IMPL_LINK( BreakDlg, UpDate, void*, nInit, bool ) // update status bar or show a error message? if(nInit == reinterpret_cast<void*>(1L)) { - ScopedVclPtrInstance< MessageDialog > aErrBox(this, SD_RESSTR(STR_BREAK_FAIL)); + ScopedVclPtrInstance< MessageDialog > aErrBox(this, SdResId(STR_BREAK_FAIL)); aErrBox->Execute(); } else diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 8c6673011075..1666bffee6c7 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -532,7 +532,7 @@ IMPL_LINK_NOARG(SdDefineCustomShowDlg, OKHdl, Button*, void) else { ScopedVclPtrInstance<WarningBox>( this, WinBits( WB_OK ), - SD_RESSTR( STR_WARN_NAME_DUPLICATE ) )->Execute(); + SdResId( STR_WARN_NAME_DUPLICATE ) )->Execute(); m_pEdtName->GrabFocus(); } diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx index e8737c19e6e9..842462414dc9 100644 --- a/sd/source/ui/dlg/diactrl.cxx +++ b/sd/source/ui/dlg/diactrl.cxx @@ -43,7 +43,7 @@ SdPagesField::SdPagesField( vcl::Window* pParent, SvxMetricField ( pParent, rFrame ), m_xFrame ( rFrame ) { - OUString aStr( SD_RESSTR( STR_SLIDE_PLURAL ) ); + OUString aStr( SdResId( STR_SLIDE_PLURAL ) ); SetCustomUnitText( aStr ); // set size @@ -74,9 +74,9 @@ void SdPagesField::UpdatePagesField( const SfxUInt16Item* pItem ) long nValue = (long) pItem->GetValue(); SetValue( nValue ); if( nValue == 1 ) - SetCustomUnitText( SD_RESSTR( STR_SLIDE_SINGULAR ) ); + SetCustomUnitText( SdResId( STR_SLIDE_SINGULAR ) ); else - SetCustomUnitText( SD_RESSTR( STR_SLIDE_PLURAL ) ); + SetCustomUnitText( SdResId( STR_SLIDE_PLURAL ) ); } else SetText( OUString() ); diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx index 0ff1eddb3c82..6270815d8ff0 100644 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -179,8 +179,8 @@ void SdModifyFieldDlg::FillFormatList() //SVXDATEFORMAT_APPDEFAULT, // not used //SVXDATEFORMAT_SYSTEM, // not used - m_pLbFormat->InsertEntry( SD_RESSTR( STR_STANDARD_SMALL ) ); - m_pLbFormat->InsertEntry( SD_RESSTR( STR_STANDARD_BIG ) ); + m_pLbFormat->InsertEntry( SdResId( STR_STANDARD_SMALL ) ); + m_pLbFormat->InsertEntry( SdResId( STR_STANDARD_BIG ) ); SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); aDateField.SetFormat( SVXDATEFORMAT_A ); // 13.02.96 @@ -205,7 +205,7 @@ void SdModifyFieldDlg::FillFormatList() //SVXTIMEFORMAT_APPDEFAULT, // not used //SVXTIMEFORMAT_SYSTEM, // not used - m_pLbFormat->InsertEntry( SD_RESSTR( STR_STANDARD_NORMAL ) ); + m_pLbFormat->InsertEntry( SdResId( STR_STANDARD_NORMAL ) ); SvNumberFormatter* pNumberFormatter = SD_MOD()->GetNumberFormatter(); aTimeField.SetFormat( SVXTIMEFORMAT_24_HM ); // 13:49 @@ -231,10 +231,10 @@ void SdModifyFieldDlg::FillFormatList() const SvxExtFileField* pFileField = static_cast<const SvxExtFileField*>( pField ); SvxExtFileField aFileField( *pFileField ); - m_pLbFormat->InsertEntry( SD_RESSTR( STR_FILEFORMAT_NAME_EXT ) ); - m_pLbFormat->InsertEntry( SD_RESSTR( STR_FILEFORMAT_FULLPATH ) ); - m_pLbFormat->InsertEntry( SD_RESSTR( STR_FILEFORMAT_PATH ) ); - m_pLbFormat->InsertEntry( SD_RESSTR( STR_FILEFORMAT_NAME ) ); + m_pLbFormat->InsertEntry( SdResId( STR_FILEFORMAT_NAME_EXT ) ); + m_pLbFormat->InsertEntry( SdResId( STR_FILEFORMAT_FULLPATH ) ); + m_pLbFormat->InsertEntry( SdResId( STR_FILEFORMAT_PATH ) ); + m_pLbFormat->InsertEntry( SdResId( STR_FILEFORMAT_NAME ) ); m_pLbFormat->SelectEntryPos( (sal_uInt16) ( pFileField->GetFormat() ) ); } diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index 7799458da69f..c983e5f585b0 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -111,7 +111,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl, void*, void) try { mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, - SD_RESSTR( STR_PLAY ) ); + SdResId( STR_PLAY ) ); mbLabelPlaying = false; } catch(const css::lang::IllegalArgumentException&) @@ -143,7 +143,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl, void*, void) try { mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, - SD_RESSTR( STR_STOP ) ); + SdResId( STR_STOP ) ); mbLabelPlaying = true; } catch (const css::lang::IllegalArgumentException&) @@ -173,7 +173,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl, Timer *, void) try { mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, - SD_RESSTR( STR_PLAY ) ); + SdResId( STR_PLAY ) ); mbLabelPlaying = false; } catch (const css::lang::IllegalArgumentException&) @@ -194,7 +194,7 @@ void SdFileDialog_Imp::CheckSelectionState() try { - if( aCurrFilter.isEmpty() || ( aCurrFilter == SD_RESSTR( STR_EXPORT_HTML_NAME ) ) ) + if( aCurrFilter.isEmpty() || ( aCurrFilter == SdResId( STR_EXPORT_HTML_NAME ) ) ) mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, false ); else mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, true ); @@ -227,7 +227,7 @@ SdFileDialog_Imp::SdFileDialog_Imp() : try { mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, - SD_RESSTR( STR_PLAY ) ); + SdResId( STR_PLAY ) ); } catch (const css::lang::IllegalArgumentException&) { @@ -258,25 +258,25 @@ SdOpenSoundFileDialog::SdOpenSoundFileDialog() : mpImpl( new SdFileDialog_Imp() ) { OUString aDescr; - aDescr = SD_RESSTR(STR_ALL_FILES); + aDescr = SdResId(STR_ALL_FILES); mpImpl->AddFilter( aDescr, "*.*"); // setup filter #if defined UNX - aDescr = SD_RESSTR(STR_AU_FILE); + aDescr = SdResId(STR_AU_FILE); mpImpl->AddFilter( aDescr, "*.au;*.snd"); - aDescr = SD_RESSTR(STR_VOC_FILE); + aDescr = SdResId(STR_VOC_FILE); mpImpl->AddFilter( aDescr, "*.voc"); - aDescr = SD_RESSTR(STR_WAV_FILE); + aDescr = SdResId(STR_WAV_FILE); mpImpl->AddFilter( aDescr, "*.wav"); - aDescr = SD_RESSTR(STR_AIFF_FILE); + aDescr = SdResId(STR_AIFF_FILE); mpImpl->AddFilter( aDescr, "*.aiff"); - aDescr = SD_RESSTR(STR_SVX_FILE); + aDescr = SdResId(STR_SVX_FILE); mpImpl->AddFilter( aDescr, "*.svx"); #else - aDescr = SD_RESSTR(STR_WAV_FILE); + aDescr = SdResId(STR_WAV_FILE); mpImpl->AddFilter( aDescr, "*.wav;*.mp3;*.ogg" ); - aDescr = SD_RESSTR(STR_MIDI_FILE); + aDescr = SdResId(STR_MIDI_FILE); mpImpl->AddFilter( aDescr, "*.mid" ); #endif } diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx index 2f62a2444551..f8954dc56cd4 100644 --- a/sd/source/ui/dlg/gluectrl.cxx +++ b/sd/source/ui/dlg/gluectrl.cxx @@ -92,19 +92,19 @@ void GlueEscDirLB::Select() */ void GlueEscDirLB::Fill() { - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_SMART ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_LEFT ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_RIGHT ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_TOP ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_BOTTOM ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_SMART ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_LEFT ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_RIGHT ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_TOP ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_BOTTOM ) ); /* - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_LO ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_LU ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_RO ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_RU ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_HORZ ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_VERT ) ); - InsertEntry( SD_RESSTR( STR_GLUE_ESCDIR_ALL ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_LO ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_LU ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_RO ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_RU ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_HORZ ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_VERT ) ); + InsertEntry( SdResId( STR_GLUE_ESCDIR_ALL ) ); */ } diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index 2afd2d54bca8..296349f0d887 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -49,7 +49,7 @@ SdInsertPagesObjsDlg::SdInsertPagesObjsDlg( // insert text if( !pMedium ) - SetText( SD_RESSTR( STR_INSERT_TEXT ) ); + SetText( SdResId( STR_INSERT_TEXT ) ); Reset(); } diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 76fa5140872b..22157511eb53 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -81,7 +81,7 @@ SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings) maTlbObjects->SetViewFrame( mpBindings->GetDispatcher()->GetFrame() ); - maTlbObjects->SetAccessibleName(SD_RESSTR(STR_OBJECTS_TREE)); + maTlbObjects->SetAccessibleName(SdResId(STR_OBJECTS_TREE)); maTlbObjects->SetDoubleClickHdl(LINK(this, SdNavigatorWin, ClickObjectHdl)); maTlbObjects->SetSelectionMode(SelectionMode::Single); @@ -271,7 +271,7 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void ) if( nRId > 0 ) { DBG_ASSERT(aHIDs[nID-NAVIGATOR_DRAGTYPE_URL],"HelpId not added!"); - pMenu->InsertItem(nID, SD_RESSTR(nRId), MenuItemBits::RADIOCHECK); + pMenu->InsertItem(nID, SdResId(nRId), MenuItemBits::RADIOCHECK); pMenu->SetHelpId(nID, aHIDs[nID - NAVIGATOR_DRAGTYPE_URL]); } @@ -297,11 +297,11 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void ) pMenu->InsertItem( nShowNamedShapesFilter, - SD_RESSTR(STR_NAVIGATOR_SHOW_NAMED_SHAPES), + SdResId(STR_NAVIGATOR_SHOW_NAMED_SHAPES), MenuItemBits::RADIOCHECK); pMenu->InsertItem( nShowAllShapesFilter, - SD_RESSTR(STR_NAVIGATOR_SHOW_ALL_SHAPES), + SdResId(STR_NAVIGATOR_SHOW_ALL_SHAPES), MenuItemBits::RADIOCHECK); if (maTlbObjects->GetShowAllShapes()) diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 71ab78a7acff..3573b27bd929 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -99,7 +99,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, // from 'Outline 1' style sheet. if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, false, &pItem )) { - OUString aStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1"); + OUString aStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1"); SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO); if(pFirstStyleSheet) @@ -180,19 +180,19 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, switch( ePO ) { case PO_TITLE: - aTitle = OUString(SdResId( STR_PSEUDOSHEET_TITLE )); + aTitle = SdResId(STR_PSEUDOSHEET_TITLE); break; case PO_SUBTITLE: - aTitle = OUString(SdResId( STR_PSEUDOSHEET_SUBTITLE )); + aTitle = SdResId(STR_PSEUDOSHEET_SUBTITLE); break; case PO_BACKGROUND: - aTitle = OUString(SdResId( STR_PSEUDOSHEET_BACKGROUND )); + aTitle = SdResId(STR_PSEUDOSHEET_BACKGROUND); break; case PO_BACKGROUNDOBJECTS: - aTitle = OUString(SdResId( STR_PSEUDOSHEET_BACKGROUNDOBJECTS )); + aTitle = SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS); break; case PO_OUTLINE_1: @@ -204,12 +204,12 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, case PO_OUTLINE_7: case PO_OUTLINE_8: case PO_OUTLINE_9: - aTitle = OUString(SdResId( STR_PSEUDOSHEET_OUTLINE )) + " " + + aTitle = SdResId(STR_PSEUDOSHEET_OUTLINE) + " " + OUString::number( ePO - PO_OUTLINE_1 + 1 ); break; case PO_NOTES: - aTitle = OUString(SdResId( STR_PSEUDOSHEET_NOTES )); + aTitle = SdResId(STR_PSEUDOSHEET_NOTES); break; } SetText( aTitle ); diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index 7746eb90f0d6..b7f7d3642671 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -38,7 +38,7 @@ SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell, "modules/simpress/ui/slidedesigndialog.ui") , mpDocSh(pDocShell) , mrOutAttrs(rInAttrs) - , maStrNone(SD_RESSTR(STR_NULL)) + , maStrNone(SdResId(STR_NULL)) { get(m_pVS, "select"); Size aPref(LogicToPixel(Size(144 , 141), MapUnit::MapAppFont)); @@ -180,7 +180,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLayoutHdl, ValueSet*, void) IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, Button*, void) { VclPtrInstance< SfxNewFileDialog > pDlg(this, SfxNewFileDialogMode::Preview); - pDlg->SetText(SD_RESSTR(STR_LOAD_PRESENTATION_LAYOUT)); + pDlg->SetText(SdResId(STR_LOAD_PRESENTATION_LAYOUT)); if(!IsReallyVisible()) return; diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 614592536d9a..3bb125de459e 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -404,7 +404,7 @@ OUString SdPageObjsTLB::GetObjectName( && aRet.isEmpty() && pObject!=nullptr) { - aRet = SD_RESSTR(STR_NAVIGATOR_SHAPE_BASE_NAME); + aRet = SdResId(STR_NAVIGATOR_SHAPE_BASE_NAME); aRet = aRet.replaceFirst("%1", OUString::number(pObject->GetOrdNum() + 1)); } @@ -988,7 +988,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed) if ( !mpBookmarkDoc ) { - ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SD_RESSTR(STR_READ_DATA_ERROR)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SdResId(STR_READ_DATA_ERROR)); aErrorBox->Execute(); mpMedium = nullptr; //On failure the SfxMedium is invalid } diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index d658d5f8b4f1..a0dec36b6c8c 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -220,7 +220,7 @@ void SdTPAction::Construct() bOLEAction = true; aVerbVector.push_back( 0 ); - m_pLbOLEAction->InsertEntry( MnemonicGenerator::EraseAllMnemonicChars( SD_RESSTR( STR_EDIT_OBJ ) ) ); + m_pLbOLEAction->InsertEntry( MnemonicGenerator::EraseAllMnemonicChars( SdResId( STR_EDIT_OBJ ) ) ); } else if( pOleObj ) { @@ -270,7 +270,7 @@ void SdTPAction::Construct() for (presentation::ClickAction & rAction : maCurrentActions) { sal_uInt16 nRId = GetClickActionSdResId( rAction ); - m_pLbAction->InsertEntry( SD_RESSTR( nRId ) ); + m_pLbAction->InsertEntry( SdResId( nRId ) ); } } @@ -452,7 +452,7 @@ void SdTPAction::OpenFileDialog() // filter makes the (Windows system) open file dialog follow // links on the desktop to directories. aFileDialog.AddFilter ( - SFX2_RESSTR(STR_SFX_FILTERNAME_ALL), + SfxResId(STR_SFX_FILTERNAME_ALL), "*.*"); if( aFileDialog.Execute() == ERRCODE_NONE ) @@ -583,7 +583,7 @@ IMPL_LINK_NOARG(SdTPAction, ClickActionHdl, ListBox&, void) m_pEdtSound->Enable(); m_pBtnSearch->Show(); m_pBtnSearch->Enable(); - m_pFrame->set_label( SD_RESSTR( STR_EFFECTDLG_SOUND ) ); + m_pFrame->set_label( SdResId( STR_EFFECTDLG_SOUND ) ); break; case presentation::ClickAction_PROGRAM: @@ -594,12 +594,12 @@ IMPL_LINK_NOARG(SdTPAction, ClickActionHdl, ListBox&, void) if( eCA == presentation::ClickAction_MACRO ) { m_pEdtMacro->Show(); - m_pFrame->set_label( SD_RESSTR( STR_EFFECTDLG_MACRO ) ); + m_pFrame->set_label( SdResId( STR_EFFECTDLG_MACRO ) ); } else { m_pEdtProgram->Show(); - m_pFrame->set_label( SD_RESSTR( STR_EFFECTDLG_PROGRAM ) ); + m_pFrame->set_label( SdResId( STR_EFFECTDLG_PROGRAM ) ); } break; @@ -612,8 +612,8 @@ IMPL_LINK_NOARG(SdTPAction, ClickActionHdl, ListBox&, void) m_pBtnSearch->Show(); m_pBtnSearch->Enable(); - m_pFtTree->SetText( SD_RESSTR( STR_EFFECTDLG_JUMP ) ); - m_pFrame->set_label( SD_RESSTR( STR_EFFECTDLG_DOCUMENT ) ); + m_pFtTree->SetText( SdResId( STR_EFFECTDLG_JUMP ) ); + m_pFrame->set_label( SdResId( STR_EFFECTDLG_DOCUMENT ) ); CheckFileHdl( *m_pEdtDocument ); break; @@ -622,7 +622,7 @@ IMPL_LINK_NOARG(SdTPAction, ClickActionHdl, ListBox&, void) m_pFtTree->Show(); m_pLbOLEAction->Show(); - m_pFtTree->SetText( SD_RESSTR( STR_EFFECTDLG_ACTION ) ); + m_pFtTree->SetText( SdResId( STR_EFFECTDLG_ACTION ) ); break; case presentation::ClickAction_BOOKMARK: @@ -635,8 +635,8 @@ IMPL_LINK_NOARG(SdTPAction, ClickActionHdl, ListBox&, void) m_pEdtBookmark->Show(); m_pBtnSeek->Show(); - m_pFtTree->SetText( SD_RESSTR( STR_EFFECTDLG_JUMP ) ); - m_pFrame->set_label( SD_RESSTR( STR_EFFECTDLG_PAGE_OBJECT ) ); + m_pFtTree->SetText( SdResId( STR_EFFECTDLG_JUMP ) ); + m_pFrame->set_label( SdResId( STR_EFFECTDLG_PAGE_OBJECT ) ); break; default: break; diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index cb7eafc02332..8f3510bf7839 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -369,7 +369,7 @@ DeactivateRC SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet ) FillItemSet( pActiveSet ); return DeactivateRC::LeavePage; } - ScopedVclPtrInstance< WarningBox > aWarnBox( GetParent(), WB_YES_NO, SD_RESSTR( STR_WARN_SCALE_FAIL ) ); + ScopedVclPtrInstance< WarningBox > aWarnBox( GetParent(), WB_YES_NO, SdResId( STR_WARN_SCALE_FAIL ) ); if( aWarnBox->Execute() == RET_YES ) return DeactivateRC::KeepPage; diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx index 7b6842539fbe..1e0b6d99a5a1 100644 --- a/sd/source/ui/dlg/unchss.cxx +++ b/sd/source/ui/dlg/unchss.cxx @@ -51,7 +51,7 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc, mpOldSet = o3tl::make_unique<SfxItemSet>(static_cast<SfxItemPool&>(SdrObject::GetGlobalDrawObjectItemPool()), mpStyleSheet->GetItemSet().GetRanges()); SdrModel::MigrateItemSet( &mpStyleSheet->GetItemSet(), mpOldSet.get(), pTheDoc ); - OUString aComment(SD_RESSTR(STR_UNDO_CHANGE_PRES_OBJECT)); + OUString aComment(SdResId(STR_UNDO_CHANGE_PRES_OBJECT)); OUString aName(mpStyleSheet->GetName()); // delete layout name and separator @@ -61,27 +61,27 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc, if (aName == STR_LAYOUT_TITLE) { - aName = SD_RESSTR(STR_PSEUDOSHEET_TITLE); + aName = SdResId(STR_PSEUDOSHEET_TITLE); } else if (aName == STR_LAYOUT_SUBTITLE) { - aName = SD_RESSTR(STR_PSEUDOSHEET_SUBTITLE); + aName = SdResId(STR_PSEUDOSHEET_SUBTITLE); } else if (aName == STR_LAYOUT_BACKGROUND) { - aName = SD_RESSTR(STR_PSEUDOSHEET_BACKGROUND); + aName = SdResId(STR_PSEUDOSHEET_BACKGROUND); } else if (aName == STR_LAYOUT_BACKGROUNDOBJECTS) { - aName = SD_RESSTR(STR_PSEUDOSHEET_BACKGROUNDOBJECTS); + aName = SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS); } else if (aName == STR_LAYOUT_NOTES) { - aName = SD_RESSTR(STR_PSEUDOSHEET_NOTES); + aName = SdResId(STR_PSEUDOSHEET_NOTES); } else { - OUString aOutlineStr(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE)); + OUString aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE)); nPos = aName.indexOf(aOutlineStr); if (nPos != -1) { diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index 0124b1fd8efd..1062de5e6bdb 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -282,7 +282,7 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName ) if( ! bIsNameValid ) { - OUString aDesc( SD_RESSTR( STR_WARN_PAGE_EXISTS ) ); + OUString aDesc( SdResId( STR_WARN_PAGE_EXISTS ) ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); VclPtr<AbstractSvxNameDialog> aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : nullptr; if( aNameDlg ) @@ -312,7 +312,7 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr bool bCanUseNewName = false; // check if name is something like 'Slide n' - OUString aStrPage(SD_RESSTR(STR_SD_PAGE) + " "); + OUString aStrPage(SdResId(STR_SD_PAGE) + " "); bool bIsStandardName = false; diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index d1e464fa38d6..773bfd506a7e 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -1037,13 +1037,13 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName, { *pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60); *pFormat = SotClipboardFormatId::STARDRAW_60; - *pFullTypeName = OUString(SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60)); + *pFullTypeName = SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60); } else { *pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60); *pFormat = SotClipboardFormatId::STARIMPRESS_60; - *pFullTypeName = OUString(SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60)); + *pFullTypeName = SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60); } } else if (nFileFormat == SOFFICE_FILEFORMAT_8) @@ -1062,8 +1062,8 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName, } } - *pShortTypeName = OUString(SdResId( (meDocType == DocumentType::Draw) ? - STR_GRAPHIC_DOCUMENT : STR_IMPRESS_DOCUMENT )); + *pShortTypeName = SdResId((meDocType == DocumentType::Draw) ? + STR_GRAPHIC_DOCUMENT : STR_IMPRESS_DOCUMENT); } OutputDevice* DrawDocShell::GetDocumentRefDev() diff --git a/sd/source/ui/framework/module/SlideSorterModule.cxx b/sd/source/ui/framework/module/SlideSorterModule.cxx index 5185e53f8988..6315ec335a14 100644 --- a/sd/source/ui/framework/module/SlideSorterModule.cxx +++ b/sd/source/ui/framework/module/SlideSorterModule.cxx @@ -133,7 +133,7 @@ void SlideSorterModule::UpdateViewTabBar (const Reference<XTabBar>& rxTabBar) aButtonA.ResourceId = FrameworkHelper::CreateResourceId( FrameworkHelper::msSlideSorterURL, FrameworkHelper::msCenterPaneURL); - aButtonA.ButtonLabel = SD_RESSTR(STR_SLIDE_SORTER_MODE); + aButtonA.ButtonLabel = SdResId(STR_SLIDE_SORTER_MODE); TabBarButton aButtonB; aButtonB.ResourceId = FrameworkHelper::CreateResourceId( diff --git a/sd/source/ui/framework/module/ViewTabBarModule.cxx b/sd/source/ui/framework/module/ViewTabBarModule.cxx index 2752493faa9d..f3bdca4a7250 100644 --- a/sd/source/ui/framework/module/ViewTabBarModule.cxx +++ b/sd/source/ui/framework/module/ViewTabBarModule.cxx @@ -153,7 +153,7 @@ void ViewTabBarModule::UpdateViewTabBar (const Reference<XTabBar>& rxTabBar) aImpressViewButton.ResourceId = FrameworkHelper::CreateResourceId( FrameworkHelper::msImpressViewURL, xAnchor); - aImpressViewButton.ButtonLabel = SD_RESSTR(STR_NORMAL_MODE); + aImpressViewButton.ButtonLabel = SdResId(STR_NORMAL_MODE); if ( ! xBar->hasTabBarButton(aImpressViewButton)) xBar->addTabBarButtonAfter(aImpressViewButton, aEmptyButton); @@ -161,7 +161,7 @@ void ViewTabBarModule::UpdateViewTabBar (const Reference<XTabBar>& rxTabBar) aOutlineViewButton.ResourceId = FrameworkHelper::CreateResourceId( FrameworkHelper::msOutlineViewURL, xAnchor); - aOutlineViewButton.ButtonLabel = SD_RESSTR(STR_OUTLINE_MODE); + aOutlineViewButton.ButtonLabel = SdResId(STR_OUTLINE_MODE); if ( ! xBar->hasTabBarButton(aOutlineViewButton)) xBar->addTabBarButtonAfter(aOutlineViewButton, aImpressViewButton); @@ -169,7 +169,7 @@ void ViewTabBarModule::UpdateViewTabBar (const Reference<XTabBar>& rxTabBar) aNotesViewButton.ResourceId = FrameworkHelper::CreateResourceId( FrameworkHelper::msNotesViewURL, xAnchor); - aNotesViewButton.ButtonLabel = SD_RESSTR(STR_NOTES_MODE); + aNotesViewButton.ButtonLabel = SdResId(STR_NOTES_MODE); if ( ! xBar->hasTabBarButton(aNotesViewButton)) xBar->addTabBarButtonAfter(aNotesViewButton, aOutlineViewButton); @@ -177,7 +177,7 @@ void ViewTabBarModule::UpdateViewTabBar (const Reference<XTabBar>& rxTabBar) aHandoutViewButton.ResourceId = FrameworkHelper::CreateResourceId( FrameworkHelper::msHandoutViewURL, xAnchor); - aHandoutViewButton.ButtonLabel = SD_RESSTR(STR_HANDOUT_MASTER_MODE); + aHandoutViewButton.ButtonLabel = SdResId(STR_HANDOUT_MASTER_MODE); if ( ! xBar->hasTabBarButton(aHandoutViewButton)) xBar->addTabBarButtonAfter(aHandoutViewButton, aNotesViewButton); } diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 52a104404797..82f43477691c 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -128,7 +128,7 @@ void FuBullet::InsertFormattingMark( sal_Unicode cMark ) // prepare undo ::svl::IUndoManager& rUndoMgr = pOL->GetUndoManager(); - rUndoMgr.EnterListAction(SD_RESSTR(STR_UNDO_INSERT_SPECCHAR), + rUndoMgr.EnterListAction(SdResId(STR_UNDO_INSERT_SPECCHAR), "", 0, mpViewShell->GetViewShellBase().GetViewShellId() ); // insert given text @@ -257,7 +257,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) ::svl::IUndoManager& rUndoMgr = pOL->GetUndoManager(); ViewShellId nViewShellId = mpViewShell ? mpViewShell->GetViewShellBase().GetViewShellId() : ViewShellId(-1); - rUndoMgr.EnterListAction(SD_RESSTR(STR_UNDO_INSERT_SPECCHAR), + rUndoMgr.EnterListAction(SdResId(STR_UNDO_INSERT_SPECCHAR), "", 0, nViewShellId ); pOV->InsertText(aChars, true); diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index 5708102dedb8..9add8904b85c 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -228,7 +228,7 @@ bool FuConstructRectangle::MouseButtonUp(const MouseEvent& rMEvt) if(SID_DRAW_MEASURELINE == nSlotId) { SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin(); - OUString aStr(SD_RESSTR(STR_LAYER_MEASURELINES)); + OUString aStr(SdResId(STR_LAYER_MEASURELINES)); pObj->SetLayer(rAdmin.GetLayerID(aStr)); } @@ -476,7 +476,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) { // dimension line SdPage* pPage = static_cast<SdPage*>( mpView->GetSdrPageView()->GetPage() ); - OUString aName(SD_RESSTR(STR_POOLSHEET_MEASURE)); + OUString aName(SdResId(STR_POOLSHEET_MEASURE)); SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>( pPage->GetModel()-> GetStyleSheetPool()-> Find(aName, SD_STYLE_FAMILY_GRAPHICS)); @@ -488,7 +488,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) } SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin(); - OUString aStr(SD_RESSTR(STR_LAYER_MEASURELINES)); + OUString aStr(SdResId(STR_LAYER_MEASURELINES)); pObj->SetLayer(rAdmin.GetLayerID(aStr)); } else if (nSlotId == OBJ_CUSTOMSHAPE ) @@ -506,7 +506,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) if( pLineEndList.is() ) { - OUString aArrowName( SVX_RES(nResId) ); + OUString aArrowName( SvxResId(nResId) ); long nCount = pLineEndList->Count(); long nIndex; for( nIndex = 0L; nIndex < nCount; nIndex++ ) @@ -600,9 +600,9 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_LINE_ARROWS: { // connector with arrow ends - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineStartWidthItem(nWidth)); - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -616,7 +616,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_LINE_ARROW_SQUARE: { // connector with arrow start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; @@ -630,7 +630,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_LINE_SQUARE_ARROW: { // connector with arrow end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -641,9 +641,9 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_CONNECTOR_CURVE_CIRCLES: { // connector with circle ends - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineStartWidthItem(nWidth)); - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -654,7 +654,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_CONNECTOR_CURVE_CIRCLE_START: { // connector with circle start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; @@ -665,7 +665,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_CONNECTOR_CURVE_CIRCLE_END: { // connector with circle ends - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -677,7 +677,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_LINE_ARROW_CIRCLE: { // circle end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -685,7 +685,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_LINE_CIRCLE_ARROW: { // circle start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; @@ -693,7 +693,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_LINE_ARROW_SQUARE: { // square end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_SQUARE), aSquare)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_SQUARE), aSquare)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -701,7 +701,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj) case SID_LINE_SQUARE_ARROW: { // square start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_SQUARE), aSquare)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_SQUARE), aSquare)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index 4366d5a5aa57..d2edf1bbca02 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -347,7 +347,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj, ************************************/ if ( bForceNoFillStyle ) { - OUString aName(SD_RESSTR(STR_POOLSHEET_OBJWITHOUTFILL)); + OUString aName(SdResId(STR_POOLSHEET_OBJWITHOUTFILL)); SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pPage->GetModel()-> GetStyleSheetPool()-> Find(aName, SD_STYLE_FAMILY_GRAPHICS)); diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx index 84024ff5c4fa..45a3f0f1f5cf 100644 --- a/sd/source/ui/func/fuconuno.cxx +++ b/sd/source/ui/func/fuconuno.cxx @@ -121,7 +121,7 @@ void FuConstructUnoControl::Activate() mpWindow->SetPointer( aNewPointer ); aOldLayer = mpView->GetActiveLayer(); - mpView->SetActiveLayer( SD_RESSTR(STR_LAYER_CONTROLS) ); + mpView->SetActiveLayer( SdResId(STR_LAYER_CONTROLS) ); FuConstruct::Activate(); } diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 0edd047c0fed..41ce0571c81a 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -69,7 +69,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) { // Undo OUString aString( mpView->GetDescriptionOfMarkedObjects() ); - aString += " " + SD_RESSTR( STR_UNDO_COPYOBJECTS ); + aString += " " + SdResId( STR_UNDO_COPYOBJECTS ); mpView->BegUndo( aString ); const SfxItemSet* pArgs = rReq.GetArgs(); @@ -174,8 +174,8 @@ void FuCopy::DoExecute( SfxRequest& rReq ) if( nNumber > 1 ) { - OUString aStr( SD_RESSTR( STR_OBJECTS ) ); - aStr += " " + SD_RESSTR( STR_UNDO_COPYOBJECTS ); + OUString aStr( SdResId( STR_OBJECTS ) ); + aStr += " " + SdResId( STR_UNDO_COPYOBJECTS ); pProgress.reset(new SfxProgress( mpDocSh, aStr, nNumber )); mpDocSh->SetWaitCursor( true ); diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index d82d59beca5f..2501ecb59fda 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -340,7 +340,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) { if (mpView->IsPresObjSelected(false, true, false, true)) { - ScopedVclPtrInstance<InfoBox>(mpWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(mpWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -808,35 +808,35 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE case presentation::ClickAction_PREVPAGE: { // jump to the prior page - aHelpText = SD_RESSTR(STR_CLICK_ACTION_PREVPAGE); + aHelpText = SdResId(STR_CLICK_ACTION_PREVPAGE); } break; case presentation::ClickAction_NEXTPAGE: { // jump to the next page - aHelpText = SD_RESSTR(STR_CLICK_ACTION_NEXTPAGE); + aHelpText = SdResId(STR_CLICK_ACTION_NEXTPAGE); } break; case presentation::ClickAction_FIRSTPAGE: { // jump to the first page - aHelpText = SD_RESSTR(STR_CLICK_ACTION_FIRSTPAGE); + aHelpText = SdResId(STR_CLICK_ACTION_FIRSTPAGE); } break; case presentation::ClickAction_LASTPAGE: { // jump to the last page - aHelpText = SD_RESSTR(STR_CLICK_ACTION_LASTPAGE); + aHelpText = SdResId(STR_CLICK_ACTION_LASTPAGE); } break; case presentation::ClickAction_BOOKMARK: { // jump to object/page - aHelpText = SD_RESSTR(STR_CLICK_ACTION_BOOKMARK); + aHelpText = SdResId(STR_CLICK_ACTION_BOOKMARK); aHelpText += ": "; aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset ); } @@ -845,7 +845,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE case presentation::ClickAction_DOCUMENT: { // jump to document (object/page) - aHelpText = SD_RESSTR(STR_CLICK_ACTION_DOCUMENT); + aHelpText = SdResId(STR_CLICK_ACTION_DOCUMENT); aHelpText += ": "; aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset ); } @@ -854,7 +854,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE case presentation::ClickAction_PROGRAM: { // execute program - aHelpText = SD_RESSTR(STR_CLICK_ACTION_PROGRAM); + aHelpText = SdResId(STR_CLICK_ACTION_PROGRAM); aHelpText += ": "; aHelpText += INetURLObject::decode( pInfo->GetBookmark(), INetURLObject::DecodeMechanism::WithCharset ); } @@ -863,7 +863,7 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE case presentation::ClickAction_MACRO: { // execute program - aHelpText = SD_RESSTR(STR_CLICK_ACTION_MACRO); + aHelpText = SdResId(STR_CLICK_ACTION_MACRO); aHelpText += ": "; if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) ) @@ -885,21 +885,21 @@ bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE case presentation::ClickAction_SOUND: { // play-back sound - aHelpText = SD_RESSTR(STR_CLICK_ACTION_SOUND); + aHelpText = SdResId(STR_CLICK_ACTION_SOUND); } break; case presentation::ClickAction_VERB: { // execute OLE-verb - aHelpText = SD_RESSTR(STR_CLICK_ACTION_VERB); + aHelpText = SdResId(STR_CLICK_ACTION_VERB); } break; case presentation::ClickAction_STOPPRESENTATION: { // quit presentation - aHelpText = SD_RESSTR(STR_CLICK_ACTION_STOPPRESENTATION); + aHelpText = SdResId(STR_CLICK_ACTION_STOPPRESENTATION); } break; default: diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx index c89b10289879..a7b3dbcbb419 100644 --- a/sd/source/ui/func/fuexpand.cxx +++ b/sd/source/ui/func/fuexpand.cxx @@ -109,7 +109,7 @@ void FuExpandPage::DoExecute( SfxRequest& ) const bool bUndo = mpView->IsUndoEnabled(); if( bUndo ) - mpView->BegUndo(SD_RESSTR(STR_UNDO_EXPAND_PAGE)); + mpView->BegUndo(SdResId(STR_UNDO_EXPAND_PAGE)); // set current structuring-object into outliner OutlinerParaObject* pParaObj = pActualOutline->GetOutlinerParaObject(); diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index cad5a7a59974..bb471096812a 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -99,7 +99,7 @@ void FuHangulHanjaConversion::StartConversion( LanguageType nSourceLanguage, Lan const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ) { - mpView->BegUndo(SD_RESSTR(STR_UNDO_HANGULHANJACONVERSION)); + mpView->BegUndo(SdResId(STR_UNDO_HANGULHANJACONVERSION)); ViewShellBase* pBase = dynamic_cast<ViewShellBase*>( SfxViewShell::Current() ); if (pBase != nullptr) diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index b3d431a98b25..d8f9d04a7fb6 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -783,12 +783,12 @@ void FuInsert3DModel::DoExecute( SfxRequest& ) { sfx2::FileDialogHelper aDlg( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE ); - aDlg.SetTitle( SD_RESSTR( STR_INSERT_3D_MODEL_TITLE ) ); + aDlg.SetTitle( SdResId( STR_INSERT_3D_MODEL_TITLE ) ); #if HAVE_FEATURE_COLLADA - aDlg.AddFilter( SD_RESSTR( STR_INSERT_3D_MODEL_ALL_SUPPORTED_FORMATS ), "*.json;*.dae;*.kmz" ); + aDlg.AddFilter( SdResId( STR_INSERT_3D_MODEL_ALL_SUPPORTED_FORMATS ), "*.json;*.dae;*.kmz" ); #else - aDlg.AddFilter( SD_RESSTR( STR_INSERT_3D_MODEL_ALL_SUPPORTED_FORMATS ), "*.json" ); + aDlg.AddFilter( SdResId( STR_INSERT_3D_MODEL_ALL_SUPPORTED_FORMATS ), "*.json" ); #endif aDlg.AddFilter( "JSON - GL Transmission Format", "*.json" ); diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index d4ace7dc8e36..0ba07d137a37 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -145,7 +145,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) OUString aOwnCont; OUString aOtherCont; - aFileDialog.SetTitle( SD_RESSTR(STR_DLG_INSERT_PAGES_FROM_FILE) ); + aFileDialog.SetTitle( SdResId(STR_DLG_INSERT_PAGES_FROM_FILE) ); if( mpDoc->GetDocumentType() == DocumentType::Impress ) { @@ -216,7 +216,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) } // set default-filter (<All>) - OUString aAllSpec( SD_RESSTR( STR_ALL_FILES ) ); + OUString aAllSpec( SdResId( STR_ALL_FILES ) ); OUString aExtensions = lcl_GetExtensionsList( aFilterVector ); OUString aGUIName = aAllSpec + " (" + aExtensions + ")"; @@ -317,7 +317,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) if( !bInserted ) { - ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SD_RESSTR( STR_READ_DATA_ERROR)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SdResId( STR_READ_DATA_ERROR)); aErrorBox->Execute(); } } @@ -460,7 +460,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) if (nErr || pOutliner->GetEditEngine().GetText().isEmpty()) { - ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SdResId(STR_READ_DATA_ERROR)); aErrorBox->Execute(); } else @@ -509,7 +509,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) const bool bUndo = mpView->IsUndoEnabled(); if( bUndo ) - mpView->BegUndo(SD_RESSTR(STR_UNDO_INSERT_TEXTFRAME)); + mpView->BegUndo(SdResId(STR_UNDO_INSERT_TEXTFRAME)); pPage->InsertObject(pTO); /* can be bigger as the maximal allowed size: @@ -604,7 +604,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) if (nErr || pOutliner->GetEditEngine().GetText().isEmpty()) { - ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SD_RESSTR(STR_READ_DATA_ERROR)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(mpWindow, SdResId(STR_READ_DATA_ERROR)); aErrorBox->Execute(); } else @@ -624,7 +624,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) mpDocSh->SetWaitCursor( false ); - std::unique_ptr<SfxProgress> pProgress(new SfxProgress( mpDocSh, SD_RESSTR(STR_CREATE_PAGES), nNewPages)); + std::unique_ptr<SfxProgress> pProgress(new SfxProgress( mpDocSh, SdResId(STR_CREATE_PAGES), nNewPages)); if( pProgress ) pProgress->SetState( 0, 100 ); @@ -632,7 +632,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) ViewShellId nViewShellId = mpViewShell ? mpViewShell->GetViewShellBase().GetViewShellId() : ViewShellId(-1); rDocliner.GetUndoManager().EnterListAction( - SD_RESSTR(STR_UNDO_INSERT_FILE), OUString(), 0, nViewShellId ); + SdResId(STR_UNDO_INSERT_FILE), OUString(), 0, nViewShellId ); sal_Int32 nSourcePos = 0; SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE ); diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx index a3ff6e656b92..426c8f26a9bf 100644 --- a/sd/source/ui/func/fulinend.cxx +++ b/sd/source/ui/func/fulinend.cxx @@ -92,8 +92,8 @@ void FuLineEnd::DoExecute( SfxRequest& ) XLineEndListRef pLineEndList = mpDoc->GetLineEndList(); - OUString aNewName( SD_RESSTR( STR_LINEEND ) ); - OUString aDesc( SD_RESSTR( STR_DESC_LINEEND ) ); + OUString aNewName( SdResId( STR_LINEEND ) ); + OUString aDesc( SdResId( STR_DESC_LINEEND ) ); OUString aName; long nCount = pLineEndList->Count(); @@ -138,7 +138,7 @@ void FuLineEnd::DoExecute( SfxRequest& ) else { ScopedVclPtrInstance<WarningBox> aWarningBox( mpWindow, WinBits( WB_OK ), - SD_RESSTR( STR_WARN_NAME_DUPLICATE ) ); + SdResId( STR_WARN_NAME_DUPLICATE ) ); aWarningBox->Execute(); } } diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 009a2f39426c..84484652aab6 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -166,7 +166,7 @@ void FuMorph::DoExecute( SfxRequest& ) if(ImpMorphPolygons(aPolyPoly1, aPolyPoly2, pDlg->GetFadeSteps(), aPolyPolyList)) { OUString aString(mpView->GetDescriptionOfMarkedObjects()); - aString += " " + SD_RESSTR(STR_UNDO_MORPHING); + aString += " " + SdResId(STR_UNDO_MORPHING); mpView->BegUndo(aString); ImpInsertPolygons(aPolyPolyList, pDlg->IsAttributeFade(), pObj1, pObj2); diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 5a9acafd6f11..40095175025e 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -377,9 +377,9 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) if( ePageKind != PageKind::Notes ) { ScopedVclPtrInstance<MessageDialog> aQuestionBox( - pParent, SD_RESSTR(STR_PAGE_BACKGROUND_TXT), + pParent, SdResId(STR_PAGE_BACKGROUND_TXT), VclMessageType::Question, VclButtonsType::YesNo); - aQuestionBox->SetText(SD_RESSTR(STR_PAGE_BACKGROUND_TITLE)); + aQuestionBox->SetText(SdResId(STR_PAGE_BACKGROUND_TITLE)); bSetToAllPages = ( RET_YES == aQuestionBox->Execute() ); } diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index 8d3a4218839f..2ef0a548a184 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -74,7 +74,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) if ( aStr.isEmpty() ) { - aStr = SD_RESSTR( STR_PAGE ) + OUString::number( nPage + 1 ); + aStr = SdResId( STR_PAGE ) + OUString::number( nPage + 1 ); } aPageNameList[ nPage ] = aStr; diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 958f7f906a1e..25fe9b64a559 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -123,12 +123,12 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) if ( rHelpLine.GetKind() == SdrHelpLineKind::Point ) { - pDlg->SetText(SD_RESSTR(STR_SNAPDLG_SETPOINT)); + pDlg->SetText(SdResId(STR_SNAPDLG_SETPOINT)); pDlg->SetInputFields(true, true); } else { - pDlg->SetText(SD_RESSTR(STR_SNAPDLG_SETLINE)); + pDlg->SetText(SdResId(STR_SNAPDLG_SETLINE)); if ( rHelpLine.GetKind() == SdrHelpLineKind::Vertical ) pDlg->SetInputFields(true, false); diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx index e6377d7d1b1d..661e5ae13359 100644 --- a/sd/source/ui/func/fusumry.cxx +++ b/sd/source/ui/func/fusumry.cxx @@ -112,7 +112,7 @@ void FuSummaryPage::DoExecute( SfxRequest& ) if( bUndo ) { - mpView->BegUndo(SD_RESSTR(STR_UNDO_SUMMARY_PAGE)); + mpView->BegUndo(SdResId(STR_UNDO_SUMMARY_PAGE)); bBegUndo = true; } diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index cdead7212cee..51a074342c25 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -183,7 +183,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } else { - pStyleSheet->SetParent(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME)); + pStyleSheet->SetParent(SdResId(STR_STANDARD_STYLESHEET_NAME)); } } break; @@ -198,7 +198,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) p = nullptr; } pStyleSheet = &pSSPool->Make( aStyleName, nFamily, SFXSTYLEBIT_USERDEF ); - pStyleSheet->SetParent(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME)); + pStyleSheet->SetParent(SdResId(STR_STANDARD_STYLESHEET_NAME)); } break; @@ -326,39 +326,39 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) OUString aName(pStyleSheet->GetName()); sal_uInt16 nDlgId = 0; - if (aName == SD_RESSTR(STR_PSEUDOSHEET_TITLE)) + if (aName == SdResId(STR_PSEUDOSHEET_TITLE)) { nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_TITLE; } - else if (aName == SD_RESSTR(STR_PSEUDOSHEET_SUBTITLE)) + else if (aName == SdResId(STR_PSEUDOSHEET_SUBTITLE)) { nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_SUBTITLE; } else if (aName == - SD_RESSTR(STR_PSEUDOSHEET_BACKGROUND)) + SdResId(STR_PSEUDOSHEET_BACKGROUND)) { nDlgId = TAB_PRES_LAYOUT_TEMPLATE_BACKGROUND; ePO = PO_BACKGROUND; } else if (aName == - SD_RESSTR(STR_PSEUDOSHEET_BACKGROUNDOBJECTS)) + SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS)) { nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_BACKGROUNDOBJECTS; } else if (aName == - SD_RESSTR(STR_PSEUDOSHEET_NOTES)) + SdResId(STR_PSEUDOSHEET_NOTES)) { nDlgId = TAB_PRES_LAYOUT_TEMPLATE; ePO = PO_NOTES; } - else if(aName.indexOf(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE)) != -1) + else if(aName.indexOf(SdResId(STR_PSEUDOSHEET_OUTLINE)) != -1) { nDlgId = TAB_PRES_LAYOUT_TEMPLATE; - OUString aOutlineStr(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE)); + OUString aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE)); // determine number, mind the blank between name and number OUString aNumStr(aName.copy(aOutlineStr.getLength() + 1)); sal_uInt16 nLevel = (sal_uInt16)aNumStr.toInt32(); @@ -434,7 +434,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) { SvxNumRule aRule(*aTempSet.GetItem<SvxNumBulletItem>(EE_PARA_NUMBULLET)->GetNumRule()); - OUString sStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1"); + OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1"); SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SD_STYLE_FAMILY_PSEUDO); if(pFirstStyleSheet) diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index e22615cb5728..e794d2602479 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -1391,7 +1391,7 @@ void FuText::ChangeFontSize( bool bGrow, OutlinerView* pOLV, const FontList* pFo else { - pView->BegUndo(SD_RESSTR(bGrow ? STR_GROW_FONT_SIZE : STR_SHRINK_FONT_SIZE)); + pView->BegUndo(SdResId(bGrow ? STR_GROW_FONT_SIZE : STR_SHRINK_FONT_SIZE)); const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); for( size_t nMark = 0; nMark < rMarkList.GetMarkCount(); ++nMark ) { diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index 45aeff70c7b5..ccee671a24f7 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -106,7 +106,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) { // Undo OUString aString( mpView->GetDescriptionOfMarkedObjects() ); - aString += " " + SD_RESSTR( STR_TRANSFORM ); + aString += " " + SdResId( STR_TRANSFORM ); mpView->BegUndo( aString ); mpView->SetGeoAttrToMarked( *pArgs ); diff --git a/sd/source/ui/func/fuvect.cxx b/sd/source/ui/func/fuvect.cxx index bd23fe21b7e5..0d7be7b819eb 100644 --- a/sd/source/ui/func/fuvect.cxx +++ b/sd/source/ui/func/fuvect.cxx @@ -73,7 +73,7 @@ void FuVectorize::DoExecute( SfxRequest& ) { SdrGrafObj* pVectObj = static_cast<SdrGrafObj*>( pObj->Clone() ); OUString aStr( mpView->GetDescriptionOfMarkedObjects() ); - aStr += " " + SD_RESSTR( STR_UNDO_VECTORIZE ); + aStr += " " + SdResId( STR_UNDO_VECTORIZE ); mpView->BegUndo( aStr ); pVectObj->SetGraphic( rMtf ); mpView->ReplaceObjectAtView( pObj, *pPageView, pVectObj ); diff --git a/sd/source/ui/func/unprlout.cxx b/sd/source/ui/func/unprlout.cxx index 0e9c122d74d0..8aaed9932d89 100644 --- a/sd/source/ui/func/unprlout.cxx +++ b/sd/source/ui/func/unprlout.cxx @@ -43,7 +43,7 @@ SdPresentationLayoutUndoAction::SdPresentationLayoutUndoAction( DBG_ASSERT(pThePage, "No Page set!"); pPage = pThePage; - aComment = SD_RESSTR(STR_UNDO_SET_PRESLAYOUT); + aComment = SdResId(STR_UNDO_SET_PRESLAYOUT); } void SdPresentationLayoutUndoAction::Undo() diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx index d6d7c9fd7585..ae147d43cb00 100644 --- a/sd/source/ui/sidebar/DocumentHelper.cxx +++ b/sd/source/ui/sidebar/DocumentHelper.cxx @@ -322,7 +322,7 @@ void DocumentHelper::AssignMasterPageToPageList ( ::svl::IUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager(); if( pUndoMgr ) - pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_SET_PRESLAYOUT), OUString(), 0, rTargetDocument.GetDocSh()->GetViewShell()->GetViewShellBase().GetViewShellId()); + pUndoMgr->EnterListAction(SdResId(STR_UNDO_SET_PRESLAYOUT), OUString(), 0, rTargetDocument.GetDocSh()->GetViewShell()->GetViewShellBase().GetViewShellId()); SdPage* pMasterPageInDocument = ProvideMasterPage(rTargetDocument,pMasterPage,rpPageList); if (pMasterPageInDocument == nullptr) diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 93159a16beae..770ea132666b 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -468,9 +468,9 @@ SfxRequest LayoutMenu::CreateRequest ( { SdrLayerAdmin& rLayerAdmin (mrBase.GetDocument()->GetLayerAdmin()); SdrLayerID aBackground (rLayerAdmin.GetLayerID( - SD_RESSTR(STR_LAYER_BCKGRND))); + SdResId(STR_LAYER_BCKGRND))); SdrLayerID aBackgroundObject (rLayerAdmin.GetLayerID( - SD_RESSTR(STR_LAYER_BCKGRNDOBJ))); + SdResId(STR_LAYER_BCKGRNDOBJ))); ViewShell* pViewShell = mrBase.GetMainViewShell().get(); if (pViewShell == nullptr) break; diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index cd71372756e7..7425518a5980 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -343,12 +343,12 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, { if( IsImpress() ) { - SetPanelTitle(SD_RESSTR(STR_MASTERSLIDE_NAME)); + SetPanelTitle(SdResId(STR_MASTERSLIDE_NAME)); mpEditMaster->Hide(); mpCloseMaster->Show(); } else - SetPanelTitle(SD_RESSTR(STR_MASTERPAGE_NAME)); + SetPanelTitle(SdResId(STR_MASTERPAGE_NAME)); mpMasterSlide->Disable(); mpDspMasterBackground->Disable(); mpDspMasterObjects->Disable(); @@ -357,12 +357,12 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, { if( IsImpress() ) { - SetPanelTitle(SD_RESSTR(STR_SLIDE_NAME)); + SetPanelTitle(SdResId(STR_SLIDE_NAME)); mpCloseMaster->Hide(); mpEditMaster->Show(); } else - SetPanelTitle(SD_RESSTR(STR_PAGE_NAME)); + SetPanelTitle(SdResId(STR_PAGE_NAME)); mpMasterSlide->Enable(); mpDspMasterBackground->Enable(); mpDspMasterObjects->Enable(); @@ -401,25 +401,25 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener, vcl::EnumContext::Context::MasterPage); if(maContext == aDrawOtherContext || maContext == aDrawMasterContext) { - mpMasterLabel->SetText(SD_RESSTR(STR_MASTERPAGE_NAME)); + mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_NAME)); maApplication = vcl::EnumContext::Application::Draw; mpCloseMaster->Hide(); mpEditMaster->Hide(); if( maContext == aDrawMasterContext) - SetPanelTitle(SD_RESSTR(STR_MASTERPAGE_NAME)); + SetPanelTitle(SdResId(STR_MASTERPAGE_NAME)); else - SetPanelTitle(SD_RESSTR(STR_PAGE_NAME)); + SetPanelTitle(SdResId(STR_PAGE_NAME)); } else if ( maContext == aImpressOtherContext || maContext == aImpressMasterContext ) { - mpMasterLabel->SetText(SD_RESSTR(STR_MASTERSLIDE_NAME)); + mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_NAME)); maApplication = vcl::EnumContext::Application::Impress; mpCloseMaster->Hide(); mpEditMaster->Show(); if( maContext == aImpressMasterContext ) - SetPanelTitle(SD_RESSTR(STR_MASTERSLIDE_NAME)); + SetPanelTitle(SdResId(STR_MASTERSLIDE_NAME)); else - SetPanelTitle(SD_RESSTR(STR_SLIDE_NAME)); + SetPanelTitle(SdResId(STR_SLIDE_NAME)); } mbTitle = true; } diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index 4f3d4d23e5c8..1043ee7a1af0 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -118,9 +118,9 @@ public: if (mpDocument!=nullptr && mpDocument->IsUndoEnabled()) { if (mpMainViewShell && mpMainViewShell->GetShellType() == ViewShell::ST_DRAW) - mpDocument->BegUndo(SD_RESSTR(STRING_DRAG_AND_DROP_PAGES)); + mpDocument->BegUndo(SdResId(STRING_DRAG_AND_DROP_PAGES)); else - mpDocument->BegUndo(SD_RESSTR(STRING_DRAG_AND_DROP_SLIDES)); + mpDocument->BegUndo(SdResId(STRING_DRAG_AND_DROP_SLIDES)); } } diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index aef29161a600..67180808ecf2 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -834,7 +834,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet) nPageCount = mrSlideSorter.GetModel().GetPageCount(); nActivePageCount = static_cast<sal_Int32>(mrSlideSorter.GetModel().GetDocument()->GetActiveSdPageCount()); - aPageStr = (nPageCount == nActivePageCount) ? SD_RESSTR(STR_SD_PAGE_COUNT) : SD_RESSTR(STR_SD_PAGE_COUNT_CUSTOM); + aPageStr = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); aPageStr = aPageStr.replaceFirst("%1", OUString::number(nFirstPage)); aPageStr = aPageStr.replaceFirst("%2", OUString::number(nPageCount)); @@ -946,8 +946,8 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri // Undo SdPage* pUndoPage = pPageToRename; SdrLayerAdmin & rLayerAdmin = pDocument->GetLayerAdmin(); - SdrLayerID nBackground = rLayerAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRND ) ); - SdrLayerID nBgObj = rLayerAdmin.GetLayerID( SD_RESSTR( STR_LAYER_BCKGRNDOBJ ) ); + SdrLayerID nBackground = rLayerAdmin.GetLayerID( SdResId( STR_LAYER_BCKGRND ) ); + SdrLayerID nBgObj = rLayerAdmin.GetLayerID( SdResId( STR_LAYER_BCKGRNDOBJ ) ); SdrLayerIDSet aVisibleLayers = pPageToRename->TRG_GetMasterPageVisibleLayers(); // (#67720#) @@ -1089,7 +1089,7 @@ void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest) // created pages in aPagesToSelect. const bool bUndo (aPagesToDuplicate.size()>1 && mrSlideSorter.GetView().IsUndoEnabled()); if (bUndo) - mrSlideSorter.GetView().BegUndo(SD_RESSTR(STR_INSERTPAGE)); + mrSlideSorter.GetView().BegUndo(SdResId(STR_INSERTPAGE)); ::std::vector<SdPage*> aPagesToSelect; for(::std::vector<SdPage*>::const_iterator diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index 515520b8371a..3835ca5bd6b2 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -77,7 +77,7 @@ void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor) } if (sHelpText.isEmpty()) { - sHelpText = SD_RESSTR(STR_PAGE); + sHelpText = SdResId(STR_PAGE); sHelpText += OUString::number(mpDescriptor->GetPageIndex()+1); } diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx index 7f69df7c14a2..139c59cfb507 100644 --- a/sd/source/ui/table/tableobjectbar.cxx +++ b/sd/source/ui/table/tableobjectbar.cxx @@ -91,7 +91,7 @@ TableObjectBar::TableObjectBar( ViewShell* pSdViewShell, ::sd::View* pSdView ) SetUndoManager( pDocShell->GetUndoManager() ); } SetRepeatTarget( mpView ); - SetName( SD_RESSTR( RID_DRAW_TABLE_TOOLBOX ) ); + SetName( SdResId( RID_DRAW_TABLE_TOOLBOX ) ); SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Table)); } diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index aa2d98380918..847e101cfe21 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -81,23 +81,23 @@ OUString SdLayer::convertToInternalName( const OUString& rName ) { if ( rName == sUNO_LayerName_background ) { - return SD_RESSTR( STR_LAYER_BCKGRND ); + return SdResId( STR_LAYER_BCKGRND ); } else if ( rName == sUNO_LayerName_background_objects ) { - return SD_RESSTR( STR_LAYER_BCKGRNDOBJ ); + return SdResId( STR_LAYER_BCKGRNDOBJ ); } else if ( rName == sUNO_LayerName_layout ) { - return SD_RESSTR( STR_LAYER_LAYOUT ); + return SdResId( STR_LAYER_LAYOUT ); } else if ( rName == sUNO_LayerName_controls ) { - return SD_RESSTR( STR_LAYER_CONTROLS ); + return SdResId( STR_LAYER_CONTROLS ); } else if ( rName == sUNO_LayerName_measurelines ) { - return SD_RESSTR( STR_LAYER_MEASURELINES ); + return SdResId( STR_LAYER_MEASURELINES ); } else { @@ -107,23 +107,23 @@ OUString SdLayer::convertToInternalName( const OUString& rName ) OUString SdLayer::convertToExternalName( const OUString& rName ) { - if( rName == SD_RESSTR( STR_LAYER_BCKGRND ) ) + if( rName == SdResId( STR_LAYER_BCKGRND ) ) { return OUString( sUNO_LayerName_background ); } - else if( rName == SD_RESSTR( STR_LAYER_BCKGRNDOBJ ) ) + else if( rName == SdResId( STR_LAYER_BCKGRNDOBJ ) ) { return OUString( sUNO_LayerName_background_objects ); } - else if( rName == SD_RESSTR( STR_LAYER_LAYOUT ) ) + else if( rName == SdResId( STR_LAYER_LAYOUT ) ) { return OUString( sUNO_LayerName_layout ); } - else if( rName == SD_RESSTR( STR_LAYER_CONTROLS ) ) + else if( rName == SdResId( STR_LAYER_CONTROLS ) ) { return OUString( sUNO_LayerName_controls ); } - else if( rName == SD_RESSTR( STR_LAYER_MEASURELINES ) ) + else if( rName == SdResId( STR_LAYER_MEASURELINES ) ) { return OUString( sUNO_LayerName_measurelines ); } @@ -488,7 +488,7 @@ uno::Reference< drawing::XLayer > SAL_CALL SdLayerManager::insertNewByIndex( sal // Test for existing names while( aLayerName.isEmpty() || rLayerAdmin.GetLayer( aLayerName ) ) { - aLayerName = SD_RESSTR(STR_LAYER); + aLayerName = SdResId(STR_LAYER); aLayerName += OUString::number(nLayer); ++nLayer; } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index b5c478e549f1..bf8f41b28534 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -468,8 +468,8 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate ) { sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PageKind::Standard ); SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); SdPage* pStandardPage = nullptr; @@ -530,8 +530,8 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate ) pStandardPage->SetAutoLayout(AUTOLAYOUT_NONE, true ); } - aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); aVisibleLayers.Set(aBckgrnd, bIsPageBack); aVisibleLayers.Set(aBckgrndObj, bIsPageObj); pStandardPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 8b02b73abe77..5a161ce673b2 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -793,7 +793,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aVisibleLayers.Set(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)), bVisible); + aVisibleLayers.Set(rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)), bVisible); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } } @@ -813,7 +813,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aVisibleLayers.Set(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)), bVisible); + aVisibleLayers.Set(rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)), bVisible); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } } @@ -1218,7 +1218,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND))); + aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND))); } else { @@ -1237,7 +1237,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) { SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin(); SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); - aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ))); + aAny <<= aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ))); } else { @@ -2164,7 +2164,7 @@ OUString getPageApiNameFromUiName( const OUString& rUIName ) { OUString aApiName; - OUString aDefPageName(SD_RESSTR(STR_PAGE) + " "); + OUString aDefPageName(SdResId(STR_PAGE) + " "); if( rUIName.startsWith( aDefPageName ) ) { @@ -2212,7 +2212,7 @@ OUString getUiNameFromPageApiNameImpl( const OUString& rApiName ) if( nPageNumber != -1) { OUStringBuffer sBuffer; - sBuffer.append( SD_RESSTR(STR_PAGE) ); + sBuffer.append( SdResId(STR_PAGE) ); sBuffer.append( ' ' ); sBuffer.append( aNumber ); return sBuffer.makeStringAndClear(); @@ -2295,7 +2295,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName ) } else { - OUString aDefaultPageName( SD_RESSTR(STR_PAGE) + " " ); + OUString aDefaultPageName( SdResId(STR_PAGE) + " " ); if( aName.startsWith( aDefaultPageName ) ) aName.clear(); } diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 9d29bcac5c99..3ebc5f6c3723 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -373,7 +373,7 @@ namespace { maProperties.push_back(aOptionsUIFile); SvtModuleOptions aOpt; - OUString aAppGroupname(SD_RESSTR(STR_IMPRESS_PRINT_UI_GROUP_NAME)); + OUString aAppGroupname(SdResId(STR_IMPRESS_PRINT_UI_GROUP_NAME)); aAppGroupname = aAppGroupname.replaceFirst("%s", aOpt.GetModuleName( mbImpress ? SvtModuleOptions::EModule::IMPRESS : SvtModuleOptions::EModule::DRAW)); AddDialogControl(vcl::PrinterOptionsHelper::setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage")); @@ -384,7 +384,7 @@ namespace { vcl::PrinterOptionsHelper::UIControlOptions aPrintOpt; aPrintOpt.maGroupHint = "JobPage" ; AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("extraimpressprintoptions", - SD_RESSTR(STR_IMPRESS_PRINT_UI_PRINT_GROUP), + SdResId(STR_IMPRESS_PRINT_UI_PRINT_GROUP), "", aPrintOpt )); @@ -392,7 +392,7 @@ namespace { aHelpIds[0] = ".HelpID:vcl:PrintDialog:PageContentType:ListBox" ; AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt( "impressdocument", - SD_RESSTR(STR_IMPRESS_PRINT_UI_CONTENT), + SdResId(STR_IMPRESS_PRINT_UI_CONTENT), aHelpIds, "PageContentType" , CreateChoice(STR_IMPRESS_PRINT_UI_CONTENT_CHOICES), @@ -403,7 +403,7 @@ namespace { vcl::PrinterOptionsHelper::UIControlOptions aContentOpt( "PageContentType" , 1 ); AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt( "slidesperpage", - SD_RESSTR(STR_IMPRESS_PRINT_UI_SLIDESPERPAGE), + SdResId(STR_IMPRESS_PRINT_UI_SLIDESPERPAGE), aHelpIds, "SlidesPerPage" , GetSlidesPerPageSequence(), @@ -417,7 +417,7 @@ namespace { vcl::PrinterOptionsHelper::UIControlOptions aSlidesPerPageOpt( "SlidesPerPage" , -1, true ); AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt( "slidesperpageorder", - SD_RESSTR(STR_IMPRESS_PRINT_UI_ORDER), + SdResId(STR_IMPRESS_PRINT_UI_ORDER), aHelpIds, "SlidesPerPageOrder" , CreateChoice(STR_IMPRESS_PRINT_UI_ORDER_CHOICES), @@ -428,12 +428,12 @@ namespace { } AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("contents", - SD_RESSTR(STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT), "" ) ); + SdResId(STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT), "" ) ); if( mbImpress ) { AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printname", - SD_RESSTR(STR_IMPRESS_PRINT_UI_IS_PRINT_NAME), + SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_NAME), ".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" , "IsPrintName" , false @@ -443,7 +443,7 @@ namespace { else { AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printname", - SD_RESSTR(STR_DRAW_PRINT_UI_IS_PRINT_NAME), + SdResId(STR_DRAW_PRINT_UI_IS_PRINT_NAME), ".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" , "IsPrintName" , false @@ -452,7 +452,7 @@ namespace { } AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printdatetime", - SD_RESSTR(STR_IMPRESS_PRINT_UI_IS_PRINT_DATE), + SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_DATE), ".HelpID:vcl:PrintDialog:IsPrintDateTime:CheckBox" , "IsPrintDateTime" , false @@ -462,7 +462,7 @@ namespace { if( mbImpress ) { AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printhidden", - SD_RESSTR(STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN), + SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN), ".HelpID:vcl:PrintDialog:IsPrintHidden:CheckBox" , "IsPrintHidden" , false @@ -471,7 +471,7 @@ namespace { } AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("color", - SD_RESSTR(STR_IMPRESS_PRINT_UI_QUALITY), "" ) ); + SdResId(STR_IMPRESS_PRINT_UI_QUALITY), "" ) ); aHelpIds.realloc( 3 ); aHelpIds[0] = ".HelpID:vcl:PrintDialog:Quality:RadioButton:0" ; @@ -491,7 +491,7 @@ namespace { ); AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("pagesizes", - SD_RESSTR(STR_IMPRESS_PRINT_UI_PAGE_OPTIONS), "" ) ); + SdResId(STR_IMPRESS_PRINT_UI_PAGE_OPTIONS), "" ) ); aHelpIds.realloc( 4 ); aHelpIds[0] = ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:0" ; @@ -520,12 +520,12 @@ namespace { vcl::PrinterOptionsHelper::UIControlOptions aBrochureOpt; aBrochureOpt.maGroupHint = "LayoutPage" ; AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("pagesides", - SD_RESSTR(STR_IMPRESS_PRINT_UI_PAGE_SIDES), "", + SdResId(STR_IMPRESS_PRINT_UI_PAGE_SIDES), "", aBrochureOpt ) ); // brochure printing AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("brochure", - SD_RESSTR(STR_IMPRESS_PRINT_UI_BROCHURE), + SdResId(STR_IMPRESS_PRINT_UI_BROCHURE), ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" , "PrintProspect" , false, @@ -540,7 +540,7 @@ namespace { aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintProspectInclude:ListBox" ; AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt( "brochureinclude", - SD_RESSTR(STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE), + SdResId(STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE), aHelpIds, "PrintProspectInclude" , CreateChoice(STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST), @@ -554,7 +554,7 @@ namespace { vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt; aPaperTrayOpt.maGroupHint = "OptionsPageOptGroup" ; AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printpaperfromsetup", - SD_RESSTR(STR_IMPRESS_PRINT_UI_PAPER_TRAY), + SdResId(STR_IMPRESS_PRINT_UI_PAPER_TRAY), ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" , "PrintPaperFromSetup" , false, @@ -566,7 +566,7 @@ namespace { aPrintRangeOpt.mbInternalOnly = true; aPrintRangeOpt.maGroupHint = "PrintRange" ; AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("printrange", - SD_RESSTR(STR_IMPRESS_PRINT_UI_PAGE_RANGE), + SdResId(STR_IMPRESS_PRINT_UI_PAGE_RANGE), "", aPrintRangeOpt ) ); @@ -633,7 +633,7 @@ namespace { static Sequence<OUString> CreateChoice (const sal_uInt16 nResourceId) { - SdResId aResourceId (nResourceId); + ResId aResourceId(nResourceId, *SD_MOD()->GetResMgr()); ResStringArray aChoiceStrings (aResourceId); const sal_uInt32 nCount (aChoiceStrings.Count()); @@ -1301,7 +1301,7 @@ public: ScopedVclPtrInstance<WarningBox> aWarnBox( pViewShell->GetActiveWindow(), (WinBits)(WB_OK_CANCEL | WB_DEF_CANCEL), - SD_RESSTR(STR_WARN_PRINTFORMAT_FAILURE)); + SdResId(STR_WARN_PRINTFORMAT_FAILURE)); if (aWarnBox->Execute() != RET_OK) return; } diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx index c03c3363777d..eb9b6be057b6 100644 --- a/sd/source/ui/view/GraphicObjectBar.cxx +++ b/sd/source/ui/view/GraphicObjectBar.cxx @@ -133,7 +133,7 @@ void GraphicObjectBar::ExecuteFilter( SfxRequest& rReq ) { SdrGrafObj* pFilteredObj = static_cast<SdrGrafObj*>( pObj->Clone() ); OUString aStr = mpView->GetDescriptionOfMarkedObjects(); - aStr += " " + SD_RESSTR(STR_UNDO_GRAFFILTER); + aStr += " " + SdResId(STR_UNDO_GRAFFILTER); mpView->BegUndo( aStr ); pFilteredObj->SetGraphicObject( aFilterObj ); ::sd::View* const pView = mpView; diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index dbce5caf3d55..f2413042fd6a 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -65,7 +65,7 @@ MediaObjectBar::MediaObjectBar( ViewShell* pSdViewShell, ::sd::View* pSdView ) : SetPool( &pDocShell->GetPool() ); SetUndoManager( pDocShell->GetUndoManager() ); SetRepeatTarget( mpView ); - SetName(SD_RESSTR(RID_DRAW_MEDIA_TOOLBOX)); + SetName(SdResId(RID_DRAW_MEDIA_TOOLBOX)); } MediaObjectBar::~MediaObjectBar() diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 0cd8df02d24e..002c6baf16ad 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1196,9 +1196,9 @@ void SdOutliner::ShowEndOfSearchDialog() OUString aString; if (mpView->AreObjectsMarked()) - aString = SD_RESSTR(STR_END_SPELLING_OBJ); + aString = SdResId(STR_END_SPELLING_OBJ); else - aString = SD_RESSTR(STR_END_SPELLING); + aString = SdResId(STR_END_SPELLING); // Show the message in an info box that is modal with respect to the // whole application. @@ -1241,7 +1241,7 @@ bool SdOutliner::ShowWrapArroundDialog() // Pop up question box that asks the user whether to wrap around. // The dialog is made modal with respect to the whole application. - ScopedVclPtrInstance<QueryBox> aQuestionBox(nullptr, WB_YES_NO | WB_DEF_YES, SD_RESSTR(nStringId)); + ScopedVclPtrInstance<QueryBox> aQuestionBox(nullptr, WB_YES_NO | WB_DEF_YES, SdResId(nStringId)); aQuestionBox->SetImage(QueryBox::GetStandardImage()); sal_uInt16 nBoxResult = ShowModalMessageBox(*aQuestionBox.get()); diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index 5a9fca237af6..d8ac5cd4401f 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -198,8 +198,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( pCurrentPage->SetAutoLayout(aNewAutoLayout, true); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); aVisibleLayers.Set(aBckgrnd, bBVisible); aVisibleLayers.Set(aBckgrndObj, bBObjsVisible); pCurrentPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); @@ -259,8 +259,8 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP // Transform the given request into the four argument form that is // understood by ProcessModifyPageSlot(). SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin()); - SdrLayerID aBackground (rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND))); - SdrLayerID aBackgroundObject (rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ))); + SdrLayerID aBackground (rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND))); + SdrLayerID aBackgroundObject (rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ))); SdrLayerIDSet aVisibleLayers; diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 26ac7a9b4f22..314e110b8b16 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -180,8 +180,8 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet, mpDocSh->SetWaitCursor( true ); // replace placeholder by template name - OUString aComment(SD_RESSTR(STR_UNDO_CHANGE_PRES_OBJECT)); - aComment = aComment.replaceFirst("$", SD_RESSTR(STR_PSEUDOSHEET_OUTLINE)); + OUString aComment(SdResId(STR_UNDO_CHANGE_PRES_OBJECT)); + aComment = aComment.replaceFirst("$", SdResId(STR_PSEUDOSHEET_OUTLINE)); mpDocSh->GetUndoManager()->EnterListAction( aComment, OUString(), 0, mpDrawViewShell->GetViewShellBase().GetViewShellId() ); std::vector<Paragraph*> aSelList; @@ -435,7 +435,7 @@ bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAtt if (IsPresObjSelected(false)) { ScopedVclPtrInstance<InfoBox>(mpDrawViewShell->GetActiveWindow(), - SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); bResult = false; } else @@ -518,7 +518,7 @@ void DrawView::DeleteMarked() if( pUndoManager ) { - OUString aUndo(SVX_RESSTR(STR_EditDelete)); + OUString aUndo(SvxResId(STR_EditDelete)); aUndo = aUndo.replaceFirst("%1", GetDescriptionOfMarkedObjects()); ViewShellId nViewShellId = mpDrawViewShell ? mpDrawViewShell->GetViewShellBase().GetViewShellId() : ViewShellId(-1); pUndoManager->EnterListAction(aUndo, aUndo, 0, nViewShellId); diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx index 0511db501b81..bf52bffe3f0b 100644 --- a/sd/source/ui/view/drbezob.cxx +++ b/sd/source/ui/view/drbezob.cxx @@ -261,7 +261,7 @@ void BezierObjectBar::Execute(SfxRequest& rReq) SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj() ); const bool bUndo = mpView->IsUndoEnabled(); if( bUndo ) - mpView->BegUndo(SD_RESSTR(STR_UNDO_BEZCLOSE)); + mpView->BegUndo(SdResId(STR_UNDO_BEZCLOSE)); mpView->UnmarkAllPoints(); diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 9a084422fc29..351b5a960b31 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -363,7 +363,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) { const SvxNumBulletItem *pItem = nullptr; SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool(); - OUString sStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1"); + OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1"); SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find(sStyleName, SD_STYLE_FAMILY_PSEUDO); if( pFirstStyleSheet ) pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem)); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 5007bfff0f52..78e5d42b9c79 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1149,11 +1149,11 @@ void DrawViewShell::ResetActualLayer() OUString aName; OUString aActiveLayer = mpDrawView->GetActiveLayer(); - OUString aBackgroundLayer = SD_RESSTR(STR_LAYER_BCKGRND); - OUString aBackgroundObjLayer = SD_RESSTR(STR_LAYER_BCKGRNDOBJ); - OUString aLayoutLayer = SD_RESSTR(STR_LAYER_LAYOUT); - OUString aControlsLayer = SD_RESSTR(STR_LAYER_CONTROLS); - OUString aMeasureLinesLayer = SD_RESSTR(STR_LAYER_MEASURELINES); + OUString aBackgroundLayer = SdResId(STR_LAYER_BCKGRND); + OUString aBackgroundObjLayer = SdResId(STR_LAYER_BCKGRNDOBJ); + OUString aLayoutLayer = SdResId(STR_LAYER_LAYOUT); + OUString aControlsLayer = SdResId(STR_LAYER_CONTROLS); + OUString aMeasureLinesLayer = SdResId(STR_LAYER_MEASURELINES); sal_uInt16 nActiveLayerPos = SDRLAYERPOS_NOTFOUND; SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); sal_uInt16 nLayerCnt = rLayerAdmin.GetLayerCount(); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 1ea7eae77139..a189006ea60d 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -425,8 +425,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) ? GetDoc()->GetSdPage( nPage, GetPageKind() ) : GetDoc()->GetMasterSdPage( nPage, GetPageKind() ); - OUString aTitle = SD_RESSTR(STR_TITLE_RENAMESLIDE); - OUString aDescr = SD_RESSTR(STR_DESC_RENAMESLIDE); + OUString aTitle = SdResId(STR_TITLE_RENAMESLIDE); + OUString aDescr = SdResId(STR_DESC_RENAMESLIDE); OUString aPageName = pCurrentPage->GetName(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -604,7 +604,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -649,7 +649,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -677,7 +677,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(true,true,true) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -690,7 +690,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_CONVERT_TO_METAFILE: { // switch on undo for the next operations - mpDrawView->BegUndo(SD_RESSTR(STR_UNDO_CONVERT_TO_METAFILE)); + mpDrawView->BegUndo(SdResId(STR_UNDO_CONVERT_TO_METAFILE)); GDIMetaFile aMetaFile(mpDrawView->GetMarkedObjMetaFile()); aGraphic = Graphic(aMetaFile); } @@ -698,7 +698,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_CONVERT_TO_BITMAP: { // switch on undo for the next operations - mpDrawView->BegUndo(SD_RESSTR(STR_UNDO_CONVERT_TO_BITMAP)); + mpDrawView->BegUndo(SdResId(STR_UNDO_CONVERT_TO_BITMAP)); bool bDone(false); // I have to get the image here directly since GetMarkedObjBitmapEx works @@ -1160,7 +1160,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -1345,7 +1345,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) #endif ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(nId))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(nId))->Execute(); } else { @@ -1376,7 +1376,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); sal_uInt16 nLayerCnt = rLayerAdmin.GetLayerCount(); sal_uInt16 nLayer = nLayerCnt - 2 + 1; - OUString aLayerName = SD_RESSTR(STR_LAYER) + OUString::number(nLayer); + OUString aLayerName = SdResId(STR_LAYER) + OUString::number(nLayer); OUString aLayerTitle, aLayerDesc; bool bIsVisible = false; bool bIsLocked = false; @@ -1397,7 +1397,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aNewAttr.Put( makeSdAttrLayerThisPage() ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(GetActiveWindow(), aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : nullptr); + ScopedVclPtr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(GetActiveWindow(), aNewAttr, true, SdResId(STR_INSERTLAYER)) : nullptr); if( pDlg ) { pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_INSERTLAYER )->GetCommand() ); @@ -1416,7 +1416,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) ScopedVclPtrInstance<WarningBox> aWarningBox ( GetParentWindow(), WinBits( WB_OK ), - SD_RESSTR(STR_WARN_NAME_DUPLICATE)); + SdResId(STR_WARN_NAME_DUPLICATE)); aWarningBox->Execute(); } else @@ -1539,11 +1539,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) // is it allowed to delete the layer? bool bDelete = true; - OUString aLayoutLayer = SD_RESSTR(STR_LAYER_LAYOUT); - OUString aControlsLayer = SD_RESSTR(STR_LAYER_CONTROLS); - OUString aMeasureLinesLayer = SD_RESSTR(STR_LAYER_MEASURELINES); - OUString aBackgroundLayer = SD_RESSTR(STR_LAYER_BCKGRND); - OUString aBackgroundObjLayer = SD_RESSTR(STR_LAYER_BCKGRNDOBJ); + OUString aLayoutLayer = SdResId(STR_LAYER_LAYOUT); + OUString aControlsLayer = SdResId(STR_LAYER_CONTROLS); + OUString aMeasureLinesLayer = SdResId(STR_LAYER_MEASURELINES); + OUString aBackgroundLayer = SdResId(STR_LAYER_BCKGRND); + OUString aBackgroundObjLayer = SdResId(STR_LAYER_BCKGRNDOBJ); if( aLayerName == aLayoutLayer || aLayerName == aControlsLayer || aLayerName == aMeasureLinesLayer || @@ -1565,7 +1565,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aNewAttr.Put( makeSdAttrLayerThisPage() ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(GetActiveWindow(), aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : nullptr); + ScopedVclPtr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(GetActiveWindow(), aNewAttr, bDelete, SdResId(STR_MODIFYLAYER)) : nullptr); if( pDlg ) { pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_MODIFYLAYER )->GetCommand() ); @@ -1585,7 +1585,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) ScopedVclPtrInstance<WarningBox> aWarningBox ( GetParentWindow(), WinBits( WB_OK ), - SD_RESSTR(STR_WARN_NAME_DUPLICATE)); + SdResId(STR_WARN_NAME_DUPLICATE)); aWarningBox->Execute(); } else @@ -1815,7 +1815,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if (nDepth != sal_uInt16(-1) && nDepth < 8) { sal_uInt16 nNewDepth = nDepth+1; - pOL->Insert(SD_RESSTR(STR_PRESOBJ_MPOUTLINE+nNewDepth), EE_PARA_APPEND, nNewDepth); + pOL->Insert(SdResId(STR_PRESOBJ_MPOUTLINE+nNewDepth), EE_PARA_APPEND, nNewDepth); } } } @@ -2052,7 +2052,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected( true, true, true ) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2171,7 +2171,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2188,7 +2188,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2208,7 +2208,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2229,7 +2229,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2250,7 +2250,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2292,7 +2292,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2384,7 +2384,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -2868,9 +2868,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); SdrLayerID aLayerId; if (nSId == SID_DISPLAY_MASTER_BACKGROUND) - aLayerId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); + aLayerId = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); else - aLayerId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + aLayerId = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); aVisibleLayers.Set(aLayerId, !aVisibleLayers.IsSet(aLayerId)); pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); } diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 2a3aedf19bba..ab4aaf5f6936 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -253,7 +253,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) } // turn on default layer of page - mpDrawView->SetActiveLayer(SD_RESSTR(STR_LAYER_LAYOUT)); + mpDrawView->SetActiveLayer(SdResId(STR_LAYER_LAYOUT)); ChangeEditMode(EditMode::Page, mbIsLayerModeActive); @@ -1043,16 +1043,16 @@ void DrawViewShell::GetSnapItemState( SfxItemSet &rSet ) if ( rHelpLine.GetKind() == SdrHelpLineKind::Point ) { rSet.Put( SfxStringItem( SID_SET_SNAPITEM, - SD_RESSTR( STR_POPUP_EDIT_SNAPPOINT)) ); + SdResId( STR_POPUP_EDIT_SNAPPOINT)) ); rSet.Put( SfxStringItem( SID_DELETE_SNAPITEM, - SD_RESSTR( STR_POPUP_DELETE_SNAPPOINT)) ); + SdResId( STR_POPUP_DELETE_SNAPPOINT)) ); } else { rSet.Put( SfxStringItem( SID_SET_SNAPITEM, - SD_RESSTR( STR_POPUP_EDIT_SNAPLINE)) ); + SdResId( STR_POPUP_EDIT_SNAPLINE)) ); rSet.Put( SfxStringItem( SID_DELETE_SNAPITEM, - SD_RESSTR( STR_POPUP_DELETE_SNAPLINE)) ); + SdResId( STR_POPUP_DELETE_SNAPLINE)) ); } } } diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 6bc0613f250a..881b18306136 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -101,7 +101,7 @@ void DrawViewShell::DeleteActualLayer() SdrLayerAdmin& rAdmin = GetDoc()->GetLayerAdmin(); const OUString& rName = GetLayerTabControl()->GetPageText(GetLayerTabControl()->GetCurPageId()); - OUString aString(SD_RESSTR(STR_ASK_DELETE_LAYER)); + OUString aString(SdResId(STR_ASK_DELETE_LAYER)); // replace placeholder aString = aString.replaceFirst("$", rName); @@ -875,21 +875,21 @@ void DrawViewShell::ShowSnapLineContextMenu ( { pMenu->InsertItem( SID_SET_SNAPITEM, - SD_RESSTR(STR_POPUP_EDIT_SNAPPOINT)); + SdResId(STR_POPUP_EDIT_SNAPPOINT)); pMenu->InsertSeparator(); pMenu->InsertItem( SID_DELETE_SNAPITEM, - SD_RESSTR(STR_POPUP_DELETE_SNAPPOINT)); + SdResId(STR_POPUP_DELETE_SNAPPOINT)); } else { pMenu->InsertItem( SID_SET_SNAPITEM, - SD_RESSTR(STR_POPUP_EDIT_SNAPLINE)); + SdResId(STR_POPUP_EDIT_SNAPLINE)); pMenu->InsertSeparator(); pMenu->InsertItem( SID_DELETE_SNAPITEM, - SD_RESSTR(STR_POPUP_DELETE_SNAPLINE)); + SdResId(STR_POPUP_DELETE_SNAPLINE)); } pMenu->RemoveDisabledEntries(false); diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 1e137982404e..d34931a65364 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -309,7 +309,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq ) pNewObj->SetGraphic(pBmpMask->Mask(pNewObj->GetGraphic())); OUString aStr( mpDrawView->GetDescriptionOfMarkedObjects() ); - aStr += " " + SD_RESSTR(STR_EYEDROPPER); + aStr += " " + SdResId(STR_EYEDROPPER); mpDrawView->BegUndo( aStr ); mpDrawView->ReplaceObjectAtView( pObj, *pPV, pNewObj ); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 9e9c3bbee364..cf684596dbb6 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -818,11 +818,11 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) const OUString& rName = GetLayerTabControl()->GetPageText(nCurrentLayer); bool bDisableIt = !IsLayerModeActive(); - bDisableIt |= (rName == SD_RESSTR(STR_LAYER_LAYOUT)); - bDisableIt |= (rName == SD_RESSTR(STR_LAYER_BCKGRND)); - bDisableIt |= (rName == SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); - bDisableIt |= (rName == SD_RESSTR(STR_LAYER_CONTROLS)); - bDisableIt |= (rName == SD_RESSTR(STR_LAYER_MEASURELINES)); + bDisableIt |= (rName == SdResId(STR_LAYER_LAYOUT)); + bDisableIt |= (rName == SdResId(STR_LAYER_BCKGRND)); + bDisableIt |= (rName == SdResId(STR_LAYER_BCKGRNDOBJ)); + bDisableIt |= (rName == SdResId(STR_LAYER_CONTROLS)); + bDisableIt |= (rName == SdResId(STR_LAYER_MEASURELINES)); if (bDisableIt) { @@ -1522,8 +1522,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) { SdrLayerIDSet aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); - SdrLayerID aBackgroundId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aObjectId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBackgroundId = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aObjectId = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_BACKGROUND, aVisibleLayers.IsSet(aBackgroundId))); rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_OBJECTS, diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index 0bb246b89ec5..775ce699bf4d 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -157,7 +157,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq) pNewGrafObj->SetGraphic(aGraphic); OUString aStr(mpDrawView->GetDescriptionOfMarkedObjects()); - aStr += " " + SD_RESSTR(STR_UNDO_REPLACE); + aStr += " " + SdResId(STR_UNDO_REPLACE); mpDrawView->BegUndo(aStr); SdrPageView* pPV = mpDrawView->GetSdrPageView(); mpDrawView->ReplaceObjectAtView(pGrafObj, *pPV, pNewGrafObj); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 3a97a1b183ed..24d8cac6f277 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -655,7 +655,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) sal_Int32 nPageCount = sal_Int32(GetDoc()->GetSdPageCount(mePageKind)); sal_Int32 nActivePageCount = sal_Int32(GetDoc()->GetActiveSdPageCount()); // Always show the slide/page number. - OUString aOUString = (nPageCount == nActivePageCount) ? SD_RESSTR(STR_SD_PAGE_COUNT) : SD_RESSTR(STR_SD_PAGE_COUNT_CUSTOM); + OUString aOUString = (nPageCount == nActivePageCount) ? SdResId(STR_SD_PAGE_COUNT) : SdResId(STR_SD_PAGE_COUNT_CUSTOM); aOUString = aOUString.replaceFirst("%1", OUString::number(maTabControl->GetCurPagePos() + 1)); aOUString = aOUString.replaceFirst("%2", OUString::number(nPageCount)); diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index a9a60fb35408..6381526a08f3 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -81,8 +81,8 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName ) // Undo SdPage* pUndoPage = pPageToRename; SdrLayerAdmin & rLayerAdmin = GetDoc()->GetLayerAdmin(); - SdrLayerID nBackground = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRND) ); - SdrLayerID nBgObj = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) ); + SdrLayerID nBackground = rLayerAdmin.GetLayerID( SdResId(STR_LAYER_BCKGRND) ); + SdrLayerID nBgObj = rLayerAdmin.GetLayerID( SdResId(STR_LAYER_BCKGRNDOBJ) ); SdrLayerIDSet aVisibleLayers = mpActualPage->TRG_GetMasterPageVisibleLayers(); ::svl::IUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager(); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index e3b59fa2ee97..54b3628826cc 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -327,10 +327,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE) )->Execute(); } else if ( ScopedVclPtrInstance<QueryBox>(GetActiveWindow(), WB_YES_NO, - SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER) + SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER) )->Execute() == RET_YES ) { // implicit transformation into bezier @@ -364,10 +364,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected() ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE) )->Execute(); } else if ( ScopedVclPtrInstance<QueryBox>(GetActiveWindow(), WB_YES_NO, - SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER) + SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER) )->Execute() == RET_YES ) { // implicit transformation into bezier @@ -670,7 +670,7 @@ void DrawViewShell::FuDeleteSelectedObjects() if (mpDrawView->IsPresObjSelected(false, true, false, true)) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE) )->Execute(); bConsumed = true; } @@ -763,7 +763,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj()); const bool bUndo = mpDrawView->IsUndoEnabled(); if( bUndo ) - mpDrawView->BegUndo(SD_RESSTR(STR_UNDO_BEZCLOSE)); + mpDrawView->BegUndo(SdResId(STR_UNDO_BEZCLOSE)); mpDrawView->UnmarkAllPoints(); @@ -784,7 +784,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -806,7 +806,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) if ( mpDrawView->IsPresObjSelected(false, true, false, true) ) { ::sd::Window* pWindow = GetActiveWindow(); - ScopedVclPtrInstance<InfoBox>(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE))->Execute(); + ScopedVclPtrInstance<InfoBox>(pWindow, SdResId(STR_ACTION_NOTPOSSIBLE))->Execute(); } else { @@ -1002,7 +1002,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) ViewShellHint(ViewShellHint::HINT_CHANGE_EDIT_MODE_START)); // turn on default layer of MasterPage - mpDrawView->SetActiveLayer( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) ); + mpDrawView->SetActiveLayer( SdResId(STR_LAYER_BCKGRNDOBJ) ); ChangeEditMode(EditMode::MasterPage, mbIsLayerModeActive); diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx index 4236050fe3b3..fe10d917541c 100644 --- a/sd/source/ui/view/drviewsi.cxx +++ b/sd/source/ui/view/drviewsi.cxx @@ -126,7 +126,7 @@ void DrawViewShell::AssignFrom3DWindow() p3DWin->GetAttr( aSet ); // own UNDO-compounding also around transformation in 3D - GetView()->BegUndo(SD_RESSTR(STR_UNDO_APPLY_3D_FAVOURITE)); + GetView()->BegUndo(SdResId(STR_UNDO_APPLY_3D_FAVOURITE)); if(GetView()->IsConvertTo3DObjPossible()) { @@ -167,7 +167,7 @@ void DrawViewShell::AssignFrom3DWindow() { ScopedVclPtrInstance<InfoBox> aInfoBox ( GetActiveWindow(), - SD_RESSTR(STR_ACTION_NOTPOSSIBLE)); + SdResId(STR_ACTION_NOTPOSSIBLE)); aInfoBox->Execute(); } diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 7572c368074c..0928ead4021f 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -202,7 +202,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK * maPrintableLayers.SetAll(); SetGridCoarse( Size( 1000, 1000 ) ); SetSnapGridWidth(Fraction(1000, 1), Fraction(1000, 1)); - SetActiveLayer( SD_RESSTR(STR_LAYER_LAYOUT) ); + SetActiveLayer( SdResId(STR_LAYER_LAYOUT) ); mbNoColors = true; mbNoAttribs = false; maVisArea = ::tools::Rectangle( Point(), Size(0, 0) ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 7041995282af..7586361979a4 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1332,7 +1332,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) SdrPage* pPage = GetDoc()->GetSdPage( (sal_uInt16) nPos, PageKind::Standard ); - aPageStr = SD_RESSTR(STR_SD_PAGE_COUNT); + aPageStr = SdResId(STR_SD_PAGE_COUNT); aPageStr = aPageStr.replaceFirst("%1", OUString::number((sal_Int32)(nPos + 1))); aPageStr = aPageStr.replaceFirst("%2", OUString::number(nPageCount)); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 2a4ce761c013..b76b852e7100 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -590,7 +590,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam if (mnPagesToProcess > PROCESS_WITH_PROGRESS_THRESHOLD) { delete mpProgress; - mpProgress = new SfxProgress( GetDocSh(), SD_RESSTR(STR_CREATE_PAGES), mnPagesToProcess ); + mpProgress = new SfxProgress( GetDocSh(), SdResId(STR_CREATE_PAGES), mnPagesToProcess ); } else { @@ -1010,7 +1010,7 @@ bool OutlineView::PrepareClose() mrOutliner.GetUndoManager().Clear(); - BegUndo(SD_RESSTR(STR_UNDO_CHANGE_TITLE_AND_LAYOUT)); + BegUndo(SdResId(STR_UNDO_CHANGE_TITLE_AND_LAYOUT)); UpdateDocument(); EndUndo(); mrDoc.SetSelected(GetActualPage(), true); @@ -1169,7 +1169,7 @@ IMPL_LINK_NOARG(OutlineView, RemovingPagesHdl, OutlinerView*, bool) if (mnPagesToProcess) { delete mpProgress; - mpProgress = new SfxProgress( GetDocSh(), SD_RESSTR(STR_DELETE_PAGES), mnPagesToProcess ); + mpProgress = new SfxProgress( GetDocSh(), SdResId(STR_DELETE_PAGES), mnPagesToProcess ); } mrOutliner.UpdateFields(); @@ -1457,7 +1457,7 @@ void OutlineView::IgnoreCurrentPageChanges (bool bIgnoreChanges) void OutlineView::BeginModelChange() { mrOutliner.GetUndoManager().EnterListAction("", "", 0, mrOutlineViewShell.GetViewShellBase().GetViewShellId()); - BegUndo(SD_RESSTR(STR_UNDO_CHANGE_TITLE_AND_LAYOUT)); + BegUndo(SdResId(STR_UNDO_CHANGE_TITLE_AND_LAYOUT)); } /** call this method after BeginModelChange(), when all possible model diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 2856afa6355c..8d6543a45744 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -139,7 +139,7 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev, SetMinMoveDistancePixel(2); SetHitTolerancePixel(2); - SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES)); + SetMeasureLayer(SdResId(STR_LAYER_MEASURELINES)); // Timer for delayed drop (has to be for MAC) maDropErrorIdle.SetInvokeHandler( LINK(this, View, DropErrorHdl) ); @@ -305,7 +305,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected { if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard) { - static OUString aTitleAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_TITLE)); + static OUString aTitleAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_TITLE)); aObjectString = aTitleAreaStr; } @@ -313,31 +313,31 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected } case PRESOBJ_OUTLINE: { - static OUString aOutlineAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_OUTLINE)); + static OUString aOutlineAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_OUTLINE)); aObjectString = aOutlineAreaStr; break; } case PRESOBJ_FOOTER: { - static OUString aFooterAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_FOOTER)); + static OUString aFooterAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_FOOTER)); aObjectString = aFooterAreaStr; break; } case PRESOBJ_HEADER: { - static OUString aHeaderAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_HEADER)); + static OUString aHeaderAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_HEADER)); aObjectString = aHeaderAreaStr; break; } case PRESOBJ_DATETIME: { - static OUString aDateTimeStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_DATETIME)); + static OUString aDateTimeStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_DATETIME)); aObjectString = aDateTimeStr; break; } case PRESOBJ_NOTES: { - static OUString aDateTimeStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_NOTES)); + static OUString aDateTimeStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_NOTES)); aObjectString = aDateTimeStr; break; } @@ -345,12 +345,12 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected { if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PageKind::Standard) { - static OUString aSlideAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_SLIDE)); + static OUString aSlideAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_SLIDE)); aObjectString = aSlideAreaStr; } else { - static OUString aNumberAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_NUMBER)); + static OUString aNumberAreaStr(SdResId(STR_PLACEHOLDER_DESCRIPTION_NUMBER)); aObjectString = aNumberAreaStr; } break; @@ -917,7 +917,7 @@ void View::SetMarkedOriginalSize() if( bOK ) { - pUndoGroup->SetComment(SD_RESSTR(STR_UNDO_ORIGINALSIZE)); + pUndoGroup->SetComment(SdResId(STR_UNDO_ORIGINALSIZE)); mpDocSh->GetUndoManager()->AddUndoAction(pUndoGroup); } else diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 41b935b4aa0d..1865f01cc674 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -242,7 +242,7 @@ void View::DoCut() const_cast<OutlinerView*>(pOLV)->Cut(); else if( AreObjectsMarked() ) { - OUString aStr(SD_RESSTR(STR_UNDO_CUT)); + OUString aStr(SdResId(STR_UNDO_CUT)); DoCopy(); BegUndo(aStr + " " + GetDescriptionOfMarkedObjects()); @@ -367,7 +367,7 @@ void View::StartDrag( const Point& rStartPos, vcl::Window* pWindow ) if( IsUndoEnabled() ) { - OUString aStr(SD_RESSTR(STR_UNDO_DRAGDROP)); + OUString aStr(SdResId(STR_UNDO_DRAGDROP)); BegUndo(aStr + " " + mpDragSrcMarkList->GetMarkDescription()); } CreateDragDataObject( this, *pWindow, rStartPos ); @@ -874,8 +874,8 @@ bool View::GetExchangeList (std::vector<OUString> &rExchangeList, { if( mrDoc.GetObj( aNewName ) ) { - OUString aTitle(SD_RESSTR(STR_TITLE_NAMEGROUP)); - OUString aDesc(SD_RESSTR(STR_DESC_NAMEGROUP)); + OUString aTitle(SdResId(STR_TITLE_NAMEGROUP)); + OUString aDesc(SdResId(STR_DESC_NAMEGROUP)); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog(mpViewSh->GetActiveWindow(), aNewName, aDesc) : nullptr); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 5f31aabd0293..7720442f6c7b 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -410,7 +410,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // #i11702# if( IsUndoEnabled() ) { - BegUndo(SD_RESSTR(STR_MODIFYLAYER)); + BegUndo(SdResId(STR_MODIFYLAYER)); AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectLayerChange(*pO, pO->GetLayer(), nLayer)); EndUndo(); } @@ -494,7 +494,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( IsUndoEnabled() ) { - BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP)); + BegUndo(SdResId(STR_UNDO_DRAGDROP)); AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj)); EndUndo(); } @@ -731,7 +731,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP)); + BegUndo(SdResId(STR_UNDO_DRAGDROP)); pNewObj->NbcSetLayer( pPickObj->GetLayer() ); SdrPage* pWorkPage = GetSdrPageView()->GetPage(); pWorkPage->InsertObject( pNewObj ); @@ -763,7 +763,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, const bool bUndo = IsUndoEnabled(); if( bUndo ) { - BegUndo( SD_RESSTR(STR_UNDO_DRAGDROP) ); + BegUndo( SdResId(STR_UNDO_DRAGDROP) ); AddUndo( mrDoc.GetSdrUndoFactory().CreateUndoAttrObject( *pPickObj ) ); } @@ -1327,7 +1327,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if( IsUndoEnabled() ) { - BegUndo( SD_RESSTR(STR_UNDO_DRAGDROP) ); + BegUndo( SdResId(STR_UNDO_DRAGDROP) ); AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pPickObj ) ); EndUndo(); } diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index af1bafb11a81..051a3cc0e5e3 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -107,7 +107,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, { // hit on SdrGrafObj with wanted new linked graphic (or PresObj placeholder hit) if( IsUndoEnabled() ) - BegUndo(OUString(SdResId(STR_INSERTGRAPHIC))); + BegUndo(SdResId(STR_INSERTGRAPHIC)); SdPage* pPage = static_cast<SdPage*>( pPickObj->GetPage() ); @@ -156,7 +156,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, // and thus of DND_ACTION_LINK or DND_ACTION_MOVE if( IsUndoEnabled() ) { - BegUndo(OUString(SdResId(STR_UNDO_DRAGDROP))); + BegUndo(SdResId(STR_UNDO_DRAGDROP)); AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pPickObj)); EndUndo(); } @@ -238,7 +238,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, const bool bUndo = IsUndoEnabled(); if( bUndo ) - BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP)); + BegUndo(SdResId(STR_UNDO_DRAGDROP)); pNewGrafObj->NbcSetLayer(pPickObj->GetLayer()); SdrPage* pP = pPV->GetPage(); pP->InsertObject(pNewGrafObj); @@ -334,7 +334,7 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM pNewMediaObj = static_cast< SdrMediaObj* >( pPickObj->Clone() ); pNewMediaObj->setURL( rMediaURL, ""/*TODO?*/, rMimeType ); - BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP)); + BegUndo(SdResId(STR_UNDO_DRAGDROP)); ReplaceObjectAtView(pPickObj, *pPV, pNewMediaObj); EndUndo(); } @@ -578,7 +578,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) */ IMPL_LINK_NOARG(View, DropErrorHdl, Timer *, void) { - ScopedVclPtrInstance<InfoBox>( mpViewSh ? mpViewSh->GetActiveWindow() : nullptr, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute(); + ScopedVclPtrInstance<InfoBox>( mpViewSh ? mpViewSh->GetActiveWindow() : nullptr, SdResId(STR_ACTION_NOTPOSSIBLE) )->Execute(); } /** diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx index b852eb58644c..f0445646fff0 100644 --- a/sd/source/ui/view/unmodpg.cxx +++ b/sd/source/ui/view/unmodpg.cxx @@ -58,8 +58,8 @@ ModifyPageUndoAction::ModifyPageUndoAction( { maOldName = mpPage->GetName(); SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); SdrLayerIDSet aVisibleLayers = mpPage->TRG_GetMasterPageVisibleLayers(); mbOldBckgrndVisible = aVisibleLayers.IsSet(aBckgrnd); @@ -71,7 +71,7 @@ ModifyPageUndoAction::ModifyPageUndoAction( mbOldBckgrndObjsVisible = false; } - SetComment( SD_RESSTR(STR_UNDO_MODIFY_PAGE) ); + SetComment( SdResId(STR_UNDO_MODIFY_PAGE) ); } void ModifyPageUndoAction::Undo() @@ -104,8 +104,8 @@ void ModifyPageUndoAction::Undo() } SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); SdrLayerIDSet aVisibleLayers; aVisibleLayers.Set(aBckgrnd, mbOldBckgrndVisible); aVisibleLayers.Set(aBckgrndObj, mbOldBckgrndObjsVisible); @@ -147,8 +147,8 @@ void ModifyPageUndoAction::Redo() } SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin(); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); SdrLayerIDSet aVisibleLayers; aVisibleLayers.Set(aBckgrnd, mbNewBckgrndVisible); aVisibleLayers.Set(aBckgrndObj, mbNewBckgrndObjsVisible); @@ -171,7 +171,7 @@ RenameLayoutTemplateUndoAction::RenameLayoutTemplateUndoAction( : SdUndoAction(pDocument) , maOldName(rOldLayoutName) , maNewName(rNewLayoutName) - , maComment(SD_RESSTR(STR_TITLE_RENAMESLIDE)) + , maComment(SdResId(STR_TITLE_RENAMESLIDE)) { sal_Int32 nPos = maOldName.indexOf(SD_LT_SEPARATOR); if (nPos != -1) diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 60a396e2d865..f182d0d21975 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -182,7 +182,6 @@ void ImageButtonHdl::HideTip() void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt) { - if( pHdlList && pHdlList->GetView()) { int nHighlightId = 0; @@ -204,10 +203,7 @@ void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt) if( pHdlList ) { - SdResId aResId( gButtonToolTips[mnHighlightId] ); - aResId.SetRT( RSC_STRING ); - - OUString aHelpText( aResId ); + OUString aHelpText(SdResId(gButtonToolTips[mnHighlightId])); ::tools::Rectangle aScreenRect( pDev->LogicToPixel( GetPos() ), maImageSize ); Help::ShowQuickHelp(static_cast< vcl::Window* >( pHdlList->GetView()->GetFirstOutputDevice() ), aScreenRect, aHelpText); } diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index c24307a678de..2a59f0ecdfab 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -145,7 +145,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) { // Set the necessary string like in // sfx2/source/view/viewfrm.cxx ver 1.23 ln 1072 ff. - OUString aTmp(SVT_RESSTR(STR_UNDO)); + OUString aTmp(SvtResId(STR_UNDO)); aTmp += pUndoManager->GetUndoActionComment(); rSet.Put(SfxStringItem(SID_UNDO, aTmp)); } @@ -177,7 +177,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) { // Set the necessary string like in // sfx2/source/view/viewfrm.cxx ver 1.23 ln 1081 ff. - OUString aTmp(SVT_RESSTR(STR_REDO)); + OUString aTmp(SvtResId(STR_REDO)); aTmp += pUndoManager->GetRedoActionComment(); rSet.Put(SfxStringItem(SID_REDO, aTmp)); } @@ -202,8 +202,8 @@ SdPage* ViewShell::CreateOrDuplicatePage ( sal_uInt16 nSId = rRequest.GetSlot(); SdDrawDocument* pDocument = GetDoc(); SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin(); - SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND)); - SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ)); + SdrLayerID aBckgrnd = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRND)); + SdrLayerID aBckgrndObj = rLayerAdmin.GetLayerID(SdResId(STR_LAYER_BCKGRNDOBJ)); SdrLayerIDSet aVisibleLayers; // Determine the page from which to copy some values, such as layers, // size, master page, to the new page. This is usually the given page. @@ -314,7 +314,7 @@ SdPage* ViewShell::CreateOrDuplicatePage ( View* pDrView = GetView(); const bool bUndo = pDrView && pDrView->IsUndoEnabled(); if( bUndo ) - pDrView->BegUndo(SD_RESSTR(STR_INSERTPAGE)); + pDrView->BegUndo(SdResId(STR_INSERTPAGE)); sal_uInt16 nNewPageIndex = 0xffff; switch (nSId) 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/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; } diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx index 68ada8d80923..6c06c79e5aad 100644 --- a/starmath/inc/smmod.hxx +++ b/starmath/inc/smmod.hxx @@ -51,13 +51,7 @@ class SvtSysLocale; class VirtualDevice; -class SmResId : public ResId -{ -public: - explicit SmResId(sal_uInt16 nId); -}; - -#define SM_RESSTR(x) SmResId(x).toString() +OUString SmResId(sal_uInt16 nId); class SmLocalizedSymbolData { diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 0d070ed2236b..95fe2e4f12ca 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -559,86 +559,86 @@ void SmElementsControl::addElements(const std::pair<const char*, sal_uInt16> aEl } else { OUString aElement(OUString::createFromAscii(pElement)); if (aElement == RID_NEWLINE) - addElement(OUString( "\xe2\x86\xb5", 3, RTL_TEXTENCODING_UTF8 ), aElement, SM_RESSTR(aElementHelp)); + addElement(OUString( "\xe2\x86\xb5", 3, RTL_TEXTENCODING_UTF8 ), aElement, SmResId(aElementHelp)); else if (aElement == RID_SBLANK) - addElement("\"`\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"`\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_BLANK) - addElement("\"~\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"~\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_PHANTOMX) - addElement("\"" + SM_RESSTR(STR_HIDE) +"\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"" + SmResId(STR_HIDE) +"\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_BOLDX) - addElement("bold B", aElement, SM_RESSTR(aElementHelp)); + addElement("bold B", aElement, SmResId(aElementHelp)); else if (aElement == RID_ITALX) - addElement("ital I", aElement, SM_RESSTR(aElementHelp)); + addElement("ital I", aElement, SmResId(aElementHelp)); else if (aElement == RID_SIZEXY) - addElement("\"" + SM_RESSTR(STR_SIZE) + "\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"" + SmResId(STR_SIZE) + "\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_FONTXY) - addElement("\"" + SM_RESSTR(STR_FONT) + "\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"" + SmResId(STR_FONT) + "\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_BLACK) - addElement("color black { \"" + SM_RESSTR(STR_BLACK) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color black { \"" + SmResId(STR_BLACK) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_BLUE) - addElement("color blue { \"" + SM_RESSTR(STR_BLUE) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color blue { \"" + SmResId(STR_BLUE) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_GREEN) - addElement("color green { \"" + SM_RESSTR(STR_GREEN) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color green { \"" + SmResId(STR_GREEN) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_RED) - addElement("color red { \"" + SM_RESSTR(STR_RED) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color red { \"" + SmResId(STR_RED) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_CYAN) - addElement("color cyan { \"" + SM_RESSTR(STR_CYAN) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color cyan { \"" + SmResId(STR_CYAN) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_MAGENTA) - addElement("color magenta { \"" + SM_RESSTR(STR_MAGENTA) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color magenta { \"" + SmResId(STR_MAGENTA) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_YELLOW) - addElement("color yellow { \"" + SM_RESSTR(STR_YELLOW) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color yellow { \"" + SmResId(STR_YELLOW) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_GRAY) - addElement("color gray { \"" + SM_RESSTR(STR_GRAY) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color gray { \"" + SmResId(STR_GRAY) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_LIME) - addElement("color lime { \"" + SM_RESSTR(STR_LIME) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color lime { \"" + SmResId(STR_LIME) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_MAROON) - addElement("color maroon { \"" + SM_RESSTR(STR_MAROON) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color maroon { \"" + SmResId(STR_MAROON) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_NAVY) - addElement("color navy { \"" + SM_RESSTR(STR_NAVY) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color navy { \"" + SmResId(STR_NAVY) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_OLIVE) - addElement("color olive { \"" + SM_RESSTR(STR_OLIVE) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color olive { \"" + SmResId(STR_OLIVE) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_PURPLE) - addElement("color purple { \"" + SM_RESSTR(STR_PURPLE) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color purple { \"" + SmResId(STR_PURPLE) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_SILVER) - addElement("color silver { \"" + SM_RESSTR(STR_SILVER) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color silver { \"" + SmResId(STR_SILVER) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_COLORX_TEAL) - addElement("color teal { \"" + SM_RESSTR(STR_TEAL) + "\" }", aElement, SM_RESSTR(aElementHelp)); + addElement("color teal { \"" + SmResId(STR_TEAL) + "\" }", aElement, SmResId(aElementHelp)); else if (aElement == RID_ALIGNLX) - addElement("\"" + SM_RESSTR(STR_ALIGN_LEFT) + "\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"" + SmResId(STR_ALIGN_LEFT) + "\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_ALIGNCX) - addElement("\"" + SM_RESSTR(STR_ALIGN_CENTER) + "\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"" + SmResId(STR_ALIGN_CENTER) + "\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_ALIGNRX) - addElement("\"" + SM_RESSTR(STR_ALIGN_RIGHT) + "\"", aElement, SM_RESSTR(aElementHelp)); + addElement("\"" + SmResId(STR_ALIGN_RIGHT) + "\"", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRPARENTX) - addElement("left ( binom{<?>}{<?>} right ) ", aElement, SM_RESSTR(aElementHelp)); + addElement("left ( binom{<?>}{<?>} right ) ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRBRACKETX) - addElement("left [ binom{<?>}{<?>} right ] ", aElement, SM_RESSTR(aElementHelp)); + addElement("left [ binom{<?>}{<?>} right ] ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRDBRACKETX) - addElement("left ldbracket binom{<?>}{<?>} right rdbracket ", aElement, SM_RESSTR(aElementHelp)); + addElement("left ldbracket binom{<?>}{<?>} right rdbracket ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRBRACEX) - addElement("left lbrace binom{<?>}{<?>} right rbrace ", aElement, SM_RESSTR(aElementHelp)); + addElement("left lbrace binom{<?>}{<?>} right rbrace ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRANGLEX) - addElement("left langle binom{<?>}{<?>} right rangle ", aElement, SM_RESSTR(aElementHelp)); + addElement("left langle binom{<?>}{<?>} right rangle ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRCEILX) - addElement("left lceil binom{<?>}{<?>} right rceil ", aElement, SM_RESSTR(aElementHelp)); + addElement("left lceil binom{<?>}{<?>} right rceil ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRFLOORX) - addElement("left lfloor binom{<?>}{<?>} right rfloor ", aElement, SM_RESSTR(aElementHelp)); + addElement("left lfloor binom{<?>}{<?>} right rfloor ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRLINEX) - addElement("left lline binom{<?>}{<?>} right rline ", aElement, SM_RESSTR(aElementHelp)); + addElement("left lline binom{<?>}{<?>} right rline ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLRDLINEX) - addElement("left ldline binom{<?>}{<?>} right rdline ", aElement, SM_RESSTR(aElementHelp)); + addElement("left ldline binom{<?>}{<?>} right rdline ", aElement, SmResId(aElementHelp)); else if (aElement == RID_SLMRANGLEXY) - addElement("left langle binom{<?>}{<?>} mline binom{<?>}{<?>} right rangle ", aElement, SM_RESSTR(aElementHelp)); + addElement("left langle binom{<?>}{<?>} mline binom{<?>}{<?>} right rangle ", aElement, SmResId(aElementHelp)); else if (aElement == RID_XOVERBRACEY) - addElement("{<?><?><?>} overbrace {<?>} ", aElement, SM_RESSTR(aElementHelp)); + addElement("{<?><?><?>} overbrace {<?>} ", aElement, SmResId(aElementHelp)); else if (aElement == RID_XUNDERBRACEY) - addElement("{<?><?><?>} underbrace {<?>} ", aElement, SM_RESSTR(aElementHelp)); + addElement("{<?><?><?>} underbrace {<?>} ", aElement, SmResId(aElementHelp)); else - addElement(aElement, aElement, SM_RESSTR(aElementHelp)); + addElement(aElement, aElement, SmResId(aElementHelp)); } } } @@ -734,11 +734,11 @@ SmElementsDockingWindow::SmElementsDockingWindow(SfxBindings* pInputBindings, Sf for (sal_uInt16 nCategory : aCategories) { - mpElementListBox->InsertEntry(SM_RESSTR(nCategory)); + mpElementListBox->InsertEntry(SmResId(nCategory)); } mpElementListBox->SetSelectHdl(LINK(this, SmElementsDockingWindow, ElementSelectedHandle)); - mpElementListBox->SelectEntry(SM_RESSTR(RID_CATEGORY_UNARY_BINARY_OPERATORS)); + mpElementListBox->SelectEntry(SmResId(RID_CATEGORY_UNARY_BINARY_OPERATORS)); mpElementsControl->SetBackground( Color( COL_WHITE ) ); mpElementsControl->SetTextColor( Color( COL_BLACK ) ); @@ -791,7 +791,7 @@ IMPL_LINK( SmElementsDockingWindow, ElementSelectedHandle, ListBox&, rList, void { for (sal_uInt16 aCurrentCategory : aCategories) { - OUString aCurrentCategoryString = SM_RESSTR(aCurrentCategory); + OUString aCurrentCategoryString = SmResId(aCurrentCategory); if (aCurrentCategoryString == rList.GetSelectEntry()) { mpElementsControl->setElementSetId(aCurrentCategory); diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 8dceed77def3..69b44f718efc 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -110,7 +110,7 @@ static awt::Point lcl_GetLocationOnScreen( vcl::Window *pWin ) SmGraphicAccessible::SmGraphicAccessible( SmGraphicWindow *pGraphicWin ) : - aAccName (SM_RESSTR(RID_DOCUMENTSTR)), + aAccName (SmResId(RID_DOCUMENTSTR)), nClientId (0), pWin (pGraphicWin) { @@ -1542,7 +1542,7 @@ bool SmEditViewForwarder::Paste() SmEditAccessible::SmEditAccessible( SmEditWindow *pEditWin ) : - aAccName (SM_RESSTR(STR_CMDBOXWINDOW)), + aAccName (SmResId(STR_CMDBOXWINDOW)), pTextHelper (), pWin (pEditWin) { diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 67ad58e7e498..27e2fe065bdb 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -1281,15 +1281,15 @@ void SmDocShell::FillClass(SvGlobalName* pClassName, { *pClassName = SvGlobalName(SO3_SM_CLASSID_60); *pFormat = SotClipboardFormatId::STARMATH_60; - *pFullTypeName = SM_RESSTR(STR_MATH_DOCUMENT_FULLTYPE_CURRENT); - *pShortTypeName = SM_RESSTR(RID_DOCUMENTSTR); + *pFullTypeName = SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT); + *pShortTypeName = SmResId(RID_DOCUMENTSTR); } else if (nFileFormat == SOFFICE_FILEFORMAT_8 ) { *pClassName = SvGlobalName(SO3_SM_CLASSID_60); *pFormat = bTemplate ? SotClipboardFormatId::STARMATH_8_TEMPLATE : SotClipboardFormatId::STARMATH_8; - *pFullTypeName = SM_RESSTR(STR_MATH_DOCUMENT_FULLTYPE_CURRENT); - *pShortTypeName = SM_RESSTR(RID_DOCUMENTSTR); + *pFullTypeName = SmResId(STR_MATH_DOCUMENT_FULLTYPE_CURRENT); + *pShortTypeName = SmResId(RID_DOCUMENTSTR); } } diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 6058e6450f94..ab7c0ac8a9e0 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -138,7 +138,7 @@ bool SmXMLExportWrapper::Export(SfxMedium &rMedium) if (xStatusIndicator.is()) { sal_Int32 nProgressRange = bFlat ? 1 : 3; - xStatusIndicator->start(SM_RESSTR(STR_STATSTR_WRITING), + xStatusIndicator->start(SmResId(STR_STATSTR_WRITING), nProgressRange); } } diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 583c0b925821..b97ec1be70f6 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -169,7 +169,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium) sal_Int32 nProgressRange(nSteps); if (xStatusIndicator.is()) { - xStatusIndicator->start(SM_RESSTR(STR_STATSTR_READING), nProgressRange); + xStatusIndicator->start(SmResId(STR_STATSTR_READING), nProgressRange); } nSteps=0; diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 9941d97c9cfa..bd7dfe78ec8a 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -2219,7 +2219,7 @@ void SmParser::AddError(SmParseError Type, SmNode *pNode) pErrDesc->m_eType = Type; pErrDesc->m_pNode = pNode; - pErrDesc->m_aText = SM_RESSTR(RID_ERR_IDENT); + pErrDesc->m_aText = SmResId(RID_ERR_IDENT); sal_uInt16 nRID; switch (Type) @@ -2242,7 +2242,7 @@ void SmParser::AddError(SmParseError Type, SmNode *pNode) assert(false); return; } - pErrDesc->m_aText += SM_RESSTR(nRID); + pErrDesc->m_aText += SmResId(nRID); m_aErrDescList.push_back(std::move(pErrDesc)); } diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index c50cf31733be..50ae3d252f5d 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -37,16 +37,16 @@ #define SmModule #include "smslots.hxx" -SmResId::SmResId( sal_uInt16 nId ) - : ResId(nId, *SM_MOD()->GetResMgr()) +OUString SmResId(sal_uInt16 nId) { + return ResId(nId, *SM_MOD()->GetResMgr()); } SmLocalizedSymbolData::SmLocalizedSymbolData() : - aUiSymbolNamesAry ( SmResId(RID_UI_SYMBOL_NAMES) ), - aExportSymbolNamesAry ( SmResId(RID_EXPORT_SYMBOL_NAMES) ), - aUiSymbolSetNamesAry ( SmResId(RID_UI_SYMBOLSET_NAMES) ), - aExportSymbolSetNamesAry( SmResId(RID_EXPORT_SYMBOLSET_NAMES) ) + aUiSymbolNamesAry (ResId(RID_UI_SYMBOL_NAMES, *SM_MOD()->GetResMgr())), + aExportSymbolNamesAry (ResId(RID_EXPORT_SYMBOL_NAMES, *SM_MOD()->GetResMgr())), + aUiSymbolSetNamesAry (ResId(RID_UI_SYMBOLSET_NAMES, *SM_MOD()->GetResMgr())), + aExportSymbolSetNamesAry(ResId(RID_EXPORT_SYMBOLSET_NAMES, *SM_MOD()->GetResMgr())) { } diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 54c31dc73ffc..9621ecec73a8 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -82,37 +82,37 @@ SmPrintUIOptions::SmPrintUIOptions() // create Section for formula (results in an extra tab page in dialog) SvtModuleOptions aOpt; OUString aAppGroupname( - SM_RESSTR( RID_PRINTUIOPT_PRODNAME ). + SmResId( RID_PRINTUIOPT_PRODNAME ). replaceFirst( "%s", aOpt.GetModuleName( SvtModuleOptions::EModule::MATH ) ) ); m_aUIProperties[nIdx++].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage"); // create subgroup for print options - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("contents", SM_RESSTR( RID_PRINTUIOPT_CONTENTS ), OUString()); + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("contents", SmResId( RID_PRINTUIOPT_CONTENTS ), OUString()); // create a bool option for title row (matches to SID_PRINTTITLE) - m_aUIProperties[nIdx++].Value = setBoolControlOpt("title", SM_RESSTR( RID_PRINTUIOPT_TITLE ), + m_aUIProperties[nIdx++].Value = setBoolControlOpt("title", SmResId( RID_PRINTUIOPT_TITLE ), ".HelpID:vcl:PrintDialog:TitleRow:CheckBox", PRTUIOPT_TITLE_ROW, pConfig->IsPrintTitle()); // create a bool option for formula text (matches to SID_PRINTTEXT) - m_aUIProperties[nIdx++].Value = setBoolControlOpt("formulatext", SM_RESSTR( RID_PRINTUIOPT_FRMLTXT ), + m_aUIProperties[nIdx++].Value = setBoolControlOpt("formulatext", SmResId( RID_PRINTUIOPT_FRMLTXT ), ".HelpID:vcl:PrintDialog:FormulaText:CheckBox", PRTUIOPT_FORMULA_TEXT, pConfig->IsPrintFormulaText()); // create a bool option for border (matches to SID_PRINTFRAME) - m_aUIProperties[nIdx++].Value = setBoolControlOpt("borders", SM_RESSTR( RID_PRINTUIOPT_BORDERS ), + m_aUIProperties[nIdx++].Value = setBoolControlOpt("borders", SmResId( RID_PRINTUIOPT_BORDERS ), ".HelpID:vcl:PrintDialog:Border:CheckBox", PRTUIOPT_BORDER, pConfig->IsPrintFrame()); // create subgroup for print format - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("size", SM_RESSTR( RID_PRINTUIOPT_SIZE ), OUString()); + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("size", SmResId( RID_PRINTUIOPT_SIZE ), OUString()); // create a radio button group for print format (matches to SID_PRINTSIZE) Sequence< OUString > aChoices{ - SM_RESSTR( RID_PRINTUIOPT_ORIGSIZE ), - SM_RESSTR( RID_PRINTUIOPT_FITTOPAGE ), - SM_RESSTR( RID_PRINTUIOPT_SCALING ) + SmResId( RID_PRINTUIOPT_ORIGSIZE ), + SmResId( RID_PRINTUIOPT_FITTOPAGE ), + SmResId( RID_PRINTUIOPT_SCALING ) }; Sequence< OUString > aHelpIds{ ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0", diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 0d1df8ba7058..a93f726ef463 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -77,12 +77,12 @@ OUString lcl_GetStringItem(const vcl::Font &rFont) if (IsItalic( rFont )) { aString.append(", "); - aString.append(SM_RESSTR(RID_FONTITALIC)); + aString.append(SmResId(RID_FONTITALIC)); } if (IsBold( rFont )) { aString.append(", "); - aString.append(SM_RESSTR(RID_FONTBOLD)); + aString.append(SmResId(RID_FONTBOLD)); } return aString.makeStringAndClear(); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 33529f182b9d..e7aa71504eea 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -670,7 +670,7 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi { SetHelpId( HID_SMA_COMMAND_WIN ); SetSizePixel(LogicToPixel(Size(292 , 94), MapMode(MapUnit::MapAppFont))); - SetText(SM_RESSTR(STR_CMDBOXWINDOW)); + SetText(SmResId(STR_CMDBOXWINDOW)); Hide(); diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 0c75869623a1..0052bfbab596 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -435,25 +435,25 @@ OUString CreateExactSizeText( sal_Int64 nSize ) if ( nSize < 10000 ) { - aUnitStr += SVT_RESSTR(STR_SVT_BYTES ); + aUnitStr += SvtResId(STR_SVT_BYTES ); nDec = 0; } else if ( nSize < nMega ) { fSize /= 1024; - aUnitStr += SVT_RESSTR(STR_SVT_KB); + aUnitStr += SvtResId(STR_SVT_KB); nDec = 1; } else if ( nSize < nGiga ) { fSize /= nMega; - aUnitStr += SVT_RESSTR(STR_SVT_MB); + aUnitStr += SvtResId(STR_SVT_MB); nDec = 2; } else { fSize /= nGiga; - aUnitStr += SVT_RESSTR(STR_SVT_GB); + aUnitStr += SvtResId(STR_SVT_GB); nDec = 3; } @@ -474,9 +474,9 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, mpHeaderBar ( nullptr ), mpParent ( pParent ), - msAccessibleDescText( SVT_RESSTR(STR_SVT_ACC_DESC_FILEVIEW) ), - msFolder ( SVT_RESSTR(STR_SVT_ACC_DESC_FOLDER) ), - msFile ( SVT_RESSTR(STR_SVT_ACC_DESC_FILE) ), + msAccessibleDescText( SvtResId(STR_SVT_ACC_DESC_FILEVIEW) ), + msFolder ( SvtResId(STR_SVT_ACC_DESC_FOLDER) ), + msFile ( SvtResId(STR_SVT_ACC_DESC_FILE) ), mnSearchIndex ( 0 ), mbResizeDisabled ( false ), mbAutoResize ( false ), @@ -493,7 +493,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, long pTabs[] = { 2, 20, 600 }; SetTabs(&pTabs[0], MapUnit::MapPixel); - mpHeaderBar->InsertItem(COLUMN_TITLE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_TITLE), 600, nBits | HeaderBarItemBits::UPARROW); + mpHeaderBar->InsertItem(COLUMN_TITLE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE), 600, nBits | HeaderBarItemBits::UPARROW); } else { @@ -501,13 +501,13 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin, SetTabs(&pTabs[0], MapUnit::MapPixel); SetTabJustify(2, AdjustRight); // column "Size" - mpHeaderBar->InsertItem(COLUMN_TITLE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_TITLE), 180, nBits | HeaderBarItemBits::UPARROW); + mpHeaderBar->InsertItem(COLUMN_TITLE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE), 180, nBits | HeaderBarItemBits::UPARROW); if (nFlags & FileViewFlags::SHOW_TYPE) { - mpHeaderBar->InsertItem(COLUMN_TYPE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_TYPE), 140, nBits); + mpHeaderBar->InsertItem(COLUMN_TYPE, SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE), 140, nBits); } - mpHeaderBar->InsertItem(COLUMN_SIZE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_SIZE), 80, nBits); - mpHeaderBar->InsertItem(COLUMN_DATE, SVT_RESSTR(STR_SVT_FILEVIEW_COLUMN_DATE), 500, nBits); + mpHeaderBar->InsertItem(COLUMN_SIZE, SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE), 80, nBits); + mpHeaderBar->InsertItem(COLUMN_DATE, SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE), 500, nBits); } Size aHeadSize = mpHeaderBar->GetSizePixel(); diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 4bddb65a48ce..f0d823840e8b 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -402,7 +402,7 @@ OUString SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const { OUString sRet = static_cast<const SvLBoxString&>(rBoxItem).GetText(); if ( sRet.isEmpty() ) - sRet = SVT_RESSTR( STR_SVT_ACC_EMPTY_FIELD ); + sRet = SvtResId( STR_SVT_ACC_EMPTY_FIELD ); return sRet; } --nCol; @@ -996,7 +996,7 @@ OUString SvHeaderTabListBox::GetAccessibleObjectDescription( ::svt::AccessibleBr sal_Int32 nRow = _nPos / nColumnCount; sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount ); - OUString aText( SVT_RESSTR(STR_SVT_ACC_DESC_TABLISTBOX) ); + OUString aText( SvtResId(STR_SVT_ACC_DESC_TABLISTBOX) ); aText = aText.replaceFirst( sVar1, OUString::number( nRow ) ); OUString sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) ); if ( sColHeader.isEmpty() ) diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index ff0036e266c9..d88d0e134826 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -23,7 +23,7 @@ // class SvtDocInfoTable_Impl -------------------------------------------- SvtDocInfoTable_Impl::SvtDocInfoTable_Impl() - : ResStringArray(SvtResId(STRARY_SVT_DOCINFO)) + : ResStringArray(ResId(STRARY_SVT_DOCINFO, *SvtResMgr::GetResMgr())) { } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 0c2528207a2c..4ed627ea5a21 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -197,8 +197,8 @@ void Calendar::ImplInit( WinBits nWinStyle ) ImplCalendarSelectDate( mpSelectTable, maCurDate, true ); // Sonstige Strings erzeugen - maDayText = SVT_RESSTR(STR_SVT_CALENDAR_DAY); - maWeekText = SVT_RESSTR(STR_SVT_CALENDAR_WEEK); + maDayText = SvtResId(STR_SVT_CALENDAR_DAY); + maWeekText = SvtResId(STR_SVT_CALENDAR_WEEK); // Tagestexte anlegen for (sal_Int32 i = 0; i < 31; ++i) @@ -2020,7 +2020,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable ) if ( !mpTodayBtn ) { mpTodayBtn = VclPtr<PushButton>::Create( this, WB_NOPOINTERFOCUS ); - OUString aTodayText(SVT_RESSTR(STR_SVT_CALENDAR_TODAY)); + OUString aTodayText(SvtResId(STR_SVT_CALENDAR_TODAY)); mpTodayBtn->SetText( aTodayText ); Size aSize; aSize.Width() = mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() ); @@ -2046,7 +2046,7 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable ) if ( !mpNoneBtn ) { mpNoneBtn = VclPtr<PushButton>::Create( this, WB_NOPOINTERFOCUS ); - OUString aNoneText(SVT_RESSTR(STR_SVT_CALENDAR_NONE)); + OUString aNoneText(SvtResId(STR_SVT_CALENDAR_NONE)); mpNoneBtn->SetText( aNoneText ); Size aSize; aSize.Width() = mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() ); diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index b11cfceca646..15ea3a6afb1e 100644 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx @@ -24,20 +24,18 @@ // implementation of the collator-algorithm-name translation CollatorResource::CollatorResource() { - #define RESSTR(rid) SvtResId(rid).toString() - - m_aData.push_back(CollatorResourceData("alphanumeric", RESSTR(STR_SVT_COLLATE_ALPHANUMERIC))); - m_aData.push_back(CollatorResourceData("charset", RESSTR(STR_SVT_COLLATE_CHARSET))); - m_aData.push_back(CollatorResourceData("dict", RESSTR(STR_SVT_COLLATE_DICTIONARY))); - m_aData.push_back(CollatorResourceData("normal", RESSTR(STR_SVT_COLLATE_NORMAL))); - m_aData.push_back(CollatorResourceData("pinyin", RESSTR(STR_SVT_COLLATE_PINYIN))); - m_aData.push_back(CollatorResourceData("radical", RESSTR(STR_SVT_COLLATE_RADICAL))); - m_aData.push_back(CollatorResourceData("stroke", RESSTR(STR_SVT_COLLATE_STROKE))); - m_aData.push_back(CollatorResourceData("unicode", RESSTR(STR_SVT_COLLATE_UNICODE))); - m_aData.push_back(CollatorResourceData("zhuyin", RESSTR(STR_SVT_COLLATE_ZHUYIN))); - m_aData.push_back(CollatorResourceData("phonebook", RESSTR(STR_SVT_COLLATE_PHONEBOOK))); - m_aData.push_back(CollatorResourceData("phonetic (alphanumeric first)", RESSTR(STR_SVT_COLLATE_PHONETIC_F))); - m_aData.push_back(CollatorResourceData("phonetic (alphanumeric last)", RESSTR(STR_SVT_COLLATE_PHONETIC_L))); + m_aData.push_back(CollatorResourceData("alphanumeric", SvtResId(STR_SVT_COLLATE_ALPHANUMERIC))); + m_aData.push_back(CollatorResourceData("charset", SvtResId(STR_SVT_COLLATE_CHARSET))); + m_aData.push_back(CollatorResourceData("dict", SvtResId(STR_SVT_COLLATE_DICTIONARY))); + m_aData.push_back(CollatorResourceData("normal", SvtResId(STR_SVT_COLLATE_NORMAL))); + m_aData.push_back(CollatorResourceData("pinyin", SvtResId(STR_SVT_COLLATE_PINYIN))); + m_aData.push_back(CollatorResourceData("radical", SvtResId(STR_SVT_COLLATE_RADICAL))); + m_aData.push_back(CollatorResourceData("stroke", SvtResId(STR_SVT_COLLATE_STROKE))); + m_aData.push_back(CollatorResourceData("unicode", SvtResId(STR_SVT_COLLATE_UNICODE))); + m_aData.push_back(CollatorResourceData("zhuyin", SvtResId(STR_SVT_COLLATE_ZHUYIN))); + m_aData.push_back(CollatorResourceData("phonebook", SvtResId(STR_SVT_COLLATE_PHONEBOOK))); + m_aData.push_back(CollatorResourceData("phonetic (alphanumeric first)", SvtResId(STR_SVT_COLLATE_PHONETIC_F))); + m_aData.push_back(CollatorResourceData("phonetic (alphanumeric last)", SvtResId(STR_SVT_COLLATE_PHONETIC_L))); } const OUString& diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index cbd2227cd21f..0291420b8a8d 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1075,14 +1075,14 @@ FontStyleBox::FontStyleBox(vcl::Window* pParent, WinBits nBits) { //Use the standard texts to get an optimal size and stick to that size. //That should stop the character dialog dancing around. - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_LIGHT)); - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_LIGHT_ITALIC)); - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_NORMAL)); - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_NORMAL_ITALIC)); - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_BOLD)); - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_BOLD_ITALIC)); - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_BLACK)); - InsertEntry(SVT_RESSTR(STR_SVT_STYLE_BLACK_ITALIC)); + InsertEntry(SvtResId(STR_SVT_STYLE_LIGHT)); + InsertEntry(SvtResId(STR_SVT_STYLE_LIGHT_ITALIC)); + InsertEntry(SvtResId(STR_SVT_STYLE_NORMAL)); + InsertEntry(SvtResId(STR_SVT_STYLE_NORMAL_ITALIC)); + InsertEntry(SvtResId(STR_SVT_STYLE_BOLD)); + InsertEntry(SvtResId(STR_SVT_STYLE_BOLD_ITALIC)); + InsertEntry(SvtResId(STR_SVT_STYLE_BLACK)); + InsertEntry(SvtResId(STR_SVT_STYLE_BLACK_ITALIC)); aOptimalSize = GetOptimalSize(); Clear(); } diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 22bf7c16e561..0aeb07318966 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -341,14 +341,14 @@ FontList::FontList(OutputDevice* pDevice, OutputDevice* pDevice2) mpSizeAry = nullptr; // store style names - maLight = SVT_RESSTR(STR_SVT_STYLE_LIGHT); - maLightItalic = SVT_RESSTR(STR_SVT_STYLE_LIGHT_ITALIC); - maNormal = SVT_RESSTR(STR_SVT_STYLE_NORMAL); - maNormalItalic = SVT_RESSTR(STR_SVT_STYLE_NORMAL_ITALIC); - maBold = SVT_RESSTR(STR_SVT_STYLE_BOLD); - maBoldItalic = SVT_RESSTR(STR_SVT_STYLE_BOLD_ITALIC); - maBlack = SVT_RESSTR(STR_SVT_STYLE_BLACK); - maBlackItalic = SVT_RESSTR(STR_SVT_STYLE_BLACK_ITALIC); + maLight = SvtResId(STR_SVT_STYLE_LIGHT); + maLightItalic = SvtResId(STR_SVT_STYLE_LIGHT_ITALIC); + maNormal = SvtResId(STR_SVT_STYLE_NORMAL); + maNormalItalic = SvtResId(STR_SVT_STYLE_NORMAL_ITALIC); + maBold = SvtResId(STR_SVT_STYLE_BOLD); + maBoldItalic = SvtResId(STR_SVT_STYLE_BOLD_ITALIC); + maBlack = SvtResId(STR_SVT_STYLE_BLACK); + maBlackItalic = SvtResId(STR_SVT_STYLE_BLACK_ITALIC); ImplInsertFonts(pDevice, true); @@ -492,7 +492,7 @@ OUString FontList::GetFontMapText( const FontMetric& rInfo ) const if ( !pData ) { if (maMapNotAvailable.isEmpty()) - maMapNotAvailable = SVT_RESSTR(STR_SVT_FONTMAP_NOTAVAILABLE); + maMapNotAvailable = SvtResId(STR_SVT_FONTMAP_NOTAVAILABLE); return maMapNotAvailable; } @@ -520,7 +520,7 @@ OUString FontList::GetFontMapText( const FontMetric& rInfo ) const if ( !bNotSynthetic ) { if (maMapStyleNotAvailable.isEmpty()) - const_cast<FontList*>(this)->maMapStyleNotAvailable = SVT_RESSTR(STR_SVT_FONTMAP_STYLENOTAVAILABLE); + const_cast<FontList*>(this)->maMapStyleNotAvailable = SvtResId(STR_SVT_FONTMAP_STYLENOTAVAILABLE); return maMapStyleNotAvailable; } } @@ -529,13 +529,13 @@ OUString FontList::GetFontMapText( const FontMetric& rInfo ) const if ( nType == FontListFontNameType::PRINTER ) { if (maMapPrinterOnly.isEmpty()) - const_cast<FontList*>(this)->maMapPrinterOnly = SVT_RESSTR(STR_SVT_FONTMAP_PRINTERONLY); + const_cast<FontList*>(this)->maMapPrinterOnly = SvtResId(STR_SVT_FONTMAP_PRINTERONLY); return maMapPrinterOnly; } else { if (maMapBoth.isEmpty()) - const_cast<FontList*>(this)->maMapBoth = SVT_RESSTR(STR_SVT_FONTMAP_BOTH); + const_cast<FontList*>(this)->maMapBoth = SvtResId(STR_SVT_FONTMAP_BOTH); return maMapBoth; } } diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index e0ccea2978bc..7fc74b545618 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -37,7 +37,7 @@ FileControl::FileControl( vcl::Window* pParent, WinBits nStyle ) : Window( pParent, nStyle|WB_DIALOGCONTROL ), maEdit( VclPtr<Edit>::Create(this, (nStyle&(~WB_BORDER))|WB_NOTABSTOP) ), maButton( VclPtr<PushButton>::Create( this, (nStyle&(~WB_BORDER))|WB_NOLIGHTBORDER|WB_NOPOINTERFOCUS|WB_NOTABSTOP ) ), - maButtonText( SVT_RESSTR(STR_FILECTRL_BUTTONTEXT) ), + maButtonText( SvtResId(STR_FILECTRL_BUTTONTEXT) ), mnInternalFlags( FileControlMode_Internal::ORIGINALBUTTONTEXT ) { maButton->SetClickHdl( LINK( this, FileControl, ButtonHdl ) ); diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 11e1acf2b3d3..cb8d5084de2b 100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -25,18 +25,16 @@ // implementation of the indexentry-algorithm-name translation IndexEntryResource::IndexEntryResource() { - #define RESSTR(rid) SvtResId(rid).toString() - - m_aData.push_back(IndexEntryResourceData("alphanumeric", RESSTR(STR_SVT_INDEXENTRY_ALPHANUMERIC))); - m_aData.push_back(IndexEntryResourceData("dict", RESSTR(STR_SVT_INDEXENTRY_DICTIONARY))); - m_aData.push_back(IndexEntryResourceData("pinyin", RESSTR(STR_SVT_INDEXENTRY_PINYIN))); - m_aData.push_back(IndexEntryResourceData("radical", RESSTR(STR_SVT_INDEXENTRY_RADICAL))); - m_aData.push_back(IndexEntryResourceData("stroke", RESSTR(STR_SVT_INDEXENTRY_STROKE))); - m_aData.push_back(IndexEntryResourceData("zhuyin", RESSTR(STR_SVT_INDEXENTRY_ZHUYIN))); - m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric first) (grouped by syllable)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_FS))); - m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric first) (grouped by consonant)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_FC))); - m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric last) (grouped by syllable)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_LS))); - m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric last) (grouped by consonant)", RESSTR(STR_SVT_INDEXENTRY_PHONETIC_LC))); + m_aData.push_back(IndexEntryResourceData("alphanumeric", SvtResId(STR_SVT_INDEXENTRY_ALPHANUMERIC))); + m_aData.push_back(IndexEntryResourceData("dict", SvtResId(STR_SVT_INDEXENTRY_DICTIONARY))); + m_aData.push_back(IndexEntryResourceData("pinyin", SvtResId(STR_SVT_INDEXENTRY_PINYIN))); + m_aData.push_back(IndexEntryResourceData("radical", SvtResId(STR_SVT_INDEXENTRY_RADICAL))); + m_aData.push_back(IndexEntryResourceData("stroke", SvtResId(STR_SVT_INDEXENTRY_STROKE))); + m_aData.push_back(IndexEntryResourceData("zhuyin", SvtResId(STR_SVT_INDEXENTRY_ZHUYIN))); + m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric first) (grouped by syllable)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_FS))); + m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric first) (grouped by consonant)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_FC))); + m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric last) (grouped by syllable)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_LS))); + m_aData.push_back(IndexEntryResourceData("phonetic (alphanumeric last) (grouped by consonant)", SvtResId(STR_SVT_INDEXENTRY_PHONETIC_LC))); } const OUString& IndexEntryResource::GetTranslation(const OUString &r_Algorithm) diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index b459522cc7b3..62be41f9eede 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -560,16 +560,16 @@ void TabBar::ImplInit( WinBits nWinStyle ) ImplInitControls(); if (mpImpl->mpFirstButton) - mpImpl->mpFirstButton->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVET0HOME)); + mpImpl->mpFirstButton->SetAccessibleName(SvtResId(STR_TABBAR_PUSHBUTTON_MOVET0HOME)); if (mpImpl->mpPrevButton) - mpImpl->mpPrevButton->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVELEFT)); + mpImpl->mpPrevButton->SetAccessibleName(SvtResId(STR_TABBAR_PUSHBUTTON_MOVELEFT)); if (mpImpl->mpNextButton) - mpImpl->mpNextButton->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVERIGHT)); + mpImpl->mpNextButton->SetAccessibleName(SvtResId(STR_TABBAR_PUSHBUTTON_MOVERIGHT)); if (mpImpl->mpLastButton) - mpImpl->mpLastButton->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_MOVETOEND)); + mpImpl->mpLastButton->SetAccessibleName(SvtResId(STR_TABBAR_PUSHBUTTON_MOVETOEND)); if (mpImpl->mpAddButton) - mpImpl->mpAddButton->SetAccessibleName(SVT_RESSTR(STR_TABBAR_PUSHBUTTON_ADDTAB)); + mpImpl->mpAddButton->SetAccessibleName(SvtResId(STR_TABBAR_PUSHBUTTON_ADDTAB)); SetSizePixel( Size( 100, CalcWindowSizePixel().Height() ) ); ImplInitSettings( true, true ); diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 5c887e742b6a..c60df5fd7ed5 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -175,7 +175,7 @@ void PlaceEditDialog::InitDetails( ) unsigned int nPos = 0; for ( sal_Int32 i = 0; i < aTypesUrlsList.getLength( ) && aTypesNamesList.getLength( ); ++i ) { - OUString sUrl = aTypesUrlsList[i].replaceFirst("<host", "<" + SVT_RESSTR(STR_SVT_HOST)).replaceFirst("port>", SVT_RESSTR(STR_SVT_PORT) + ">"); + OUString sUrl = aTypesUrlsList[i].replaceFirst("<host", "<" + SvtResId(STR_SVT_HOST)).replaceFirst("port>", SvtResId(STR_SVT_PORT) + ">"); if ((sUrl == GDRIVE_BASE_URL && bSkipGDrive) || (sUrl.startsWith( ALFRESCO_CLOUD_BASE_URL) && bSkipAlfresco) || diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 414f3f434715..c79e3ab01978 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -485,7 +485,7 @@ void AssignmentPersistentData::ImplCommit() AddressBookSourceDialog::AddressBookSourceDialog(vcl::Window* _pParent, const Reference< XComponentContext >& _rxORB ) : ModalDialog(_pParent, "AddressTemplateDialog", "svt/ui/addresstemplatedialog.ui") - , m_sNoFieldSelection(SVT_RESSTR(STR_NO_FIELD_SELECTION)) + , m_sNoFieldSelection(SvtResId(STR_NO_FIELD_SELECTION)) , m_xORB(_rxORB) , m_pImpl( new AddressBookSourceDialogData ) { @@ -497,7 +497,7 @@ void AssignmentPersistentData::ImplCommit() const Reference< XDataSource >& _rxTransientDS, const OUString& _rDataSourceName, const OUString& _rTable, const Sequence< AliasProgrammaticPair >& _rMapping ) : ModalDialog(_pParent, "AddressTemplateDialog", "svt/ui/addresstemplatedialog.ui") - , m_sNoFieldSelection(SVT_RESSTR(STR_NO_FIELD_SELECTION)) + , m_sNoFieldSelection(SvtResId(STR_NO_FIELD_SELECTION)) , m_xORB(_rxORB) , m_pImpl( new AddressBookSourceDialogData( _rxTransientDS, _rDataSourceName, _rTable, _rMapping ) ) { @@ -537,37 +537,37 @@ void AssignmentPersistentData::ImplCommit() // should be adjustable with a rather small effort.) // initialize the strings for the field labels - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_FIRSTNAME )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_LASTNAME )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_COMPANY)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_DEPARTMENT )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_STREET )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ZIPCODE )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_CITY )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_STATE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_COUNTRY )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_HOMETEL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_WORKTEL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_OFFICETEL)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_MOBILE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_TELOTHER)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_PAGER)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_FAX )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_EMAIL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_URL )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_TITLE )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_POSITION )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_INITIALS )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ADDRFORM )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_SALUTATION )); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_ID)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_CALENDAR)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_INVITE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_NOTE)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER1)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER2)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER3)); - m_pImpl->aFieldLabels.push_back( SVT_RESSTR( STR_FIELD_USER4)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_FIRSTNAME )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_LASTNAME )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_COMPANY)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_DEPARTMENT )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_STREET )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_ZIPCODE )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_CITY )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_STATE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_COUNTRY )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_HOMETEL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_WORKTEL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_OFFICETEL)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_MOBILE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_TELOTHER)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_PAGER)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_FAX )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_EMAIL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_URL )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_TITLE )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_POSITION )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_INITIALS )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_ADDRFORM )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_SALUTATION )); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_ID)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_CALENDAR)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_INVITE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_NOTE)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER1)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER2)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER3)); + m_pImpl->aFieldLabels.push_back( SvtResId( STR_FIELD_USER4)); long nLabelWidth = 0; long nListBoxWidth = m_pImpl->pFields[0]->approximate_char_width() * 20; diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 312a2cfb725e..50e81b579da3 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -174,7 +174,7 @@ void SvObjectServerList::FillInsertObjects() #ifdef _WIN32 SvGlobalName aOleFact( SO3_OUT_CLASSID ); - OUString aOleObj( SVT_RESSTR( STR_FURTHER_OBJECT ) ); + OUString aOleObj( SvtResId( STR_FURTHER_OBJECT ) ); aObjectServerList.push_back( SvObjectServer( aOleFact, aOleObj ) ); #endif @@ -277,7 +277,7 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId ) } if( nResId ) - aUIName = SVT_RESSTR( nResId ); + aUIName = SvtResId( nResId ); else aUIName = SotExchange::GetFormatName( nId ); @@ -334,7 +334,7 @@ bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rData, O _rSource += pSrcOfCopy; } else - _rSource = SVT_RESSTR(STR_UNKNOWN_SOURCE); + _rSource = SvtResId(STR_UNKNOWN_SOURCE); } bRet = true; } diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 84d3283dc520..aa805f9e886c 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -129,7 +129,7 @@ static OUString ImplPrnDlgAddString(const OUString& rStr, const OUString& rAddSt static OUString ImplPrnDlgAddResString(const OUString& rStr, sal_uInt16 nResId) { - return ImplPrnDlgAddString(rStr, SVT_RESSTR(nResId)); + return ImplPrnDlgAddString(rStr, SvtResId(nResId)); } @@ -199,7 +199,7 @@ OUString ImplPrnDlgGetStatusText( const QueueInfo& rInfo ) sal_uLong nJobs = rInfo.GetJobs(); if ( nJobs && (nJobs != QUEUE_JOBS_DONTKNOW) ) { - OUString aJobStr( SVT_RESSTR( STR_SVT_PRNDLG_JOBCOUNT ) ); + OUString aJobStr( SvtResId( STR_SVT_PRNDLG_JOBCOUNT ) ); OUString aJobs( OUString::number( nJobs ) ); aStr = ImplPrnDlgAddString(aStr, aJobStr.replaceAll("%d", aJobs)); } diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 356988b4bc6f..5ccc4cdf60a1 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -129,7 +129,7 @@ namespace svt SetEmptyViewMargin(); m_pImpl->pRoadmap.disposeAndReset( VclPtr<ORoadmap>::Create( this, WB_TABSTOP ) ); - m_pImpl->pRoadmap->SetText( SVT_RESSTR( STR_WIZDLG_ROADMAP_TITLE ) ); + m_pImpl->pRoadmap->SetText( SvtResId( STR_WIZDLG_ROADMAP_TITLE ) ); m_pImpl->pRoadmap->SetPosPixel( Point( 0, 0 ) ); m_pImpl->pRoadmap->SetItemSelectHdl( LINK( this, RoadmapWizard, OnRoadmapItemSelected ) ); diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 6edc96012d01..3a4f5a750531 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -136,7 +136,7 @@ namespace svt m_pPrevPage = VclPtr<PushButton>::Create(this, WB_TABSTOP); m_pPrevPage->SetHelpId( HID_WIZARD_PREVIOUS ); m_pPrevPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); - m_pPrevPage->SetText(SVT_RESSTR(STR_WIZDLG_PREVIOUS)); + m_pPrevPage->SetText(SvtResId(STR_WIZDLG_PREVIOUS)); m_pPrevPage->Show(); m_pPrevPage->set_id("previous"); @@ -154,7 +154,7 @@ namespace svt m_pNextPage = VclPtr<PushButton>::Create(this, WB_TABSTOP); m_pNextPage->SetHelpId( HID_WIZARD_NEXT ); m_pNextPage->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); - m_pNextPage->SetText(OUString(SVT_RESSTR(STR_WIZDLG_NEXT))); + m_pNextPage->SetText(OUString(SvtResId(STR_WIZDLG_NEXT))); m_pNextPage->Show(); m_pNextPage->set_id("next"); @@ -168,7 +168,7 @@ namespace svt { m_pFinish = VclPtr<OKButton>::Create(this, WB_TABSTOP); m_pFinish->SetSizePixel( LogicToPixel( Size( 50, 14 ), MapUnit::MapAppFont ) ); - m_pFinish->SetText(SVT_RESSTR(STR_WIZDLG_FINISH)); + m_pFinish->SetText(SvtResId(STR_WIZDLG_FINISH)); m_pFinish->Show(); m_pFinish->set_id("finish"); diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 228d265f65ff..94ff492a9ab5 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -521,16 +521,16 @@ ExportDialog::ExportDialog(FltCallDialogParameter& rPara, , mxSourceDocument(rxSourceDocument) , mpSbCompression(nullptr) , mpNfCompression(nullptr) - , msEstimatedSizePix1(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_PIX_1)) - , msEstimatedSizePix2(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_PIX_2)) - , msEstimatedSizeVec(SVT_RESSTR(STR_SVT_ESTIMATED_SIZE_VEC)) - , ms1BitTreshold(SVT_RESSTR(STR_SVT_1BIT_THRESHOLD)) - , ms1BitDithered(SVT_RESSTR(STR_SVT_1BIT_DITHERED)) - , ms4BitGrayscale(SVT_RESSTR(STR_SVT_4BIT_GRAYSCALE)) - , ms4BitColorPalette(SVT_RESSTR(STR_SVT_4BIT_COLOR_PALETTE)) - , ms8BitGrayscale(SVT_RESSTR(STR_SVT_8BIT_GRAYSCALE)) - , ms8BitColorPalette(SVT_RESSTR(STR_SVT_8BIT_COLOR_PALETTE)) - , ms24BitColor(SVT_RESSTR(STR_SVT_24BIT_TRUE_COLOR)) + , msEstimatedSizePix1(SvtResId(STR_SVT_ESTIMATED_SIZE_PIX_1)) + , msEstimatedSizePix2(SvtResId(STR_SVT_ESTIMATED_SIZE_PIX_2)) + , msEstimatedSizeVec(SvtResId(STR_SVT_ESTIMATED_SIZE_VEC)) + , ms1BitTreshold(SvtResId(STR_SVT_1BIT_THRESHOLD)) + , ms1BitDithered(SvtResId(STR_SVT_1BIT_DITHERED)) + , ms4BitGrayscale(SvtResId(STR_SVT_4BIT_GRAYSCALE)) + , ms4BitColorPalette(SvtResId(STR_SVT_4BIT_COLOR_PALETTE)) + , ms8BitGrayscale(SvtResId(STR_SVT_8BIT_GRAYSCALE)) + , ms8BitColorPalette(SvtResId(STR_SVT_8BIT_COLOR_PALETTE)) + , ms24BitColor(SvtResId(STR_SVT_24BIT_TRUE_COLOR)) , maExt(rPara.aFilterExt) , mnFormat(FORMAT_UNKNOWN) , mnMaxFilesizeForRealtimePreview(0) diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 7260958fdc91..e72d6e0564bd 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -449,7 +449,7 @@ static OUString GetDescriptionByFactory_Impl( const OUString& rFactory ) if ( nResId ) { SolarMutexGuard aGuard; - return SvtResId(nResId).toString(); + return SvtResId(nResId); } return OUString(); } @@ -750,7 +750,7 @@ OUString SvFileInformationManager::GetDescription_Impl( const INetURLObject& rOb sDescription += "-"; } SolarMutexGuard aGuard; - sDescription += SvtResId(nResId).toString(); + sDescription += SvtResId(nResId); } DBG_ASSERT( !sDescription.isEmpty(), "file without description" ); @@ -829,7 +829,7 @@ OUString SvFileInformationManager::GetFolderDescription( const svtools::VolumeIn else if ( rInfo.m_bIsRemoveable || rInfo.m_bIsVolume ) nResId = STR_DESCRIPTION_LOCALE_VOLUME; - return SvtResId(nResId).toString(); + return SvtResId(nResId); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index bfbbad62bb23..49fb5bbd9826 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -130,8 +130,8 @@ const OUString ApplyLreOrRleEmbedding( const OUString &rText ) return aRes; } -SvtLanguageTableImpl::SvtLanguageTableImpl() : - ResStringArray( SvtResId( STR_ARR_SVT_LANGUAGE_TABLE ) ) +SvtLanguageTableImpl::SvtLanguageTableImpl() + : ResStringArray(ResId(STR_ARR_SVT_LANGUAGE_TABLE, *SvtResMgr::GetResMgr())) { auto xNA = officecfg::VCL::ExtraLanguages::get(); uno::Sequence <OUString> rElementNames = xNA->getElementNames(); diff --git a/svtools/source/misc/svtresid.cxx b/svtools/source/misc/svtresid.cxx index 24906fd8eef5..59da66bcd51c 100644 --- a/svtools/source/misc/svtresid.cxx +++ b/svtools/source/misc/svtresid.cxx @@ -32,19 +32,14 @@ namespace pMgr = ResMgr::CreateResMgr("svt", aLocale ); return pMgr; } - - ResMgr* getResMgr() - { - return getResMgr(Application::GetSettings().GetUILanguageTag()); - } } -SvtResId::SvtResId(sal_uInt16 nId) : - ResId(nId, *getResMgr()) +ResMgr* SvtResMgr::GetResMgr() { + return getResMgr(Application::GetSettings().GetUILanguageTag()); } -void SvtResId::DeleteResMgr() +void SvtResMgr::DeleteResMgr() { DELETEZ( pMgr ); } diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index 986d8eb72297..91e97317d03b 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -59,8 +59,8 @@ AccFrameSelector::AccFrameSelector( FrameSelector& rFrameSel, FrameBorderType eB meBorder( eBorder ), maFocusListeners( maFocusMutex ), maPropertyListeners( maPropertyMutex ), - maNames( SVX_RES( RID_SVXSTR_FRMSEL_TEXTS ) ), - maDescriptions( SVX_RES(RID_SVXSTR_FRMSEL_DESCRIPTIONS) ), + maNames( ResId(RID_SVXSTR_FRMSEL_TEXTS, DIALOG_MGR()) ), + maDescriptions( ResId(RID_SVXSTR_FRMSEL_DESCRIPTIONS, DIALOG_MGR()) ), mnClientId( 0 ) { if ( mpFrameSel ) diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index f75757d4c78a..1f51bf425960 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -73,7 +73,7 @@ void DescriptionGenerator::Initialize (sal_Int32 nResourceId) OUString sPrefix; { SolarMutexGuard aGuard; - sPrefix = OUString (SVX_RESSTR (nResourceId)); + sPrefix = OUString (SvxResId (nResourceId)); } // Forward the call with the resulting string. @@ -90,10 +90,10 @@ void DescriptionGenerator::Initialize (const OUString& sPrefix) SolarMutexGuard aGuard; msDescription.append(' '); - msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH))); + msDescription.append(OUString (SvxResId(RID_SVXSTR_A11Y_WITH))); msDescription.append(' '); - msDescription.append(OUString (SVX_RESSTR (RID_SVXSTR_A11Y_STYLE))); + msDescription.append(OUString (SvxResId (RID_SVXSTR_A11Y_STYLE))); msDescription.append('='); } @@ -133,7 +133,7 @@ void DescriptionGenerator::AddProperty ( OUString sLocalizedName; { SolarMutexGuard aGuard; - sLocalizedName = SVX_RESSTR (nLocalizedNameId); + sLocalizedName = SvxResId (nLocalizedNameId); } AddProperty (sPropertyName, aType, sLocalizedName, nWhichId); } @@ -155,7 +155,7 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName, SolarMutexGuard aGuard; msDescription.append(' '); - msDescription.append(OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND))); + msDescription.append(OUString (SvxResId(RID_SVXSTR_A11Y_AND))); msDescription.append(' '); mbIsFirstProperty = false; } @@ -325,19 +325,19 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, switch (aFillStyle) { case drawing::FillStyle_NONE: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_NONE); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_NONE); break; case drawing::FillStyle_SOLID: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_SOLID); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_SOLID); break; case drawing::FillStyle_GRADIENT: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_GRADIENT); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_GRADIENT); break; case drawing::FillStyle_HATCH: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_HATCH); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_HATCH); break; case drawing::FillStyle_BITMAP: - sFillStyleName = SVX_RESSTR(RID_SVXSTR_A11Y_FILLSTYLE_BITMAP); + sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_BITMAP); break; default: break; diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 2d85c66c4d63..0f970ee347d2 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -93,8 +93,8 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( { ::SolarMutexGuard aSolarGuard; - msName = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_NAME ); - msDescription = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION ); + msName = SvxResId( RID_SVXSTR_GRAPHCTRL_ACC_NAME ); + msDescription = SvxResId( RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION ); } maTreeInfo.SetSdrView( mpView ); diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx index 0fbeac31e756..021592269fc8 100644 --- a/svx/source/accessibility/ShapeTypeHandler.cxx +++ b/svx/source/accessibility/ShapeTypeHandler.cxx @@ -318,7 +318,7 @@ OUString if (nResourceId != -1) { SolarMutexGuard aGuard; - sName = OUString (SVX_RESSTR((unsigned short)nResourceId)); + sName = OUString (SvxResId((unsigned short)nResourceId)); } return sName; diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 3292514fd62c..579cf6e6e1f5 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -176,13 +176,13 @@ sal_Int16 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleRole( ) OUString SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleDescription( ) { OExternalLockGuard aGuard( this ); - return SVX_RESSTR( RID_SVXSTR_CHARACTER_SELECTION); + return SvxResId( RID_SVXSTR_CHARACTER_SELECTION); } OUString SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleName( ) { OExternalLockGuard aGuard( this ); - return SVX_RESSTR( RID_SVXSTR_CHAR_SEL_DESC); + return SvxResId( RID_SVXSTR_CHAR_SEL_DESC); } Reference< XAccessibleRelationSet > SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleRelationSet( ) @@ -370,7 +370,7 @@ sal_Int16 SAL_CALL SvxShowCharSetAcc::getAccessibleRole() OUString SAL_CALL SvxShowCharSetAcc::getAccessibleDescription() { OExternalLockGuard aGuard( this ); - return SVX_RESSTR( RID_SVXSTR_CHARACTER_SELECTION ); + return SvxResId( RID_SVXSTR_CHARACTER_SELECTION ); } @@ -378,7 +378,7 @@ OUString SAL_CALL SvxShowCharSetAcc::getAccessibleName() { OExternalLockGuard aGuard( this ); ensureAlive(); - return SVX_RESSTR( RID_SVXSTR_CHAR_SEL_DESC ); + return SvxResId( RID_SVXSTR_CHAR_SEL_DESC ); } @@ -637,7 +637,7 @@ OUString SAL_CALL SvxShowCharSetItemAcc::getAccessibleDescription() if( c < 256 ) snprintf( buf+6, 10, " (%" SAL_PRIuUINT32 ")", c ); - sDescription = SVX_RESSTR( RID_SVXSTR_CHARACTER_CODE ) + sDescription = SvxResId( RID_SVXSTR_CHARACTER_CODE ) + " " + OUString(buf, strlen(buf), RTL_TEXTENCODING_ASCII_US); diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index 0b091932c1d1..6bdc0c05c3e2 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -113,8 +113,8 @@ SvxRectCtlAccessibleContext::SvxRectCtlAccessibleContext( { { ::SolarMutexGuard aSolarGuard; - msName = SVX_RESSTR( RID_SVXSTR_RECTCTL_ACC_CORN_NAME ); - msDescription = SVX_RESSTR( RID_SVXSTR_RECTCTL_ACC_CORN_DESCR ); + msName = SvxResId( RID_SVXSTR_RECTCTL_ACC_CORN_NAME ); + msDescription = SvxResId( RID_SVXSTR_RECTCTL_ACC_CORN_DESCR ); } mpChildren = new SvxRectCtlChildAccessibleContext*[ MAX_NUM_OF_CHILDREN ]; @@ -226,8 +226,8 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil if( !xChild.is() ) { const ChildIndexToPointData* p = IndexToPoint( nIndex ); - OUString aName(SVX_RESSTR(p->nResIdName)); - OUString aDescr(SVX_RESSTR(p->nResIdDescr)); + OUString aName(SvxResId(p->nResIdName)); + OUString aDescr(SvxResId(p->nResIdDescr)); tools::Rectangle aFocusRect( mpRepr->CalculateFocusRectangle( p->ePoint ) ); diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index 33f2dc508530..f307083f5245 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -109,7 +109,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString& // fish out the graphic's name - aDialogHelper.SetTitle( SVX_RESSTR(RID_SVXSTR_EXPORT_GRAPHIC_TITLE)); + aDialogHelper.SetTitle( SvxResId(RID_SVXSTR_EXPORT_GRAPHIC_TITLE)); aDialogHelper.SetDisplayDirectory( aPath.GetMainURL(INetURLObject::DecodeMechanism::ToIUri) ); INetURLObject aURL; aURL.SetSmartURL( rGraphicName ); @@ -217,7 +217,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xSha FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION ); Reference < XFilePicker2 > xFilePicker = aDialogHelper.GetFilePicker(); - aDialogHelper.SetTitle( SVX_RESSTR(RID_SVXSTR_SAVEAS_IMAGE) ); + aDialogHelper.SetTitle( SvxResId(RID_SVXSTR_SAVEAS_IMAGE) ); INetURLObject aPath; aPath.SetSmartURL( sGraphicPath ); diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index d8b41899cdb4..33f4e23b7969 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -375,7 +375,7 @@ IMPL_LINK(SafeModeDialog, CreateZipBtnHdl, Button*, /*pBtn*/, void) } catch (uno::Exception) { - ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SVX_RESSTR(RID_SVXSTR_SAFEMODE_ZIP_FAILURE)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SvxResId(RID_SVXSTR_SAFEMODE_ZIP_FAILURE)); aErrorBox->Execute(); return; } diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 3b56e960416c..c0bd9c222eb7 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -37,7 +37,6 @@ #include <memory> #include "helpid.hrc" -#define BMP_RESID(nId) ResId(nId, DIALOG_MGR()) #define OWN_CALLMODE SfxCallMode::ASYNCHRON | SfxCallMode::RECORD @@ -427,7 +426,7 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* m_pLbColor4->SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) ); m_pLbColorTrans->Disable(); - OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE)); + OUString sColorPalette (SvxResId( RID_SVXDLG_BMPMASK_STR_PALETTE)); OUString sColorPaletteN; m_pQSet1->SetStyle( m_pQSet1->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER ); @@ -1096,7 +1095,7 @@ bool SvxBmpMask::IsEyedropping() const void SvxBmpMask::SetAccessibleNames() { // set the accessible name for valueset - OUString sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE)); + OUString sColorPalette (SvxResId( RID_SVXDLG_BMPMASK_STR_PALETTE)); OUString sColorPaletteN; sColorPaletteN = sColorPalette + " 1"; diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 21d2dcd50cce..e1b298df858d 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -793,7 +793,7 @@ void SubsetMap::InitList() { bInit = false; - ResStringArray aStringList(SVX_RES(RID_SUBSETMAP)); + ResStringArray aStringList(ResId(RID_SUBSETMAP, DIALOG_MGR())); //I wish icu had a way to give me the block ranges for (int i = UBLOCK_BASIC_LATIN; i < UBLOCK_COUNT; ++i) diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index fb5c545ad4ec..683cc80ed0d6 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -151,34 +151,34 @@ void CompressGraphicsDialog::Update() switch(aLinkType) { case GfxLinkType::NativeGif: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_GIF); + aGraphicTypeString = SvxResId(STR_IMAGE_GIF); break; case GfxLinkType::NativeJpg: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_JPEG); + aGraphicTypeString = SvxResId(STR_IMAGE_JPEG); break; case GfxLinkType::NativePng: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_PNG); + aGraphicTypeString = SvxResId(STR_IMAGE_PNG); break; case GfxLinkType::NativeTif: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_TIFF); + aGraphicTypeString = SvxResId(STR_IMAGE_TIFF); break; case GfxLinkType::NativeWmf: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_WMF); + aGraphicTypeString = SvxResId(STR_IMAGE_WMF); break; case GfxLinkType::NativeMet: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_MET); + aGraphicTypeString = SvxResId(STR_IMAGE_MET); break; case GfxLinkType::NativePct: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_PCT); + aGraphicTypeString = SvxResId(STR_IMAGE_PCT); break; case GfxLinkType::NativeSvg: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_SVG); + aGraphicTypeString = SvxResId(STR_IMAGE_SVG); break; case GfxLinkType::NativeBmp: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_BMP); + aGraphicTypeString = SvxResId(STR_IMAGE_BMP); break; default: - aGraphicTypeString = SVX_RESSTR(STR_IMAGE_UNKNOWN); + aGraphicTypeString = SvxResId(STR_IMAGE_UNKNOWN); break; } m_pLabelGraphicType->SetText(aGraphicTypeString); @@ -194,7 +194,7 @@ void CompressGraphicsDialog::Update() Size aPixelSize = m_aGraphic.GetSizePixel(); Size aOriginalSize100mm( pDummyVDev->PixelToLogic( m_aGraphic.GetSizePixel(), MapUnit::Map100thMM ) ); - OUString aBitmapSizeString = SVX_RESSTR(STR_IMAGE_ORIGINAL_SIZE); + OUString aBitmapSizeString = SvxResId(STR_IMAGE_ORIGINAL_SIZE); OUString aWidthString = GetUnitString( aOriginalSize100mm.Width(), eFieldUnit, cSeparator ); OUString aHeightString = GetUnitString( aOriginalSize100mm.Height(), eFieldUnit, cSeparator ); aBitmapSizeString = aBitmapSizeString.replaceAll("$(WIDTH)", aWidthString); @@ -205,7 +205,7 @@ void CompressGraphicsDialog::Update() int aValX = (int) (aPixelSize.Width() / GetViewWidthInch()); - OUString aViewSizeString = SVX_RESSTR(STR_IMAGE_VIEW_SIZE); + OUString aViewSizeString = SvxResId(STR_IMAGE_VIEW_SIZE); aWidthString = GetUnitString( m_aViewSize100mm.Width(), eFieldUnit, cSeparator ); aHeightString = GetUnitString( m_aViewSize100mm.Height(), eFieldUnit, cSeparator ); @@ -220,7 +220,7 @@ void CompressGraphicsDialog::Update() aMemStream.Seek( STREAM_SEEK_TO_END ); sal_Int32 aNativeSize = aMemStream.Tell(); - OUString aNativeSizeString = SVX_RESSTR(STR_IMAGE_CAPACITY); + OUString aNativeSizeString = SvxResId(STR_IMAGE_CAPACITY); aNativeSizeString = aNativeSizeString.replaceAll("$(CAPACITY)", OUString::number(aNativeSize / 1024)); m_pFixedText5->SetText(aNativeSizeString); @@ -385,7 +385,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl, Button*, void ) { OUString aSizeAsString = OUString::number(aSize / 1024); - OUString aNewSizeString = SVX_RESSTR(STR_IMAGE_CAPACITY); + OUString aNewSizeString = SvxResId(STR_IMAGE_CAPACITY); aNewSizeString = aNewSizeString.replaceAll("$(CAPACITY)", aSizeAsString); m_pFixedText6->SetText(aNewSizeString); } diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 3291d066ec71..971f31cf21c4 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -25,8 +25,6 @@ #include <vcl/status.hxx> #include <vcl/idle.hxx> -#define CONT_RESID(nId) ResId( nId, DIALOG_MGR() ) - class SvxSuperContourDlg; class SvxContourDlgItem : public SfxControllerItem diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 258fe69f1c4a..17952278e00d 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -959,7 +959,7 @@ void SvxLightCtl3D::Init() maHorScroller->SetHelpId(HID_CTRL3D_HSCROLL); maVerScroller->SetHelpId(HID_CTRL3D_VSCROLL); maSwitcher->SetHelpId(HID_CTRL3D_SWITCHER); - maSwitcher->SetAccessibleName(SVX_RESSTR(STR_SWITCH)); + maSwitcher->SetAccessibleName(SvxResId(STR_SWITCH)); // Light preview maLightControl->Show(); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index def4825ac14d..6926e8e268dc 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1228,12 +1228,12 @@ void FillTypeLB::Fill() { SetUpdateMode( false ); - InsertEntry( SVX_RESSTR(RID_SVXSTR_INVISIBLE) ); - InsertEntry( SVX_RESSTR(RID_SVXSTR_COLOR) ); - InsertEntry( SVX_RESSTR(RID_SVXSTR_GRADIENT) ); - InsertEntry( SVX_RESSTR(RID_SVXSTR_HATCH) ); - InsertEntry( SVX_RESSTR(RID_SVXSTR_BITMAP) ); - InsertEntry( SVX_RESSTR(RID_SVXSTR_PATTERN) ); + InsertEntry( SvxResId(RID_SVXSTR_INVISIBLE) ); + InsertEntry( SvxResId(RID_SVXSTR_COLOR) ); + InsertEntry( SvxResId(RID_SVXSTR_GRADIENT) ); + InsertEntry( SvxResId(RID_SVXSTR_HATCH) ); + InsertEntry( SvxResId(RID_SVXSTR_BITMAP) ); + InsertEntry( SvxResId(RID_SVXSTR_PATTERN) ); AdaptDropDownLineCountToMaximum(); SetUpdateMode( true ); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 90fd4805b660..0d5814ce75ea 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -831,7 +831,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry, short impl_askUserForWizardCancel(vcl::Window* pParent, sal_Int16 nRes) { - ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VclMessageType::Question, VclButtonsType::YesNo); + ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SvxResId(nRes), VclMessageType::Question, VclButtonsType::YesNo); if (aQuery->Execute() == RET_YES) return DLG_RET_OK; else @@ -841,9 +841,9 @@ short impl_askUserForWizardCancel(vcl::Window* pParent, sal_Int16 nRes) RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore) : Dialog(pParent, "DocRecoveryRecoverDialog", "svx/ui/docrecoveryrecoverdialog.ui") - , m_aTitleRecoveryInProgress(SVX_RESSTR(RID_SVXSTR_RECOVERY_INPROGRESS)) - , m_aRecoveryOnlyFinish (SVX_RESSTR(RID_SVXSTR_RECOVERYONLY_FINISH)) - , m_aRecoveryOnlyFinishDescr(SVX_RESSTR(RID_SVXSTR_RECOVERYONLY_FINISH_DESCR)) + , m_aTitleRecoveryInProgress(SvxResId(RID_SVXSTR_RECOVERY_INPROGRESS)) + , m_aRecoveryOnlyFinish (SvxResId(RID_SVXSTR_RECOVERYONLY_FINISH)) + , m_aRecoveryOnlyFinishDescr(SvxResId(RID_SVXSTR_RECOVERYONLY_FINISH_DESCR)) , m_pCore(pCore) , m_eRecoveryState(RecoveryDialog::E_RECOVERY_PREPARED) , m_bWaitForCore(false) diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index b6bd8a1422b4..1bb997084716 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -56,7 +56,7 @@ OUString GetDicInfoStr( const OUString& rName, const LanguageType nLang, bool bN } if ( LANGUAGE_NONE == nLang ) - aTmp += SVX_RESSTR(RID_SVXSTR_LANGUAGE_ALL); + aTmp += SvxResId(RID_SVXSTR_LANGUAGE_ALL); else { aTmp += "["; @@ -149,7 +149,7 @@ void SvxLanguageBoxBase::ImplLanguageBoxBaseInit() { m_aNotCheckedImage = Image(BitmapEx(RID_SVXBMP_NOTCHECKED)); m_aCheckedImage = Image(BitmapEx(RID_SVXBMP_CHECKED)); - m_aAllString = SVX_RESSTR( RID_SVXSTR_LANGUAGE_ALL ); + m_aAllString = SvxResId( RID_SVXSTR_LANGUAGE_ALL ); m_nLangList = SvxLanguageListFlags::EMPTY; m_bHasLangNone = false; m_bLangNoneIsLangAll = false; diff --git a/svx/source/dialog/pagenumberlistbox.cxx b/svx/source/dialog/pagenumberlistbox.cxx index 9a6859293333..88d6789cf18e 100644 --- a/svx/source/dialog/pagenumberlistbox.cxx +++ b/svx/source/dialog/pagenumberlistbox.cxx @@ -27,7 +27,7 @@ PageNumberListBox::PageNumberListBox(vcl::Window* pParent) : ListBox( pParent, WB_BORDER | WB_DROPDOWN) { - ResStringArray aPaperAry( SVX_RES( RID_SVXSTRARY_NUMBERINGTYPE ) ); + ResStringArray aPaperAry( ResId(RID_SVXSTRARY_NUMBERINGTYPE, DIALOG_MGR()) ); sal_uInt32 nCnt = aPaperAry.Count(); for ( sal_uInt32 i = 0; i < nCnt; ++i ) diff --git a/svx/source/dialog/papersizelistbox.cxx b/svx/source/dialog/papersizelistbox.cxx index 57cc63fe3acd..263de1e0712a 100644 --- a/svx/source/dialog/papersizelistbox.cxx +++ b/svx/source/dialog/papersizelistbox.cxx @@ -34,8 +34,8 @@ VCL_BUILDER_FACTORY(PaperSizeListBox); void PaperSizeListBox::FillPaperSizeEntries( PaperSizeApp eApp ) { - ResStringArray aPaperAry( SVX_RES( ( eApp == PaperSizeApp::Std ) ? - RID_SVXSTRARY_PAPERSIZE_STD : RID_SVXSTRARY_PAPERSIZE_DRAW ) ); + ResStringArray aPaperAry( ResId( ( eApp == PaperSizeApp::Std ) ? + RID_SVXSTRARY_PAPERSIZE_STD : RID_SVXSTRARY_PAPERSIZE_DRAW, DIALOG_MGR() ) ); sal_uInt32 nCnt = aPaperAry.Count(); for ( sal_uInt32 i = 0; i < nCnt; ++i ) diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index 10b54deb49a8..ef8a0372a1cc 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -67,8 +67,8 @@ IMPL_LINK_NOARG(SvxPasswordDialog, EditModifyHdl, Edit&, void) SvxPasswordDialog::SvxPasswordDialog(vcl::Window* pParent, bool bAllowEmptyPasswords, bool bDisableOldPassword) : SfxModalDialog(pParent, "PasswordDialog", "svx/ui/passwd.ui") - , aOldPasswdErrStr(SVX_RESSTR(RID_SVXSTR_ERR_OLD_PASSWD)) - , aRepeatPasswdErrStr(SVX_RESSTR(RID_SVXSTR_ERR_REPEAT_PASSWD )) + , aOldPasswdErrStr(SvxResId(RID_SVXSTR_ERR_OLD_PASSWD)) + , aRepeatPasswdErrStr(SvxResId(RID_SVXSTR_ERR_REPEAT_PASSWD )) , bEmpty(bAllowEmptyPasswords) { get(m_pOldFL, "oldpass"); diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx index b67d5916473d..a7876a19e106 100644 --- a/svx/source/dialog/prtqry.cxx +++ b/svx/source/dialog/prtqry.cxx @@ -24,15 +24,15 @@ SvxPrtQryBox::SvxPrtQryBox(vcl::Window* pParent) : MessBox(pParent, 0, - SVX_RESSTR(RID_SVXSTR_QRY_PRINT_TITLE), - SVX_RESSTR(RID_SVXSTR_QRY_PRINT_MSG)) + SvxResId(RID_SVXSTR_QRY_PRINT_TITLE), + SvxResId(RID_SVXSTR_QRY_PRINT_MSG)) { SetImage( QueryBox::GetStandardImage() ); - AddButton(SVX_RESSTR(RID_SVXSTR_QRY_PRINT_SELECTION), RET_OK, + AddButton(SvxResId(RID_SVXSTR_QRY_PRINT_SELECTION), RET_OK, ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus); - AddButton(SVX_RESSTR(RID_SVXSTR_QRY_PRINT_ALL), 2); + AddButton(SvxResId(RID_SVXSTR_QRY_PRINT_ALL), 2); AddButton(StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel); SetButtonHelpText( RET_OK, OUString() ); } diff --git a/svx/source/dialog/samecontentlistbox.cxx b/svx/source/dialog/samecontentlistbox.cxx index 4fe85739e909..5e46d593cd87 100644 --- a/svx/source/dialog/samecontentlistbox.cxx +++ b/svx/source/dialog/samecontentlistbox.cxx @@ -25,7 +25,7 @@ SameContentListBox::SameContentListBox(vcl::Window* pParent) : ListBox( pParent, WB_BORDER | WB_DROPDOWN) { - ResStringArray aSameContentAry( SVX_RES( RID_SVXSTRARY_SAMECONTENT ) ); + ResStringArray aSameContentAry( ResId(RID_SVXSTRARY_SAMECONTENT, DIALOG_MGR()) ); sal_uInt32 nCnt = aSameContentAry.Count(); for ( sal_uInt32 i = 0; i < nCnt; ++i ) diff --git a/svx/source/dialog/spacinglistbox.cxx b/svx/source/dialog/spacinglistbox.cxx index b30a3c69adcc..14b8a05ad975 100644 --- a/svx/source/dialog/spacinglistbox.cxx +++ b/svx/source/dialog/spacinglistbox.cxx @@ -25,7 +25,7 @@ SpacingListBox::SpacingListBox(vcl::Window* pParent) : ListBox( pParent, WB_BORDER | WB_DROPDOWN) { - ResStringArray aSpacingAry( SVX_RES( RID_SVXSTRARY_SPACING ) ); + ResStringArray aSpacingAry( ResId(RID_SVXSTRARY_SPACING, DIALOG_MGR()) ); sal_uInt32 nCnt = aSpacingAry.Count(); for ( sal_uInt32 i = 0; i < nCnt; ++i ) diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index b3fac6fb6413..2fbeeaf30088 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -426,9 +426,9 @@ void SvxSearchDialog::Construct_Impl() aCalcStr += "#"; aCalcStr += m_pWordBtn->GetText(); - aLayoutStr = SVX_RESSTR( RID_SVXSTR_SEARCH_STYLES ); - aLayoutWriterStr = SVX_RESSTR( RID_SVXSTR_WRITER_STYLES ); - aLayoutCalcStr = SVX_RESSTR( RID_SVXSTR_CALC_STYLES ); + aLayoutStr = SvxResId( RID_SVXSTR_SEARCH_STYLES ); + aLayoutWriterStr = SvxResId( RID_SVXSTR_WRITER_STYLES ); + aLayoutCalcStr = SvxResId( RID_SVXSTR_CALC_STYLES ); aStylesStr = m_pLayoutBtn->GetText(); // Get stored search-strings from the application @@ -1996,12 +1996,12 @@ IMPL_LINK_NOARG(SvxSearchDialog, FormatHdl_Impl, Button*, void) if ( bSearch ) { - aTxt = SVX_RESSTR( RID_SVXSTR_SEARCH ); + aTxt = SvxResId( RID_SVXSTR_SEARCH ); pSearchList->Get( aSet ); } else { - aTxt = SVX_RESSTR( RID_SVXSTR_REPLACE ); + aTxt = SvxResId( RID_SVXSTR_REPLACE ); pReplaceList->Get( aSet ); } aSet.DisableItem(SID_ATTR_PARA_MODEL); @@ -2160,7 +2160,7 @@ OUString& SvxSearchDialog::BuildAttrText_Impl( OUString& rStr, default: ;//prevent warning } - ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) ); + ResStringArray aAttrNames(ResId(RID_ATTR_NAMES, DIALOG_MGR())); for ( sal_uInt16 i = 0; i < pList->Count(); ++i ) { @@ -2179,7 +2179,7 @@ OUString& SvxSearchDialog::BuildAttrText_Impl( OUString& rStr, else if ( rItem.nSlot == SID_ATTR_BRUSH_CHAR ) { // Special treatment for text background - rStr += SVX_RESSTR( RID_SVXITEMS_BRUSH_CHAR ); + rStr += SvxResId( RID_SVXITEMS_BRUSH_CHAR ); } else { @@ -2399,13 +2399,13 @@ void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL) { OUString sStr; if (rSL == SearchLabel::End) - sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END); + sStr = SvxResId(RID_SVXSTR_SEARCH_END); else if (rSL == SearchLabel::Start) - sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_START); + sStr = SvxResId(RID_SVXSTR_SEARCH_START); else if (rSL == SearchLabel::EndSheet) - sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END_SHEET); + sStr = SvxResId(RID_SVXSTR_SEARCH_END_SHEET); else if (rSL == SearchLabel::NotFound) - sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_NOT_FOUND); + sStr = SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND); if (vcl::Window *pSearchLabel = lcl_GetSearchLabelWindow()) { diff --git a/svx/source/dialog/strarray.cxx b/svx/source/dialog/strarray.cxx index 6b2b319fade8..a30be0454610 100644 --- a/svx/source/dialog/strarray.cxx +++ b/svx/source/dialog/strarray.cxx @@ -21,15 +21,12 @@ #include <svx/dialmgr.hxx> #include <svx/strarray.hxx> - SvxStringArray::SvxStringArray( sal_uInt32 nResId ) : - - ResStringArray( SVX_RES( nResId ) ) + ResStringArray(ResId(nResId, DIALOG_MGR())) { } - SvxStringArray::SvxStringArray( const ResId& rResId ) : ResStringArray( rResId ) { @@ -40,7 +37,6 @@ SvxStringArray::~SvxStringArray() { } - const OUString SvxStringArray::GetStringByPos( sal_uInt32 nPos ) const { if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count() ) diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 79791f414242..7a5230b845f3 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -398,7 +398,7 @@ void SvxNumValueSet::init(NumberingPageType eType) for ( sal_uInt16 i = 0; i < 8; i++ ) { InsertItem( i + 1, i ); - SetItemText( i + 1, SVX_RESSTR( RID_SVXSTR_BULLET_DESCRIPTIONS + i ) ); + SetItemText( i + 1, SvxResId( RID_SVXSTR_BULLET_DESCRIPTIONS + i ) ); } } } @@ -428,7 +428,7 @@ void SvxNumValueSet::SetNumberingSettings( { InsertItem( i + 1, i ); if( i < 8 ) - SetItemText( i + 1, SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTIONS + i )); + SetItemText( i + 1, SvxResId( RID_SVXSTR_SINGLENUM_DESCRIPTIONS + i )); } } @@ -446,7 +446,7 @@ void SvxNumValueSet::SetOutlineNumberingSettings( { InsertItem( i + 1, i ); if( i < 8 ) - SetItemText( i + 1, SVX_RESSTR( RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + i )); + SetItemText( i + 1, SvxResId( RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + i )); } } diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 7aa3cbb9ccec..806b36e17004 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -3395,7 +3395,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) nStyle |= static_cast<sal_uInt16>(bHorz ? WB_HORZ : WB_VERT); DrawTab(*pDev, aFillColor, aPt, nStyle); aMenu->InsertItem(i + 1, - ResId(RID_SVXSTR_RULER_START + i, DIALOG_MGR()).toString(), + SvxResId(RID_SVXSTR_RULER_START + i), Image(BitmapEx(pDev->GetBitmap(Point(), aSz), Color(COL_WHITE)))); aMenu->CheckItem(i + 1, i == mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle); pDev->SetOutputSize(aSz); // delete device diff --git a/svx/source/dialog/swframeposstrings.cxx b/svx/source/dialog/swframeposstrings.cxx index 731b17d7c5a5..5deb147a62f5 100644 --- a/svx/source/dialog/swframeposstrings.cxx +++ b/svx/source/dialog/swframeposstrings.cxx @@ -24,7 +24,7 @@ #include <svx/dialogs.hrc> SvxSwFramePosString::SvxSwFramePosString() : - pImpl(new ResStringArray(SVX_RES(RID_SVXSW_FRAMEPOSITIONS))) + pImpl(new ResStringArray(ResId(RID_SVXSW_FRAMEPOSITIONS, DIALOG_MGR()))) { assert(pImpl->Count() == SvxSwFramePosString::STR_MAX); } diff --git a/svx/source/dialog/txenctab.cxx b/svx/source/dialog/txenctab.cxx index 4da766fa9ef6..497acba45171 100644 --- a/svx/source/dialog/txenctab.cxx +++ b/svx/source/dialog/txenctab.cxx @@ -23,8 +23,7 @@ #include "svx/txenctab.hxx" SvxTextEncodingTable::SvxTextEncodingTable() - : - ResStringArray( SVX_RES( RID_SVXSTR_TEXTENCODING_TABLE ) ) + : ResStringArray(ResId(RID_SVXSTR_TEXTENCODING_TABLE, DIALOG_MGR())) { } diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index 8488f13e3d60..14a4b993e1f8 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -151,7 +151,7 @@ bool E3dDragMethod::EndSdrDrag(bool /*bCopy*/) { const bool bUndo = getSdrDragView().IsUndoEnabled(); if( bUndo ) - getSdrDragView().BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_ROTATE)); + getSdrDragView().BegUndo(SvxResId(RID_SVX_3D_UNDO_ROTATE)); sal_uInt32 nOb(0); for(nOb=0;nOb<nCnt;nOb++) diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index a5e285ee1416..41a97fd226bf 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -2767,13 +2767,13 @@ namespace { OUString lcl_makeColorName(const Color& rColor) { - OUString aStr = SVX_RESSTR(RID_SVXFLOAT3D_FIX_R) + + OUString aStr = SvxResId(RID_SVXFLOAT3D_FIX_R) + OUString::number(rColor.GetRed()) + " " + - SVX_RESSTR(RID_SVXFLOAT3D_FIX_G) + + SvxResId(RID_SVXFLOAT3D_FIX_G) + OUString::number(rColor.GetGreen()) + " " + - SVX_RESSTR(RID_SVXFLOAT3D_FIX_B) + + SvxResId(RID_SVXFLOAT3D_FIX_B) + OUString::number(rColor.GetBlue()); return aStr; } diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index deb4ffe1d24d..9540d3f1cd52 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -460,7 +460,7 @@ bool E3dView::Paste( if(pOwner && dynamic_cast< const E3dScene* >(pOwner) != nullptr) { E3dScene* pDstScene = static_cast<E3dScene*>(pOwner); - BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXCHANGE_PASTE)); + BegUndo(SvxResId(RID_SVX_3D_UNDO_EXCHANGE_PASTE)); // Copy all objects from E3dScenes and insert them directly for(sal_uInt16 nPg(0); nPg < rMod.GetPageCount(); nPg++) @@ -833,9 +833,9 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 { // Create undo if(bExtrude) - BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXTRUDE)); + BegUndo(SvxResId(RID_SVX_3D_UNDO_EXTRUDE)); else - BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_LATHE)); + BegUndo(SvxResId(RID_SVX_3D_UNDO_LATHE)); // Create a new scene for the created 3D object E3dScene* pScene = new E3dScene; @@ -1566,7 +1566,7 @@ void E3dView::Break3DObj() // ALL selected objects are changed const size_t nCount = GetMarkedObjectCount(); - BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_BREAK_LATHE)); + BegUndo(SvxResId(RID_SVX_3D_UNDO_BREAK_LATHE)); for(size_t a=0; a<nCount; ++a) { E3dObject* pObj = static_cast<E3dObject*>(GetMarkedObjectByIndex(a)); diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx index 649e2ddf4fb8..74ada1128d04 100644 --- a/svx/source/engine3d/view3d1.cxx +++ b/svx/source/engine3d/view3d1.cxx @@ -58,7 +58,7 @@ void E3dView::ConvertMarkedToPolyObj() pNewObj = pScene->ConvertToPolyObj(bBezier, false/*bLineToArea*/); if (pNewObj) { - BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXTRUDE)); + BegUndo(SvxResId(RID_SVX_3D_UNDO_EXTRUDE)); ReplaceObjectAtView(pObj, *GetSdrPageView(), pNewObj); EndUndo(); } diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 9f913c0ec943..8cdb4b59e055 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -539,10 +539,10 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) if (bDateNTimeCol) { - OUString sTimePostfix(SVX_RESSTR(RID_STR_POSTFIX_TIME)); + OUString sTimePostfix(SvxResId(RID_STR_POSTFIX_TIME)); xCol->setPropertyValue(FM_PROP_LABEL, makeAny( OUString( sFieldName + sTimePostfix ) ) ); - OUString sDatePostfix(SVX_RESSTR( RID_STR_POSTFIX_DATE)); + OUString sDatePostfix(SvxResId( RID_STR_POSTFIX_DATE)); xSecondCol->setPropertyValue(FM_PROP_LABEL, makeAny( OUString( sFieldName + sDatePostfix ) ) ); } else @@ -567,8 +567,8 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) OUString sRealName,sPurePostfix; OUString aPostfix[] = { - SVX_RESSTR(RID_STR_POSTFIX_DATE), - SVX_RESSTR(RID_STR_POSTFIX_TIME) + SvxResId(RID_STR_POSTFIX_DATE), + SvxResId(RID_STR_POSTFIX_TIME) }; for ( size_t i=0; i<2; ++i ) diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index f7da0e13f846..c52e4764da5d 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -487,7 +487,7 @@ void DbGridColumn::Paint(OutputDevice& rDev, nStyle |= DrawTextFlags::Left; } - rDev.DrawText(rRect, SVX_RESSTR(RID_STR_AUTOFIELD), nStyle); + rDev.DrawText(rRect, SvxResId(RID_STR_AUTOFIELD), nStyle); } else if (pRow->HasField(m_nFieldPos)) { diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index a9b9a4ab74f9..af464e75a3ee 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -359,8 +359,8 @@ DbGridControl::NavigationBar::NavigationBar(vcl::Window* pParent) m_aLastBtn->SetClickHdl(LINK(this,NavigationBar,OnClick)); m_aNewBtn->SetClickHdl(LINK(this,NavigationBar,OnClick)); - m_aRecordText->SetText(SVX_RESSTR(RID_STR_REC_TEXT)); - m_aRecordOf->SetText(SVX_RESSTR(RID_STR_REC_FROM_TEXT)); + m_aRecordText->SetText(SvxResId(RID_STR_REC_TEXT)); + m_aRecordOf->SetText(SvxResId(RID_STR_REC_FROM_TEXT)); m_aRecordCount->SetText(OUString('?')); m_aFirstBtn->Disable(); @@ -975,7 +975,7 @@ DbGridControl::DbGridControl( ,m_bUpdating(false) { - OUString sName(SVX_RESSTR(RID_STR_NAVIGATIONBAR)); + OUString sName(SvxResId(RID_STR_NAVIGATIONBAR)); m_aBar->SetAccessibleName(sName); m_aBar->Show(); ImplInitWindow( InitWindowFacet::All ); diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index c5a2654750ba..82f432ac9192 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -36,7 +36,7 @@ OSystemParseContext::OSystemParseContext() : IParseContext() { SolarMutexGuard aGuard; - ResStringArray aLocalizedKeywords(SVX_RES(RID_RSC_SQL_INTERNATIONAL)); + ResStringArray aLocalizedKeywords(ResId(RID_RSC_SQL_INTERNATIONAL, DIALOG_MGR())); for (sal_uInt32 i = 0; i < aLocalizedKeywords.Count(); ++i) m_aLocalizedKeywords.push_back(aLocalizedKeywords.GetString(i)); } @@ -56,18 +56,18 @@ OUString OSystemParseContext::getErrorMessage(ErrorCode _eCode) const SolarMutexGuard aGuard; switch (_eCode) { - case ErrorCode::General: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_ERROR); break; - case ErrorCode::ValueNoLike: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_VALUE_NO_LIKE); break; - case ErrorCode::FieldNoLike: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_FIELD_NO_LIKE); break; - case ErrorCode::InvalidCompare: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_CRIT_NO_COMPARE); break; - case ErrorCode::InvalidIntCompare: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_INT_NO_VALID); break; - case ErrorCode::InvalidDateCompare: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_ACCESS_DAT_NO_VALID); break; - case ErrorCode::InvalidRealCompare: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_REAL_NO_VALID); break; - case ErrorCode::InvalidTableNosuch: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_TABLE); break; - case ErrorCode::InvalidTableOrQuery: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_TABLE_OR_QUERY); break; - case ErrorCode::InvalidColumn: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_COLUMN); break; - case ErrorCode::InvalidTableExist: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_TABLE_EXISTS); break; - case ErrorCode::InvalidQueryExist: aMsg = SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_QUERY_EXISTS); break; + case ErrorCode::General: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_ERROR); break; + case ErrorCode::ValueNoLike: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_VALUE_NO_LIKE); break; + case ErrorCode::FieldNoLike: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_FIELD_NO_LIKE); break; + case ErrorCode::InvalidCompare: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_CRIT_NO_COMPARE); break; + case ErrorCode::InvalidIntCompare: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_INT_NO_VALID); break; + case ErrorCode::InvalidDateCompare: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_ACCESS_DAT_NO_VALID); break; + case ErrorCode::InvalidRealCompare: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_REAL_NO_VALID); break; + case ErrorCode::InvalidTableNosuch: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_TABLE); break; + case ErrorCode::InvalidTableOrQuery: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_TABLE_OR_QUERY); break; + case ErrorCode::InvalidColumn: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_COLUMN); break; + case ErrorCode::InvalidTableExist: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_TABLE_EXISTS); break; + case ErrorCode::InvalidQueryExist: aMsg = SvxResId(RID_STR_SVT_SQL_SYNTAX_QUERY_EXISTS); break; default: break; } return aMsg; diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index be1665d8eebd..bf7355729a28 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -127,7 +127,7 @@ namespace svx { if ( ::utl::UCBContentHelper::Exists( sURL ) ) { - ScopedVclPtrInstance< QueryBox > aBox( m_rLocationInput.GetSystemWindow(), WB_YES_NO, SVX_RESSTR(RID_STR_ALREADYEXISTOVERWRITE) ); + ScopedVclPtrInstance< QueryBox > aBox( m_rLocationInput.GetSystemWindow(), WB_YES_NO, SvxResId(RID_STR_ALREADYEXISTOVERWRITE) ); if ( aBox->Execute() != RET_YES ) return false; } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 0cc5b768e009..5a382dbe6fd1 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -238,15 +238,15 @@ namespace svxform if ( DGTSubmission == m_eGroup ) { - m_xMenu->SetItemText(m_xMenu->GetItemId("additem"), SVX_RESSTR(RID_STR_DATANAV_ADD_SUBMISSION)); - m_xMenu->SetItemText(m_xMenu->GetItemId("edit"), SVX_RESSTR(RID_STR_DATANAV_EDIT_SUBMISSION)); - m_xMenu->SetItemText(m_xMenu->GetItemId("delete"), SVX_RESSTR(RID_STR_DATANAV_REMOVE_SUBMISSION)); + m_xMenu->SetItemText(m_xMenu->GetItemId("additem"), SvxResId(RID_STR_DATANAV_ADD_SUBMISSION)); + m_xMenu->SetItemText(m_xMenu->GetItemId("edit"), SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION)); + m_xMenu->SetItemText(m_xMenu->GetItemId("delete"), SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION)); } else { - m_xMenu->SetItemText(m_xMenu->GetItemId("additem"), SVX_RESSTR(RID_STR_DATANAV_ADD_BINDING)); - m_xMenu->SetItemText(m_xMenu->GetItemId("edit"), SVX_RESSTR(RID_STR_DATANAV_EDIT_BINDING)); - m_xMenu->SetItemText(m_xMenu->GetItemId("delete"), SVX_RESSTR(RID_STR_DATANAV_REMOVE_BINDING)); + m_xMenu->SetItemText(m_xMenu->GetItemId("additem"), SvxResId(RID_STR_DATANAV_ADD_BINDING)); + m_xMenu->SetItemText(m_xMenu->GetItemId("edit"), SvxResId(RID_STR_DATANAV_EDIT_BINDING)); + m_xMenu->SetItemText(m_xMenu->GetItemId("delete"), SvxResId(RID_STR_DATANAV_REMOVE_BINDING)); } } m_pXFormsPage->EnableMenuItems(m_xMenu.get()); @@ -359,15 +359,15 @@ namespace svxform if ( DGTSubmission == m_eGroup ) { - m_pToolBox->SetItemText( m_nAddId, SVX_RESSTR( RID_STR_DATANAV_ADD_SUBMISSION ) ); - m_pToolBox->SetItemText( m_nEditId, SVX_RESSTR( RID_STR_DATANAV_EDIT_SUBMISSION ) ); - m_pToolBox->SetItemText( m_nRemoveId, SVX_RESSTR( RID_STR_DATANAV_REMOVE_SUBMISSION ) ); + m_pToolBox->SetItemText( m_nAddId, SvxResId( RID_STR_DATANAV_ADD_SUBMISSION ) ); + m_pToolBox->SetItemText( m_nEditId, SvxResId( RID_STR_DATANAV_EDIT_SUBMISSION ) ); + m_pToolBox->SetItemText( m_nRemoveId, SvxResId( RID_STR_DATANAV_REMOVE_SUBMISSION ) ); } else { - m_pToolBox->SetItemText( m_nAddId, SVX_RESSTR( RID_STR_DATANAV_ADD_BINDING ) ); - m_pToolBox->SetItemText( m_nEditId, SVX_RESSTR( RID_STR_DATANAV_EDIT_BINDING ) ); - m_pToolBox->SetItemText( m_nRemoveId, SVX_RESSTR( RID_STR_DATANAV_REMOVE_BINDING ) ); + m_pToolBox->SetItemText( m_nAddId, SvxResId( RID_STR_DATANAV_ADD_BINDING ) ); + m_pToolBox->SetItemText( m_nEditId, SvxResId( RID_STR_DATANAV_EDIT_BINDING ) ); + m_pToolBox->SetItemText( m_nRemoveId, SvxResId( RID_STR_DATANAV_REMOVE_BINDING ) ); } } @@ -622,7 +622,7 @@ namespace svxform } ScopedVclPtrInstance< AddDataItemDialog > aDlg( this, pNode, m_xUIHelper ); - aDlg->SetText( SVX_RESSTR( nResId ) ); + aDlg->SetText( SvxResId( nResId ) ); aDlg->InitText( eType ); short nReturn = aDlg->Execute(); if ( DGTInstance == m_eGroup ) @@ -718,7 +718,7 @@ namespace svxform nResId = RID_STR_DATANAV_EDIT_BINDING; eType = DITBinding; } - aDlg->SetText( SVX_RESSTR( nResId ) ); + aDlg->SetText( SvxResId( nResId ) ); aDlg->InitText( eType ); if ( aDlg->Execute() == RET_OK ) { @@ -761,7 +761,7 @@ namespace svxform else { ScopedVclPtrInstance< AddSubmissionDialog > aDlg( this, pNode, m_xUIHelper ); - aDlg->SetText( SVX_RESSTR( RID_STR_DATANAV_EDIT_SUBMISSION ) ); + aDlg->SetText( SvxResId( RID_STR_DATANAV_EDIT_SUBMISSION ) ); if ( aDlg->Execute() == RET_OK ) { EditEntry( pNode->m_xPropSet ); @@ -828,27 +828,27 @@ namespace svxform pEntry = m_pItemList->InsertEntry( sTemp, aImage, aImage, nullptr, false, TREELIST_APPEND, pNode ); // Action _rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp; - OUString sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_ACTION ); + OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION ); sEntry += sTemp; m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry ); // Method _rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_METHOD ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_METHOD ); sEntry += m_aMethodString.toUI( sTemp ); m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry ); // Ref _rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REF ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF ); sEntry += sTemp; m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry ); // Bind _rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_BIND ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND ); sEntry += sTemp; m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry ); // Replace _rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REPLACE ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_REPLACE ); sEntry += m_aReplaceString.toUI( sTemp ); m_pItemList->InsertEntry( sEntry, aImage, aImage, pEntry ); } @@ -903,28 +903,28 @@ namespace svxform m_pItemList->SetEntryText( pEntry, sTemp ); _rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp; - OUString sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_BIND ); + OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND ); sEntry += sTemp; sal_uIntPtr nPos = 0; SvTreeListEntry* pChild = m_pItemList->GetEntry( pEntry, nPos++ ); m_pItemList->SetEntryText( pChild, sEntry ); _rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REF ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_REF ); sEntry += sTemp; pChild = m_pItemList->GetEntry( pEntry, nPos++ ); m_pItemList->SetEntryText( pChild, sEntry ); _rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_ACTION ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_ACTION ); sEntry += sTemp; pChild = m_pItemList->GetEntry( pEntry, nPos++ ); m_pItemList->SetEntryText( pChild, sEntry ); _rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_METHOD ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_METHOD ); sEntry += m_aMethodString.toUI( sTemp ); pChild = m_pItemList->GetEntry( pEntry, nPos++ ); m_pItemList->SetEntryText( pChild, sEntry ); _rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp; - sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REPLACE ); + sEntry = SvxResId( RID_STR_DATANAV_SUBM_REPLACE ); sEntry += m_aReplaceString.toUI( sTemp ); pChild = m_pItemList->GetEntry( pEntry, nPos++ ); m_pItemList->SetEntryText( pChild, sEntry ); @@ -958,7 +958,7 @@ namespace svxform bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE ); sal_uInt16 nResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE; OUString sVar = bIsElement ? OUString(ELEMENTNAME) : OUString(ATTRIBUTENAME); - ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VclMessageType::Question, VclButtonsType::YesNo); + ScopedVclPtrInstance< MessageDialog > aQBox(this, SvxResId(nResId), VclMessageType::Question, VclButtonsType::YesNo); OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, false ) ); @@ -1000,7 +1000,7 @@ namespace svxform { SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" ); } - ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(nResId), + ScopedVclPtrInstance<MessageDialog> aQBox(this, SvxResId(nResId), VclMessageType::Question, VclButtonsType::YesNo); OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( sSearch, sName); @@ -1345,12 +1345,12 @@ namespace svxform } } } - m_pToolBox->SetItemText( m_nEditId, SVX_RESSTR( nResId1 ) ); - m_pToolBox->SetItemText( m_nRemoveId, SVX_RESSTR( nResId2 ) ); + m_pToolBox->SetItemText( m_nEditId, SvxResId( nResId1 ) ); + m_pToolBox->SetItemText( m_nRemoveId, SvxResId( nResId2 ) ); if ( _pMenu ) { - _pMenu->SetItemText(_pMenu->GetItemId("edit"), SVX_RESSTR( nResId1 ) ); - _pMenu->SetItemText(_pMenu->GetItemId("delete"), SVX_RESSTR( nResId2 ) ); + _pMenu->SetItemText(_pMenu->GetItemId("edit"), SvxResId( nResId1 ) ); + _pMenu->SetItemText(_pMenu->GetItemId("delete"), SvxResId( nResId2 ) ); } } } @@ -1506,7 +1506,7 @@ namespace svxform if ( m_pModelsBox->GetEntryPos( sNewName ) != LISTBOX_ENTRY_NOTFOUND ) { // error: model name already exists - ScopedVclPtrInstance< MessageDialog > aErrBox( this, SVX_RES( RID_STR_DOUBLE_MODELNAME ) ); + ScopedVclPtrInstance< MessageDialog > aErrBox( this, SvxResId( RID_STR_DOUBLE_MODELNAME ) ); aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sNewName)); aErrBox->Execute(); bShowDialog = true; @@ -1596,7 +1596,7 @@ namespace svxform } else if (sIdent == "modelsremove") { - ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL), + ScopedVclPtrInstance<MessageDialog> aQBox(this, SvxResId( RID_STR_QRY_REMOVE_MODEL), VclMessageType::Question, VclButtonsType::YesNo); OUString sText = aQBox->get_primary_text(); sText = sText.replaceFirst( MODELNAME, sSelectedModel ); @@ -1696,7 +1696,7 @@ namespace svxform if ( pPage ) { OUString sInstName = pPage->GetInstanceName(); - ScopedVclPtrInstance<MessageDialog> aQBox(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE), + ScopedVclPtrInstance<MessageDialog> aQBox(this, SvxResId(RID_STR_QRY_REMOVE_INSTANCE), VclMessageType::Question, VclButtonsType::YesNo); OUString sMessText = aQBox->get_primary_text(); sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName ); @@ -2150,7 +2150,7 @@ namespace svxform { - SetText( SVX_RES( RID_STR_DATANAVIGATOR ) ); + SetText( SvxResId( RID_STR_DATANAVIGATOR ) ); Size aSize = m_aDataWin->GetOutputSizePixel(); Size aLogSize = PixelToLogic( aSize, MapUnit::MapAppFont ); @@ -2241,10 +2241,10 @@ namespace svxform , m_xUIHelper(_rUIHelper) , m_pItemNode(_pNode) , m_eItemType(DITNone) - , m_sFL_Element(SVX_RESSTR(RID_STR_ELEMENT)) - , m_sFL_Attribute(SVX_RESSTR(RID_STR_ATTRIBUTE)) - , m_sFL_Binding(SVX_RESSTR(RID_STR_BINDING)) - , m_sFT_BindingExp(SVX_RESSTR(RID_STR_BINDING_EXPR)) + , m_sFL_Element(SvxResId(RID_STR_ELEMENT)) + , m_sFL_Attribute(SvxResId(RID_STR_ATTRIBUTE)) + , m_sFL_Binding(SvxResId(RID_STR_BINDING)) + , m_sFT_BindingExp(SvxResId(RID_STR_BINDING_EXPR)) { get(m_pItemFrame, "itemframe"); get(m_pNameFT, "nameft"); @@ -2451,7 +2451,7 @@ namespace svxform ( bIsHandleBinding && sNewName.isEmpty() ) ) { // Error and don't close the dialog - ScopedVclPtrInstance< MessageDialog > aErrBox( this, SVX_RES( RID_STR_INVALID_XMLNAME ) ); + ScopedVclPtrInstance< MessageDialog > aErrBox( this, SvxResId( RID_STR_INVALID_XMLNAME ) ); aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sNewName)); aErrBox->Execute(); return; @@ -3084,7 +3084,7 @@ namespace svxform { if ( !m_pConditionDlg->GetUIHelper()->isValidPrefixName( sPrefix ) ) { - ScopedVclPtrInstance< MessageDialog > aErrBox(this, SVX_RES( RID_STR_INVALID_XMLPREFIX ) ); + ScopedVclPtrInstance< MessageDialog > aErrBox(this, SvxResId( RID_STR_INVALID_XMLPREFIX ) ); aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sPrefix)); aErrBox->Execute(); return; @@ -3158,7 +3158,7 @@ namespace svxform OUString sName(m_pNameED->GetText()); if(sName.isEmpty()) { - ScopedVclPtrInstance< MessageDialog > aErrorBox(this,SVX_RES(RID_STR_EMPTY_SUBMISSIONNAME)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this,SvxResId(RID_STR_EMPTY_SUBMISSIONNAME)); aErrorBox->set_primary_text( Application::GetDisplayName() ); aErrorBox->Execute(); return; @@ -3219,9 +3219,9 @@ namespace svxform void AddSubmissionDialog::FillAllBoxes() { // method box - m_pMethodLB->InsertEntry( SVX_RESSTR( RID_STR_METHOD_POST ) ); - m_pMethodLB->InsertEntry( SVX_RESSTR( RID_STR_METHOD_PUT ) ); - m_pMethodLB->InsertEntry( SVX_RESSTR( RID_STR_METHOD_GET ) ); + m_pMethodLB->InsertEntry( SvxResId( RID_STR_METHOD_POST ) ); + m_pMethodLB->InsertEntry( SvxResId( RID_STR_METHOD_PUT ) ); + m_pMethodLB->InsertEntry( SvxResId( RID_STR_METHOD_GET ) ); m_pMethodLB->SelectEntryPos(0); // binding box @@ -3278,9 +3278,9 @@ namespace svxform } // replace box - m_pReplaceLB->InsertEntry( SVX_RESSTR( RID_STR_REPLACE_NONE ) ); - m_pReplaceLB->InsertEntry( SVX_RESSTR( RID_STR_REPLACE_INST ) ); - m_pReplaceLB->InsertEntry( SVX_RESSTR( RID_STR_REPLACE_DOC ) ); + m_pReplaceLB->InsertEntry( SvxResId( RID_STR_REPLACE_NONE ) ); + m_pReplaceLB->InsertEntry( SvxResId( RID_STR_REPLACE_INST ) ); + m_pReplaceLB->InsertEntry( SvxResId( RID_STR_REPLACE_DOC ) ); // init the controls with the values of the submission @@ -3366,7 +3366,7 @@ namespace svxform m_pFilePickerBtn->SetClickHdl( LINK( this, AddInstanceDialog, FilePickerHdl ) ); // load the filter name from fps_office resource - m_sAllFilterName = ResId(STR_FILTERNAME_ALL, *ResMgr::CreateResMgr("fps_office")).toString(); + m_sAllFilterName = ResId(STR_FILTERNAME_ALL, *ResMgr::CreateResMgr("fps_office")); } AddInstanceDialog::~AddInstanceDialog() diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 124b3d6bd67b..50c7f557e6ce 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -434,7 +434,7 @@ void SAL_CALL FmFilterAdapter::disjunctiveTermRemoved( const FilterEvent& Event // if the first term was removed, then the to-be first term needs its text updated if ( Event.DisjunctiveTerm == 0 ) { - rTermItems[1]->SetText( SVX_RESSTR(RID_STR_FILTER_FILTER_FOR)); + rTermItems[1]->SetText( SvxResId(RID_STR_FILTER_FILTER_FOR)); FmFilterTextChangedHint aChangeHint( rTermItems[1] ); m_pModel->Broadcast( aChangeHint ); } @@ -470,7 +470,7 @@ void SAL_CALL FmFilterAdapter::disjunctiveTermAdded( const FilterEvent& Event ) const ::std::vector< FmFilterData* >::iterator insertPos = pFormItem->GetChildren().begin() + nInsertPos; - FmFilterItems* pFilterItems = new FmFilterItems(pFormItem, SVX_RESSTR(RID_STR_FILTER_FILTER_OR)); + FmFilterItems* pFilterItems = new FmFilterItems(pFormItem, SvxResId(RID_STR_FILTER_FILTER_OR)); m_pModel->Insert( insertPos, pFilterItems ); } @@ -566,7 +566,7 @@ void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmPar Reference< XFilterController > xFilterController( pFormItem->GetFilterController(), UNO_SET_THROW ); // insert the existing filters for the form - OUString aTitle(SVX_RESSTR(RID_STR_FILTER_FILTER_FOR)); + OUString aTitle(SvxResId(RID_STR_FILTER_FILTER_FOR)); Sequence< Sequence< OUString > > aExpressions = xFilterController->getPredicateExpressions(); for ( const Sequence< OUString >* pConjunctionTerm = aExpressions.getConstArray(); @@ -600,7 +600,7 @@ void FmFilterModel::Update(const Reference< XIndexAccess > & xControllers, FmPar } // title for the next conditions - aTitle = SVX_RESSTR( RID_STR_FILTER_FILTER_OR ); + aTitle = SvxResId( RID_STR_FILTER_FILTER_OR ); } // now add dependent controllers @@ -1186,7 +1186,7 @@ bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const OUString& rN { // display the error and return sal_False SQLContext aError; - aError.Message = SVX_RESSTR(RID_STR_SYNTAXERROR); + aError.Message = SvxResId(RID_STR_SYNTAXERROR); aError.Details = aErrorMsg; displayException(aError, this); @@ -1811,7 +1811,7 @@ FmFilterNavigatorWin::FmFilterNavigatorWin( SfxBindings* _pBindings, SfxChildWin m_pNavigator = VclPtr<FmFilterNavigator>::Create( this ); m_pNavigator->Show(); - SetText( SVX_RES(RID_STR_FILTER_NAVIGATOR) ); + SetText( SvxResId(RID_STR_FILTER_NAVIGATOR) ); SfxDockingWindow::SetFloatingSize( Size(200,200) ); } diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 2f1fd012ec42..2819be221ed4 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -180,7 +180,7 @@ OUString GetUIHeadlineName(sal_Int16 nClassId, const Any& aUnoObj) nClassNameResourceId = RID_STR_CONTROL; break; } - return SVX_RESSTR(nClassNameResourceId); + return SvxResId(nClassNameResourceId); } FmPropBrw::FmPropBrw( const Reference< XComponentContext >& _xORB, SfxBindings* _pBindings, @@ -414,13 +414,13 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection ) if ( _rSelection.empty() ) { - sTitle = SVX_RESSTR(RID_STR_NO_PROPERTIES); + sTitle = SvxResId(RID_STR_NO_PROPERTIES); } else if ( _rSelection.size() > 1 ) { // no form component and (no form or no name) -> Multiselection - sTitle = SVX_RESSTR(RID_STR_PROPERTIES_CONTROL); - sTitle += SVX_RESSTR(RID_STR_PROPTITLE_MULTISELECT); + sTitle = SvxResId(RID_STR_PROPERTIES_CONTROL); + sTitle += SvxResId(RID_STR_PROPTITLE_MULTISELECT); } else { @@ -430,15 +430,15 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection ) sal_Int16 nClassID = FormComponentType::CONTROL; xSingleSelection->getPropertyValue( FM_PROP_CLASSID ) >>= nClassID; - sTitle = SVX_RESSTR(RID_STR_PROPERTIES_CONTROL); + sTitle = SvxResId(RID_STR_PROPERTIES_CONTROL); sTitle += GetUIHeadlineName(nClassID, makeAny(xSingleSelection)); } else if ( Reference< XForm >( xSingleSelection, UNO_QUERY ).is() ) - sTitle = SVX_RESSTR(RID_STR_PROPERTIES_FORM); + sTitle = SvxResId(RID_STR_PROPERTIES_FORM); } if ( implIsReadOnlyModel() ) - sTitle += SVX_RESSTR(RID_STR_READONLY_VIEW); + sTitle += SvxResId(RID_STR_READONLY_VIEW); SetText( sTitle ); diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 481293b29bb2..00f6157064c2 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -476,7 +476,7 @@ namespace svxform m_pNavigatorTree = VclPtr<NavigatorTree>::Create( this ); m_pNavigatorTree->Show(); - SetText( SVX_RES(RID_STR_FMEXPLORER) ); + SetText( SvxResId(RID_STR_FMEXPLORER) ); SfxDockingWindow::SetFloatingSize( Size(200,200) ); } diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index 15980afc1579..e97ba5832b8f 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -372,7 +372,7 @@ Reference< XForm > FmFormPageImpl::getDefaultForm() if ( Reference<XNameAccess>(xForms,UNO_QUERY_THROW)->hasElements() ) { // find the standard form - OUString sStandardFormname = SVX_RESSTR(RID_STR_STDFORMNAME); + OUString sStandardFormname = SvxResId(RID_STR_STDFORMNAME); try { @@ -401,8 +401,8 @@ Reference< XForm > FmFormPageImpl::getDefaultForm() if( pModel->IsUndoEnabled() ) { - OUString aStr(SVX_RESSTR(RID_STR_FORM)); - OUString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT)); + OUString aStr(SvxResId(RID_STR_FORM)); + OUString aUndoStr(SvxResId(RID_STR_UNDO_CONTAINER_INSERT)); pModel->BegUndo(aUndoStr.replaceFirst("'#'", aStr)); } @@ -415,7 +415,7 @@ Reference< XForm > FmFormPageImpl::getDefaultForm() xFormProps->setPropertyValue( FM_PROP_COMMANDTYPE, makeAny( sal_Int32( CommandType::TABLE ) ) ); // and the "Standard" name - OUString sName = SVX_RESSTR(RID_STR_STDFORMNAME); + OUString sName = SvxResId(RID_STR_STDFORMNAME); xFormProps->setPropertyValue( FM_PROP_NAME, makeAny( sName ) ); if( pModel->IsUndoEnabled() ) @@ -481,8 +481,8 @@ Reference< css::form::XForm > FmFormPageImpl::findPlaceInFormComponentHierarchy if( bUndo ) { - OUString aStr(SVX_RESSTR(RID_STR_FORM)); - OUString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT)); + OUString aStr(SvxResId(RID_STR_FORM)); + OUString aUndoStr(SvxResId(RID_STR_UNDO_CONTAINER_INSERT)); aUndoStr = aUndoStr.replaceFirst("#", aStr); pModel->BegUndo(aUndoStr); } @@ -509,7 +509,7 @@ Reference< css::form::XForm > FmFormPageImpl::findPlaceInFormComponentHierarchy const bool bTableOrQuery = ( CommandType::TABLE == nCommandType ) || ( CommandType::QUERY == nCommandType ); OUString sName = FormControlFactory::getUniqueName( xNamedSet, - bTableOrQuery ? rCursorSource : SVX_RESSTR(RID_STR_STDFORMNAME) ); + bTableOrQuery ? rCursorSource : SvxResId(RID_STR_STDFORMNAME) ); xFormProps->setPropertyValue( FM_PROP_NAME, makeAny( sName ) ); diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 7898637535d1..37cc0f4b59f1 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1472,7 +1472,7 @@ void FmXFormShell::ExecuteSearch() if (m_aSearchForms.empty() ) { // there are no controls that meet all the conditions for a search - ScopedVclPtrInstance<MessageDialog>(nullptr, SVX_RESSTR(RID_STR_NODATACONTROLS))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SvxResId(RID_STR_NODATACONTROLS))->Execute(); return; } @@ -3147,7 +3147,7 @@ void FmXFormShell::CreateExternalView() if (!bHaveUsableControls) { - ScopedVclPtrInstance<MessageDialog>(nullptr, SVX_RESSTR(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY))->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SvxResId(RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY))->Execute(); return; } } diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 78e0ed31cd5a..4a0022e59674 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -968,7 +968,7 @@ FmUndoPropertyAction::FmUndoPropertyAction(FmFormModel& rNewMod, const PropertyC if (rNewMod.GetObjectShell()) rNewMod.GetObjectShell()->SetModified(); if(static_STR_UNDO_PROPERTY.isEmpty()) - static_STR_UNDO_PROPERTY = SVX_RESSTR(RID_STR_UNDO_PROPERTY); + static_STR_UNDO_PROPERTY = SvxResId(RID_STR_UNDO_PROPERTY); } @@ -1260,7 +1260,7 @@ void FmUndoModelReplaceAction::Undo() OUString FmUndoModelReplaceAction::GetComment() const { - return SVX_RESSTR(RID_STR_UNDO_MODEL_REPLACE); + return SvxResId(RID_STR_UNDO_MODEL_REPLACE); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index ab0c63826f8c..4ce10fd6f692 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1325,7 +1325,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor break; case DataType::TIMESTAMP: bDateNTimeField = true; - sLabelPostfix = SVX_RESSTR(RID_STR_POSTFIX_DATE); + sLabelPostfix = SvxResId(RID_STR_POSTFIX_DATE); SAL_FALLTHROUGH; case DataType::DATE: nOBJID = OBJ_FM_DATEFIELD; @@ -1367,7 +1367,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor { // so far we created a date field only, but we also need a time field pLabel = pControl = nullptr; if ( createControlLabelPair( *pOutDev, 0, 1000, xField, xNumberFormats, OBJ_FM_TIMEFIELD, - SVX_RESSTR(RID_STR_POSTFIX_TIME), pLabel, pControl, + SvxResId(RID_STR_POSTFIX_TIME), pLabel, pControl, xDataSource, sDataSource, sCommand, nCommandType ) ) { @@ -1602,7 +1602,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO sLabel = sFieldName; xLabelModel->setPropertyValue( FM_PROP_LABEL, makeAny( sLabel + _rFieldPostfix ) ); - OUString sObjectLabel(SVX_RESSTR(RID_STR_OBJECT_LABEL).replaceAll("#object#", sFieldName)); + OUString sObjectLabel(SvxResId(RID_STR_OBJECT_LABEL).replaceAll("#object#", sFieldName)); xLabelModel->setPropertyValue(FM_PROP_NAME, makeAny(sObjectLabel)); } diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index d4aeebd3c530..8224dcc6b79a 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -475,7 +475,7 @@ namespace svxform } if ( nTitleResId ) - sInitialLabel = SVX_RESSTR(nTitleResId); + sInitialLabel = SvxResId(nTitleResId); _rxControlModel->setPropertyValue( FM_PROP_LABEL, @@ -679,7 +679,7 @@ namespace svxform nResId = RID_STR_CONTROL; break; } - return SVX_RESSTR(nResId); + return SvxResId(nResId); } diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 2089ae19b6bf..74a34e24aba4 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -478,7 +478,7 @@ void FmXAutoControl::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XTextComponent > xText(getPeer() , UNO_QUERY); if (xText.is()) { - xText->setText(SVX_RESSTR(RID_STR_AUTOFIELD)); + xText->setText(SvxResId(RID_STR_AUTOFIELD)); xText->setEditable(false); } } @@ -3585,7 +3585,7 @@ namespace void displayErrorSetFocus( const OUString& _rMessage, const Reference< XControl >& _rxFocusControl, vcl::Window* _pDialogParent ) { SQLContext aError; - aError.Message = SVX_RESSTR(RID_STR_WRITEERROR); + aError.Message = SvxResId(RID_STR_WRITEERROR); aError.Details = _rMessage; displayException( aError, _pDialogParent ); @@ -3708,7 +3708,7 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent if ( !rColInfo.xColumn->getString().isEmpty() || !rColInfo.xColumn->wasNull() ) continue; - OUString sMessage( SVX_RESSTR( RID_ERR_FIELDREQUIRED ) ); + OUString sMessage( SvxResId( RID_ERR_FIELDREQUIRED ) ); sMessage = sMessage.replaceFirst( "#", rColInfo.sName ); // the control to focus @@ -3971,11 +3971,11 @@ sal_Bool SAL_CALL FormController::confirmDelete(const RowChangeEvent& aEvent) sal_Int32 nLength = aEvent.Rows; if ( nLength > 1 ) { - sTitle = SVX_RESSTR( RID_STR_DELETECONFIRM_RECORDS ); + sTitle = SvxResId( RID_STR_DELETECONFIRM_RECORDS ); sTitle = sTitle.replaceFirst( "#", OUString::number(nLength) ); } else - sTitle = SVX_RESSTR( RID_STR_DELETECONFIRM_RECORD ); + sTitle = SvxResId( RID_STR_DELETECONFIRM_RECORD ); try { @@ -3990,7 +3990,7 @@ sal_Bool SAL_CALL FormController::confirmDelete(const RowChangeEvent& aEvent) SQLWarning aWarning; aWarning.Message = sTitle; SQLWarning aDetails; - aDetails.Message = SVX_RESSTR(RID_STR_DELETECONFIRM); + aDetails.Message = SvxResId(RID_STR_DELETECONFIRM); aWarning.NextException <<= aDetails; OInteractionRequest* pRequest = new OInteractionRequest( makeAny( aWarning ) ); diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index d1983f657108..fd91d43e9a39 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -450,8 +450,8 @@ namespace svxform sIdent = aContextMenu->GetCurItemIdent(); if (sIdent == "form") { - OUString aStr(SVX_RESSTR(RID_STR_FORM)); - OUString aUndoStr = SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT).replaceAll("#", aStr); + OUString aStr(SvxResId(RID_STR_FORM)); + OUString aUndoStr = SvxResId(RID_STR_UNDO_CONTAINER_INSERT).replaceAll("#", aStr); pFormModel->BegUndo(aUndoStr); // slot was only available, if there is only one selected entry, @@ -461,8 +461,8 @@ namespace svxform } else if (sIdent == "hidden") { - OUString aStr(SVX_RESSTR(RID_STR_CONTROL)); - OUString aUndoStr = SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT).replaceAll("#", aStr); + OUString aStr(SvxResId(RID_STR_CONTROL)); + OUString aUndoStr = SvxResId(RID_STR_UNDO_CONTAINER_INSERT).replaceAll("#", aStr); pFormModel->BegUndo(aUndoStr); // slot was valid for (exactly) one selected form @@ -585,7 +585,7 @@ namespace svxform // default-entry "Forms" Image aRootImage(BitmapEx(RID_SVXBMP_FORMS)); - m_pRootEntry = InsertEntry( SVX_RESSTR(RID_STR_FORMS), aRootImage, aRootImage, + m_pRootEntry = InsertEntry( SvxResId(RID_STR_FORMS), aRootImage, aRootImage, nullptr, false, 0 ); } else if (!m_bMarkingObjects && dynamic_cast<const FmNavRequestSelectHint*>(&rHint)) @@ -956,8 +956,8 @@ namespace svxform // within undo if (pFormModel) { - OUString aStr(SVX_RESSTR(RID_STR_CONTROL)); - OUString aUndoStr = SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT).replaceAll("#", aStr); + OUString aStr(SvxResId(RID_STR_CONTROL)); + OUString aUndoStr = SvxResId(RID_STR_UNDO_CONTAINER_INSERT).replaceAll("#", aStr); pFormModel->BegUndo(aUndoStr); } @@ -1031,7 +1031,7 @@ namespace svxform if( bUndo ) { - OUString strUndoDescription(SVX_RESSTR(RID_STR_UNDO_CONTAINER_REPLACE)); + OUString strUndoDescription(SvxResId(RID_STR_UNDO_CONTAINER_REPLACE)); pFormModel->BegUndo(strUndoDescription); } @@ -1425,9 +1425,9 @@ namespace svxform // create base name OUString aBaseName; if( dynamic_cast<const FmFormData*>( pEntryData) != nullptr ) - aBaseName = SVX_RESSTR( RID_STR_STDFORMNAME ); + aBaseName = SvxResId( RID_STR_STDFORMNAME ); else if( dynamic_cast<const FmControlData*>( pEntryData) != nullptr ) - aBaseName = SVX_RESSTR( RID_STR_CONTROL ); + aBaseName = SvxResId( RID_STR_CONTROL ); // create new name @@ -1747,16 +1747,16 @@ namespace svxform OUString aUndoStr; if ( m_arrCurrentSelection.size() == 1 ) { - aUndoStr = SVX_RESSTR(RID_STR_UNDO_CONTAINER_REMOVE); + aUndoStr = SvxResId(RID_STR_UNDO_CONTAINER_REMOVE); if (m_nFormsSelected) - aUndoStr = aUndoStr.replaceFirst( "#", SVX_RESSTR( RID_STR_FORM ) ); + aUndoStr = aUndoStr.replaceFirst( "#", SvxResId( RID_STR_FORM ) ); else // it must be a control (else the root would be selected, but it cannot be deleted) - aUndoStr = aUndoStr.replaceFirst( "#", SVX_RESSTR( RID_STR_CONTROL ) ); + aUndoStr = aUndoStr.replaceFirst( "#", SvxResId( RID_STR_CONTROL ) ); } else { - aUndoStr = SVX_RESSTR(RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE); + aUndoStr = SvxResId(RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE); aUndoStr = aUndoStr.replaceFirst( "#", OUString::number( m_arrCurrentSelection.size() ) ); } pFormModel->BegUndo(aUndoStr); diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 47481b7e3877..f7d6d3673973 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -262,9 +262,9 @@ namespace svxform { OUString aStr; if (dynamic_cast<const FmFormData*>( pEntry) != nullptr) - aStr = SVX_RESSTR(RID_STR_FORM); + aStr = SvxResId(RID_STR_FORM); else - aStr = SVX_RESSTR(RID_STR_CONTROL); + aStr = SvxResId(RID_STR_CONTROL); Reference< XIndexContainer > xContainer; if (pFolder) @@ -276,7 +276,7 @@ namespace svxform if( bUndo ) { - OUString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT)); + OUString aUndoStr(SvxResId(RID_STR_UNDO_CONTAINER_INSERT)); aUndoStr = aUndoStr.replaceFirst("#", aStr); m_pFormModel->BegUndo(aUndoStr); } @@ -367,13 +367,13 @@ namespace svxform { OUString aStr; if (dynamic_cast<const FmFormData*>( pEntry) != nullptr) - aStr = SVX_RESSTR(RID_STR_FORM); + aStr = SvxResId(RID_STR_FORM); else - aStr = SVX_RESSTR(RID_STR_CONTROL); + aStr = SvxResId(RID_STR_CONTROL); if( bUndo ) { - OUString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_REMOVE)); + OUString aUndoStr(SvxResId(RID_STR_UNDO_CONTAINER_REMOVE)); aUndoStr = aUndoStr.replaceFirst("#", aStr); m_pFormModel->BegUndo(aUndoStr); } diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 307209796edd..c426054fcb7c 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -281,7 +281,7 @@ void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoo void FmFieldWin::UpdateContent(FmFormShell* pShell) { pListBox->Clear(); - OUString aTitle(SVX_RESSTR(RID_STR_FIELDSELECTION)); + OUString aTitle(SvxResId(RID_STR_FIELDSELECTION)); SetText( aTitle ); if (!pShell || !pShell->GetImpl()) @@ -299,7 +299,7 @@ void FmFieldWin::UpdateContent(const css::uno::Reference< css::form::XForm > & x { // delete ListBox pListBox->Clear(); - OUString aTitle(SVX_RES(RID_STR_FIELDSELECTION)); + OUString aTitle(SvxResId(RID_STR_FIELDSELECTION)); SetText(aTitle); if (!xForm.is()) @@ -332,7 +332,7 @@ void FmFieldWin::UpdateContent(const css::uno::Reference< css::form::XForm > & x // set prefix OUString aPrefix; - ResStringArray aPrefixes(SVX_RES(RID_RSC_TABWIN_PREFIX)); + ResStringArray aPrefixes(ResId(RID_RSC_TABWIN_PREFIX, DIALOG_MGR())); switch (m_nObjectType) { diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 43f8ca72016c..ead49e1532f2 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -153,7 +153,7 @@ SvxFmTbxCtlRecText::~SvxFmTbxCtlRecText() VclPtr<vcl::Window> SvxFmTbxCtlRecText::CreateItemWindow( vcl::Window* pParent ) { - OUString aText(SVX_RESSTR(RID_STR_REC_TEXT)); + OUString aText(SvxResId(RID_STR_REC_TEXT)); VclPtrInstance<FixedText> pFixedText( pParent ); Size aSize( pFixedText->GetTextWidth( aText ), pFixedText->GetTextHeight( ) ); pFixedText->SetText( aText ); @@ -179,7 +179,7 @@ SvxFmTbxCtlRecFromText::~SvxFmTbxCtlRecFromText() VclPtr<vcl::Window> SvxFmTbxCtlRecFromText::CreateItemWindow( vcl::Window* pParent ) { - OUString aText(SVX_RESSTR(RID_STR_REC_FROM_TEXT)); + OUString aText(SvxResId(RID_STR_REC_FROM_TEXT)); VclPtrInstance<FixedText> pFixedText( pParent, WB_CENTER ); Size aSize( pFixedText->GetTextWidth( aText ), pFixedText->GetTextHeight( ) ); aSize.Width() += 12; diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 93ee81d1b7a3..b53c711b1061 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -121,7 +121,7 @@ GalleryBrowser1::GalleryBrowser1( StartListening( *mpGallery ); maNewTheme->SetHelpId( HID_GALLERY_NEWTHEME ); - maNewTheme->SetText( GAL_RESSTR(RID_SVXSTR_GALLERY_CREATETHEME)); + maNewTheme->SetText( GalResId(RID_SVXSTR_GALLERY_CREATETHEME)); maNewTheme->SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) ); // disable creation of new themes if a writable directory is not available @@ -130,7 +130,7 @@ GalleryBrowser1::GalleryBrowser1( mpThemes->SetHelpId( HID_GALLERY_THEMELIST ); mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) ); - mpThemes->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERYPROPS_GALTHEME)); + mpThemes->SetAccessibleName(SvxResId(RID_SVXSTR_GALLERYPROPS_GALTHEME)); for( sal_uIntPtr i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; i++ ) ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) ); @@ -604,7 +604,7 @@ IMPL_LINK_NOARG(GalleryBrowser1, SelectThemeHdl, ListBox&, void) IMPL_LINK_NOARG(GalleryBrowser1, ClickNewThemeHdl, Button*, void) { - OUString aNewTheme( GAL_RESSTR(RID_SVXSTR_GALLERY_NEWTHEME) ); + OUString aNewTheme( GalResId(RID_SVXSTR_GALLERY_NEWTHEME) ); OUString aName( aNewTheme ); sal_uIntPtr nCount = 0; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 1b2d3c9d3fd1..9384734e71ba 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -402,19 +402,19 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) : maViewBox->InsertItem( TBX_ID_ICON, aDummyImage ); maViewBox->SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK ); maViewBox->SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW ); - maViewBox->SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) ); + maViewBox->SetQuickHelpText( TBX_ID_ICON, GalResId(RID_SVXSTR_GALLERY_ICONVIEW) ); maViewBox->InsertItem( TBX_ID_LIST, aDummyImage ); maViewBox->SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK ); maViewBox->SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW ); - maViewBox->SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) ); + maViewBox->SetQuickHelpText( TBX_ID_LIST, GalResId(RID_SVXSTR_GALLERY_LISTVIEW) ); MiscHdl( nullptr ); maViewBox->SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) ); maViewBox->Show(); - mpIconView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS)); - mpListView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS)); + mpIconView->SetAccessibleName(SvxResId(RID_SVXSTR_GALLERY_THEMEITEMS)); + mpListView->SetAccessibleName(SvxResId(RID_SVXSTR_GALLERY_THEMEITEMS)); maInfoBar->Show(); maSeparator->Show(); @@ -713,9 +713,9 @@ void GalleryBrowser2::SelectTheme( const OUString& rThemeName ) mpListView = VclPtr<GalleryListView>::Create( this, mpCurTheme ); mpPreview = VclPtr<GalleryPreview>::Create( this, WB_TABSTOP | WB_BORDER, mpCurTheme ); - mpIconView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS)); - mpListView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS)); - mpPreview->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_PREVIEW)); + mpIconView->SetAccessibleName(SvxResId(RID_SVXSTR_GALLERY_THEMEITEMS)); + mpListView->SetAccessibleName(SvxResId(RID_SVXSTR_GALLERY_THEMEITEMS)); + mpPreview->SetAccessibleName(SvxResId(RID_SVXSTR_GALLERY_PREVIEW)); mpIconView->SetSelectHdl( LINK( this, GalleryBrowser2, SelectObjectValueSetHdl ) ); mpListView->SetSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) ); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index ad58f46cdc3b..9e10d6786228 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -411,7 +411,7 @@ GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme SetMode( BrowserMode::AUTO_VSCROLL | BrowserMode::AUTOSIZE_LASTCOL | BrowserMode::AUTO_HSCROLL ); SetDataRowHeight( 28 ); - InsertDataColumn( GALLERY_BRWBOX_TITLE, GAL_RESSTR(RID_SVXSTR_GALLERY_TITLE), 256 ); + InsertDataColumn( GALLERY_BRWBOX_TITLE, GalResId(RID_SVXSTR_GALLERY_TITLE), 256 ); } void GalleryListView::InitSettings() diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 6f8992fafb46..46bebc7032b2 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -123,7 +123,7 @@ GalleryThemeEntry::GalleryThemeEntry( bool bCreateUniqueURL, } //look up the rest of the ids in string resources if (aName.isEmpty()) - aName = GAL_RESSTR(RID_GALLERYSTR_THEME_START + (sal_uInt16) nId); + aName = GalResId(RID_GALLERYSTR_THEME_START + (sal_uInt16) nId); } if( aName.isEmpty() ) @@ -474,13 +474,13 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const switch( nThemeId ) { case GALLERY_THEME_3D: - aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_3D); + aFallback = GalResId(RID_GALLERYSTR_THEME_3D); break; case GALLERY_THEME_BULLETS: - aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_BULLETS); + aFallback = GalResId(RID_GALLERYSTR_THEME_BULLETS); break; case GALLERY_THEME_HOMEPAGE: - aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_HOMEPAGE); + aFallback = GalResId(RID_GALLERYSTR_THEME_HOMEPAGE); break; case GALLERY_THEME_POWERPOINT: aFallback = RID_GALLERYSTR_THEME_POWERPOINT; @@ -492,7 +492,7 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const aFallback = RID_GALLERYSTR_THEME_FONTWORK_VERTICAL; break; case GALLERY_THEME_SOUNDS: - aFallback = GAL_RESSTR(RID_GALLERYSTR_THEME_SOUNDS); + aFallback = GalResId(RID_GALLERYSTR_THEME_SOUNDS); break; case RID_GALLERYSTR_THEME_ARROWS: case RID_GALLERYSTR_THEME_COMPUTERS: @@ -504,7 +504,7 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const case RID_GALLERYSTR_THEME_SYMBOLS: case RID_GALLERYSTR_THEME_TRANSPORT: case RID_GALLERYSTR_THEME_TXTSHAPES: - aFallback = GAL_RESSTR(static_cast<sal_uInt32>(nThemeId)); + aFallback = GalResId(static_cast<sal_uInt32>(nThemeId)); break; default: break; diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index b49b042317e6..4fac07003ebc 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -371,7 +371,7 @@ GalleryProgress::GalleryProgress( GraphicFilter* pFilter ) : if( mpFilter ) { - aProgressText = GAL_RESSTR(RID_SVXSTR_GALLERY_FILTER); + aProgressText = GalResId(RID_SVXSTR_GALLERY_FILTER); // mpFilter->SetUpdatePercentHdl( LINK( this, GalleryProgress, Update ) ); // sj: progress wasn't working up from SO7 at all // // so I am removing this. The gallery progress should // // be changed to use the XStatusIndicator instead of XProgressMonitor diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index a28047a740db..2f23545905ce 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -239,7 +239,7 @@ const OUString SgaObject::GetTitle() const aResId.SetRT( RSC_STRING ); if ( pResMgr->IsAvailable( aResId ) ) { - aReturnValue = aResId.toString(); + aReturnValue = aResId; } } } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 96028160a949..1f4626a2d048 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1531,7 +1531,7 @@ const OUString& GalleryTheme::GetName() const { return pThm->GetThemeName(); } void GalleryTheme::InsertAllThemes( ListBox& rListBox ) { for( sal_uInt16 i = RID_GALLERYSTR_THEME_FIRST; i <= RID_GALLERYSTR_THEME_LAST; i++ ) - rListBox.InsertEntry(GAL_RESSTR(i)); + rListBox.InsertEntry(GalResId(i)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index b40eb78daeee..34e791ab2cee 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -156,9 +156,9 @@ namespace svxform m_sInstance_API( "instance" ), m_sNone_API( "none" ) { - m_sDoc_UI = SVX_RESSTR(RID_STR_REPLACE_DOC); - m_sInstance_UI = SVX_RESSTR(RID_STR_REPLACE_INST); - m_sNone_UI = SVX_RESSTR(RID_STR_REPLACE_NONE); + m_sDoc_UI = SvxResId(RID_STR_REPLACE_DOC); + m_sInstance_UI = SvxResId(RID_STR_REPLACE_INST); + m_sNone_UI = SvxResId(RID_STR_REPLACE_NONE); } /** convert submission replace string from API value to UI value. @@ -205,9 +205,9 @@ namespace svxform m_sPut_API( "put" ), m_sGet_API( "get" ) { - m_sPost_UI = SVX_RESSTR(RID_STR_METHOD_POST); - m_sPut_UI = SVX_RESSTR(RID_STR_METHOD_PUT); - m_sGet_UI = SVX_RESSTR(RID_STR_METHOD_GET); + m_sPost_UI = SvxResId(RID_STR_METHOD_POST); + m_sPut_UI = SvxResId(RID_STR_METHOD_PUT); + m_sGet_UI = SvxResId(RID_STR_METHOD_GET); } /** convert from API to UI; put is default. */ diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index fb36f4fcdb1d..e05a1348ebe4 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -118,7 +118,7 @@ bool SvxOrientationItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ OUString SvxOrientationItem::GetValueText( sal_uInt16 nVal ) { DBG_ASSERT( nVal <= SVX_ORIENTATION_STACKED, "enum overflow!" ); - return SVX_RESSTR(RID_SVXITEMS_ORI_STANDARD + nVal); + return SvxResId(RID_SVXITEMS_ORI_STANDARD + nVal); } @@ -222,19 +222,19 @@ bool SvxMarginItem::GetPresentation } case SfxItemPresentation::Complete: { - rText = SVX_RESSTR(RID_SVXITEMS_MARGIN_LEFT) + + rText = SvxResId(RID_SVXITEMS_MARGIN_LEFT) + GetMetricText( (long)nLeftMargin, eCoreUnit, ePresUnit, pIntl ) + " " + EditResId::GetString(GetMetricId(ePresUnit)) + cpDelimTmp + - SVX_RESSTR(RID_SVXITEMS_MARGIN_TOP) + + SvxResId(RID_SVXITEMS_MARGIN_TOP) + GetMetricText( (long)nTopMargin, eCoreUnit, ePresUnit, pIntl ) + " " + EditResId::GetString(GetMetricId(ePresUnit)) + cpDelimTmp + - SVX_RESSTR(RID_SVXITEMS_MARGIN_RIGHT) + + SvxResId(RID_SVXITEMS_MARGIN_RIGHT) + GetMetricText( (long)nRightMargin, eCoreUnit, ePresUnit, pIntl ) + " " + EditResId::GetString(GetMetricId(ePresUnit)) + cpDelimTmp + - SVX_RESSTR(RID_SVXITEMS_MARGIN_BOTTOM) + + SvxResId(RID_SVXITEMS_MARGIN_BOTTOM) + GetMetricText( (long)nBottomMargin, eCoreUnit, ePresUnit, pIntl ) + " " + EditResId::GetString(GetMetricId(ePresUnit)); return true; diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index 2796103f1138..7d256e4db7a9 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -74,10 +74,10 @@ inline OUString GetUsageText( const SvxPageUsage eU ) { switch( eU ) { - case SvxPageUsage::Left : return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_LEFT); - case SvxPageUsage::Right : return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_RIGHT); - case SvxPageUsage::All : return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_ALL); - case SvxPageUsage::Mirror: return SVX_RESSTR(RID_SVXITEMS_PAGE_USAGE_MIRROR); + case SvxPageUsage::Left : return SvxResId(RID_SVXITEMS_PAGE_USAGE_LEFT); + case SvxPageUsage::Right : return SvxResId(RID_SVXITEMS_PAGE_USAGE_RIGHT); + case SvxPageUsage::All : return SvxResId(RID_SVXITEMS_PAGE_USAGE_ALL); + case SvxPageUsage::Mirror: return SvxResId(RID_SVXITEMS_PAGE_USAGE_MIRROR); default: return OUString(); } } @@ -103,11 +103,11 @@ bool SvxPageItem::GetPresentation rText = aDescName + cpDelimTmp; } DBG_ASSERT( eNumType <= css::style::NumberingType::NUMBER_NONE, "enum overflow" ); - rText += SVX_RESSTR(RID_SVXITEMS_PAGE_NUM_BEGIN + eNumType) + cpDelimTmp; + rText += SvxResId(RID_SVXITEMS_PAGE_NUM_BEGIN + eNumType) + cpDelimTmp; if ( bLandscape ) - rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_TRUE); + rText += SvxResId(RID_SVXITEMS_PAGE_LAND_TRUE); else - rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_FALSE); + rText += SvxResId(RID_SVXITEMS_PAGE_LAND_FALSE); OUString aUsageText = GetUsageText( eUse ); if (!aUsageText.isEmpty()) { @@ -117,17 +117,17 @@ bool SvxPageItem::GetPresentation } case SfxItemPresentation::Complete: { - rText += SVX_RESSTR(RID_SVXITEMS_PAGE_COMPLETE); + rText += SvxResId(RID_SVXITEMS_PAGE_COMPLETE); if ( !aDescName.isEmpty() ) { rText += aDescName + cpDelimTmp; } DBG_ASSERT( eNumType <= css::style::NumberingType::NUMBER_NONE, "enum overflow" ); - rText += SVX_RESSTR(RID_SVXITEMS_PAGE_NUM_BEGIN + eNumType) + cpDelimTmp; + rText += SvxResId(RID_SVXITEMS_PAGE_NUM_BEGIN + eNumType) + cpDelimTmp; if ( bLandscape ) - rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_TRUE); + rText += SvxResId(RID_SVXITEMS_PAGE_LAND_TRUE); else - rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_FALSE); + rText += SvxResId(RID_SVXITEMS_PAGE_LAND_FALSE); OUString aUsageText = GetUsageText( eUse ); if (!aUsageText.isEmpty()) { diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx index a31d6e33e785..056a9e13dba9 100644 --- a/svx/source/items/postattr.cxx +++ b/svx/source/items/postattr.cxx @@ -55,7 +55,7 @@ bool SvxPostItAuthorItem::GetPresentation rText = GetValue(); return true; case SfxItemPresentation::Complete: - rText = SVX_RESSTR(RID_SVXITEMS_AUTHOR_COMPLETE) + GetValue(); + rText = SvxResId(RID_SVXITEMS_AUTHOR_COMPLETE) + GetValue(); return true; default: ;//prevent warning } @@ -95,7 +95,7 @@ bool SvxPostItDateItem::GetPresentation rText = GetValue(); return true; case SfxItemPresentation::Complete: - rText = SVX_RESSTR(RID_SVXITEMS_DATE_COMPLETE) + GetValue(); + rText = SvxResId(RID_SVXITEMS_DATE_COMPLETE) + GetValue(); return true; default: ;//prevent warning } @@ -133,7 +133,7 @@ bool SvxPostItTextItem::GetPresentation rText = GetValue(); return true; case SfxItemPresentation::Complete: - rText = SVX_RESSTR(RID_SVXITEMS_TEXT_COMPLETE) + GetValue(); + rText = SvxResId(RID_SVXITEMS_TEXT_COMPLETE) + GetValue(); return true; default: ;//prevent warning } diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx index 00579c3ca1f9..b94b59be08fb 100644 --- a/svx/source/sidebar/EmptyPanel.cxx +++ b/svx/source/sidebar/EmptyPanel.cxx @@ -27,7 +27,7 @@ EmptyPanel::EmptyPanel (vcl::Window* pParent) : Control(pParent) , maMessageControl(VclPtr<FixedText>::Create(this)) { - maMessageControl->SetText(SVX_RES(RID_SIDEBAR_EMPTY_PANEL_TEXT)); + maMessageControl->SetText(SvxResId(RID_SIDEBAR_EMPTY_PANEL_TEXT)); maMessageControl->setPosSizePixel(5, 5, 250, 15); maMessageControl->SetStyle(WB_WORDBREAK); maMessageControl->Show(); diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index 11df045cc559..4285b5fd007b 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -97,10 +97,10 @@ void GraphicPropertyPanel::Initialize() mpMtrContrast->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyContrastHdl ) ); mpMtrTrans->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyTransHdl ) ); - mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_STANDARD)); - mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_GREYS)); - mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_MONO)); - mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_WATERMARK)); + mpLBColorMode->InsertEntry(SvxResId(RID_SVXSTR_GRAFMODE_STANDARD)); + mpLBColorMode->InsertEntry(SvxResId(RID_SVXSTR_GRAFMODE_GREYS)); + mpLBColorMode->InsertEntry(SvxResId(RID_SVXSTR_GRAFMODE_MONO)); + mpLBColorMode->InsertEntry(SvxResId(RID_SVXSTR_GRAFMODE_WATERMARK)); mpLBColorMode->SetSelectHdl( LINK( this, GraphicPropertyPanel, ClickColorModeHdl )); mpMtrRed->SetModifyHdl( LINK( this, GraphicPropertyPanel, RedHdl ) ); diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index 7ff47c173011..191600c4ca16 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -58,7 +58,7 @@ namespace void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndList& rList, const Bitmap& rBitmapZero) { const sal_uInt32 nCount(rList.Count()); - const OUString sNone(SVX_RESSTR(RID_SVXSTR_NONE)); + const OUString sNone(SvxResId(RID_SVXSTR_NONE)); rListBoxStart.SetUpdateMode(false); rListBoxEnd.SetUpdateMode(false); diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 5bc0619f950b..45c9f0db3d54 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -32,7 +32,7 @@ LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& rParent) : FloatingWindow(&rParent, "FloatingLineProperty", "svx/ui/floatinglineproperty.ui") , m_rParent(rParent) , m_pStr(nullptr) - , m_sPt(SVX_RESSTR(RID_SVXSTR_PT)) + , m_sPt(SvxResId(RID_SVXSTR_PT)) , m_eMapUnit(MapUnit::MapTwip) , m_bVSFocus(true) , m_bCustom(false) @@ -60,7 +60,7 @@ LineWidthPopup::LineWidthPopup(LinePropertyPanelBase& rParent) m_pStr[5] = "3.0"; m_pStr[6] = "4.5"; m_pStr[7] = "6.0"; - m_pStr[8] = SVX_RESSTR(RID_SVXSTR_WIDTH_LAST_CUSTOM); + m_pStr[8] = SvxResId(RID_SVXSTR_WIDTH_LAST_CUSTOM); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0]; diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 1e9f1b10e064..a07634897d1f 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -267,7 +267,7 @@ void BulletsTypeMgr::Init() pActualBullets[i] = new BulletsSettings; pActualBullets[i]->cBulletChar = aDefaultBulletTypes[i]; pActualBullets[i]->aFont = rActBulletFont; - pActualBullets[i]->sDescription = SVX_RESSTR( RID_SVXSTR_BULLET_DESCRIPTION_0 + i ); + pActualBullets[i]->sDescription = SvxResId( RID_SVXSTR_BULLET_DESCRIPTION_0 + i ); } } sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex) @@ -365,7 +365,7 @@ void BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI pActualBullets[nIndex]->aFont = *pFont; pActualBullets[nIndex]->bIsCustomized = true; - OUString aStrFromRES = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION); + OUString aStrFromRES = SvxResId( RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION); OUString aReplace = "%LIST_NUM"; OUString sNUM = OUString::number( nIndex + 1 ); aStrFromRES = aStrFromRES.replaceFirst(aReplace,sNUM); @@ -465,7 +465,7 @@ void NumberingTypeMgr::Init() pNumEntry->nIndexDefault = i; pNumEntry->pNumSetting = pNew; if ( i < 8 ) - pNumEntry->sDescription = SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTIONS + i ); + pNumEntry->sDescription = SvxResId( RID_SVXSTR_SINGLENUM_DESCRIPTIONS + i ); maNumberSettingsArr.push_back(std::shared_ptr<NumberSettings_Impl>(pNumEntry)); } } @@ -537,7 +537,7 @@ void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_ ApplyNumRule(aTmpRule2,nIndex,mLevel); if (aTmpRule1==aTmpRule2) _pSet->bIsCustomized=false; if (_pSet->bIsCustomized) { - OUString aStrFromRES = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_NUMBERING_DESCRIPTION); + OUString aStrFromRES = SvxResId( RID_SVXSTR_NUMBULLET_CUSTOM_NUMBERING_DESCRIPTION); OUString sNUM = OUString::number( nIndex + 1 ); aStrFromRES = aStrFromRES.replaceFirst("%LIST_NUM",sNUM); _pSet->sDescription = aStrFromRES; @@ -647,7 +647,7 @@ void OutlineTypeMgr::Init() { pOutlineSettingsArrs[ nItem ] = new OutlineSettings_Impl; OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[ nItem ]; - pItemArr->sDescription = SVX_RESSTR( RID_SVXSTR_OUTLINENUM_DESCRIPTION_0 + nItem ); + pItemArr->sDescription = SvxResId( RID_SVXSTR_OUTLINENUM_DESCRIPTION_0 + nItem ); pItemArr->pNumSettingsArr = new NumSettingsArr_Impl; Reference<XIndexAccess> xLevel = aOutlineAccess.getConstArray()[nItem]; for(sal_Int32 nLevel = 0; nLevel < xLevel->getCount() && nLevel < 5; nLevel++) @@ -800,7 +800,7 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI ApplyNumRule(aTmpRule2,nIndex,mLevel); if (aTmpRule1==aTmpRule2) pItemArr->bIsCustomized=false; if (pItemArr->bIsCustomized) { - OUString aStrFromRES = SVX_RESSTR( RID_SVXSTR_NUMBULLET_CUSTOM_MULTILEVEL_DESCRIPTION); + OUString aStrFromRES = SvxResId( RID_SVXSTR_NUMBULLET_CUSTOM_MULTILEVEL_DESCRIPTION); OUString sNUM = OUString::number( nIndex + 1 ); aStrFromRES = aStrFromRES.replaceFirst("%LIST_NUM",sNUM); pItemArr->sDescription = aStrFromRES; diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx index 128f8c973154..62f7220959e6 100644 --- a/svx/source/stbctrls/insctrl.cxx +++ b/svx/source/stbctrls/insctrl.cxx @@ -54,9 +54,9 @@ void SvxInsertStatusBarControl::StateChanged( sal_uInt16 , SfxItemState eState, bInsert = pItem->GetValue(); if ( bInsert ) - GetStatusBar().SetQuickHelpText( GetId(), SVX_RESSTR( RID_SVXSTR_INSERT_HELPTEXT ) ); + GetStatusBar().SetQuickHelpText( GetId(), SvxResId( RID_SVXSTR_INSERT_HELPTEXT ) ); else - GetStatusBar().SetQuickHelpText( GetId(), SVX_RESSTR( RID_SVXSTR_OVERWRITE_HELPTEXT ) ); + GetStatusBar().SetQuickHelpText( GetId(), SvxResId( RID_SVXSTR_OVERWRITE_HELPTEXT ) ); DrawItemText_Impl(); } @@ -71,7 +71,7 @@ void SvxInsertStatusBarControl::DrawItemText_Impl() { OUString aText; if ( !bInsert ) - aText = SVX_RESSTR( RID_SVXSTR_OVERWRITE_TEXT ); + aText = SvxResId( RID_SVXSTR_OVERWRITE_TEXT ); GetStatusBar().SetItemText( GetId(), aText ); } diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 247d0dc62f06..33b0bd5e3c95 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -89,7 +89,7 @@ void SvxModifyControl::StateChanged( sal_uInt16, SfxItemState eState, _repaint(); int nResId = modified ? RID_SVXSTR_DOC_MODIFIED_YES : RID_SVXSTR_DOC_MODIFIED_NO; - GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(nResId)); + GetStatusBar().SetQuickHelpText(GetId(), SvxResId(nResId)); if ( start ) mxImpl->maIdle.Start(); diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 327b36425407..f294a945726d 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -96,7 +96,7 @@ void XmlSecStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, cons else if ( mpImpl->mnState == SignatureState::PARTIAL_OK ) nResId = RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG; - GetStatusBar().SetQuickHelpText( GetId(), SVX_RESSTR( nResId ) ); + GetStatusBar().SetQuickHelpText( GetId(), SvxResId( nResId ) ); } void XmlSecStatusBarControl::Command( const CommandEvent& rCEvt ) diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 31073cad96d9..ea1059862330 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -105,7 +105,7 @@ SvxZoomStatusBarControl::SvxZoomStatusBarControl( sal_uInt16 _nSlotId, nZoom( 100 ), nValueSet( SvxZoomEnableFlags::ALL ) { - GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_ZOOMTOOL_HINT)); + GetStatusBar().SetQuickHelpText(GetId(), SvxResId(RID_SVXSTR_ZOOMTOOL_HINT)); } void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, @@ -184,7 +184,7 @@ SvxZoomPageStatusBarControl::SvxZoomPageStatusBarControl(sal_uInt16 _nSlotId, : SfxStatusBarControl(_nSlotId, _nId, rStb) , maImage(BitmapEx(RID_SVXBMP_ZOOM_PAGE)) { - GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_FIT_SLIDE)); + GetStatusBar().SetQuickHelpText(GetId(), SvxResId(RID_SVXSTR_FIT_SLIDE)); } void SvxZoomPageStatusBarControl::Paint(const UserDrawEvent& rUsrEvt) diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 01fb793e9359..3c871557c00c 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -366,11 +366,11 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) // click to - button if ( nXDiff >= nButtonLeftOffset && nXDiff <= nButtonRightOffset ) - GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_ZOOM_OUT)); + GetStatusBar().SetQuickHelpText(GetId(), SvxResId(RID_SVXSTR_ZOOM_OUT)); // click to + button else if ( nXDiff >= aControlRect.GetWidth() - nSliderXOffset + nButtonLeftOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset + nButtonRightOffset ) - GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_ZOOM_IN)); + GetStatusBar().SetQuickHelpText(GetId(), SvxResId(RID_SVXSTR_ZOOM_IN)); else // don't hide the slider and its handle with a tooltip during zooming GetStatusBar().SetQuickHelpText(GetId(), ""); diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 94e502646798..3e78145dcf7f 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -395,7 +395,7 @@ ResMgr* ImpGetResMgr() OUString ImpGetResStr(sal_uInt16 nResID) { - return ResId(nResID, *ImpGetResMgr()).toString(); + return ResId(nResID, *ImpGetResMgr()); } namespace sdr diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 5f8212d6b7f7..c17f7a0adc6d 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1375,7 +1375,7 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, bool bSetItemOnObject, bool if(bUndo && pModel->IsUndoEnabled()) { - pModel->BegUndo(SVX_RESSTR(IsGradient() ? SIP_XA_FILLGRADIENT : SIP_XA_FILLTRANSPARENCE)); + pModel->BegUndo(SvxResId(IsGradient() ? SIP_XA_FILLGRADIENT : SIP_XA_FILLTRANSPARENCE)); pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*_pObj)); pModel->EndUndo(); } diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index d72bfbcf0bc8..333eb014a9c9 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1014,7 +1014,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) // add undo to allow user to take back this step if( pModel->IsUndoEnabled() ) { - pModel->BegUndo(SVX_RESSTR(SIP_XA_FILLTRANSPARENCE)); + pModel->BegUndo(SvxResId(SIP_XA_FILLTRANSPARENCE)); pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*pObj)); pModel->EndUndo(); } diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx index 31afe88eb2fe..3b56970ad81d 100644 --- a/svx/source/table/tabledesign.cxx +++ b/svx/source/table/tabledesign.cxx @@ -701,7 +701,7 @@ Any TableDesignFamily::getPropertyValue( const OUString& PropertyName ) { if ( PropertyName == "DisplayName" ) { - OUString sDisplayName( SVX_RESSTR( RID_SVXSTR_STYLEFAMILY_TABLEDESIGN ) ); + OUString sDisplayName( SvxResId( RID_SVXSTR_STYLEFAMILY_TABLEDESIGN ) ); return Any( sDisplayName ); } else diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 140f515268d2..4aaadfb22eda 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -143,7 +143,7 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet &rColorSet) std::set<Color> aColors = pDocSh->GetDocColors(); mnColorCount = aColors.size(); rColorSet.Clear(); - rColorSet.addEntriesForColorSet(aColors, SVX_RESSTR( RID_SVXSTR_DOC_COLOR_PREFIX ) + " " ); + rColorSet.addEntriesForColorSet(aColors, SvxResId( RID_SVXSTR_DOC_COLOR_PREFIX ) + " " ); } } else @@ -175,12 +175,12 @@ std::vector<OUString> PaletteManager::GetPaletteList() { std::vector<OUString> aPaletteNames; - aPaletteNames.push_back( SVX_RESSTR( RID_SVXSTR_CUSTOM_PAL ) ); + aPaletteNames.push_back( SvxResId( RID_SVXSTR_CUSTOM_PAL ) ); for (auto const& it : m_Palettes) { aPaletteNames.push_back( (*it).GetName() ); } - aPaletteNames.push_back( SVX_RESSTR ( RID_SVXSTR_DOC_COLORS ) ); + aPaletteNames.push_back( SvxResId ( RID_SVXSTR_DOC_COLORS ) ); return aPaletteNames; } diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index bf81afb5e032..ab931156aa7e 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -106,17 +106,17 @@ NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController, OUString aMoreItemText; if ( mePageType == NumberingPageType::BULLET ) { - aMoreItemText = SVX_RESSTR( RID_SVXSTR_MOREBULLETS ); + aMoreItemText = SvxResId( RID_SVXSTR_MOREBULLETS ); AddStatusListener( ".uno:CurrentBulletListType" ); } else if ( mePageType == NumberingPageType::SINGLENUM ) { - aMoreItemText = SVX_RESSTR( RID_SVXSTR_MORENUMBERING ); + aMoreItemText = SvxResId( RID_SVXSTR_MORENUMBERING ); AddStatusListener( ".uno:CurrentNumListType" ); } else { - aMoreItemText = SVX_RESSTR( RID_SVXSTR_MORE ); + aMoreItemText = SvxResId( RID_SVXSTR_MORE ); AddStatusListener( ".uno:CurrentOutlineType" ); } diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 46f333287fcf..de140408609d 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -90,7 +90,7 @@ SvxColorValueSet_docking::SvxColorValueSet_docking( vcl::Window* _pParent ) : DragSourceHelper( this ), mbLeftButton(true) { - SetAccessibleName(SVX_RESSTR(STR_COLORTABLE)); + SetAccessibleName(SvxResId(STR_COLORTABLE)); } void SvxColorValueSet_docking::MouseButtonDown( const MouseEvent& rMEvt ) @@ -183,7 +183,7 @@ SvxColorDockingWindow::SvxColorDockingWindow nLines ( 1 ), nCount ( 0 ) { - SetText(SVX_RESSTR(STR_COLORTABLE)); + SetText(SvxResId(STR_COLORTABLE)); SetSizePixel(LogicToPixel(Size(150, 22), MapMode(MapUnit::MapAppFont))); SetHelpId(HID_CTRL_COLOR); @@ -277,7 +277,7 @@ void SvxColorDockingWindow::FillValueSet() Bitmap aBmp( pVD->GetBitmap( Point(), aColorSize ) ); - aColorSet->InsertItem( (sal_uInt16)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) ); + aColorSet->InsertItem( (sal_uInt16)1, Image(aBmp), SvxResId( RID_SVXSTR_INVISIBLE ) ); aColorSet->addEntriesForXColorList(*pColorList, 2); } diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index cbfd1bb7c5c7..59282aae85da 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -134,7 +134,7 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i) { - OUString aText(SVX_RESSTR(RID_SVXSTR_DIRECTION + i)); + OUString aText(SvxResId(RID_SVXSTR_DIRECTION + i)); mpDirectionSet->InsertItem(i + 1, maImgDirection[i], aText); } @@ -142,8 +142,8 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( appendEntry(2, mpDirectionSet ); appendSeparator(); - appendEntry(0, SVX_RESSTR(RID_SVXSTR_PERSPECTIVE), maImgPerspective); - appendEntry(1, SVX_RESSTR(RID_SVXSTR_PARALLEL), maImgParallel); + appendEntry(0, SvxResId(RID_SVXSTR_PERSPECTIVE), maImgPerspective); + appendEntry(1, SvxResId(RID_SVXSTR_PARALLEL), maImgParallel); SetOutputSizePixel( getMenuSize() ); @@ -393,8 +393,8 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( appendEntry(2, "", maImgDepth2); appendEntry(3, "", maImgDepth3); appendEntry(4, "", maImgDepth4); - appendEntry(5, SVX_RESSTR(RID_SVXSTR_INFINITY), maImgDepthInfinity); - appendEntry(6, SVX_RESSTR(RID_SVXSTR_CUSTOM)); + appendEntry(5, SvxResId(RID_SVXSTR_INFINITY), maImgDepthInfinity); + appendEntry(6, SvxResId(RID_SVXSTR_CUSTOM)); SetOutputSizePixel( getMenuSize() ); @@ -427,7 +427,7 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit ) for( int i = 0; i < 5; i++ ) { - OUString aStr( SVX_RESSTR( nResource + i ) ); + OUString aStr( SvxResId( nResource + i ) ); setEntryText( i, aStr ); } } @@ -622,9 +622,9 @@ ExtrusionLightingWindow::ExtrusionLightingWindow(svt::ToolboxController& rContro appendEntry(3, mpLightingSet); appendSeparator(); - appendEntry(0, SVX_RESSTR(RID_SVXSTR_BRIGHT), maImgBright); - appendEntry(1, SVX_RESSTR(RID_SVXSTR_NORMAL), maImgNormal); - appendEntry(2, SVX_RESSTR(RID_SVXSTR_DIM), maImgDim); + appendEntry(0, SvxResId(RID_SVXSTR_BRIGHT), maImgBright); + appendEntry(1, SvxResId(RID_SVXSTR_NORMAL), maImgNormal); + appendEntry(2, SvxResId(RID_SVXSTR_DIM), maImgDim); SetOutputSizePixel( getMenuSize() ); @@ -855,10 +855,10 @@ ExtrusionSurfaceWindow::ExtrusionSurfaceWindow( { SetSelectHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) ); - appendEntry(0, SVX_RESSTR(RID_SVXSTR_WIREFRAME), maImgSurface1); - appendEntry(1, SVX_RESSTR(RID_SVXSTR_MATTE), maImgSurface2); - appendEntry(2, SVX_RESSTR(RID_SVXSTR_PLASTIC), maImgSurface3); - appendEntry(3, SVX_RESSTR(RID_SVXSTR_METAL), maImgSurface4); + appendEntry(0, SvxResId(RID_SVXSTR_WIREFRAME), maImgSurface1); + appendEntry(1, SvxResId(RID_SVXSTR_MATTE), maImgSurface2); + appendEntry(2, SvxResId(RID_SVXSTR_PLASTIC), maImgSurface3); + appendEntry(3, SvxResId(RID_SVXSTR_METAL), maImgSurface4); SetOutputSizePixel( getMenuSize() ); diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 3c9d23c959c4..f5e4a426156d 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -170,7 +170,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 nThemeId) for( std::vector<Bitmap *>::size_type nFavorite = 1; nFavorite <= nFavCount; nFavorite++ ) { - OUString aStr(SVX_RESSTR(RID_SVXFLOAT3D_FAVORITE)); + OUString aStr(SvxResId(RID_SVXFLOAT3D_FAVORITE)); aStr += " "; aStr += OUString::number(nFavorite); Image aThumbImage( maFavoritesHorizontal[nFavorite-1] ); @@ -278,11 +278,11 @@ FontworkAlignmentWindow::FontworkAlignmentWindow(svt::ToolboxController& rContro { SetSelectHdl( LINK( this, FontworkAlignmentWindow, SelectHdl ) ); - appendEntry(0, SVX_RESSTR(RID_SVXSTR_ALIGN_LEFT), maImgAlgin1); - appendEntry(1, SVX_RESSTR(RID_SVXSTR_ALIGN_CENTER), maImgAlgin2); - appendEntry(2, SVX_RESSTR(RID_SVXSTR_ALIGN_RIGHT), maImgAlgin3); - appendEntry(3, SVX_RESSTR(RID_SVXSTR_ALIGN_WORD), maImgAlgin4); - appendEntry(4, SVX_RESSTR(RID_SVXSTR_ALIGN_STRETCH), maImgAlgin5); + appendEntry(0, SvxResId(RID_SVXSTR_ALIGN_LEFT), maImgAlgin1); + appendEntry(1, SvxResId(RID_SVXSTR_ALIGN_CENTER), maImgAlgin2); + appendEntry(2, SvxResId(RID_SVXSTR_ALIGN_RIGHT), maImgAlgin3); + appendEntry(3, SvxResId(RID_SVXSTR_ALIGN_WORD), maImgAlgin4); + appendEntry(4, SvxResId(RID_SVXSTR_ALIGN_STRETCH), maImgAlgin5); SetOutputSizePixel( getMenuSize() ); @@ -434,14 +434,14 @@ FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::ToolboxContr { SetSelectHdl( LINK( this, FontworkCharacterSpacingWindow, SelectHdl ) ); - appendEntry(0, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_VERY_TIGHT), MenuItemBits::RADIOCHECK); - appendEntry(1, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_TIGHT), MenuItemBits::RADIOCHECK); - appendEntry(2, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_NORMAL), MenuItemBits::RADIOCHECK); - appendEntry(3, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_LOOSE), MenuItemBits::RADIOCHECK); - appendEntry(4, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_VERY_LOOSE), MenuItemBits::RADIOCHECK); - appendEntry(5, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_CUSTOM), MenuItemBits::RADIOCHECK); + appendEntry(0, SvxResId(RID_SVXSTR_CHARS_SPACING_VERY_TIGHT), MenuItemBits::RADIOCHECK); + appendEntry(1, SvxResId(RID_SVXSTR_CHARS_SPACING_TIGHT), MenuItemBits::RADIOCHECK); + appendEntry(2, SvxResId(RID_SVXSTR_CHARS_SPACING_NORMAL), MenuItemBits::RADIOCHECK); + appendEntry(3, SvxResId(RID_SVXSTR_CHARS_SPACING_LOOSE), MenuItemBits::RADIOCHECK); + appendEntry(4, SvxResId(RID_SVXSTR_CHARS_SPACING_VERY_LOOSE), MenuItemBits::RADIOCHECK); + appendEntry(5, SvxResId(RID_SVXSTR_CHARS_SPACING_CUSTOM), MenuItemBits::RADIOCHECK); appendSeparator(); - appendEntry(6, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_KERN_PAIRS), MenuItemBits::CHECKABLE); + appendEntry(6, SvxResId(RID_SVXSTR_CHARS_SPACING_KERN_PAIRS), MenuItemBits::CHECKABLE); SetOutputSizePixel( getMenuSize() ); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 92d7a7593df8..19a41f4e6f2d 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -337,10 +337,10 @@ ImplGrafModeControl::ImplGrafModeControl( vcl::Window* pParent, const Reference< { SetSizePixel( Size( 100, 260 ) ); - InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_STANDARD ) ); - InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_GREYS ) ); - InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_MONO ) ); - InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_WATERMARK ) ); + InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_STANDARD ) ); + InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_GREYS ) ); + InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_MONO ) ); + InsertEntry( SvxResId( RID_SVXSTR_GRAFMODE_WATERMARK ) ); Show(); } @@ -577,7 +577,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafRedItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFRED ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFRED ); } } break; @@ -588,7 +588,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafGreenItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGREEN ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFGREEN ); } } break; @@ -599,7 +599,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafBlueItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFBLUE ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFBLUE ); } } break; @@ -610,7 +610,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafLuminanceItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFLUMINANCE ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFLUMINANCE ); } } break; @@ -621,7 +621,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafContrastItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCONTRAST ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFCONTRAST ); } } break; @@ -632,7 +632,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafGamma100Item( static_cast<const SfxUInt32Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFGAMMA ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFGAMMA ); } } break; @@ -643,7 +643,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafTransparenceItem( static_cast<const SfxUInt16Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFTRANSPARENCY ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFTRANSPARENCY ); } } break; @@ -654,7 +654,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aSet.Put( SdrGrafModeItem( (GraphicDrawMode) static_cast<const SfxUInt16Item*>(pItem)->GetValue() )); if( bUndo ) - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFMODE ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFMODE ); } } break; @@ -705,7 +705,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) ScopedVclPtrInstance<SfxSingleTabDialog> aCropDialog( SfxViewShell::Current() ? SfxViewShell::Current()->GetWindow() : nullptr, aCropDlgAttr); - const OUString aCropStr(SVX_RESSTR(RID_SVXSTR_GRAFCROP)); + const OUString aCropStr(SvxResId(RID_SVXSTR_GRAFCROP)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); assert(pFact && "Dialog creation failed!"); @@ -722,7 +722,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) if( pOutAttr ) { - aUndoStr += SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCROP ); + aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFCROP ); // set crop attributes if( SfxItemState::SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) ) diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index ee5e69f2fc3f..33da56fe3227 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -139,7 +139,7 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri aTableButton->SetPosSizePixel( Point( mnTablePosX, mnTableHeight + 5 ), Size( mnTableWidth - mnTablePosX, 24 ) ); - aTableButton->SetText( SVX_RESSTR( RID_SVXSTR_MORE ) ); + aTableButton->SetText( SvxResId( RID_SVXSTR_MORE ) ); aTableButton->SetClickHdl( LINK( this, TableWindow, SelectHdl ) ); aTableButton->Show(); @@ -285,7 +285,7 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang if(GetId() == FN_SHOW_MULTIPLE_PAGES) { aText += " "; - aText += SVX_RESSTR(RID_SVXSTR_PAGES); + aText += SvxResId(RID_SVXSTR_PAGES); } Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight()); diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 3794901daa82..79abd6a95705 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -150,7 +150,7 @@ void SvxUndoRedoControl::Impl_SetInfo( sal_Int32 nCount ) else nId = SID_UNDO == GetSlotId() ? RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS; - aActionStr = SVX_RESSTR(nId); + aActionStr = SvxResId(nId); OUString aText = aActionStr.replaceAll("$(ARG1)", OUString::number(nCount)); pPopupWin->SetText(aText); @@ -245,7 +245,7 @@ VclPtr<SfxPopupWindow> SvxUndoRedoControl::CreatePopupWindow() rListBox.InsertEntry( s ); rListBox.SelectEntryPos( 0 ); - aActionStr = SVX_RESSTR(SID_UNDO == GetSlotId() ? + aActionStr = SvxResId(SID_UNDO == GetSlotId() ? RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS); Impl_SetInfo( rListBox.GetSelectEntryCount() ); diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index 721355db6dbe..b512aa16a8e8 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -174,8 +174,8 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState ) OUString aString( pBox->GetSelectEntry() ); pBox->Clear(); - pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_INVISIBLE) ); - pBox->InsertEntry( SVX_RESSTR(RID_SVXSTR_SOLID) ); + pBox->InsertEntry( SvxResId(RID_SVXSTR_INVISIBLE) ); + pBox->InsertEntry( SvxResId(RID_SVXSTR_SOLID) ); pBox->Fill( static_cast<const SvxDashListItem*>(pState)->GetDashList() ); pBox->SelectEntry( aString ); } @@ -276,7 +276,7 @@ SvxLineEndWindow::SvxLineEndWindow( svt::ToolboxController& rController, vcl::Wi mnLines ( 12 ), mrController ( rController ) { - SetText( SVX_RESSTR( RID_SVXSTR_LINEEND ) ); + SetText( SvxResId( RID_SVXSTR_LINEEND ) ); SetHelpId( HID_POPUP_LINEEND ); mpLineEndSet->SetHelpId( HID_POPUP_LINEEND_CTRL ); @@ -374,7 +374,7 @@ void SvxLineEndWindow::FillValueSet() // First entry: no line end. // An entry is temporarily added to get the UI bitmap basegfx::B2DPolyPolygon aNothing; - mpLineEndList->Insert(o3tl::make_unique<XLineEndEntry>(aNothing, SVX_RESSTR(RID_SVXSTR_NONE))); + mpLineEndList->Insert(o3tl::make_unique<XLineEndEntry>(aNothing, SvxResId(RID_SVXSTR_NONE))); const XLineEndEntry* pEntry = mpLineEndList->GetLineEnd(nCount); Bitmap aBmp = mpLineEndList->GetUiBitmap( nCount ); OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index a41c01027c31..a617fedb1013 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1015,7 +1015,7 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent&, event, { font.SetItalic( ITALIC_NONE ); SetControlFont( font ); - SetQuickHelpText( SVX_RESSTR( RID_SVXSTR_CHARFONTNAME )); + SetQuickHelpText( SvxResId( RID_SVXSTR_CHARFONTNAME )); } } else @@ -1024,7 +1024,7 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent&, event, { font.SetItalic( ITALIC_NORMAL ); SetControlFont( font ); - SetQuickHelpText( SVX_RESSTR( RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE )); + SetQuickHelpText( SvxResId( RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE )); } } } @@ -1286,17 +1286,17 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand, case SID_BACKGROUND_COLOR: case SID_ATTR_CHAR_BACK_COLOR: { - mpButtonAutoColor->SetText( SVX_RESSTR( RID_SVXSTR_NOFILL ) ); + mpButtonAutoColor->SetText( SvxResId( RID_SVXSTR_NOFILL ) ); break; } case SID_AUTHOR_COLOR: { - mpButtonAutoColor->SetText( SVX_RESSTR( RID_SVXSTR_BY_AUTHOR ) ); + mpButtonAutoColor->SetText( SvxResId( RID_SVXSTR_BY_AUTHOR ) ); break; } case SID_BMPMASK_COLOR: { - mpButtonAutoColor->SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) ); + mpButtonAutoColor->SetText( SvxResId( RID_SVXSTR_TRANSPARENT ) ); break; } case SID_ATTR_CHAR_COLOR: @@ -1405,15 +1405,15 @@ namespace case SID_BACKGROUND_COLOR: case SID_ATTR_CHAR_BACK_COLOR: aColor = COL_TRANSPARENT; - sColorName = SVX_RESSTR(RID_SVXSTR_NOFILL); + sColorName = SvxResId(RID_SVXSTR_NOFILL); break; case SID_AUTHOR_COLOR: aColor = COL_TRANSPARENT; - sColorName = SVX_RESSTR(RID_SVXSTR_BY_AUTHOR); + sColorName = SvxResId(RID_SVXSTR_BY_AUTHOR); break; case SID_BMPMASK_COLOR: aColor = COL_TRANSPARENT; - sColorName = SVX_RESSTR(RID_SVXSTR_TRANSPARENT); + sColorName = SvxResId(RID_SVXSTR_TRANSPARENT); break; case SID_ATTR_CHAR_COLOR: case SID_ATTR_CHAR_COLOR2: @@ -1429,7 +1429,7 @@ namespace NamedColor GetNoneColor() { - return std::make_pair(Color(COL_NONE_COLOR), SVX_RESSTR(RID_SVXSTR_NONE)); + return std::make_pair(Color(COL_NONE_COLOR), SvxResId(RID_SVXSTR_NONE)); } } @@ -1730,8 +1730,8 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl ( svt::ToolboxController& rController, CalcSizeValueSet(); SetHelpId( HID_POPUP_FRAME ); - SetText( SVX_RESSTR(RID_SVXSTR_FRAME) ); - aFrameSet->SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) ); + SetText( SvxResId(RID_SVXSTR_FRAME) ); + aFrameSet->SetAccessibleName( SvxResId(RID_SVXSTR_FRAME) ); aFrameSet->Show(); } @@ -2029,7 +2029,7 @@ SvxCurrencyList_Impl::SvxCurrencyList_Impl( } } m_pCurrencyLb->SetSelectHdl( LINK( this, SvxCurrencyList_Impl, SelectHdl ) ); - SetText( SVX_RESSTR( RID_SVXSTR_TBLAFMT_CURRENCY ) ); + SetText( SvxResId( RID_SVXSTR_TBLAFMT_CURRENCY ) ); if ( nSelectedPos >= 0 ) m_pCurrencyLb->SelectEntryPos( nSelectedPos ); m_pCurrencyLb->Show(); @@ -2060,7 +2060,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( svt::ToolboxController& rController, vcl SetOutputSizePixel( Size( 114, 144 ) ); m_aLineStyleLb->SetSourceUnit( FUNIT_TWIP ); - m_aLineStyleLb->SetNone( SVX_RESSTR(RID_SVXSTR_NONE) ); + m_aLineStyleLb->SetNone( SvxResId(RID_SVXSTR_NONE) ); m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::SOLID ), SvxBorderLineStyle::SOLID ); m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DOTTED ), SvxBorderLineStyle::DOTTED ); @@ -2093,7 +2093,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( svt::ToolboxController& rController, vcl m_aLineStyleLb->SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) ); SetHelpId( HID_POPUP_LINE ); - SetText( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) ); + SetText( SvxResId(RID_SVXSTR_FRAME_STYLE) ); m_aLineStyleLb->Show(); } @@ -2199,8 +2199,8 @@ struct SvxStyleToolBoxControl::Impl bool bSpecModeCalc; Impl() - :aClearForm ( SVX_RESSTR( RID_SVXSTR_CLEARFORM ) ) - ,aMore ( SVX_RESSTR( RID_SVXSTR_MORE_STYLES ) ) + :aClearForm ( SvxResId( RID_SVXSTR_CLEARFORM ) ) + ,aMore ( SvxResId( RID_SVXSTR_MORE_STYLES ) ) ,bSpecModeWriter ( false ) ,bSpecModeCalc ( false ) { diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index a3b2a06a2c61..90d104ae5e14 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -172,7 +172,7 @@ FindTextFieldControl::FindTextFieldControl( vcl::Window* pParent, WinBits nStyle m_xFrame(xFrame), m_xContext(xContext) { - SetPlaceholderText(SVX_RESSTR(RID_SVXSTR_FINDBAR_FIND)); + SetPlaceholderText(SvxResId(RID_SVXSTR_FINDBAR_FIND)); EnableAutocomplete(true, true); } @@ -821,7 +821,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL MatchCaseToolboxController::cr { ToolBox* pToolbar = static_cast<ToolBox*>(pParent.get()); m_pMatchCaseControl = VclPtr<CheckBox>::Create( pToolbar, 0 ); - m_pMatchCaseControl->SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_MATCHCASE ) ); + m_pMatchCaseControl->SetText( SvxResId( RID_SVXSTR_FINDBAR_MATCHCASE ) ); Size aSize( m_pMatchCaseControl->GetOptimalSize() ); m_pMatchCaseControl->SetSizePixel( aSize ); } @@ -940,7 +940,7 @@ css::uno::Reference< css::awt::XWindow > SAL_CALL SearchFormattedToolboxControll { ToolBox* pToolbar = static_cast<ToolBox*>(pParent.get()); m_pSearchFormattedControl = VclPtr<CheckBox>::Create( pToolbar, 0 ); - m_pSearchFormattedControl->SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_SEARCHFORMATTED ) ); + m_pSearchFormattedControl->SetText( SvxResId( RID_SVXSTR_FINDBAR_SEARCHFORMATTED ) ); Size aSize( m_pSearchFormattedControl->GetOptimalSize() ); m_pSearchFormattedControl->SetSizePixel( aSize ); } diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index 5dea6c528bd6..89b2a0fa7a10 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -69,7 +69,7 @@ ExtrusionBar::ExtrusionBar(SfxViewShell* pViewShell ) if( pViewShell ) SetPool(&pViewShell->GetPool()); - SetName(SVX_RESSTR(RID_SVX_EXTRUSION_BAR)); + SetName(SvxResId(RID_SVX_EXTRUSION_BAR)); } ExtrusionBar::~ExtrusionBar() @@ -541,7 +541,7 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rB { if( bUndo ) { - OUString aStr( SVX_RESSTR( nStrResId ) ); + OUString aStr( SvxResId( nStrResId ) ); pSdrView->BegUndo( aStr ); pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) ); } diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index ec473f4b5e9e..2a0cdc451ac9 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -190,7 +190,7 @@ FontworkBar::FontworkBar(SfxViewShell* pViewShell ) if( pViewShell ) SetPool(&pViewShell->GetPool()); - SetName( SVX_RESSTR( RID_SVX_FONTWORK_BAR )); + SetName( SvxResId( RID_SVX_FONTWORK_BAR )); } FontworkBar::~FontworkBar() @@ -451,7 +451,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi if( bUndo ) { - OUString aStr( SVX_RESSTR( RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE ) ); + OUString aStr( SvxResId( RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE ) ); pSdrView->BegUndo( aStr ); pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) ); } @@ -529,7 +529,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi const bool bUndo = pSdrView->IsUndoEnabled(); if( bUndo ) { - OUString aStr( SVX_RESSTR( nStrResId ) ); + OUString aStr( SvxResId( nStrResId ) ); pSdrView->BegUndo( aStr ); pSdrView->AddUndo( pSdrView->GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pObj ) ); } diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index f1ef61726f50..f0d5a1f4a686 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -1120,20 +1120,17 @@ bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount for( i = 0; i < nCount; i++ ) { sal_uInt16 nResId = (sal_uInt16)(nSourceResIds + i); - const ResId aRes( SVX_RES(nResId)); - const OUString aCompare( aRes.toString() ); + const OUString aCompare(SvxResId(nResId)); if( aShortString == aCompare ) { sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i); - ResId aNewRes( SVX_RES( nNewResId )); - rString = rString.replaceAt( 0, aShortString.getLength(), aNewRes.toString() ); + rString = rString.replaceAt( 0, aShortString.getLength(), SvxResId( nNewResId ) ); return true; } else if( rString == aCompare ) { sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i); - ResId aNewRes( SVX_RES( nNewResId )); - rString = aNewRes.toString(); + rString = SvxResId(nNewResId); return true; } } @@ -1258,10 +1255,10 @@ bool SvxUnoConvertResourceString( const sal_uInt16* pSourceResIds, const sal_uIn for(int i = 0; i < nCount; ++i ) { - OUString aStrDefName = SVX_RESSTR( pSourceResIds[i] ); + OUString aStrDefName = SvxResId( pSourceResIds[i] ); if( sStr == aStrDefName ) { - OUString aReplace = SVX_RESSTR( pDestResIds[i] ); + OUString aReplace = SvxResId( pDestResIds[i] ); rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace ); return true; } diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index eb8afb7d5532..9d34c7382900 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -168,8 +168,7 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u if (aUniqueName.isEmpty()) { sal_Int32 nUserIndex = 1; - const ResId aRes(SVX_RES(nPrefixResId)); - OUString aUser( aRes.toString() ); + OUString aUser(SvxResId(nPrefixResId)); aUser += " "; if( pDefaults.get() ) @@ -402,7 +401,7 @@ bool XLineStyleItem::GetPresentation } if ( nId ) - rText = SVX_RESSTR( nId ); + rText = SvxResId( nId ); return true; } @@ -1484,8 +1483,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const bool bFoundExisting = false; sal_Int32 nUserIndex = 1; - const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND)); - const OUString aUser( aRes.toString() ); + const OUString aUser(SvxResId(RID_SVXSTR_LINEEND)); if( pPool1 ) { @@ -1767,8 +1765,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const bool bFoundExisting = false; sal_Int32 nUserIndex = 1; - const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND)); - const OUString aUser( aRes.toString() ); + const OUString aUser(SvxResId(RID_SVXSTR_LINEEND)); if( pPool1 ) { @@ -2160,7 +2157,7 @@ bool XFillStyleItem::GetPresentation } if ( nId ) - rText = SVX_RESSTR( nId ); + rText = SvxResId( nId ); return true; } diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index d2460e16838e..f5116b0eef25 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -67,7 +67,7 @@ bool XLineTransparenceItem::GetPresentation switch ( ePres ) { case SfxItemPresentation::Complete: - rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": "; + rText = OUString( SvxResId(RID_SVXSTR_TRANSPARENCE) ) + ": "; SAL_FALLTHROUGH; case SfxItemPresentation::Nameless: rText += unicode::formatPercent(GetValue(), @@ -146,7 +146,7 @@ bool XLineJointItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*e } if( nId ) - rText = SVX_RESSTR( nId ); + rText = SvxResId( nId ); return true; } @@ -338,7 +338,7 @@ bool XLineCapItem::GetPresentation( SfxItemPresentation /*ePres*/, MapUnit /*eCo } if( nId ) - rText = SVX_RESSTR( nId ); + rText = SvxResId( nId ); return true; } @@ -425,7 +425,7 @@ bool XFillTransparenceItem::GetPresentation switch ( ePres ) { case SfxItemPresentation::Complete: - rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": "; + rText = SvxResId(RID_SVXSTR_TRANSPARENCE) + ": "; SAL_FALLTHROUGH; case SfxItemPresentation::Nameless: rText += unicode::formatPercent(GetValue(), diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index 50a9d02e14ee..cb83d76a9dbe 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -65,9 +65,9 @@ bool XColorList::Create() sal_uInt32 b(0); // <!-- Gray palette from white to black --> - const OUString aStrGrey( SVX_RESSTR( RID_SVXSTR_COLOR_GREY ) ); + const OUString aStrGrey( SvxResId( RID_SVXSTR_COLOR_GREY ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0xff, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_WHITE ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0xff, 0xff ), SvxResId( RID_SVXSTR_COLOR_WHITE ) ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0xee, 0xee, 0xee ), aStrGrey + " 1" ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0xdd, 0xdd, 0xdd ), aStrGrey + " 2" ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0xcc, 0xcc, 0xcc ), aStrGrey + " 3" ) ); @@ -78,24 +78,24 @@ bool XColorList::Create() Insert( o3tl::make_unique<XColorEntry>( Color( 0x33, 0x33, 0x33 ), aStrGrey + " 8" ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0x1c, 0x1c, 0x1c ), aStrGrey + " 9" ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0x11, 0x11, 0x11 ), aStrGrey + " 10") ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0x00, 0x00, 0x00 ), SVX_RESSTR( RID_SVXSTR_COLOR_BLACK ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0x00, 0x00, 0x00 ), SvxResId( RID_SVXSTR_COLOR_BLACK ) ) ); // <!-- Base colors step 0 to 10 --> const sal_uInt32 nNumColorsInGroup(12); const sal_uInt32 nNumGroups(11); const OUString aStrCol[nNumColorsInGroup] = { - SVX_RESSTR(RID_SVXSTR_COLOR_YELLOW), - SVX_RESSTR(RID_SVXSTR_COLOR_ORANGE), - SVX_RESSTR(RID_SVXSTR_COLOR_RED), - SVX_RESSTR(RID_SVXSTR_COLOR_PINK), - SVX_RESSTR(RID_SVXSTR_COLOR_MAGENTA), - SVX_RESSTR(RID_SVXSTR_COLOR_PURPLE), - SVX_RESSTR(RID_SVXSTR_COLOR_BLUE), - SVX_RESSTR(RID_SVXSTR_COLOR_SKYBLUE), - SVX_RESSTR(RID_SVXSTR_COLOR_CYAN), - SVX_RESSTR(RID_SVXSTR_COLOR_TURQUOISE), - SVX_RESSTR(RID_SVXSTR_COLOR_GREEN), - SVX_RESSTR(RID_SVXSTR_COLOR_YELLOWGREEN) }; + SvxResId(RID_SVXSTR_COLOR_YELLOW), + SvxResId(RID_SVXSTR_COLOR_ORANGE), + SvxResId(RID_SVXSTR_COLOR_RED), + SvxResId(RID_SVXSTR_COLOR_PINK), + SvxResId(RID_SVXSTR_COLOR_MAGENTA), + SvxResId(RID_SVXSTR_COLOR_PURPLE), + SvxResId(RID_SVXSTR_COLOR_BLUE), + SvxResId(RID_SVXSTR_COLOR_SKYBLUE), + SvxResId(RID_SVXSTR_COLOR_CYAN), + SvxResId(RID_SVXSTR_COLOR_TURQUOISE), + SvxResId(RID_SVXSTR_COLOR_GREEN), + SvxResId(RID_SVXSTR_COLOR_YELLOWGREEN) }; const sal_uInt32 aStdCol[nNumColorsInGroup * nNumGroups] = { 0xffff99, 0xff6600, 0xff3333, 0xff00cc, 0xff33ff, 0x9900ff, 0x6666ff, 0x00ccff, 0x66ffff, 0x33ff99, 0x99ff66, 0xccff00, 0xffff66, 0xffcc00, 0xff9999, 0xff66cc, 0xff99ff, 0xcc66ff, 0x9999ff, 0x9999ff, 0x99ffff, 0x66ff99, 0x99ff99, 0xccff66, @@ -123,20 +123,20 @@ bool XColorList::Create() } // <!-- use some 'nice' colors from original palette --> - Insert( o3tl::make_unique<XColorEntry>( Color( 0xe6, 0xe6, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_BLUEGREY) ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0xCF, 0xE7, 0xF5 ), SVX_RESSTR( RID_SVXSTR_COLOR_BLUE_CLASSIC ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0xe6, 0xe6, 0xff ), SvxResId( RID_SVXSTR_COLOR_BLUEGREY) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0xCF, 0xE7, 0xF5 ), SvxResId( RID_SVXSTR_COLOR_BLUE_CLASSIC ) ) ); // <!-- add 'pale' colors from original palette --> - Insert( o3tl::make_unique<XColorEntry>( Color( 0x99, 0x99, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_VIOLET ) ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0x99, 0x33, 0x66 ), SVX_RESSTR( RID_SVXSTR_COLOR_BORDEAUX ) ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0xff, 0xcc ), SVX_RESSTR( RID_SVXSTR_COLOR_PALE_YELLOW ) ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0xcc, 0xff, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_PALE_GREEN ) ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0x66, 0x00, 0x66 ), SVX_RESSTR( RID_SVXSTR_COLOR_DARKVIOLET ) ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0x80, 0x80 ), SVX_RESSTR( RID_SVXSTR_COLOR_SALMON ) ) ); - Insert( o3tl::make_unique<XColorEntry>( Color( 0x00, 0x66, 0xcc ), SVX_RESSTR( RID_SVXSTR_COLOR_SEABLUE ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0x99, 0x99, 0xff ), SvxResId( RID_SVXSTR_COLOR_VIOLET ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0x99, 0x33, 0x66 ), SvxResId( RID_SVXSTR_COLOR_BORDEAUX ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0xff, 0xcc ), SvxResId( RID_SVXSTR_COLOR_PALE_YELLOW ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0xcc, 0xff, 0xff ), SvxResId( RID_SVXSTR_COLOR_PALE_GREEN ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0x66, 0x00, 0x66 ), SvxResId( RID_SVXSTR_COLOR_DARKVIOLET ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0x80, 0x80 ), SvxResId( RID_SVXSTR_COLOR_SALMON ) ) ); + Insert( o3tl::make_unique<XColorEntry>( Color( 0x00, 0x66, 0xcc ), SvxResId( RID_SVXSTR_COLOR_SEABLUE ) ) ); // <!-- add Chart colors from original palette (also 12, coincidence?) --> - const OUString aStrChart( SVX_RESSTR( RID_SVXSTR_COLOR_CHART ) ); + const OUString aStrChart( SvxResId( RID_SVXSTR_COLOR_CHART ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0x00, 0x45, 0x86 ), aStrChart + " 1" ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0x42, 0x0e ), aStrChart + " 2" ) ); Insert( o3tl::make_unique<XColorEntry>( Color( 0xff, 0xd3, 0x20 ), aStrChart + " 3" ) ); diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index d2d309b9bd70..19c7cce2b1e0 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -66,7 +66,7 @@ uno::Reference< container::XNameContainer > XDashList::createInstance() bool XDashList::Create() { - const OUString aStr(SVX_RESSTR(RID_SVXSTR_LINESTYLE)); + const OUString aStr(SvxResId(RID_SVXSTR_LINESTYLE)); Insert(o3tl::make_unique<XDashEntry>(XDash(css::drawing::DashStyle_RECT,1, 50,1, 50, 50),aStr + " 1")); Insert(o3tl::make_unique<XDashEntry>(XDash(css::drawing::DashStyle_RECT,1,500,1,500,500),aStr + " 2")); @@ -199,7 +199,7 @@ OUString const & XDashList::GetStringForUiSolidLine() const { if(maStringSolidLine.isEmpty()) { - const_cast< XDashList* >(this)->maStringSolidLine = ResId(RID_SVXSTR_SOLID, DIALOG_MGR()).toString(); + const_cast< XDashList* >(this)->maStringSolidLine = SvxResId(RID_SVXSTR_SOLID); } return maStringSolidLine; @@ -211,7 +211,7 @@ OUString const & XDashList::GetStringForUiNoLine() const { // formerly was RID_SVXSTR_INVISIBLE, but to make equal // everywhere, use RID_SVXSTR_NONE - const_cast< XDashList* >(this)->maStringNoLine = ResId(RID_SVXSTR_NONE, DIALOG_MGR()).toString(); + const_cast< XDashList* >(this)->maStringNoLine = SvxResId(RID_SVXSTR_NONE); } return maStringNoLine; diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx index 4a21b58903e9..fc5518f4a3bc 100644 --- a/svx/source/xoutdev/xtabgrdt.cxx +++ b/svx/source/xoutdev/xtabgrdt.cxx @@ -65,7 +65,7 @@ uno::Reference< container::XNameContainer > XGradientList::createInstance() bool XGradientList::Create() { - rtl::OUStringBuffer aStr(SVX_RESSTR(RID_SVXSTR_GRADIENT)); + rtl::OUStringBuffer aStr(SvxResId(RID_SVXSTR_GRADIENT)); aStr.append(" 1"); sal_Int32 nLen = aStr.getLength() - 1; Insert(o3tl::make_unique<XGradientEntry>(XGradient(RGB_Color(COL_BLACK ),RGB_Color(COL_WHITE ),css::awt::GradientStyle_LINEAR , 0,10,10, 0,100,100),aStr.toString())); diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index 34438a4f1ea5..3979c8ce8ebb 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -63,7 +63,7 @@ uno::Reference< container::XNameContainer > XHatchList::createInstance() bool XHatchList::Create() { - OUStringBuffer aStr(SVX_RESSTR(RID_SVXSTR_HATCH)); + OUStringBuffer aStr(SvxResId(RID_SVXSTR_HATCH)); aStr.append(" 1"); sal_Int32 nLen = aStr.getLength() - 1; diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index ec94f1730bd1..f14cc81b565f 100644 --- a/svx/source/xoutdev/xtablend.cxx +++ b/svx/source/xoutdev/xtablend.cxx @@ -63,7 +63,7 @@ bool XLineEndList::Create() aTriangle.append(basegfx::B2DPoint(0.0, 30.0)); aTriangle.append(basegfx::B2DPoint(20.0, 30.0)); aTriangle.setClosed(true); - Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aTriangle), SVX_RESSTR( RID_SVXSTR_ARROW ) ) ); + Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aTriangle), SvxResId( RID_SVXSTR_ARROW ) ) ); basegfx::B2DPolygon aSquare; aSquare.append(basegfx::B2DPoint(0.0, 0.0)); @@ -71,10 +71,10 @@ bool XLineEndList::Create() aSquare.append(basegfx::B2DPoint(10.0, 10.0)); aSquare.append(basegfx::B2DPoint(0.0, 10.0)); aSquare.setClosed(true); - Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aSquare), SVX_RESSTR( RID_SVXSTR_SQUARE ) ) ); + Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aSquare), SvxResId( RID_SVXSTR_SQUARE ) ) ); basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 100.0)); - Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aCircle), SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) ); + Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aCircle), SvxResId( RID_SVXSTR_CIRCLE ) ) ); return true; } diff --git a/svx/source/xoutdev/xtabptrn.cxx b/svx/source/xoutdev/xtabptrn.cxx index f0c16f0e6909..12cb480e4f7c 100644 --- a/svx/source/xoutdev/xtabptrn.cxx +++ b/svx/source/xoutdev/xtabptrn.cxx @@ -47,7 +47,7 @@ uno::Reference< container::XNameContainer > XPatternList::createInstance() bool XPatternList::Create() { - OUStringBuffer aStr(SVX_RESSTR(RID_SVXSTR_PATTERN)); + OUStringBuffer aStr(SvxResId(RID_SVXSTR_PATTERN)); sal_uInt16 aArray[64]; Bitmap aBitmap; const sal_Int32 nLen(aStr.getLength() - 1); diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index 9c40203b5402..5ad4445bebdc 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_SW_INC_SWTYPES_HXX #define INCLUDED_SW_INC_SWTYPES_HXX #include <rtl/ustring.hxx> +#include <tools/resid.hxx> #include <tools/solar.h> #include <tools/mapunit.hxx> #include <SwGetPoolIdFromName.hxx> @@ -132,10 +133,12 @@ const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm #define INIT_SEQ_FLDTYPES 4 extern ResMgr* pSwResMgr; - // defined in sw/source/uibase/app/swmodule.cxx for the sw library and in - // sw/source/ui/dialog/swdialmgr.cxx for the swui library -#define SW_RES(i) ResId(i,*pSwResMgr) -#define SW_RESSTR(i) SW_RES(i).toString() +// defined in sw/source/uibase/app/swmodule.cxx for the sw library and in +// sw/source/ui/dialog/swdialmgr.cxx for the swui library +inline OUString SwResId(sal_uInt16 nId) +{ + return ResId(nId, *pSwResMgr); +} css::uno::Reference< css::linguistic2::XSpellChecker1 > GetSpellChecker(); css::uno::Reference< css::linguistic2::XHyphenator > GetHyphenator(); diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 4f728e38c36e..5bd02d5966ca 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -1415,7 +1415,7 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId, { SolarMutexGuard aGuard; - sStr = SW_RESSTR( nResId ); + sStr = SwResId( nResId ); } if( pArg1 ) diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index e3494ff9ef8b..d88d76272a56 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -3338,7 +3338,7 @@ OUString SwCursorShell::GetCursorDescr() const OUString aResult; if (IsMultiSelection()) - aResult += SW_RES(STR_MULTISEL); + aResult += SwResId(STR_MULTISEL); else aResult = SwDoc::GetPaMDescr(*GetCursor()); diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx index cfba274b6c94..d4ffd65bed88 100644 --- a/sw/source/core/crsr/findcoll.cxx +++ b/sw/source/core/crsr/findcoll.cxx @@ -77,7 +77,7 @@ sal_uLong SwCursor::Find( const SwTextFormatColl& rFormatColl, SwDocPositions nS { SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, rFormatColl.GetName()); - aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS)); + aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS)); aRewriter.AddRule(UndoArg3, pReplFormatColl->GetName()); pDoc->GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_REPLACE_STYLE, diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 7fa153a04e4d..65238ea36193 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -1646,13 +1646,13 @@ void DocumentFieldsManager::InitFieldTypes() // is being called by the CTO // MIB 14.04.95: In Sw3StringPool::Setup (sw3imp.cxx) and // lcl_sw3io_InSetExpField (sw3field.cxx) now also mpFieldTypes->push_back( new SwSetExpFieldType(&m_rDoc, - SW_RESSTR(STR_POOLCOLL_LABEL_ABB), nsSwGetSetExpType::GSE_SEQ) ); + SwResId(STR_POOLCOLL_LABEL_ABB), nsSwGetSetExpType::GSE_SEQ) ); mpFieldTypes->push_back( new SwSetExpFieldType(&m_rDoc, - SW_RESSTR(STR_POOLCOLL_LABEL_TABLE), nsSwGetSetExpType::GSE_SEQ) ); + SwResId(STR_POOLCOLL_LABEL_TABLE), nsSwGetSetExpType::GSE_SEQ) ); mpFieldTypes->push_back( new SwSetExpFieldType(&m_rDoc, - SW_RESSTR(STR_POOLCOLL_LABEL_FRAME), nsSwGetSetExpType::GSE_SEQ) ); + SwResId(STR_POOLCOLL_LABEL_FRAME), nsSwGetSetExpType::GSE_SEQ) ); mpFieldTypes->push_back( new SwSetExpFieldType(&m_rDoc, - SW_RESSTR(STR_POOLCOLL_LABEL_DRAWING), nsSwGetSetExpType::GSE_SEQ) ); + SwResId(STR_POOLCOLL_LABEL_DRAWING), nsSwGetSetExpType::GSE_SEQ) ); assert( mpFieldTypes->size() == INIT_FLDTYPES ); } diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index b9e6b39e5025..fd8e3c21488f 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -2198,7 +2198,7 @@ bool DocumentRedlineManager::AcceptRedline( const SwPaM& rPam, bool bCallDelete { SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, OUString::number(nRet)); - aTmpStr = aRewriter.Apply(OUString(SW_RES(STR_N_REDLINES))); + aTmpStr = aRewriter.Apply(SwResId(STR_N_REDLINES)); } SwRewriter aRewriter; @@ -2312,7 +2312,7 @@ bool DocumentRedlineManager::RejectRedline( const SwPaM& rPam, bool bCallDelete { SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, OUString::number(nRet)); - aTmpStr = aRewriter.Apply(OUString(SW_RES(STR_N_REDLINES))); + aTmpStr = aRewriter.Apply(SwResId(STR_N_REDLINES)); } SwRewriter aRewriter; diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 6cc69f7818ec..8ad76e78e847 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1688,16 +1688,16 @@ OUString SwDoc::GetPaMDescr(const SwPaM & rPam) const sal_Int32 nStart = rPam.Start()->nContent.GetIndex(); const sal_Int32 nEnd = rPam.End()->nContent.GetIndex(); - return SW_RESSTR(STR_START_QUOTE) + return SwResId(STR_START_QUOTE) + ShortenString(pTextNode->GetText().copy(nStart, nEnd - nStart), nUndoStringLength, - SW_RESSTR(STR_LDOTS)) - + SW_RESSTR(STR_END_QUOTE); + SwResId(STR_LDOTS)) + + SwResId(STR_END_QUOTE); } } else { - return SW_RESSTR(STR_PARAGRAPHS); + return SwResId(STR_PARAGRAPHS); } return OUString("??"); diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 9c11f2ae2f0b..afaf60bfa94d 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -2224,7 +2224,7 @@ OUString SwDoc::GetUniqueNumRuleName( const OUString* pChkStr, bool bAutoNum ) c else { pChkStr = nullptr; - aName = SW_RESSTR( STR_NUMRULE_DEFNAME ); + aName = SwResId( STR_NUMRULE_DEFNAME ); } sal_uInt16 nNum(0), nTmp, nFlagSize = ( mpNumRuleTable->size() / 8 ) +2; diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 0490bd63ff7e..2a2272dc1fcf 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -976,7 +976,7 @@ void SwRedlineData::SetExtraData( const SwRedlineExtraData* pData ) OUString SwRedlineData::GetDescr() const { - return SW_RES(STR_REDLINE_INSERT + GetType()); + return SwResId(STR_REDLINE_INSERT + GetType()); } sal_uInt32 SwRangeRedline::m_nLastId = 1; @@ -1761,9 +1761,9 @@ OUString SwRangeRedline::GetDescr() } // replace $1 in description by description of the redlines text - const OUString aTmpStr = SW_RESSTR(STR_START_QUOTE) - + ShortenString(pPaM->GetText(), nUndoStringLength, SW_RESSTR(STR_LDOTS)) - + SW_RESSTR(STR_END_QUOTE); + const OUString aTmpStr = SwResId(STR_START_QUOTE) + + ShortenString(pPaM->GetText(), nUndoStringLength, SwResId(STR_LDOTS)) + + SwResId(STR_END_QUOTE); SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, aTmpStr); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 75cb237c5f36..87a7b43c9055 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -975,7 +975,7 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr nResId = STR_COMCORE_READERROR; } if ( nResId ) - aText = SW_RESSTR( nResId ); + aText = SwResId( nResId ); ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, true ); } diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index d19f7eac6545..2f9fde22e263 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -124,7 +124,7 @@ long SwEditShell::Delete() if( bUndo ) // more than one selection? { SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_MULTISEL)); + aRewriter.AddRule(UndoArg1, SwResId(STR_MULTISEL)); GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::DELETE, &aRewriter); } diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index f217f00467a0..6b458fe418c7 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -593,7 +593,7 @@ void SwAuthorityField::SetPar1(const OUString& rStr) OUString SwAuthorityField::GetDescription() const { - return SW_RES(STR_AUTHORITY_ENTRY); + return SwResId(STR_AUTHORITY_ENTRY); } const char* const aFieldNames[] = diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 38cc39218c16..a3ec6e1034ec 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1671,7 +1671,7 @@ OUString SwPostItField::Expand() const OUString SwPostItField::GetDescription() const { - return SW_RES(STR_NOTE); + return SwResId(STR_NOTE); } SwField* SwPostItField::Copy() const diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 4dcb10a43843..4a7ff47dd136 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -743,7 +743,7 @@ OUString SwFormulaField::GetExpandedFormula() const OUString SwField::GetDescription() const { - return SW_RES(STR_FIELD); + return SwResId(STR_FIELD); } bool SwField::IsClickable() const diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 4dc9f4eacb4a..6d5367f88004 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -213,7 +213,7 @@ SwGetRefField::~SwGetRefField() OUString SwGetRefField::GetDescription() const { - return SW_RES(STR_REFERENCE); + return SwResId(STR_REFERENCE); } sal_uInt16 SwGetRefField::GetSubType() const @@ -773,7 +773,7 @@ void SwGetRefField::ConvertProgrammaticToUIName() break; } if( nResId != USHRT_MAX ) - SetPar1(SW_RESSTR( nResId )); + SetPar1(SwResId( nResId )); } } } diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx index 8585d8b2bdc2..b31e2705d9bc 100644 --- a/sw/source/core/fields/scrptfld.cxx +++ b/sw/source/core/fields/scrptfld.cxx @@ -43,7 +43,7 @@ SwScriptField::SwScriptField( SwScriptFieldType* pInitType, OUString SwScriptField::GetDescription() const { - return SW_RES(STR_SCRIPT); + return SwResId(STR_SCRIPT); } OUString SwScriptField::Expand() const diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index edf4cb9dff26..aa9ee085049b 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -117,7 +117,7 @@ namespace { if( pLineEndList.is() ) { - OUString aArrowName( SVX_RES(nResId) ); + OUString aArrowName( SvxResId(nResId) ); long nCount = pLineEndList->Count(); long nIndex; for( nIndex = 0L; nIndex < nCount; nIndex++ ) @@ -955,9 +955,9 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlot case SID_LINE_ARROWS: { // connector with arrow ends - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineStartWidthItem(nWidth)); - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -967,7 +967,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlot case SID_LINE_ARROW_SQUARE: { // connector with arrow start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; @@ -977,7 +977,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlot case SID_LINE_SQUARE_ARROW: { // connector with arrow end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW), aArrow)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW), aArrow)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -989,7 +989,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlot case SID_LINE_ARROW_CIRCLE: { // circle end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -997,7 +997,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlot case SID_LINE_CIRCLE_ARROW: { // circle start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_CIRCLE), aCircle)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_CIRCLE), aCircle)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; @@ -1005,7 +1005,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlot case SID_LINE_ARROW_SQUARE: { // square end - rAttr.Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_SQUARE), aSquare)); + rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_SQUARE), aSquare)); rAttr.Put(XLineEndWidthItem(nWidth)); } break; @@ -1013,7 +1013,7 @@ void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject* pObj, sal_uInt16 nSlot case SID_LINE_SQUARE_ARROW: { // square start - rAttr.Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_SQUARE), aSquare)); + rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_SQUARE), aSquare)); rAttr.Put(XLineStartWidthItem(nWidth)); } break; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index e135c78f9c13..2f6516d4f22a 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2794,7 +2794,7 @@ void SwFrameFormat::SetPositionLayoutDir( const sal_Int16 ) OUString SwFrameFormat::GetDescription() const { - return SW_RES(STR_FRAME); + return SwResId(STR_FRAME); } void SwFrameFormat::dumpAsXml(xmlTextWriterPtr pWriter) const @@ -3368,7 +3368,7 @@ OUString SwDrawFrameFormat::GetDescription() const aResult = m_sSdrObjectCachedComment; } else - aResult = SW_RESSTR(STR_GRAPHIC); + aResult = SwResId(STR_GRAPHIC); return aResult; } diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index 7ce20eadb2cf..a122bd5958d1 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -364,7 +364,7 @@ SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName) for( sal_Int32 i = RC_POOLPAGEDESC_BEGIN; i <= STR_POOLPAGE_LANDSCAPE; ++i) { - if (rName==SW_RESSTR(i)) + if (rName==SwResId(i)) { return rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( static_cast< sal_uInt16 >( i - RC_POOLPAGEDESC_BEGIN + RES_POOLPAGE_BEGIN) ); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 61ffad926305..1dca9545f9d6 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3467,7 +3467,7 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, const vcl::Font aOldFont( pSh->GetOut()->GetFont() ); pSh->GetOut()->SetFont( rEmptyPageFont ); - pSh->GetOut()->DrawText( aEmptyPageRect.SVRect(), SW_RESSTR( STR_EMPTYPAGE ), + pSh->GetOut()->DrawText( aEmptyPageRect.SVRect(), SwResId( STR_EMPTYPAGE ), DrawTextFlags::VCenter | DrawTextFlags::Center | DrawTextFlags::Clip ); @@ -3822,7 +3822,7 @@ void SwColumnFrame::PaintBreak( ) const aSeq.resize( aSeq.size( ) + 1 ); // Add the text above - OUString aBreakText = SW_RESSTR(STR_COLUMN_BREAK); + OUString aBreakText = SwResId(STR_COLUMN_BREAK); basegfx::B2DVector aFontSize; OutputDevice* pOut = gProp.pSGlobalShell->GetOut(); diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 154b7105e1c2..aa7449a6a1ec 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -1000,12 +1000,12 @@ OUString SwOLEObj::GetDescription() SvGlobalName aClassID( xEmbObj->getClassID() ); if ( SotExchange::IsMath( aClassID ) ) - return SW_RESSTR(STR_MATH_FORMULA); + return SwResId(STR_MATH_FORMULA); if ( SotExchange::IsChart( aClassID ) ) - return SW_RESSTR(STR_CHART); + return SwResId(STR_CHART); - return SW_RESSTR(STR_OLE); + return SwResId(STR_OLE); } drawinglayer::primitive2d::Primitive2DContainer const & SwOLEObj::tryToGetChartContentAsPrimitive2DSequence( diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index e53f07aa1ee6..b6baa1366d96 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -245,7 +245,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# if (TOX_CONTENT == m_eType || TOX_ILLUSTRATIONS == m_eType ) { SwFormToken aLinkStt (TOKEN_LINK_START); - aLinkStt.sCharStyleName = SW_RES(STR_POOLCHR_TOXJUMP); + aLinkStt.sCharStyleName = SwResId(STR_POOLCHR_TOXJUMP); aTokens.push_back(aLinkStt); } @@ -273,7 +273,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# if (TOX_CONTENT == m_eType || TOX_ILLUSTRATIONS == m_eType) aTokens.push_back(SwFormToken(TOKEN_LINK_END)); - SetTemplate( 0, SW_RESSTR( nPoolId++ )); + SetTemplate( 0, SwResId( nPoolId++ )); if(TOX_INDEX == m_eType) { @@ -286,12 +286,12 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# aTmpTokens.push_back(aTmpToken); SetPattern( i, aTmpTokens ); - SetTemplate( i, SW_RESSTR( STR_POOLCOLL_TOX_IDXBREAK )); + SetTemplate( i, SwResId( STR_POOLCOLL_TOX_IDXBREAK )); } else { SetPattern( i, aTokens ); - SetTemplate( i, SW_RESSTR( STR_POOLCOLL_TOX_IDX1 + i - 2 )); + SetTemplate( i, SwResId( STR_POOLCOLL_TOX_IDX1 + i - 2 )); } } } @@ -313,7 +313,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# nPoolId = STR_POOLCOLL_TOX_USER6; else if( TOX_AUTHORITIES == m_eType ) nPoolId = STR_POOLCOLL_TOX_AUTHORITIES1; - SetTemplate( i, SW_RESSTR( nPoolId ) ); + SetTemplate( i, SwResId( nPoolId ) ); } } diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index c8f1a3592fcd..2a5d0b5d5b54 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -523,7 +523,7 @@ TextAndReading SwTOXPara::GetText_Impl() const : SwTOXElement::Graphic == eType ? STR_GRAPHIC_DEFNAME : STR_FRAME_DEFNAME; - return TextAndReading(SW_RESSTR( nId ), OUString()); + return TextAndReading(SwResId( nId ), OUString()); } break; default: break; @@ -633,7 +633,7 @@ TextAndReading SwTOXTable::GetText_Impl() const } OSL_ENSURE( false, "Where's my table?" ); - return TextAndReading(SW_RESSTR( STR_TABLE_DEFNAME ), OUString()); + return TextAndReading(SwResId( STR_TABLE_DEFNAME ), OUString()); } sal_uInt16 SwTOXTable::GetLevel() const diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 8b0b6c960c75..8617a3b80db4 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -81,7 +81,7 @@ long EvalGridWidthAdd( const SwTextGridItem *const pGrid, const SwDrawTextInfo & SwDocShell* pDocShell = rInf.GetShell()->GetDoc()->GetDocShell(); SfxStyleSheetBasePool* pBasePool = pDocShell->GetStyleSheetPool(); - OUString sString(SW_RESSTR(STR_POOLCOLL_STANDARD)); + OUString sString(SwResId(STR_POOLCOLL_STANDARD)); SfxStyleSheetBase* pStyle = pBasePool->Find(sString, SfxStyleFamily::Para); SfxItemSet& aTmpSet = pStyle->GetItemSet(); diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index 773fe42295cc..aa599a7258cc 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -184,7 +184,7 @@ SwRewriter SwUndoRenameFormat::GetRewriter() const SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, sOldName); - aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS)); + aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS)); aRewriter.AddRule(UndoArg3, sNewName); return aRewriter; @@ -460,7 +460,7 @@ SwRewriter SwUndoNumruleRename::GetRewriter() const SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, aOldName); - aRewriter.AddRule(UndoArg2, SW_RESSTR(STR_YIELDS)); + aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS)); aRewriter.AddRule(UndoArg3, aNewName); return aRewriter; diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index 258eb5e4ac03..1b847bd2a336 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -364,7 +364,7 @@ SwRewriter SwUndoPageDesc::GetRewriter() const SwRewriter aResult; aResult.AddRule(UndoArg1, aOld.GetName()); - aResult.AddRule(UndoArg2, SW_RESSTR(STR_YIELDS)); + aResult.AddRule(UndoArg2, SwResId(STR_YIELDS)); aResult.AddRule(UndoArg3, aNew.GetName()); return aResult; diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index a9f107cb1170..63cff9f61230 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -276,7 +276,7 @@ UndoManager::StartUndo(SwUndoId const i_eUndoId, assert(SwUndoId::END != eUndoId); OUString comment( (SwUndoId::START == eUndoId) ? OUString("??") - : OUString(SW_RES(UNDO_BASE + (int)eUndoId)) ); + : SwResId(UNDO_BASE + (int)eUndoId) ); if (pRewriter) { assert(SwUndoId::START != eUndoId); @@ -324,7 +324,7 @@ UndoManager::EndUndo(SwUndoId eUndoId, SwRewriter const*const pRewriter) OSL_ENSURE((SwUndoId)pListAction->GetId() == eUndoId, "EndUndo(): given ID different from StartUndo()"); // comment set by caller of EndUndo - OUString comment = SW_RES(UNDO_BASE + (int)eUndoId); + OUString comment = SwResId(UNDO_BASE + (int)eUndoId); if (pRewriter) { comment = pRewriter->Apply(comment); diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 93c25f85bc5c..1ac8829b1bf9 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -115,13 +115,13 @@ OUString SwHistorySetFormat::GetDescription() const case SvxBreak::PageBefore: case SvxBreak::PageAfter: case SvxBreak::PageBoth: - aResult = SW_RESSTR(STR_UNDO_PAGEBREAKS); + aResult = SwResId(STR_UNDO_PAGEBREAKS); break; case SvxBreak::ColumnBefore: case SvxBreak::ColumnAfter: case SvxBreak::ColumnBoth: - aResult = SW_RESSTR(STR_UNDO_COLBRKS); + aResult = SwResId(STR_UNDO_COLBRKS); break; default: @@ -449,7 +449,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( const SwTextFootnote &rTextFootnote OUString SwHistorySetFootnote::GetDescription() const { - return SW_RES(STR_FOOTNOTE); + return SwResId(STR_FOOTNOTE); } SwHistorySetFootnote::~SwHistorySetFootnote() diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index d30d78e82dd0..7308e998070b 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -114,8 +114,8 @@ SwUndoRenameBookmark::~SwUndoRenameBookmark() static OUString lcl_QuoteName(const OUString& rName) { - static const OUString sStart = SW_RES(STR_START_QUOTE); - static const OUString sEnd = SW_RES(STR_END_QUOTE); + static const OUString sStart = SwResId(STR_START_QUOTE); + static const OUString sEnd = SwResId(STR_END_QUOTE); return sStart + rName + sEnd; } @@ -123,7 +123,7 @@ SwRewriter SwUndoRenameBookmark::GetRewriter() const { SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, lcl_QuoteName(m_sOldName)); - aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS)); + aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS)); aRewriter.AddRule(UndoArg3, lcl_QuoteName(m_sNewName)); return aRewriter; } diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 565405c1bcab..dfae9e8e779a 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -550,7 +550,7 @@ static SwRewriter lcl_RewriterFromHistory(SwHistory & rHistory) if (! bDone) { - aRewriter.AddRule(UndoArg2, SW_RESSTR(STR_FIELD)); + aRewriter.AddRule(UndoArg2, SwResId(STR_FIELD)); } return aRewriter; @@ -585,11 +585,11 @@ static OUString lcl_DenotedPortion(const OUString& rStr, sal_Int32 nStart, sal_I switch(cLast) { case CH_TXTATR_TAB: - aResult = SW_RESSTR(STR_UNDO_TABS); + aResult = SwResId(STR_UNDO_TABS); break; case CH_TXTATR_NEWLINE: - aResult = SW_RESSTR(STR_UNDO_NLS); + aResult = SwResId(STR_UNDO_NLS); break; @@ -606,9 +606,9 @@ static OUString lcl_DenotedPortion(const OUString& rStr, sal_Int32 nStart, sal_I } else { - aResult = SW_RESSTR(STR_START_QUOTE); + aResult = SwResId(STR_START_QUOTE); aResult += rStr.copy(nStart, nEnd - nStart); - aResult += SW_RESSTR(STR_END_QUOTE); + aResult += SwResId(STR_END_QUOTE); } } @@ -668,15 +668,15 @@ SwRewriter SwUndoDelete::GetRewriter() const { SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_START_QUOTE)); + aRewriter.AddRule(UndoArg1, SwResId(STR_START_QUOTE)); aRewriter.AddRule(UndoArg2, m_sTableName); - aRewriter.AddRule(UndoArg3, SW_RESSTR(STR_END_QUOTE)); + aRewriter.AddRule(UndoArg3, SwResId(STR_END_QUOTE)); - OUString sTmp = aRewriter.Apply(SW_RES(STR_TABLE_NAME)); + OUString sTmp = aRewriter.Apply(SwResId(STR_TABLE_NAME)); aResult.AddRule(UndoArg1, sTmp); } else - aResult.AddRule(UndoArg1, SW_RESSTR(STR_PARAGRAPHS)); + aResult.AddRule(UndoArg1, SwResId(STR_PARAGRAPHS)); } else { @@ -685,7 +685,7 @@ SwRewriter SwUndoDelete::GetRewriter() const if (m_pSttStr != nullptr && m_pEndStr != nullptr && m_pSttStr->isEmpty() && m_pEndStr->isEmpty()) { - aStr = SW_RESSTR(STR_PARAGRAPH_UNDO); + aStr = SwResId(STR_PARAGRAPH_UNDO); } else { @@ -705,7 +705,7 @@ SwRewriter SwUndoDelete::GetRewriter() const } } - aStr = ShortenString(aStr, nUndoStringLength, OUString(SW_RES(STR_LDOTS))); + aStr = ShortenString(aStr, nUndoStringLength, SwResId(STR_LDOTS)); if (pHistory) { SwRewriter aRewriter = lcl_RewriterFromHistory(*pHistory); diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 2ad6df159422..4b178c130776 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -271,7 +271,7 @@ OUString SwUndo::GetComment() const { if (! pComment) { - pComment.reset( new OUString(SW_RES(UNDO_BASE + (int)GetId())) ); + pComment.reset( new OUString(SwResId(UNDO_BASE + (int)GetId())) ); SwRewriter aRewriter = GetRewriter(); @@ -282,7 +282,7 @@ OUString SwUndo::GetComment() const } else { - aResult = SW_RES(UNDO_BASE + (int)GetId()); + aResult = SwResId(UNDO_BASE + (int)GetId()); SwRewriter aRewriter = GetRewriter(); diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 78528a4a7f31..b407bbd69491 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -468,7 +468,7 @@ SwRewriter SwUndoInsert::GetRewriter() const { OUString aString = ShortenString(DenoteSpecialCharacters(*pStr), nUndoStringLength, - OUString(SW_RES(STR_LDOTS))); + SwResId(STR_LDOTS)); aResult.AddRule(UndoArg1, aString); @@ -541,13 +541,13 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences, if (1 < occurrences) { aResult.AddRule(UndoArg1, OUString::number(occurrences)); - aResult.AddRule(UndoArg2, OUString(SW_RES(STR_OCCURRENCES_OF))); + aResult.AddRule(UndoArg2, SwResId(STR_OCCURRENCES_OF)); OUString aTmpStr; - aTmpStr += SW_RES(STR_START_QUOTE); + aTmpStr += SwResId(STR_START_QUOTE); aTmpStr += ShortenString(sOld, nUndoStringLength, - SW_RES(STR_LDOTS)); - aTmpStr += SW_RES(STR_END_QUOTE); + SwResId(STR_LDOTS)); + aTmpStr += SwResId(STR_END_QUOTE); aResult.AddRule(UndoArg3, aTmpStr); } else if (1 == occurrences) @@ -555,24 +555,24 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences, { OUString aTmpStr; - aTmpStr += SW_RES(STR_START_QUOTE); + aTmpStr += SwResId(STR_START_QUOTE); // #i33488 # aTmpStr += ShortenString(sOld, nUndoStringLength, - SW_RES(STR_LDOTS)); - aTmpStr += SW_RES(STR_END_QUOTE); + SwResId(STR_LDOTS)); + aTmpStr += SwResId(STR_END_QUOTE); aResult.AddRule(UndoArg1, aTmpStr); } - aResult.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); + aResult.AddRule(UndoArg2, SwResId(STR_YIELDS)); { OUString aTmpStr; - aTmpStr += SW_RES(STR_START_QUOTE); + aTmpStr += SwResId(STR_START_QUOTE); // #i33488 # aTmpStr += ShortenString(sNew, nUndoStringLength, - SW_RES(STR_LDOTS)); - aTmpStr += SW_RES(STR_END_QUOTE); + SwResId(STR_LDOTS)); + aTmpStr += SwResId(STR_END_QUOTE); aResult.AddRule(UndoArg3, aTmpStr); } } @@ -1031,10 +1031,10 @@ SwRewriter SwUndoInsertLabel::CreateRewriter(const OUString &rStr) if (!rStr.isEmpty()) { - aTmpStr += SW_RES(STR_START_QUOTE); + aTmpStr += SwResId(STR_START_QUOTE); aTmpStr += ShortenString(rStr, nUndoStringLength, - OUString(SW_RES(STR_LDOTS))); - aTmpStr += SW_RES(STR_END_QUOTE); + SwResId(STR_LDOTS)); + aTmpStr += SwResId(STR_END_QUOTE); } aRewriter.AddRule(UndoArg1, aTmpStr); diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index b73bc2a150f1..fe420faec1f6 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -311,10 +311,10 @@ SwRewriter SwUndoOverwrite::GetRewriter() const OUString aString; - aString += SW_RES(STR_START_QUOTE); + aString += SwResId(STR_START_QUOTE); aString += ShortenString(aInsStr, nUndoStringLength, - OUString(SW_RES(STR_LDOTS))); - aString += SW_RES(STR_END_QUOTE); + SwResId(STR_LDOTS)); + aString += SwResId(STR_END_QUOTE); aResult.AddRule(UndoArg1, aString); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 7d6c81349aa0..f2c01ae7bd55 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -347,9 +347,9 @@ SwRewriter SwUndoInsTable::GetRewriter() const { SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RES(STR_START_QUOTE)); + aRewriter.AddRule(UndoArg1, SwResId(STR_START_QUOTE)); aRewriter.AddRule(UndoArg2, sTableNm); - aRewriter.AddRule(UndoArg3, SW_RES(STR_END_QUOTE)); + aRewriter.AddRule(UndoArg3, SwResId(STR_END_QUOTE)); return aRewriter; } diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index a5589b23885e..85bfea52418c 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -1860,8 +1860,8 @@ SwChartDataSequence::SwChartDataSequence( SwClient( &rTableFormat ), m_aEvtListeners( GetChartMutex() ), m_aModifyListeners( GetChartMutex() ), - m_aRowLabelText( SW_RES( STR_CHART2_ROW_LABEL_TEXT ) ), - m_aColLabelText( SW_RES( STR_CHART2_COL_LABEL_TEXT ) ), + m_aRowLabelText( SwResId( STR_CHART2_ROW_LABEL_TEXT ) ), + m_aColLabelText( SwResId( STR_CHART2_COL_LABEL_TEXT ) ), m_xDataProvider( &rProvider ), m_pTableCursor( pTableCursor ), m_pPropSet( aSwMapProvider.GetPropertySet( PROPERTY_MAP_CHART2_DATA_SEQUENCE ) ) @@ -1907,8 +1907,8 @@ SwChartDataSequence::SwChartDataSequence( const SwChartDataSequence &rObj ) : m_aEvtListeners( GetChartMutex() ), m_aModifyListeners( GetChartMutex() ), m_aRole( rObj.m_aRole ), - m_aRowLabelText( SW_RES(STR_CHART2_ROW_LABEL_TEXT) ), - m_aColLabelText( SW_RES(STR_CHART2_COL_LABEL_TEXT) ), + m_aRowLabelText( SwResId(STR_CHART2_ROW_LABEL_TEXT) ), + m_aColLabelText( SwResId(STR_CHART2_COL_LABEL_TEXT) ), m_xDataProvider( rObj.m_xDataProvider ), m_pTableCursor( rObj.m_pTableCursor ), m_pPropSet( rObj.m_pPropSet ) diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 90b75e4f3af3..dff3a9a53971 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -636,10 +636,10 @@ void SAL_CALL SwXFieldMaster::setPropertyValue( if(pType2 || (SwFieldIds::SetExp == m_pImpl->m_nResTypeId && - ( sTypeName == SW_RESSTR(STR_POOLCOLL_LABEL_TABLE) || - sTypeName == SW_RESSTR(STR_POOLCOLL_LABEL_DRAWING) || - sTypeName == SW_RESSTR(STR_POOLCOLL_LABEL_FRAME) || - sTypeName == SW_RESSTR(STR_POOLCOLL_LABEL_ABB) ))) + ( sTypeName == SwResId(STR_POOLCOLL_LABEL_TABLE) || + sTypeName == SwResId(STR_POOLCOLL_LABEL_DRAWING) || + sTypeName == SwResId(STR_POOLCOLL_LABEL_FRAME) || + sTypeName == SwResId(STR_POOLCOLL_LABEL_ABB) ))) { throw lang::IllegalArgumentException(); } diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 4b595d814ac0..80268724eb62 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -194,7 +194,7 @@ static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue) aValue >>= uTmp; OUString sCharFormat; SwStyleNameMapper::FillUIName(uTmp, sCharFormat, SwGetPoolIdFromName::ChrFmt, true); - if (sCharFormat != SW_RESSTR(STR_POOLCOLL_STANDARD)) + if (sCharFormat != SwResId(STR_POOLCOLL_STANDARD)) { pRet = pDoc->FindCharFormatByName( sCharFormat ); } @@ -1295,7 +1295,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex( if (pDocShell) // -> Chapter Numbering { // template name - OUString sValue(SW_RES(STR_POOLCOLL_HEADLINE1 + nIndex)); + OUString sValue(SwResId(STR_POOLCOLL_HEADLINE1 + nIndex)); const SwTextFormatColls* pColls = pDocShell->GetDoc()->GetTextFormatColls(); const size_t nCount = pColls->size(); for(size_t i = 0; i < nCount; ++i) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 3f5175724ce9..7d83d0b147f4 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1045,7 +1045,7 @@ uno::Any SAL_CALL XStyleFamily::getPropertyValue( const OUString& sPropertyName if(sPropertyName != "DisplayName") throw beans::UnknownPropertyException( "unknown property: " + sPropertyName, static_cast<OWeakObject *>(this) ); SolarMutexGuard aGuard; - return uno::makeAny(SW_RESSTR(m_rEntry.m_nResId)); + return uno::makeAny(SwResId(m_rEntry.m_nResId)); } @@ -1527,7 +1527,7 @@ const SwPageDesc* SwStyleBase_Impl::GetOldPageDesc() { for(sal_uInt16 i = RC_POOLPAGEDESC_BEGIN; i <= STR_POOLPAGE_LANDSCAPE; ++i) { - if(SW_RESSTR(i) == m_rStyleName) + if(SwResId(i) == m_rStyleName) { m_pOldPageDesc = m_rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( static_cast<sal_uInt16>(RES_POOLPAGE_BEGIN + i - RC_POOLPAGEDESC_BEGIN)); break; diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 272ce8955a6c..e6801bb79984 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -1096,7 +1096,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: // paint empty page text vcl::Font aOldFont( pOutputDev->GetFont() ); pOutputDev->SetFont( rEmptyPgFont ); - pOutputDev->DrawText( aPageRect, SW_RESSTR( STR_EMPTYPAGE ), + pOutputDev->DrawText( aPageRect, SwResId( STR_EMPTYPAGE ), DrawTextFlags::VCenter | DrawTextFlags::Center | DrawTextFlags::Clip ); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index b238094e2cdc..ff77f21dbd01 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -184,23 +184,23 @@ SwPrintUIOptions::SwPrintUIOptions( // create "writer" section (new tab page in dialog) SvtModuleOptions aModOpt; - OUString aAppGroupname( SW_RES( STR_PRINTOPTUI_PRODUCTNAME) ); + OUString aAppGroupname( SwResId( STR_PRINTOPTUI_PRODUCTNAME) ); aAppGroupname = aAppGroupname.replaceFirst( "%s", aModOpt.GetModuleName( SvtModuleOptions::EModule::WRITER ) ); m_aUIProperties[ nIdx++ ].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage"); // create sub section for Contents - m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("contents", SW_RES( STR_PRINTOPTUI_CONTENTS), OUString()); + m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("contents", SwResId( STR_PRINTOPTUI_CONTENTS), OUString()); // create a bool option for background bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground(); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pagebackground", SW_RES( STR_PRINTOPTUI_PAGE_BACKGROUND), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pagebackground", SwResId( STR_PRINTOPTUI_PAGE_BACKGROUND), ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox", "PrintPageBackground", bDefaultVal); // create a bool option for pictures/graphics AND OLE and drawing objects as well bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw(); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pictures", SW_RES( STR_PRINTOPTUI_PICTURES), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pictures", SwResId( STR_PRINTOPTUI_PICTURES), ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox", "PrintPicturesAndObjects", bDefaultVal); @@ -208,14 +208,14 @@ SwPrintUIOptions::SwPrintUIOptions( { // create a bool option for hidden text bDefaultVal = rDefaultPrintData.IsPrintHiddenText(); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("hiddentext", SW_RES( STR_PRINTOPTUI_HIDDEN), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("hiddentext", SwResId( STR_PRINTOPTUI_HIDDEN), ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox", "PrintHiddenText", bDefaultVal); // create a bool option for place holder bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder(); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("placeholders", SW_RES( STR_PRINTOPTUI_TEXT_PLACEHOLDERS), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("placeholders", SwResId( STR_PRINTOPTUI_TEXT_PLACEHOLDERS), ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox", "PrintTextPlaceholder", bDefaultVal); @@ -223,17 +223,17 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for controls bDefaultVal = rDefaultPrintData.IsPrintControl(); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("formcontrols", SW_RES( STR_PRINTOPTUI_FORM_CONTROLS), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("formcontrols", SwResId( STR_PRINTOPTUI_FORM_CONTROLS), ".HelpID:vcl:PrintDialog:PrintControls:CheckBox", "PrintControls", bDefaultVal); // create sub section for Color - m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("color", SW_RES( STR_PRINTOPTUI_COLOR), OUString()); + m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("color", SwResId( STR_PRINTOPTUI_COLOR), OUString()); // create a bool option for printing text with black font color bDefaultVal = rDefaultPrintData.IsPrintBlackFont(); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("textinblack", SW_RES( STR_PRINTOPTUI_PRINT_BLACK), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("textinblack", SwResId( STR_PRINTOPTUI_PRINT_BLACK), ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox", "PrintBlackFonts", bDefaultVal); @@ -241,11 +241,11 @@ SwPrintUIOptions::SwPrintUIOptions( if (!bWeb) { // create subgroup for misc options - m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("pages", SW_RES( STR_PRINTOPTUI_PAGES_TEXT), OUString()); + m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("pages", SwResId( STR_PRINTOPTUI_PAGES_TEXT), OUString()); // create a bool option for printing automatically inserted blank pages bDefaultVal = rDefaultPrintData.IsPrintEmptyPages(); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("autoblankpages", SW_RES( STR_PRINTOPTUI_PRINT_BLANK), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("autoblankpages", SwResId( STR_PRINTOPTUI_PRINT_BLANK), ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox", "PrintEmptyPages", bDefaultVal); @@ -255,7 +255,7 @@ SwPrintUIOptions::SwPrintUIOptions( bDefaultVal = rDefaultPrintData.IsPaperFromSetup(); vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt; aPaperTrayOpt.maGroupHint = "OptionsPageOptGroup"; - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("printpaperfromsetup", SW_RES( STR_PRINTOPTUI_ONLY_PAPER), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("printpaperfromsetup", SwResId( STR_PRINTOPTUI_ONLY_PAPER), ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox", "PrintPaperFromSetup", bDefaultVal, @@ -265,7 +265,7 @@ SwPrintUIOptions::SwPrintUIOptions( vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = "PrintRange"; aPrintRangeOpt.mbInternalOnly = true; - m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", SW_RES( STR_PRINTOPTUI_RANGE_COPIES), + m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", SwResId( STR_PRINTOPTUI_RANGE_COPIES), OUString(), aPrintRangeOpt); @@ -275,15 +275,15 @@ SwPrintUIOptions::SwPrintUIOptions( uno::Sequence< sal_Bool > aChoicesDisabled( 3 ); uno::Sequence< OUString > aHelpIds( 3 ); uno::Sequence< OUString > aWidgetIds( 3 ); - aChoices[0] = SW_RES( STR_PRINTOPTUI_ALLPAGES); + aChoices[0] = SwResId( STR_PRINTOPTUI_ALLPAGES); aChoicesDisabled[0] = false; aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0"; aWidgetIds[0] = "printallpages"; - aChoices[1] = SW_RES( STR_PRINTOPTUI_SOMEPAGES); + aChoices[1] = SwResId( STR_PRINTOPTUI_SOMEPAGES); aChoicesDisabled[1] = false; aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1"; aWidgetIds[1] = "printpages"; - aChoices[2] = SW_RES( STR_PRINTOPTUI_SELECTION); + aChoices[2] = SwResId( STR_PRINTOPTUI_SELECTION); aChoicesDisabled[2] = ! bHasSelection; aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2"; aWidgetIds[2] = "printselection"; @@ -302,23 +302,23 @@ SwPrintUIOptions::SwPrintUIOptions( vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; aContentsOpt.maGroupHint = "JobPage"; m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("extrawriterprintoptions", - SW_RES( STR_PRINTOPTUI_PRINT), + SwResId( STR_PRINTOPTUI_PRINT), OUString(), aContentsOpt); // create a list box for notes content const SwPostItMode nPrintPostIts = rDefaultPrintData.GetPrintPostIts(); aChoices.realloc( 5 ); - aChoices[0] = SW_RES( STR_PRINTOPTUI_NONE); - aChoices[1] = SW_RES( STR_PRINTOPTUI_COMMENTS_ONLY); - aChoices[2] = SW_RES( STR_PRINTOPTUI_PLACE_END); - aChoices[3] = SW_RES( STR_PRINTOPTUI_PLACE_PAGE); - aChoices[4] = SW_RES( STR_PRINTOPTUI_PLACE_MARGINS); + aChoices[0] = SwResId( STR_PRINTOPTUI_NONE); + aChoices[1] = SwResId( STR_PRINTOPTUI_COMMENTS_ONLY); + aChoices[2] = SwResId( STR_PRINTOPTUI_PLACE_END); + aChoices[3] = SwResId( STR_PRINTOPTUI_PLACE_PAGE); + aChoices[4] = SwResId( STR_PRINTOPTUI_PLACE_MARGINS); aHelpIds.realloc( 2 ); aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText"; aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox"; vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( "PrintProspect", 0, false ); aAnnotOpt.mbEnabled = bHasPostIts; m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments", - SW_RES( STR_PRINTOPTUI_COMMENTS), + SwResId( STR_PRINTOPTUI_COMMENTS), aHelpIds, "PrintAnnotationMode", aChoices, @@ -333,12 +333,12 @@ SwPrintUIOptions::SwPrintUIOptions( if (!bWeb) { m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("pagesides", - SW_RES( STR_PRINTOPTUI_PAGE_SIDES), + SwResId( STR_PRINTOPTUI_PAGE_SIDES), OUString(), aPageSetOpt); uno::Sequence< OUString > aRLChoices( 3 ); - aRLChoices[0] = SW_RES( STR_PRINTOPTUI_ALL_PAGES); - aRLChoices[1] = SW_RES( STR_PRINTOPTUI_BACK_PAGES); - aRLChoices[2] = SW_RES( STR_PRINTOPTUI_FONT_PAGES); + aRLChoices[0] = SwResId( STR_PRINTOPTUI_ALL_PAGES); + aRLChoices[1] = SwResId( STR_PRINTOPTUI_BACK_PAGES); + aRLChoices[2] = SwResId( STR_PRINTOPTUI_FONT_PAGES); uno::Sequence<OUString> aRLHelp { ".HelpID:vcl:PrintDialog:PrintLeftRightPages:ListBox" }; // create a choice option for all/left/right pages // 0 : all pages (left & right) @@ -352,7 +352,7 @@ SwPrintUIOptions::SwPrintUIOptions( else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage()) nPagesChoice = 2; m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("brochureinclude", - SW_RES( STR_PRINTOPTUI_INCLUDE), + SwResId( STR_PRINTOPTUI_INCLUDE), aRLHelp, "PrintLeftRightPages", aRLChoices, @@ -362,7 +362,7 @@ SwPrintUIOptions::SwPrintUIOptions( // create a bool option for brochure bDefaultVal = rDefaultPrintData.IsPrintProspect(); const OUString aBrochurePropertyName( "PrintProspect" ); - m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SW_RES( STR_PRINTOPTUI_BROCHURE), + m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE), ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox", aBrochurePropertyName, bDefaultVal, @@ -372,8 +372,8 @@ SwPrintUIOptions::SwPrintUIOptions( { // create a bool option for brochure RTL dependent on brochure uno::Sequence< OUString > aBRTLChoices( 2 ); - aBRTLChoices[0] = SW_RES( STR_PRINTOPTUI_LEFT_SCRIPT); - aBRTLChoices[1] = SW_RES( STR_PRINTOPTUI_RIGHT_SCRIPT); + aBRTLChoices[0] = SwResId( STR_PRINTOPTUI_LEFT_SCRIPT); + aBRTLChoices[1] = SwResId( STR_PRINTOPTUI_RIGHT_SCRIPT); vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, true ); uno::Sequence<OUString> aBRTLHelpIds { ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" }; aBrochureRTLOpt.maGroupHint = "LayoutPage"; diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index 1c507b99a57f..a288f7949f4b 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -662,7 +662,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c sal_Int32 nProgressRange(1000000); if (xStatusIndicator.is()) { - xStatusIndicator->start(SW_RESSTR(STR_STATSTR_SWGREAD), nProgressRange); + xStatusIndicator->start(SwResId(STR_STATSTR_SWGREAD), nProgressRange); } uno::Any aProgRange; aProgRange <<= nProgressRange; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index ee70db8fc751..f49af4ffeae3 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -166,7 +166,7 @@ sal_uInt32 SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >& sal_Int32 nProgressRange(1000000); if (xStatusIndicator.is()) { - xStatusIndicator->start(SW_RESSTR( STR_STATSTR_SWGWRITE), + xStatusIndicator->start(SwResId( STR_STATSTR_SWGWRITE), nProgressRange); } xInfoSet->setPropertyValue("ProgressRange", Any(nProgressRange)); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 0208a60a13cd..10332ef1db08 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -139,7 +139,7 @@ SwXMLBodyContext_Impl::SwXMLBodyContext_Impl( SwXMLImport& rImport, // into the file since it's not really a style but "no style" // (hence referencing it actually makes no sense except for hyperlinks // which default to something other than "Default") - OUString const sDefault(SW_RES(STR_POOLCOLL_STANDARD)); + OUString const sDefault(SwResId(STR_POOLCOLL_STANDARD)); uno::Reference<container::XNameContainer> const& xStyles( rImport.GetTextImport()->GetTextStyles()); if (!xStyles->hasByName("Default")) diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 46641a942f78..446524cbac0e 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -114,7 +114,7 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl, Button*, void) default:; //prevent warning } if(!bOk) { - ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_ILLEGAL_PAGENUM), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SwResId(STR_ILLEGAL_PAGENUM), VclMessageType::Info)->Execute(); m_pPageNumEdit->GrabFocus(); return; } diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 4973803d2149..c66be6d84d56 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -69,7 +69,7 @@ SwCharDlg::SwCharDlg(vcl::Window* pParent, SwView& rVw, const SfxItemSet& rCoreS { if(pStr) { - SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pStr + ")"); + SetText(GetText() + SwResId(STR_TEXTCOLL_HEADER) + *pStr + ")"); } SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 99578d72c177..c2112d8fd994 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -651,7 +651,7 @@ void SwDropCapsPage::Reset(const SfxItemSet *rSet) ::FillCharStyleListBox(*m_pTemplateBox, rSh.GetView().GetDocShell(), true); - m_pTemplateBox->InsertEntry(SW_RESSTR(SW_STR_NONE), 0); + m_pTemplateBox->InsertEntry(SwResId(SW_STR_NONE), 0); // Reset format m_pTemplateBox->SelectEntryPos(0); diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index df2f530b7c88..19cb6729e59e 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -45,7 +45,7 @@ const sal_uInt16 SwParagraphNumTabPage::aPageRg[] = { SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItemSet& rAttr ) : SfxTabPage(pParent, "NumParaPage", "modules/swriter/ui/numparapage.ui", &rAttr), - msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ), + msOutlineNumbering( SwResId( STR_OUTLINE_NUMBERING ) ), bModified(false), bCurNumrule(false) { diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index 93c22f92cfd6..96616838f5bd 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -73,7 +73,7 @@ SwParaDlg::SwParaDlg(vcl::Window *pParent, if(pTitle) { // Update title - SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pTitle + ")"); + SetText(GetText() + SwResId(STR_TEXTCOLL_HEADER) + *pTitle + ")"); } // tabs common to paragraph and draw paragraphs (paragraphs inside a text box) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index caa0b5a51f1b..ff98cdd0cf58 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -82,7 +82,7 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet) get(m_pShowStandardizedPageCount, "standardizedpageshow"); get(m_pStandardizedPageSizeNF, "standardpagesize"); - SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); + SvxStringArray aMetricArr(ResId(STR_ARR_METRIC, *pSwResMgr)); for ( sal_uInt32 i = 0; i < aMetricArr.Count(); ++i ) { const OUString sMetric = aMetricArr.GetStringByPos( i ); @@ -433,15 +433,15 @@ void SwCaptionPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "OptCaptionPage", "modules/swriter/ui/optcaptionpage.ui", &rSet) - , m_sSWTable(SW_RESSTR(STR_CAPTION_TABLE)) - , m_sSWFrame(SW_RESSTR(STR_CAPTION_FRAME)) - , m_sSWGraphic(SW_RESSTR(STR_CAPTION_GRAPHIC)) - , m_sOLE(SW_RESSTR(STR_CAPTION_OLE)) - , m_sBegin(SW_RESSTR(STR_CAPTION_BEGINNING)) - , m_sEnd(SW_RESSTR(STR_CAPTION_END)) - , m_sAbove(SW_RESSTR(STR_CAPTION_ABOVE)) - , m_sBelow(SW_RESSTR(STR_CAPTION_BELOW)) - , m_sNone(SW_RESSTR(SW_STR_NONE)) + , m_sSWTable(SwResId(STR_CAPTION_TABLE)) + , m_sSWFrame(SwResId(STR_CAPTION_FRAME)) + , m_sSWGraphic(SwResId(STR_CAPTION_GRAPHIC)) + , m_sOLE(SwResId(STR_CAPTION_OLE)) + , m_sBegin(SwResId(STR_CAPTION_BEGINNING)) + , m_sEnd(SwResId(STR_CAPTION_END)) + , m_sAbove(SwResId(STR_CAPTION_ABOVE)) + , m_sBelow(SwResId(STR_CAPTION_BELOW)) + , m_sNone(SwResId(SW_STR_NONE)) , pMgr(new SwFieldMgr()) , bHTMLMode(false) { diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index b5f2add08eba..b78e70fc5936 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -123,7 +123,7 @@ SwContentOptPage::SwContentOptPage( vcl::Window* pParent, m_pVRulerRightCBox->Hide(); m_pVRulerCBox->SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl )); - SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); + SvxStringArray aMetricArr(ResId(STR_ARR_METRIC, *pSwResMgr)); for ( size_t i = 0; i < aMetricArr.Count(); ++i ) { const OUString sMetric = aMetricArr.GetStringByPos( i ); @@ -297,7 +297,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) : SfxTabPage(pParent, "PrintOptionsPage", "modules/swriter/ui/printoptionspage.ui", &rCoreSet) - , sNone(SW_RESSTR(SW_STR_NONE)) + , sNone(SwResId(SW_STR_NONE)) , bAttrModified(false) , bPreview(false) { @@ -559,9 +559,9 @@ SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent, m_nFontGroup(FONT_GROUP_DEFAULT), - m_sScriptWestern(SW_RES(ST_SCRIPT_WESTERN)), - m_sScriptAsian(SW_RES(ST_SCRIPT_ASIAN)), - m_sScriptComplex(SW_RES(ST_SCRIPT_CTL)) + m_sScriptWestern(SwResId(ST_SCRIPT_WESTERN)), + m_sScriptAsian(SwResId(ST_SCRIPT_ASIAN)), + m_sScriptComplex(SwResId(ST_SCRIPT_CTL)) { get(m_pLabelFT,"label1"); get(m_pStandardBox,"standardbox"); diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index f5b74e4b9e5e..403594c84add 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -395,7 +395,7 @@ void SwAddressControl_Impl::Resize() SwCreateAddressListDialog::SwCreateAddressListDialog( vcl::Window* pParent, const OUString& rURL, SwMailMergeConfigItem& rConfig) : SfxModalDialog(pParent, "CreateAddressList", "modules/swriter/ui/createaddresslist.ui"), - m_sAddressListFilterName( SW_RES( ST_FILTERNAME)), + m_sAddressListFilterName( SwResId( ST_FILTERNAME)), m_sURL(rURL), m_pCSVData( new SwCSVData ), m_pFindDlg(nullptr) diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 5bfc7a99c50e..7d40cd07d598 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -191,7 +191,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, , ConfigItem("Office.Writer/InsertData/DataSet", ConfigItemMode::DelayedUpdate) , aDBData(rData) - , sNoTmpl(SW_RESSTR(SW_STR_NONE)) + , sNoTmpl(SwResId(SW_STR_NONE)) , pView(&rView) , pTAutoFormat(nullptr) , pTableSet(nullptr) diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx index 927a09825e0c..cc6ba7230bf7 100644 --- a/sw/source/ui/dbui/mailmergewizard.cxx +++ b/sw/source/ui/dbui/mailmergewizard.cxx @@ -43,19 +43,19 @@ SwMailMergeWizard::SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeC m_pSwView(&rView), m_bDocumentLoad( false ), m_xConfigItem(rItem), - m_sStarting( SW_RES( ST_STARTING )), - m_sDocumentType( SW_RES( ST_DOCUMENTTYPE )), - m_sAddressBlock( SW_RES( ST_ADDRESSBLOCK )), - m_sAddressList( SW_RES( ST_ADDRESSLIST )), - m_sGreetingsLine( SW_RES( ST_GREETINGSLINE )), - m_sLayout( SW_RES( ST_LAYOUT )), - m_sFinish( SW_RES( ST_FINISH )), + m_sStarting( SwResId( ST_STARTING )), + m_sDocumentType( SwResId( ST_DOCUMENTTYPE )), + m_sAddressBlock( SwResId( ST_ADDRESSBLOCK )), + m_sAddressList( SwResId( ST_ADDRESSLIST )), + m_sGreetingsLine( SwResId( ST_GREETINGSLINE )), + m_sLayout( SwResId( ST_LAYOUT )), + m_sFinish( SwResId( ST_FINISH )), m_nRestartPage( MM_DOCUMENTSELECTPAGE ) { defaultButton(WizardButtonFlags::NEXT); enableButtons(WizardButtonFlags::FINISH, false); - setTitleBase(SW_RESSTR( ST_MMWTITLE ) ); + setTitleBase(SwResId( ST_MMWTITLE ) ); m_pFinish->SetText(m_sFinish); m_pNextPage->SetHelpId(HID_MM_NEXT_PAGE); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 96ab523f636b..6c9c69e81774 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -511,29 +511,29 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( { m_pFieldFT->Show(); m_pFieldCB->Show(); - SvTreeListEntry* pEntry = m_pAddressElementsLB->InsertEntry(SW_RESSTR(ST_SALUTATION)); + SvTreeListEntry* pEntry = m_pAddressElementsLB->InsertEntry(SwResId(ST_SALUTATION)); pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_SALUTATION) ); - pEntry = m_pAddressElementsLB->InsertEntry(SW_RESSTR(ST_PUNCTUATION)); + pEntry = m_pAddressElementsLB->InsertEntry(SwResId(ST_PUNCTUATION)); pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_PUNCTUATION) ); - pEntry = m_pAddressElementsLB->InsertEntry(SW_RESSTR(ST_TEXT)); + pEntry = m_pAddressElementsLB->InsertEntry(SwResId(ST_TEXT)); pEntry->SetUserData(reinterpret_cast<void*>((sal_Int32)USER_DATA_TEXT) ); - ResStringArray aSalutArr(SW_RES(RA_SALUTATION)); + ResStringArray aSalutArr(ResId(RA_SALUTATION, *pSwResMgr)); for(sal_uInt32 i = 0; i < aSalutArr.Count(); ++i) m_aSalutations.push_back(aSalutArr.GetString(i)); - ResStringArray aPunctArr(SW_RES(RA_PUNCTUATION)); + ResStringArray aPunctArr(ResId(RA_PUNCTUATION, *pSwResMgr)); for(sal_uInt32 i = 0; i < aPunctArr.Count(); ++i) m_aPunctuations.push_back(aPunctArr.GetString(i)); m_pDragED->SetText(" "); - SetText(SW_RESSTR(eType == GREETING_MALE ? ST_TITLE_MALE : ST_TITLE_FEMALE)); - m_pAddressElementsFT->SetText(SW_RESSTR(ST_SALUTATIONELEMENTS)); - m_pInsertFieldIB->SetQuickHelpText(SW_RESSTR(ST_INSERTSALUTATIONFIELD)); - m_pRemoveFieldIB->SetQuickHelpText(SW_RESSTR(ST_REMOVESALUTATIONFIELD)); - m_pDragFT->SetText(SW_RESSTR(ST_DRAGSALUTATION)); + SetText(SwResId(eType == GREETING_MALE ? ST_TITLE_MALE : ST_TITLE_FEMALE)); + m_pAddressElementsFT->SetText(SwResId(ST_SALUTATIONELEMENTS)); + m_pInsertFieldIB->SetQuickHelpText(SwResId(ST_INSERTSALUTATIONFIELD)); + m_pRemoveFieldIB->SetQuickHelpText(SwResId(ST_REMOVESALUTATIONFIELD)); + m_pDragFT->SetText(SwResId(ST_DRAGSALUTATION)); } else { if(eType == ADDRESSBLOCK_EDIT) - SetText(SW_RESSTR(ST_TITLE_EDIT)); + SetText(SwResId(ST_TITLE_EDIT)); m_pDragED->SetText("\n\n\n\n\n"); } @@ -894,7 +894,7 @@ void SwAssignFieldsControl::Init(SwMailMergeConfigItem& rConfigItem) pNewText->SetText("<" + rHeader + ">"); VclPtr<ListBox> pNewLB = VclPtr<ListBox>::Create(m_aWindow.get(), WB_DROPDOWN | WB_VCENTER | WB_TABSTOP); pNewText->set_mnemonic_widget(pNewLB); - pNewLB->InsertEntry(SW_RESSTR(SW_STR_NONE)); + pNewLB->InsertEntry(SwResId(SW_STR_NONE)); pNewLB->SelectEntryPos(0); pNewLB->SetDropDownLineCount(5); @@ -1154,7 +1154,7 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( const OUString& rPreview, bool bIsAddressBlock) : SfxModalDialog(pParent, "AssignFieldsDialog", "modules/swriter/ui/assignfieldsdialog.ui"), - m_sNone(SW_RESSTR(SW_STR_NONE)), + m_sNone(SwResId(SW_STR_NONE)), m_rPreviewString(rPreview), m_rConfigItem(rConfigItem) { @@ -1168,14 +1168,14 @@ SwAssignFieldsDialog::SwAssignFieldsDialog( get(m_pFieldsControl, "FIELDS"); m_pFieldsControl->Init(rConfigItem); //resize the HeaderBar - OUString sAddressElement( SW_RESSTR(ST_ADDRESSELEMENT) ); - const OUString sMatchesTo( SW_RESSTR(ST_MATCHESTO) ); - const OUString sPreview( SW_RESSTR(ST_PREVIEW) ); + OUString sAddressElement( SwResId(ST_ADDRESSELEMENT) ); + const OUString sMatchesTo( SwResId(ST_MATCHESTO) ); + const OUString sPreview( SwResId(ST_PREVIEW) ); if(!bIsAddressBlock) { - m_pPreviewFI->SetText(SW_RESSTR(ST_SALUTATIONPREVIEW)); - m_pMatchingFI->SetText(SW_RESSTR(ST_SALUTATIONMATCHING)); - sAddressElement = SW_RESSTR(ST_SALUTATIONELEMENT); + m_pPreviewFI->SetText(SwResId(ST_SALUTATIONPREVIEW)); + m_pMatchingFI->SetText(SwResId(ST_SALUTATIONMATCHING)); + sAddressElement = SwResId(ST_SALUTATIONELEMENT); } Size aOutputSize(m_pFieldsControl->m_aHeaderHB->GetSizePixel()); diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index c1b3ce71cfa6..6ba3cbe9486c 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -252,13 +252,13 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem& m_pContainer(get<SvSimpleTableContainer>("container")), m_pStop(get<PushButton>("stop")), m_pClose(get<PushButton>("close")), - m_sContinue(SW_RES( ST_CONTINUE )), + m_sContinue(SwResId( ST_CONTINUE )), m_sStop(m_pStop->GetText()), m_sTransferStatus(m_pTransferStatus->GetText()), m_sErrorStatus( m_pErrorStatus->GetText()), - m_sSendingTo( SW_RES(ST_SENDINGTO )), - m_sCompleted( SW_RES(ST_COMPLETED )), - m_sFailed( SW_RES(ST_FAILED )), + m_sSendingTo( SwResId(ST_SENDINGTO )), + m_sCompleted( SwResId(ST_COMPLETED )), + m_sFailed( SwResId(ST_FAILED )), m_bCancel(false), m_bDesctructionEnabled(false), m_pImpl(new SwSendMailDialog_Impl), @@ -273,8 +273,8 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem& m_pStatusHB = &(m_pStatus->GetTheHeaderBar()); m_nStatusHeight = m_pContainer->get_height_request(); - OUString sTask(SW_RES(ST_TASK)); - OUString sStatus(SW_RES(ST_STATUS)); + OUString sTask(SwResId(ST_TASK)); + OUString sStatus(SwResId(ST_STATUS)); m_pStop->SetClickHdl(LINK( this, SwSendMailDialog, StopHdl_Impl)); m_pClose->SetClickHdl(LINK( this, SwSendMailDialog, CloseHdl_Impl)); diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 5493126901cb..f1d27c661786 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -316,7 +316,7 @@ void SwMMResultPrintDialog::dispose() SwMMResultEmailDialog::SwMMResultEmailDialog() : SfxModalDialog(nullptr, "MMResultEmailDialog", "modules/swriter/ui/mmresultemaildialog.ui"), - m_sConfigureMail(SW_RES(ST_CONFIGUREMAIL)) + m_sConfigureMail(SwResId(ST_CONFIGUREMAIL)) { get(m_pMailToFT, "mailtoft"); get(m_pMailToLB, "mailto"); @@ -687,7 +687,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void) sExtension = pSfxFlt->GetWildcard().getGlob().getToken(1, '.'); sPath += "." + sExtension; } - OUString sStat = OUString(SW_RES(STR_STATSTR_LETTER)) + " " + OUString::number( nDoc ); + OUString sStat = SwResId(STR_STATSTR_LETTER) + " " + OUString::number( nDoc ); aSaveMonitor->m_pPrintInfo->SetText(sStat); //now extract a document from the target document diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 66f01dc07bdd..7da94798041f 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -92,10 +92,10 @@ void SwAddressTable::setColSizes() SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent, const uno::Reference< sdbc::XConnection>& rConnection) : SfxModalDialog(pParent, "SelectTableDialog", "modules/swriter/ui/selecttabledialog.ui") - , m_sName(SW_RES(ST_NAME)) - , m_sType(SW_RES(ST_TYPE)) - , m_sTable(SW_RES(ST_TABLE)) - , m_sQuery(SW_RES(ST_QUERY)) + , m_sName(SwResId(ST_NAME)) + , m_sType(SwResId(ST_TYPE)) + , m_sTable(SwResId(ST_TABLE)) + , m_sQuery(SwResId(ST_QUERY)) , m_xConnection(rConnection) { get(m_pPreviewPB, "preview"); diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx index 2c324045c02e..8dce604e6229 100644 --- a/sw/source/ui/dialog/macassgn.cxx +++ b/sw/source/ui/dialog/macassgn.cxx @@ -49,20 +49,20 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) switch( eType ) { case MACASSGN_AUTOTEXT: - aItem.AddEvent( OUString( SW_RES(STR_EVENT_START_INS_GLOSSARY) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_START_INS_GLOSSARY) ), OUString(), SW_EVENT_START_INS_GLOSSARY ); - aItem.AddEvent( OUString( SW_RES(STR_EVENT_END_INS_GLOSSARY) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_END_INS_GLOSSARY) ), OUString(), SW_EVENT_END_INS_GLOSSARY); // in order for the new handler to become active! break; case MACASSGN_ALLFRM: case MACASSGN_GRAPHIC: // graphics { - aItem.AddEvent( OUString( SW_RES(STR_EVENT_IMAGE_ERROR) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_IMAGE_ERROR) ), OUString(), SVX_EVENT_IMAGE_ERROR); - aItem.AddEvent( OUString( SW_RES(STR_EVENT_IMAGE_ABORT) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_IMAGE_ABORT) ), OUString(), SVX_EVENT_IMAGE_ABORT); - aItem.AddEvent( OUString( SW_RES(STR_EVENT_IMAGE_LOAD) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_IMAGE_LOAD) ), OUString(), SVX_EVENT_IMAGE_LOAD); } SAL_FALLTHROUGH; @@ -71,13 +71,13 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) if( !bHtmlMode && (MACASSGN_FRMURL == eType || MACASSGN_ALLFRM == eType)) { - aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_KEYINPUT_A ) ), OUString(), + aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_KEYINPUT_A ) ), OUString(), SW_EVENT_FRM_KEYINPUT_ALPHA ); - aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_KEYINPUT_NOA ) ), OUString(), + aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_KEYINPUT_NOA ) ), OUString(), SW_EVENT_FRM_KEYINPUT_NOALPHA ); - aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_RESIZE ) ), OUString(), + aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_RESIZE ) ), OUString(), SW_EVENT_FRM_RESIZE ); - aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_MOVE ) ), OUString(), + aItem.AddEvent( OUString( SwResId( STR_EVENT_FRM_MOVE ) ), OUString(), SW_EVENT_FRM_MOVE ); } } @@ -85,17 +85,17 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType ) case MACASSGN_OLE: // OLE { if( !bHtmlMode ) - aItem.AddEvent( OUString( SW_RES(STR_EVENT_OBJECT_SELECT) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_OBJECT_SELECT) ), OUString(), SW_EVENT_OBJECT_SELECT ); } SAL_FALLTHROUGH; case MACASSGN_INETFMT: // INetFormat-Attributes { - aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSEOVER_OBJECT) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_MOUSEOVER_OBJECT) ), OUString(), SFX_EVENT_MOUSEOVER_OBJECT ); - aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSECLICK_OBJECT) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_MOUSECLICK_OBJECT) ), OUString(), SFX_EVENT_MOUSECLICK_OBJECT); - aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSEOUT_OBJECT) ), OUString(), + aItem.AddEvent( OUString( SwResId(STR_EVENT_MOUSEOUT_OBJECT) ), OUString(), SFX_EVENT_MOUSEOUT_OBJECT); } break; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 71f88cc83e6d..ec7da6517db6 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -424,7 +424,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox) } else { - ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_PASSWORD), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SwResId(STR_WRONG_PASSWORD), VclMessageType::Info)->Execute(); } } } @@ -989,7 +989,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, Button *, pButton, void ) bool bContent = pSectRepr->IsContent(); if( pBox->IsChecked() && bContent && rSh.HasSelection() ) { - if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute()) + if (RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SwResId(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute()) pBox->Check( false ); } if( bFile ) @@ -1265,7 +1265,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox, void ) } else { - ScopedVclPtrInstance<MessageDialog>(pBox, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pBox, SwResId(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); ChangePasswdHdl(pBox); break; } @@ -1702,7 +1702,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton, void ) } else { - ScopedVclPtrInstance<MessageDialog>(pButton, SW_RES(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pButton, SwResId(STR_WRONG_PASSWD_REPEAT), VclMessageType::Info)->Execute(); } } else if(!bChange) @@ -1726,7 +1726,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) if( pBox->IsChecked() ) { if( m_pWrtSh->HasSelection() && - RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute()) + RET_NO == ScopedVclPtrInstance<MessageDialog>(this, SwResId(STR_QUERY_CONNECT), VclMessageType::Question, VclButtonsType::YesNo)->Execute()) pBox->Check( false ); } diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 34b00493b67f..a1fc7fa5655b 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -133,7 +133,7 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet, // Read user label from writer.cfg SwLabItem aItem(static_cast<const SwLabItem&>(rSet.Get( FN_LABEL ))); std::unique_ptr<SwLabRec> pRec(new SwLabRec); - pRec->aMake = pRec->aType = SW_RESSTR( STR_CUSTOM ); + pRec->aMake = pRec->aType = SwResId( STR_CUSTOM ); pRec->SetFromItem( aItem ); bool bDouble = false; @@ -204,7 +204,7 @@ SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont) { SwLabRec* pRec = nullptr; bool bFound = false; - const OUString sCustom(SW_RES(STR_CUSTOM)); + const OUString sCustom(SwResId(STR_CUSTOM)); const size_t nCount = Recs().size(); for (size_t i = 0; i < nCount; ++i) @@ -380,7 +380,7 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl, ListBox&, void) const size_t nCount = GetParentSwLabDlg()->Recs().size(); size_t nLstType = 0; - const OUString sCustom(SW_RES(STR_CUSTOM)); + const OUString sCustom(SwResId(STR_CUSTOM)); //insert the entries into the sorted list box for ( size_t i = 0; i < nCount; ++i ) { diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index d272566ca190..937cfb59bd31 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -101,16 +101,16 @@ void DrawArrow(vcl::RenderContext& rRenderContext, const Point &rP1, const Point SwLabPreview::SwLabPreview(vcl::Window* pParent) : Window(pParent, 0) , m_aGrayColor(COL_LIGHTGRAY) - , m_aHDistStr(SW_RESSTR(STR_HDIST)) - , m_aVDistStr(SW_RESSTR(STR_VDIST)) - , m_aWidthStr(SW_RESSTR(STR_WIDTH)) - , m_aHeightStr(SW_RESSTR(STR_HEIGHT)) - , m_aLeftStr(SW_RESSTR(STR_LEFT)) - , m_aUpperStr(SW_RESSTR(STR_UPPER)) - , m_aColsStr(SW_RESSTR(STR_COLS)) - , m_aRowsStr(SW_RESSTR(STR_ROWS)) - , m_aPWidthStr(SW_RESSTR(STR_PWIDTH)) - , m_aPHeightStr(SW_RESSTR(STR_PHEIGHT)) + , m_aHDistStr(SwResId(STR_HDIST)) + , m_aVDistStr(SwResId(STR_VDIST)) + , m_aWidthStr(SwResId(STR_WIDTH)) + , m_aHeightStr(SwResId(STR_HEIGHT)) + , m_aLeftStr(SwResId(STR_LEFT)) + , m_aUpperStr(SwResId(STR_UPPER)) + , m_aColsStr(SwResId(STR_COLS)) + , m_aRowsStr(SwResId(STR_ROWS)) + , m_aPWidthStr(SwResId(STR_PWIDTH)) + , m_aPHeightStr(SwResId(STR_PHEIGHT)) { SetMapMode(MapUnit::MapPixel); @@ -507,7 +507,7 @@ void SwLabFormatPage::FillItem(SwLabItem& rItem) { if (bModified) { - rItem.m_aMake = rItem.m_aType = SW_RESSTR(STR_CUSTOM); + rItem.m_aMake = rItem.m_aType = SwResId(STR_CUSTOM); SwLabRec& rRec = *GetParentSwLabDlg()->Recs()[0]; rItem.m_lHDist = rRec.lHDist = static_cast< long >(GETFLDVAL(*m_pHDistField )); diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index ab5457c89b81..c72019ece137 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -247,7 +247,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData) { if (rDBData.sDataSource.isEmpty() && rDBData.sCommand.isEmpty()) { - m_pDocDBNameFT->SetText(SW_RESSTR(SW_STR_NONE)); + m_pDocDBNameFT->SetText(SwResId(SW_STR_NONE)); } else { diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index e556eb1f7a44..0295644857f3 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -160,7 +160,7 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) if( rProperties.getLength() ) { - pInfo = m_pTypeTLB->InsertEntry( OUString(SW_RES( STR_CUSTOM )) ); + pInfo = m_pTypeTLB->InsertEntry( SwResId( STR_CUSTOM ) ); pInfo->SetUserData(reinterpret_cast<void*>(USHRT_MAX)); for (sal_Int32 n=0; n < rProperties.getLength(); n++) diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index df89661bcc2f..35c7df610a71 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -131,7 +131,7 @@ void SwFieldDokPage::Reset(const SfxItemSet* ) case TYP_PAGENUMBERFLD: if (!bPage) { - nPos = m_pTypeLB->InsertEntry(SW_RESSTR(FMT_REF_PAGE)); + nPos = m_pTypeLB->InsertEntry(SwResId(FMT_REF_PAGE)); m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(USHRT_MAX)); bPage = true; } @@ -384,14 +384,14 @@ IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl, ListBox&, void) break; case TYP_CHAPTERFLD: - m_pValueFT->SetText(SW_RESSTR(STR_LEVEL)); + m_pValueFT->SetText(SwResId(STR_LEVEL)); if (IsFieldEdit()) m_pLevelED->SetText(OUString::number(static_cast<SwChapterField*>(GetCurField())->GetLevel() + 1)); bLevel = true; break; case TYP_PAGENUMBERFLD: - m_pValueFT->SetText( SW_RESSTR( STR_OFFSET )); + m_pValueFT->SetText( SwResId( STR_OFFSET )); if (IsFieldEdit()) m_pValueED->SetText(GetCurField()->GetPar2()); bValue = true; @@ -487,7 +487,7 @@ IMPL_LINK_NOARG(SwFieldDokPage, SubTypeHdl, ListBox&, void) } if( nTextRes ) - m_pValueFT->SetText( SW_RESSTR( nTextRes )); + m_pValueFT->SetText( SwResId( nTextRes )); } sal_Int32 SwFieldDokPage::FillFormatLB(sal_uInt16 nTypeId) @@ -511,10 +511,10 @@ sal_Int32 SwFieldDokPage::FillFormatLB(sal_uInt16 nTypeId) if( nSize && !m_pFormatLB->GetSelectEntryCount() ) { - m_pFormatLB->SelectEntry( SW_RESSTR(FMT_NUM_PAGEDESC) ); + m_pFormatLB->SelectEntry( SwResId(FMT_NUM_PAGEDESC) ); if( !m_pFormatLB->GetSelectEntryCount() ) { - m_pFormatLB->SelectEntry( SW_RESSTR(FMT_NUM_ARABIC) ); + m_pFormatLB->SelectEntry( SwResId(FMT_NUM_ARABIC) ); if( !m_pFormatLB->GetSelectEntryCount() ) m_pFormatLB->SelectEntryPos( 0 ); } @@ -544,7 +544,7 @@ IMPL_LINK_NOARG(SwFieldDokPage, FormatHdl, ListBox&, void) sal_uInt16 nTmp = (sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatLB->GetEntryData( m_pFormatLB->GetSelectEntryPos() )); const OUString sOldText( m_pValueFT->GetText() ); - const OUString sNewText( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE + const OUString sNewText( SwResId( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE : STR_OFFSET )); if( sOldText != sNewText ) diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index b06f044c4cd9..5b5a1a3b280f 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -245,7 +245,7 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) if (nSize) { if (IsFieldEdit() && nTypeId == TYP_JUMPEDITFLD) - m_pFormatLB->SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + GetCurField()->GetFormat())); + m_pFormatLB->SelectEntry(SwResId(FMT_MARK_BEGIN + GetCurField()->GetFormat())); if (!m_pFormatLB->GetSelectEntryCount()) m_pFormatLB->SelectEntryPos(0); @@ -314,15 +314,15 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) else bInsert = false; - m_pNameFT->SetText(SW_RESSTR(STR_MACNAME)); - m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); + m_pNameFT->SetText(SwResId(STR_MACNAME)); + m_pValueFT->SetText(SwResId(STR_PROMPT)); m_pNameED->SetText(GetFieldMgr().GetMacroName()); m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); break; case TYP_HIDDENPARAFLD: - m_pNameFT->SetText(SW_RESSTR(STR_COND)); + m_pNameFT->SetText(SwResId(STR_COND)); m_pNameED->SetDropEnable(true); bName = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); @@ -331,9 +331,9 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) case TYP_HIDDENTXTFLD: { - m_pNameFT->SetText(SW_RESSTR(STR_COND)); + m_pNameFT->SetText(SwResId(STR_COND)); m_pNameED->SetDropEnable(true); - m_pValueFT->SetText(SW_RESSTR(STR_INSTEXT)); + m_pValueFT->SetText(SwResId(STR_INSTEXT)); SwWrtShell* pSh = GetActiveWrtShell(); if (!IsFieldEdit() && pSh ) m_pValueED->SetText(pSh->GetSelText()); @@ -344,7 +344,7 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) break; case TYP_CONDTXTFLD: - m_pNameFT->SetText(SW_RESSTR(STR_COND)); + m_pNameFT->SetText(SwResId(STR_COND)); m_pNameED->SetDropEnable(true); if (IsFieldEdit()) { @@ -358,15 +358,15 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) break; case TYP_JUMPEDITFLD: - m_pNameFT->SetText(SW_RESSTR(STR_JUMPEDITFLD)); - m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); + m_pNameFT->SetText(SwResId(STR_JUMPEDITFLD)); + m_pValueFT->SetText(SwResId(STR_PROMPT)); bName = bValue = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); break; case TYP_INPUTFLD: - m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); + m_pValueFT->SetText(SwResId(STR_PROMPT)); bValue = true; m_pNameED->SetAccessibleName(m_pNameFT->GetText()); m_pValueED->SetAccessibleName(m_pValueFT->GetText()); @@ -374,7 +374,7 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void) case TYP_COMBINED_CHARS: { - m_pNameFT->SetText(SW_RESSTR(STR_COMBCHRS_FT)); + m_pNameFT->SetText(SwResId(STR_COMBCHRS_FT)); m_pNameED->SetDropEnable(true); bName = true; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 38664a2a285a..bf4e837362ad 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -352,7 +352,7 @@ IMPL_LINK_NOARG(SwFieldRefPage, TypeHdl, ListBox&, void) break; case REF_SETREFATTR: - sName = SW_RESSTR(STR_GETREFFLD); + sName = SwResId(STR_GETREFFLD); nFlag = REF_SETREFATTR; break; @@ -811,7 +811,7 @@ sal_Int32 SwFieldRefPage::FillFormatLB(sal_uInt16 nTypeId) if (!IsFieldEdit()) m_pFormatLB->SelectEntry(sOldSel); else - m_pFormatLB->SelectEntry(SW_RESSTR(FMT_REF_BEGIN + GetCurField()->GetFormat())); + m_pFormatLB->SelectEntry(SwResId(FMT_REF_BEGIN + GetCurField()->GetFormat())); if (!m_pFormatLB->GetSelectEntryCount()) { diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 409c484e0090..b9dbc7541054 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -326,7 +326,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) else { m_pNumFormatLB->Clear(); - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_SETVAR_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); m_pNumFormatLB->SelectEntryPos(0); } @@ -370,7 +370,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) { bValue = true; bNumFormat = true; - m_pValueFT->SetText(SW_RESSTR(STR_FORMULA)); + m_pValueFT->SetText(SwResId(STR_FORMULA)); m_pValueED->SetDropEnable(true); } break; @@ -415,7 +415,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) break; case TYP_INPUTFLD: - m_pValueFT->SetText(SW_RESSTR(STR_PROMPT)); + m_pValueFT->SetText(SwResId(STR_PROMPT)); if (nSelPos != LISTBOX_ENTRY_NOTFOUND) { @@ -442,7 +442,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) { m_pNumFormatLB->Clear(); - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_USERVAR_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); m_pNumFormatLB->SelectEntryPos(0); } @@ -456,7 +456,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) break; case TYP_DDEFLD: - m_pValueFT->SetText(SW_RESSTR(STR_DDE_CMD)); + m_pValueFT->SetText(SwResId(STR_DDE_CMD)); if (IsFieldEdit() || pBox) // only when interacting via mouse { @@ -525,7 +525,7 @@ void SwFieldVarPage::SubTypeHdl(ListBox* pBox) case TYP_SETREFPAGEFLD: { bValue = false; - m_pValueFT->SetText( SW_RESSTR( STR_OFFSET )); + m_pValueFT->SetText( SwResId( STR_OFFSET )); if (IsFieldEdit() || pBox) // only when interacting via mouse m_pNameED->SetText(OUString()); @@ -752,9 +752,9 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) { if (!IsFieldEdit() || bSpecialFormat) { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_MARK_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); - nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_USERVAR_CMD), 1); + nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_USERVAR_CMD), 1); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } } @@ -764,7 +764,7 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) { if (!IsFieldEdit() || bSpecialFormat) { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_SETVAR_TEXT), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } } @@ -772,14 +772,14 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) case TYP_FORMELFLD: { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_GETVAR_NAME), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } break; case TYP_GETFLD: { - sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0); + sal_Int32 nPos = m_pNumFormatLB->InsertEntry(SwResId(FMT_GETVAR_NAME), 0); m_pNumFormatLB->SetEntryData(nPos, reinterpret_cast<void *>(ULONG_MAX)); } break; @@ -817,10 +817,10 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) if (!m_pFormatLB->GetSelectEntryCount()) { - m_pFormatLB->SelectEntry(SW_RESSTR(FMT_NUM_PAGEDESC)); + m_pFormatLB->SelectEntry(SwResId(FMT_NUM_PAGEDESC)); if (!m_pFormatLB->GetSelectEntryCount()) { - m_pFormatLB->SelectEntry(SW_RESSTR(FMT_NUM_ARABIC)); + m_pFormatLB->SelectEntry(SwResId(FMT_NUM_ARABIC)); if (!m_pFormatLB->GetSelectEntryCount()) m_pFormatLB->SelectEntryPos(0); } @@ -1159,7 +1159,7 @@ bool SwFieldVarPage::FillItemSet(SfxItemSet* ) { nSubType = (nFormat == ULONG_MAX) ? nsSwGetSetExpType::GSE_STRING : nsSwGetSetExpType::GSE_EXPR; - if (nFormat == ULONG_MAX && m_pNumFormatLB->GetSelectEntry() == SW_RESSTR(FMT_USERVAR_CMD)) + if (nFormat == ULONG_MAX && m_pNumFormatLB->GetSelectEntry() == SwResId(FMT_USERVAR_CMD)) nSubType |= nsSwExtendedSubType::SUB_CMD; if (m_pInvisibleCB->IsChecked()) diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index f409f253da17..6f0076ded866 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -80,7 +80,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : CheckTravel(); if( !bNew ) - SetText( SW_RES( STR_JAVA_EDIT ) ); + SetText( SwResId( STR_JAVA_EDIT ) ); RadioButtonHdl(nullptr); } diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 602227c588a3..61ffc364c731 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -447,19 +447,19 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) switch( i ) { case 0: - aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM0 ) ; + aItemText = SwResId( STR_COLUMN_VALUESET_ITEM0 ) ; break; case 1: - aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM1 ) ; + aItemText = SwResId( STR_COLUMN_VALUESET_ITEM1 ) ; break; case 2: - aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM2 ) ; + aItemText = SwResId( STR_COLUMN_VALUESET_ITEM2 ) ; break; case 3: - aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM3 ); + aItemText = SwResId( STR_COLUMN_VALUESET_ITEM3 ); break; default: - aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM4 ); + aItemText = SwResId( STR_COLUMN_VALUESET_ITEM4 ); break; } m_pDefaultVS->InsertItem( i + 1, aItemText, i ); @@ -497,7 +497,7 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pLineTypeDLB->SetSourceUnit( FUNIT_TWIP ); // Fill the line styles listbox - m_pLineTypeDLB->SetNone( SVX_RESSTR( RID_SVXSTR_NONE ) ); + m_pLineTypeDLB->SetNone( SvxResId( RID_SVXSTR_NONE ) ); m_pLineTypeDLB->InsertEntry( ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::SOLID), SvxBorderLineStyle::SOLID ); @@ -926,12 +926,12 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis ) const OUString sLbl3(OUString::number( nVis + 3 )); m_pLbl3->SetText(sLbl3.replaceAt(sLbl3.getLength()-1, 0, sLbl)); - const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; + const OUString sColumnWidth = SwResId( STR_ACCESS_COLUMN_WIDTH ) ; m_aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1)); m_aEd2.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl2)); m_aEd3.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl3)); - const OUString sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ; + const OUString sDist = SwResId( STR_ACCESS_PAGESETUP_SPACING ) ; m_aDistEd1.SetAccessibleName( sDist.replaceFirst("%1", sLbl1).replaceFirst("%2", sLbl2)); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index d44ecc9e6624..5eae4234f373 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -94,7 +94,7 @@ OUString TextFilterAutoConvert::filter(const OUString &rText) SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : SvxStandardDialog( pParent, "InsertCaptionDialog", "modules/swriter/ui/insertcaption.ui" ), - m_sNone( SW_RESSTR(SW_STR_NONE) ), + m_sNone( SwResId(SW_STR_NONE) ), m_aTextFilter(m_sNone), rView( rV ), pMgr( new SwFieldMgr(rView.GetWrtShellPtr()) ), @@ -234,14 +234,14 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : || eType == SelectionType::DrawObject || eType == (SelectionType::DrawObject | SelectionType::Ornament)) { - m_pPosBox->InsertEntry(SW_RESSTR(STR_CAPTION_ABOVE)); - m_pPosBox->InsertEntry(SW_RESSTR(STR_CAPTION_BELOW)); + m_pPosBox->InsertEntry(SwResId(STR_CAPTION_ABOVE)); + m_pPosBox->InsertEntry(SwResId(STR_CAPTION_BELOW)); } else if(eType == SelectionType::Frame || eType == SelectionType::Text) { - m_pPosBox->InsertEntry(SW_RESSTR(STR_CAPTION_BEGINNING)); - m_pPosBox->InsertEntry(SW_RESSTR(STR_CAPTION_END )); + m_pPosBox->InsertEntry(SwResId(STR_CAPTION_BEGINNING)); + m_pPosBox->InsertEntry(SwResId(STR_CAPTION_END )); } m_pPosBox->SelectEntryPos(1); @@ -440,7 +440,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV SwWrtShell &rSh = rView.GetWrtShell(); - const OUString sNone(SW_RESSTR(SW_STR_NONE)); + const OUString sNone(SwResId(SW_STR_NONE)); m_pLbLevel->InsertEntry(sNone); for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 3dab469a0cc1..96282d5fc67b 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -81,7 +81,7 @@ SwFrameDlg::SwFrameDlg( SfxViewFrame* pViewFrame, if(pStr) { - SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + ")"); + SetText(GetText() + SwResId(STR_COLL_HEADER) + *pStr + ")"); } m_nStdId = AddTabPage("type", SwFramePage::Create, nullptr); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 2c78119b8932..b26dd9916e82 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -955,9 +955,9 @@ void SwFramePage::Reset( const SfxItemSet *rSet ) else { if ( m_bNew ) - SetText( SW_RESSTR(STR_OLE_INSERT)); + SetText( SwResId(STR_OLE_INSERT)); else - SetText( SW_RESSTR(STR_OLE_EDIT)); + SetText( SwResId(STR_OLE_EDIT)); } } else diff --git a/sw/source/ui/frmdlg/pattern.cxx b/sw/source/ui/frmdlg/pattern.cxx index 17a363d88911..ca2e467ff638 100644 --- a/sw/source/ui/frmdlg/pattern.cxx +++ b/sw/source/ui/frmdlg/pattern.cxx @@ -27,7 +27,7 @@ SwBackgroundDlg::SwBackgroundDlg(vcl::Window* pParent, const SfxItemSet& rSet) : SfxSingleTabDialog(pParent, rSet) { - SetText(SW_RESSTR(STR_FRMUI_PATTERN)); + SetText(SwResId(STR_FRMUI_PATTERN)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ); diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx index 0b9e07793b0a..f0e95a46cd28 100644 --- a/sw/source/ui/frmdlg/uiborder.cxx +++ b/sw/source/ui/frmdlg/uiborder.cxx @@ -33,7 +33,7 @@ SwBorderDlg::SwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes n SfxSingleTabDialog(pParent, rSet) { - SetText(SW_RESSTR(STR_FRMUI_BORDER)); + SetText(SwResId(STR_FRMUI_BORDER)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index a8099fb84e9a..2e450096a084 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -222,7 +222,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& , m_rWrtShell(rShell) , m_pExampleFrame(nullptr) , m_pParamTOXBase(pCurTOX) - , m_sUserDefinedIndex(SW_RESSTR(STR_USER_DEFINED_INDEX)) + , m_sUserDefinedIndex(SwResId(STR_USER_DEFINED_INDEX)) , m_nInitialTOXType(nToxType) , m_bEditTOX(false) , m_bExampleCreated(false) @@ -438,7 +438,7 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType) } } else if(TOX_INDEX == eType.eType) - m_pDescriptionArray[nIndex]->SetMainEntryCharStyle(SW_RESSTR(STR_POOLCHR_IDX_MAIN_ENTRY)); + m_pDescriptionArray[nIndex]->SetMainEntryCharStyle(SwResId(STR_POOLCHR_IDX_MAIN_ENTRY)); } return *m_pDescriptionArray[nIndex]; @@ -485,7 +485,7 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void ) if(!bExist) { - OUString sInfo(SW_RESSTR(STR_FILE_NOT_FOUND)); + OUString sInfo(SwResId(STR_FILE_NOT_FOUND)); sInfo = sInfo.replaceFirst( "%1", sTemplate ); sInfo = sInfo.replaceFirst( "%2", aOpt.GetTemplatePath() ); ScopedVclPtrInstance< InfoBox > aInfo(GetParent(), sInfo); @@ -779,9 +779,9 @@ IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, Button*, pBtn, void) SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet) : SfxTabPage(pParent, "TocIndexPage", "modules/swriter/ui/tocindexpage.ui", &rAttrSet) - , aFromNames(SW_RES(RES_SRCTYPES)) + , aFromNames(ResId(RES_SRCTYPES, *pSwResMgr)) , pIndexRes(nullptr) - , sAutoMarkType(SW_RESSTR(STR_AUTOMARK_TYPE)) + , sAutoMarkType(SwResId(STR_AUTOMARK_TYPE)) , m_bWaitingInitialSettings(true) { get(m_pTitleED, "title"); @@ -1793,9 +1793,9 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt ) SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet) : SfxTabPage(pParent, "TocEntriesPage", "modules/swriter/ui/tocentriespage.ui", &rAttrSet) - , sDelimStr(SW_RESSTR(STR_DELIM)) - , sNoCharStyle(SW_RESSTR(STR_NO_CHAR_STYLE)) - , sNoCharSortKey(SW_RESSTR(STR_NOSORTKEY)) + , sDelimStr(SwResId(STR_DELIM)) + , sNoCharStyle(SwResId(STR_NO_CHAR_STYLE)) + , sNoCharSortKey(SwResId(STR_NOSORTKEY)) , m_pCurrentForm(nullptr) , bInLevelHdl(false) { @@ -1919,7 +1919,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAt //fill the types in for (sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i) { - sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SW_RESSTR(STR_AUTH_FIELD_START + i)); + sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_START + i)); m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast< void * >(sal::static_int_cast< sal_uIntPtr >(i))); } sal_Int32 nPos = m_pFirstKeyLB->InsertEntry(sNoCharSortKey); @@ -2255,7 +2255,7 @@ void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken) { //fill it into the ListBox sal_uInt32 nData = rToken.nAuthorityField; - sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SW_RESSTR(STR_AUTH_FIELD_START + nData)); + sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_START + nData)); m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast<void*>((sal_uIntPtr)nData)); } @@ -2324,7 +2324,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, Button*, pBtn, void) { sText = SwForm::GetFormLinkStt(); eTokenType = TOKEN_LINK_START; - sCharStyle = SW_RES(STR_POOLCHR_TOXJUMP); + sCharStyle = SwResId(STR_POOLCHR_TOXJUMP); } else if(pBtn == m_pTabPB) { @@ -2380,7 +2380,7 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox, void) m_pAuthFieldsLB->Clear(); for( sal_uInt32 i = 0; i < AUTH_FIELD_END; i++) { - sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SW_RESSTR(STR_AUTH_FIELD_START + i)); + sal_Int32 nPos = m_pAuthFieldsLB->InsertEntry(SwResId(STR_AUTH_FIELD_START + i)); m_pAuthFieldsLB->SetEntryData(nPos, reinterpret_cast<void*>((sal_uIntPtr)i)); } @@ -2644,7 +2644,7 @@ void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh) { SwDocShell* pDocSh = rSh.GetView().GetDocShell(); ::FillCharStyleListBox(*m_pCharStyleLB, pDocSh, true, true); - const OUString sDefault(SW_RES(STR_POOLCOLL_STANDARD)); + const OUString sDefault(SwResId(STR_POOLCOLL_STANDARD)); for(sal_Int32 i = 0; i < m_pCharStyleLB->GetEntryCount(); i++) { const OUString sEntry = m_pCharStyleLB->GetEntry(i); @@ -2680,7 +2680,7 @@ SwTokenWindow::SwTokenWindow(vcl::Window* pParent) , m_pForm(nullptr) , m_nLevel(0) , m_bValid(false) - , m_sCharStyle(SW_RESSTR(STR_CHARSTYLE)) + , m_sCharStyle(SwResId(STR_CHARSTYLE)) , m_pActiveCtrl(nullptr) , m_pParent(nullptr) { @@ -2696,18 +2696,18 @@ SwTokenWindow::SwTokenWindow(vcl::Window* pParent) sal_uInt32 nTextId = STR_BUTTON_TEXT_START + i; if( STR_TOKEN_ENTRY_TEXT == nTextId ) nTextId = STR_TOKEN_ENTRY; - m_aButtonTexts[i] = SW_RESSTR(nTextId); + m_aButtonTexts[i] = SwResId(nTextId); sal_uInt32 nHelpId = STR_BUTTON_HELP_TEXT_START + i; if(STR_TOKEN_HELP_ENTRY_TEXT == nHelpId) nHelpId = STR_TOKEN_HELP_ENTRY; - m_aButtonHelpTexts[i] = SW_RESSTR(nHelpId); + m_aButtonHelpTexts[i] = SwResId(nHelpId); } - m_sAccessibleName = SW_RESSTR(STR_STRUCTURE); - m_sAdditionalAccnameString1 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING1); - m_sAdditionalAccnameString2 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING2); - m_sAdditionalAccnameString3 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING3); + m_sAccessibleName = SwResId(STR_STRUCTURE); + m_sAdditionalAccnameString1 = SwResId(STR_ADDITIONAL_ACCNAME_STRING1); + m_sAdditionalAccnameString2 = SwResId(STR_ADDITIONAL_ACCNAME_STRING2); + m_sAdditionalAccnameString3 = SwResId(STR_ADDITIONAL_ACCNAME_STRING3); Link<Button*,void> aLink(LINK(this, SwTokenWindow, ScrollHdl)); m_pLeftScrollWin->SetClickHdl(aLink); @@ -3648,7 +3648,7 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) // display form pattern without title // display 1st TemplateEntry - OUString aStr( SW_RES( STR_TITLE )); + OUString aStr( SwResId( STR_TITLE )); if( !m_pCurrentForm->GetTemplate( 0 ).isEmpty() ) { aStr += " " + OUStringLiteral1(aDeliStart) @@ -3662,11 +3662,11 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) if( TOX_INDEX == m_pCurrentForm->GetTOXType() && FORM_ALPHA_DELIMITTER == i ) { - aStr = SW_RESSTR(STR_ALPHA); + aStr = SwResId(STR_ALPHA); } else { - aStr = SW_RESSTR(STR_LEVEL) + OUString::number( + aStr = SwResId(STR_LEVEL) + OUString::number( TOX_INDEX == m_pCurrentForm->GetTOXType() ? i - 1 : i ); } if( !m_pCurrentForm->GetTemplate( i ).isEmpty() ) diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index cc5e6ee1567b..a4b817296e76 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -135,7 +135,7 @@ SwIndexMarkPane::SwIndexMarkPane(Dialog &rDialog, bool bNewDlg, m_pPhoneticED2->Show(); } - rDialog.SetText( SW_RESSTR( bNewMark ? STR_IDXMRK_INSERT : STR_IDXMRK_EDIT)); + rDialog.SetText( SwResId( bNewMark ? STR_IDXMRK_INSERT : STR_IDXMRK_EDIT)); m_pDelBT->SetClickHdl(LINK(this,SwIndexMarkPane, DelHdl)); m_pPrevBT->SetClickHdl(LINK(this,SwIndexMarkPane, PrevHdl)); @@ -1115,7 +1115,7 @@ SwAuthorMarkPane::SwAuthorMarkPane(Dialog &rDialog, bool bNewDlg) m_pFromDocContentRB->SetClickHdl(LINK(this,SwAuthorMarkPane, ChangeSourceHdl)); m_pEntryED->SetModifyHdl(LINK(this,SwAuthorMarkPane, EditModifyHdl)); - m_rDialog.SetText(SW_RESSTR( + m_rDialog.SetText(SwResId( bNewEntry ? STR_AUTHMRK_INSERT : STR_AUTHMRK_EDIT)); m_pEntryED->Show(!bNewEntry); @@ -1224,7 +1224,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl, Button*, void) bDifferent |= m_sFields[i] != pEntry->GetAuthorField((ToxAuthorityField)i); if(bDifferent) { - ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VclMessageType::Question, VclButtonsType::YesNo); + ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SwResId(STR_QUERY_CHANGE_AUTH_ENTRY), VclMessageType::Question, VclButtonsType::YesNo); if(RET_YES != aQuery->Execute()) return; } @@ -1462,14 +1462,14 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent, pFixedTexts[nIndex]->set_grid_left_attach(0); pFixedTexts[nIndex]->set_grid_top_attach(bLeft ? nLeftRow : nRightRow); - pFixedTexts[nIndex]->SetText(SW_RES(STR_AUTH_FIELD_START + aCurInfo.nToxField)); + pFixedTexts[nIndex]->SetText(SwResId(STR_AUTH_FIELD_START + aCurInfo.nToxField)); pFixedTexts[nIndex]->Show(); pEdits[nIndex] = nullptr; if( AUTH_FIELD_AUTHORITY_TYPE == aCurInfo.nToxField ) { pTypeListBox = VclPtr<ListBox>::Create(bLeft ? pLeft : pRight, WB_DROPDOWN|WB_BORDER|WB_VCENTER); for(int j = 0; j < AUTH_TYPE_END; j++) - pTypeListBox->InsertEntry(SW_RESSTR(STR_AUTH_TYPE_START + j)); + pTypeListBox->InsertEntry(SwResId(STR_AUTH_TYPE_START + j)); if(!pFields[aCurInfo.nToxField].isEmpty()) { pTypeListBox->SelectEntryPos(pFields[aCurInfo.nToxField].toInt32()); diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index fdf2c1dd1b95..cf6e0786de28 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -322,7 +322,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(vcl::Window* pParent, SwWrtShell& rS, S m_pEditBox->SetText(m_pBookmarksBox->GetNameProposal()); m_pEditBox->SetCursorAtLast(); - sRemoveWarning = OUString(SW_RES(STR_REMOVE_WARNING)); + sRemoveWarning = SwResId(STR_REMOVE_WARNING); } SwInsertBookmarkDlg::~SwInsertBookmarkDlg() @@ -349,9 +349,9 @@ BookmarkTable::BookmarkTable(SvSimpleTableContainer& rParent) : SetTabs(nTabs, MapUnit::MapPixel); SetSelectionMode(SelectionMode::Multiple); - InsertHeaderEntry(OUString(SW_RES(STR_PAGE))); - InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_NAME))); - InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_TEXT))); + InsertHeaderEntry(SwResId(STR_PAGE)); + InsertHeaderEntry(SwResId(STR_BOOKMARK_NAME)); + InsertHeaderEntry(SwResId(STR_BOOKMARK_TEXT)); rParent.SetTable(this); } @@ -428,7 +428,7 @@ void BookmarkTable::SelectByName(const OUString& sName) OUString BookmarkTable::GetNameProposal() { - OUString sDefaultBookmarkName = SW_RES(STR_BOOKMARK_DEF_NAME); + OUString sDefaultBookmarkName = SwResId(STR_BOOKMARK_DEF_NAME); sal_Int32 nHighestBookmarkId = 0; SvTreeListEntry* pEntry = First(); while (pEntry) diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index bd1ab18405e6..7eaa028790ff 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -149,9 +149,9 @@ void SwGlossaryGroupDlg::Apply() } } OUString sTitle( it->getToken(1, '\t') ); - const OUString sMsg(SW_RESSTR(STR_QUERY_DELETE_GROUP1) + const OUString sMsg(SwResId(STR_QUERY_DELETE_GROUP1) + sTitle - + SW_RESSTR(STR_QUERY_DELETE_GROUP2)); + + SwResId(STR_QUERY_DELETE_GROUP2)); ScopedVclPtrInstance< QueryBox > aQuery(this->GetParent(), WB_YES_NO|WB_DEF_NO, sMsg ); if(RET_YES == aQuery->Execute()) pGlosHdl->DelGroup( sDelGroup ); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index a19a96e61bb4..68120c772a25 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -192,7 +192,7 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl * pGlosHdl, SwWrtShell *pWrtShell) : SvxStandardDialog(&pViewFrame->GetWindow(), "AutoTextDialog", "modules/swriter/ui/autotext.ui") - , sReadonlyPath(SW_RESSTR(STR_READONLY_PATH)) + , sReadonlyPath(SwResId(STR_READONLY_PATH)) , pExampleFrame(nullptr) , pGlossaryHdl(pGlosHdl) , bResume(false) @@ -465,7 +465,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) const OUString aShortName(m_pShortNameEdit->GetText()); if(pGlossaryHdl->HasShortName(aShortName)) { - ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SwResId(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pShortNameEdit->SetSelection(Selection(0, SELECTION_MAX)); m_pShortNameEdit->GrabFocus(); return true; @@ -592,7 +592,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) Init(); else { - ScopedVclPtrInstance<MessageDialog>(this, SW_RES( STR_NO_GLOSSARIES ), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SwResId( STR_NO_GLOSSARIES ), VclMessageType::Info)->Execute(); } } } @@ -691,7 +691,7 @@ void SwGlossaryDlg::Init() const sal_Int32 nSelPath = ::GetCurrGlosGroup().getToken(1, GLOS_DELIM).toInt32(); // #i66304# - "My AutoText" comes from mytexts.bau, but should be translated const OUString sMyAutoTextEnglish("My AutoText"); - const OUString sMyAutoTextTranslated(SW_RES(STR_MY_AUTOTEXT)); + const OUString sMyAutoTextTranslated(SwResId(STR_MY_AUTOTEXT)); for(size_t nId = 0; nId < nCnt; ++nId ) { OUString sTitle; @@ -805,7 +805,7 @@ IMPL_LINK_NOARG(SwNewGlosNameDlg, Rename, Button*, void) if( pDlg->pGlossaryHdl->HasShortName(m_pNewShort->GetText()) && sNew != m_pOldShort->GetText() ) { - ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SwResId(STR_DOUBLE_SHORTNAME), VclMessageType::Info)->Execute(); m_pNewShort->GrabFocus(); } else @@ -828,7 +828,7 @@ IMPL_LINK( SwGlossaryDlg, CheckBoxHdl, Button *, pBox, void ) // TreeListBox for groups and blocks SwGlTreeListBox::SwGlTreeListBox(vcl::Window* pParent, WinBits nBits) : SvTreeListBox(pParent, nBits) - , sReadonly(SW_RESSTR(SW_STR_READONLY)), + , sReadonly(SwResId(SW_STR_READONLY)), pDragEntry(nullptr) { SetDragDropMode( DragDropMode::CTRL_MOVE|DragDropMode::CTRL_COPY ); @@ -1141,7 +1141,7 @@ void SwGlossaryDlg::DeleteEntry() const bool bExists = nullptr != pChild; const bool bIsGroup = pEntry && !pParent; - ScopedVclPtrInstance< MessageDialog > aQuery(this, SW_RES(STR_QUERY_DELETE), VclMessageType::Question, VclButtonsType::YesNo); + ScopedVclPtrInstance< MessageDialog > aQuery(this, SwResId(STR_QUERY_DELETE), VclMessageType::Question, VclButtonsType::YesNo); if (bExists && !bIsGroup && RET_YES == aQuery->Execute()) { if (!aTitle.isEmpty() && pGlossaryHdl->DelGlossary(aShortName)) diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index ae5ce7397968..b31af09f6f29 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -147,7 +147,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) m_pNumberingOnCB->Check(rInf.IsPaintLineNumbers()); // Header/Footer Line Numbering - rtl::Reference< SwDocStyleSheet > xStyleSheet = lcl_getDocStyleSheet(SW_RESSTR(STR_POOLCOLL_FOOTER), pSh); + rtl::Reference< SwDocStyleSheet > xStyleSheet = lcl_getDocStyleSheet(SwResId(STR_POOLCOLL_FOOTER), pSh); if(xStyleSheet.is()) { SfxItemSet& rSet = xStyleSheet->GetItemSet(); @@ -244,8 +244,8 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl, Button*, void) pSh->SetLineNumberInfo(aInf); // Set LineNumber explicitly for Header and Footer - lcl_setLineNumbering(SW_RESSTR(STR_POOLCOLL_FOOTER), pSh, m_pNumberingOnFooterHeader->IsChecked()); - lcl_setLineNumbering(SW_RESSTR(STR_POOLCOLL_HEADER), pSh, m_pNumberingOnFooterHeader->IsChecked()); + lcl_setLineNumbering(SwResId(STR_POOLCOLL_FOOTER), pSh, m_pNumberingOnFooterHeader->IsChecked()); + lcl_setLineNumbering(SwResId(STR_POOLCOLL_HEADER), pSh, m_pNumberingOnFooterHeader->IsChecked()); if( m_pNumberingOnFooterHeader->IsChecked()) m_pNumberingOnFooterHeader->SetState(TRISTATE_TRUE); else diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index f58153e81672..2a8aa76ca608 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -421,7 +421,7 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(vcl::Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "OutlineNumberingPage", "modules/swriter/ui/outlinenumberingpage.ui", &rSet) - , aNoFormatName(SW_RESSTR(SW_STR_NONE)) + , aNoFormatName(SwResId(SW_STR_NONE)) , pSh(nullptr) , pNumRule(nullptr) , pCollNames(nullptr) diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index b89ad0779d89..65f5829dc936 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -198,7 +198,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet) // Separator style m_pLineTypeBox->SetSourceUnit( FUNIT_TWIP ); - m_pLineTypeBox->SetNone(SW_RESSTR(SW_STR_NONE)); + m_pLineTypeBox->SetNone(SwResId(SW_STR_NONE)); m_pLineTypeBox->InsertEntry( ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::SOLID), SvxBorderLineStyle::SOLID ); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index ab338be9ce13..a6a2b11b3a50 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -108,9 +108,9 @@ static bool lcl_GetSelTable( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY ) // init list SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell) : SvxStandardDialog(pParent, "SortDialog", "modules/swriter/ui/sortdialog.ui") - , aColText(SW_RES(STR_COL)) - , aRowText(SW_RES(STR_ROW)) - , aNumericText(SW_RES(STR_NUMERIC)) + , aColText(SwResId(STR_COL)) + , aRowText(SwResId(STR_ROW)) + , aNumericText(SwResId(STR_NUMERIC)) , rSh(rShell) , pColRes(nullptr) , nX(99) @@ -365,7 +365,7 @@ void SwSortDlg::Apply() } if( !bRet ) - ScopedVclPtrInstance<MessageDialog>(this->GetParent(), SW_RES(STR_SRTERR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this->GetParent(), SwResId(STR_SRTERR), VclMessageType::Info)->Execute(); } IMPL_LINK( SwSortDlg, DelimHdl, Button*, pButton, void ) diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 4c67c428076f..d37c808cce8a 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -95,7 +95,7 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) : SfxModalDialog(&rView.GetViewFrame()->GetWindow(), "ConvertTextTableDialog", "modules/swriter/ui/converttexttable.ui" ) - , sConvertTextTable(SW_RES(STR_CONVERT_TEXT_TABLE)) + , sConvertTextTable(SwResId(STR_CONVERT_TEXT_TABLE)) , pTAutoFormat(nullptr) , pShell(&rView.GetWrtShell()) { diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 603fa93c7fb5..465fdc9c4b62 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -628,7 +628,7 @@ DeactivateRC SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) OUString sTableName = m_pNameED->GetText(); if(sTableName.indexOf(' ') != -1) { - ScopedVclPtrInstance<MessageDialog>(this, SW_RES(STR_WRONG_TABLENAME), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(this, SwResId(STR_WRONG_TABLENAME), VclMessageType::Info)->Execute(); m_pNameED->GrabFocus(); return DeactivateRC::KeepPage; } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 0af33923bf71..5e5701f3ce80 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -142,13 +142,13 @@ void SwStringInputDlg::dispose() SwAutoFormatDlg::SwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pWrtShell, bool bAutoFormat, const SwTableAutoFormat* pSelFormat ) : SfxModalDialog(pParent, "AutoFormatTableDialog", "modules/swriter/ui/autoformattable.ui") - , aStrTitle(SW_RES(STR_ADD_AUTOFORMAT_TITLE)) - , aStrLabel(SW_RES(STR_ADD_AUTOFORMAT_LABEL)) - , aStrClose(SW_RES(STR_BTN_AUTOFORMAT_CLOSE)) - , aStrDelTitle(SW_RES(STR_DEL_AUTOFORMAT_TITLE)) - , aStrDelMsg(SW_RES(STR_DEL_AUTOFORMAT_MSG)) - , aStrRenameTitle(SW_RES(STR_RENAME_AUTOFORMAT_TITLE)) - , aStrInvalidFormat(SW_RES(STR_INVALID_AUTOFORMAT_NAME)) + , aStrTitle(SwResId(STR_ADD_AUTOFORMAT_TITLE)) + , aStrLabel(SwResId(STR_ADD_AUTOFORMAT_LABEL)) + , aStrClose(SwResId(STR_BTN_AUTOFORMAT_CLOSE)) + , aStrDelTitle(SwResId(STR_DEL_AUTOFORMAT_TITLE)) + , aStrDelMsg(SwResId(STR_DEL_AUTOFORMAT_MSG)) + , aStrRenameTitle(SwResId(STR_RENAME_AUTOFORMAT_TITLE)) + , aStrInvalidFormat(SwResId(STR_INVALID_AUTOFORMAT_NAME)) , pShell(pWrtShell) , nIndex(0) , nDfltStylePos(0) @@ -509,13 +509,13 @@ AutoFormatPreview::AutoFormatPreview(vcl::Window* pParent, WinBits nStyle) : aVD ( VclPtr<VirtualDevice>::Create(*this) ), bFitWidth ( false ), mbRTL ( false ), - aStrJan ( SW_RES( STR_JAN ) ), - aStrFeb ( SW_RES( STR_FEB ) ), - aStrMar ( SW_RES( STR_MAR ) ), - aStrNorth ( SW_RES( STR_NORTH ) ), - aStrMid ( SW_RES( STR_MID ) ), - aStrSouth ( SW_RES( STR_SOUTH ) ), - aStrSum ( SW_RES( STR_SUM ) ) + aStrJan ( SwResId( STR_JAN ) ), + aStrFeb ( SwResId( STR_FEB ) ), + aStrMar ( SwResId( STR_MAR ) ), + aStrNorth ( SwResId( STR_NORTH ) ), + aStrMid ( SwResId( STR_MID ) ), + aStrSouth ( SwResId( STR_SOUTH ) ), + aStrSum ( SwResId( STR_SUM ) ) { uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); m_xBreak = i18n::BreakIterator::create(xContext); diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index ec4bfc0a4187..9d24de198036 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -165,7 +165,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) pNewView->AttrChangedNotify( &pNewView->GetWrtShell() ); // so that SelectShell is being called pSh = pNewView->GetWrtShellPtr(); - OUString aTmp( SW_RES(STR_ENV_TITLE) ); + OUString aTmp( SwResId(STR_ENV_TITLE) ); aTmp += OUString::number( ++nTitleNo ); xDocSh->SetTitle( aTmp ); diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 8fe5e3493e4c..a55e3962592d 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -209,7 +209,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) OUString aTmp; if(bLabel) { - aTmp = SW_RES( STR_LAB_TITLE); + aTmp = SwResId( STR_LAB_TITLE); aTmp += OUString::number(++nLabelTitleNo ); } else diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 4d1b3d9c1d31..2f1815ab6598 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -176,7 +176,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { if(!bAPICall) { - ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR(STR_CANTOPEN))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SwResId(STR_CANTOPEN))->Execute(); } return nullptr; } @@ -536,7 +536,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter ); if( !xWriter.is() ) { // Filter not available - ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR(STR_DLLNOTFOUND))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SwResId(STR_DLLNOTFOUND))->Execute(); return false; } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 5348175ffc58..767ddcff9929 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -151,7 +151,7 @@ VclPtr<SfxDocumentInfoDialog> SwDocShell::CreateDocumentInfoDialog(const SfxItem SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pDlg->AddFontTabPage(); - pDlg->AddTabPage(TP_DOC_STAT, SW_RESSTR(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),nullptr); + pDlg->AddTabPage(TP_DOC_STAT, SwResId(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),nullptr); } } return pDlg; @@ -751,7 +751,7 @@ void SwDocShell::Execute(SfxRequest& rReq) SwView *pCurrView = static_cast<SwView*>( pFrame->GetViewShell()); // Set document's title - OUString aTmp( SW_RES(STR_ABSTRACT_TITLE) ); + OUString aTmp( SwResId(STR_ABSTRACT_TITLE) ); aTmp += GetTitle(); xDocSh->SetTitle( aTmp ); pCurrView->GetWrtShell().SetNewDoc(); @@ -972,14 +972,14 @@ void SwDocShell::Execute(SfxRequest& rReq) OUString* pEntries = aListBoxEntries.getArray(); sal_Int32 nIdx = 0 ; - OUString sOutline( SW_RESSTR(STR_FDLG_OUTLINE_LEVEL) ); + OUString sOutline( SwResId(STR_FDLG_OUTLINE_LEVEL) ); for( sal_uInt16 i = 0; i < MAXLEVEL; ++i ) { if( bOutline[i] ) pEntries[nIdx++] = sOutline + OUString::number( i+1 ); } - OUString sStyle( SW_RESSTR(STR_FDLG_STYLE) ); + OUString sStyle( SwResId(STR_FDLG_STYLE) ); for(sal_uInt16 i = 0; i < nStyleCount; ++i) { SwTextFormatColl &rTextColl = *(*m_pDoc->GetTextFormatColls())[ i ]; @@ -1002,14 +1002,14 @@ void SwDocShell::Execute(SfxRequest& rReq) xCtrlAcc->setValue( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE, ListboxControlActions::SET_SELECT_ITEM, aSelectPos ); xCtrlAcc->setLabel( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE, - SW_RES( STR_FDLG_TEMPLATE_NAME )); + SwResId( STR_FDLG_TEMPLATE_NAME )); } catch (const Exception&) { OSL_FAIL("control access failed"); } - xFP->setTitle( SW_RESSTR( nStrId )); + xFP->setTitle( SwResId( nStrId )); SvtPathOptions aPathOpt; xFP->setDisplayDirectory( aPathOpt.GetWorkPath() ); if( ERRCODE_NONE == aDlgHelper.Execute()) @@ -1088,7 +1088,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } if( !bDone && !rReq.IsAPI() ) { - ScopedVclPtrInstance<InfoBox>(nullptr, SW_RESSTR( STR_CANTCREATE))->Execute(); + ScopedVclPtrInstance<InfoBox>(nullptr, SwResId( STR_CANTCREATE))->Execute(); } } } @@ -1237,13 +1237,13 @@ void SwDocShell::FillClass( SvGlobalName * pClassName, { *pClassName = SvGlobalName( SO3_SW_CLASSID_60 ); *pClipFormat = SotClipboardFormatId::STARWRITER_60; - *pLongUserName = SW_RESSTR(STR_WRITER_DOCUMENT_FULLTYPE); + *pLongUserName = SwResId(STR_WRITER_DOCUMENT_FULLTYPE); } else if (nVersion == SOFFICE_FILEFORMAT_8) { *pClassName = SvGlobalName( SO3_SW_CLASSID_60 ); *pClipFormat = bTemplate ? SotClipboardFormatId::STARWRITER_8_TEMPLATE : SotClipboardFormatId::STARWRITER_8; - *pLongUserName = SW_RESSTR(STR_WRITER_DOCUMENT_FULLTYPE); + *pLongUserName = SwResId(STR_WRITER_DOCUMENT_FULLTYPE); } // #FIXME check with new Event handling #if 0 @@ -1252,7 +1252,7 @@ void SwDocShell::FillClass( SvGlobalName * pClassName, lcl_processCompatibleSfxHint( xVbaEventsHelper, rHint ); #endif - *pUserName = SW_RESSTR(STR_HUMAN_SWDOC_NAME); + *pUserName = SwResId(STR_HUMAN_SWDOC_NAME); } void SwDocShell::SetModified( bool bSet ) diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 18fe13698f7d..b694ca7f0a51 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -978,7 +978,7 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) bIsDefault = true; if(!bHasCJKFontPrefix) { - aItemPresentation = SW_RESSTR(STR_CJK_FONT) + aItemPresentation; + aItemPresentation = SwResId(STR_CJK_FONT) + aItemPresentation; bHasCJKFontPrefix = true; } break; @@ -989,7 +989,7 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) case RES_CHRATR_WEIGHT: if(!bHasWesternFontPrefix) { - aItemPresentation = SW_RESSTR(STR_WESTERN_FONT) + aItemPresentation; + aItemPresentation = SwResId(STR_WESTERN_FONT) + aItemPresentation; bHasWesternFontPrefix = true; } SAL_FALLTHROUGH; @@ -1012,10 +1012,10 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit) { if (!aDesc.isEmpty()) aDesc += sPlus; - aDesc += SW_RESSTR(STR_PAGEBREAK) + sPlus + sModel; + aDesc += SwResId(STR_PAGEBREAK) + sPlus + sModel; if (sPageNum != "0") { - aDesc += sPlus + SW_RESSTR(STR_PAGEOFFSET) + sPageNum; + aDesc += sPlus + SwResId(STR_PAGEOFFSET) + sPageNum; } } else if (!sBreak.isEmpty()) // Break can be valid only when NO Model diff --git a/sw/source/uibase/app/mainwn.cxx b/sw/source/uibase/app/mainwn.cxx index e37faf434c24..44e4b9b1c036 100644 --- a/sw/source/uibase/app/mainwn.cxx +++ b/sw/source/uibase/app/mainwn.cxx @@ -64,7 +64,7 @@ void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue, { pProgress = new SwProgress; pProgress->pProgress = new SfxProgress( pDocShell, - SW_RESSTR(nMessResId), + SwResId(nMessResId), nEndValue - nStartValue ); pProgress->nStartCount = 1; pProgress->pDocShell = pDocShell; @@ -123,7 +123,7 @@ void SetProgressText( sal_uInt16 nId, SwDocShell *pDocShell ) { SwProgress *pProgress = lcl_SwFindProgress( pDocShell ); if ( pProgress ) - pProgress->pProgress->SetStateText( 0, SW_RESSTR(nId) ); + pProgress->pProgress->SetStateText( 0, SwResId(nId) ); } } diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx index 28437f6e7d5e..4d03053de05e 100644 --- a/sw/source/uibase/app/swmodul1.cxx +++ b/sw/source/uibase/app/swmodul1.cxx @@ -403,7 +403,7 @@ std::size_t SwModule::GetRedlineAuthor() { m_sActAuthor = rOpt.GetID(); if (m_sActAuthor.isEmpty()) - m_sActAuthor = SW_RESSTR( STR_REDLINE_UNKNOWN_AUTHOR ); + m_sActAuthor = SwResId( STR_REDLINE_UNKNOWN_AUTHOR ); } m_bAuthorInitialised = true; } diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 0b7734ac5f7a..9296b29096df 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -403,34 +403,34 @@ SfxStyleFamilies* SwModule::CreateStyleFamilies() SfxStyleFamilies *pStyleFamilies = new SfxStyleFamilies; pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para, - SW_RESSTR(STR_PARAGRAPHSTYLEFAMILY), + SwResId(STR_PARAGRAPHSTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_PARA)), - SW_RES(RID_PARAGRAPHSTYLEFAMILY))); + ResId(RID_PARAGRAPHSTYLEFAMILY, *pSwResMgr))); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Char, - SW_RESSTR(STR_CHARACTERSTYLEFAMILY), + SwResId(STR_CHARACTERSTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_CHAR)), - SW_RES(RID_CHARACTERSTYLEFAMILY))); + ResId(RID_CHARACTERSTYLEFAMILY, *pSwResMgr))); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Frame, - SW_RESSTR(STR_FRAMESTYLEFAMILY), + SwResId(STR_FRAMESTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_FRAME)), - SW_RES(RID_FRAMESTYLEFAMILY))); + ResId(RID_FRAMESTYLEFAMILY, *pSwResMgr))); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Page, - SW_RESSTR(STR_PAGESTYLEFAMILY), + SwResId(STR_PAGESTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_PAGE)), - SW_RES(RID_PAGESTYLEFAMILY))); + ResId(RID_PAGESTYLEFAMILY, *pSwResMgr))); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Pseudo, - SW_RESSTR(STR_LISTSTYLEFAMILY), + SwResId(STR_LISTSTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_LIST)), - SW_RES(RID_LISTSTYLEFAMILY))); + ResId(RID_LISTSTYLEFAMILY, *pSwResMgr))); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Table, - SW_RESSTR(STR_TABLESTYLEFAMILY), + SwResId(STR_TABLESTYLEFAMILY), Image(BitmapEx(BMP_STYLES_FAMILY_TABLE)), - SW_RES(RID_TABLESTYLEFAMILY))); + ResId(RID_TABLESTYLEFAMILY, *pSwResMgr))); return pStyleFamilies; } diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 05f541ecc730..421ed22c59c9 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1395,7 +1395,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, PrintMonitor *pPrintMonDlg = static_cast<PrintMonitor*>( pProgressDlg.get() ); pPrintMonDlg->m_pPrinter->SetText( bNeedsTempFiles ? aTempFileURL->GetBase() : pSourceDocSh->GetTitle( 22 ) ); - OUString sStat( SW_RES(STR_STATSTR_LETTER) ); + OUString sStat( SwResId(STR_STATSTR_LETTER) ); sStat += " " + OUString::number( nDocNo ); pPrintMonDlg->m_pPrintInfo->SetText( sStat ); } @@ -2563,17 +2563,17 @@ OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell) uno::Reference<ui::dialogs::XFilterManager> xFltMgr(xFP, uno::UNO_QUERY); - OUString sFilterAll(SW_RES(STR_FILTER_ALL)); - OUString sFilterAllData(SW_RES(STR_FILTER_ALL_DATA)); - OUString sFilterSXB(SW_RES(STR_FILTER_SXB)); - OUString sFilterSXC(SW_RES(STR_FILTER_SXC)); - OUString sFilterDBF(SW_RES(STR_FILTER_DBF)); - OUString sFilterXLS(SW_RES(STR_FILTER_XLS)); - OUString sFilterTXT(SW_RES(STR_FILTER_TXT)); - OUString sFilterCSV(SW_RES(STR_FILTER_CSV)); + OUString sFilterAll(SwResId(STR_FILTER_ALL)); + OUString sFilterAllData(SwResId(STR_FILTER_ALL_DATA)); + OUString sFilterSXB(SwResId(STR_FILTER_SXB)); + OUString sFilterSXC(SwResId(STR_FILTER_SXC)); + OUString sFilterDBF(SwResId(STR_FILTER_DBF)); + OUString sFilterXLS(SwResId(STR_FILTER_XLS)); + OUString sFilterTXT(SwResId(STR_FILTER_TXT)); + OUString sFilterCSV(SwResId(STR_FILTER_CSV)); #ifdef _WIN32 - OUString sFilterMDB(SW_RES(STR_FILTER_MDB)); - OUString sFilterACCDB(SW_RES(STR_FILTER_ACCDB)); + OUString sFilterMDB(SwResId(STR_FILTER_MDB)); + OUString sFilterACCDB(SwResId(STR_FILTER_ACCDB)); #endif xFltMgr->appendFilter( sFilterAll, "*" ); xFltMgr->appendFilter( sFilterAllData, "*.ods;*.sxc;*.dbf;*.xls;*.txt;*.csv"); diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 54dde02de306..1bbbfc5d76c5 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -465,7 +465,7 @@ OUString SwAddressPreview::FillData( const OUString* pAssignment = aAssignment.getConstArray(); const ResStringArray& rDefHeaders = rConfigItem.GetDefaultAddressHeaders(); OUString sAddress(rAddress); - OUString sNotAssigned = "<" + OUString(SW_RES(STR_NOTASSIGNED)) + ">"; + OUString sNotAssigned = "<" + SwResId(STR_NOTASSIGNED) + ">"; bool bIncludeCountry = rConfigItem.IsIncludeCountry(); const OUString rExcludeCountry = rConfigItem.GetExcludeCountry(); diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx index 5aa6e0d88f15..8a4a10f7a2eb 100644 --- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx +++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx @@ -245,7 +245,7 @@ uno::Reference<awt::XWindow> MMExcludeEntryController::createItemWindow(const un { // make it visible m_pExcludeCheckbox = VclPtr<CheckBox>::Create(pToolbar); - m_pExcludeCheckbox->SetText(SW_RES(ST_EXCLUDE)); + m_pExcludeCheckbox->SetText(SwResId(ST_EXCLUDE)); m_pExcludeCheckbox->SetSizePixel(m_pExcludeCheckbox->GetOptimalSize()); m_pExcludeCheckbox->SetToggleHdl(LINK(this, MMExcludeEntryController, ExcludeHdl)); diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 9747e192fc9c..cabe4be6bbb0 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -200,7 +200,7 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() : m_bIsAuthentication(false), m_bIsEMailSupported(false), - m_AddressHeaderSA( SW_RES( SA_ADDRESS_HEADER )), + m_AddressHeaderSA(ResId(SA_ADDRESS_HEADER, *pSwResMgr)), m_bUserSettingWereOverwritten(false), m_bIsAddressBlock_LastUserSetting(false), m_bIsGreetingLineInMail_LastUserSetting(false), diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 7221ba49a545..52aeec2e47a3 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -389,7 +389,7 @@ The code below would only be part of the solution. if(m_pSpellState->m_xStartRange.is()) { LockFocusNotification( true ); - sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(GetWindow(), SW_RES(STR_QUERY_SPELL_CONTINUE), + sal_uInt16 nRet = ScopedVclPtrInstance<MessageDialog>(GetWindow(), SwResId(STR_QUERY_SPELL_CONTINUE), VclMessageType::Question, VclButtonsType::YesNo)->Execute(); if(RET_YES == nRet) { @@ -416,7 +416,7 @@ The code below would only be part of the solution. if(bCloseMessage) { LockFocusNotification( true ); - OUString sInfo(SW_RES(STR_SPELLING_COMPLETED)); + OUString sInfo(SwResId(STR_SPELLING_COMPLETED)); // #i84610# vcl::Window* pTemp = GetWindow(); // temporary needed for g++ 3.3.5 ScopedVclPtrInstance<MessageDialog>(pTemp, sInfo, VclMessageType::Info)->Execute(); diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 8add26e4fb38..78293eca2a4d 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -322,7 +322,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam rCfg.IsSaveRelFile(), pOnlyText ); if(nSuccess == (sal_uInt16) -1 ) { - ScopedVclPtrInstance<MessageDialog>(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWrtShell->GetView().GetWindow(), SwResId(STR_ERR_INSERT_GLOS), VclMessageType::Info)->Execute(); } if( !pCurGrp ) delete pTmp; @@ -474,7 +474,7 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName, { aShortName = aShortName.copy(0, nMaxLen) + " ..."; } - OUString aTmp( SW_RES(STR_NOGLOS)); + OUString aTmp( SwResId(STR_NOGLOS)); aTmp = aTmp.replaceFirst("%1", aShortName); ScopedVclPtrInstance<InfoBox>(pWrtShell->GetView().GetWindow(), aTmp)->Execute(); } diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 897bd01281ae..4615824bccc3 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1706,7 +1706,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData, if( bMsg && nResId ) { - ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(nResId), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(nResId), VclMessageType::Info)->Execute(); } return bRet; } @@ -1780,7 +1780,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if( !IsError( aReader.Read( *pRead )) ) bRet = true; else if( bMsg ) - ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(STR_ERROR_CLPBRD_READ), VclMessageType::Info)->Execute(); } else { @@ -2159,7 +2159,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if (nRows > USHRT_MAX || nCols > USHRT_MAX) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_TABLE_TOO_LARGE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(STR_TABLE_TOO_LARGE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2168,7 +2168,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, if( !nRows || !nCols ) { if( bMsg ) - ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RESSTR(STR_NO_TABLE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(STR_NO_TABLE), VclMessageType::Info)->Execute(); pDDETyp = nullptr; break; } @@ -2714,7 +2714,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } @@ -2753,7 +2753,7 @@ bool SwTransferable::PasteFileList( TransferableDataHelper& rData, } else if( bMsg ) { - ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(STR_CLPBRD_FORMAT_ERROR), VclMessageType::Info)->Execute(); } return bRet; } @@ -2919,7 +2919,7 @@ bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rDat aFormats.insert( aFormats.begin(), aFlavorEx ); } pDlg->SetObjName( pClipboard->m_aObjDesc.maClassName, - SW_RES( nResId ) ); + SwResId( nResId ) ); pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, aEmptyOUStr ); } } @@ -2938,7 +2938,7 @@ bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rDat } if( SwTransferable::TestAllowedFormat( rData, SotClipboardFormatId::LINK, nDest )) - pDlg->Insert( SotClipboardFormatId::LINK, SW_RES(STR_DDEFORMAT) ); + pDlg->Insert( SotClipboardFormatId::LINK, SwResId(STR_DDEFORMAT) ); for( SotClipboardFormatId* pIds = aPasteSpecialIds; *pIds != SotClipboardFormatId::NONE; ++pIds ) if( SwTransferable::TestAllowedFormat( rData, *pIds, nDest )) @@ -2976,7 +2976,7 @@ void SwTransferable::FillClipFormatItem( const SwWrtShell& rSh, if( nResId ) rToFill.AddClipbrdFormat( SotClipboardFormatId::EMBED_SOURCE, - SW_RESSTR( nResId ) ); + SwResId( nResId ) ); } else { @@ -3003,7 +3003,7 @@ void SwTransferable::FillClipFormatItem( const SwWrtShell& rSh, } if( SwTransferable::TestAllowedFormat( rData, SotClipboardFormatId::LINK, nDest )) - rToFill.AddClipbrdFormat( SotClipboardFormatId::LINK, SW_RESSTR(STR_DDEFORMAT) ); + rToFill.AddClipbrdFormat( SotClipboardFormatId::LINK, SwResId(STR_DDEFORMAT) ); for( SotClipboardFormatId* pIds = aPasteSpecialIds; *pIds != SotClipboardFormatId::NONE; ++pIds ) if( SwTransferable::TestAllowedFormat( rData, *pIds, nDest )) diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx index f0cf0645608c..1969ce7f9128 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx @@ -49,8 +49,8 @@ AnnotationMenuButton::AnnotationMenuButton(sw::annotation::SwAnnotationWin& rSid { AddEventListener(LINK(&mrSidebarWin, sw::annotation::SwAnnotationWin, WindowEventListener)); - SetAccessibleName(SW_RES(STR_ACCESS_ANNOTATION_BUTTON_NAME)); - SetAccessibleDescription(SW_RES(STR_ACCESS_ANNOTATION_BUTTON_DESC)); + SetAccessibleName(SwResId(STR_ACCESS_ANNOTATION_BUTTON_NAME)); + SetAccessibleDescription(SwResId(STR_ACCESS_ANNOTATION_BUTTON_DESC)); SetQuickHelpText(GetAccessibleDescription()); } @@ -111,7 +111,7 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt ) { if ((sAuthor = aUserOpt.GetID()).isEmpty()) { - sAuthor = SW_RES(STR_REDLINE_UNKNOWN_AUTHOR); + sAuthor = SwResId(STR_REDLINE_UNKNOWN_AUTHOR); } } // do not allow to reply to ourself and no answer possible if this note is in a protected section diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 8bbb502c5ce6..a55764f4434d 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -368,7 +368,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData(); SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, pWin->GetAuthor()); - const OUString aText = aRewriter.Apply(SW_RESSTR(STR_REPLY)) + const OUString aText = aRewriter.Apply(SwResId(STR_REPLY)) + " (" + rLocalData.getDate( pWin->GetDate()) + ", " + rLocalData.getTime( pWin->GetTime(), false) + "): \""; diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index c61b7a82f45d..e4360ab085ea 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -448,7 +448,7 @@ void SwAnnotationWin::InitControls() // window controls for author and date mpMetadataAuthor = VclPtr<Edit>::Create( this, 0 ); - mpMetadataAuthor->SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_AUTHOR_NAME ) ); + mpMetadataAuthor->SetAccessibleName( SwResId( STR_ACCESS_ANNOTATION_AUTHOR_NAME ) ); mpMetadataAuthor->EnableRTL(AllSettings::GetLayoutRTL()); mpMetadataAuthor->SetReadOnly(); mpMetadataAuthor->AlwaysDisableInput(true); @@ -467,7 +467,7 @@ void SwAnnotationWin::InitControls() } mpMetadataDate = VclPtr<Edit>::Create( this, 0 ); - mpMetadataDate->SetAccessibleName( SW_RES( STR_ACCESS_ANNOTATION_DATE_NAME ) ); + mpMetadataDate->SetAccessibleName( SwResId( STR_ACCESS_ANNOTATION_DATE_NAME ) ); mpMetadataDate->EnableRTL(AllSettings::GetLayoutRTL()); mpMetadataDate->SetReadOnly(); mpMetadataDate->AlwaysDisableInput(true); @@ -554,7 +554,7 @@ void SwAnnotationWin::CheckMetaText() OUString sMeta = GetAuthor(); if (sMeta.isEmpty()) { - sMeta = SW_RESSTR(STR_NOAUTHOR); + sMeta = SwResId(STR_NOAUTHOR); } else if (sMeta.getLength() > 23) { @@ -572,7 +572,7 @@ void SwAnnotationWin::CheckMetaText() } else { - sMeta = SW_RESSTR(STR_NODATE); + sMeta = SwResId(STR_NODATE); } if (GetTime()!=0) { diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index e83b876c2a5a..f0097c6f2931 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -147,13 +147,13 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame *pFrame // Rewrite the menu entries' text if (m_bIsHeader) { - m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("edit"), SW_RESSTR(STR_FORMAT_HEADER)); - m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("delete"), SW_RESSTR(STR_DELETE_HEADER)); + m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("edit"), SwResId(STR_FORMAT_HEADER)); + m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("delete"), SwResId(STR_DELETE_HEADER)); } else { - m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("edit"), SW_RESSTR(STR_FORMAT_FOOTER)); - m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("delete"), SW_RESSTR(STR_DELETE_FOOTER)); + m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("edit"), SwResId(STR_FORMAT_FOOTER)); + m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("delete"), SwResId(STR_DELETE_FOOTER)); } SetPopupMenu(m_pPopupMenu); @@ -182,17 +182,17 @@ void SwHeaderFooterWin::SetOffset(Point aOffset, long nXLineStart, long nXLineEn bool bIsFirst = !pDesc->IsFirstShared() && GetPageFrame()->OnFirstPage(); bool bIsLeft = !pDesc->IsHeaderShared() && !GetPageFrame()->OnRightPage(); bool bIsRight = !pDesc->IsHeaderShared() && GetPageFrame()->OnRightPage(); - m_sLabel = SW_RESSTR(STR_HEADER_TITLE); + m_sLabel = SwResId(STR_HEADER_TITLE); if (!m_bIsHeader) - m_sLabel = bIsFirst ? SW_RESSTR(STR_FIRST_FOOTER_TITLE) - : bIsLeft ? SW_RESSTR(STR_LEFT_FOOTER_TITLE) - : bIsRight ? SW_RESSTR(STR_RIGHT_FOOTER_TITLE) - : SW_RESSTR(STR_FOOTER_TITLE ); + m_sLabel = bIsFirst ? SwResId(STR_FIRST_FOOTER_TITLE) + : bIsLeft ? SwResId(STR_LEFT_FOOTER_TITLE) + : bIsRight ? SwResId(STR_RIGHT_FOOTER_TITLE) + : SwResId(STR_FOOTER_TITLE ); else - m_sLabel = bIsFirst ? SW_RESSTR(STR_FIRST_HEADER_TITLE) - : bIsLeft ? SW_RESSTR(STR_LEFT_HEADER_TITLE) - : bIsRight ? SW_RESSTR(STR_RIGHT_HEADER_TITLE) - : SW_RESSTR(STR_HEADER_TITLE); + m_sLabel = bIsFirst ? SwResId(STR_FIRST_HEADER_TITLE) + : bIsLeft ? SwResId(STR_LEFT_HEADER_TITLE) + : bIsRight ? SwResId(STR_RIGHT_HEADER_TITLE) + : SwResId(STR_HEADER_TITLE); sal_Int32 nPos = m_sLabel.lastIndexOf("%1"); m_sLabel = m_sLabel.replaceAt(nPos, 2, pDesc->GetName()); diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 2651538f6f82..55b4ea914d4a 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -1491,7 +1491,7 @@ void SwPostItMgr::Delete(const OUString& rAuthor) SetActiveSidebarWin(nullptr); } SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_DELETE_AUTHOR_NOTES) + rAuthor); + aRewriter.AddRule(UndoArg1, SwResId(STR_DELETE_AUTHOR_NOTES) + rAuthor); mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter ); IsPostitFieldWithAuthorOf aFilter(rAuthor); @@ -1518,7 +1518,7 @@ void SwPostItMgr::Delete(sal_uInt32 nPostItId) SetActiveSidebarWin(nullptr); } SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_CONTENT_TYPE_SINGLE_POSTIT)); + aRewriter.AddRule(UndoArg1, SwResId(STR_CONTENT_TYPE_SINGLE_POSTIT)); mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter ); IsPostitFieldWithPostitId aFilter(nPostItId); @@ -1539,7 +1539,7 @@ void SwPostItMgr::Delete() mpWrtShell->StartAllAction(); SetActiveSidebarWin(nullptr); SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RES(STR_DELETE_ALL_NOTES) ); + aRewriter.AddRule(UndoArg1, SwResId(STR_DELETE_ALL_NOTES) ); mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter ); IsPostitField aFilter; @@ -1598,7 +1598,7 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr) { mpWrtShell->StartAllAction(); SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RES(STR_FORMAT_ALL_NOTES) ); + aRewriter.AddRule(UndoArg1, SwResId(STR_FORMAT_ALL_NOTES) ); mpWrtShell->StartUndo( SwUndoId::INSATTR, &aRewriter ); for(SwSidebarItem_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 0d4cf9f0a41b..c38b243a5880 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -123,7 +123,7 @@ void SidebarTextControl::RequestHelp(const HelpEvent &rEvt) if ( nResId && mrDocView.GetWrtShell().GetContentAtPos( mrSidebarWin.GetAnchorPos(), aContentAtPos ) ) { - OUString sText = SW_RESSTR( nResId ) + ": " + + OUString sText = SwResId( nResId ) + ": " + aContentAtPos.aFnd.pRedl->GetAuthorString() + " - " + GetAppLangDateTimeString( aContentAtPos.aFnd.pRedl->GetTimeStamp() ); Help::ShowQuickHelp( this,PixelToLogic(tools::Rectangle(rEvt.GetMousePosPixel(),Size(50,10))),sText); diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 21b5d2484011..1a5e1dd0243b 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -80,7 +80,7 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon ) OUStringBuffer sBuf; if( nResId ) { - sBuf.append(SW_RESSTR(nResId)); + sBuf.append(SwResId(nResId)); sBuf.append(": "); sBuf.append(rRedl.GetAuthorString()); sBuf.append(" - "); @@ -237,7 +237,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) OUString aModStr( aModifiedCode.GetName() ); aModStr = aModStr.replaceFirst(aCode.GetName(), ""); aModStr = aModStr.replaceAll("+", ""); - sText = SW_RESSTR(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr); + sText = SwResId(STR_SMARTTAG_CLICK).replaceAll("%s", aModStr); } break; @@ -247,7 +247,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) const SwFormatFootnote* pFootnote = static_cast<const SwFormatFootnote*>(aContentAtPos.aFnd.pAttr); OUString sTmp; pFootnote->GetFootnoteText( sTmp ); - sText = SW_RESSTR( pFootnote->IsEndNote() + sText = SwResId( pFootnote->IsEndNote() ? STR_ENDNOTE : STR_FTNNOTE ) + sTmp; bBalloon = true; if( aContentAtPos.IsInRTLText() ) @@ -275,7 +275,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) case IsAttrAtPos::RefMark: if(aContentAtPos.aFnd.pAttr) { - sText = SW_RESSTR(STR_CONTENT_TYPE_SINGLE_REFERENCE); + sText = SwResId(STR_CONTENT_TYPE_SINGLE_REFERENCE); sText += ": "; sText += static_cast<const SwFormatRefMark*>(aContentAtPos.aFnd.pAttr)->GetRefName(); } @@ -418,7 +418,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } if(nTabRes) { - sText = SW_RESSTR(nTabRes); + sText = SwResId(nTabRes); Size aTextSize( GetTextWidth(sText), GetTextHeight()); tools::Rectangle aRect(rEvt.GetMousePosPixel(), aTextSize); OUString sDisplayText(ClipLongToolTip(sText)); diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx index 9a443fc65297..56fbc75cae0e 100644 --- a/sw/source/uibase/envelp/envimg.cxx +++ b/sw/source/uibase/envelp/envimg.cxx @@ -52,7 +52,7 @@ OUString MakeSender() SvtUserOptions& rUserOpt = SW_MOD()->GetUserOptions(); OUString sRet; - OUString sSenderToken(SW_RES(STR_SENDER_TOKENS)); + OUString sSenderToken(SwResId(STR_SENDER_TOKENS)); sal_Int32 nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';'); sal_Int32 nSttPos = 0; bool bLastLength = true; diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 14870351d835..98657f7b69d6 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -388,12 +388,12 @@ OUString SwFieldMgr::GetTypeStr(sal_uInt16 nPos) // special treatment for date/time fields (without var/fix) if( TYP_DATEFLD == nFieldWh ) { - static OUString g_aDate( SW_RES( STR_DATEFLD ) ); + static OUString g_aDate( SwResId( STR_DATEFLD ) ); return g_aDate; } if( TYP_TIMEFLD == nFieldWh ) { - static OUString g_aTime( SW_RES( STR_TIMEFLD ) ); + static OUString g_aTime( SwResId( STR_TIMEFLD ) ); return g_aTime; } @@ -442,7 +442,7 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) } case TYP_INPUTFLD: { - rToFill.push_back(SW_RES(aSwFields[nPos].nSubTypeStart)); + rToFill.push_back(SwResId(aSwFields[nPos].nSubTypeStart)); SAL_FALLTHROUGH; // move on at generic types } case TYP_DDEFLD: @@ -505,12 +505,12 @@ void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) if (nTypeId == TYP_DOCINFOFLD) { if ( i == DI_CUSTOM ) - sNew = SW_RES( STR_CUSTOM ); + sNew = SwResId( STR_CUSTOM ); else sNew = SwViewShell::GetShellRes()->aDocInfoLst[i]; } else - sNew = SW_RES(aSwFields[nPos].nSubTypeStart + i); + sNew = SwResId(aSwFields[nPos].nSubTypeStart + i); rToFill.push_back(sNew); } @@ -587,14 +587,14 @@ OUString SwFieldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const nFormatId &= ~FF_FIXED; // mask out Fixed-Flag if((nStart + nFormatId) < aSwFields[nPos].nFormatEnd) - return SW_RES((sal_uInt16)(nStart + nFormatId)); + return SwResId((sal_uInt16)(nStart + nFormatId)); OUString aRet; if( FMT_NUM_BEGIN == nStart) { if(xNumberingInfo.is()) { - ResStringArray aNames( SVX_RES( RID_SVXSTRARY_NUMBERINGTYPE )); + ResStringArray aNames(ResId(RID_SVXSTRARY_NUMBERINGTYPE, *pSwResMgr)); Sequence<sal_Int16> aTypes = xNumberingInfo->getSupportedNumberingTypes(); const sal_Int16* pTypes = aTypes.getConstArray(); @@ -1610,7 +1610,7 @@ void SwFieldType::GetFieldName_() SwFieldType::s_pFieldNames->reserve(SAL_N_ELEMENTS(coFieldNms)); for(sal_uInt16 i : coFieldNms) { - const OUString aTmp(SW_RES( i )); + const OUString aTmp(SwResId( i )); SwFieldType::s_pFieldNames->push_back(MnemonicGenerator::EraseAllMnemonicChars( aTmp )); } } diff --git a/sw/source/uibase/globdoc/globdoc.cxx b/sw/source/uibase/globdoc/globdoc.cxx index 40f60b8ac26d..f18c6c367e99 100644 --- a/sw/source/uibase/globdoc/globdoc.cxx +++ b/sw/source/uibase/globdoc/globdoc.cxx @@ -54,17 +54,17 @@ void SwGlobalDocShell::FillClass( SvGlobalName * pClassName, { *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 ); *pClipFormat = SotClipboardFormatId::STARWRITERGLOB_60; - *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE); + *pLongUserName = SwResId(STR_WRITER_GLOBALDOC_FULLTYPE); OSL_ENSURE( !bTemplate, "No template for Writer Global" ); } else if (nVersion == SOFFICE_FILEFORMAT_8) { *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 ); *pClipFormat = bTemplate ? SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE : SotClipboardFormatId::STARWRITERGLOB_8; - *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE); + *pLongUserName = SwResId(STR_WRITER_GLOBALDOC_FULLTYPE); } - *pUserName = SW_RESSTR(STR_HUMAN_SWGLOBDOC_NAME); + *pUserName = SwResId(STR_HUMAN_SWGLOBDOC_NAME); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx index 8f96c7fa9481..a86628f57d44 100644 --- a/sw/source/uibase/lingu/hyp.cxx +++ b/sw/source/uibase/lingu/hyp.cxx @@ -119,7 +119,7 @@ SwHyphWrapper::~SwHyphWrapper() if( nPageCount ) ::EndProgress( pView->GetDocShell() ); if( bInfoBox && !Application::IsHeadlessModeEnabled() ) - ScopedVclPtrInstance<InfoBox>(&pView->GetEditWin(), SW_RESSTR(STR_HYP_OK))->Execute(); + ScopedVclPtrInstance<InfoBox>(&pView->GetEditWin(), SwResId(STR_HYP_OK))->Execute(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index a00ddc42404e..dc336015eb51 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -207,12 +207,12 @@ void SwSpellPopup::fillLangPopupMenu( } } - pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, OUString(SW_RES( STR_LANGSTATUS_NONE )), MenuItemBits::RADIOCHECK ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, SwResId( STR_LANGSTATUS_NONE ), MenuItemBits::RADIOCHECK ); if ( SvtLanguageTable::GetLanguageString( LANGUAGE_NONE ) == aCurLang ) pPopupMenu->CheckItem( nLangItemIdStart + MN_NONE_OFFSET ); - pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, OUString(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )) ); - pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, OUString(SW_RES( STR_LANGSTATUS_MORE )) ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, SwResId( STR_RESET_TO_DEFAULT_LANGUAGE ) ); + pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, SwResId( STR_LANGSTATUS_MORE ) ); } SwSpellPopup::SwSpellPopup( @@ -294,7 +294,7 @@ SwSpellPopup::SwSpellPopup( uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); - OUString aIgnoreSelection( SW_RES( STR_IGNORE_SELECTION ) ); + OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) ); m_xPopupMenu->SetItemText(m_nSpellDialogId, vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:SpellingAndGrammarDialog", aModuleName)); m_xPopupMenu->SetItemText(m_nCorrectDialogId, @@ -473,7 +473,7 @@ SwSpellPopup::SwSpellPopup( if ( !m_sExplanationLink.isEmpty( ) ) { - m_xPopupMenu->InsertItem(MN_EXPLANATION_LINK, SW_RESSTR(STR_EXPLANATION_LINK), MenuItemBits::TEXT | MenuItemBits::HELP, OString(), nPos++); + m_xPopupMenu->InsertItem(MN_EXPLANATION_LINK, SwResId(STR_EXPLANATION_LINK), MenuItemBits::TEXT | MenuItemBits::HELP, OString(), nPos++); } m_xPopupMenu->SetMenuFlags(MenuFlags::NoAutoMnemonics); @@ -512,7 +512,7 @@ SwSpellPopup::SwSpellPopup( uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(); OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); - OUString aIgnoreSelection( SW_RES( STR_IGNORE_SELECTION ) ); + OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) ); m_xPopupMenu->SetItemText(m_nSpellDialogId, vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:SpellingAndGrammarDialog", aModuleName)); sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId); @@ -661,11 +661,11 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, m_pSh->GetCursorDescr()); - aRewriter.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); + aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS)); - OUString aTmpStr( SW_RES(STR_START_QUOTE) ); + OUString aTmpStr( SwResId(STR_START_QUOTE) ); aTmpStr += aTmp; - aTmpStr += OUString(SW_RES(STR_END_QUOTE)); + aTmpStr += SwResId(STR_END_QUOTE); aRewriter.AddRule(UndoArg3, aTmpStr); m_pSh->StartUndo(SwUndoId::UI_REPLACE, &aRewriter); diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 8dbf06f4d057..e3e6273a9fb5 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -95,7 +95,7 @@ static void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet ) if( !rSh.GetDoc()->getIDocumentState().IsModified() ) rSet.DisableItem( SID_SAVEDOC ); else - rSet.Put( SfxStringItem( SID_SAVEDOC, SW_RESSTR(STR_SAVE_GLOSSARY))); + rSet.Put( SfxStringItem( SID_SAVEDOC, SwResId(STR_SAVE_GLOSSARY))); } } @@ -228,7 +228,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString // set document title SfxViewFrame* pFrame = bShow ? SfxViewFrame::LoadDocument( *xDocSh, nViewId ) : SfxViewFrame::LoadHiddenDocument( *xDocSh, nViewId ); - const OUString aDocTitle(SW_RESSTR( STR_GLOSSARY ) + " " + sLongName); + const OUString aDocTitle(SwResId( STR_GLOSSARY ) + " " + sLongName); bool const bDoesUndo = xDocSh->GetDoc()->GetIDocumentUndoRedo().DoesUndo(); diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx index bfd69cd51aa9..6f87678ab0a9 100644 --- a/sw/source/uibase/misc/numberingtypelistbox.cxx +++ b/sw/source/uibase/misc/numberingtypelistbox.cxx @@ -90,7 +90,7 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags) pTypes = aTypes.getConstArray(); } } - ResStringArray aNames( SVX_RES( RID_SVXSTRARY_NUMBERINGTYPE )); + ResStringArray aNames(ResId(RID_SVXSTRARY_NUMBERINGTYPE, *pSwResMgr)); for(size_t i = 0; i < aNames.Count(); i++) { sal_IntPtr nValue = aNames.GetValue(i); diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index d2474432d08c..71306a2d9432 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -151,12 +151,12 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer : m_pParentDlg(pParent) , m_aTabPagesCTRL(VclPtr<SvxAcceptChgCtr>::Create(pContentArea, pBuilder)) , m_xPopup(pBuilder->get_menu("writermenu")) - , m_sInserted(SW_RES(STR_REDLINE_INSERTED)) - , m_sDeleted(SW_RES(STR_REDLINE_DELETED)) - , m_sFormated(SW_RES(STR_REDLINE_FORMATED)) - , m_sTableChgd(SW_RES(STR_REDLINE_TABLECHG)) - , m_sFormatCollSet(SW_RES(STR_REDLINE_FMTCOLLSET)) - , m_sAutoFormat(SW_RES(STR_REDLINE_AUTOFMT)) + , m_sInserted(SwResId(STR_REDLINE_INSERTED)) + , m_sDeleted(SwResId(STR_REDLINE_DELETED)) + , m_sFormated(SwResId(STR_REDLINE_FORMATED)) + , m_sTableChgd(SwResId(STR_REDLINE_TABLECHG)) + , m_sFormatCollSet(SwResId(STR_REDLINE_FMTCOLLSET)) + , m_sAutoFormat(SwResId(STR_REDLINE_AUTOFMT)) , m_bOnlyFormatedRedlines(false) , m_bRedlnAutoFormat(bAutoFormat) , m_bInhibitActivate(false) @@ -819,7 +819,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept ) SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, OUString::number(aRedlines.size())); - aTmpStr = aRewriter.Apply(OUString(SW_RES(STR_N_REDLINES))); + aTmpStr = aRewriter.Apply(SwResId(STR_N_REDLINES)); } SwRewriter aRewriter; @@ -1111,9 +1111,9 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void) break; default:;//prevent warning } - OUString sTitle(SW_RES(STR_REDLINE_COMMENT)); + OUString sTitle(SwResId(STR_REDLINE_COMMENT)); if( nResId ) - sTitle += SW_RESSTR( nResId ); + sTitle += SwResId( nResId ); pDlg->SetText(sTitle); SwViewShell::SetCareWin(pDlg->GetWindow()); diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 1a1c1ef5dee9..c2be3f05de94 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -128,7 +128,7 @@ void SwCommentRuler::DrawCommentControl(vcl::RenderContext& rRenderContext) maVirDev->DrawRect( tools::Rectangle( Point(), aControlRect.GetSize() ) ); // Label and arrow tip - OUString aLabel( SW_RESSTR ( STR_COMMENTS_LABEL ) ); + OUString aLabel( SwResId ( STR_COMMENTS_LABEL ) ); // Get label and arrow coordinates Point aLabelPos; Point aArrowPos; @@ -261,7 +261,7 @@ void SwCommentRuler::UpdateCommentHelpText() nTooltipResId = STR_HIDE_COMMENTS; else nTooltipResId = STR_SHOW_COMMENTS; - SetQuickHelpText( OUString( SW_RESSTR( nTooltipResId ) ) ); + SetQuickHelpText( OUString( SwResId( nTooltipResId ) ) ); } // TODO Make Ruler return its central rectangle instead of margins. diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index d2b2eff39099..5c02f9b3c32f 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -264,7 +264,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RES(STR_FRAME)); + aRewriter.AddRule(UndoArg1, SwResId(STR_FRAME)); m_pSh->StartUndo(SwUndoId::INSERT, &aRewriter); } diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 3a037220b255..488cd6ac3b1f 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -78,11 +78,11 @@ SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher* pDispatcher) aPos->SetSizePixel(aPos->LogicToPixel(Size(45, 11), MapMode(MapUnit::MapAppFont))); InsertItem(FN_FORMULA_CALC, Image(BitmapEx(RID_BMP_FORMULA_CALC)), - SW_RESSTR(STR_FORMULA_CALC)); + SwResId(STR_FORMULA_CALC)); InsertItem(FN_FORMULA_CANCEL, Image(BitmapEx(RID_BMP_FORMULA_CANCEL)), - SW_RESSTR(STR_FORMULA_CANCEL)); + SwResId(STR_FORMULA_CANCEL)); InsertItem(FN_FORMULA_APPLY, Image(BitmapEx(RID_BMP_FORMULA_APPLY)), - SW_RESSTR(STR_FORMULA_APPLY)); + SwResId(STR_FORMULA_APPLY)); SetHelpId(FN_FORMULA_CALC, HID_TBX_FORMULA_CALC); SetHelpId(FN_FORMULA_CANCEL, HID_TBX_FORMULA_CANCEL); @@ -95,14 +95,14 @@ SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher* pDispatcher) pWrtShell = pView ? pView->GetWrtShellPtr() : nullptr; InsertWindow(ED_POS, aPos.get(), ToolBoxItemBits::NONE, 0); - SetItemText(ED_POS, SW_RESSTR(STR_ACCESS_FORMULA_TYPE)); - aPos->SetAccessibleName(SW_RESSTR(STR_ACCESS_FORMULA_TYPE)); - SetAccessibleName(SW_RESSTR(STR_ACCESS_FORMULA_TOOLBAR)); + SetItemText(ED_POS, SwResId(STR_ACCESS_FORMULA_TYPE)); + aPos->SetAccessibleName(SwResId(STR_ACCESS_FORMULA_TYPE)); + SetAccessibleName(SwResId(STR_ACCESS_FORMULA_TOOLBAR)); InsertSeparator ( 1 ); InsertSeparator (); InsertWindow(ED_FORMULA, aEdit.get()); - SetItemText(ED_FORMULA, SW_RESSTR(STR_ACCESS_FORMULA_TEXT)); - aEdit->SetAccessibleName(SW_RESSTR(STR_ACCESS_FORMULA_TEXT)); + SetItemText(ED_FORMULA, SwResId(STR_ACCESS_FORMULA_TEXT)); + aEdit->SetAccessibleName(SwResId(STR_ACCESS_FORMULA_TEXT)); SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); SetItemBits( FN_FORMULA_CALC, GetItemBits( FN_FORMULA_CALC ) | ToolBoxItemBits::DROPDOWNONLY ); @@ -211,7 +211,7 @@ void SwInputWindow::ShowWin() aAktTableName = pWrtShell->GetTableFormat()->GetName(); } else - aPos->SetText(SW_RESSTR(STR_TBL_FORMULA)); + aPos->SetText(SwResId(STR_TBL_FORMULA)); // Edit current field OSL_ENSURE(pMgr == nullptr, "FieldManager not deleted"); diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 4474108a87db..c9090674893b 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -255,15 +255,15 @@ SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >& { // -2, there's no string for Next/Prev sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START; - sText = SW_RESSTR(nResStr); + sText = SwResId(nResStr); nTbxBits = ToolBoxItemBits::CHECKABLE; } else { if (nNaviId == NID_PREV) - sText = SW_RESSTR(STR_IMGBTN_PGE_UP); + sText = SwResId(STR_IMGBTN_PGE_UP); else if (nNaviId == NID_NEXT) - sText = SW_RESSTR(STR_IMGBTN_PGE_DOWN); + sText = SwResId(STR_IMGBTN_PGE_DOWN); } m_pToolBox->InsertItem(nNaviId, Image(BitmapEx(aNavigationImgIds[i])), @@ -276,7 +276,7 @@ SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >& // these are global strings for( i = 0; i < 2 * NID_COUNT; i++) { - sQuickHelp[i] = SW_RESSTR(STR_IMGBTN_START + i); + sQuickHelp[i] = SwResId(STR_IMGBTN_START + i); } sal_uInt16 nItemId = SwView::GetMoveType(); @@ -358,7 +358,7 @@ OUString SwScrollNaviPopup::GetToolTip(bool bNext) nResId += SwView::GetMoveType() - NID_START; if(!bNext) nResId += NID_COUNT; - return SW_RESSTR(nResId); + return SwResId(nResId); } class SwZoomBox_Impl : public ComboBox @@ -395,7 +395,7 @@ SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) RID_SVXSTR_ZOOM_OPTIMAL_VIEW }; for(sal_uInt16 aZoomValue : aZoomValues) { - OUString sEntry = SVX_RESSTR( aZoomValue ); + OUString sEntry = SvxResId( aZoomValue ); InsertEntry(sEntry); } @@ -407,11 +407,11 @@ void SwZoomBox_Impl::Select() { OUString sEntry = GetText().replaceAll("%", ""); SvxZoomItem aZoom(SvxZoomType::PERCENT,100); - if(sEntry == SVX_RESSTR( RID_SVXSTR_ZOOM_PAGE_WIDTH ) ) + if(sEntry == SvxResId( RID_SVXSTR_ZOOM_PAGE_WIDTH ) ) aZoom.SetType(SvxZoomType::PAGEWIDTH); - else if(sEntry == SVX_RESSTR( RID_SVXSTR_ZOOM_OPTIMAL_VIEW ) ) + else if(sEntry == SvxResId( RID_SVXSTR_ZOOM_OPTIMAL_VIEW ) ) aZoom.SetType(SvxZoomType::OPTIMAL); - else if(sEntry == SVX_RESSTR( RID_SVXSTR_ZOOM_WHOLE_PAGE) ) + else if(sEntry == SvxResId( RID_SVXSTR_ZOOM_WHOLE_PAGE) ) aZoom.SetType(SvxZoomType::WHOLEPAGE); else { diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 1de04845a67c..d3cb2063951b 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -1186,7 +1186,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) else { OUString aText( nSlotId == FN_DELETE_NOTE_AUTHOR ? - SW_RES( STR_DELETE_NOTE_AUTHOR ) : SW_RES( STR_HIDE_NOTE_AUTHOR ) ); + SwResId( STR_DELETE_NOTE_AUTHOR ) : SwResId( STR_HIDE_NOTE_AUTHOR ) ); SwRewriter aRewriter; aRewriter.AddRule( UndoArg1, pPostItMgr->GetActiveSidebarWin()->GetAuthor() ); aText = aRewriter.Apply( aText ); @@ -1208,7 +1208,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet) OUString sAuthor; if( (sAuthor = aUserOpt.GetFullName()).isEmpty() && (sAuthor = aUserOpt.GetID()).isEmpty() ) - sAuthor = SW_RES( STR_REDLINE_UNKNOWN_AUTHOR ); + sAuthor = SwResId( STR_REDLINE_UNKNOWN_AUTHOR ); if (sAuthor == pPostItMgr->GetActiveSidebarWin()->GetAuthor()) rSet.DisableItem(nWhich); } diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 027ec78151a8..48c4a0d0d7ca 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2702,9 +2702,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) if (rSh.GetTableFormat()) { - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_START_QUOTE)); + aRewriter.AddRule(UndoArg1, SwResId(STR_START_QUOTE)); aRewriter.AddRule(UndoArg2, rSh.GetTableFormat()->GetName()); - aRewriter.AddRule(UndoArg3, SW_RESSTR(STR_END_QUOTE)); + aRewriter.AddRule(UndoArg3, SwResId(STR_END_QUOTE)); } rSh.EndUndo(SwUndoId::INSTABLE, &aRewriter); // If possible change the Shell @@ -2728,7 +2728,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) nTableRowPos = nTableCellPos = nPagePos = nHeaderPos = nFooterPos = 0; sal_uInt8 nPos = 1; - rLst.push_back( SW_RESSTR( STR_SWBG_PAGE ) ); + rLst.push_back( SwResId( STR_SWBG_PAGE ) ); nPagePos = nPos++; sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON); @@ -2736,50 +2736,50 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet ) if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) && (nSel & SelectionType::Text) ) { - rLst.push_back( SW_RESSTR( STR_SWBG_PARAGRAPH ) ); + rLst.push_back( SwResId( STR_SWBG_PARAGRAPH ) ); nParagraphPos = nPos++; } if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_SOME_STYLES)) && nSel & (SelectionType::Table|SelectionType::TableCell) ) { - rLst.push_back( SW_RESSTR( STR_SWBG_TABLE ) ); + rLst.push_back( SwResId( STR_SWBG_TABLE ) ); nTablePos = nPos++; if(!bHtmlMode) { - rLst.push_back( SW_RESSTR( STR_SWBG_TABLE_ROW ) ); + rLst.push_back( SwResId( STR_SWBG_TABLE_ROW ) ); nTableRowPos = nPos++; } - rLst.push_back( SW_RESSTR( STR_SWBG_TABLE_CELL) ); + rLst.push_back( SwResId( STR_SWBG_TABLE_CELL) ); nTableCellPos = nPos++; } if(!bHtmlMode) { if ( nSel & SelectionType::Frame ) { - rLst.push_back( SW_RESSTR( STR_SWBG_FRAME ) ); + rLst.push_back( SwResId( STR_SWBG_FRAME ) ); nFramePos = nPos++; } if ( nSel & SelectionType::Graphic ) { - rLst.push_back( SW_RESSTR( STR_SWBG_GRAPHIC ) ); + rLst.push_back( SwResId( STR_SWBG_GRAPHIC ) ); nGraphicPos = nPos++; } if ( nSel & SelectionType::Ole ) { - rLst.push_back( SW_RESSTR( STR_SWBG_OLE ) ); + rLst.push_back( SwResId( STR_SWBG_OLE ) ); nOlePos = nPos++; } const FrameTypeFlags nType = rSh.GetFrameType(nullptr,true); if ( nType & FrameTypeFlags::HEADER ) { - rLst.push_back( SW_RESSTR( STR_SWBG_HEADER ) ); + rLst.push_back( SwResId( STR_SWBG_HEADER ) ); nHeaderPos = nPos++; } if ( nType & FrameTypeFlags::FOOTER ) { - rLst.push_back( SW_RESSTR( STR_SWBG_FOOTER ) ); + rLst.push_back( SwResId( STR_SWBG_FOOTER ) ); nFooterPos = nPos; } } diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index 6f2ee322b88e..4adf956213ab 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -124,7 +124,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject) if(pSdrView) { - SvxOpenGraphicDialog aDlg(SW_RESSTR(STR_INSERT_GRAPHIC)); + SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC)); if(GRFILTER_OK == aDlg.Execute()) { diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 31778367ac9e..b617d3fa9970 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -771,16 +771,16 @@ void SwFrameShell::GetState(SfxItemSet& rSet) { case SID_OBJECT_ALIGN_UP : case FN_FRAME_ALIGN_VERT_TOP: - sNewLabel = SW_RES(STR_TOP_BASE); + sNewLabel = SwResId(STR_TOP_BASE); break; case SID_OBJECT_ALIGN_MIDDLE : case FN_FRAME_ALIGN_VERT_CENTER: - sNewLabel = SW_RES(STR_CENTER_BASE); + sNewLabel = SwResId(STR_CENTER_BASE); break; case SID_OBJECT_ALIGN_DOWN : case FN_FRAME_ALIGN_VERT_BOTTOM: if(!bHtmlMode) - sNewLabel = SW_RES(STR_BOTTOM_BASE); + sNewLabel = SwResId(STR_BOTTOM_BASE); else rSet.DisableItem( nWhich ); break; diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 6327ef785d55..84bc4a39fba5 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -760,7 +760,7 @@ void SwTableShell::Execute(SfxRequest &rReq) case TableMergeErr::TooComplex: { ScopedVclPtrInstance<MessageDialog> aInfoBox( GetView().GetWindow(), - SW_RES( STR_ERR_TABLE_MERGE ), VclMessageType::Info ); + SwResId( STR_ERR_TABLE_MERGE ), VclMessageType::Info ); aInfoBox->Execute(); break; } diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 12cf61076926..1fe73b0478ff 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -78,7 +78,7 @@ using namespace nsSwDocInfoSubType; static OUString lcl_BuildTitleWithRedline( const SwRangeRedline *pRedline ) { - const OUString sTitle(SW_RESSTR(STR_REDLINE_COMMENT)); + const OUString sTitle(SwResId(STR_REDLINE_COMMENT)); sal_uInt16 nResId = 0; switch( pRedline->GetType() ) @@ -103,7 +103,7 @@ static OUString lcl_BuildTitleWithRedline( const SwRangeRedline *pRedline ) return sTitle; } - return sTitle + SW_RESSTR( nResId ); + return sTitle + SwResId( nResId ); } void SwTextShell::ExecField(SfxRequest &rReq) diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 4647ca0edcd7..613a008ad967 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -515,7 +515,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) { SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_FRAME)); + aRewriter.AddRule(UndoArg1, SwResId(STR_FRAME)); rShell.EndUndo(SwUndoId::INSERT, &aRewriter); } @@ -967,7 +967,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) // Delete selected content. SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_SPECIALCHAR)); + aRewriter.AddRule(UndoArg1, SwResId(STR_SPECIALCHAR)); rSh.StartUndo( SwUndoId::INSERT, &aRewriter ); if ( rSh.HasSelection() ) diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 1cbbff3dcf25..bc71aad799b6 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -257,18 +257,18 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const static short lcl_AskRedlineFlags(vcl::Window *pWin) { ScopedVclPtrInstance<MessBox> aQBox( pWin, 0, - OUString( SW_RES( STR_REDLINE_TITLE ) ), - OUString( SW_RES( STR_REDLINE_MSG ) ) ); + OUString( SwResId( STR_REDLINE_TITLE ) ), + OUString( SwResId( STR_REDLINE_MSG ) ) ); aQBox->SetImage( QueryBox::GetStandardImage() ); const ButtonDialogFlags nBtnFlags = ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus; - aQBox->AddButton(OUString(SW_RES(STR_REDLINE_ACCEPT_ALL)), RET_OK, nBtnFlags); + aQBox->AddButton(SwResId(STR_REDLINE_ACCEPT_ALL), RET_OK, nBtnFlags); aQBox->GetPushButton( RET_OK )->SetHelpId(HID_AUTOFORMAT_ACCEPT); - aQBox->AddButton(OUString(SW_RES(STR_REDLINE_REJECT_ALL)), RET_CANCEL, ButtonDialogFlags::Cancel); + aQBox->AddButton(SwResId(STR_REDLINE_REJECT_ALL), RET_CANCEL, ButtonDialogFlags::Cancel); aQBox->GetPushButton( RET_CANCEL )->SetHelpId(HID_AUTOFORMAT_REJECT ); - aQBox->AddButton(OUString(SW_RES(STR_REDLINE_EDIT)), 2); + aQBox->AddButton(SwResId(STR_REDLINE_EDIT), 2); aQBox->GetPushButton( 2 )->SetHelpId(HID_AUTOFORMAT_EDIT_CHG); aQBox->SetButtonHelpText( RET_OK, OUString() ); @@ -303,7 +303,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { SwRewriter aRewriter; aRewriter.AddRule( UndoArg1, aToggle.StringToReplace() ); - aRewriter.AddRule( UndoArg2, SW_RES(STR_YIELDS) ); + aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) ); aRewriter.AddRule( UndoArg3, sReplacement ); rWrtSh.StartUndo(SwUndoId::REPLACE, &aRewriter); rWrtSh.GetCursor()->Normalize(false); diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx index 080ebcfba28f..ec6a18a66948 100644 --- a/sw/source/uibase/sidebar/PageMarginControl.cxx +++ b/sw/source/uibase/sidebar/PageMarginControl.cxx @@ -284,10 +284,10 @@ void PageMarginControl::SetMetricFieldMaxValues( const Size& rPageSize ) void PageMarginControl::FillHelpText( const bool bUserCustomValuesAvailable ) { - const OUString aLeft = SW_RESSTR( STR_MARGIN_TOOLTIP_LEFT ); - const OUString aRight = SW_RESSTR( STR_MARGIN_TOOLTIP_RIGHT ); - const OUString aTop = SW_RESSTR( STR_MARGIN_TOOLTIP_TOP ); - const OUString aBottom = SW_RESSTR( STR_MARGIN_TOOLTIP_BOT ); + const OUString aLeft = SwResId( STR_MARGIN_TOOLTIP_LEFT ); + const OUString aRight = SwResId( STR_MARGIN_TOOLTIP_RIGHT ); + const OUString aTop = SwResId( STR_MARGIN_TOOLTIP_TOP ); + const OUString aBottom = SwResId( STR_MARGIN_TOOLTIP_BOT ); SetMetricValue( *m_pWidthHeightField.get(), SWPAGE_NARROW_VALUE, m_eUnit ); const OUString aNarrowValText = m_pWidthHeightField->GetText(); @@ -327,8 +327,8 @@ void PageMarginControl::FillHelpText( const bool bUserCustomValuesAvailable ) aHelpText += aWide1ValText; m_pWide->SetQuickHelpText( aHelpText ); - const OUString aInner = SW_RESSTR( STR_MARGIN_TOOLTIP_INNER ); - const OUString aOuter = SW_RESSTR( STR_MARGIN_TOOLTIP_OUTER ); + const OUString aInner = SwResId( STR_MARGIN_TOOLTIP_INNER ); + const OUString aOuter = SwResId( STR_MARGIN_TOOLTIP_OUTER ); SetMetricValue( *m_pWidthHeightField.get(), SWPAGE_WIDE_VALUE3, m_eUnit ); const OUString aWide3ValText = m_pWidthHeightField->GetText(); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 0610d9b104f6..4327342947f9 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1180,7 +1180,7 @@ SwPagePreview::SwPagePreview(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): SfxViewShell( pViewFrame, SWVIEWFLAGS ), m_pViewWin( VclPtr<SwPagePreviewWin>::Create(&(GetViewFrame())->GetWindow(), *this ) ), m_nNewPage(USHRT_MAX), - m_sPageStr(SW_RES(STR_PAGE)), + m_sPageStr(SwResId(STR_PAGE)), m_pHScrollbar(nullptr), m_pVScrollbar(nullptr), m_pScrollFill(VclPtr<ScrollBarBox>::Create( &pViewFrame->GetWindow(), WB_SIZEABLE )), diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 6c1629bb9205..d1c10735e3b7 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -160,7 +160,7 @@ static void lcl_PrintHeader( vcl::RenderContext &rOutDev, sal_Int32 nPages, sal_ aFont.SetWeight( WEIGHT_NORMAL ); rOutDev.SetFont( aFont ); OUString aPageStr( " [" ); - aPageStr += SW_RES( STR_PAGE ); + aPageStr += SwResId( STR_PAGE ); aPageStr += " "; aPageStr += OUString::number( nCurPage ); aPageStr += "]"; @@ -426,10 +426,10 @@ void SwSrcView::GetState(SfxItemSet& rSet) switch(nWhich) { case SID_SAVEASDOC: - rSet.Put(SfxStringItem(nWhich, OUString(SW_RES(STR_SAVEAS_SRC)))); + rSet.Put(SfxStringItem(nWhich, SwResId(STR_SAVEAS_SRC))); break; case SID_SAVEACOPY: - rSet.Put(SfxStringItem(nWhich, OUString(SW_RES(STR_SAVEACOPY_SRC)))); + rSet.Put(SfxStringItem(nWhich, SwResId(STR_SAVEACOPY_SRC))); break; case SID_SAVEDOC: { @@ -443,11 +443,11 @@ void SwSrcView::GetState(SfxItemSet& rSet) break; case SID_TABLE_CELL: { - OUString aPos( SW_RES(STR_SRCVIEW_ROW) ); + OUString aPos( SwResId(STR_SRCVIEW_ROW) ); TextSelection aSel = pTextView->GetSelection(); aPos += OUString::number( aSel.GetEnd().GetPara()+1 ); aPos += " : "; - aPos += SW_RES(STR_SRCVIEW_COL); + aPos += SwResId(STR_SRCVIEW_COL); aPos += OUString::number( aSel.GetEnd().GetIndex()+1 ); SfxStringItem aItem( nWhich, aPos ); rSet.Put( aItem ); @@ -807,7 +807,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) else { vcl::Window *pTmpWindow = &GetViewFrame()->GetWindow(); - ScopedVclPtrInstance<MessageDialog>(pTmpWindow, SW_RES(STR_ERR_SRCSTREAM), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pTmpWindow, SwResId(STR_ERR_SRCSTREAM), VclMessageType::Info)->Execute(); } } else diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 0584ffffd7c1..8b6818ccd7ca 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -174,7 +174,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) if( !bDone ) { - ScopedVclPtrInstance<MessageDialog>(nullptr, SW_RES(STR_SCAN_NOSOURCE), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(nullptr, SwResId(STR_SCAN_NOSOURCE), VclMessageType::Info)->Execute(); rReq.Ignore(); } else diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 447b6b134c22..5b767c76297c 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -205,7 +205,7 @@ OUString SwView::GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUStr else if (nPhyNum != nVirtNum) extra = OUString::number(nVirtNum); - OUString aStr(extra.isEmpty() ? SW_RES(STR_PAGE_COUNT) : SW_RES(STR_PAGE_COUNT_CUSTOM)); + OUString aStr(extra.isEmpty() ? SwResId(STR_PAGE_COUNT) : SwResId(STR_PAGE_COUNT_CUSTOM)); aStr = aStr.replaceFirst("%1", OUString::number(nPhyNum)); aStr = aStr.replaceFirst("%2", OUString::number(GetWrtShell().GetPageCnt())); aStr = aStr.replaceFirst("%3", extra); @@ -293,7 +293,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) std::unique_ptr<FileDialogHelper> pFileDlg(new FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE, FileDialogFlags::Graphic )); - pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC )); + pFileDlg->SetTitle(SwResId(STR_INSERT_GRAPHIC )); pFileDlg->SetContext( FileDialogHelper::SW_INSERT_GRAPHIC ); uno::Reference < XFilePicker2 > xFP = pFileDlg->GetFilePicker(); uno::Reference < XFilePickerControlAccess > xCtrlAcc(xFP, UNO_QUERY); @@ -329,7 +329,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) Sequence<OUString> aListBoxEntries(aFormats.size()); OUString* pEntries = aListBoxEntries.getArray(); sal_Int16 nSelect = 0; - OUString sGraphicFormat = SW_RESSTR(STR_POOLFRM_GRAPHIC); + OUString sGraphicFormat = SwResId(STR_POOLFRM_GRAPHIC); for( size_t i = 0; i < aFormats.size(); ++i ) { pEntries[i] = aFormats[i]; @@ -442,7 +442,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) rSh.StartAction(); SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_GRAPHIC_DEFNAME)); + aRewriter.AddRule(UndoArg1, SwResId(STR_GRAPHIC_DEFNAME)); // #i123922# determine if we really want to insert or replace the graphic at a selected object const bool bReplaceMode(rSh.HasSelection() && SelectionType::Frame == rSh.GetSelectionType()); @@ -496,7 +496,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) { if( bShowError ) { - ScopedVclPtrInstance< MessageDialog > aInfoBox( GetWindow(), SW_RESSTR( nResId ), VclMessageType::Info); + ScopedVclPtrInstance< MessageDialog > aInfoBox( GetWindow(), SwResId( nResId ), VclMessageType::Info); aInfoBox->Execute(); } rReq.Ignore(); @@ -1337,7 +1337,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) sal_uLong nWord = selectionStats.nWord ? selectionStats.nWord : documentStats.nWord; sal_uLong nChar = selectionStats.nChar ? selectionStats.nChar : documentStats.nChar; - OUString aWordCount( SW_RES( selectionStats.nWord ? STR_STATUSBAR_WORDCOUNT : STR_STATUSBAR_WORDCOUNT_NO_SELECTION ) ); + OUString aWordCount( SwResId( selectionStats.nWord ? STR_STATUSBAR_WORDCOUNT : STR_STATUSBAR_WORDCOUNT_NO_SELECTION ) ); const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper(); aWordCount = aWordCount.replaceFirst( "%1", rLocaleData.getNum( nWord, 0 ) ); aWordCount = aWordCount.replaceFirst( "%2", rLocaleData.getNum( nChar, 0 ) ); @@ -1547,7 +1547,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) } if (!sStr.isEmpty()) sStr += sStatusDelim; - sStr += SW_RESSTR(STR_NUM_LEVEL); + sStr += SwResId(STR_NUM_LEVEL); sStr += OUString::number( nNumLevel + 1 ); } @@ -1559,12 +1559,12 @@ void SwView::StateStatusLine(SfxItemSet &rSet) sStr += " , "; if( bOutlineNum ) { - sStr += SW_RESSTR(STR_OUTLINE_NUMBERING); + sStr += SwResId(STR_OUTLINE_NUMBERING); sStr += sStatusDelim; - sStr += SW_RESSTR(STR_NUM_LEVEL); + sStr += SwResId(STR_NUM_LEVEL); } else - sStr += SW_RESSTR(STR_NUM_OUTLINE); + sStr += SwResId(STR_NUM_OUTLINE); sStr += OUString::number( nOutlineLevel); } @@ -1572,7 +1572,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) { if (!sStr.isEmpty()) sStr = sStatusDelim + sStr; - sStr = SW_RESSTR(SW_STR_READONLY) + sStr; + sStr = SwResId(SW_STR_READONLY) + sStr; } if (!sStr.isEmpty()) rSet.Put( SfxStringItem( SID_TABLE_CELL, sStr )); @@ -2258,7 +2258,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe if (!bCompare && !nFound) { vcl::Window* pWin = &GetEditWin(); - ScopedVclPtrInstance<MessageDialog>(pWin, SW_RES(STR_NO_MERGE_ENTRY), VclMessageType::Info)->Execute(); + ScopedVclPtrInstance<MessageDialog>(pWin, SwResId(STR_NO_MERGE_ENTRY), VclMessageType::Info)->Execute(); } if( nRet==2 && xDocSh.is() ) xDocSh->DoClose(); diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index a01e2d864ace..1c632ad6793a 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -71,7 +71,7 @@ void SwView::ExecDlgExt(SfxRequest &rReq) assert(pDlg && "Dialog creation failed!"); pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand()); - pDlg->SetText( SW_RESSTR(STR_EDIT_FOOTNOTE) ); + pDlg->SetText( SwResId(STR_EDIT_FOOTNOTE) ); pDlg->Execute(); break; } diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 69a4c5e6252f..650a42416892 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -420,8 +420,8 @@ void SwView::HyphenateDocument() // do not hyphenate if interactive hyphenation is active elsewhere if (SwEditShell::HasHyphIter()) { - ScopedVclPtrInstance<MessBox>( nullptr, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), - OUString( SW_RES( STR_MULT_INTERACT_HYPH_WARN ) ) )->Execute(); + ScopedVclPtrInstance<MessBox>( nullptr, WB_OK, OUString( SwResId( STR_HYPH_TITLE ) ), + OUString( SwResId( STR_MULT_INTERACT_HYPH_WARN ) ) )->Execute(); return; } @@ -460,7 +460,7 @@ void SwView::HyphenateDocument() // turned on no special area { // I want also in special areas hyphenation - ScopedVclPtrInstance< MessageDialog > aBox(&GetEditWin(), SW_RES(STR_QUERY_SPECIAL_FORCED), VclMessageType::Question, VclButtonsType::YesNo); + ScopedVclPtrInstance< MessageDialog > aBox(&GetEditWin(), SwResId(STR_QUERY_SPECIAL_FORCED), VclMessageType::Question, VclButtonsType::YesNo); if( aBox->Execute() == RET_YES ) { bOther = true; diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index 429a1eaa6b27..448f192377bd 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -176,9 +176,9 @@ void SwView::ExecutePrint(SfxRequest& rReq) } else { - ScopedVclPtrInstance< MessageDialog > aInfoBox(&GetEditWin(), SW_RES(STR_ERR_NO_FAX), VclMessageType::Info); + ScopedVclPtrInstance< MessageDialog > aInfoBox(&GetEditWin(), SwResId(STR_ERR_NO_FAX), VclMessageType::Info); sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; - aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", OUString(SW_RES(nResNo)))); + aInfoBox->set_primary_text(aInfoBox->get_primary_text().replaceFirst("%1", SwResId(nResNo))); aInfoBox->Execute(); SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE); GetViewFrame()->GetDispatcher()->ExecuteList(SID_SW_EDITOPTIONS, diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index f2f0277d77be..3b3ff0ba371e 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -402,7 +402,7 @@ void SwView::ExecSearch(SfxRequest& rReq) if( !bQuiet && ULONG_MAX != nFound) { - OUString sText( SW_RES( STR_NB_REPLACED ) ); + OUString sText( SwResId( STR_NB_REPLACED ) ); sText = sText.replaceFirst("XX", OUString::number( nFound )); SvxSearchDialogWrapper::SetSearchLabel(sText); } @@ -684,7 +684,7 @@ void SwView::Replace() { SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, m_pSrchItem->GetSearchString()); - aRewriter.AddRule(UndoArg2, SW_RESSTR(STR_YIELDS)); + aRewriter.AddRule(UndoArg2, SwResId(STR_YIELDS)); aRewriter.AddRule(UndoArg3, m_pSrchItem->GetReplaceString()); m_pWrtShell->StartUndo(SwUndoId::UI_REPLACE_STYLE, &aRewriter); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 719db274fac0..45606c4193f9 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3288,13 +3288,13 @@ OUString SwXTextDocument::getPartName(int nPart) { SolarMutexGuard aGuard; - return OUString(SW_RES(STR_PAGE)) + OUString::number(nPart + 1); + return SwResId(STR_PAGE) + OUString::number(nPart + 1); } OUString SwXTextDocument::getPartHash(int nPart) { SolarMutexGuard aGuard; - OUString sPart(OUString(SW_RES(STR_PAGE)) + OUString::number(nPart + 1)); + OUString sPart(SwResId(STR_PAGE) + OUString::number(nPart + 1)); return OUString::number(sPart.hashCode()); } @@ -3769,13 +3769,13 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( SwXLinkTargetSupplier::SwXLinkTargetSupplier(SwXTextDocument& rxDoc) : pxDoc(&rxDoc) { - sTables = SW_RES(STR_CONTENT_TYPE_TABLE); - sFrames = SW_RES(STR_CONTENT_TYPE_FRAME); - sGraphics = SW_RES(STR_CONTENT_TYPE_GRAPHIC); - sOLEs = SW_RES(STR_CONTENT_TYPE_OLE); - sSections = SW_RES(STR_CONTENT_TYPE_REGION); - sOutlines = SW_RES(STR_CONTENT_TYPE_OUTLINE); - sBookmarks = SW_RES(STR_CONTENT_TYPE_BOOKMARK); + sTables = SwResId(STR_CONTENT_TYPE_TABLE); + sFrames = SwResId(STR_CONTENT_TYPE_FRAME); + sGraphics = SwResId(STR_CONTENT_TYPE_GRAPHIC); + sOLEs = SwResId(STR_CONTENT_TYPE_OLE); + sSections = SwResId(STR_CONTENT_TYPE_REGION); + sOutlines = SwResId(STR_CONTENT_TYPE_OUTLINE); + sBookmarks = SwResId(STR_CONTENT_TYPE_BOOKMARK); } SwXLinkTargetSupplier::~SwXLinkTargetSupplier() diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx index 4e327f4768d5..bf179022f7e7 100644 --- a/sw/source/uibase/utlui/attrdesc.cxx +++ b/sw/source/uibase/utlui/attrdesc.cxx @@ -102,12 +102,12 @@ bool SwFormatCharFormat::GetPresentation if ( pCharFormat ) { OUString aStr; - rText = OUString( SW_RESSTR( STR_CHARFMT ) ); + rText = OUString( SwResId( STR_CHARFMT ) ); pCharFormat->GetPresentation( ePres, eCoreUnit, ePresUnit, aStr ); rText = rText + "(" + aStr + ")"; } else - rText = OUString( SW_RESSTR( STR_NO_CHARFMT ) ); + rText = OUString( SwResId( STR_NO_CHARFMT ) ); return true; } @@ -162,14 +162,14 @@ bool SwFormatDrop::GetPresentation rText = OUString::number( GetChars() ) + " "; } rText = rText + - OUString( SW_RESSTR( STR_DROP_OVER ) ) + + OUString( SwResId( STR_DROP_OVER ) ) + " " + OUString::number( GetLines() ) + " " + - OUString( SW_RESSTR( STR_DROP_LINES ) ); + OUString( SwResId( STR_DROP_LINES ) ); } else - rText = SW_RESSTR( STR_NO_DROP_LINES ); + rText = SwResId( STR_NO_DROP_LINES ); return true; } @@ -183,7 +183,7 @@ bool SwRegisterItem::GetPresentation ) const { const sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF; - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); return true; } @@ -197,10 +197,10 @@ bool SwNumRuleItem::GetPresentation ) const { if( !GetValue().isEmpty() ) - rText = SW_RESSTR( STR_NUMRULE_ON ) + + rText = SwResId( STR_NUMRULE_ON ) + "(" + GetValue() + ")"; else - rText = SW_RESSTR( STR_NUMRULE_OFF ); + rText = SwResId( STR_NUMRULE_OFF ); return true; } @@ -214,7 +214,7 @@ bool SwParaConnectBorderItem::GetPresentation ) const { const sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF; - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); return true; } @@ -229,7 +229,7 @@ bool SwFormatFrameSize::GetPresentation const IntlWrapper* pIntl ) const { - rText = SW_RESSTR( STR_FRM_WIDTH ) + " "; + rText = SwResId( STR_FRM_WIDTH ) + " "; if ( GetWidthPercent() ) { rText = rText + unicode::formatPercent(GetWidthPercent(), @@ -244,7 +244,7 @@ bool SwFormatFrameSize::GetPresentation { const sal_uInt16 nId = ATT_FIX_SIZE == m_eFrameHeightType ? STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT; - rText = rText + ", " + SW_RESSTR( nId ) + " "; + rText = rText + ", " + SwResId( nId ) + " "; if ( GetHeightPercent() ) { rText = rText + unicode::formatPercent(GetHeightPercent(), @@ -272,7 +272,7 @@ bool SwFormatHeader::GetPresentation ) const { const sal_uInt16 nId = GetHeaderFormat() ? STR_HEADER : STR_NO_HEADER; - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); return true; } @@ -289,7 +289,7 @@ bool SwFormatFooter::GetPresentation ) const { const sal_uInt16 nId = GetFooterFormat() ? STR_FOOTER : STR_NO_FOOTER; - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); return true; } @@ -326,11 +326,11 @@ bool SwFormatSurround::GetPresentation default:;//prevent warning } if ( nId ) - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); if ( IsAnchorOnly() ) { - rText = rText + " " + SW_RESSTR( STR_SURROUND_ANCHORONLY ); + rText = rText + " " + SwResId( STR_SURROUND_ANCHORONLY ); } return true; } @@ -351,7 +351,7 @@ bool SwFormatVertOrient::GetPresentation { case text::VertOrientation::NONE: { - rText = rText + SW_RESSTR( STR_POS_Y ) + " " + + rText = rText + SwResId( STR_POS_Y ) + " " + ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, pIntl ) + " " + ::GetSvxString( ::GetMetricId( ePresUnit ) ); } @@ -377,7 +377,7 @@ bool SwFormatVertOrient::GetPresentation default:;//prevent warning } if ( nId ) - rText += SW_RESSTR( nId ); + rText += SwResId( nId ); return true; } @@ -397,7 +397,7 @@ bool SwFormatHoriOrient::GetPresentation { case text::HoriOrientation::NONE: { - rText = rText + SW_RESSTR( STR_POS_X ) + " " + + rText = rText + SwResId( STR_POS_X ) + " " + ::GetMetricText( GetPos(), eCoreUnit, ePresUnit, pIntl ) + " " + ::GetSvxString( ::GetMetricId( ePresUnit ) ); } @@ -423,7 +423,7 @@ bool SwFormatHoriOrient::GetPresentation default:;//prevent warning } if ( nId ) - rText += SW_RESSTR( nId ); + rText += SwResId( nId ); return true; } @@ -453,7 +453,7 @@ bool SwFormatAnchor::GetPresentation default:;//prevent warning } if ( nId ) - rText += SW_RESSTR( nId ); + rText += SwResId( nId ); return true; } @@ -470,7 +470,7 @@ bool SwFormatPageDesc::GetPresentation if ( pPageDesc ) rText = pPageDesc->GetName(); else - rText = SW_RESSTR( STR_NO_PAGEDESC ); + rText = SwResId( STR_NO_PAGEDESC ); return true; } @@ -488,11 +488,11 @@ bool SwFormatCol::GetPresentation sal_uInt16 nCnt = GetNumCols(); if ( nCnt > 1 ) { - rText = OUString::number(nCnt) + " " + SW_RESSTR( STR_COLUMNS ); + rText = OUString::number(nCnt) + " " + SwResId( STR_COLUMNS ); if ( COLADJ_NONE != GetLineAdj() ) { const long nWdth = static_cast<long>(GetLineWidth()); - rText = rText + " " + SW_RESSTR( STR_LINE_WIDTH ) + " " + + rText = rText + " " + SwResId( STR_LINE_WIDTH ) + " " + ::GetMetricText( nWdth, eCoreUnit, MapUnit::MapPoint, pIntl ); } @@ -542,7 +542,7 @@ bool SwFormatEditInReadonly::GetPresentation { rText.clear(); if ( GetValue() ) - rText = SW_RESSTR(STR_EDIT_IN_READONLY); + rText = SwResId(STR_EDIT_IN_READONLY); return true; } @@ -564,7 +564,7 @@ bool SwFormatLayoutSplit::GetPresentation ) const { if ( GetValue() ) - rText = SW_RESSTR(STR_LAYOUT_SPLIT); + rText = SwResId(STR_LAYOUT_SPLIT); return true; } @@ -603,12 +603,12 @@ bool SwFormatChain::GetPresentation { if ( GetPrev() || GetNext() ) { - rText = SW_RESSTR(STR_CONNECT1); + rText = SwResId(STR_CONNECT1); if ( GetPrev() ) { rText += GetPrev()->GetName(); if ( GetNext() ) - rText += SW_RESSTR(STR_CONNECT2); + rText += SwResId(STR_CONNECT2); } if ( GetNext() ) rText += GetNext()->GetName(); @@ -626,12 +626,12 @@ bool SwFormatLineNumber::GetPresentation ) const { if ( IsCount() ) - rText += SW_RESSTR(STR_LINECOUNT); + rText += SwResId(STR_LINECOUNT); else - rText += SW_RESSTR(STR_DONTLINECOUNT); + rText += SwResId(STR_DONTLINECOUNT); if ( GetStartValue() ) { - rText = rText + " " + SW_RESSTR(STR_LINCOUNT_START) + + rText = rText + " " + SwResId(STR_LINCOUNT_START) + OUString::number( GetStartValue() ); } return true; @@ -661,7 +661,7 @@ bool SwTextGridItem::GetPresentation break; } if ( nId ) - rText += SW_RESSTR( nId ); + rText += SwResId( nId ); return true; } @@ -694,9 +694,9 @@ bool SwMirrorGrf::GetPresentation( } if ( nId ) { - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); if (bGrfToggle) - rText += SW_RESSTR( STR_MIRROR_TOGGLE ); + rText += SwResId( STR_MIRROR_TOGGLE ); } return true; } @@ -706,7 +706,7 @@ bool SwRotationGrf::GetPresentation( OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SfxItemPresentation::Complete == ePres ) - rText = SW_RESSTR( STR_ROTATION ); + rText = SwResId( STR_ROTATION ); else if( rText.getLength() ) rText.clear(); rText = rText + OUString::number( GetValue() ) + "\xB0"; @@ -718,7 +718,7 @@ bool SwLuminanceGrf::GetPresentation( OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SfxItemPresentation::Complete == ePres ) - rText = SW_RESSTR( STR_LUMINANCE ); + rText = SwResId( STR_LUMINANCE ); else if( rText.getLength() ) rText.clear(); rText = rText + unicode::formatPercent(GetValue(), @@ -731,7 +731,7 @@ bool SwContrastGrf::GetPresentation( OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SfxItemPresentation::Complete == ePres ) - rText = SW_RESSTR( STR_CONTRAST ); + rText = SwResId( STR_CONTRAST ); else if( rText.getLength() ) rText.clear(); rText = rText + unicode::formatPercent(GetValue(), @@ -754,7 +754,7 @@ bool SwChannelGrf::GetPresentation( default: nId = 0; break; } if( nId ) - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); else if( rText.getLength() ) rText.clear(); } @@ -771,7 +771,7 @@ bool SwGammaGrf::GetPresentation( { OUStringBuffer aText; if( SfxItemPresentation::Complete == ePres ) - aText.append(SW_RESSTR(STR_GAMMA)); + aText.append(SwResId(STR_GAMMA)); aText.append(unicode::formatPercent(GetValue(), Application::GetSettings().GetUILanguageTag())); rText = aText.makeStringAndClear(); @@ -786,7 +786,7 @@ bool SwInvertGrf::GetPresentation( if( SfxItemPresentation::Complete == ePres ) { const sal_uInt16 nId = GetValue() ? STR_INVERT : STR_INVERT_NOT; - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); } return true; } @@ -796,7 +796,7 @@ bool SwTransparencyGrf::GetPresentation( OUString &rText, const IntlWrapper* /*pIntl*/) const { if( SfxItemPresentation::Complete == ePres ) - rText = SW_RESSTR( STR_TRANSPARENCY ); + rText = SwResId( STR_TRANSPARENCY ); else if( rText.getLength() ) rText.clear(); rText = rText + unicode::formatPercent(GetValue(), @@ -820,7 +820,7 @@ bool SwDrawModeGrf::GetPresentation( case GraphicDrawMode::Watermark: nId = STR_DRAWMODE_WATERMARK; break; default: nId = STR_DRAWMODE_STD; break; } - rText = SW_RESSTR( STR_DRAWMODE ) + SW_RESSTR( nId ); + rText = SwResId( STR_DRAWMODE ) + SwResId( nId ); } return true; } @@ -835,7 +835,7 @@ bool SwFormatFollowTextFlow::GetPresentation( SfxItemPresentation ePres, if( SfxItemPresentation::Complete == ePres ) { const sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW; - rText = SW_RESSTR( nId ); + rText = SwResId( nId ); } return true; } diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx index d7b51a6e4946..73bababd218a 100644 --- a/sw/source/uibase/utlui/bookctrl.cxx +++ b/sw/source/uibase/utlui/bookctrl.cxx @@ -84,9 +84,9 @@ void SwBookmarkControl::StateChanged( else if (const SfxBoolItem* pBoolItem = dynamic_cast<const SfxBoolItem*>(pState)) { if (pBoolItem->GetValue()) // Indicates whether to show extended tooltip - GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_BOOKCTRL_HINT_EXTENDED)); + GetStatusBar().SetQuickHelpText(GetId(), SwResId(STR_BOOKCTRL_HINT_EXTENDED)); else - GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_BOOKCTRL_HINT)); + GetStatusBar().SetQuickHelpText(GetId(), SwResId(STR_BOOKCTRL_HINT)); } } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 38bbb54996de..6a6d5c96c894 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -219,8 +219,8 @@ SwContentType::SwContentType(SwWrtShell* pShell, ContentTypeId nType, sal_uInt8 SwTypeNumber(CTYPE_CTT), pWrtShell(pShell), pMember(nullptr), - sContentTypeName(SW_RES(STR_CONTENT_TYPE_FIRST + (int)nType)), - sSingleContentTypeName(SW_RES(STR_CONTENT_TYPE_SINGLE_FIRST + (int)nType)), + sContentTypeName(SwResId(STR_CONTENT_TYPE_FIRST + (int)nType)), + sSingleContentTypeName(SwResId(STR_CONTENT_TYPE_SINGLE_FIRST + (int)nType)), nMemberCount(0), nContentType(nType), nOutlineLevel(nLevel), @@ -771,15 +771,15 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog) : SvTreeListBox(pParent) , m_xDialog(pDialog) , m_sSpace(OUString(" ")) - , m_sRemoveIdx(SW_RES(STR_REMOVE_INDEX)) - , m_sUpdateIdx(SW_RES(STR_UPDATE)) - , m_sUnprotTable(SW_RES(STR_REMOVE_TBL_PROTECTION)) - , m_sRename(SW_RES(STR_RENAME)) - , m_sReadonlyIdx(SW_RES(STR_READONLY_IDX)) - , m_sInvisible(SW_RES(STR_INVISIBLE)) - , m_sPostItShow(SW_RES(STR_POSTIT_SHOW)) - , m_sPostItHide(SW_RES(STR_POSTIT_HIDE)) - , m_sPostItDelete(SW_RES(STR_POSTIT_DELETE)) + , m_sRemoveIdx(SwResId(STR_REMOVE_INDEX)) + , m_sUpdateIdx(SwResId(STR_UPDATE)) + , m_sUnprotTable(SwResId(STR_REMOVE_TBL_PROTECTION)) + , m_sRename(SwResId(STR_RENAME)) + , m_sReadonlyIdx(SwResId(STR_READONLY_IDX)) + , m_sInvisible(SwResId(STR_INVISIBLE)) + , m_sPostItShow(SwResId(STR_POSTIT_SHOW)) + , m_sPostItHide(SwResId(STR_POSTIT_HIDE)) + , m_sPostItDelete(SwResId(STR_POSTIT_DELETE)) , m_pHiddenShell(nullptr) , m_pActiveShell(nullptr) , m_pConfig(SW_MOD()->GetNavigationConfig()) @@ -810,7 +810,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog) } for (int i = 0; i < CONTEXT_COUNT; ++i) { - m_aContextStrings[i] = SW_RESSTR(i+STR_CONTEXT_FIRST); + m_aContextStrings[i] = SwResId(i+STR_CONTEXT_FIRST); } m_nActiveBlock = m_pConfig->GetActiveBlock(); m_aUpdTimer.SetInvokeHandler(LINK(this, SwContentTree, TimerUpdate)); @@ -3167,11 +3167,11 @@ void SwContentTree::EditEntry(SvTreeListEntry* pEntry, EditEntryMode nMode) else if(nMode == EditEntryMode::DELETE) { m_pActiveShell->StartAction(); - OUString sTable = SW_RES(STR_TABLE_NAME); + OUString sTable = SwResId(STR_TABLE_NAME); SwRewriter aRewriterTableName; - aRewriterTableName.AddRule(UndoArg1, SW_RES(STR_START_QUOTE)); + aRewriterTableName.AddRule(UndoArg1, SwResId(STR_START_QUOTE)); aRewriterTableName.AddRule(UndoArg2, pCnt->GetName()); - aRewriterTableName.AddRule(UndoArg3, SW_RES(STR_END_QUOTE)); + aRewriterTableName.AddRule(UndoArg3, SwResId(STR_END_QUOTE)); sTable = aRewriterTableName.Apply(sTable); SwRewriter aRewriter; diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 6fb38442b128..a3095d534d74 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -155,7 +155,7 @@ SwGlobalTree::SwGlobalTree(vcl::Window* pParent, SwNavigationPI* pDialog) m_aUpdateTimer.Start(); for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++) { - m_aContextStrings[i] = SW_RESSTR(i+ STR_GLOBAL_CONTEXT_FIRST); + m_aContextStrings[i] = SwResId(i+ STR_GLOBAL_CONTEXT_FIRST); } SetHelpId(HID_NAVIGATOR_GLOB_TREELIST); SelectHdl(); diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index 73265b6aeb75..a64892fea6bf 100644 --- a/sw/source/uibase/utlui/initui.cxx +++ b/sw/source/uibase/utlui/initui.cxx @@ -174,38 +174,38 @@ void InitUI() } ShellResource::ShellResource() - : aPostItAuthor( SW_RES( STR_POSTIT_AUTHOR ) ), - aPostItPage( SW_RES( STR_POSTIT_PAGE ) ), - aPostItLine( SW_RES( STR_POSTIT_LINE ) ), - - aCalc_Syntax( SW_RES( STR_CALC_SYNTAX ) ), - aCalc_ZeroDiv( SW_RES( STR_CALC_ZERODIV ) ), - aCalc_Brack( SW_RES( STR_CALC_BRACK ) ), - aCalc_Pow( SW_RES( STR_CALC_POW ) ), - aCalc_Overflow( SW_RES( STR_CALC_OVERFLOW ) ), - aCalc_Default( SW_RES( STR_CALC_DEFAULT ) ), - aCalc_Error( SW_RES( STR_CALC_ERROR ) ), + : aPostItAuthor( SwResId( STR_POSTIT_AUTHOR ) ), + aPostItPage( SwResId( STR_POSTIT_PAGE ) ), + aPostItLine( SwResId( STR_POSTIT_LINE ) ), + + aCalc_Syntax( SwResId( STR_CALC_SYNTAX ) ), + aCalc_ZeroDiv( SwResId( STR_CALC_ZERODIV ) ), + aCalc_Brack( SwResId( STR_CALC_BRACK ) ), + aCalc_Pow( SwResId( STR_CALC_POW ) ), + aCalc_Overflow( SwResId( STR_CALC_OVERFLOW ) ), + aCalc_Default( SwResId( STR_CALC_DEFAULT ) ), + aCalc_Error( SwResId( STR_CALC_ERROR ) ), // #i81002# - aGetRefField_RefItemNotFound( SW_RES( STR_GETREFFLD_REFITEMNOTFOUND ) ), - aStrNone( SW_RES( STR_TEMPLATE_NONE )), - aFixedStr( SW_RES( STR_FIELD_FIXED )), - sDurationFormat( SW_RES( STR_DURATION_FORMAT )), - - aTOXIndexName( SW_RES(STR_TOI)), - aTOXUserName( SW_RES(STR_TOU)), - aTOXContentName( SW_RES(STR_TOC)), - aTOXIllustrationsName( SW_RES(STR_TOX_ILL)), - aTOXObjectsName( SW_RES(STR_TOX_OBJ)), - aTOXTablesName( SW_RES(STR_TOX_TBL)), - aTOXAuthoritiesName( SW_RES(STR_TOX_AUTH)), - aTOXCitationName( SW_RES(STR_TOX_CITATION)), - aLinkCtrlClick(SW_RESSTR(STR_LINK_CTRL_CLICK)), - aLinkClick(SW_RESSTR(STR_LINK_CLICK)), + aGetRefField_RefItemNotFound( SwResId( STR_GETREFFLD_REFITEMNOTFOUND ) ), + aStrNone( SwResId( STR_TEMPLATE_NONE )), + aFixedStr( SwResId( STR_FIELD_FIXED )), + sDurationFormat( SwResId( STR_DURATION_FORMAT )), + + aTOXIndexName( SwResId(STR_TOI)), + aTOXUserName( SwResId(STR_TOU)), + aTOXContentName( SwResId(STR_TOC)), + aTOXIllustrationsName( SwResId(STR_TOX_ILL)), + aTOXObjectsName( SwResId(STR_TOX_OBJ)), + aTOXTablesName( SwResId(STR_TOX_TBL)), + aTOXAuthoritiesName( SwResId(STR_TOX_AUTH)), + aTOXCitationName( SwResId(STR_TOX_CITATION)), + aLinkCtrlClick(SwResId(STR_LINK_CTRL_CLICK)), + aLinkClick(SwResId(STR_LINK_CLICK)), pAutoFormatNameLst(nullptr), - sPageDescFirstName( SW_RES(STR_PAGEDESC_FIRSTNAME)), - sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)), - sPageDescName( SW_RES(STR_PAGEDESC_NAME)) + sPageDescFirstName( SwResId(STR_PAGEDESC_FIRSTNAME)), + sPageDescFollowName( SwResId(STR_PAGEDESC_FOLLOWNAME)), + sPageDescName( SwResId(STR_PAGEDESC_NAME)) { const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN; @@ -217,7 +217,7 @@ ShellResource::ShellResource() aLinkCtrlClick = aLinkCtrlClick.replaceAll("%s", aModStr); for(sal_uInt16 i = 0; i < nCount; ++i) - aDocInfoLst.push_back(OUString(SW_RESSTR(FLD_DOCINFO_BEGIN + i))); + aDocInfoLst.push_back(SwResId(FLD_DOCINFO_BEGIN + i)); } OUString ShellResource::GetPageDescName(sal_uInt16 nNo, PageNameMode eMode) @@ -289,7 +289,7 @@ OUString SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType) pAuthFieldNameList = new std::vector<OUString>; pAuthFieldNameList->reserve(AUTH_FIELD_END); for(sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i) - pAuthFieldNameList->push_back(SW_RES(STR_AUTH_FIELD_START + i)); + pAuthFieldNameList->push_back(SwResId(STR_AUTH_FIELD_START + i)); } return (*pAuthFieldNameList)[static_cast< sal_uInt16 >(eType)]; } @@ -301,7 +301,7 @@ OUString SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType) pAuthFieldTypeList = new std::vector<OUString>; pAuthFieldTypeList->reserve(AUTH_TYPE_END); for(sal_uInt16 i = 0; i < AUTH_TYPE_END; ++i) - pAuthFieldTypeList->push_back(SW_RES(STR_AUTH_TYPE_START + i)); + pAuthFieldTypeList->push_back(SwResId(STR_AUTH_TYPE_START + i)); } return (*pAuthFieldTypeList)[static_cast< sal_uInt16 >(eType)]; } diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 0a4cca1220e5..29fcbb1d791a 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -656,11 +656,11 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, for (sal_uInt16 i = 0; i <= static_cast<sal_uInt16>(RegionMode::EMBEDDED); ++i) { - m_aContextArr[i] = SW_RESSTR(STR_HYPERLINK + i); - m_aStatusArr[i] = SW_RESSTR(STR_STATUS_FIRST + i); + m_aContextArr[i] = SwResId(STR_HYPERLINK + i); + m_aStatusArr[i] = SwResId(STR_STATUS_FIRST + i); } - m_aStatusArr[3] = SW_RESSTR(STR_ACTIVE_VIEW); + m_aStatusArr[3] = SwResId(STR_ACTIVE_VIEW); m_aContentTree->SetStyle(m_aContentTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE ); @@ -724,8 +724,8 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings, m_aPageChgIdle.SetInvokeHandler(LINK(this, SwNavigationPI, ChangePageHdl)); m_aPageChgIdle.SetPriority(TaskPriority::LOWEST); - m_aContentTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT)); - m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL)); + m_aContentTree->SetAccessibleName(SwResId(STR_ACCESS_TL_CONTENT)); + m_aGlobalTree->SetAccessibleName(SwResId(STR_ACCESS_TL_GLOBAL)); m_aDocListBox->SetAccessibleName(m_aStatusArr[3]); m_aExpandedSize = GetOptimalSize(); diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx index 6550e51f4caf..3ce361976004 100644 --- a/sw/source/uibase/utlui/numfmtlb.cxx +++ b/sw/source/uibase/utlui/numfmtlb.cxx @@ -251,7 +251,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType) if (!pOwnFormatter) { - const sal_Int32 nPos = InsertEntry(SW_RESSTR( STR_DEFINE_NUMBERFORMAT )); + const sal_Int32 nPos = InsertEntry(SwResId( STR_DEFINE_NUMBERFORMAT )); SetEntryData( nPos, nullptr ); } @@ -341,7 +341,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefaultFormat) ) ) { - sValue += SW_RES(RID_STR_SYSTEM); + sValue += SwResId(RID_STR_SYSTEM); } nPos = InsertEntry(sValue, nPos); // Insert as first numeric entry @@ -360,7 +360,7 @@ sal_uLong NumFormatListBox::GetFormat() const IMPL_LINK( NumFormatListBox, SelectHdl, ListBox&, rBox, void ) { const sal_Int32 nPos = rBox.GetSelectEntryPos(); - OUString sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT )); + OUString sDefine(SwResId( STR_DEFINE_NUMBERFORMAT )); SwView *pView = GetView(); if( pView && nPos == rBox.GetEntryCount() - 1 && diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx index 112535907939..f0ba0f192bd6 100644 --- a/sw/source/uibase/utlui/tmplctrl.cxx +++ b/sw/source/uibase/utlui/tmplctrl.cxx @@ -64,7 +64,7 @@ SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ) { - GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_TMPLCTRL_HINT)); + GetStatusBar().SetQuickHelpText(GetId(), SwResId(STR_TMPLCTRL_HINT)); } SwTemplateControl::~SwTemplateControl() diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index 2f4ec2022413..e7656572ed60 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -71,7 +71,7 @@ bool SwPageFootnoteInfoItem::GetPresentation const SwTwips nHght = GetPageFootnoteInfo().GetHeight(); if ( nHght ) { - rText = SW_RESSTR( STR_MAX_FTN_HEIGHT ) + " " + + rText = SwResId( STR_MAX_FTN_HEIGHT ) + " " + ::GetMetricText( nHght, eCoreUnit, ePresUnit, pIntl ) + " " + ::GetSvxString( ::GetMetricId( ePresUnit ) ); } diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 37dec64bbce5..186085a3c617 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -66,7 +66,7 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, const OUString* pURL ) : m_aTopWindow(VclPtr<SwFrameCtrlWindow>::Create(&rWin, this)), m_aLoadedIdle("sw uibase SwOneExampleFrame Loaded"), - m_aMenuRes(SW_RES(RES_FRMEX_MENU)), + m_aMenuRes(ResId(RES_FRMEX_MENU, *pSwResMgr)), m_pModuleView(SW_MOD()->GetView()), m_nStyleFlags(nFlags), m_bIsInitialized(false), @@ -93,7 +93,7 @@ void SwOneExampleFrame::CreateErrorMessage() { if(SwOneExampleFrame::bShowServiceNotAvailableMessage) { - OUString sInfo(SW_RES(STR_SERVICE_UNAVAILABLE)); + OUString sInfo(SwResId(STR_SERVICE_UNAVAILABLE)); sInfo += "com.sun.star.frame.FrameControl"; ScopedVclPtrInstance<InfoBox>(nullptr, sInfo)->Execute(); SwOneExampleFrame::bShowServiceNotAvailableMessage = false; @@ -294,35 +294,35 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void ) { if (pSh->GetCurWord() == "HEADING1") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_HEADING1)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING1)); } else if (pSh->GetCurWord() == "ENTRY1") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_ENTRY1)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY1)); } else if (pSh->GetCurWord() == "HEADING11") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_HEADING11)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING11)); } else if (pSh->GetCurWord() == "ENTRY11") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_ENTRY11)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY11)); } else if (pSh->GetCurWord() == "HEADING12") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_HEADING12)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING12)); } else if (pSh->GetCurWord() == "ENTRY12") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_ENTRY12)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY12)); } else if (pSh->GetCurWord() == "TABLE1") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_TABLE1)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_TABLE1)); } else if (pSh->GetCurWord() == "IMAGE1") { - pSh->Overwrite(SW_RESSTR(STR_IDXEXAMPLE_IDXTXT_IMAGE1)); + pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_IMAGE1)); } else {} diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx index 4be0f652fe73..95f4196f2aa0 100644 --- a/sw/source/uibase/utlui/viewlayoutctrl.cxx +++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx @@ -181,15 +181,15 @@ bool SwViewLayoutControl::MouseMove( const MouseEvent & rEvt ) if ( nXDiff < nXOffset + nImageWidthSingle ) { - GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_VIEWLAYOUT_ONE)); + GetStatusBar().SetQuickHelpText(GetId(), SwResId(STR_VIEWLAYOUT_ONE)); } else if ( nXDiff < nXOffset + nImageWidthSingle + nImageWidthAuto ) { - GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_VIEWLAYOUT_MULTI)); + GetStatusBar().SetQuickHelpText(GetId(), SwResId(STR_VIEWLAYOUT_MULTI)); } else { - GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_VIEWLAYOUT_BOOK)); + GetStatusBar().SetQuickHelpText(GetId(), SwResId(STR_VIEWLAYOUT_BOOK)); } return true; } diff --git a/sw/source/uibase/utlui/wordcountctrl.cxx b/sw/source/uibase/utlui/wordcountctrl.cxx index 1ca297ba67fa..559fded1dcfa 100644 --- a/sw/source/uibase/utlui/wordcountctrl.cxx +++ b/sw/source/uibase/utlui/wordcountctrl.cxx @@ -32,7 +32,7 @@ void SwWordCountStatusBarControl::StateChanged( if (eState == SfxItemState::DEFAULT) // Can access pState GetStatusBar().SetItemText( GetId(), static_cast<const SfxStringItem*>(pState)->GetValue() ); - GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_WORDCOUNT_HINT)); + GetStatusBar().SetQuickHelpText(GetId(), SwResId(STR_WORDCOUNT_HINT)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/web/wdocsh.cxx b/sw/source/uibase/web/wdocsh.cxx index dfccc65eef63..73ac730d7299 100644 --- a/sw/source/uibase/web/wdocsh.cxx +++ b/sw/source/uibase/web/wdocsh.cxx @@ -75,15 +75,15 @@ void SwWebDocShell::FillClass( SvGlobalName * pClassName, { *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); *pClipFormat = SotClipboardFormatId::STARWRITERWEB_60; - *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE); + *pLongUserName = SwResId(STR_WRITER_WEBDOC_FULLTYPE); } else if (nVersion == SOFFICE_FILEFORMAT_8) { *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); *pClipFormat = SotClipboardFormatId::STARWRITERWEB_8; - *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE); + *pLongUserName = SwResId(STR_WRITER_WEBDOC_FULLTYPE); } - *pUserName = SW_RESSTR(STR_HUMAN_SWWEBDOC_NAME); + *pUserName = SwResId(STR_HUMAN_SWWEBDOC_NAME); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index eaff182e80f7..1fa40eb160d7 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -209,12 +209,12 @@ void SwWrtShell::Insert( const OUString &rStr ) SwRewriter aRewriter; aRewriter.AddRule(UndoArg1, GetCursorDescr()); - aRewriter.AddRule(UndoArg2, OUString(SW_RES(STR_YIELDS))); + aRewriter.AddRule(UndoArg2, OUString(SwResId(STR_YIELDS))); { OUString aTmpStr; - aTmpStr += SW_RES(STR_START_QUOTE); + aTmpStr += SwResId(STR_START_QUOTE); aTmpStr += rStr; - aTmpStr += SW_RES(STR_END_QUOTE); + aTmpStr += SwResId(STR_END_QUOTE); aRewriter.AddRule(UndoArg3, rStr); } @@ -248,7 +248,7 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, StartAllAction(); SwRewriter aRewriter; - aRewriter.AddRule(UndoArg1, SW_RES(STR_GRAPHIC)); + aRewriter.AddRule(UndoArg1, SwResId(STR_GRAPHIC)); StartUndo(SwUndoId::INSERT, &aRewriter); @@ -554,11 +554,11 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame SwRewriter aRewriter; if ( bStarMath ) - aRewriter.AddRule(UndoArg1, SW_RES(STR_MATH_FORMULA)); + aRewriter.AddRule(UndoArg1, SwResId(STR_MATH_FORMULA)); else if ( SotExchange::IsChart( aCLSID ) ) - aRewriter.AddRule(UndoArg1, SW_RES(STR_CHART)); + aRewriter.AddRule(UndoArg1, SwResId(STR_CHART)); else - aRewriter.AddRule(UndoArg1, SW_RES(STR_OLE)); + aRewriter.AddRule(UndoArg1, SwResId(STR_OLE)); EndUndo(SwUndoId::INSERT, &aRewriter); @@ -1598,15 +1598,15 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar ) StartAllAction(); OUString aTmpStr1; - aTmpStr1 += SW_RES(STR_START_QUOTE); + aTmpStr1 += SwResId(STR_START_QUOTE); aTmpStr1 += GetSelText(); - aTmpStr1 += SW_RES(STR_END_QUOTE); + aTmpStr1 += SwResId(STR_END_QUOTE); OUString aTmpStr3; - aTmpStr3 += SW_RES(STR_START_QUOTE); + aTmpStr3 += SwResId(STR_START_QUOTE); aTmpStr3 += OUStringLiteral1(cChar); - aTmpStr3 += SW_RES(STR_END_QUOTE); + aTmpStr3 += SwResId(STR_END_QUOTE); aRewriter.AddRule( UndoArg1, aTmpStr1 ); - aRewriter.AddRule( UndoArg2, SW_RES(STR_YIELDS) ); + aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) ); aRewriter.AddRule( UndoArg3, aTmpStr3 ); StartUndo( SwUndoId::REPLACE, &aRewriter ); @@ -1720,7 +1720,7 @@ OUString SwWrtShell::GetSelDescr() const switch (nSelType) { case SelectionType::Graphic: - aResult = SW_RESSTR(STR_GRAPHIC); + aResult = SwResId(STR_GRAPHIC); break; case SelectionType::Frame: @@ -1733,7 +1733,7 @@ OUString SwWrtShell::GetSelDescr() const break; case SelectionType::DrawObject: { - aResult = SW_RESSTR(STR_DRAWING_OBJECTS); + aResult = SwResId(STR_DRAWING_OBJECTS); } break; default: diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx index 0e437bac5760..2b904b5858f0 100644 --- a/sw/source/uibase/wrtsh/wrtundo.cxx +++ b/sw/source/uibase/wrtsh/wrtundo.cxx @@ -111,7 +111,7 @@ OUString SwWrtShell::GetDoString( DoType eDoType ) const default:;//prevent warning } - return SvtResId( nResStr ).toString() + aUndoStr; + return SvtResId(nResStr) + aUndoStr; } void SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const @@ -147,7 +147,7 @@ OUString SwWrtShell::GetRepeatString() const return str; } - return SvtResId(STR_REPEAT).toString() + str; + return SvtResId(STR_REPEAT) + str; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 09c1fbe2a954..383222ead9b5 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -647,7 +647,7 @@ OUString GetTypeRes_Impl( const ResId& rTypeId ) rTypeId.SetRT( RSC_STRING ); if ( rTypeId.GetResMgr()->IsAvailable( rTypeId ) ) { - aTypStr = rTypeId.toString(); + aTypStr = rTypeId; // Set class pointer to the end rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) ); } diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx index db9d16326933..fde6acb7264f 100644 --- a/vcl/source/app/stdtext.cxx +++ b/vcl/source/app/stdtext.cxx @@ -26,7 +26,7 @@ void ShowServiceNotAvailableError(vcl::Window* pParent, const OUString& rServiceName, bool bError) { - OUString aText = VclResId(SV_STDTEXT_SERVICENOTAVAILABLE).toString(). + OUString aText = OUString(VclResId(SV_STDTEXT_SERVICENOTAVAILABLE)). replaceAll("%s", rServiceName); ScopedVclPtrInstance< MessageDialog > aBox( pParent, aText, bError ? VclMessageType::Error : VclMessageType::Warning ); aBox->Execute(); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index b6b74b8eac6e..3fcf82b4e59c 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1176,7 +1176,7 @@ OUString Application::GetHWOSConfInfo() ImplSVData* pSVData = ImplGetSVData(); OUStringBuffer aDetails; - aDetails.append( VclResId(SV_APP_CPUTHREADS).toString() ); + aDetails.append( VclResId(SV_APP_CPUTHREADS) ); aDetails.append( (sal_Int32) std::thread::hardware_concurrency() ); aDetails.append( "; " ); @@ -1187,22 +1187,22 @@ OUString Application::GetHWOSConfInfo() else aVersion = "-"; - aDetails.append( VclResId(SV_APP_OSVERSION).toString() ); + aDetails.append( VclResId(SV_APP_OSVERSION) ); aDetails.append( aVersion ); aDetails.append( "; " ); - aDetails.append( VclResId(SV_APP_UIRENDER).toString() ); + aDetails.append( VclResId(SV_APP_UIRENDER) ); #if HAVE_FEATURE_OPENGL if ( OpenGLWrapper::isVCLOpenGLEnabled() ) - aDetails.append( VclResId(SV_APP_GL).toString() ); + aDetails.append( VclResId(SV_APP_GL) ); else #endif - aDetails.append( VclResId(SV_APP_DEFAULT).toString() ); + aDetails.append( VclResId(SV_APP_DEFAULT) ); aDetails.append( "; " ); #ifdef LINUX // Only linux has different backends, so don't show blank for others. - aDetails.append( VclResId(SV_APP_VCLBACKEND).toString() ); + aDetails.append( VclResId(SV_APP_VCLBACKEND) ); aDetails.append( GetToolkitName() ); aDetails.append( "; " ); #endif diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 736c77d1b127..89abc984b459 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -161,7 +161,7 @@ OUString Button::GetStandardText( StandardButtonType eButton ) else if (nResId == SV_BUTTONTEXT_CANCEL) nResId = SV_BUTTONTEXT_CANCEL_NOMNEMONIC; #endif - return ResId(nResId, *pResMgr).toString(); + return ResId(nResId, *pResMgr); } bool Button::SetModeImage( const Image& rImage ) diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx index 6cdd4442b421..191aa2954290 100644 --- a/vcl/source/edit/textundo.cxx +++ b/vcl/source/edit/textundo.cxx @@ -213,7 +213,7 @@ void TextUndoConnectParas::Redo() OUString TextUndoConnectParas::GetComment () const { - return ResId(STR_TEXTUNDO_CONNECTPARAS, *ImplGetResMgr()).toString(); + return ResId(STR_TEXTUNDO_CONNECTPARAS, *ImplGetResMgr()); } TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, sal_uInt32 nPara, sal_Int32 nPos ) @@ -290,7 +290,7 @@ OUString TextUndoInsertChars::GetComment () const // multiple lines? OUString sText(maText); Shorten(sText); - return ResId(STR_TEXTUNDO_INSERTCHARS, *ImplGetResMgr()).toString().replaceAll("$1", sText); + return OUString(ResId(STR_TEXTUNDO_INSERTCHARS, *ImplGetResMgr())).replaceAll("$1", sText); } TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr ) diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index ce3702169bcb..5bad32a22e44 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -985,7 +985,7 @@ void OutputDevice::ImplInitFontList() const ResMgr* pMgr = ImplGetResMgr(); if( pMgr ) { - OUString aResStr(ResId(SV_ACCESSERROR_NO_FONTS, *pMgr).toString()); + OUString aResStr(ResId(SV_ACCESSERROR_NO_FONTS, *pMgr)); if( !aResStr.isEmpty() ) aError = aResStr; } diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 906486ad51d5..5a7bd774d4ca 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -342,7 +342,7 @@ OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData, } if( nHelpId && ImplGetResMgr() ) - aHelpStr = ResId(nHelpId, *ImplGetResMgr()).toString(); + aHelpStr = ResId(nHelpId, *ImplGetResMgr()); return aHelpStr; } diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 46c453edb737..bbc2c702928c 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -140,13 +140,13 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) : aCloseBtn->InsertItem(IID_DOCUMENTCLOSE, aCloseBtn->maImage); aCloseBtn->SetSelectHdl(LINK(this, MenuBarWindow, CloseHdl)); aCloseBtn->AddEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl)); - aCloseBtn->SetQuickHelpText(IID_DOCUMENTCLOSE, ResId(SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr).toString()); + aCloseBtn->SetQuickHelpText(IID_DOCUMENTCLOSE, ResId(SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr)); aFloatBtn->SetSymbol( SymbolType::FLOAT ); - aFloatBtn->SetQuickHelpText( ResId(SV_HELPTEXT_RESTORE, *pResMgr).toString() ); + aFloatBtn->SetQuickHelpText( ResId(SV_HELPTEXT_RESTORE, *pResMgr) ); aHideBtn->SetSymbol( SymbolType::HIDE ); - aHideBtn->SetQuickHelpText( ResId(SV_HELPTEXT_MINIMIZE, *pResMgr).toString() ); + aHideBtn->SetQuickHelpText( ResId(SV_HELPTEXT_MINIMIZE, *pResMgr) ); } ImplInitStyleSettings(); diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index ac5133506449..dfda1fabf11d 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -407,7 +407,7 @@ void WarningBox::SetDefaultCheckBoxText() { ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) - maCheckBoxText = ResId(SV_STDTEXT_DONTWARNAGAIN, *pResMgr).toString(); + maCheckBoxText = ResId(SV_STDTEXT_DONTWARNAGAIN, *pResMgr); } Image WarningBox::GetStandardImage() @@ -456,7 +456,7 @@ void QueryBox::SetDefaultCheckBoxText() { ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) - maCheckBoxText = ResId(SV_STDTEXT_DONTASKAGAIN, *pResMgr).toString(); + maCheckBoxText = ResId(SV_STDTEXT_DONTASKAGAIN, *pResMgr); } Image QueryBox::GetStandardImage() diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index c3ef73c60b3c..9dea04a8e4ed 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -70,7 +70,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( vcl::Window* i_pParent ) : Window( i_pParent, 0 ) , maOrigSize( 10, 10 ) , maPageVDev( VclPtr<VirtualDevice>::Create(*this) ) - , maToolTipString(VclResId( SV_PRINT_PRINTPREVIEW_TXT).toString()) + , maToolTipString(VclResId( SV_PRINT_PRINTPREVIEW_TXT)) , mbGreyscale( false ) , maHorzDim(VclPtr<FixedLine>::Create(this, WB_HORZ | WB_CENTER)) , maVertDim(VclPtr<FixedLine>::Create(this, WB_VERT | WB_VCENTER)) @@ -573,11 +573,11 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC , maNUpPage(m_pUIBuilder.get()) , maJobPage(m_pUIBuilder.get()) , maOptionsPage(m_pUIBuilder.get()) - , maNoPageStr( VclResId( SV_PRINT_NOPAGES ).toString() ) + , maNoPageStr( VclResId( SV_PRINT_NOPAGES ) ) , mnCurPage( 0 ) , mnCachedPages( 0 ) - , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ).toString() ) - , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ).toString() ) + , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ) ) + , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ) ) , mbShowLayoutPage( true ) { get(mpOKButton, "ok"); diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index a5b71d093363..18c82e76b782 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2351,7 +2351,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) OUString aStr; ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) - aStr = ResId( nHelpResId, *pResMgr ).toString(); + aStr = ResId( nHelpResId, *pResMgr ); if ( rHEvt.GetMode() & HelpEventMode::BALLOON ) Help::ShowBalloon( this, aHelpRect.Center(), aHelpRect, aStr ); else diff --git a/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx index 42ef78a59132..c4da0258b8c6 100644 --- a/vcl/unx/gtk/fpicker/resourceprovider.cxx +++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx @@ -75,7 +75,7 @@ OUString SalGtkPicker::getResString( sal_Int32 aId ) // translate the control id to a resource id sal_Int16 aResId = CtrlIdToResId( aId ); if ( aResId > -1 ) - aResString = ResId(aResId, *ImplGetResMgr()).toString(); + aResString = ResId(aResId, *ImplGetResMgr()); } catch(...) { diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index f32e49ad4f7b..8192076fc906 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -643,7 +643,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *firstsubmenu = g_menu_new (); - OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr).toString(), + OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sNew.getStr(), "app.New"); @@ -655,7 +655,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *secondsubmenu = g_menu_new (); - OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr).toString(), + OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sPreferences.getStr(), "app.OptionsTreeDialog"); @@ -667,21 +667,21 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *thirdsubmenu = g_menu_new (); - OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr).toString(), + OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sHelp.getStr(), "app.HelpIndex"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr).toString(), + OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sAbout.getStr(), "app.About"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr).toString(), + OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sQuit.getStr(), "app.Quit"); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 30a729c5cbcc..54574dd1a38c 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -666,7 +666,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *firstsubmenu = g_menu_new (); - OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr).toString(), + OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sNew.getStr(), "app.New"); @@ -678,7 +678,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *secondsubmenu = g_menu_new (); - OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr).toString(), + OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sPreferences.getStr(), "app.OptionsTreeDialog"); @@ -690,21 +690,21 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *thirdsubmenu = g_menu_new (); - OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr).toString(), + OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sHelp.getStr(), "app.HelpIndex"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr).toString(), + OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sAbout.getStr(), "app.About"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr).toString(), + OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sQuit.getStr(), "app.Quit"); diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index af57bb204b71..00a5a5475b91 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -519,7 +519,7 @@ QString KDE4FilePicker::getResString( sal_Int16 aRedId ) try { - aResString = toQString(ResId(aRedId, *ImplGetResMgr()).toString()); + aResString = toQString(ResId(aRedId, *ImplGetResMgr())); } catch(...) { diff --git a/writerperfect/inc/WPFTResMgr.hxx b/writerperfect/inc/WPFTResMgr.hxx index d578685f275e..54de1e4f0e06 100644 --- a/writerperfect/inc/WPFTResMgr.hxx +++ b/writerperfect/inc/WPFTResMgr.hxx @@ -12,8 +12,10 @@ struct WRITERPERFECT_DLLPUBLIC WPFTResMgr static ResMgr &GetResMgr(); }; -#define WPFT_RES(i) ResId((i), WPFTResMgr::GetResMgr()) -#define WPFT_RESSTR(i) WPFT_RES(i).toString() +inline OUString WpResId(sal_uInt16 nId) +{ + return ResId(nId, WPFTResMgr::GetResMgr()); +} #endif diff --git a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx index 11881202ad28..5233078da22b 100644 --- a/writerperfect/source/calc/MSWorksCalcImportFilter.cxx +++ b/writerperfect/source/calc/MSWorksCalcImportFilter.cxx @@ -200,22 +200,22 @@ bool MSWorksCalcImportFilter::doImportDocument(librevenge::RVNGInputStream &rInp OUString title, encoding; if (creator == libwps::WPS_MSWORKS) { - title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWORKS); + title=WpResId(STR_ENCODING_DIALOG_TITLE_MSWORKS); encoding="CP850"; } else if (creator == libwps::WPS_LOTUS) { - title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_LOTUS); + title=WpResId(STR_ENCODING_DIALOG_TITLE_LOTUS); encoding="CP437"; } else if (creator == libwps::WPS_SYMPHONY) { - title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_SYMPHONY); + title=WpResId(STR_ENCODING_DIALOG_TITLE_SYMPHONY); encoding="CP437"; } else { - title=WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_QUATTROPRO); + title=WpResId(STR_ENCODING_DIALOG_TITLE_QUATTROPRO); encoding="CP437"; } try diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx index 631dc5f9ed04..7f713857f018 100644 --- a/writerperfect/source/writer/MSWorksImportFilter.cxx +++ b/writerperfect/source/writer/MSWorksImportFilter.cxx @@ -48,19 +48,19 @@ bool MSWorksImportFilter::doImportDocument(librevenge::RVNGInputStream &rInput, switch (creator) { case libwps::WPS_MSWORKS: - title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWORKS); + title = WpResId(STR_ENCODING_DIALOG_TITLE_MSWORKS); encoding = "CP850"; break; case libwps::WPS_RESERVED_0: // MS Write - title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_MSWRITE); + title = WpResId(STR_ENCODING_DIALOG_TITLE_MSWRITE); encoding = "CP1252"; break; case libwps::WPS_RESERVED_1: // DosWord - title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE_DOSWORD); + title = WpResId(STR_ENCODING_DIALOG_TITLE_DOSWORD); encoding = "CP850"; break; default: - title = WPFT_RESSTR(STR_ENCODING_DIALOG_TITLE); + title = WpResId(STR_ENCODING_DIALOG_TITLE); encoding = "CP850"; break; } diff --git a/xmlsecurity/inc/resourcemanager.hxx b/xmlsecurity/inc/resourcemanager.hxx index f2352a94e62e..ece7fba24fe2 100644 --- a/xmlsecurity/inc/resourcemanager.hxx +++ b/xmlsecurity/inc/resourcemanager.hxx @@ -49,7 +49,10 @@ namespace XmlSec OUString GetHexString( const css::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, sal_uInt16 _nLineBreak = 0xFFFF ); } -#define XMLSEC_RES(id) ResId(id,*XmlSec::GetResMgr()) +inline OUString XsResId(sal_uInt16 nId) +{ + return ResId(nId, *XmlSec::GetResMgr()); +} #endif diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 95f249af12b6..4dfa87edeeda 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -245,7 +245,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures( } else { - ScopedVclPtrInstance< MessageDialog > aBox(nullptr, XMLSEC_RES(RID_XMLSECWB_NO_MOZILLA_PROFILE), VclMessageType::Warning); + ScopedVclPtrInstance< MessageDialog > aBox(nullptr, XsResId(RID_XMLSECWB_NO_MOZILLA_PROFILE), VclMessageType::Warning); aBox->Execute(); } diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx index 9aa192f47988..e4afcacf4714 100644 --- a/xmlsecurity/source/dialogs/certificateviewer.cxx +++ b/xmlsecurity/source/dialogs/certificateviewer.cxx @@ -121,7 +121,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( vcl::Window* _pParent, C if ( !bCertValid ) { m_pCertImg->SetImage(Image(BitmapEx(BMP_STATE_NOT_VALIDATED))); - m_pHintNotTrustedFT->SetText( XMLSEC_RES( STR_CERTIFICATE_NOT_VALIDATED ) ); + m_pHintNotTrustedFT->SetText( XsResId( STR_CERTIFICATE_NOT_VALIDATED ) ); } // insert data @@ -250,7 +250,7 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C constexpr int CS_LB_WIDTH = (DLGS_WIDTH - RSC_SP_DLG_INNERBORDER_RIGHT) - RSC_SP_DLG_INNERBORDER_LEFT; static long nTabs[] = { 2, 0, 30*CS_LB_WIDTH/100 }; m_pElementsLB->SetTabs( &nTabs[ 0 ] ); - m_pElementsLB->InsertHeaderEntry( XMLSEC_RES( STR_HEADERBAR ) ); + m_pElementsLB->InsertHeaderEntry( XsResId( STR_HEADERBAR ) ); // fill list box Reference< security::XCertificate > xCert = mpDlg->mxCert; @@ -260,62 +260,62 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C OUString aDetails; // Certificate Versions are reported wrong (#i35107#) - 0 == "V1", 1 == "V2", ..., n = "V(n+1)" aLBEntry = "V" + OUString::number( xCert->getVersion() + 1 ); - InsertElement( XMLSEC_RES( STR_VERSION ), aLBEntry, aLBEntry ); + InsertElement( XsResId( STR_VERSION ), aLBEntry, aLBEntry ); Sequence< sal_Int8 > aSeq = xCert->getSerialNumber(); aLBEntry = XmlSec::GetHexString( aSeq, pHexSep ); aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak ); - InsertElement( XMLSEC_RES( STR_SERIALNUM ), aLBEntry, aDetails, true ); + InsertElement( XsResId( STR_SERIALNUM ), aLBEntry, aDetails, true ); std::pair< OUString, OUString> pairIssuer = XmlSec::GetDNForCertDetailsView(xCert->getIssuerName()); aLBEntry = pairIssuer.first; aDetails = pairIssuer.second; - InsertElement( XMLSEC_RES( STR_ISSUER ), aLBEntry, aDetails ); + InsertElement( XsResId( STR_ISSUER ), aLBEntry, aDetails ); DateTime aDateTime( DateTime::EMPTY ); utl::typeConvert( xCert->getNotValidBefore(), aDateTime ); aLBEntry = GetSettings().GetUILocaleDataWrapper().getDate( Date( aDateTime.GetDate()) ); aLBEntry += " "; aLBEntry += GetSettings().GetUILocaleDataWrapper().getTime( aDateTime.GetTime() ); - InsertElement( XMLSEC_RES( STR_VALIDFROM ), aLBEntry, aLBEntry ); + InsertElement( XsResId( STR_VALIDFROM ), aLBEntry, aLBEntry ); utl::typeConvert( xCert->getNotValidAfter(), aDateTime ); aLBEntry = GetSettings().GetUILocaleDataWrapper().getDate( Date( aDateTime.GetDate()) ); aLBEntry += " "; aLBEntry += GetSettings().GetUILocaleDataWrapper().getTime( aDateTime.GetTime() ); - InsertElement( XMLSEC_RES( STR_VALIDTO ), aLBEntry, aLBEntry ); + InsertElement( XsResId( STR_VALIDTO ), aLBEntry, aLBEntry ); std::pair< OUString, OUString > pairSubject = XmlSec::GetDNForCertDetailsView(xCert->getSubjectName()); aLBEntry = pairSubject.first; aDetails = pairSubject.second; - InsertElement( XMLSEC_RES( STR_SUBJECT ), aLBEntry, aDetails ); + InsertElement( XsResId( STR_SUBJECT ), aLBEntry, aDetails ); aLBEntry = aDetails = xCert->getSubjectPublicKeyAlgorithm(); - InsertElement( XMLSEC_RES( STR_SUBJECT_PUBKEY_ALGO ), aLBEntry, aDetails ); + InsertElement( XsResId( STR_SUBJECT_PUBKEY_ALGO ), aLBEntry, aDetails ); aSeq = xCert->getSubjectPublicKeyValue(); aLBEntry = XmlSec::GetHexString( aSeq, pHexSep ); aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak ); - InsertElement( XMLSEC_RES( STR_SUBJECT_PUBKEY_VAL ), aLBEntry, aDetails, true ); + InsertElement( XsResId( STR_SUBJECT_PUBKEY_VAL ), aLBEntry, aDetails, true ); aLBEntry = aDetails = xCert->getSignatureAlgorithm(); - InsertElement( XMLSEC_RES( STR_SIGNATURE_ALGO ), aLBEntry, aDetails ); + InsertElement( XsResId( STR_SIGNATURE_ALGO ), aLBEntry, aDetails ); CertificateChooser* pChooser = dynamic_cast<CertificateChooser*>(mpDlg->GetParent()); if (pChooser) { aLBEntry = pChooser->UsageInClearText( mpDlg->mxCert->getCertificateUsage() ); - InsertElement( XMLSEC_RES( STR_USE ), aLBEntry, aLBEntry ); + InsertElement( XsResId( STR_USE ), aLBEntry, aLBEntry ); } aSeq = xCert->getSHA1Thumbprint(); aLBEntry = XmlSec::GetHexString( aSeq, pHexSep ); aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak ); - InsertElement( XMLSEC_RES( STR_THUMBPRINT_SHA1 ), aLBEntry, aDetails, true ); + InsertElement( XsResId( STR_THUMBPRINT_SHA1 ), aLBEntry, aDetails, true ); aSeq = xCert->getMD5Thumbprint(); aLBEntry = XmlSec::GetHexString( aSeq, pHexSep ); aDetails = XmlSec::GetHexString( aSeq, pHexSep, nLineBreak ); - InsertElement( XMLSEC_RES( STR_THUMBPRINT_MD5 ), aLBEntry, aDetails, true ); + InsertElement( XsResId( STR_THUMBPRINT_MD5 ), aLBEntry, aDetails, true ); m_pElementsLB->SetSelectHdl( LINK( this, CertificateViewerDetailsTP, ElementSelectHdl ) ); } diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index cedcb3ebc1d5..b88dd97337f8 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -273,7 +273,7 @@ bool DigitalSignaturesDialog::canAddRemove() if ( (!bSave1_1 && bDoc1_1) || (bSave1_1 && bDoc1_1) ) { //#4 - ScopedVclPtrInstance< MessageDialog > err(nullptr, XMLSEC_RES(STR_XMLSECDLG_OLD_ODF_FORMAT)); + ScopedVclPtrInstance< MessageDialog > err(nullptr, XsResId(STR_XMLSECDLG_OLD_ODF_FORMAT)); err->Execute(); ret = false; } @@ -292,7 +292,7 @@ bool DigitalSignaturesDialog::canAddRemove() //is shown every time until the user presses 'OK'. From then on, the warning //is not displayed anymore as long as the signatures dialog is alive. if (ScopedVclPtrInstance<MessageDialog>( - nullptr, XMLSEC_RES(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_NO) + nullptr, XsResId(STR_XMLSECDLG_QUERY_REMOVEDOCSIGNBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_NO) ret = false; else m_bWarningShowSignMacro = true; |