diff options
author | Gabor Kelemen <kelemeng@ubuntu.com> | 2018-05-11 16:26:58 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-05-12 13:59:39 +0200 |
commit | 9356e0efb188258504b2073ffc8b388d566226e3 (patch) | |
tree | b5e45bcbd9de71c3c24b84febc10c466d01976d2 /sc/source | |
parent | 4145a857791df2100d5df9defb79e1160f89249f (diff) |
Replace ScGlobal::GetRscString with simple ScResId calls
After the gettext migration there is no point to have two
APIs for reading the same .mo file.
This patch is for sc/source/ui/view/ for easier review.
Change-Id: Ic07f7e924236d29f3cafd69c5ee634ae92105459
Reviewed-on: https://gerrit.libreoffice.org/54137
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc/source')
29 files changed, 111 insertions, 86 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index cb2d374bdb6e..9e546006803f 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -48,6 +48,7 @@ #include <formulacell.hxx> #include <scmod.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <transobj.hxx> #include <drwtrans.hxx> #include <scabstdlg.hxx> @@ -755,7 +756,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) case SID_STATUS_DOCPOS: { - OUString aStr = ScGlobal::GetRscString( STR_TABLE_COUNT ); + OUString aStr = ScResId( STR_TABLE_COUNT ); aStr = aStr.replaceFirst("%1", OUString::number( nTab + 1 ) ); aStr = aStr.replaceFirst("%2", OUString::number( nTabCount ) ); @@ -775,7 +776,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) nRow2 = aMarkRange.aEnd.Row(); if( nCol2 != nCol1 || nRow1 != nRow2 ) { - OUString aStr = ScGlobal::GetRscString( STR_ROWCOL_SELCOUNT ); + OUString aStr = ScResId( STR_ROWCOL_SELCOUNT ); aStr = aStr.replaceAll( "$1", OUString::number( nRow2 - nRow1 + 1 )); aStr = aStr.replaceAll( "$2", OUString::number( nCol2 - nCol1 + 1 )); rSet.Put( SfxStringItem( nWhich, aStr ) ); @@ -786,7 +787,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) pDoc->GetFilterSelCount( nPosX, nPosY, nTab, nSelected, nTotal ); if( nTotal ) { - OUString aStr = ScGlobal::GetRscString( STR_FILTER_SELCOUNT ); + OUString aStr = ScResId( STR_FILTER_SELCOUNT ); aStr = aStr.replaceAll( "$1", OUString::number( nSelected ) ); aStr = aStr.replaceAll( "$2", OUString::number( nTotal ) ); rSet.Put( SfxStringItem( nWhich, aStr ) ); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index ff00befb301e..ebc8c4363f68 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -84,6 +84,7 @@ #include <condformatdlgitem.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <scui_def.hxx> #include <svx/dialogs.hrc> #include <scabstdlg.hxx> @@ -502,7 +503,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); ScopedVclPtr<AbstractScInsertContentsDlg> pDlg(pFact->CreateScInsertContentsDlg( pTabViewShell->GetDialogParent(), - &ScGlobal::GetRscString(STR_FILL_TAB))); + new OUString(ScResId(STR_FILL_TAB)) )); OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->SetFillMode(true); @@ -1706,11 +1707,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) break; case SID_INSERT_CURRENT_DATE: pTabViewShell->InsertCurrentTime( - SvNumFormatType::DATE, ScGlobal::GetRscString(STR_UNDO_INSERT_CURRENT_DATE)); + SvNumFormatType::DATE, ScResId(STR_UNDO_INSERT_CURRENT_DATE)); break; case SID_INSERT_CURRENT_TIME: pTabViewShell->InsertCurrentTime( - SvNumFormatType::TIME, ScGlobal::GetRscString(STR_UNDO_INSERT_CURRENT_TIME)); + SvNumFormatType::TIME, ScResId(STR_UNDO_INSERT_CURRENT_TIME)); break; case SID_SPELL_DIALOG: @@ -2015,7 +2016,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) vcl::Window* pWin = pTabViewShell->GetDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_EDIT_EXISTING_COND_FORMATS))); + ScResId(STR_EDIT_EXISTING_COND_FORMATS))); xQueryBox->set_default_response(RET_YES); bool bEditExisting = xQueryBox->run() == RET_YES; if(bEditExisting) @@ -2282,7 +2283,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pData->GetMultiArea(aRangesRef); const ScRangeList aRanges = *aRangesRef; - OUString aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWNOTE : STR_UNDO_HIDENOTE ); + OUString aUndo = ScResId( bShowNote ? STR_UNDO_SHOWNOTE : STR_UNDO_HIDENOTE ); pData->GetDocShell()->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pData->GetViewShell()->GetViewShellId() ); for (auto const& rTab : rMark.GetSelectedTabs()) @@ -2332,7 +2333,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScDocument* pDoc = pData->GetDocument(); std::vector<sc::NoteEntry> aNotes; - OUString aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWALLNOTES : STR_UNDO_HIDEALLNOTES ); + OUString aUndo = ScResId( bShowNote ? STR_UNDO_SHOWALLNOTES : STR_UNDO_HIDEALLNOTES ); pData->GetDocShell()->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pData->GetViewShell()->GetViewShellId() ); for (auto const& rTab : rMark.GetSelectedTabs()) @@ -2365,7 +2366,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pDoc->GetNotesInRange(aRanges, aNotes); bool bShowNote = (eState == ALLHIDDEN || eState == MIXED); - OUString aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWALLNOTES : STR_UNDO_HIDEALLNOTES ); + OUString aUndo = ScResId( bShowNote ? STR_UNDO_SHOWALLNOTES : STR_UNDO_HIDEALLNOTES ); pData->GetDocShell()->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pData->GetViewShell()->GetViewShellId() ); for(std::vector<sc::NoteEntry>::const_iterator itr = aNotes.begin(), @@ -2915,7 +2916,7 @@ void ScCellShell::ExecuteDataPilotDialog() vcl::Window* pWin = pTabViewShell->GetDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_DATAPILOT_SUBTOTAL))); + ScResId(STR_DATAPILOT_SUBTOTAL))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_NO) bOK = false; @@ -2947,7 +2948,7 @@ void ScCellShell::ExecuteDataPilotDialog() vcl::Window* pWin = pTabViewShell->GetDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(pSrcErrorId))); + ScResId(pSrcErrorId))); xInfoBox->run(); return; } diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 63225e8e9b92..8d6c3955f4da 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -41,6 +41,7 @@ #include <tabvwsh.hxx> #include <sc.hrc> #include <globstr.hrc> +#include <scresid.hxx> #include <global.hxx> #include <globalnames.hxx> #include <scmod.hxx> @@ -1014,7 +1015,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScDocShell* pDocSh = pData->GetDocShell(); OSL_ENSURE( pDocSh, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDocSh is null!" ); - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_TEXTTOCOLUMNS ); + OUString aUndo = ScResId( STR_UNDO_TEXTTOCOLUMNS ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pData->GetViewShell()->GetViewShellId() ); ScImportExport aImport( pDoc, aRange.aStart ); diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index e3f8ab948df0..e56623f062e4 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -28,6 +28,7 @@ #include <vcl/weld.hxx> #include <sfx2/app.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <scmod.hxx> #include <appoptio.hxx> #include <tabvwsh.hxx> @@ -424,7 +425,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = pTabViewShell->GetDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_UPDATE_SCENARIO))); + ScResId(STR_UPDATE_SCENARIO))); xQueryBox->set_default_response(RET_YES); bExtend = xQueryBox->run() == RET_YES; } @@ -440,7 +441,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = pTabViewShell->GetDialogParent(); std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_NOAREASELECTED))); + ScResId(STR_NOAREASELECTED))); xErrorBox->run(); } } @@ -458,7 +459,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) OUString aTmp; pDoc->GetName(nTab, aTmp); - aBaseName = aTmp + "_" + ScGlobal::GetRscString(STR_SCENARIO) + "_"; + aBaseName = aTmp + "_" + ScResId(STR_SCENARIO) + "_"; // first test, if the prefix is recognised as valid, // else avoid only doubles @@ -896,7 +897,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) { std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pDlgParent ? pDlgParent->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_INVALID_AFAREA))); + ScResId(STR_INVALID_AFAREA))); xErrorBox->run(); } } diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx index f1636efe1509..f12fe630afb2 100644 --- a/sc/source/ui/view/colrowba.cxx +++ b/sc/source/ui/view/colrowba.cxx @@ -26,6 +26,7 @@ #include <docsh.hxx> #include <appoptio.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <markdata.hxx> #include <tabview.hxx> #include <columnspanset.hxx> @@ -33,7 +34,7 @@ static OUString lcl_MetricString( long nTwips, const OUString& rText ) { if ( nTwips <= 0 ) - return ScGlobal::GetRscString(STR_TIP_HIDE); + return ScResId(STR_TIP_HIDE); else { FieldUnit eUserMet = SC_MOD()->GetAppOptions().GetAppMetric(); @@ -197,7 +198,7 @@ void ScColBar::DrawInvert( long nDragPosP ) OUString ScColBar::GetDragHelp( long nVal ) { long nTwips = static_cast<long>( nVal / pTabView->GetViewData().GetPPTX() ); - return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_WIDTH) ); + return lcl_MetricString( nTwips, ScResId(STR_TIP_WIDTH) ); } bool ScColBar::IsLayoutRTL() const // override only for columns @@ -356,7 +357,7 @@ void ScRowBar::DrawInvert( long nDragPosP ) OUString ScRowBar::GetDragHelp( long nVal ) { long nTwips = static_cast<long>( nVal / pTabView->GetViewData().GetPPTY() ); - return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_HEIGHT) ); + return lcl_MetricString( nTwips, ScResId(STR_TIP_HEIGHT) ); } SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo ) const // override only for rows diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx index b59c5a2cea04..24e2d194f537 100644 --- a/sc/source/ui/view/dbfunc.cxx +++ b/sc/source/ui/view/dbfunc.cxx @@ -31,6 +31,7 @@ #include <undodat.hxx> #include <dbdata.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <global.hxx> #include <dbdocfun.hxx> #include <editable.hxx> @@ -308,7 +309,7 @@ void ScDBFunc::ToggleAutoFilter() // use a list action for the AutoFilter buttons (ScUndoAutoFilter) and the filter operation - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_QUERY ); + OUString aUndo = ScResId( STR_UNDO_QUERY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId() ); ScRange aRange; @@ -341,8 +342,8 @@ void ScDBFunc::ToggleAutoFilter() vcl::Window* pWin = GetViewData().GetDialogParent(); std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, - VclButtonsType::YesNo, ScGlobal::GetRscString(STR_MSSG_MAKEAUTOFILTER_0))); // header from first row? - xBox->set_title(ScGlobal::GetRscString(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc" + VclButtonsType::YesNo, ScResId(STR_MSSG_MAKEAUTOFILTER_0))); // header from first row? + xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc" xBox->set_default_response(RET_YES); if (xBox->run() == RET_YES) { @@ -371,7 +372,7 @@ void ScDBFunc::ToggleAutoFilter() vcl::Window* pWin = GetViewData().GetDialogParent(); std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_ERR_AUTOFILTER))); + ScResId(STR_ERR_AUTOFILTER))); xErrorBox->run(); } } diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 5efaa3f11085..7474f22bbac4 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/sheet/XDrillDownDataSupplier.hpp> #include <global.hxx> +#include <scresid.hxx> #include <globstr.hrc> #include <sc.hrc> #include <undotab.hxx> @@ -424,8 +425,8 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, vcl::Window* pWin = GetViewData().GetDialogParent(); std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_MSSG_DOSUBTOTALS_1))); // "delete data?" - xBox->set_title(ScGlobal::GetRscString(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc" + ScResId(STR_MSSG_DOSUBTOTALS_1))); // "delete data?" + xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc" xBox->set_default_response(RET_YES); bOk = xBox->run() == RET_YES; } @@ -594,7 +595,7 @@ bool ScDBFunc::MakePivotTable( { SCTAB nSrcTab = GetViewData().GetTabNo(); - OUString aName( ScGlobal::GetRscString(STR_PIVOT_TABLE) ); + OUString aName( ScResId(STR_PIVOT_TABLE) ); OUString aStr; pDoc->GetName( nSrcTab, aStr ); @@ -1171,7 +1172,7 @@ void ScDBFunc::GroupDataPilot() } OUString aGroupDimName = pGroupDimension->GetGroupDimName(); - OUString aGroupName = pGroupDimension->CreateGroupName(ScGlobal::GetRscString(STR_PIVOT_GROUP)); + OUString aGroupName = pGroupDimension->CreateGroupName(ScResId(STR_PIVOT_GROUP)); ScDPSaveGroupItem aGroup( aGroupName ); ScDPUniqueStringSet::const_iterator it = aEntries.begin(), itEnd = aEntries.end(); for (; it != itEnd; ++it) @@ -2069,7 +2070,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet pInsDoc->SetClipArea( ScRange( 0, 0, nNewTab, nEndCol, nEndRow, nNewTab ) ); ::svl::IUndoManager* pMgr = GetViewData().GetDocShell()->GetUndoManager(); - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE ); + OUString aUndo = ScResId( STR_UNDO_DOOUTLINE ); pMgr->EnterListAction( aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId() ); OUString aNewTabName; diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 0bf70f79289a..83fcb408c9a4 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -38,6 +38,7 @@ #include <drawutil.hxx> #include <scmod.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <chartarr.hxx> #include <gridwin.hxx> #include <userdat.hxx> @@ -522,7 +523,7 @@ void ScDrawView::SetMarkedOriginalSize() if (nDone && pViewData) { - pUndoGroup->SetComment(ScGlobal::GetRscString( STR_UNDO_ORIGINALSIZE )); + pUndoGroup->SetComment(ScResId( STR_UNDO_ORIGINALSIZE )); ScDocShell* pDocSh = pViewData->GetDocShell(); pDocSh->GetUndoManager()->AddUndoAction(pUndoGroup); pDocSh->SetDrawModified(); @@ -580,7 +581,7 @@ void ScDrawView::FitToCellSize() pObj->SetSnapRect(aCellRect); - pUndoGroup->SetComment(ScGlobal::GetRscString( STR_UNDO_FITCELLSIZE )); + pUndoGroup->SetComment(ScResId( STR_UNDO_FITCELLSIZE )); ScDocShell* pDocSh = pViewData->GetDocShell(); pDocSh->GetUndoManager()->AddUndoAction(pUndoGroup); diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 842abcddaf54..d688b8a13ca5 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -46,6 +46,7 @@ #include <drawutil.hxx> #include <futext.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <tabvwsh.hxx> #include <client.hxx> #include <scmod.hxx> @@ -214,7 +215,7 @@ void ScDrawView::SetMarkedToLayer( SdrLayerID nLayerNo ) { // #i11702# use SdrUndoObjectLayerChange for undo // STR_UNDO_SELATTR is "Attributes" - should use a different text later - BegUndo( ScGlobal::GetRscString( STR_UNDO_SELATTR ) ); + BegUndo( ScResId( STR_UNDO_SELATTR ) ); const SdrMarkList& rMark = GetMarkedObjectList(); const size_t nCount = rMark.GetMarkCount(); @@ -283,7 +284,7 @@ void ScDrawView::UpdateWorkArea() void ScDrawView::DoCut() { DoCopy(); - BegUndo( ScGlobal::GetRscString( STR_UNDO_CUT ) ); + BegUndo( ScResId( STR_UNDO_CUT ) ); DeleteMarked(); // In this View - not affected by 505f change EndUndo(); } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 9302b9cd506f..0278a30a66a4 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -69,6 +69,7 @@ #include <tabvwsh.hxx> #include <editutil.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <gridwin.hxx> #define ShellClass_ScEditShell @@ -132,7 +133,7 @@ static void lcl_RemoveAttribs( EditView& rEditView ) bool bOld = pEngine->GetUpdateMode(); pEngine->SetUpdateMode(false); - OUString aName = ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); + OUString aName = ScResId( STR_UNDO_DELETECONTENTS ); ViewShellId nViewShellId(-1); if (ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell()) nViewShellId = pViewSh->GetViewShellId(); diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 0d8de3db99be..9881ad3db05d 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -61,6 +61,7 @@ #include <sc.hrc> #include <scres.hrc> #include <globstr.hrc> +#include <scresid.hxx> #include <docsh.hxx> #include <patattr.hxx> #include <scmod.hxx> @@ -571,7 +572,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) { if ( bUndo ) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE ); + OUString aUndo = ScResId( STR_UNDO_EDITCELLSTYLE ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pTabViewShell->GetViewShellId() ); bListAction = true; } @@ -629,7 +630,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( bUndo ) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_EDITCELLSTYLE ); + OUString aUndo = ScResId( STR_UNDO_EDITCELLSTYLE ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pTabViewShell->GetViewShellId() ); bListAction = true; } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 0a3831d9b2c5..4ef41950c217 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3991,7 +3991,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos else if ( nDestPosX != aSource.aStart.Col() || nDestPosY != aSource.aStart.Row() || nSourceTab != nThisTab ) { - OUString aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); + OUString aUndo = ScResId( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pViewData->GetViewShell()->GetViewShellId() ); SCCOL nCorrectCursorPosCol = 0; @@ -4145,7 +4145,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos OSL_ENSURE(pSourceSh, "drag document has no shell"); if (pSourceSh) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_COPY ); + OUString aUndo = ScResId( STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pViewData->GetViewShell()->GetViewShellId() ); bDone = true; @@ -4205,7 +4205,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos //! HasSelectedBlockMatrixFragment without selected sheet? //! or don't start dragging on a part of a matrix - OUString aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); + OUString aUndo = ScResId( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pViewData->GetViewShell()->GetViewShellId() ); bDone = true; diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 0a5cbd4be577..6801dea6a400 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -484,7 +484,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& rScrPos, const Size& rScr OUString aName = rMem.getDisplayName(); if (aName.isEmpty()) // Use special string for an empty name. - mpDPFieldPopup->addMember(ScGlobal::GetRscString(STR_EMPTYDATA), rMem.mbVisible); + mpDPFieldPopup->addMember(ScResId(STR_EMPTYDATA), rMem.mbVisible); else mpDPFieldPopup->addMember(rMem.getDisplayName(), rMem.mbVisible); } @@ -579,7 +579,7 @@ void ScGridWindow::UpdateDPFromFieldPopupMenu() { // This is an original member name. Use it as-is. OUString aName = itr->aName; - if (aName == ScGlobal::GetRscString(STR_EMPTYDATA)) + if (aName == ScResId(STR_EMPTYDATA)) // Translate the special empty name into an empty string. aName.clear(); @@ -971,7 +971,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp ) { if (bUndo) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_DRAG_BREAK ); + OUString aUndo = ScResId( STR_UNDO_DRAG_BREAK ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pViewData->GetViewShell()->GetViewShellId() ); } diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index a808522032e8..be65eb24216b 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -54,6 +54,7 @@ #include <pagedata.hxx> #include <docpool.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <docsh.hxx> #include <cbutton.hxx> #include <invmerge.hxx> @@ -239,7 +240,7 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, ScViewData* pViewData, S } if (aCurrent.isEmpty()) - aCurrent = ScGlobal::GetRscString( STR_EMPTYDATA ); + aCurrent = ScResId( STR_EMPTYDATA ); //! Own text "(None)" instead of "(Empty)" ??? @@ -1342,7 +1343,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, Color aManual( rColorCfg.GetColorValue(svtools::CALCPAGEBREAKMANUAL).nColor ); Color aAutomatic( rColorCfg.GetColorValue(svtools::CALCPAGEBREAK).nColor ); - OUString aPageStr = ScGlobal::GetRscString( STR_PGNUM ); + OUString aPageStr = ScResId( STR_PGNUM ); if ( nPageScript == SvtScriptType::NONE ) { // get script type of translated "Page" string only once diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 0abc3f82e1fe..a89e77adda2e 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -53,6 +53,7 @@ #include <postit.hxx> #include <global.hxx> #include <globstr.hrc> +#include <scresid.hxx> bool ScGridWindow::ShowNoteMarker( SCCOL nPosX, SCROW nPosY, bool bKeyboard ) { @@ -230,11 +231,11 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt) OUString aModStr( aModifiedCode.GetName() ); aModStr = aModStr.replaceFirst(aCode.GetName(), ""); aModStr = aModStr.replaceAll("+", ""); - OUString aCtrlClickHlinkStr = ScGlobal::GetRscString( STR_CTRLCLICKHYPERLINK ); + OUString aCtrlClickHlinkStr = ScResId( STR_CTRLCLICKHYPERLINK ); aCtrlClickHlinkStr = aCtrlClickHlinkStr.replaceAll("%s", aModStr); //Global string STR_CLICKHYPERLINK i.e, "click to open hyperlink" - OUString aClickHlinkStr = ScGlobal::GetRscString( STR_CLICKHYPERLINK ); + OUString aClickHlinkStr = ScResId( STR_CLICKHYPERLINK ); bool bDone = false; bool bHelpEnabled = bool(rHEvt.GetMode() & ( HelpEventMode::BALLOON | HelpEventMode::QUICK )); SdrView* pDrView = pViewData->GetScDrawView(); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 71900841844e..6f1602da97c7 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -47,6 +47,7 @@ #include <scmod.hxx> #include <markdata.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <sc.hrc> #include <helpids.h> #include <AccessibleDocumentPagePreview.hxx> @@ -521,9 +522,9 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) OUString aEmptyMsg; if (mbHasEmptyRangeTable) - aEmptyMsg = ScGlobal::GetRscString(STR_PRINT_PREVIEW_EMPTY_RANGE); + aEmptyMsg = ScResId(STR_PRINT_PREVIEW_EMPTY_RANGE); else - aEmptyMsg = ScGlobal::GetRscString(STR_PRINT_PREVIEW_NODATA); + aEmptyMsg = ScResId(STR_PRINT_PREVIEW_NODATA); long nHeight = 3000; pEditEng->SetDefaultItem(SvxFontHeightItem(nHeight, 100, EE_CHAR_FONTHEIGHT)); @@ -718,7 +719,7 @@ OUString ScPreview::GetPosString() UpdateDrawView(); // The table eventually changes } - OUString aString = ScGlobal::GetRscString( STR_PAGE ) + + OUString aString = ScResId( STR_PAGE ) + " " + OUString::number(nPageNo+1); if (nTabsTested >= nTabCount) diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 3d8360d52747..7d8f387ed0fe 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -52,6 +52,7 @@ #include <stlpool.hxx> #include <editutil.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <sc.hrc> #include <ViewSettingsSequenceDefines.hxx> #include <tpprint.hxx> @@ -442,7 +443,7 @@ IMPL_LINK( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void ) if( bIsDivide ) pPreview->SetPageNo( nPageNo ); - aHelpStr = ScGlobal::GetRscString( STR_PAGE ) + + aHelpStr = ScResId( STR_PAGE ) + " " + OUString::number( nPageNo ) + " / " + OUString::number( nTotalPages ); } @@ -452,7 +453,7 @@ IMPL_LINK( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void ) if ( nTotalPages && ( nPageNo < nTotalPages || !bAllTested ) ) pPreview->SetPageNo( nPageNo ); - aHelpStr = ScGlobal::GetRscString( STR_PAGE ) + + aHelpStr = ScResId( STR_PAGE ) + " " + OUString::number( nPageNo+1 ) + " / " + OUString::number( nTotalPages ); } diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 082572aa52ad..4ddc1f64f0ce 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -59,6 +59,7 @@ #include <formulacell.hxx> #include <drawutil.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <sc.hrc> #include <pagedata.hxx> #include <printopt.hxx> @@ -2737,7 +2738,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges, } } - aFieldData.aTabName = ScGlobal::GetRscString( STR_NOTES ); + aFieldData.aTabName = ScResId( STR_NOTES ); long nNoteNr = 0; long nNoteAdd; diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 7ef031f2c8c4..49c076cd420e 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -40,6 +40,7 @@ #include <patattr.hxx> #include <waitoff.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <markdata.hxx> #include <memory> @@ -309,8 +310,8 @@ bool ScSpellingEngine::ShowTableWrapDialog() std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_SPELLING_BEGIN_TAB))); // "delete data?" - xBox->set_title(ScGlobal::GetRscString(STR_MSSG_DOSUBTOTALS_0)); + ScResId(STR_SPELLING_BEGIN_TAB))); // "delete data?" + xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); xBox->set_default_response(RET_YES); return xBox->run() == RET_YES; } @@ -321,7 +322,7 @@ void ScSpellingEngine::ShowFinishDialog() ScWaitCursorOff aWaitOff( pParent ); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_SPELLING_STOP_OK))); + ScResId(STR_SPELLING_STOP_OK))); xInfoBox->run(); } diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index d85a24dec942..3cb3ecd67edb 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -38,6 +38,7 @@ #include <sc.hrc> #include <viewutil.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <drawview.hxx> #include <docsh.hxx> #include <viewuno.hxx> @@ -1086,7 +1087,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void ) QuickHelpFlags nAlign; if (bHoriz) { - aHelpStr = ScGlobal::GetRscString(STR_COLUMN) + + aHelpStr = ScResId(STR_COLUMN) + " " + ScColToAlpha(static_cast<SCCOL>(nScrollPos)); aRect.SetLeft( aMousePos.X() ); @@ -1095,7 +1096,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void ) } else { - aHelpStr = ScGlobal::GetRscString(STR_ROW) + + aHelpStr = ScResId(STR_ROW) + " " + OUString::number(nScrollPos + 1); // show quicktext always inside sheet area diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 4aa52f586910..88a491eea54a 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -41,6 +41,7 @@ #include <colrowba.hxx> #include <waitoff.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <scmod.hxx> #include <tabprotection.hxx> #include <markdata.hxx> @@ -1436,7 +1437,7 @@ void ScTabView::ErrorMessage(const char* pGlobStrId) std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(pGlobStrId))); + ScResId(pGlobStrId))); xInfoBox->run(); if (bFocus) diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index 499b53136280..94a22a950cc2 100644 --- a/sc/source/ui/view/tabview4.cxx +++ b/sc/source/ui/view/tabview4.cxx @@ -27,6 +27,7 @@ #include <scmod.hxx> #include <gridwin.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <formulacell.hxx> #include <dociter.hxx> @@ -65,7 +66,7 @@ void ScTabView::ShowRefTip() SCCOL nCols = nEndX+1-nStartX; SCROW nRows = nEndY+1-nStartY; - OUString aHelp = ScGlobal::GetRscString( STR_QUICKHELP_REF ); + OUString aHelp = ScResId( STR_QUICKHELP_REF ); aHelp = aHelp.replaceFirst("%1", OUString::number(nRows) ); aHelp = aHelp.replaceFirst("%2", OUString::number(nCols) ); @@ -265,14 +266,14 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ) ScRange aDelRange; if ( aViewData.GetFillMode() == ScFillMode::MATRIX && !(nScFillModeMouseModifier & KEY_MOD1) ) { - aHelpStr = ScGlobal::GetRscString( STR_TIP_RESIZEMATRIX ); + aHelpStr = ScResId( STR_TIP_RESIZEMATRIX ); SCCOL nCols = nEndX + 1 - aViewData.GetRefStartX(); // order is right SCROW nRows = nEndY + 1 - aViewData.GetRefStartY(); aHelpStr = aHelpStr.replaceFirst("%1", OUString::number(nRows) ); aHelpStr = aHelpStr.replaceFirst("%2", OUString::number(nCols) ); } else if ( aViewData.GetDelMark( aDelRange ) ) - aHelpStr = ScGlobal::GetRscString( STR_QUICKHELP_DELETE ); + aHelpStr = ScResId( STR_QUICKHELP_DELETE ); else if ( nEndX != aMarkRange.aEnd.Col() || nEndY != aMarkRange.aEnd.Row() ) aHelpStr = pDoc->GetAutoFillPreview( aMarkRange, nEndX, nEndY ); diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index f66b0becfe3d..2287dc0d4038 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -40,6 +40,7 @@ #include <document.hxx> #include <formulacell.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <scmod.hxx> #include <inputhdl.hxx> #include <inputwin.hxx> @@ -112,7 +113,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, FormulaError nErrCode ) SCROW nPosY = rViewData.GetCurY(); SCTAB nTab = rViewData.GetTabNo(); - aStr = ScGlobal::GetRscString(pGlobStrId); + aStr = ScResId(pGlobStrId); aStr += ": "; ScAddress aCursor( nPosX, nPosY, nTab ); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index aa6e6fe4b705..fda0b5714504 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -373,7 +373,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { sal_uInt16 nRet = RET_OK; bool bDone = false; - OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); + OUString aErrMsg ( ScResId( STR_INVALIDTABNAME ) ); OUString aName; OUString aDlgTitle; const sal_Char* pHelpId = nullptr; @@ -633,7 +633,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_QUERY_PIVOTTABLE_DELTAB))); + ScResId(STR_QUERY_PIVOTTABLE_DELTAB))); xQueryBox->set_default_response(RET_NO); // Hard warning as there is potential of data loss on deletion @@ -643,7 +643,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_QUERY_DELTAB))); + ScResId(STR_QUERY_DELTAB))); xQueryBox->set_default_response(RET_YES); // no parameter given, ask for confirmation @@ -704,7 +704,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) // handle several sheets ::svl::IUndoManager* pUndoManager = pDocSh->GetUndoManager(); - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL ); + OUString aUndo = ScResId( STR_UNDO_TAB_RTL ); pUndoManager->EnterListAction( aUndo, aUndo, 0, rViewData.GetViewShell()->GetViewShellId() ); ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 29da9f810ff0..a8724a863ecd 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -46,6 +46,7 @@ #include <sc.hrc> #include <globstr.hrc> +#include <scresid.hxx> #include <attrib.hxx> #include <autoform.hxx> @@ -2083,22 +2084,22 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) if ( bExact ) { - aMsgStr += ScGlobal::GetRscString( STR_MSSG_SOLVE_0 ); + aMsgStr += ScResId( STR_MSSG_SOLVE_0 ); aMsgStr += aResStr; - aMsgStr += ScGlobal::GetRscString( STR_MSSG_SOLVE_1 ); + aMsgStr += ScResId( STR_MSSG_SOLVE_1 ); } else { - aMsgStr = ScGlobal::GetRscString( STR_MSSG_SOLVE_2 ); - aMsgStr += ScGlobal::GetRscString( STR_MSSG_SOLVE_3 ); + aMsgStr = ScResId( STR_MSSG_SOLVE_2 ); + aMsgStr += ScResId( STR_MSSG_SOLVE_3 ); aMsgStr += aResStr ; - aMsgStr += ScGlobal::GetRscString( STR_MSSG_SOLVE_4 ); + aMsgStr += ScResId( STR_MSSG_SOLVE_4 ); } vcl::Window* pWin = GetViewData().GetDialogParent(); std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, aMsgStr)); - xBox->set_title(ScGlobal::GetRscString(STR_MSSG_DOSUBTOTALS_0)); + xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); xBox->set_default_response(RET_NO); if (xBox->run() == RET_NO) EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult ); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 7d6efcf45b3d..e80d79d7122a 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -50,6 +50,7 @@ #include <undoblk.hxx> #include <refundo.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <global.hxx> #include <transobj.hxx> #include <drwtrans.hxx> @@ -763,7 +764,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked( ReadGraphic( *xStm, aGraphic ); - const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); + const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); if(pScDrawView->ApplyGraphicToObject( rHitObj, aGraphic, aBeginUndo, "", "" )) { @@ -778,7 +779,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked( if( pScDrawView && aDataHelper.GetGDIMetaFile( SotClipboardFormatId::GDIMETAFILE, aMtf ) ) { - const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); + const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aMtf), aBeginUndo, "", "" )) { @@ -793,7 +794,7 @@ bool ScViewFunc::PasteOnDrawObjectLinked( if( pScDrawView && aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx ) ) { - const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); + const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); if(pScDrawView->ApplyGraphicToObject( rHitObj, Graphic(aBmpEx), aBeginUndo, "", "" )) { @@ -1050,7 +1051,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, ( bMarkIsFiltered && nUnfilteredRows < nDestSizeY+1 ) ) { ScWaitCursorOff aWaitOff( GetFrameWin() ); - OUString aMessage = ScGlobal::GetRscString( STR_PASTE_BIGGER ); + OUString aMessage = ScResId( STR_PASTE_BIGGER ); vcl::Window* pWin = GetViewData().GetDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, @@ -1188,7 +1189,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, ScDocFunc& rDocFunc = pDocSh->GetDocFunc(); if ( bRecord ) { - OUString aUndo = ScGlobal::GetRscString( pClipDoc->IsCutMode() ? STR_UNDO_MOVE : STR_UNDO_COPY ); + OUString aUndo = ScResId( pClipDoc->IsCutMode() ? STR_UNDO_MOVE : STR_UNDO_COPY ); pUndoMgr->EnterListAction( aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId() ); } @@ -1582,7 +1583,7 @@ bool ScViewFunc::PasteMultiRangesFromClip( if (pDoc->IsUndoEnabled()) { ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager(); - OUString aUndo = ScGlobal::GetRscString( + OUString aUndo = ScResId( pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY); pUndoMgr->EnterListAction(aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId()); @@ -1747,7 +1748,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges( if (pDoc->IsUndoEnabled()) { svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager(); - OUString aUndo = ScGlobal::GetRscString( + OUString aUndo = ScResId( pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY); pUndoMgr->EnterListAction(aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId()); @@ -1817,7 +1818,7 @@ bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos, { // moving within one table and several tables selected -> apply to all selected tables - OUString aUndo = ScGlobal::GetRscString( bCut ? STR_UNDO_MOVE : STR_UNDO_COPY ); + OUString aUndo = ScResId( bCut ? STR_UNDO_MOVE : STR_UNDO_COPY ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId() ); // collect ranges of consecutive selected tables diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 4312e4616e88..5bc8f11db602 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -52,6 +52,7 @@ #include <docpool.hxx> #include <globstr.hrc> #include <global.hxx> +#include <scresid.hxx> #include <undoblk.hxx> #include <undocell.hxx> #include <formulacell.hxx> @@ -397,7 +398,7 @@ void ScViewFunc::DoThesaurus() { LanguageType eLnge = ScViewUtil::GetEffLanguage( &rDoc, ScAddress( nCol, nRow, nTab ) ); OUString aErr = SvtLanguageTable::GetLanguageString(eLnge); - aErr += ScGlobal::GetRscString( STR_SPELLING_NO_LANG ); + aErr += ScResId( STR_SPELLING_NO_LANG ); vcl::Window* pWin = GetViewData().GetDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 90e823892b1b..8bc10782a632 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -42,6 +42,7 @@ #include <drwlayer.hxx> #include <drwtrans.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <chartlis.hxx> #include <docuno.hxx> #include <docsh.hxx> @@ -113,7 +114,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel, ScDrawView* pScDrawView = GetScDrawView(); if (bGroup) - pScDrawView->BegUndo( ScGlobal::GetRscString( STR_UNDO_PASTE ) ); + pScDrawView->BegUndo( ScResId( STR_UNDO_PASTE ) ); bool bSameDoc = ( pDragEditView && pDragEditView->GetModel() == pScDrawView->GetModel() ); if (bSameDoc) @@ -398,7 +399,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, SdrObject* pPickObj = pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPageView); if (pPickObj) { - const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); + const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); SdrObject* pResult = pScDrawView->ApplyGraphicToObject( *pPickObj, rGraphic, diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 1f1e5407318c..306d020ec947 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2481,7 +2481,7 @@ void ScViewFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ) if (bUndo) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_PROTECT_TAB ); + OUString aUndo = ScResId( STR_UNDO_PROTECT_TAB ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId() ); } @@ -2512,7 +2512,7 @@ void ScViewFunc::Protect( SCTAB nTab, const OUString& rPassword ) if (bUndo) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_PROTECT_TAB ); + OUString aUndo = ScResId( STR_UNDO_PROTECT_TAB ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId() ); } @@ -2544,7 +2544,7 @@ bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& rPassword ) if (bUndo) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_UNPROTECT_TAB ); + OUString aUndo = ScResId( STR_UNDO_UNPROTECT_TAB ); pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, GetViewData().GetViewShell()->GetViewShellId() ); } |