From 4145a857791df2100d5df9defb79e1160f89249f Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Fri, 11 May 2018 15:38:02 +0200 Subject: 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/[a-d]* for easier review. Change-Id: If268fb87ab09ca430a5bdb5cdd53a233e9158bfe Reviewed-on: https://gerrit.libreoffice.org/54134 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sc/source/ui/app/inputhdl.cxx | 3 +- sc/source/ui/app/inputwin.cxx | 10 ++--- sc/source/ui/app/scmod.cxx | 5 ++- sc/source/ui/cctrl/cbnumberformat.cxx | 21 +++++----- sc/source/ui/cctrl/checklistmenu.cxx | 6 +-- sc/source/ui/condformat/condformatdlgentry.cxx | 8 ++-- sc/source/ui/condformat/condformathelper.cxx | 55 +++++++++++++------------- sc/source/ui/condformat/condformatmgr.cxx | 5 ++- sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 3 +- sc/source/ui/dbgui/consdlg.cxx | 2 +- sc/source/ui/dbgui/dbnamdlg.cxx | 5 ++- sc/source/ui/dbgui/dpgroupdlg.cxx | 3 +- sc/source/ui/dbgui/filtdlg.cxx | 2 +- sc/source/ui/dbgui/pvfundlg.cxx | 4 +- sc/source/ui/dbgui/scendlg.cxx | 5 ++- sc/source/ui/dbgui/sfiltdlg.cxx | 2 +- sc/source/ui/dbgui/tpsort.cxx | 2 +- sc/source/ui/docshell/arealink.cxx | 5 ++- sc/source/ui/docshell/dbdocfun.cxx | 19 ++++----- sc/source/ui/docshell/dbdocimp.cxx | 9 +++-- sc/source/ui/docshell/docfunc.cxx | 24 +++++------ sc/source/ui/docshell/docsh.cxx | 14 +++---- sc/source/ui/docshell/docsh3.cxx | 5 ++- sc/source/ui/docshell/docsh4.cxx | 26 ++++++------ sc/source/ui/docshell/docsh5.cxx | 13 +++--- sc/source/ui/docshell/docsh6.cxx | 3 +- sc/source/ui/docshell/docsh8.cxx | 5 ++- sc/source/ui/docshell/externalrefmgr.cxx | 3 +- sc/source/ui/docshell/impex.cxx | 5 ++- sc/source/ui/docshell/tablink.cxx | 7 ++-- sc/source/ui/drawfunc/drtxtob.cxx | 3 +- sc/source/ui/drawfunc/fuins1.cxx | 2 +- sc/source/ui/drawfunc/futext3.cxx | 5 ++- 33 files changed, 155 insertions(+), 134 deletions(-) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 63f5be6da1f5..54f6acb4bbeb 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -1179,7 +1180,7 @@ void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & rFuncStrVec if ( nRemainFindNumber == 0 && nRemainNumber > 0 ) { OUString aBufStr( aTipStr ); - OUString aMessage( ScGlobal::GetRscString( STR_FUNCTIONS_FOUND ) ); + OUString aMessage( ScResId( STR_FUNCTIONS_FOUND ) ); aMessage = aMessage.replaceFirst("%2", OUString::number(nRemainNumber)); aMessage = aMessage.replaceFirst("%1", aBufStr); aTipStr = aMessage; diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 4389cb643cec..2771187c9ca2 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1882,7 +1882,7 @@ void ScPosWnd::FillRangeNames() { ScDocument& rDoc = static_cast(pObjSh)->GetDocument(); - InsertEntry(ScGlobal::GetRscString( STR_MANAGE_NAMES )); + InsertEntry(ScResId( STR_MANAGE_NAMES )); SetSeparatorPos(0); ScRange aDummy; @@ -1956,7 +1956,7 @@ void ScPosWnd::FillFunctions() //! Re-add entry "Other..." for Function AutoPilot if it can work with text that // has been entered so far - // InsertEntry( ScGlobal::GetRscString(STR_FUNCTIONLIST_MORE) ); + // InsertEntry( ScResId(STR_FUNCTIONLIST_MORE) ); SetText(aFirstName); } @@ -2013,7 +2013,7 @@ static ScNameInputType lcl_GetInputType( const OUString& rText ) SCTAB nNameTab; sal_Int32 nNumeric; - if (rText == ScGlobal::GetRscString(STR_MANAGE_NAMES)) + if (rText == ScResId(STR_MANAGE_NAMES)) eRet = SC_MANAGE_NAMES; else if ( aRange.Parse( rText, pDoc, eConv ) & ScRefFlags::VALID ) eRet = SC_NAME_INPUT_RANGE; @@ -2093,7 +2093,7 @@ void ScPosWnd::Modify() aPos = pWin->OutputToScreenPixel( aPos ); tools::Rectangle aRect( aPos, aPos ); - OUString aText = ScGlobal::GetRscString(pStrId); + OUString aText = ScResId(pStrId); QuickHelpFlags const nAlign = QuickHelpFlags::Left|QuickHelpFlags::Bottom; nTipVisible = Help::ShowPopover(pWin, aRect, aText, nAlign); } @@ -2118,7 +2118,7 @@ void ScPosWnd::DoEnter() if ( bFormulaMode ) { ScModule* pScMod = SC_MOD(); - if ( aText == ScGlobal::GetRscString(STR_FUNCTIONLIST_MORE) ) + if ( aText == ScResId(STR_FUNCTIONLIST_MORE) ) { // Function AutoPilot //! Continue working with the text entered so far diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index ac3161e78083..dd096a53655c 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -91,6 +91,7 @@ #include #include #include +#include #include #include #include @@ -2263,12 +2264,12 @@ SfxStyleFamilies* ScModule::CreateStyleFamilies() SfxStyleFamilies *pStyleFamilies = new SfxStyleFamilies; pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Para, - ScGlobal::GetRscString(STR_STYLE_FAMILY_CELL), + ScResId(STR_STYLE_FAMILY_CELL), Image(BitmapEx(BMP_STYLES_FAMILY_CELL)), RID_CELLSTYLEFAMILY, SC_MOD()->GetResLocale())); pStyleFamilies->emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Page, - ScGlobal::GetRscString(STR_STYLE_FAMILY_PAGE), + ScResId(STR_STYLE_FAMILY_PAGE), Image(BitmapEx(BMP_STYLES_FAMILY_PAGE)), RID_PAGESTYLEFAMILY, SC_MOD()->GetResLocale())); diff --git a/sc/source/ui/cctrl/cbnumberformat.cxx b/sc/source/ui/cctrl/cbnumberformat.cxx index 4e7947e3d5ba..db9b81a69df8 100644 --- a/sc/source/ui/cctrl/cbnumberformat.cxx +++ b/sc/source/ui/cctrl/cbnumberformat.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -30,16 +31,16 @@ ScNumberFormat::ScNumberFormat(vcl::Window* pParent, WinBits nStyle) : SetSelectHdl(LINK(this, ScNumberFormat, NumFormatSelectHdl)); AdaptDropDownLineCountToMaximum(); - InsertEntry(ScGlobal::GetRscString(STR_GENERAL)); - InsertEntry(ScGlobal::GetRscString(STR_NUMBER)); - InsertEntry(ScGlobal::GetRscString(STR_PERCENT)); - InsertEntry(ScGlobal::GetRscString(STR_CURRENCY)); - InsertEntry(ScGlobal::GetRscString(STR_DATE)); - InsertEntry(ScGlobal::GetRscString(STR_TIME)); - InsertEntry(ScGlobal::GetRscString(STR_SCIENTIFIC)); - InsertEntry(ScGlobal::GetRscString(STR_FRACTION)); - InsertEntry(ScGlobal::GetRscString(STR_BOOLEAN_VALUE)); - InsertEntry(ScGlobal::GetRscString(STR_TEXT)); + InsertEntry(ScResId(STR_GENERAL)); + InsertEntry(ScResId(STR_NUMBER)); + InsertEntry(ScResId(STR_PERCENT)); + InsertEntry(ScResId(STR_CURRENCY)); + InsertEntry(ScResId(STR_DATE)); + InsertEntry(ScResId(STR_TIME)); + InsertEntry(ScResId(STR_SCIENTIFIC)); + InsertEntry(ScResId(STR_FRACTION)); + InsertEntry(ScResId(STR_BOOLEAN_VALUE)); + InsertEntry(ScResId(STR_TEXT)); } IMPL_STATIC_LINK(ScNumberFormat, NumFormatSelectHdl, ListBox&, rBox, void) diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index fcffd7809543..fb727e812a8c 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1228,7 +1228,7 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void) aLabelDisp = maMembers[i].maName; if ( aLabelDisp.isEmpty() ) - aLabelDisp = ScGlobal::GetRscString( STR_EMPTYDATA ); + aLabelDisp = ScResId( STR_EMPTYDATA ); if ( !bSearchTextEmpty ) { @@ -1896,7 +1896,7 @@ void ScCheckListMenuWindow::initMembers() { OUString aLabel = maMembers[i].maName; if (aLabel.isEmpty()) - aLabel = ScGlobal::GetRscString(STR_EMPTYDATA); + aLabel = ScResId(STR_EMPTYDATA); SvTreeListEntry* pEntry = maChecks->InsertEntry( aLabel); @@ -1950,7 +1950,7 @@ void ScCheckListMenuWindow::getResult(ResultType& rResult) { OUString aLabel = maMembers[i].maName; if (aLabel.isEmpty()) - aLabel = ScGlobal::GetRscString(STR_EMPTYDATA); + aLabel = ScResId(STR_EMPTYDATA); /* TODO: performance-wise this looks suspicious, concatenating to * do the lookup for each leaf item seems wasteful. */ diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index d4bc1bc3bcdd..e8651496c864 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -305,7 +305,7 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void) if( aFormula.isEmpty() ) { - maFtVal->SetText(ScGlobal::GetRscString(STR_ENTER_VALUE)); + maFtVal->SetText(ScResId(STR_ENTER_VALUE)); return; } @@ -316,7 +316,7 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void) if( ta->GetCodeError() != FormulaError::NONE || ( ta->GetLen() == 0 ) ) { rEdit.SetControlBackground(COL_LIGHTRED); - maFtVal->SetText(ScGlobal::GetRscString(STR_VALID_DEFERROR)); + maFtVal->SetText(ScResId(STR_VALID_DEFERROR)); return; } @@ -329,7 +329,7 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void) ) { rEdit.SetControlBackground(COL_YELLOW); - maFtVal->SetText(ScGlobal::GetRscString(STR_UNQUOTED_STRING)); + maFtVal->SetText(ScResId(STR_UNQUOTED_STRING)); return; } @@ -480,7 +480,7 @@ void StyleSelect( ListBox& rLbStyle, const ScDocument* pDoc, SvxFontPrevWindow& { // call new style dialog SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, sal_uInt16(SfxStyleFamily::Para) ); - SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ); + SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScResId(STR_STYLENAME_STANDARD) ); // unlock the dispatcher so SID_STYLE_NEW can be executed // (SetDispatcherLock would affect all Calc documents) diff --git a/sc/source/ui/condformat/condformathelper.cxx b/sc/source/ui/condformat/condformathelper.cxx index 804811b0a925..5b8e192ba044 100644 --- a/sc/source/ui/condformat/condformathelper.cxx +++ b/sc/source/ui/condformat/condformathelper.cxx @@ -10,6 +10,7 @@ #include #include #include +#include namespace { @@ -18,17 +19,17 @@ OUString getTextForType(ScCondFormatEntryType eType) switch(eType) { case CONDITION: - return ScGlobal::GetRscString(STR_COND_CONDITION); + return ScResId(STR_COND_CONDITION); case COLORSCALE: - return ScGlobal::GetRscString(STR_COND_COLORSCALE); + return ScResId(STR_COND_COLORSCALE); case DATABAR: - return ScGlobal::GetRscString(STR_COND_DATABAR); + return ScResId(STR_COND_DATABAR); case FORMULA: - return ScGlobal::GetRscString(STR_COND_FORMULA); + return ScResId(STR_COND_FORMULA); case ICONSET: - return ScGlobal::GetRscString(STR_COND_ICONSET); + return ScResId(STR_COND_ICONSET); case DATE: - return ScGlobal::GetRscString(STR_COND_DATE); + return ScResId(STR_COND_DATE); default: break; } @@ -53,42 +54,42 @@ OUString getExpression(sal_Int32 nIndex) case 5: return OUString("!="); case 6: - return ScGlobal::GetRscString(STR_COND_BETWEEN); + return ScResId(STR_COND_BETWEEN); case 7: - return ScGlobal::GetRscString(STR_COND_NOTBETWEEN); + return ScResId(STR_COND_NOTBETWEEN); case 8: - return ScGlobal::GetRscString(STR_COND_DUPLICATE); + return ScResId(STR_COND_DUPLICATE); case 9: - return ScGlobal::GetRscString(STR_COND_UNIQUE); + return ScResId(STR_COND_UNIQUE); case 11: - return ScGlobal::GetRscString(STR_COND_TOP10); + return ScResId(STR_COND_TOP10); case 12: - return ScGlobal::GetRscString(STR_COND_BOTTOM10); + return ScResId(STR_COND_BOTTOM10); case 13: - return ScGlobal::GetRscString(STR_COND_TOP_PERCENT); + return ScResId(STR_COND_TOP_PERCENT); case 14: - return ScGlobal::GetRscString(STR_COND_BOTTOM_PERCENT); + return ScResId(STR_COND_BOTTOM_PERCENT); case 15: - return ScGlobal::GetRscString(STR_COND_ABOVE_AVERAGE); + return ScResId(STR_COND_ABOVE_AVERAGE); case 16: - return ScGlobal::GetRscString(STR_COND_BELOW_AVERAGE); + return ScResId(STR_COND_BELOW_AVERAGE); case 17: - return ScGlobal::GetRscString(STR_COND_ABOVE_EQUAL_AVERAGE); + return ScResId(STR_COND_ABOVE_EQUAL_AVERAGE); case 18: - return ScGlobal::GetRscString(STR_COND_BELOW_EQUAL_AVERAGE); + return ScResId(STR_COND_BELOW_EQUAL_AVERAGE); case 19: - return ScGlobal::GetRscString(STR_COND_ERROR); + return ScResId(STR_COND_ERROR); case 20: - return ScGlobal::GetRscString(STR_COND_NOERROR); + return ScResId(STR_COND_NOERROR); case 21: - return ScGlobal::GetRscString(STR_COND_BEGINS_WITH); + return ScResId(STR_COND_BEGINS_WITH); case 22: - return ScGlobal::GetRscString(STR_COND_ENDS_WITH); + return ScResId(STR_COND_ENDS_WITH); case 23: - return ScGlobal::GetRscString(STR_COND_CONTAINS); + return ScResId(STR_COND_CONTAINS); case 24: - return ScGlobal::GetRscString(STR_COND_NOT_CONTAINS); + return ScResId(STR_COND_NOT_CONTAINS); case 10: assert(false); @@ -116,7 +117,7 @@ OUString getDateString(sal_Int32 nIndex) }; if (nIndex >= 0 && static_cast(nIndex) < SAL_N_ELEMENTS(aCondStrs)) - return ScGlobal::GetRscString(aCondStrs[nIndex]); + return ScResId(aCondStrs[nIndex]); assert(false); return OUString(); } @@ -150,7 +151,7 @@ OUString ScCondFormatHelper::GetExpression(const ScConditionalFormat& rFormat, c { aBuffer.append(pEntry->GetExpression(rPos, 0)); aBuffer.append(" "); - aBuffer.append(ScGlobal::GetRscString(STR_COND_AND)); + aBuffer.append(ScResId(STR_COND_AND)); aBuffer.append(" "); aBuffer.append(pEntry->GetExpression(rPos, 1)); } @@ -202,7 +203,7 @@ OUString ScCondFormatHelper::GetExpression( ScCondFormatEntryType eType, sal_Int if(nIndex == 6 || nIndex == 7) { aBuffer.append(" "); - aBuffer.append(ScGlobal::GetRscString(STR_COND_AND)); + aBuffer.append(ScResId(STR_COND_AND)); aBuffer.append(" "); aBuffer.append(aStr2); } diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx index d6370799ac06..db83d606220e 100644 --- a/sc/source/ui/condformat/condformatmgr.cxx +++ b/sc/source/ui/condformat/condformatmgr.cxx @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -18,8 +19,8 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(SvSimpleTableContainer& rPa , mpDoc(pDoc) , mpFormatList(pFormatList) { - OUString aConditionStr(ScGlobal::GetRscString(STR_HEADER_COND)); - OUString aRangeStr(ScGlobal::GetRscString(STR_HEADER_RANGE)); + OUString aConditionStr(ScResId(STR_HEADER_COND)); + OUString aRangeStr(ScResId(STR_HEADER_RANGE)); OUStringBuffer sHeader; sHeader.append(aRangeStr).append("\t").append(aConditionStr); diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index bd3480772c3f..b88862471bc1 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx @@ -18,6 +18,7 @@ #include #include #include +#include VCL_BUILDER_FACTORY_ARGS(ScPivotLayoutTreeListData, WB_BORDER | WB_TABSTOP | WB_CLIPCHILDREN) @@ -47,7 +48,7 @@ OUString lclGetFunctionMaskName(const PivotFunc nFunctionMask) break; } if (pStrId) - return ScGlobal::GetRscString(pStrId); + return ScResId(pStrId); else return OUString(); } diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 0e3e09839892..7fadd6c22bd0 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -41,7 +41,7 @@ namespace { std::unique_ptr xInfoBox(Application::CreateMessageDialog(pWindow, VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(id))); + ScResId(id))); xInfoBox->run(); } } diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index bb9a65174ad2..935ec57cd5e1 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -495,7 +496,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl, Button*, void) } else { - ERRORBOX(GetFrameWeld(), ScGlobal::GetRscString(STR_INVALIDNAME)); + ERRORBOX(GetFrameWeld(), ScResId(STR_INVALIDNAME)); m_pEdName->SetSelection( Selection( 0, SELECTION_MAX ) ); m_pEdName->GrabFocus(); } @@ -526,7 +527,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl, Button*, void) if (itr != rDBs.end()) { - OUString aStrDelMsg = ScGlobal::GetRscString( STR_QUERY_DELENTRY ); + OUString aStrDelMsg = ScResId( STR_QUERY_DELENTRY ); OUStringBuffer aBuf; aBuf.append(aStrDelMsg.getToken(0, '#')); diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx index 4f9f17261342..60522c0a8e28 100644 --- a/sc/source/ui/dbgui/dpgroupdlg.cxx +++ b/sc/source/ui/dbgui/dpgroupdlg.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -228,7 +229,7 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( vcl::Window* pParent, { static const size_t nCount = SAL_N_ELEMENTS(aDatePartResIds); for (const char* pDatePartResId : aDatePartResIds) - mpLbUnits->InsertEntry(ScGlobal::GetRscString(pDatePartResId)); + mpLbUnits->InsertEntry(ScResId(pDatePartResId)); mpEdStart->SetShowDateCentury( true ); mpEdEnd->SetShowDateCentury( true ); diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 22635dc8491b..83f0aeb88a8c 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -682,7 +682,7 @@ IMPL_LINK( ScFilterDlg, EndDlgHdl, Button*, pBtn, void ) std::unique_ptr xBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_INVALID_TABREF))); + ScResId(STR_INVALID_TABREF))); xBox->run(); pEdCopyArea->GrabFocus(); bAreaInputOk = false; diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index d89d9eca5a59..c03571c7caf8 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -67,7 +67,7 @@ bool lclFillListBox( ListBoxType& rLBox, const Sequence< OUString >& rStrings, s rLBox.InsertEntry( *pStr ); else { - rLBox.InsertEntry( ScGlobal::GetRscString( STR_EMPTYDATA ), nEmptyPos ); + rLBox.InsertEntry( ScResId( STR_EMPTYDATA ), nEmptyPos ); bEmpty = true; } } @@ -87,7 +87,7 @@ bool lclFillListBox( ListBoxType& rLBox, const vector& rM rLBox.InsertEntry(aName); else { - rLBox.InsertEntry(ScGlobal::GetRscString(STR_EMPTYDATA), nEmptyPos); + rLBox.InsertEntry(ScResId(STR_EMPTYDATA), nEmptyPos); bEmpty = true; } } diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 5d61ff7c6c03..f7362aeabac3 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -152,7 +153,7 @@ IMPL_LINK_NOARG(ScNewScenarioDlg, OkHdl, Button*, void) { std::unique_ptr xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_INVALIDTABNAME))); + ScResId(STR_INVALIDTABNAME))); xInfoBox->run(); m_pEdName->GrabFocus(); } @@ -160,7 +161,7 @@ IMPL_LINK_NOARG(ScNewScenarioDlg, OkHdl, Button*, void) { std::unique_ptr xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_NEWTABNAMENOTUNIQUE))); + ScResId(STR_NEWTABNAMENOTUNIQUE))); xInfoBox->run(); m_pEdName->GrabFocus(); } diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 6ea837ddc946..a1bff449513d 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -45,7 +45,7 @@ namespace { std::unique_ptr xBox(Application::CreateMessageDialog(pParent, VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(rid))); + ScResId(rid))); xBox->run(); } } diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 82621de88e70..9f83cb51c06b 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -802,7 +802,7 @@ DeactivateRC ScTabPageSortOptions::DeactivatePage( SfxItemSet* pSetP ) { std::unique_ptr xBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, - ScGlobal::GetRscString(STR_INVALID_TABREF))); + ScResId(STR_INVALID_TABREF))); xBox->run(); m_pEdOutPos->GrabFocus(); m_pEdOutPos->SetSelection( Selection( 0, SELECTION_MAX ) ); 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 #include #include +#include #include #include #include @@ -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 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 #include #include +#include #include #include #include @@ -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 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 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 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 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 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 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 #include #include +#include #include #include #include @@ -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 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 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 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 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 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 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 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 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 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 #include #include +#include #include #include @@ -1205,7 +1206,7 @@ bool ScDocShell::MergeSharedDocument( ScDocShell* pSharedDocShell ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr 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 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 xBtn(&pViewFrame->GetWindow()); @@ -527,7 +527,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) vcl::Window* pWin = GetActiveDialogParent(); std::unique_ptr 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 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 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 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 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 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( - 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 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 #include #include +#include #include #include #include @@ -84,7 +85,7 @@ void ScDocShell::ErrorMessage(const char* pGlobStrId) std::unique_ptr 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 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 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 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 #include #include +#include #include #include #include @@ -502,7 +503,7 @@ void ScDocShell::CheckConfigOptions() vcl::Window* pParent = pViewShell->GetFrameWin(); std::unique_ptr 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 #include #include +#include #include #include #include @@ -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 xFactory = comphelper::getProcessServiceFactory(); uno::Reference 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 #include #include +#include #include #include @@ -3196,7 +3197,7 @@ void ScExternalRefManager::Notify( SfxBroadcaster&, const SfxHint& rHint ) vcl::Window* pWin = ScDocShell::GetActiveDialogParent(); std::unique_ptr 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 #include +#include #include #include #include @@ -232,7 +233,7 @@ bool ScImportExport::StartPaste() vcl::Window* pWin = Application::GetDefDialogParent(); std::unique_ptr 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 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 #include #include +#include #include #include #include @@ -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 ); } diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 6a6ac2ef0528..a1720a8b73db 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -63,6 +63,7 @@ #include #include +#include #include #include #include @@ -625,7 +626,7 @@ static void lcl_RemoveFields( OutlinerView& rOutView ) { if (bUpdate) pOutliner->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/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index d1efc9f2cd33..5b176c5b89ae 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -130,7 +130,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, { //sal_Int8 nAction(DND_ACTION_MOVE); //Point aPos; - const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); + const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP)); SdrObject* pResult = pDrawView->ApplyGraphicToObject( *pPickObj, diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx index f6608432422d..b4fb6bdfebda 100644 --- a/sc/source/ui/drawfunc/futext3.cxx +++ b/sc/source/ui/drawfunc/futext3.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -81,7 +82,7 @@ void FuText::StopEditMode() if(pCalcUndo) { - const OUString aUndoStr = ScGlobal::GetRscString( STR_UNDO_EDITNOTE ); + const OUString aUndoStr = ScResId( STR_UNDO_EDITNOTE ); pUndoMgr->EnterListAction( aUndoStr, aUndoStr, 0, pViewShell->GetViewShellId() ); /* Note has been created before editing, if first undo action is @@ -172,7 +173,7 @@ void FuText::StopEditMode() SfxListUndoAction* pAction = dynamic_cast< SfxListUndoAction* >( pUndoMgr->GetUndoAction() ); OSL_ENSURE( pAction, "FuText::StopEditMode - list undo action expected" ); if( pAction ) - pAction->SetComment( ScGlobal::GetRscString( bNewNote ? STR_UNDO_INSERTNOTE : STR_UNDO_DELETENOTE ) ); + pAction->SetComment( ScResId( bNewNote ? STR_UNDO_INSERTNOTE : STR_UNDO_DELETENOTE ) ); } } -- cgit