sc/source/filter/excel/excform.cxx | 4 - sc/source/filter/excel/excimp8.cxx | 32 ++++++------- sc/source/filter/excel/impop.cxx | 85 ++++++++++++++++++------------------ sc/source/filter/excel/read.cxx | 10 ++-- sc/source/filter/inc/imp_op.hxx | 4 - sc/source/filter/lotus/lotimpop.cxx | 56 +++++++++++------------ sc/source/filter/lotus/lotread.cxx | 18 +++---- 7 files changed, 105 insertions(+), 104 deletions(-)
New commits: commit 170c2fe7131923ff9b1d93847e9413ff1d3f1d69 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Sep 13 19:18:47 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Sep 14 09:45:23 2020 +0200 ImportTyp never passed null arg Change-Id: Ibd126b4812f08f96f5c354e946a38b36aa492da0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102597 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 0ebce2e682c6..d3bc4afac377 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -123,11 +123,11 @@ void ImportExcel::Formula( ScFormulaCell* pCell; if (pSharedCode->NeedsWrapReference(aScPos, EXC_MAXCOL8, EXC_MAXROW8)) { - pCell = new ScFormulaCell(pD, aScPos, pSharedCode->Clone()); + pCell = new ScFormulaCell(&rD, aScPos, pSharedCode->Clone()); pCell->GetCode()->WrapReference(aScPos, EXC_MAXCOL8, EXC_MAXROW8); } else - pCell = new ScFormulaCell(pD, aScPos, *pSharedCode); + pCell = new ScFormulaCell(&rD, aScPos, *pSharedCode); rDoc.getDoc().EnsureTable(aScPos.Tab()); rDoc.setFormulaCell(aScPos, pCell); pCell->SetNeedNumberFormat(false); diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 0fef106161be..cb28f003c064 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -156,30 +156,30 @@ ImportExcel8::~ImportExcel8() void ImportExcel8::Calccount() { - ScDocOptions aOpt = pD->GetDocOptions(); + ScDocOptions aOpt = rD.GetDocOptions(); aOpt.SetIterCount( aIn.ReaduInt16() ); - pD->SetDocOptions( aOpt ); + rD.SetDocOptions( aOpt ); } void ImportExcel8::Precision() { - ScDocOptions aOpt = pD->GetDocOptions(); + ScDocOptions aOpt = rD.GetDocOptions(); aOpt.SetCalcAsShown( aIn.ReaduInt16() == 0 ); - pD->SetDocOptions( aOpt ); + rD.SetDocOptions( aOpt ); } void ImportExcel8::Delta() { - ScDocOptions aOpt = pD->GetDocOptions(); + ScDocOptions aOpt = rD.GetDocOptions(); aOpt.SetIterEps( aIn.ReadDouble() ); - pD->SetDocOptions( aOpt ); + rD.SetDocOptions( aOpt ); } void ImportExcel8::Iteration() { - ScDocOptions aOpt = pD->GetDocOptions(); + ScDocOptions aOpt = rD.GetDocOptions(); aOpt.SetIter( aIn.ReaduInt16() == 1 ); - pD->SetDocOptions( aOpt ); + rD.SetDocOptions( aOpt ); } void ImportExcel8::Boundsheet() @@ -199,17 +199,17 @@ void ImportExcel8::Boundsheet() SCTAB nScTab = nBdshtTab; if( nScTab > 0 ) { - OSL_ENSURE( !pD->HasTable( nScTab ), "ImportExcel8::Boundsheet - sheet exists already" ); - pD->MakeTable( nScTab ); + OSL_ENSURE( !rD.HasTable( nScTab ), "ImportExcel8::Boundsheet - sheet exists already" ); + rD.MakeTable( nScTab ); } if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) ) - pD->SetVisible( nScTab, false ); + rD.SetVisible( nScTab, false ); - if( !pD->RenameTab( nScTab, aName ) ) + if( !rD.RenameTab( nScTab, aName ) ) { - pD->CreateValidTabName( aName ); - pD->RenameTab( nScTab, aName ); + rD.CreateValidTabName( aName ); + rD.RenameTab( nScTab, aName ); } nBdshtTab++; @@ -396,9 +396,9 @@ void ImportExcel8::PostDocLoad() ImportExcel::PostDocLoad(); // check scenarios; Attention: This increases the table count of the document!! - if( !pD->IsClipboard() && !maScenList.aEntries.empty() ) + if( !rD.IsClipboard() && !maScenList.aEntries.empty() ) { - pD->UpdateChartListenerCollection(); // references in charts must be updated + rD.UpdateChartListenerCollection(); // references in charts must be updated maScenList.Apply( GetRoot() ); } diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 2f1cddf17a53..1b6efa743a44 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -70,10 +70,11 @@ using namespace ::com::sun::star; -ImportTyp::ImportTyp( ScDocument* pDoc, rtl_TextEncoding eQ ) +ImportTyp::ImportTyp(ScDocument& rDoc, rtl_TextEncoding eQ) + : eQuellChar(eQ) + , rD(rDoc) + { - eQuellChar = eQ; - pD = pDoc; } ImportTyp::~ImportTyp() @@ -81,7 +82,7 @@ ImportTyp::~ImportTyp() } ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ): - ImportTyp( &rImpData.mrDoc, rImpData.meTextEnc ), + ImportTyp( rImpData.mrDoc, rImpData.meTextEnc ), XclImpRoot( rImpData ), maStrm( rStrm, GetRoot() ), aIn( maStrm ), @@ -115,17 +116,17 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ): bTabTruncated = false; // Excel document per Default on 31.12.1899, accords to Excel settings with 1.1.1900 - ScDocOptions aOpt = pD->GetDocOptions(); + ScDocOptions aOpt = rD.GetDocOptions(); aOpt.SetDate( 30, 12, 1899 ); - pD->SetDocOptions( aOpt ); - pD->GetFormatTable()->ChangeNullDate( 30, 12, 1899 ); + rD.SetDocOptions( aOpt ); + rD.GetFormatTable()->ChangeNullDate( 30, 12, 1899 ); - ScDocOptions aDocOpt( pD->GetDocOptions() ); + ScDocOptions aDocOpt( rD.GetDocOptions() ); aDocOpt.SetIgnoreCase( true ); // always in Excel aDocOpt.SetFormulaRegexEnabled( false ); // regular expressions? what's that? aDocOpt.SetFormulaWildcardsEnabled( true ); // Excel uses wildcard expressions aDocOpt.SetLookUpColRowNames( false ); // default: no natural language refs - pD->SetDocOptions( aDocOpt ); + rD.SetDocOptions( aDocOpt ); } ImportExcel::~ImportExcel() @@ -362,8 +363,8 @@ void ImportExcel::ReadBoolErr() double fValue; std::unique_ptr<ScTokenArray> pScTokArr = ErrorToFormula( nType != EXC_BOOLERR_BOOL, nValue, fValue ); ScFormulaCell* pCell = pScTokArr - ? new ScFormulaCell(pD, aScPos, std::move(pScTokArr)) - : new ScFormulaCell(*pD, aScPos); + ? new ScFormulaCell(&rD, aScPos, std::move(pScTokArr)) + : new ScFormulaCell(rD, aScPos); pCell->SetHybridDouble( fValue ); GetDocImport().setFormulaCell(aScPos, pCell); } @@ -480,8 +481,8 @@ void ImportExcel::Columndefault() nColMac--; - if( nColMac > pD->MaxCol() ) - nColMac = static_cast<sal_uInt16>(pD->MaxCol()); + if( nColMac > rD.MaxCol() ) + nColMac = static_cast<sal_uInt16>(rD.MaxCol()); for( sal_uInt16 nCol = nColMic ; nCol <= nColMac ; nCol++ ) { @@ -541,10 +542,10 @@ void ImportExcel::Rec1904() if( n1904 ) {// 1904 date system - ScDocOptions aOpt = pD->GetDocOptions(); + ScDocOptions aOpt = rD.GetDocOptions(); aOpt.SetDate( 1, 1, 1904 ); - pD->SetDocOptions( aOpt ); - pD->GetFormatTable()->ChangeNullDate( 1, 1, 1904 ); + rD.SetDocOptions( aOpt ); + rD.GetFormatTable()->ChangeNullDate( 1, 1, 1904 ); } } @@ -582,8 +583,8 @@ void ImportExcel::Colwidth() nColWidth = aIn.ReaduInt16(); //TODO: add a check for the unlikely case of changed MAXCOL (-> XclImpAddressConverter) -// if( nColLast > pD->MaxCol() ) -// nColLast = static_cast<sal_uInt16>(pD->MaxCol()); +// if( nColLast > rD.MaxCol() ) +// nColLast = static_cast<sal_uInt16>(rD.MaxCol()); sal_uInt16 nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() ); pColRowBuff->SetWidthRange( nColFirst, nColLast, nScWidth ); @@ -661,11 +662,11 @@ void ImportExcel::Colinfo() nXF = aIn.ReaduInt16(); nOpt = aIn.ReaduInt16(); - if( nColFirst > pD->MaxCol() ) + if( nColFirst > rD.MaxCol() ) return; - if( nColLast > pD->MaxCol() ) - nColLast = static_cast<sal_uInt16>(pD->MaxCol()); + if( nColLast > rD.MaxCol() ) + nColLast = static_cast<sal_uInt16>(rD.MaxCol()); bool bHidden = ::get_flag( nOpt, EXC_COLINFO_HIDDEN ); bool bCollapsed = ::get_flag( nOpt, EXC_COLINFO_COLLAPSED ); @@ -708,17 +709,17 @@ void ImportExcel::Boundsheet() SCTAB nScTab = nBdshtTab; if( nScTab > 0 ) { - OSL_ENSURE( !pD->HasTable( nScTab ), "ImportExcel::Boundsheet - sheet exists already" ); - pD->MakeTable( nScTab ); + OSL_ENSURE( !rD.HasTable( nScTab ), "ImportExcel::Boundsheet - sheet exists already" ); + rD.MakeTable( nScTab ); } if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) ) - pD->SetVisible( nScTab, false ); + rD.SetVisible( nScTab, false ); - if( !pD->RenameTab( nScTab, aName ) ) + if( !rD.RenameTab( nScTab, aName ) ) { - pD->CreateValidTabName( aName ); - pD->RenameTab( nScTab, aName ); + rD.CreateValidTabName( aName ); + rD.RenameTab( nScTab, aName ); } nBdshtTab++; @@ -758,7 +759,7 @@ void ImportExcel::Hideobj() nHide = aIn.ReaduInt16(); - ScViewOptions aOpts( pD->GetViewOptions() ); + ScViewOptions aOpts( rD.GetViewOptions() ); switch( nHide ) { @@ -783,7 +784,7 @@ void ImportExcel::Hideobj() aOpts.SetObjMode( VOBJ_TYPE_CHART, eChart ); aOpts.SetObjMode( VOBJ_TYPE_DRAW, eDraw ); - pD->SetViewOptions( aOpts ); + rD.SetViewOptions( aOpts ); } void ImportExcel::Standardwidth() @@ -842,7 +843,7 @@ void ImportExcel::Shrfmla() ScDocumentImport& rDoc = GetDocImport(); - ScFormulaCell* pCell = new ScFormulaCell(pD, aPos, std::move(pResult)); + ScFormulaCell* pCell = new ScFormulaCell(&rD, aPos, std::move(pResult)); pCell->GetCode()->WrapReference(aPos, EXC_MAXCOL8, EXC_MAXROW8); rDoc.getDoc().CheckLinkFormulaNeedingCheck( *pCell->GetCode()); rDoc.getDoc().EnsureTable(aPos.Tab()); @@ -1124,7 +1125,7 @@ void ImportExcel::TableOp() else { bTabTruncated = true; - GetTracer().TraceInvalidRow(nLastRow, pD->MaxRow()); + GetTracer().TraceInvalidRow(nLastRow, rD.MaxRow()); } } @@ -1189,15 +1190,15 @@ void ImportExcel::EndSheet() void ImportExcel::NewTable() { SCTAB nTab = GetCurrScTab(); - if( nTab > 0 && !pD->HasTable( nTab ) ) - pD->MakeTable( nTab ); + if( nTab > 0 && !rD.HasTable( nTab ) ) + rD.MakeTable( nTab ); if (nTab == 0 && GetBiff() == EXC_BIFF2) { // For Excel 2.1 Worksheet file, we need to set the file name as the // sheet name. INetURLObject aURL(GetDocUrl()); - pD->RenameTab(0, aURL.getBase()); + rD.RenameTab(0, aURL.getBase()); } pExcRoot->pShrfmlaBuff->Clear(); @@ -1287,7 +1288,7 @@ void ImportExcel::PostDocLoad() // root data owns the extended document options -> create a new object GetDoc().SetExtDocOptions( std::make_unique<ScExtDocOptions>( GetExtDocOptions() ) ); - const SCTAB nLast = pD->GetTableCount(); + const SCTAB nLast = rD.GetTableCount(); const ScRange* p; if( pExcRoot->pPrintRanges->HasRanges() ) @@ -1297,17 +1298,17 @@ void ImportExcel::PostDocLoad() p = pExcRoot->pPrintRanges->First(n); if( p ) { - pD->ClearPrintRanges( n ); + rD.ClearPrintRanges( n ); while( p ) { - pD->AddPrintRange( n, *p ); + rD.AddPrintRange( n, *p ); p = pExcRoot->pPrintRanges->Next(); } } else { // #i4063# no print ranges -> print entire sheet - pD->SetPrintEntireSheet( n ); + rD.SetPrintEntireSheet( n ); } } GetTracer().TracePrintRange(); @@ -1326,15 +1327,15 @@ void ImportExcel::PostDocLoad() while( p ) { - if( p->aStart.Col() == 0 && p->aEnd.Col() == pD->MaxCol() && bRowVirgin ) + if( p->aStart.Col() == 0 && p->aEnd.Col() == rD.MaxCol() && bRowVirgin ) { - pD->SetRepeatRowRange( n, std::unique_ptr<ScRange>(new ScRange(*p)) ); + rD.SetRepeatRowRange( n, std::unique_ptr<ScRange>(new ScRange(*p)) ); bRowVirgin = false; } - if( p->aStart.Row() == 0 && p->aEnd.Row() == pD->MaxRow() && bColVirgin ) + if( p->aStart.Row() == 0 && p->aEnd.Row() == rD.MaxRow() && bColVirgin ) { - pD->SetRepeatColRange( n, std::unique_ptr<ScRange>(new ScRange(*p)) ); + rD.SetRepeatColRange( n, std::unique_ptr<ScRange>(new ScRange(*p)) ); bColVirgin = false; } diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx index 62343d79b74c..ba9ad1de8b7c 100644 --- a/sc/source/filter/excel/read.cxx +++ b/sc/source/filter/excel/read.cxx @@ -738,7 +738,7 @@ ErrCode ImportExcel::Read() break; case Biff5V: default: - pD->SetVisible( GetCurrScTab(), false ); + rD.SetVisible( GetCurrScTab(), false ); ePrev = eCurrent; eCurrent = Z_Biffn0; } @@ -779,7 +779,7 @@ ErrCode ImportExcel::Read() AdjustRowHeight(); PostDocLoad(); - pD->CalcAfterLoad(false); + rD.CalcAfterLoad(false); const XclImpAddressConverter& rAddrConv = GetAddressConverter(); if( rAddrConv.IsTabTruncated() ) @@ -910,7 +910,7 @@ ErrCode ImportExcel8::Read() case Biff8V: // VB module default: // TODO: do not create a sheet in the Calc document - pD->SetVisible( nScTab, false ); + rD.SetVisible( nScTab, false ); XclTools::SkipSubStream( maStrm ); IncCurrScTab(); } @@ -1285,12 +1285,12 @@ ErrCode ImportExcel8::Read() // Excel documents look much better without this call; better in the // sense that the row heights are identical to the original heights in // Excel. - if ( !pD->IsAdjustHeightLocked()) + if ( !rD.IsAdjustHeightLocked()) AdjustRowHeight(); #endif PostDocLoad(); - pD->CalcAfterLoad(false); + rD.CalcAfterLoad(false); // import change tracking data XclImpChangeTrack aImpChTr( GetRoot(), maStrm ); diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx index 9b38e4c5228c..f94196470158 100644 --- a/sc/source/filter/inc/imp_op.hxx +++ b/sc/source/filter/inc/imp_op.hxx @@ -44,10 +44,10 @@ class ImportTyp { protected: rtl_TextEncoding eQuellChar; // source (Quelle) character set - ScDocument* pD; // document + ScDocument& rD; // document public: - ImportTyp( ScDocument*, rtl_TextEncoding eSrc ); + ImportTyp( ScDocument&, rtl_TextEncoding eSrc ); virtual ~ImportTyp(); }; diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index ddc7fc3d5fbf..0c77edab58a9 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -41,7 +41,7 @@ static osl::Mutex aLotImpSemaphore; ImportLotus::ImportLotus(LotusContext &rContext, SvStream& aStream, rtl_TextEncoding eQ) - : ImportTyp(&rContext.rDoc, eQ) + : ImportTyp(rContext.rDoc, eQ) , pIn(&aStream) , aConv(rContext, *pIn, rContext.rDoc.GetSharedStringPool(), eQ, false) , nTab(0) @@ -105,8 +105,8 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen ) Read( nLTab ); Read( nWindow2 ); - if( !pD->HasTable( static_cast<SCTAB> (nLTab) ) ) - pD->MakeTable( static_cast<SCTAB> (nLTab) ); + if( !rD.HasTable( static_cast<SCTAB> (nLTab) ) ) + rD.MakeTable( static_cast<SCTAB> (nLTab) ); if( nWindow2 ) return; @@ -120,7 +120,7 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen ) Read( nCol ); Read( nSpaces ); // Attention: ambiguous Correction factor! - pD->SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), static_cast<sal_uInt16>( TWIPS_PER_CHAR * 1.28 * nSpaces ) ); + rD.SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), static_cast<sal_uInt16>( TWIPS_PER_CHAR * 1.28 * nSpaces ) ); nCnt--; } @@ -147,7 +147,7 @@ void ImportLotus::Hiddencolumn( sal_uInt16 nRecLen ) { Read( nCol ); - pD->SetColHidden(static_cast<SCCOL>(nCol), static_cast<SCCOL>(nCol), static_cast<SCTAB>(nLTab), true); + rD.SetColHidden(static_cast<SCCOL>(nCol), static_cast<SCCOL>(nCol), static_cast<SCTAB>(nLTab), true); nCnt--; } } @@ -178,8 +178,8 @@ void ImportLotus::Errcell() ScSetStringParam aParam; aParam.setTextInput(); - pD->EnsureTable(aA.Tab()); - pD->SetString(aA, "#ERR!", &aParam); + rD.EnsureTable(aA.Tab()); + rD.SetString(aA, "#ERR!", &aParam); } void ImportLotus::Nacell() @@ -190,8 +190,8 @@ void ImportLotus::Nacell() ScSetStringParam aParam; aParam.setTextInput(); - pD->EnsureTable(aA.Tab()); - pD->SetString(aA, "#NA!", &aParam); + rD.EnsureTable(aA.Tab()); + rD.SetString(aA, "#NA!", &aParam); } void ImportLotus::Labelcell() @@ -206,8 +206,8 @@ void ImportLotus::Labelcell() ScSetStringParam aParam; aParam.setTextInput(); - pD->EnsureTable(aA.Tab()); - pD->SetString(aA, aLabel, &aParam); + rD.EnsureTable(aA.Tab()); + rD.SetString(aA, aLabel, &aParam); } void ImportLotus::Numbercell() @@ -218,8 +218,8 @@ void ImportLotus::Numbercell() Read( aAddr ); Read( fVal ); - pD->EnsureTable(aAddr.Tab()); - pD->SetValue(aAddr, fVal); + rD.EnsureTable(aAddr.Tab()); + rD.SetValue(aAddr, fVal); } void ImportLotus::Smallnumcell() @@ -230,8 +230,8 @@ void ImportLotus::Smallnumcell() Read( aAddr ); Read( nVal ); - pD->EnsureTable(aAddr.Tab()); - pD->SetValue(aAddr, SnumToDouble(nVal)); + rD.EnsureTable(aAddr.Tab()); + rD.SetValue(aAddr, SnumToDouble(nVal)); } void ImportLotus::Formulacell( sal_uInt16 n ) @@ -254,10 +254,10 @@ void ImportLotus::Formulacell( sal_uInt16 n ) if (!aConv.good()) return; - ScFormulaCell* pCell = pErg ? new ScFormulaCell(pD, aAddr, std::move(pErg)) : new ScFormulaCell(*pD, aAddr); + ScFormulaCell* pCell = pErg ? new ScFormulaCell(&rD, aAddr, std::move(pErg)) : new ScFormulaCell(rD, aAddr); pCell->AddRecalcMode( ScRecalcMode::ONLOAD_ONCE ); - pD->EnsureTable(aAddr.Tab()); - pD->SetFormulaCell(aAddr, pCell); + rD.EnsureTable(aAddr.Tab()); + rD.SetFormulaCell(aAddr, pCell); } void ImportLotus::Read( OUString &r ) @@ -290,9 +290,9 @@ void ImportLotus::RowPresentation( sal_uInt16 nRecLen ) nHeight *= 20; // -> 32 * TWIPS nHeight /= 32; // -> TWIPS - pD->SetRowFlags( static_cast<SCROW> (nRow), static_cast<SCTAB> (nLTab), pD->GetRowFlags( static_cast<SCROW> (nRow), static_cast<SCTAB> (nLTab) ) | CRFlags::ManualSize ); + rD.SetRowFlags( static_cast<SCROW> (nRow), static_cast<SCTAB> (nLTab), rD.GetRowFlags( static_cast<SCROW> (nRow), static_cast<SCTAB> (nLTab) ) | CRFlags::ManualSize ); - pD->SetRowHeight( static_cast<SCROW> (nRow), static_cast<SCTAB> (nLTab), nHeight ); + rD.SetRowHeight( static_cast<SCROW> (nRow), static_cast<SCTAB> (nLTab), nHeight ); } nCnt--; @@ -313,10 +313,10 @@ void ImportLotus::NamedSheet() nLTab = 5; #endif - if (pD->HasTable(nLTab)) - pD->RenameTab(nLTab, aName); + if (rD.HasTable(nLTab)) + rD.RenameTab(nLTab, aName); else - pD->InsertTab(nLTab, aName); + rD.InsertTab(nLTab, aName); } void ImportLotus::Font_Face() @@ -382,7 +382,7 @@ void ImportLotus::Row_( const sal_uInt16 nRecLen ) SCTAB nDestTab(static_cast<SCTAB>(nExtTab)); if( nHeight ) - pD->SetRowHeight(nRow, nDestTab, nHeight); + rD.SetRowHeight(nRow, nDestTab, nHeight); while( nCntDwn ) { @@ -400,10 +400,10 @@ void ImportLotus::Row_( const sal_uInt16 nRecLen ) { if( bCenter ) { - if (pD->HasData(nColCnt, nRow, nDestTab)) + if (rD.HasData(nColCnt, nRow, nDestTab)) { // new Center after previous Center - pD->DoMerge(nDestTab, nCenterStart, nRow, nCenterEnd, nRow); + rD.DoMerge(nDestTab, nCenterStart, nRow, nCenterEnd, nRow); nCenterStart = nColCnt; } } @@ -420,7 +420,7 @@ void ImportLotus::Row_( const sal_uInt16 nRecLen ) if( bCenter ) { // possibly reset old Center - pD->DoMerge(nDestTab, nCenterStart, nRow, nCenterEnd, nRow); + rD.DoMerge(nDestTab, nCenterStart, nRow, nCenterEnd, nRow); bCenter = false; } } @@ -433,6 +433,6 @@ void ImportLotus::Row_( const sal_uInt16 nRecLen ) if( bCenter ) // possibly reset old Center - pD->DoMerge(nDestTab, nCenterStart, nRow, nCenterEnd, nRow); + rD.DoMerge(nDestTab, nCenterStart, nRow, nCenterEnd, nRow); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index e1c13226f231..4092e2f8c90f 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -56,7 +56,7 @@ ErrCode ImportLotus::parse() pIn->Seek( nNextRec ); // start progressbar - ScfStreamProgressBar aPrgrsBar( *pIn, pD->GetDocumentShell() ); + ScfStreamProgressBar aPrgrsBar( *pIn, rD.GetDocumentShell() ); LotusContext &rContext = aConv.getContext(); while( eCurrent != S_END ) { @@ -196,7 +196,7 @@ ErrCode ImportLotus::parse() } // TODO: eliminate stupid names - SCTAB nTabs = pD->GetTableCount(); + SCTAB nTabs = rD.GetTableCount(); SCTAB nCnt; OUString aTabName; OUString aBaseName; @@ -204,19 +204,19 @@ ErrCode ImportLotus::parse() { if( nTabs > 1 ) { - pD->GetName( 0, aBaseName ); + rD.GetName( 0, aBaseName ); aBaseName = aBaseName.copy(0, aBaseName.getLength()-1); } for( nCnt = 1 ; nCnt < nTabs ; nCnt++ ) { - SAL_WARN_IF( !pD->HasTable( nCnt ), "sc.filter", + SAL_WARN_IF( !rD.HasTable( nCnt ), "sc.filter", "-ImportLotus::Read(): Where is my table?!" ); - pD->GetName( nCnt, aTabName ); + rD.GetName( nCnt, aTabName ); if( aTabName == "temp" ) { aTabName = aBaseName; - pD->CreateValidTabName( aTabName ); - pD->RenameTab( nCnt, aTabName ); + rD.CreateValidTabName( aTabName ); + rD.RenameTab( nCnt, aTabName ); } } } @@ -227,7 +227,7 @@ ErrCode ImportLotus::parse() ErrCode ImportLotus::Read() { ErrCode eRet = parse(); - pD->CalcAfterLoad(); + rD.CalcAfterLoad(); return eRet; } @@ -247,7 +247,7 @@ ErrCode ImportLotus::Read(SvStream& rIn) pIn->Seek( nNextRec ); // start progressbar - ScfStreamProgressBar aPrgrsBar( *pIn, pD->GetDocumentShell() ); + ScfStreamProgressBar aPrgrsBar( *pIn, rD.GetDocumentShell() ); LotusContext &rContext = aConv.getContext(); while( bRead ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits