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 /sw/source/uibase | |
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>
Diffstat (limited to 'sw/source/uibase')
67 files changed, 354 insertions, 354 deletions
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: */ |