summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-05-12 19:52:17 +0200
committerJulien Nabet <serval2412@yahoo.fr>2018-05-12 22:53:17 +0200
commitfabbeb7a8d8a5bb7ce030c1871e6ad7cf33d4a07 (patch)
treefea4819276a5e42353b01bae51ca548ad2859d87 /sc/source/filter/excel
parentd2bed9999e4fbd8aae5f9987de10f6112fba6f72 (diff)
Replace ScGlobal::GetRscString with simple ScResId calls
After the gettext migration there is no point to have two APIs for reading the same .mo file. This patch is for sc/source/filter/ for easier review. Change-Id: I77adc446e66623535a9d4c871ac1403e88efff78 Reviewed-on: https://gerrit.libreoffice.org/54183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r--sc/source/filter/excel/impop.cxx3
-rw-r--r--sc/source/filter/excel/xepivot.cxx5
-rw-r--r--sc/source/filter/excel/xestream.cxx3
-rw-r--r--sc/source/filter/excel/xestyle.cxx5
-rw-r--r--sc/source/filter/excel/xiescher.cxx27
-rw-r--r--sc/source/filter/excel/xistyle.cxx7
-rw-r--r--sc/source/filter/excel/xltools.cxx5
7 files changed, 31 insertions, 24 deletions
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 90616ce57d2a..85ebffc50295 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -47,6 +47,7 @@
#include <patattr.hxx>
#include <attrib.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <markdata.hxx>
#include <olinetab.hxx>
@@ -1249,7 +1250,7 @@ void ImportExcel::PostDocLoad()
/* Set automatic page numbering in Default page style (default is "page number = 1").
Otherwise hidden tables (i.e. for scenarios) which have Default page style will
break automatic page numbering. */
- if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Page ) )
+ if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Page ) )
pStyleSheet->GetItemSet().Put( SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 0 ) );
// outlines for all sheets, sets hidden rows and columns (#i11776# after filtered ranges)
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index d763d74ccc89..a47fd26f50e1 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -37,6 +37,7 @@
#include <dpdimsave.hxx>
#include <dpshttab.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <fapihelper.hxx>
#include <xestring.hxx>
#include <xelink.hxx>
@@ -881,7 +882,7 @@ OUString lclGetDataFieldCaption( const OUString& rFieldName, ScGeneralFunction e
default:;
}
if (pResIdx)
- aCaption = ScGlobal::GetRscString(pResIdx) + " - ";
+ aCaption = ScResId(pResIdx) + " - ";
aCaption += rFieldName;
return aCaption;
}
@@ -1308,7 +1309,7 @@ void XclExpPivotTable::SetPropertiesFromDP( const ScDPSaveData& rSaveData )
if (pDim && pDim->GetLayoutName())
maPTInfo.maDataName = *pDim->GetLayoutName();
else
- maPTInfo.maDataName = ScGlobal::GetRscString(STR_PIVOT_DATA);
+ maPTInfo.maDataName = ScResId(STR_PIVOT_DATA);
}
void XclExpPivotTable::SetFieldPropertiesFromDim( const ScDPSaveDimension& rSaveDim )
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 5a1c4a96df8a..1bda7dc820ca 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -43,6 +43,7 @@
#include <tokenstringcontext.hxx>
#include <refreshtimerprotector.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <docsh.hxx>
#include <viewdata.hxx>
@@ -1043,7 +1044,7 @@ bool XclExpXmlStream::exportDocument()
uno::Reference<task::XStatusIndicator> xStatusIndicator = getStatusIndicator();
if (xStatusIndicator.is())
- xStatusIndicator->start(ScGlobal::GetRscString(STR_SAVE_DOC), 100);
+ xStatusIndicator->start(ScResId(STR_SAVE_DOC), 100);
// NOTE: Don't use SotStorage or SvStream any more, and never call
// SfxMedium::GetOutStream() anywhere in the xlsx export filter code!
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 169d0d77de5e..746cad084b16 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -50,6 +50,7 @@
#include <patattr.hxx>
#include <attrib.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <xestring.hxx>
#include <conditio.hxx>
@@ -2057,7 +2058,7 @@ XclExpXF::XclExpXF( const XclExpRoot& rRoot, const SfxStyleSheetBase& rStyleShee
XclExpRoot( rRoot ),
mnParentXFId( XclExpXFBuffer::GetXFIdFromIndex( EXC_XF_STYLEPARENT ) )
{
- bool bDefStyle = (rStyleSheet.GetName() == ScGlobal::GetRscString( STR_STYLENAME_STANDARD ));
+ bool bDefStyle = (rStyleSheet.GetName() == ScResId( STR_STYLENAME_STANDARD ));
sal_Int16 nScript = bDefStyle ? GetDefApiScript() : css::i18n::ScriptType::WEAK;
Init( const_cast< SfxStyleSheetBase& >( rStyleSheet ).GetItemSet(), nScript,
NUMBERFORMAT_ENTRY_NOT_FOUND, EXC_FONT_NOTFOUND, false, bDefStyle );
@@ -2890,7 +2891,7 @@ void XclExpXFBuffer::InsertDefaultRecords()
maFills.push_back( lcl_GetPatternFill_Gray125() );
// index 0: default style
- if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) )
+ if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) )
{
XclExpXFRef xDefStyle( new XclExpXF( GetRoot(), *pDefStyleSheet ) );
sal_uInt32 nXFId = AppendBuiltInXFWithStyle( xDefStyle, EXC_STYLE_NORMAL );
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 9e2db5f9b04c..b530e8705f7c 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -92,6 +92,7 @@
#include <convuno.hxx>
#include <postit.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <fprogressbar.hxx>
#include <xltracer.hxx>
@@ -4235,27 +4236,27 @@ XclImpObjectManager::XclImpObjectManager( const XclImpRoot& rRoot ) :
XclImpRoot( rRoot )
{
maDefObjNames[ EXC_OBJTYPE_GROUP ] = "Group";
- maDefObjNames[ EXC_OBJTYPE_LINE ] = ScGlobal::GetRscString( STR_SHAPE_LINE );
- maDefObjNames[ EXC_OBJTYPE_RECTANGLE ] = ScGlobal::GetRscString( STR_SHAPE_RECTANGLE );
- maDefObjNames[ EXC_OBJTYPE_OVAL ] = ScGlobal::GetRscString( STR_SHAPE_OVAL );
+ maDefObjNames[ EXC_OBJTYPE_LINE ] = ScResId( STR_SHAPE_LINE );
+ maDefObjNames[ EXC_OBJTYPE_RECTANGLE ] = ScResId( STR_SHAPE_RECTANGLE );
+ maDefObjNames[ EXC_OBJTYPE_OVAL ] = ScResId( STR_SHAPE_OVAL );
maDefObjNames[ EXC_OBJTYPE_ARC ] = "Arc";
maDefObjNames[ EXC_OBJTYPE_CHART ] = "Chart";
maDefObjNames[ EXC_OBJTYPE_TEXT ] = "Text";
- maDefObjNames[ EXC_OBJTYPE_BUTTON ] = ScGlobal::GetRscString( STR_FORM_BUTTON );
+ maDefObjNames[ EXC_OBJTYPE_BUTTON ] = ScResId( STR_FORM_BUTTON );
maDefObjNames[ EXC_OBJTYPE_PICTURE ] = "Picture";
maDefObjNames[ EXC_OBJTYPE_POLYGON ] = "Freeform";
- maDefObjNames[ EXC_OBJTYPE_CHECKBOX ] = ScGlobal::GetRscString( STR_FORM_CHECKBOX );
- maDefObjNames[ EXC_OBJTYPE_OPTIONBUTTON ] = ScGlobal::GetRscString( STR_FORM_OPTIONBUTTON );
+ maDefObjNames[ EXC_OBJTYPE_CHECKBOX ] = ScResId( STR_FORM_CHECKBOX );
+ maDefObjNames[ EXC_OBJTYPE_OPTIONBUTTON ] = ScResId( STR_FORM_OPTIONBUTTON );
maDefObjNames[ EXC_OBJTYPE_EDIT ] = "Edit Box";
- maDefObjNames[ EXC_OBJTYPE_LABEL ] = ScGlobal::GetRscString( STR_FORM_LABEL );
+ maDefObjNames[ EXC_OBJTYPE_LABEL ] = ScResId( STR_FORM_LABEL );
maDefObjNames[ EXC_OBJTYPE_DIALOG ] = "Dialog Frame";
- maDefObjNames[ EXC_OBJTYPE_SPIN ] = ScGlobal::GetRscString( STR_FORM_SPINNER );
- maDefObjNames[ EXC_OBJTYPE_SCROLLBAR ] = ScGlobal::GetRscString( STR_FORM_SCROLLBAR );
- maDefObjNames[ EXC_OBJTYPE_LISTBOX ] = ScGlobal::GetRscString( STR_FORM_LISTBOX );
- maDefObjNames[ EXC_OBJTYPE_GROUPBOX ] = ScGlobal::GetRscString( STR_FORM_GROUPBOX );
- maDefObjNames[ EXC_OBJTYPE_DROPDOWN ] = ScGlobal::GetRscString( STR_FORM_DROPDOWN );
+ maDefObjNames[ EXC_OBJTYPE_SPIN ] = ScResId( STR_FORM_SPINNER );
+ maDefObjNames[ EXC_OBJTYPE_SCROLLBAR ] = ScResId( STR_FORM_SCROLLBAR );
+ maDefObjNames[ EXC_OBJTYPE_LISTBOX ] = ScResId( STR_FORM_LISTBOX );
+ maDefObjNames[ EXC_OBJTYPE_GROUPBOX ] = ScResId( STR_FORM_GROUPBOX );
+ maDefObjNames[ EXC_OBJTYPE_DROPDOWN ] = ScResId( STR_FORM_DROPDOWN );
maDefObjNames[ EXC_OBJTYPE_NOTE ] = "Comment";
- maDefObjNames[ EXC_OBJTYPE_DRAWING ] = ScGlobal::GetRscString( STR_SHAPE_AUTOSHAPE );
+ maDefObjNames[ EXC_OBJTYPE_DRAWING ] = ScResId( STR_SHAPE_AUTOSHAPE );
}
XclImpObjectManager::~XclImpObjectManager()
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 6e357267e12a..07216a81db1f 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -52,6 +52,7 @@
#include <stlsheet.hxx>
#include <formulacell.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <attarray.hxx>
#include <xltracer.hxx>
#include <xistream.hxx>
@@ -1351,7 +1352,7 @@ void XclImpXF::ApplyPatternToAttrVector(
{
ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(
pStylePool->Find(
- ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para));
+ ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para));
if (pStyleSheet)
rPat.SetStyleSheet(pStyleSheet, false);
@@ -1513,7 +1514,7 @@ ScStyleSheet* XclImpStyle::CreateStyleSheet()
if( pXF ) pXF->SetAllUsedFlags( true );
// use existing "Default" style sheet
mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find(
- ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) );
+ ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) );
OSL_ENSURE( mpStyleSheet, "XclImpStyle::CreateStyleSheet - Default style not found" );
bCreatePattern = true;
}
@@ -1614,7 +1615,7 @@ void XclImpXFBuffer::CreateUserStyles()
BIFF4W import filter is never used to import from clipboard... */
bool bReserveAll = (GetBiff() == EXC_BIFF4) && (GetCurrScTab() > 0);
SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SfxStyleFamily::Para );
- OUString aStandardName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
+ OUString aStandardName = ScResId( STR_STYLENAME_STANDARD );
for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
if( (pStyleSheet->GetName() != aStandardName) && (bReserveAll || !pStyleSheet->IsUserDefined()) )
if( aCellStyles.count( pStyleSheet->GetName() ) == 0 )
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 47030af38ddf..7d697c016c03 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -31,6 +31,7 @@
#include <editutil.hxx>
#include <formula/errorcodes.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <xlstyle.hxx>
#include <xlname.hxx>
#include <xistream.hxx>
@@ -531,7 +532,7 @@ OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rNam
if( nStyleId == EXC_STYLE_NORMAL ) // "Normal" becomes "Default" style
{
- aStyleName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
+ aStyleName = ScResId( STR_STYLENAME_STANDARD );
}
else
{
@@ -555,7 +556,7 @@ OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rNam
bool XclTools::IsBuiltInStyleName( const OUString& rStyleName, sal_uInt8* pnStyleId, sal_Int32* pnNextChar )
{
// "Default" becomes "Normal"
- if (rStyleName == ScGlobal::GetRscString(STR_STYLENAME_STANDARD))
+ if (rStyleName == ScResId(STR_STYLENAME_STANDARD))
{
if( pnStyleId ) *pnStyleId = EXC_STYLE_NORMAL;
if( pnNextChar ) *pnNextChar = rStyleName.getLength();