[Libreoffice-commits] core.git: sc/source
Gabor Kelemen
kelemeng at ubuntu.com
Fri May 11 12:00:48 UTC 2018
sc/source/core/data/attarray.cxx | 3 ++-
sc/source/core/data/attrib.cxx | 37 +++++++++++++++++++------------------
sc/source/core/data/dociter.cxx | 5 +++--
sc/source/core/data/docpool.cxx | 35 ++++++++++++++++++-----------------
sc/source/core/data/documen4.cxx | 3 ++-
sc/source/core/data/documen8.cxx | 2 +-
sc/source/core/data/document.cxx | 7 ++++---
sc/source/core/data/dpcache.cxx | 7 ++++---
sc/source/core/data/dpdimsave.cxx | 15 ++++++++-------
sc/source/core/data/dpoutput.cxx | 10 +++++-----
sc/source/core/data/dpsdbtab.cxx | 3 ++-
sc/source/core/data/dpshttab.cxx | 3 ++-
sc/source/core/data/dptabres.cxx | 13 +++++++------
sc/source/core/data/dputil.cxx | 3 ++-
sc/source/core/data/drwlayer.cxx | 3 ++-
sc/source/core/data/global.cxx | 6 +++---
sc/source/core/data/patattr.cxx | 3 ++-
sc/source/core/data/stlpool.cxx | 11 ++++++-----
sc/source/core/data/stlsheet.cxx | 3 ++-
sc/source/core/data/table1.cxx | 5 +++--
sc/source/core/data/table3.cxx | 15 ++++++++-------
sc/source/core/data/table5.cxx | 3 ++-
sc/source/core/data/validat.cxx | 9 +++++----
23 files changed, 112 insertions(+), 92 deletions(-)
New commits:
commit d9370a1406c3d6cf7ebdac5ea2f5a0069aba0814
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date: Thu May 10 20:44:05 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/data for easier review.
Change-Id: Id26cf9c38c8ed76448f615b775423a3f5dbc5ef4
Reviewed-on: https://gerrit.libreoffice.org/54100
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 071c7ae30066..d058b7e70b4f 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -40,6 +40,7 @@
#include <markarr.hxx>
#include <rechead.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <segmenttree.hxx>
#include <editdataarray.hxx>
#include <formulacell.hxx>
@@ -1808,7 +1809,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
pDocument->GetPool()->Remove(*mvData[nPos].pPattern);
pNewPattern->SetStyleSheet( static_cast<ScStyleSheet*>(
pDocument->GetStyleSheetPool()->
- Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
+ Find( ScResId(STR_STYLENAME_STANDARD),
SfxStyleFamily::Para,
SfxStyleSearchBits::Auto | SfxStyleSearchBits::ScStandard ) ) );
mvData[nPos].pPattern = static_cast<const ScPatternAttr*>(
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 4dd0b2218726..b257537d29a6 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -37,6 +37,7 @@
#include <sc.hrc>
#include <mid.h>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <textuno.hxx>
using namespace com::sun::star;
@@ -278,8 +279,8 @@ bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
OUString ScProtectionAttr::GetValueText() const
{
- const OUString aStrYes ( ScGlobal::GetRscString(STR_YES) );
- const OUString aStrNo ( ScGlobal::GetRscString(STR_NO) );
+ const OUString aStrYes ( ScResId(STR_YES) );
+ const OUString aStrNo ( ScResId(STR_NO) );
const OUString aValue = "("
+ (bProtection ? aStrYes : aStrNo)
@@ -303,8 +304,8 @@ bool ScProtectionAttr::GetPresentation
const IntlWrapper& /* rIntl */
) const
{
- const OUString aStrYes ( ScGlobal::GetRscString(STR_YES) );
- const OUString aStrNo ( ScGlobal::GetRscString(STR_NO) );
+ const OUString aStrYes ( ScResId(STR_YES) );
+ const OUString aStrNo ( ScResId(STR_NO) );
switch ( ePres )
{
@@ -313,19 +314,19 @@ bool ScProtectionAttr::GetPresentation
break;
case SfxItemPresentation::Complete:
- rText = ScGlobal::GetRscString(STR_PROTECTION)
+ rText = ScResId(STR_PROTECTION)
+ ": "
+ (bProtection ? aStrYes : aStrNo)
+ ", "
- + ScGlobal::GetRscString(STR_FORMULAS)
+ + ScResId(STR_FORMULAS)
+ ": "
+ (!bHideFormula ? aStrYes : aStrNo)
+ ", "
- + ScGlobal::GetRscString(STR_HIDE)
+ + ScResId(STR_HIDE)
+ ": "
+ (bHideCell ? aStrYes : aStrNo)
+ ", "
- + ScGlobal::GetRscString(STR_PRINT)
+ + ScResId(STR_PRINT)
+ ": "
+ (!bHidePrint ? aStrYes : aStrNo);
break;
@@ -530,15 +531,15 @@ bool ScViewObjectModeItem::GetPresentation
switch( Which() )
{
case SID_SCATTR_PAGE_CHARTS:
- rText = ScGlobal::GetRscString(STR_VOBJ_CHART) + aDel;
+ rText = ScResId(STR_VOBJ_CHART) + aDel;
break;
case SID_SCATTR_PAGE_OBJECTS:
- rText = ScGlobal::GetRscString(STR_VOBJ_OBJECT) + aDel;
+ rText = ScResId(STR_VOBJ_OBJECT) + aDel;
break;
case SID_SCATTR_PAGE_DRAWINGS:
- rText = ScGlobal::GetRscString(STR_VOBJ_DRAWINGS) + aDel;
+ rText = ScResId(STR_VOBJ_DRAWINGS) + aDel;
break;
default: break;
@@ -546,9 +547,9 @@ bool ScViewObjectModeItem::GetPresentation
SAL_FALLTHROUGH;
case SfxItemPresentation::Nameless:
if (GetValue() == VOBJ_MODE_SHOW)
- rText += ScGlobal::GetRscString(STR_VOBJ_MODE_SHOW);
+ rText += ScResId(STR_VOBJ_MODE_SHOW);
else
- rText += ScGlobal::GetRscString(STR_VOBJ_MODE_HIDE);
+ rText += ScResId(STR_VOBJ_MODE_HIDE);
return true;
break;
@@ -641,11 +642,11 @@ void lclAppendScalePageCount( OUString& rText, sal_uInt16 nPages )
rText += ": ";
if( nPages )
{
- OUString aPages( ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALE_PAGES ) );
+ OUString aPages( ScResId( STR_SCATTR_PAGE_SCALE_PAGES ) );
rText += aPages.replaceFirst( "%1", OUString::number( nPages ) );
}
else
- rText += ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALE_AUTO );
+ rText += ScResId( STR_SCATTR_PAGE_SCALE_AUTO );
}
} // namespace
@@ -656,10 +657,10 @@ bool ScPageScaleToItem::GetPresentation(
if( !IsValid())
return false;
- OUString aName( ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALETO ) );
- OUString aValue( ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALE_WIDTH ) );
+ OUString aName( ScResId( STR_SCATTR_PAGE_SCALETO ) );
+ OUString aValue( ScResId( STR_SCATTR_PAGE_SCALE_WIDTH ) );
lclAppendScalePageCount( aValue, mnWidth );
- aValue = aValue + ", " + ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALE_HEIGHT );
+ aValue = aValue + ", " + ScResId( STR_SCATTR_PAGE_SCALE_HEIGHT );
lclAppendScalePageCount( aValue, mnHeight );
switch( ePres )
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 0c74233f4c90..374a4914d7b8 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -35,6 +35,7 @@
#include <queryparam.hxx>
#include <queryentry.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <editutil.hxx>
#include <cellvalue.hxx>
#include <scmatrix.hxx>
@@ -2569,7 +2570,7 @@ void ScDocRowHeightUpdater::update()
}
}
- ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount, true);
+ ScProgress aProgress(mrDoc.GetDocumentShell(), ScResId(STR_PROGRESS_HEIGHTING), nCellCount, true);
Fraction aZoom(1, 1);
itr = mpTabRangesArray->begin();
@@ -2607,7 +2608,7 @@ void ScDocRowHeightUpdater::updateAll()
nCellCount += mrDoc.maTabs[nTab]->GetWeightedCount();
}
- ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount, true);
+ ScProgress aProgress(mrDoc.GetDocumentShell(), ScResId(STR_PROGRESS_HEIGHTING), nCellCount, true);
Fraction aZoom(1, 1);
sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev);
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 76e527683d8a..587f666116ad 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -72,6 +72,7 @@
#include <attrib.hxx>
#include <patattr.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <document.hxx>
#include <sc.hrc>
@@ -270,7 +271,7 @@ ScDocumentPool::ScDocumentPool()
// TODO: Write additional method ScGlobal::IsInit() or somesuch
// or detect whether this is the Secondary Pool for a MessagePool
if ( ScGlobal::GetEmptyBrushItem() )
- mvPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( std::move(pSet), ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
+ mvPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( std::move(pSet), ScResId(STR_STYLENAME_STANDARD) );
else
mvPoolDefaults[ ATTR_PATTERN - ATTR_STARTINDEX ] = new ScPatternAttr( std::move(pSet), STRING_STANDARD ); // FIXME: without name?
@@ -479,42 +480,42 @@ bool ScDocumentPool::GetPresentation(
const IntlWrapper& rIntl ) const
{
sal_uInt16 nW = rItem.Which();
- OUString aStrYes ( ScGlobal::GetRscString(STR_YES) );
- OUString aStrNo ( ScGlobal::GetRscString(STR_NO) );
+ OUString aStrYes ( ScResId(STR_YES) );
+ OUString aStrNo ( ScResId(STR_NO) );
OUString aStrSep(": ");
bool ePresentationRet = true;
switch( nW )
{
case ATTR_PAGE_TOPDOWN:
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_PRINTDIR) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_PRINTDIR) + aStrSep;
rText += static_cast<const SfxBoolItem&>(rItem).GetValue() ?
- ScGlobal::GetRscString(STR_SCATTR_PAGE_TOPDOWN) :
- ScGlobal::GetRscString(STR_SCATTR_PAGE_LEFTRIGHT) ;
+ ScResId(STR_SCATTR_PAGE_TOPDOWN) :
+ ScResId(STR_SCATTR_PAGE_LEFTRIGHT) ;
break;
case ATTR_PAGE_HEADERS:
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_HEADERS) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_HEADERS) + aStrSep;
rText += static_cast<const SfxBoolItem&>(rItem).GetValue() ? aStrYes : aStrNo ;
break;
case ATTR_PAGE_NULLVALS:
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_NULLVALS) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_NULLVALS) + aStrSep;
rText += static_cast<const SfxBoolItem&>(rItem).GetValue() ? aStrYes : aStrNo ;
break;
case ATTR_PAGE_FORMULAS:
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_FORMULAS) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_FORMULAS) + aStrSep;
rText += static_cast<const SfxBoolItem&>(rItem).GetValue() ? aStrYes : aStrNo ;
break;
case ATTR_PAGE_NOTES:
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_NOTES) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_NOTES) + aStrSep;
rText += static_cast<const SfxBoolItem&>(rItem).GetValue() ? aStrYes : aStrNo ;
break;
case ATTR_PAGE_GRID:
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_GRID) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_GRID) + aStrSep;
rText += static_cast<const SfxBoolItem&>(rItem).GetValue() ? aStrYes : aStrNo ;
break;
@@ -524,8 +525,8 @@ bool ScDocumentPool::GetPresentation(
if( nPagNo )
{
- rText = ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALETOPAGES ) + aStrSep;
- OUString aPages( ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALE_PAGES ) );
+ rText = ScResId( STR_SCATTR_PAGE_SCALETOPAGES ) + aStrSep;
+ OUString aPages( ScResId( STR_SCATTR_PAGE_SCALE_PAGES ) );
aPages = aPages.replaceFirst( "%1", OUString::number( nPagNo ) );
rText += aPages;
}
@@ -542,7 +543,7 @@ bool ScDocumentPool::GetPresentation(
if( nPagNo )
{
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_FIRSTPAGENO) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_FIRSTPAGENO) + aStrSep;
rText += OUString::number( nPagNo );
}
else
@@ -558,7 +559,7 @@ bool ScDocumentPool::GetPresentation(
if( nPercent )
{
- rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_SCALE) + aStrSep;
+ rText = ScResId(STR_SCATTR_PAGE_SCALE) + aStrSep;
rText = rText + unicode::formatPercent(nPercent,
Application::GetSettings().GetUILanguageTag());
}
@@ -575,7 +576,7 @@ bool ScDocumentPool::GetPresentation(
if( lcl_HFPresentation( rItem, GetMetric( nW ), ePresentationMetric, aBuffer, rIntl ) )
{
- rText = ScGlobal::GetRscString(STR_HEADER) + " ( " + aBuffer + " ) ";
+ rText = ScResId(STR_HEADER) + " ( " + aBuffer + " ) ";
}
}
break;
@@ -586,7 +587,7 @@ bool ScDocumentPool::GetPresentation(
if( lcl_HFPresentation( rItem, GetMetric( nW ), ePresentationMetric, aBuffer, rIntl ) )
{
- rText = ScGlobal::GetRscString(STR_FOOTER) + " ( " + aBuffer + " ) ";
+ rText = ScResId(STR_FOOTER) + " ( " + aBuffer + " ) ";
}
}
break;
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 58f7c82aedc1..3c1dab1ff103 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -25,6 +25,7 @@
#include <document.hxx>
#include <table.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <subtotal.hxx>
#include <docoptio.hxx>
#include <interpre.hxx>
@@ -1191,7 +1192,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
OUString aTabName;
GetName( nThisTab, aTabName );
- OUString aTemplate = ScGlobal::GetRscString(STR_PROGRESS_COMPARING);
+ OUString aTemplate = ScResId(STR_PROGRESS_COMPARING);
sal_Int32 nIndex = 0;
OUStringBuffer aProText = aTemplate.getToken( 0, '#', nIndex );
aProText.append(aTabName);
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index eca15e8b9c32..53866ade7701 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -340,7 +340,7 @@ bool ScDocument::RemovePageStyleInUse( const OUString& rStyle )
if ( maTabs[i]->GetPageStyle() == rStyle )
{
bWasInUse = true;
- maTabs[i]->SetPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
+ maTabs[i]->SetPageStyle( ScResId(STR_STYLENAME_STANDARD) );
}
return bWasInUse;
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 98fc873f04eb..f57c7d984559 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -59,6 +59,7 @@
#include <stlpool.hxx>
#include <stlsheet.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <rechead.hxx>
#include <dbdata.hxx>
#include <pivot.hxx>
@@ -3966,7 +3967,7 @@ void ScDocument::CompileXML()
{
bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false );
- ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(
+ ScProgress aProgress( GetDocumentShell(), ScResId(
STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount(), true );
sc::CompileFormulaContext aCxt(this);
@@ -4275,7 +4276,7 @@ void ScDocument::UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkDa
if ( maTabs[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) )
nCellCount += maTabs[nTab]->GetWeightedCount();
- ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount, true );
+ ScProgress aProgress( GetDocumentShell(), ScResId(STR_PROGRESS_HEIGHTING), nCellCount, true );
sal_uLong nProgressStart = 0;
for ( SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()); nTab++ )
@@ -4939,7 +4940,7 @@ void ScDocument::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool b
(*it)->StyleSheetChanged
( pStyleSheet, bRemoved, pDev, nPPTX, nPPTY, rZoomX, rZoomY );
- if ( pStyleSheet && pStyleSheet->GetName() == ScGlobal::GetRscString(STR_STYLENAME_STANDARD) )
+ if ( pStyleSheet && pStyleSheet->GetName() == ScResId(STR_STYLENAME_STANDARD) )
{
// update attributes for all note objects
ScDetectiveFunc::UpdateAllComments( *this );
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 4ee0035d5fcb..6d8a1e12df6b 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -25,6 +25,7 @@
#include <dpglobal.hxx>
#include <dpobject.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <docoptio.hxx>
#include <dpitemdata.hxx>
#include <dputil.hxx>
@@ -136,7 +137,7 @@ OUString createLabelString( const ScDocument* pDoc, SCCOL nCol, const ScRefCellV
{
// Replace an empty label string with column name.
OUStringBuffer aBuf;
- aBuf.append(ScGlobal::GetRscString(STR_COLUMN));
+ aBuf.append(ScResId(STR_COLUMN));
aBuf.append(' ');
ScAddress aColAddr(nCol, 0, 0);
@@ -349,7 +350,7 @@ public:
std::vector<OUString> normalizeLabels( const std::vector<InitColumnData>& rColData )
{
- std::vector<OUString> aLabels(1u, ScGlobal::GetRscString(STR_PIVOT_DATA));
+ std::vector<OUString> aLabels(1u, ScResId(STR_PIVOT_DATA));
LabelSet aExistingNames;
@@ -962,7 +963,7 @@ void ScDPCache::AddLabel(const OUString& rLabel)
{
if ( maLabelNames.empty() )
- maLabelNames.push_back(ScGlobal::GetRscString(STR_PIVOT_DATA));
+ maLabelNames.push_back(ScResId(STR_PIVOT_DATA));
//reset name if needed
LabelSet aExistingNames;
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 18581a5e94e4..f375e0bcb27c 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -32,6 +32,7 @@
#include <global.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
using namespace com::sun::star;
@@ -828,13 +829,13 @@ OUString ScDPDimensionSaveData::CreateDateGroupDimName(
OUString aPartName;
switch( nDatePart )
{
- case SECONDS: aPartName = ScGlobal::GetRscString(aDatePartIds[0]); break;
- case MINUTES: aPartName = ScGlobal::GetRscString(aDatePartIds[1]); break;
- case HOURS: aPartName = ScGlobal::GetRscString(aDatePartIds[2]); break;
- case DAYS: aPartName = ScGlobal::GetRscString(aDatePartIds[3]); break;
- case MONTHS: aPartName = ScGlobal::GetRscString(aDatePartIds[4]); break;
- case QUARTERS: aPartName = ScGlobal::GetRscString(aDatePartIds[5]); break;
- case YEARS: aPartName = ScGlobal::GetRscString(aDatePartIds[6]); break;
+ case SECONDS: aPartName = ScResId(aDatePartIds[0]); break;
+ case MINUTES: aPartName = ScResId(aDatePartIds[1]); break;
+ case HOURS: aPartName = ScResId(aDatePartIds[2]); break;
+ case DAYS: aPartName = ScResId(aDatePartIds[3]); break;
+ case MONTHS: aPartName = ScResId(aDatePartIds[4]); break;
+ case QUARTERS: aPartName = ScResId(aDatePartIds[5]); break;
+ case YEARS: aPartName = ScResId(aDatePartIds[6]); break;
}
OSL_ENSURE(!aPartName.isEmpty(), "ScDPDimensionSaveData::CreateDateGroupDimName - invalid date part");
return CreateGroupDimName( aPartName, rObject, bAllowSource, pDeletedNames );
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index ee3f6d227aae..3b15dd30d616 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -289,7 +289,7 @@ void lcl_SetStyleById(ScDocument* pDoc, SCTAB nTab,
return;
}
- OUString aStyleName = ScGlobal::GetRscString(pStrId);
+ OUString aStyleName = ScResId(pStrId);
ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SfxStyleFamily::Para ) );
if (!pStyle)
@@ -298,7 +298,7 @@ void lcl_SetStyleById(ScDocument* pDoc, SCTAB nTab,
pStyle = static_cast<ScStyleSheet*>( &pStlPool->Make( aStyleName, SfxStyleFamily::Para,
SfxStyleSearchBits::UserDefined ) );
- pStyle->SetParent( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
+ pStyle->SetParent( ScResId(STR_STYLENAME_STANDARD) );
SfxItemSet& rSet = pStyle->GetItemSet();
if (strcmp(pStrId, STR_PIVOT_STYLENAME_RESULT) == 0 || strcmp(pStrId, STR_PIVOT_STYLENAME_TITLE) == 0){
rSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT ) );
@@ -843,7 +843,7 @@ void ScDPOutput::FieldCell(
static void lcl_DoFilterButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
- pDoc->SetString( nCol, nRow, nTab, ScGlobal::GetRscString(STR_CELL_FILTER) );
+ pDoc->SetString( nCol, nRow, nTab, ScResId(STR_CELL_FILTER) );
pDoc->ApplyFlagsTab(nCol, nRow, nCol, nRow, nTab, ScMF::Button);
}
@@ -978,7 +978,7 @@ void ScDPOutput::Output()
if (n == 1)
{
if (rRes[0].Caption.isEmpty())
- aPageValue = ScGlobal::GetRscString(STR_EMPTYDATA);
+ aPageValue = ScResId(STR_EMPTYDATA);
else
aPageValue = rRes[0].Caption;
}
@@ -1530,7 +1530,7 @@ OUString lcl_GetDataFieldName( const OUString& rSourceName, sal_Int16 eFunc )
if (!pStrId)
return OUString();
- OUStringBuffer aRet(ScGlobal::GetRscString(pStrId));
+ OUStringBuffer aRet(ScResId(pStrId));
aRet.append(" - ");
aRet.append(rSourceName);
return aRet.makeStringAndClear();
diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx
index 879be275d2d9..30fc1c6ca609 100644
--- a/sc/source/core/data/dpsdbtab.cxx
+++ b/sc/source/core/data/dpsdbtab.cxx
@@ -20,6 +20,7 @@
#include <dpsdbtab.hxx>
#include <global.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <dpfilteredcache.hxx>
#include <dptabres.hxx>
#include <document.hxx>
@@ -90,7 +91,7 @@ OUString ScDatabaseDPData::getDimensionName(long nColumn)
{
//TODO: different internal and display names?
//return "Data";
- return ScGlobal::GetRscString(STR_PIVOT_DATA);
+ return ScResId(STR_PIVOT_DATA);
}
CreateCacheTable();
diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx
index 6b3edc87a034..8074a7abf536 100644
--- a/sc/source/core/data/dpshttab.cxx
+++ b/sc/source/core/data/dpshttab.cxx
@@ -26,6 +26,7 @@
#include <dpfilteredcache.hxx>
#include <dpobject.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <rangenam.hxx>
#include <queryentry.hxx>
@@ -86,7 +87,7 @@ OUString ScSheetDPData::getDimensionName(long nColumn)
{
//TODO: different internal and display names?
//return "Data";
- return ScGlobal::GetRscString(STR_PIVOT_DATA);
+ return ScResId(STR_PIVOT_DATA);
}
else if (nColumn >= aCacheTable.getColSize())
{
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 27447785f0d2..c309a350bf59 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -24,6 +24,7 @@
#include <global.hxx>
#include <subtotal.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <dpitemdata.hxx>
#include <generalfunction.hxx>
@@ -780,7 +781,7 @@ void ScDPResultData::SetMeasureData(
maMeasureNames.swap(rNames);
if (maMeasureNames.empty())
- maMeasureNames.push_back(ScGlobal::GetRscString(STR_EMPTYDATA));
+ maMeasureNames.push_back(ScResId(STR_EMPTYDATA));
}
void ScDPResultData::SetDataLayoutOrientation( sheet::DataPilotFieldOrientation nOrient )
@@ -839,10 +840,10 @@ OUString ScDPResultData::GetMeasureString(long nMeasure, bool bForce, ScSubTotal
// display only function name
assert(unsigned(eForceFunc) < SAL_N_ELEMENTS(aFuncStrIds));
if ( eForceFunc != SUBTOTAL_FUNC_NONE )
- return ScGlobal::GetRscString(aFuncStrIds[eForceFunc]);
+ return ScResId(aFuncStrIds[eForceFunc]);
rbTotalResult = true;
- return ScGlobal::GetRscString(STR_TABLE_ERGEBNIS);
+ return ScResId(STR_TABLE_ERGEBNIS);
}
else
{
@@ -976,7 +977,7 @@ OUString ScDPResultMember::GetName() const
if (pMemberDesc)
return pMemberDesc->GetNameStr( false );
else
- return ScGlobal::GetRscString(STR_PIVOT_TOTAL); // root member
+ return ScResId(STR_PIVOT_TOTAL); // root member
}
OUString ScDPResultMember::GetDisplayName( bool bLocaleIndependent ) const
@@ -1000,7 +1001,7 @@ ScDPItemData ScDPResultMember::FillItemData() const
const ScDPMember* pMemberDesc = GetDPMember();
if (pMemberDesc)
return pMemberDesc->FillItemData();
- return ScDPItemData(ScGlobal::GetRscString(STR_PIVOT_TOTAL)); // root member
+ return ScDPItemData(ScResId(STR_PIVOT_TOTAL)); // root member
}
bool ScDPResultMember::IsNamedItem( SCROW nIndex ) const
@@ -1387,7 +1388,7 @@ void ScDPResultMember::FillMemberResults(
if ( pMemberCaption ) // use pMemberCaption if != NULL
aCaption = *pMemberCaption;
if (aCaption.isEmpty())
- aCaption = ScGlobal::GetRscString(STR_EMPTYDATA);
+ aCaption = ScResId(STR_EMPTYDATA);
if (bIsNumeric)
pArray[rPos].Flags |= sheet::MemberResultFlags::NUMERIC;
diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx
index 314504ee59d0..6afdc101a006 100644
--- a/sc/source/core/data/dputil.cxx
+++ b/sc/source/core/data/dputil.cxx
@@ -12,6 +12,7 @@
#include <dpnumgroupinfo.hxx>
#include <globalnames.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <generalfunction.hxx>
#include <comphelper/string.hxx>
@@ -394,7 +395,7 @@ OUString ScDPUtil::getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc
const char* pId = aFuncStrIds[eFunc];
if (pId)
{
- aRet.append(ScGlobal::GetRscString(pId)); // function name
+ aRet.append(ScResId(pId)); // function name
aRet.append(" - ");
}
aRet.append(rName); // field name
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 3b12893cf618..d8c4069c135c 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -65,6 +65,7 @@
#include <userdat.hxx>
#include <markdata.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <scmod.hxx>
#include <chartarr.hxx>
#include <postit.hxx>
@@ -1881,7 +1882,7 @@ SdrObject* ScDrawLayer::GetNamedObject( const OUString& rName, sal_uInt16 nId, S
OUString ScDrawLayer::GetNewGraphicName( long* pnCounter ) const
{
- OUString aBase = ScGlobal::GetRscString(STR_GRAPHICNAME) + " ";
+ OUString aBase = ScResId(STR_GRAPHICNAME) + " ";
bool bThere = true;
OUString aGraphicName;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index e0ba7f7995f4..432b4ae2d468 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -344,9 +344,9 @@ OUString ScGlobal::GetErrorString(FormulaError nErr)
case FormulaError::IllegalFPOperation:
return ScCompiler::GetNativeSymbol(ocErrNum);
default:
- return GetRscString(STR_ERROR_STR) + OUString::number( static_cast<int>(nErr) );
+ return ScResId(STR_ERROR_STR) + OUString::number( static_cast<int>(nErr) );
}
- return GetRscString(pErrNumber);
+ return ScResId(pErrNumber);
}
OUString ScGlobal::GetLongErrorString(FormulaError nErr)
@@ -433,7 +433,7 @@ OUString ScGlobal::GetLongErrorString(FormulaError nErr)
pErrNumber = STR_ERROR_STR;
break;
}
- return GetRscString(pErrNumber);
+ return ScResId(pErrNumber);
}
SvxBrushItem* ScGlobal::GetButtonBrushItem()
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index d8989b6245f7..70070fa52ac4 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -60,6 +60,7 @@
#include <document.hxx>
#include <global.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <conditio.hxx>
#include <validat.hxx>
#include <scmod.hxx>
@@ -980,7 +981,7 @@ static SfxStyleSheetBase* lcl_CopyStyleToPool
// if necessary create derivative Styles, if not available:
- if ( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != aStrParent &&
+ if ( ScResId(STR_STYLENAME_STANDARD) != aStrParent &&
aStrSrcStyle != aStrParent &&
!pDestPool->Find( aStrParent, eFamily ) )
{
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 51cad3874aa2..416c758eb5b7 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -49,6 +49,7 @@
#include <attrib.hxx>
#include <global.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <document.hxx>
#include <docpool.hxx>
#include <stlpool.hxx>
@@ -90,7 +91,7 @@ SfxStyleSheetBase& ScStyleSheetPool::Make( const OUString& rName,
sal_uInt32 nCount = GetIndexedStyleSheets().GetNumberOfStyleSheets();
for ( sal_uInt32 nAdd = 1; nAdd <= nCount; nAdd++ )
{
- OUString aNewName = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
+ OUString aNewName = ScResId(STR_STYLENAME_STANDARD);
aNewName += OUString::number( nAdd );
if ( Find( aNewName, eFam ) == nullptr )
return SfxStyleSheetPool::Make(aNewName, eFam, mask);
@@ -104,8 +105,8 @@ SfxStyleSheetBase* ScStyleSheetPool::Create( const OUString& rName,
SfxStyleSearchBits nMaskP )
{
ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
- if ( eFamily == SfxStyleFamily::Para && ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != rName )
- pSheet->SetParent( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
+ if ( eFamily == SfxStyleFamily::Para && ScResId(STR_STYLENAME_STANDARD) != rName )
+ pSheet->SetParent( ScResId(STR_STYLENAME_STANDARD) );
return pSheet;
}
@@ -184,7 +185,7 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
// Standard templates
-#define SCSTR(id) ScGlobal::GetRscString(id)
+#define SCSTR(id) ScResId(id)
void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool )
{
@@ -232,7 +233,7 @@ void ScStyleSheetPool::CreateStandardStyles()
SvxBoxItem aBoxItem ( ATTR_BORDER );
SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER );
- OUString aStrStandard = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
+ OUString aStrStandard = ScResId(STR_STYLENAME_STANDARD);
// Cell format templates:
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index a7b12c444878..d9a42eb06778 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -41,6 +41,7 @@
#include <vcl/svapp.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <sc.hrc>
#include <helpids.h>
@@ -285,7 +286,7 @@ void ScStyleSheet::Notify( SfxBroadcaster&, const SfxHint& rHint )
bool ScStyleSheet::SetName(const OUString& rNew, bool bReindexNow)
{
OUString aFileStdName = STRING_STANDARD;
- if ( rNew == aFileStdName && aFileStdName != ScGlobal::GetRscString(STR_STYLENAME_STANDARD) )
+ if ( rNew == aFileStdName && aFileStdName != ScResId(STR_STYLENAME_STANDARD) )
return false;
else
return SfxStyleSheet::SetName(rNew, bReindexNow);
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 17f3b037166d..adaf36c92ceb 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -33,6 +33,7 @@
#include <stlsheet.hxx>
#include <global.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <refupdat.hxx>
#include <markdata.hxx>
#include <progress.hxx>
@@ -75,7 +76,7 @@ ScProgress* GetProgressBar(
if (nCount > 1)
return new ScProgress(
- pDoc->GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nTotalCount, true);
+ pDoc->GetDocumentShell(), ScResId(STR_PROGRESS_HEIGHTING), nTotalCount, true);
return nullptr;
}
@@ -240,7 +241,7 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const OUString& rNewName,
aCodeName( rNewName ),
nLinkRefreshDelay( 0 ),
nLinkMode( ScLinkMode::NONE ),
- aPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ),
+ aPageStyle( ScResId(STR_STYLENAME_STANDARD) ),
nRepeatStartX( SCCOL_REPEAT_NONE ),
nRepeatEndX( SCCOL_REPEAT_NONE ),
nRepeatStartY( SCROW_REPEAT_NONE ),
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 51b13475abf8..19f8af3ff5d1 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -35,6 +35,7 @@
#include <formulacell.hxx>
#include <document.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <stlpool.hxx>
#include <compiler.hxx>
@@ -2019,7 +2020,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
//TODO: sort?
ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(pDocument->GetStyleSheetPool()->Find(
- ScGlobal::GetRscString(STR_STYLENAME_RESULT), SfxStyleFamily::Para ));
+ ScResId(STR_STYLENAME_RESULT), SfxStyleFamily::Para ));
bool bSpaceLeft = true; // Success when inserting?
@@ -2118,12 +2119,12 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
aOutString = aSubString;
if (aOutString.isEmpty())
- aOutString = ScGlobal::GetRscString( STR_EMPTYDATA );
+ aOutString = ScResId( STR_EMPTYDATA );
aOutString += " ";
const char* pStrId = STR_TABLE_ERGEBNIS;
if ( nResCount == 1 )
pStrId = lcl_GetSubTotalStrId(pResFunc[0]);
- aOutString += ScGlobal::GetRscString(pStrId);
+ aOutString += ScResId(pStrId);
SetString( nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, nTab, aOutString );
ApplyStyle( nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, pStyle );
@@ -2192,9 +2193,9 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
DBShowRow(aRowEntry.nDestRow, true);
// insert label
- OUString label = ScGlobal::GetRscString(STR_TABLE_GRAND);
+ OUString label = ScResId(STR_TABLE_GRAND);
label += " ";
- label += ScGlobal::GetRscString(lcl_GetSubTotalStrId(pResFunc[0]));
+ label += ScResId(lcl_GetSubTotalStrId(pResFunc[0]));
SetString(nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, nTab, label);
ApplyStyle(nGroupCol[aRowEntry.nGroupNo], aRowEntry.nDestRow, pStyle);
}
@@ -3274,12 +3275,12 @@ bool ScTable::CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2
if (nIndex > 0)
{
GetUpperCellString(nCol1, nRow, 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/data/table5.cxx b/sc/source/core/data/table5.cxx
index 85f62b7ecc87..7f5c3f678fa9 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -35,6 +35,7 @@
#include <brdcst.hxx>
#include <tabprotection.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <segmenttree.hxx>
#include <columniterator.hxx>
#include <globalnames.hxx>
@@ -1133,7 +1134,7 @@ void ScTable::SetPageStyle( const OUString& rName )
if ( !pNewStyle )
{
- aStrNew = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
+ aStrNew = ScResId(STR_STYLENAME_STANDARD);
pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page );
}
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 49715d9ad26f..01e1fa41ca38 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -41,6 +41,7 @@
#include <patattr.hxx>
#include <rechead.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <rangenam.hxx>
#include <dbdata.hxx>
#include <typedstrdata.hxx>
@@ -252,7 +253,7 @@ bool ScValidationData::DoScript( const ScAddress& rPos, const OUString& rInput,
//TODO: different error message, if found, but not bAllowed ??
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::Ok,
- ScGlobal::GetRscString(STR_VALID_MACRONOTFOUND)));
+ ScResId(STR_VALID_MACRONOTFOUND)));
xBox->run();
}
@@ -358,7 +359,7 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput,
//TODO: different error message, if found, but not bAllowed ??
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::Ok,
- ScGlobal::GetRscString(STR_VALID_MACRONOTFOUND)));
+ ScResId(STR_VALID_MACRONOTFOUND)));
xBox->run();
}
@@ -383,10 +384,10 @@ bool ScValidationData::DoError(weld::Window* pParent, const OUString& rInput,
OUString aTitle = aErrorTitle;
if (aTitle.isEmpty())
- aTitle = ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ); // application title
+ aTitle = ScResId( STR_MSSG_DOSUBTOTALS_0 ); // application title
OUString aMessage = aErrorMessage;
if (aMessage.isEmpty())
- aMessage = ScGlobal::GetRscString( STR_VALID_DEFERROR );
+ aMessage = ScResId( STR_VALID_DEFERROR );
VclButtonsType eStyle = VclButtonsType::Ok;
VclMessageType eType = VclMessageType::Error;
More information about the Libreoffice-commits
mailing list