diff options
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/arealink.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 19 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocimp.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 24 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh5.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 7 |
13 files changed, 74 insertions, 64 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index c1def55db4d3..acdc09144a42 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -34,6 +34,7 @@ #include <dbdata.hxx> #include <undoblk.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <markdata.hxx> #include <hints.hxx> #include <filter.hxx> @@ -404,7 +405,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, } else { - OUString aErr = ScGlobal::GetRscString(STR_LINKERROR); + OUString aErr = ScResId(STR_LINKERROR); rDoc.SetString( aDestPos.Col(), aDestPos.Row(), aDestPos.Tab(), aErr ); } @@ -466,7 +467,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter, vcl::Window* pWin = Application::GetDefDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_MSSG_DOSUBTOTALS_2))); + ScResId(STR_MSSG_DOSUBTOTALS_2))); xInfoBox->run(); } diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 555101ec5602..dfe591ae9f92 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -31,6 +31,7 @@ #include <docsh.hxx> #include <docfunc.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <globalnames.hxx> #include <tabvwsh.hxx> #include <patattr.hxx> @@ -561,7 +562,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, { ScInputOptions aInputOption = SC_MOD()->GetInputOptions(); bool bUpdateRefs = aInputOption.GetSortRefUpdate(); - ScProgress aProgress(&rDocShell, ScGlobal::GetRscString(STR_PROGRESS_SORTING), 0, true); + ScProgress aProgress(&rDocShell, ScResId(STR_PROGRESS_SORTING), 0, true); rDoc.Sort(nTab, aLocalParam, bRepeatQuery, bUpdateRefs, &aProgress, &aUndoParam); } @@ -831,7 +832,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, sal_uLong nProgCount = nFormulaCols; nProgCount *= aLocalParam.nRow2 - nFStartY; ScProgress aProgress( rDoc.GetDocumentShell(), - ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true ); + ScResId(STR_FILL_SERIES_PROGRESS), nProgCount, true ); rDoc.Fill( aLocalParam.nCol2+1, nFStartY, aLocalParam.nCol2+nFormulaCols, nFStartY, &aProgress, aMark, @@ -1012,8 +1013,8 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); 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" + VclButtonsType::YesNo, ScResId(STR_MSSG_DOSUBTOTALS_1))); // "Delete Data?" + xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0)); // "StarCalc" bOk = xBox->run() == RET_YES; } } @@ -1302,7 +1303,7 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY))); + ScResId(STR_PIVOT_NOTEMPTY))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_NO) { @@ -1356,7 +1357,7 @@ bool ScDBDocFunc::RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi) vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_PIVOT_REMOVE_PIVOTCHART))); + ScResId(STR_PIVOT_REMOVE_PIVOTCHART))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_NO) { @@ -1502,7 +1503,7 @@ bool ScDBDocFunc::CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY))); + ScResId(STR_PIVOT_NOTEMPTY))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_NO) { @@ -1577,7 +1578,7 @@ bool ScDBDocFunc::UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi) vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_PIVOT_NOTEMPTY))); + ScResId(STR_PIVOT_NOTEMPTY))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_NO) { @@ -1684,7 +1685,7 @@ void ScDBDocFunc::UpdateImport( const OUString& rTarget, const svx::ODataAccessD vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_TARGETNOTFOUND))); + ScResId(STR_TARGETNOTFOUND))); xInfoBox->run(); return; } diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index ad0481942934..8edf0e7b98c9 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -40,6 +40,7 @@ #include <dbdocfun.hxx> #include <docsh.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <scerrors.hxx> #include <dbdata.hxx> #include <markdata.hxx> @@ -190,7 +191,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, { // progress bar // only text (title is still needed, for the cancel button) - ScProgress aProgress( &rDocShell, ScGlobal::GetRscString(STR_UNDO_IMPORTDATA), 0, true ); + ScProgress aProgress( &rDocShell, ScResId(STR_UNDO_IMPORTDATA), 0, true ); uno::Reference<sdbc::XRowSet> xRowSet( xResultSet, uno::UNO_QUERY ); bool bDispose = false; @@ -342,7 +343,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, ++nInserted; if (!(nInserted & 15)) { - OUString aPict = ScGlobal::GetRscString( STR_PROGRESS_IMPORT ); + OUString aPict = ScResId( STR_PROGRESS_IMPORT ); OUString aText = aPict.getToken(0,'#'); aText += OUString::number( nInserted ); aText += aPict.getToken(1,'#'); @@ -546,7 +547,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, sal_uLong nProgCount = nFormulaCols; nProgCount *= nEndRow-rParam.nRow1-1; ScProgress aProgress( rDoc.GetDocumentShell(), - ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true ); + ScResId(STR_FILL_SERIES_PROGRESS), nProgCount, true ); rDoc.Fill( nEndCol+1, rParam.nRow1+1, nEndCol+nFormulaCols, rParam.nRow1+1, &aProgress, aMark, nEndRow-rParam.nRow1-1, FILL_TO_BOTTOM, FILL_SIMPLE ); @@ -614,7 +615,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, { if (!pErrStringId) pErrStringId = STR_MSSG_IMPORTDATA_0; - aErrorMessage = ScGlobal::GetRscString(pErrStringId); + aErrorMessage = ScResId(pErrStringId); } vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 83304ecff7cb..79078ba93831 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -379,7 +379,7 @@ bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) { if (pUndo && bUndo) { - pUndo->SetComment( ScGlobal::GetRscString( STR_UNDO_DETINVALID ) ); + pUndo->SetComment( ScResId( STR_UNDO_DETINVALID ) ); rDocShell.GetUndoManager()->AddUndoAction( pUndo.release() ); } aModificator.SetDocumentModified(); @@ -387,7 +387,7 @@ bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab) { std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_DETINVALID_OVERFLOW))); + ScResId(STR_DETINVALID_OVERFLOW))); xInfoBox->run(); } } @@ -492,7 +492,7 @@ bool ScDocFunc::DetectiveRefresh( bool bAutomatic ) std::unique_ptr<SdrUndoGroup> pUndo = pModel->GetCalcUndo(); if (pUndo) { - pUndo->SetComment( ScGlobal::GetRscString( STR_UNDO_DETREFRESH ) ); + pUndo->SetComment( ScResId( STR_UNDO_DETREFRESH ) ); // associate with the last action rDocShell.GetUndoManager()->AddUndoAction( new ScUndoDraw( pUndo.release(), &rDocShell ), @@ -1816,7 +1816,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, // the patch comes from mloiseleur and maoyg bool bInsertMerge = false; std::vector<ScRange> qIncreaseRange; - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_INSERTCELLS ); + OUString aUndo = ScResId( STR_UNDO_INSERTCELLS ); if (bRecord) { ViewShellId nViewShellId(-1); @@ -2297,7 +2297,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, //the patch comes from maoyg ::std::vector<ScRange> qDecreaseRange; bool bDeletingMerge = false; - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_DELETECELLS ); + OUString aUndo = ScResId( STR_UNDO_DELETECELLS ); if (bRecord) { ViewShellId nViewShellId(-1); @@ -4490,7 +4490,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark, nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1; nProgCount *= nCount; ScProgress aProgress( rDoc.GetDocumentShell(), - ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true ); + ScResId(STR_FILL_SERIES_PROGRESS), nProgCount, true ); rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress, @@ -4617,7 +4617,7 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark, nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1; nProgCount *= nCount; ScProgress aProgress( rDoc.GetDocumentShell(), - ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true ); + ScResId(STR_FILL_SERIES_PROGRESS), nProgCount, true ); rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress, @@ -4759,7 +4759,7 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1; nProgCount *= nCount; ScProgress aProgress( rDoc.GetDocumentShell(), - ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true ); + ScResId(STR_FILL_SERIES_PROGRESS), nProgCount, true ); rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress, @@ -5086,7 +5086,7 @@ void ScDocFunc::CreateOneName( ScRangeName& rList, bInsert = true; // don't check via API else { - OUString aTemplate = ScGlobal::GetRscString( STR_CREATENAME_REPLACE ); + OUString aTemplate = ScResId( STR_CREATENAME_REPLACE ); OUString aMessage = aTemplate.getToken( 0, '#' ); aMessage += aName; @@ -5337,7 +5337,7 @@ void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd rDoc.GetFormula( nStartCol, nStartRow, nTab, aFormula ); if ( aFormula.startsWith("{") && aFormula.endsWith("}") ) { - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_RESIZEMATRIX ); + OUString aUndo = ScResId( STR_UNDO_RESIZEMATRIX ); bool bUndo(rDoc.IsUndoEnabled()); if (bUndo) { @@ -5397,7 +5397,7 @@ void ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter, if ( !nRemoved ) { // group all remove and the insert action - OUString aUndo = ScGlobal::GetRscString( STR_UNDO_INSERTAREALINK ); + OUString aUndo = ScResId( STR_UNDO_INSERTAREALINK ); ViewShellId nViewShellId(-1); if (ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell()) nViewShellId = pViewSh->GetViewShellId(); @@ -5617,7 +5617,7 @@ void ScDocFunc::ConvertFormulaToValue( const ScRange& rRange, bool bInteraction void ScDocFunc::EnterListAction(const char* pNameResId) { - OUString aUndo(ScGlobal::GetRscString(pNameResId)); + OUString aUndo(ScResId(pNameResId)); ViewShellId nViewShellId(-1); if (ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell()) nViewShellId = pViewSh->GetViewShellId(); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index fc84c7250148..e83aad315aec 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -490,7 +490,7 @@ bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const css::uno::Reference< css MessageWithCheck aQueryBox(pWin ? pWin->GetFrameWeld() : nullptr, "modules/scalc/ui/recalcquerydialog.ui", "RecalcQueryDialog"); - aQueryBox.set_primary_text(ScGlobal::GetRscString(STR_QUERY_FORMULA_RECALC_ONLOAD_ODS)); + aQueryBox.set_primary_text(ScResId(STR_QUERY_FORMULA_RECALC_ONLOAD_ODS)); aQueryBox.set_default_response(RET_YES); bHardRecalc = aQueryBox.run() == RET_YES; @@ -822,7 +822,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) { xCloseable->close( true ); - OUString aUserName( ScGlobal::GetRscString( STR_UNKNOWN_USER ) ); + OUString aUserName( ScResId( STR_UNKNOWN_USER ) ); bool bNoLockAccess = false; try { @@ -849,7 +849,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else { - OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_SAVE_LATER ) ); + OUString aMessage( ScResId( STR_FILE_LOCKED_SAVE_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); vcl::Window* pWin = GetActiveDialogParent(); @@ -936,7 +936,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_DOC_NOLONGERSHARED))); + ScResId(STR_DOC_NOLONGERSHARED))); xWarn->run(); SfxBindings* pBindings = GetViewBindings(); @@ -979,7 +979,7 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_UNSAVED_EXT_REF))); + ScResId(STR_UNSAVED_EXT_REF))); if (RET_NO == xWarn->run()) { SetError(ERRCODE_IO_ABORT); // this error code will produce no error message, but will break the further saving process @@ -1929,7 +1929,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt SCROW nEndRow; aDocument.GetCellArea( nTab, nEndCol, nEndRow ); - ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ), nEndRow, true ); + ScProgress aProgress( this, ScResId( STR_SAVE_DOC ), nEndRow, true ); OUString aString; @@ -2951,7 +2951,7 @@ VclPtr<SfxDocumentInfoDialog> ScDocShell::CreateDocumentInfoDialog( const SfxIte OSL_ENSURE(ScDocStatPageCreate, "Tabpage create fail!"); pDlg->AddFontTabPage(); pDlg->AddTabPage( 42, - ScGlobal::GetRscString( STR_DOC_STAT ), + ScResId( STR_DOC_STAT ), ScDocStatPageCreate, nullptr); } diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index d4893d627285..37c28e0bed7c 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -60,6 +60,7 @@ #include <inputhdl.hxx> #include <conflictsdlg.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <markdata.hxx> #include <memory> @@ -1205,7 +1206,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_DOC_WILLNOTBESAVED))); + ScResId(STR_DOC_WILLNOTBESAVED))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_YES) { @@ -1322,7 +1323,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_DOC_UPDATED))); + ScResId(STR_DOC_UPDATED))); xInfoBox->run(); } diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index fa473bdf9d67..adb0575318da 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -238,7 +238,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) bMakeArea = true; if (bUndo) { - OUString aStrImport = ScGlobal::GetRscString( STR_UNDO_IMPORTDATA ); + OUString aStrImport = ScResId( STR_UNDO_IMPORTDATA ); ViewShellId nViewShellId(-1); if (ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell()) nViewShellId = pViewSh->GetViewShellId(); @@ -256,7 +256,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) bool bDo = true; if (!bIsNewArea) { - OUString aTemplate = ScGlobal::GetRscString( STR_IMPORT_REPLACE ); + OUString aTemplate = ScResId( STR_IMPORT_REPLACE ); OUString aMessage = aTemplate.getToken( 0, '#' ); aMessage += sTarget; aMessage += aTemplate.getToken( 1, '#' ); @@ -494,7 +494,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pViewFrame) { pViewFrame->RemoveInfoBar("enablecontent"); - auto pInfoBar = pViewFrame->AppendInfoBar("enablecontent", ScGlobal::GetRscString(STR_RELOAD_TABLES), InfoBarType::Warning); + auto pInfoBar = pViewFrame->AppendInfoBar("enablecontent", ScResId(STR_RELOAD_TABLES), InfoBarType::Warning); if (pInfoBar) { VclPtrInstance<PushButton> xBtn(&pViewFrame->GetWindow()); @@ -527,7 +527,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD))); + ScResId(STR_REIMPORT_AFTER_LOAD))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_YES) { @@ -622,7 +622,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_END_REDLINING))); + ScResId(STR_END_REDLINING))); xWarn->set_default_response(RET_NO); bDo = (xWarn->run() == RET_YES ); } @@ -689,7 +689,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_END_REDLINING))); + ScResId(STR_END_REDLINING))); xWarn->set_default_response(RET_NO); if (xWarn->run() == RET_YES) bDo = ExecuteChangeProtectionDialog( true ); @@ -985,7 +985,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Question, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD))); + ScResId(STR_REIMPORT_AFTER_LOAD))); xQueryBox->set_default_response(RET_YES); if (xQueryBox->run() == RET_NO) { @@ -1054,7 +1054,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { xCloseable->close( true ); - OUString aUserName( ScGlobal::GetRscString( STR_UNKNOWN_USER ) ); + OUString aUserName( ScResId( STR_UNKNOWN_USER ) ); try { ::svt::DocumentLockFile aLockFile( GetSharedFileURL() ); @@ -1071,7 +1071,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) catch ( uno::Exception& ) { } - OUString aMessage( ScGlobal::GetRscString( STR_FILE_LOCKED_TRY_LATER ) ); + OUString aMessage( ScResId( STR_FILE_LOCKED_TRY_LATER ) ); aMessage = aMessage.replaceFirst( "%1", aUserName ); vcl::Window* pWin = GetActiveDialogParent(); @@ -1085,7 +1085,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::YesNo, - ScGlobal::GetRscString(STR_DOC_DISABLESHARED))); + ScResId(STR_DOC_DISABLESHARED))); xWarn->set_default_response(RET_YES); if (xWarn->run() == RET_YES) @@ -1123,7 +1123,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_DOC_NOLONGERSHARED))); + ScResId(STR_DOC_NOLONGERSHARED))); xWarn->run(); } } @@ -1423,7 +1423,7 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const OUString& rStyle ) pStylePool->FindCaseIns( rStyle, SfxStyleFamily::Para ); if (!pStyleSheet) pStyleSheet = static_cast<ScStyleSheet*>( - pStylePool->Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para )); + pStylePool->Find( ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para )); if (pStyleSheet) { OSL_ENSURE(rRange.aStart.Tab() == rRange.aEnd.Tab(), @@ -1651,7 +1651,7 @@ void ScDocShell::PageStyleModified( const OUString& rStyleName, bool bApi ) ScWaitCursorOff aWaitOff(pWin); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_PRINT_INVALID_AREA))); + ScResId(STR_PRINT_INVALID_AREA))); xInfoBox->run(); } } diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index 935220d02c66..19eab038a074 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -33,6 +33,7 @@ #include <docsh.hxx> #include <global.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <globalnames.hxx> #include <undodat.hxx> #include <undotab.hxx> @@ -84,7 +85,7 @@ void ScDocShell::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) @@ -293,7 +294,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe aDocument.PreprocessDBDataUpdate(); pUndoColl = new ScDBCollection( *pColl ); // Undo for import range - OUString aImport = ScGlobal::GetRscString( STR_DBNAME_IMPORT ); + OUString aImport = ScResId( STR_DBNAME_IMPORT ); long nCount = 0; const ScDBData* pDummy = nullptr; ScDBCollection::NamedDBs& rDBs = pColl->getNamedDBs(); @@ -525,7 +526,7 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_CONSOLIDATE_ERR1))); + ScResId(STR_CONSOLIDATE_ERR1))); xInfoBox->run(); return; } @@ -737,7 +738,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_PROTECTIONERR))); + ScResId(STR_PROTECTIONERR))); xInfoBox->run(); } } @@ -746,7 +747,7 @@ void ScDocShell::UseScenario( SCTAB nTab, const OUString& rName, bool bRecord ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_SCENARIO_NOTFOUND))); + ScResId(STR_SCENARIO_NOTFOUND))); xInfoBox->run(); } } @@ -992,7 +993,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec return true; // nothing to do, but valid } - ScProgress* pProgress = new ScProgress(this, ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), + ScProgress* pProgress = new ScProgress(this, ScResId(STR_UNDO_MOVE_TAB), aDocument.GetCodeCount(), true); bool bDone = aDocument.MoveTab( nSrcTab, nDestTab, pProgress ); delete pProgress; diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 8e3a28280e2a..cd05ca1eca9e 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -32,6 +32,7 @@ #include <tabvwsh.hxx> #include <tablink.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <scmod.hxx> #include <compiler.hxx> #include <interpre.hxx> @@ -502,7 +503,7 @@ void ScDocShell::CheckConfigOptions() vcl::Window* pParent = pViewShell->GetFrameWin(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_OPTIONS_WARN_SEPARATORS))); + ScResId(STR_OPTIONS_WARN_SEPARATORS))); xInfoBox->run(); } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 24e31b69b66d..d9781310ebdd 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -65,6 +65,7 @@ #include <dbdocutl.hxx> #include <dociter.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <svl/zformat.hxx> #include <svl/intitem.hxx> #include <patattr.hxx> @@ -296,7 +297,7 @@ ErrCode ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding return nRet; ::utl::DisposableComponent aConnectionHelper(xConnection); - ScProgress aProgress( this, ScGlobal::GetRscString( STR_LOAD_DOC ), 0, true ); + ScProgress aProgress( this, ScResId( STR_LOAD_DOC ), 0, true ); uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance(SC_SERVICE_ROWSET), uno::UNO_QUERY); @@ -756,7 +757,7 @@ ErrCode ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding nFirstCol = nLastCol; if ( nFirstRow > nLastRow ) nFirstRow = nLastRow; - ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ), + ScProgress aProgress( this, ScResId( STR_SAVE_DOC ), nLastRow - nFirstRow, true ); SvNumberFormatter* pNumFmt = aDocument.GetFormatTable(); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index a41052fc3124..48ae556cf485 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -31,6 +31,7 @@ #include <tabvwsh.hxx> #include <sc.hrc> #include <globstr.hrc> +#include <scresid.hxx> #include <cellvalue.hxx> #include <defaultsoptions.hxx> @@ -3196,7 +3197,7 @@ void ScExternalRefManager::Notify( SfxBroadcaster&, const SfxHint& rHint ) vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_CLOSE_WITH_UNSAVED_REFS))); + ScResId(STR_CLOSE_WITH_UNSAVED_REFS))); xWarn->run(); } break; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index d27a894df309..3b3068764f24 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -53,6 +53,7 @@ #include <documentimport.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <o3tl/safeint.hxx> #include <tools/svlibrary.h> #include <unotools/configmgr.hxx> @@ -232,7 +233,7 @@ bool ScImportExport::StartPaste() vcl::Window* pWin = Application::GetDefDialogParent(); std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(aTester.GetMessageId()))); + ScResId(aTester.GetMessageId()))); xInfoBox->run(); return false; } @@ -1289,7 +1290,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) sal_uInt64 const nOldPos = rStrm.Tell(); sal_uInt64 const nRemaining = rStrm.remainingSize(); std::unique_ptr<ScProgress> xProgress( new ScProgress( pDocSh, - ScGlobal::GetRscString( STR_LOAD_DOC ), nRemaining, true )); + ScResId( STR_LOAD_DOC ), nRemaining, true )); rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() ); SCCOL nStartCol = aRange.aStart.Col(); diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 9074786c919e..2a6448b1944a 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -43,6 +43,7 @@ #include <document.hxx> #include <docsh.hxx> #include <globstr.hrc> +#include <scresid.hxx> #include <undoblk.hxx> #include <undotab.hxx> #include <global.hxx> @@ -348,10 +349,10 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter, { // Normal link or no references: put error message on sheet. - rDoc.SetString( 0,0,nTab, ScGlobal::GetRscString(STR_LINKERROR) ); - rDoc.SetString( 0,1,nTab, ScGlobal::GetRscString(STR_LINKERRORFILE) ); + rDoc.SetString( 0,0,nTab, ScResId(STR_LINKERROR) ); + rDoc.SetString( 0,1,nTab, ScResId(STR_LINKERRORFILE) ); rDoc.SetString( 1,1,nTab, aNewUrl ); - rDoc.SetString( 0,2,nTab, ScGlobal::GetRscString(STR_LINKERRORTAB) ); + rDoc.SetString( 0,2,nTab, ScResId(STR_LINKERRORTAB) ); rDoc.SetString( 1,2,nTab, aTabName ); } |