Kaydet (Commit) 2155e04d authored tarafından Caolán McNamara's avatar Caolán McNamara

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/37817Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst cee02e81
......@@ -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 " );
......
......@@ -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() ) );
......
......@@ -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();
}
......
......@@ -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: */
......@@ -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();
......
......@@ -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, '\'');
......
......@@ -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;
}
}
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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();
......
......@@ -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 ) );
}
}
......
......@@ -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 );
......
......@@ -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
......
......@@ -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
......
......@@ -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: */
......@@ -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()
......
This diff is collapsed.
......@@ -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
......
......@@ -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";
......
......@@ -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;