[Libreoffice-commits] core.git: sc/source

Gabor Kelemen kelemeng at ubuntu.com
Sat May 12 12:00:18 UTC 2018


 sc/source/core/tool/autoform.cxx           |    5 +++--
 sc/source/core/tool/chartarr.cxx           |    9 +++++----
 sc/source/core/tool/chgtrack.cxx           |   29 +++++++++++++++--------------
 sc/source/core/tool/compiler.cxx           |   15 ++++++++-------
 sc/source/core/tool/dbdata.cxx             |   11 ++++++-----
 sc/source/core/tool/defaultsoptions.cxx    |    3 ++-
 sc/source/core/tool/doubleref.cxx          |    5 +++--
 sc/source/core/tool/interpr5.cxx           |    3 ++-
 sc/source/core/tool/progress.cxx           |    3 ++-
 sc/source/core/tool/stylehelper.cxx        |   27 ++++++++++++++-------------
 sc/source/core/tool/tokenstringcontext.cxx |    3 ++-
 sc/source/core/tool/viewopti.cxx           |    3 ++-
 12 files changed, 64 insertions(+), 52 deletions(-)

New commits:
commit a17c2018a4587046c8f2328581eb227b4c1bd422
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date:   Thu May 10 22:47:54 2018 +0200

    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/core/tool for easier review.
    
    Change-Id: I4722c8a9ce11ae073389ec8395401f3d11ef0d5b
    Reviewed-on: https://gerrit.libreoffice.org/54133
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index e0a331f8ff76..939e6e0af4b9 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -37,6 +37,7 @@
 #include <o3tl/make_unique.hxx>
 
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <document.hxx>
 
 /*
@@ -851,7 +852,7 @@ ScAutoFormat::ScAutoFormat() :
 {
     //  create default autoformat
     ScAutoFormatData* pData = new ScAutoFormatData;
-    OUString aName(ScGlobal::GetRscString(STR_STYLENAME_STANDARD));
+    OUString aName(ScResId(STR_STYLENAME_STANDARD));
     pData->SetName(aName);
 
     //  default font, default height
@@ -931,7 +932,7 @@ ScAutoFormat::ScAutoFormat() :
 
 bool DefaultFirstEntry::operator() (const OUString& left, const OUString& right) const
 {
-    OUString aStrStandard(ScGlobal::GetRscString(STR_STYLENAME_STANDARD));
+    OUString aStrStandard(ScResId(STR_STYLENAME_STANDARD));
     if (ScGlobal::GetpTransliteration()->isEqual( left, right ) )
         return false;
     if ( ScGlobal::GetpTransliteration()->isEqual( left, aStrStandard ) )
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index ef73e5727c48..8e53779239d9 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -27,6 +27,7 @@
 #include <document.hxx>
 #include <rechead.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <formulacell.hxx>
 #include <docoptio.hxx>
 
@@ -241,7 +242,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
         if (aString.isEmpty())
         {
             OUStringBuffer aBuf;
-            aBuf.append(ScGlobal::GetRscString(STR_COLUMN));
+            aBuf.append(ScResId(STR_COLUMN));
             aBuf.append(' ');
 
             ScAddress aPos( aCols[ nCol ], 0, 0 );
@@ -264,7 +265,7 @@ ScMemChart* ScChartArray::CreateMemChartSingle()
         if (aString.isEmpty())
         {
             OUStringBuffer aBuf;
-            aBuf.append(ScGlobal::GetRscString(STR_ROW));
+            aBuf.append(ScResId(STR_ROW));
             aBuf.append(' ');
             aBuf.append(static_cast<sal_Int32>(aRows[nRow]+1));
             aString = aBuf.makeStringAndClear();
@@ -350,7 +351,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
 
         if (aString.isEmpty())
         {
-            OUStringBuffer aBuf(ScGlobal::GetRscString(STR_COLUMN));
+            OUStringBuffer aBuf(ScResId(STR_COLUMN));
             aBuf.append(' ');
             if ( pPos )
                 nPosCol = pPos->Col() + 1;
@@ -375,7 +376,7 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
 
         if (aString.isEmpty())
         {
-            OUStringBuffer aBuf(ScGlobal::GetRscString(STR_ROW));
+            OUStringBuffer aBuf(ScResId(STR_ROW));
             aBuf.append(' ');
             if ( pPos )
                 nPosRow = pPos->Row() + 1;
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 7045a24a5d9c..1acf76bf91dc 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -31,6 +31,7 @@
 #include <hints.hxx>
 #include <markdata.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <editutil.hxx>
 #include <tokenarray.hxx>
 #include <refupdatecontext.hxx>
@@ -431,7 +432,7 @@ void ScChangeAction::GetDescription(
     if (GetType() == SC_CAT_MOVE)
     {
         aBuf.append(
-            ScGlobal::GetRscString(STR_CHANGED_MOVE_REJECTION_WARNING) + " ");
+            ScResId(STR_CHANGED_MOVE_REJECTION_WARNING) + " ");
         rStr = aBuf.makeStringAndClear();
         return;
     }
@@ -439,7 +440,7 @@ void ScChangeAction::GetDescription(
     if (IsInsertType())
     {
         aBuf.append(
-            ScGlobal::GetRscString(STR_CHANGED_DELETE_REJECTION_WARNING) + " ");
+            ScResId(STR_CHANGED_DELETE_REJECTION_WARNING) + " ");
         rStr = aBuf.makeStringAndClear();
         return;
     }
@@ -456,7 +457,7 @@ void ScChangeAction::GetDescription(
     if (pReject->GetType() == SC_CAT_MOVE)
     {
         aBuf.append(
-            ScGlobal::GetRscString(STR_CHANGED_MOVE_REJECTION_WARNING));
+            ScResId(STR_CHANGED_MOVE_REJECTION_WARNING));
         aBuf.append(' ');
         rStr = aBuf.makeStringAndClear();
         return;
@@ -465,7 +466,7 @@ void ScChangeAction::GetDescription(
     if (pReject->IsDeleteType())
     {
         aBuf.append(
-            ScGlobal::GetRscString(STR_CHANGED_DELETE_REJECTION_WARNING));
+            ScResId(STR_CHANGED_DELETE_REJECTION_WARNING));
         aBuf.append(' ');
         rStr = aBuf.makeStringAndClear();
         return;
@@ -481,7 +482,7 @@ void ScChangeAction::GetDescription(
             if( itChangeAction->second->GetType() == SC_CAT_MOVE)
             {
                 aBuf.append(
-                    ScGlobal::GetRscString(STR_CHANGED_MOVE_REJECTION_WARNING));
+                    ScResId(STR_CHANGED_MOVE_REJECTION_WARNING));
                 aBuf.append(' ');
                 rStr = aBuf.makeStringAndClear();
                 return;
@@ -490,7 +491,7 @@ void ScChangeAction::GetDescription(
             if (pReject->IsDeleteType())
             {
                 aBuf.append(
-                    ScGlobal::GetRscString(STR_CHANGED_DELETE_REJECTION_WARNING));
+                    ScResId(STR_CHANGED_DELETE_REJECTION_WARNING));
                 aBuf.append(' ');
                 rStr = aBuf.makeStringAndClear();
                 return;
@@ -714,12 +715,12 @@ void ScChangeActionIns::GetDescription(
             pWhatId = STR_AREA;
     }
 
-    OUString aRsc = ScGlobal::GetRscString(STR_CHANGED_INSERT);
+    OUString aRsc = ScResId(STR_CHANGED_INSERT);
     sal_Int32 nPos = aRsc.indexOf("#1");
     if (nPos >= 0)
     {
         // Construct a range string to replace '#1' first.
-        OUStringBuffer aBuf(ScGlobal::GetRscString(pWhatId));
+        OUStringBuffer aBuf(ScResId(pWhatId));
         aBuf.append(' ');
         aBuf.append(GetRefString(GetBigRange(), pDoc));
         OUString aRangeStr = aBuf.makeStringAndClear();
@@ -963,13 +964,13 @@ void ScChangeActionDel::GetDescription(
         aTmpRange.aEnd.SetRow( aTmpRange.aEnd.Row() + GetDy() );
     }
 
-    OUString aRsc = ScGlobal::GetRscString(STR_CHANGED_DELETE);
+    OUString aRsc = ScResId(STR_CHANGED_DELETE);
     sal_Int32 nPos = aRsc.indexOf("#1");
     if (nPos >= 0)
     {
         // Build a string to replace with.
         OUStringBuffer aBuf;
-        aBuf.append(ScGlobal::GetRscString(pWhatId));
+        aBuf.append(ScResId(pWhatId));
         aBuf.append(' ');
         aBuf.append(GetRefString(aTmpRange, pDoc));
         OUString aRangeStr = aBuf.makeStringAndClear();
@@ -1188,7 +1189,7 @@ void ScChangeActionMove::GetDescription(
 
     bool bFlag3D = GetFromRange().aStart.Tab() != GetBigRange().aStart.Tab();
 
-    OUString aRsc = ScGlobal::GetRscString(STR_CHANGED_MOVE);
+    OUString aRsc = ScResId(STR_CHANGED_MOVE);
 
     OUString aTmpStr = ScChangeAction::GetRefString(GetFromRange(), pDoc, bFlag3D);
     sal_Int32 nPos = aRsc.indexOf("#1");
@@ -1448,7 +1449,7 @@ void ScChangeActionContent::GetDescription(
 {
     ScChangeAction::GetDescription( rStr, pDoc, bSplitRange, bWarning );
 
-    OUString aRsc = ScGlobal::GetRscString(STR_CHANGED_CELL);
+    OUString aRsc = ScResId(STR_CHANGED_CELL);
 
     OUString aTmpStr;
     GetRefString(aTmpStr, pDoc);
@@ -1463,7 +1464,7 @@ void ScChangeActionContent::GetDescription(
 
     GetOldString( aTmpStr, pDoc );
     if (aTmpStr.isEmpty())
-        aTmpStr = ScGlobal::GetRscString( STR_CHANGED_BLANK );
+        aTmpStr = ScResId( STR_CHANGED_BLANK );
 
     nPos = nPos >= 0 ? aRsc.indexOf("#2", nPos) : -1;
     if (nPos >= 0)
@@ -1474,7 +1475,7 @@ void ScChangeActionContent::GetDescription(
 
     GetNewString( aTmpStr, pDoc );
     if (aTmpStr.isEmpty())
-        aTmpStr = ScGlobal::GetRscString( STR_CHANGED_BLANK );
+        aTmpStr = ScResId( STR_CHANGED_BLANK );
 
     nPos = nPos >= 0 ? aRsc.indexOf("#3", nPos) : -1;
     if (nPos >= 0)
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 69ef96592411..077ba35b5724 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -52,6 +52,7 @@
 #include <refupdat.hxx>
 #include <sc.hrc>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <formulacell.hxx>
 #include <dociter.hxx>
 #include <docoptio.hxx>
@@ -675,14 +676,14 @@ static bool lcl_getLastTabName( OUString& rTabName2, const OUString& rTabName1,
         vector<OUString>::const_iterator itr = ::std::find(itrBeg, itrEnd, rTabName1);
         if (itr == rTabNames.end())
         {
-            rTabName2 = ScGlobal::GetRscString(STR_NO_REF_TABLE);
+            rTabName2 = ScResId(STR_NO_REF_TABLE);
             return false;
         }
 
         size_t nDist = ::std::distance(itrBeg, itr);
         if (nDist + static_cast<size_t>(nTabSpan) >= nCount)
         {
-            rTabName2 = ScGlobal::GetRscString(STR_NO_REF_TABLE);
+            rTabName2 = ScResId(STR_NO_REF_TABLE);
             return false;
         }
 
@@ -726,7 +727,7 @@ struct Convention_A1 : public ScCompiler::Convention
 void Convention_A1::MakeColStr( OUStringBuffer& rBuffer, SCCOL nCol )
 {
     if ( !ValidCol( nCol) )
-        rBuffer.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
+        rBuffer.append(ScResId(STR_NO_REF_TABLE));
     else
         ::ScColToAlpha( rBuffer, nCol);
 }
@@ -734,7 +735,7 @@ void Convention_A1::MakeColStr( OUStringBuffer& rBuffer, SCCOL nCol )
 void Convention_A1::MakeRowStr( OUStringBuffer& rBuffer, SCROW nRow )
 {
     if ( !ValidRow(nRow) )
-        rBuffer.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
+        rBuffer.append(ScResId(STR_NO_REF_TABLE));
     else
         rBuffer.append(sal_Int32(nRow + 1));
 }
@@ -747,7 +748,7 @@ struct ConventionOOO_A1 : public Convention_A1
     static void MakeTabStr( OUStringBuffer &rBuf, const std::vector<OUString>& rTabNames, SCTAB nTab )
     {
         if (static_cast<size_t>(nTab) >= rTabNames.size())
-            rBuf.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
+            rBuf.append(ScResId(STR_NO_REF_TABLE));
         else
             rBuf.append(rTabNames[nTab]);
         rBuf.append('.');
@@ -1072,7 +1073,7 @@ struct ConventionXL
         ScAddress aAbs = rRef.toAbs(rPos);
         if (rRef.IsTabDeleted() || static_cast<size_t>(aAbs.Tab()) >= rTabNames.size())
         {
-            rTabName = ScGlobal::GetRscString( STR_NO_REF_TABLE );
+            rTabName = ScResId( STR_NO_REF_TABLE );
             return;
         }
         rTabName = rTabNames[aAbs.Tab()];
@@ -1688,7 +1689,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
 
         if (!ValidCol(aAbsRef.aEnd.Col()) || !ValidRow(aAbsRef.aEnd.Row()))
         {
-            rBuffer.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
+            rBuffer.append(ScResId(STR_NO_REF_TABLE));
             return;
         }
 
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 75ff41b8f99a..4c331d839664 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -29,6 +29,7 @@
 #include <queryparam.hxx>
 #include <queryentry.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <subtotalparam.hxx>
 #include <sortparam.hxx>
 #include <dociter.hxx>
@@ -270,25 +271,25 @@ OUString ScDBData::GetOperations() const
     {
         const ScQueryEntry& rEntry = mpQueryParam->GetEntry(0);
         if (rEntry.bDoQuery)
-            aBuf.append(ScGlobal::GetRscString(STR_OPERATION_FILTER));
+            aBuf.append(ScResId(STR_OPERATION_FILTER));
     }
 
     if (mpSortParam->maKeyState[0].bDoSort)
     {
         if (!aBuf.isEmpty())
             aBuf.append(", ");
-        aBuf.append(ScGlobal::GetRscString(STR_OPERATION_SORT));
+        aBuf.append(ScResId(STR_OPERATION_SORT));
     }
 
     if (mpSubTotal->bGroupActive[0] && !mpSubTotal->bRemoveOnly)
     {
         if (!aBuf.isEmpty())
             aBuf.append(", ");
-        aBuf.append(ScGlobal::GetRscString(STR_OPERATION_SUBTOTAL));
+        aBuf.append(ScResId(STR_OPERATION_SUBTOTAL));
     }
 
     if (aBuf.isEmpty())
-        aBuf.append(ScGlobal::GetRscString(STR_OPERATION_NONE));
+        aBuf.append(ScResId(STR_OPERATION_NONE));
 
     return aBuf.makeStringAndClear();
 }
@@ -828,7 +829,7 @@ void ScDBData::RefreshTableColumnNames( ScDocument* pDoc )
     // starting at the column offset number. Still no duplicates of course.
     if (bHaveEmpty)
     {
-        OUString aColumn( ScGlobal::GetRscString(STR_COLUMN));
+        OUString aColumn( ScResId(STR_COLUMN));
         for (size_t i=0, n=aNewNames.size(); i < n; ++i)
         {
             if (aNewNames[i].isEmpty())
diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx
index 4310e9e5a331..2270c61351e7 100644
--- a/sc/source/core/tool/defaultsoptions.cxx
+++ b/sc/source/core/tool/defaultsoptions.cxx
@@ -16,6 +16,7 @@
 #include <attrib.hxx>
 #include <scitems.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <sc.hrc>
 
 using namespace utl;
@@ -30,7 +31,7 @@ ScDefaultsOptions::ScDefaultsOptions()
 void ScDefaultsOptions::SetDefaults()
 {
     nInitTabCount  = 1;
-    aInitTabPrefix = ScGlobal::GetRscString(STR_TABLE_DEF); // Default Prefix "Sheet"
+    aInitTabPrefix = ScResId(STR_TABLE_DEF); // Default Prefix "Sheet"
 }
 
 bool ScDefaultsOptions::operator==( const ScDefaultsOptions& rOpt ) const
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index feb9c51627fa..539cd35b1fe2 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -24,6 +24,7 @@
 #include <queryparam.hxx>
 #include <queryentry.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <scmatrix.hxx>
 
 #include <svl/sharedstringpool.hxx>
@@ -77,12 +78,12 @@ bool lcl_createStarQuery(
             // For all entries after the first one, check the and/or connector in the first column.
             aCellStr = pQueryRef->getString(0, nRow);
             lcl_uppercase(aCellStr);
-            if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_UND) )
+            if ( aCellStr == ScResId(STR_TABLE_UND) )
             {
                 rEntry.eConnect = SC_AND;
                 bValid = true;
             }
-            else if ( aCellStr == ScGlobal::GetRscString(STR_TABLE_ODER) )
+            else if ( aCellStr == ScResId(STR_TABLE_ODER) )
             {
                 rEntry.eConnect = SC_OR;
                 bValid = true;
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 739be97c0176..ef514ed8a728 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -36,6 +36,7 @@
 #include <dociter.hxx>
 #include <scmatrix.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <cellkeytranslator.hxx>
 #include <formulagroup.hxx>
 
@@ -3208,7 +3209,7 @@ void ScInterpreter::ScInfo()
         else if( aStr == "NUMFILE" )
             PushDouble( 1 );
         else if( aStr == "RECALC" )
-            PushString( ScGlobal::GetRscString( pDok->GetAutoCalc() ? STR_RECALC_AUTO : STR_RECALC_MANUAL ) );
+            PushString( ScResId( pDok->GetAutoCalc() ? STR_RECALC_AUTO : STR_RECALC_MANUAL ) );
         else if (aStr == "DIRECTORY" || aStr == "MEMAVAIL" || aStr == "MEMUSED" || aStr == "ORIGIN" || aStr == "TOTMEM")
             PushNA();
         else
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index 12ac9d857d90..2cd38278ef28 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -30,6 +30,7 @@
 #include <document.hxx>
 #include <global.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 
 using namespace com::sun::star;
 
@@ -147,7 +148,7 @@ void ScProgress::CreateInterpretProgress( ScDocument* pDoc, bool bWait )
             // Keep the dummy interpret progress.
             if ( !pGlobalProgress )
                 pInterpretProgress = new ScProgress( pDoc->GetDocumentShell(),
-                    ScGlobal::GetRscString( STR_PROGRESS_CALCULATING ),
+                    ScResId( STR_PROGRESS_CALCULATING ),
                     pDoc->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE, bWait );
             pInterpretDoc = pDoc;
         }
diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx
index 525e4f2d37ad..9d94d9095a39 100644
--- a/sc/source/core/tool/stylehelper.cxx
+++ b/sc/source/core/tool/stylehelper.cxx
@@ -23,6 +23,7 @@
 #include <stylehelper.hxx>
 #include <global.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 
 //  conversion programmatic <-> display (visible) name
 //  currently, the core always has the visible names
@@ -57,37 +58,37 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( SfxStyleFamily nType )
         static ScDisplayNameMap aCellMap[12];
         if ( !bCellMapFilled )
         {
-            aCellMap[0].aDispName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
+            aCellMap[0].aDispName = ScResId( STR_STYLENAME_STANDARD );
             aCellMap[0].aProgName = SC_STYLE_PROG_STANDARD;
 
-            aCellMap[1].aDispName = ScGlobal::GetRscString( STR_STYLENAME_RESULT );
+            aCellMap[1].aDispName = ScResId( STR_STYLENAME_RESULT );
             aCellMap[1].aProgName = SC_STYLE_PROG_RESULT;
 
-            aCellMap[2].aDispName = ScGlobal::GetRscString( STR_STYLENAME_RESULT1 );
+            aCellMap[2].aDispName = ScResId( STR_STYLENAME_RESULT1 );
             aCellMap[2].aProgName = SC_STYLE_PROG_RESULT1;
 
-            aCellMap[3].aDispName = ScGlobal::GetRscString( STR_STYLENAME_HEADLINE );
+            aCellMap[3].aDispName = ScResId( STR_STYLENAME_HEADLINE );
             aCellMap[3].aProgName = SC_STYLE_PROG_HEADLINE;
 
-            aCellMap[4].aDispName = ScGlobal::GetRscString( STR_STYLENAME_HEADLINE1 );
+            aCellMap[4].aDispName = ScResId( STR_STYLENAME_HEADLINE1 );
             aCellMap[4].aProgName = SC_STYLE_PROG_HEADLINE1;
 
-            aCellMap[5].aDispName = ScGlobal::GetRscString( STR_PIVOT_STYLENAME_INNER );
+            aCellMap[5].aDispName = ScResId( STR_PIVOT_STYLENAME_INNER );
             aCellMap[5].aProgName = SC_PIVOT_STYLE_PROG_INNER;
 
-            aCellMap[6].aDispName = ScGlobal::GetRscString( STR_PIVOT_STYLENAME_RESULT );
+            aCellMap[6].aDispName = ScResId( STR_PIVOT_STYLENAME_RESULT );
             aCellMap[6].aProgName = SC_PIVOT_STYLE_PROG_RESULT;
 
-            aCellMap[7].aDispName = ScGlobal::GetRscString( STR_PIVOT_STYLENAME_CATEGORY );
+            aCellMap[7].aDispName = ScResId( STR_PIVOT_STYLENAME_CATEGORY );
             aCellMap[7].aProgName = SC_PIVOT_STYLE_PROG_CATEGORY;
 
-            aCellMap[8].aDispName = ScGlobal::GetRscString( STR_PIVOT_STYLENAME_TITLE );
+            aCellMap[8].aDispName = ScResId( STR_PIVOT_STYLENAME_TITLE );
             aCellMap[8].aProgName = SC_PIVOT_STYLE_PROG_TITLE;
 
-            aCellMap[9].aDispName = ScGlobal::GetRscString( STR_PIVOT_STYLENAME_FIELDNAME );
+            aCellMap[9].aDispName = ScResId( STR_PIVOT_STYLENAME_FIELDNAME );
             aCellMap[9].aProgName = SC_PIVOT_STYLE_PROG_FIELDNAME;
 
-            aCellMap[10].aDispName = ScGlobal::GetRscString( STR_PIVOT_STYLENAME_TOP );
+            aCellMap[10].aDispName = ScResId( STR_PIVOT_STYLENAME_TOP );
             aCellMap[10].aProgName = SC_PIVOT_STYLE_PROG_TOP;
 
             //  last entry remains empty
@@ -102,10 +103,10 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( SfxStyleFamily nType )
         static ScDisplayNameMap aPageMap[3];
         if ( !bPageMapFilled )
         {
-            aPageMap[0].aDispName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
+            aPageMap[0].aDispName = ScResId( STR_STYLENAME_STANDARD );
             aPageMap[0].aProgName = SC_STYLE_PROG_STANDARD;
 
-            aPageMap[1].aDispName = ScGlobal::GetRscString( STR_STYLENAME_REPORT );
+            aPageMap[1].aDispName = ScResId( STR_STYLENAME_REPORT );
             aPageMap[1].aProgName = SC_STYLE_PROG_REPORT;
 
             //  last entry remains empty
diff --git a/sc/source/core/tool/tokenstringcontext.cxx b/sc/source/core/tool/tokenstringcontext.cxx
index 89e61d10973a..657915986b5b 100644
--- a/sc/source/core/tool/tokenstringcontext.cxx
+++ b/sc/source/core/tool/tokenstringcontext.cxx
@@ -13,6 +13,7 @@
 #include <dbdata.hxx>
 #include <externalrefmgr.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 
 using namespace com::sun::star;
 
@@ -42,7 +43,7 @@ TokenStringContext::TokenStringContext( const ScDocument* pDoc, formula::Formula
     else
     {
         assert(!"TokenStringContext - no OpCodeMap?!?");
-        maErrRef = ScGlobal::GetRscString(STR_NO_REF_TABLE);
+        maErrRef = ScResId(STR_NO_REF_TABLE);
     }
 
     if (!pDoc)
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 6d8dd9089089..920e05f1e874 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -24,6 +24,7 @@
 
 #include <global.hxx>
 #include <globstr.hrc>
+#include <scresid.hxx>
 #include <viewopti.hxx>
 #include <rechead.hxx>
 #include <sc.hrc>
@@ -129,7 +130,7 @@ void ScViewOptions::SetDefaults()
     aModeArr[VOBJ_TYPE_DRAW ] = VOBJ_MODE_SHOW;
 
     aGridCol     = SC_STD_GRIDCOLOR;
-    aGridColName = ScGlobal::GetRscString( STR_GRIDCOLOR );
+    aGridColName = ScResId( STR_GRIDCOLOR );
 
     aGridOpt.SetDefaults();
 }


More information about the Libreoffice-commits mailing list