summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-29 08:16:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-29 07:57:34 +0100
commitcaa4c416675f9d5f6e5006b551f8534088c5bdf1 (patch)
tree10a32469761e7b2d2440d45848a6fbfd0489a9bc /sc/source/filter/excel
parent78fbbc77d0e3318c6490470f8050a5b1e3cae28d (diff)
remove XclRoot::GetDocRef
duplicate of GetDoc Change-Id: I4b4d261684cbff4513a797b9b5af76f11737b980 Reviewed-on: https://gerrit.libreoffice.org/81635 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r--sc/source/filter/excel/excimp8.cxx2
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx10
-rw-r--r--sc/source/filter/excel/xeformula.cxx2
-rw-r--r--sc/source/filter/excel/xename.cxx10
-rw-r--r--sc/source/filter/excel/xepivot.cxx2
-rw-r--r--sc/source/filter/excel/xichart.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx8
-rw-r--r--sc/source/filter/excel/xiname.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx4
-rw-r--r--sc/source/filter/excel/xlroot.cxx5
11 files changed, 22 insertions, 27 deletions
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 0f303f8a7637..95d2d0fb94c8 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -738,7 +738,7 @@ void XclImpAutoFilterData::Apply()
// or if we need to create the Advanced Filter.
if( bActive || bCriteria)
{
- ScDocument& rDoc = pExcRoot->pIR->GetDocRef();
+ ScDocument& rDoc = pExcRoot->pIR->GetDoc();
pCurrDBData = new ScDBData(STR_DB_LOCAL_NONAME, Tab(),
StartCol(),StartRow(), EndCol(),EndRow() );
if(bCriteria)
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 0f66e40409de..eab70437bcef 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -891,7 +891,7 @@ sal_uInt16 XclExpChSourceLink::ConvertDataSequence( Reference< XDataSequence > c
// Compile the range representation string into token array. Note that the
// source range text depends on the current grammar.
OUString aRangeRepr = xDataSeq->getSourceRangeRepresentation();
- ScCompiler aComp( &GetDocRef(), ScAddress(), GetDocRef().GetGrammar() );
+ ScCompiler aComp( &GetDoc(), ScAddress(), GetDoc().GetGrammar() );
std::unique_ptr<ScTokenArray> pArray(aComp.CompileString(aRangeRepr));
if( !pArray )
return nDefCount;
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 0e2e3e0ff919..097eabd9f575 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -151,12 +151,12 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
sal_Int32 nCol = 0, nRow = 0;
sal_Int32 nColOff = 0, nRowOff= 0;
- const bool bRTL = rRoot.GetDocRef().IsNegativePage( nTab );
+ const bool bRTL = rRoot.GetDoc().IsNegativePage( nTab );
if (!bRTL)
{
while(true)
{
- tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab );
+ tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
if( r.Left() <= aRect.Left() )
{
nCol++;
@@ -179,7 +179,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
{
while(true)
{
- tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab );
+ tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
if( r.Left() >= aRect.Left() )
{
nCol++;
@@ -202,7 +202,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
{
while(true)
{
- tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab );
+ tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
if( r.Right() < aRect.Right() )
nCol++;
if( r.Bottom() < aRect.Bottom() )
@@ -219,7 +219,7 @@ void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_
{
while(true)
{
- tools::Rectangle r = rRoot.GetDocRef().GetMMRect( nCol,nRow,nCol,nRow,nTab );
+ tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
if( r.Right() >= aRect.Right() )
nCol++;
if( r.Bottom() < aRect.Bottom() )
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index 0068d9bda709..314794dcd426 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -596,7 +596,7 @@ void XclExpFmlaCompImpl::Init( XclFormulaType eType, const ScTokenArray& rScTokA
{
// clone the passed token array, convert references relative to current cell position
mxData->mxOwnScTokArr = rScTokArr.Clone();
- ScCompiler::MoveRelWrap( *mxData->mxOwnScTokArr, &GetDocRef(), *pScBasePos, GetDocRef().MaxCol(), GetDocRef().MaxRow() );
+ ScCompiler::MoveRelWrap( *mxData->mxOwnScTokArr, &GetDoc(), *pScBasePos, GetDoc().MaxCol(), GetDoc().MaxRow() );
// don't remember pScBasePos in mxData->mpScBasePos, shared formulas use real relative refs
}
break;
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 599d001b29b2..1e84fa0e0711 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -304,10 +304,10 @@ OUString XclExpName::GetWithDefaultRangeSeparator( const OUString& rSymbol ) con
// convert with validation
ScRange aRange;
ScAddress::Details detailsXL( ::formula::FormulaGrammar::CONV_XL_A1 );
- ScRefFlags nRes = aRange.Parse( rSymbol.copy(0, nPos), &GetDocRef(), detailsXL );
+ ScRefFlags nRes = aRange.Parse( rSymbol.copy(0, nPos), &GetDoc(), detailsXL );
if ( nRes & ScRefFlags::VALID )
{
- nRes = aRange.Parse( rSymbol.copy(nPos+1), &GetDocRef(), detailsXL );
+ nRes = aRange.Parse( rSymbol.copy(nPos+1), &GetDoc(), detailsXL );
if ( nRes & ScRefFlags::VALID )
{
return rSymbol.replaceFirst(";", ",");
@@ -446,7 +446,7 @@ sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, const
XclExpNameRef xName( new XclExpName( GetRoot(), cBuiltIn ) );
xName->SetTokenArray( xTokArr );
xName->SetLocalTab( aRange.aStart.Tab() );
- OUString sSymbol(aRange.Format(ScRefFlags::RANGE_ABS_3D, &GetDocRef(), ScAddress::Details( ::formula::FormulaGrammar::CONV_XL_A1)));
+ OUString sSymbol(aRange.Format(ScRefFlags::RANGE_ABS_3D, &GetDoc(), ScAddress::Details( ::formula::FormulaGrammar::CONV_XL_A1)));
xName->SetSymbol( sSymbol );
return Append( xName );
}
@@ -457,7 +457,7 @@ sal_uInt16 XclExpNameManagerImpl::InsertBuiltInName( sal_Unicode cBuiltIn, const
xName->SetTokenArray( xTokArr );
xName->SetLocalTab( nScTab );
OUString sSymbol;
- rRangeList.Format( sSymbol, ScRefFlags::RANGE_ABS_3D, &GetDocRef(), ::formula::FormulaGrammar::CONV_XL_A1 );
+ rRangeList.Format( sSymbol, ScRefFlags::RANGE_ABS_3D, &GetDoc(), ::formula::FormulaGrammar::CONV_XL_A1 );
xName->SetSymbol( sSymbol );
return Append( xName );
}
@@ -636,7 +636,7 @@ sal_uInt16 XclExpNameManagerImpl::CreateName( SCTAB nTab, const ScRangeData& rRa
xTokArr = GetFormulaCompiler().CreateFormula(EXC_FMLATYPE_NAME, *pTokenCopy);
if ( GetOutput() != EXC_OUTPUT_BINARY )
{
- ScCompiler aComp(&GetDocRef(), rRangeData.GetPos(), *pTokenCopy,
+ ScCompiler aComp(&GetDoc(), rRangeData.GetPos(), *pTokenCopy,
formula::FormulaGrammar::GRAM_OOXML);
aComp.CreateStringFromTokenArray( sSymbol );
}
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 888759ce702f..6334e0d961f2 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -521,7 +521,7 @@ void XclExpPCField::InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScD
if (!pCache)
return;
- ScSheetDPData aDPData(&GetDocRef(), *pSrcDesc, *pCache);
+ ScSheetDPData aDPData(&GetDoc(), *pSrcDesc, *pCache);
long nDim = GetFieldIndex();
// get the string collection with generated grouping elements
ScDPNumGroupDimension aTmpDim( rNumInfo );
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index c7a1e965c6f1..4c4354233f51 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -833,7 +833,7 @@ Reference< XDataSequence > XclImpChSourceLink::CreateDataSequence( const OUStrin
{
if ( mxTokenArray )
{
- ScCompiler aComp( &GetDocRef(), ScAddress(), *mxTokenArray, GetDoc().GetGrammar() );
+ ScCompiler aComp( &GetDoc(), ScAddress(), *mxTokenArray, GetDoc().GetGrammar() );
OUStringBuffer aRangeRep;
aComp.CreateStringFromTokenArray( aRangeRep );
try
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index f2d3b67dc1a2..3baf8a5d4292 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -651,7 +651,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
if( pTokArr )
{
xTokArr1 = std::move( pTokArr );
- GetDocRef().CheckLinkFormulaNeedingCheck( *xTokArr1);
+ GetDoc().CheckLinkFormulaNeedingCheck( *xTokArr1);
}
}
@@ -665,7 +665,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
if( pTokArr )
{
xTokArr2 = std::move( pTokArr );
- GetDocRef().CheckLinkFormulaNeedingCheck( *xTokArr2);
+ GetDoc().CheckLinkFormulaNeedingCheck( *xTokArr2);
}
}
@@ -675,13 +675,13 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
if( !mxScCondFmt.get() )
{
- mxScCondFmt.reset( new ScConditionalFormat( 0/*nKey*/, &GetDocRef() ) );
+ mxScCondFmt.reset( new ScConditionalFormat( 0/*nKey*/, &GetDoc() ) );
if(maRanges.size() > 1)
maRanges.Join(maRanges[0], true);
mxScCondFmt->SetRange(maRanges);
}
- ScCondFormatEntry* pEntry = new ScCondFormatEntry(eMode, xTokArr1.get(), xTokArr2.get(), &GetDocRef(), aPos, aStyleName);
+ ScCondFormatEntry* pEntry = new ScCondFormatEntry(eMode, xTokArr1.get(), xTokArr2.get(), &GetDoc(), aPos, aStyleName);
mxScCondFmt->AddEntry( pEntry );
++mnCondIndex;
}
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx
index 49885050cff0..427e26983dd6 100644
--- a/sc/source/filter/excel/xiname.cxx
+++ b/sc/source/filter/excel/xiname.cxx
@@ -236,7 +236,7 @@ void XclImpName::ConvertTokens()
void XclImpName::InsertName(const ScTokenArray* pArray)
{
// create the Calc name data
- ScRangeData* pData = new ScRangeData(&GetDocRef(), maScName, *pArray, ScAddress(), meNameType);
+ ScRangeData* pData = new ScRangeData(&GetDoc(), maScName, *pArray, ScAddress(), meNameType);
pData->GuessPosition(); // calculate base position for relative refs
pData->SetIndex( mnNameIndex ); // used as unique identifier in formulas
if (mnXclTab == EXC_NAME_GLOBAL)
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 3661667e6e6d..111811e4c361 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1459,7 +1459,7 @@ void XclImpPivotTable::Convert()
// *** insert into Calc document ***
// create source descriptor
- ScSheetSourceDesc aDesc(&GetDocRef());
+ ScSheetSourceDesc aDesc(&GetDoc());
const OUString& rSrcName = mxPCache->GetSourceRangeName();
if (!rSrcName.isEmpty())
// Range name is the data source.
@@ -1477,7 +1477,7 @@ void XclImpPivotTable::Convert()
}
// create the DataPilot
- std::unique_ptr<ScDPObject> pDPObj(new ScDPObject( &GetDocRef() ));
+ std::unique_ptr<ScDPObject> pDPObj(new ScDPObject( &GetDoc() ));
pDPObj->SetName( maPTInfo.maTableName );
if (!maPTInfo.maDataName.isEmpty())
aSaveData.GetDataLayoutDimension()->SetLayoutName(maPTInfo.maDataName);
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index d8ace493905a..f52a4ab3fa3f 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -279,11 +279,6 @@ ScDocument& XclRoot::GetDoc() const
return mrData.mrDoc;
}
-ScDocument& XclRoot::GetDocRef() const
-{
- return mrData.mrDoc;
-}
-
SfxObjectShell* XclRoot::GetDocShell() const
{
return GetDoc().GetDocumentShell();