diff options
-rw-r--r-- | sc/source/filter/excel/excimp8.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xechart.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeescher.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/excel/xeformula.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xename.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/excel/xepivot.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xichart.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xiname.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xipivot.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xlroot.cxx | 5 | ||||
-rw-r--r-- | sc/source/filter/inc/xlroot.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xcl97/XclImpChangeTrack.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xcl97/xcl97esc.cxx | 12 |
14 files changed, 31 insertions, 38 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(); diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx index 8b1a0bfd8a98..c4bcc048c9dd 100644 --- a/sc/source/filter/inc/xlroot.hxx +++ b/sc/source/filter/inc/xlroot.hxx @@ -194,10 +194,8 @@ public: /** Tries to open a new stream in the root storage for reading or writing. */ tools::SvRef<SotStorageStream> OpenStream( const OUString& rStrmName ) const; - /** Returns the destination document (import) or source document (export). */ + /** Returns reference to the destination document (import) or source document (export). */ ScDocument& GetDoc() const; - /** Returns pointer to the destination document (import) or source document (export). */ - ScDocument& GetDocRef() const; /** Returns the object shell of the Calc document. May be 0 (i.e. import from clipboard). */ SfxObjectShell* GetDocShell() const; diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx index d932d27417dc..8d1ea63facb3 100644 --- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx @@ -58,7 +58,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea xInStrm->Seek( STREAM_SEEK_TO_BEGIN ); pStrm.reset( new XclImpStream( *xInStrm, GetRoot() ) ); pStrm->CopyDecrypterFrom( rBookStrm ); - pChangeTrack.reset(new ScChangeTrack( &GetDocRef() )); + pChangeTrack.reset(new ScChangeTrack( &GetDoc() )); sOldUsername = pChangeTrack->GetUser(); pChangeTrack->SetUseFixDateTime( true ); @@ -272,7 +272,7 @@ void XclImpChangeTrack::ReadCell( if( pStrm->IsValid() && pTokenArray ) { rCell.meType = CELLTYPE_FORMULA; - rCell.mpFormula = new ScFormulaCell(&GetDocRef(), rPosition, std::move(pTokenArray)); + rCell.mpFormula = new ScFormulaCell(&GetDoc(), rPosition, std::move(pTokenArray)); } } break; diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index 0602ae8d7fca..5a58fa68d4bd 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -197,7 +197,7 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape //added for exporting OCX control sal_Int16 nMsCtlType = 0; if ( !pObj ) - pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDocRef() ); // just what is it?!? + pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDoc() ); // just what is it?!? else { pCurrXclObj = nullptr; @@ -215,17 +215,17 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape SvGlobalName aObjClsId( xObj->getClassID() ); if ( SotExchange::IsChart( aObjClsId ) ) { // yes, it's a chart diagram - mrObjMgr.AddObj( std::make_unique<XclExpChartObj>( mrObjMgr, rxShape, pChildAnchor, &GetDocRef() ) ); + mrObjMgr.AddObj( std::make_unique<XclExpChartObj>( mrObjMgr, rxShape, pChildAnchor, &GetDoc() ) ); pCurrXclObj = nullptr; // no metafile or whatsoever } else // metafile and OLE object pCurrXclObj = new XclObjOle( mrObjMgr, *pObj ); } else // just a metafile - pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDocRef() ); + pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDoc() ); } else - pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDocRef() ); + pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDoc() ); } else if( nObjType == OBJ_UNO ) { @@ -246,13 +246,13 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape else //TBX Form Control pCurrXclObj = CreateTBXCtrlObj( rxShape, pChildAnchor ).release(); if( !pCurrXclObj ) - pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDocRef() ); // just a metafile + pCurrXclObj = new XclObjAny( mrObjMgr, rxShape, &GetDoc() ); // just a metafile } else if( !ScDrawLayer::IsNoteCaption( pObj ) ) { // ignore permanent note shapes // #i12190# do not ignore callouts (do not filter by object type ID) - pCurrXclObj = ShapeInteractionHelper::CreateShapeObj( mrObjMgr, rxShape, &GetDocRef() ); + pCurrXclObj = ShapeInteractionHelper::CreateShapeObj( mrObjMgr, rxShape, &GetDoc() ); ShapeInteractionHelper::PopulateShapeInteractionInfo( mrObjMgr, rxShape, *pCurrAppData ); } } |