diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-23 12:22:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-23 16:36:07 +0200 |
commit | dbf02b8b6c34313affda860fc6c5bbc64839b2d9 (patch) | |
tree | 5c69ab9e7b2d62c7940d316459d1544c18d3aa8e /sc/source/ui/docshell/dbdocimp.cxx | |
parent | 6055814a98a764117cd95adf2bbab91fa34456c2 (diff) |
sc: rowcol: tdf#50916 convert docshell
Change-Id: I52c641bfba397134ad5ed2a9e8005f8959092303
Reviewed-on: https://gerrit.libreoffice.org/81381
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/dbdocimp.cxx')
-rw-r--r-- | sc/source/ui/docshell/dbdocimp.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index 5c698c6b9176..5bba7356a653 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -241,7 +241,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, if ( xMeta.is() ) nColCount = xMeta->getColumnCount(); // this is the number of real columns - if ( rParam.nCol1 + nColCount - 1 > MAXCOL ) + if ( rParam.nCol1 + nColCount - 1 > rDoc.MaxCol() ) { nColCount = 0; //! error message @@ -381,7 +381,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, SCCOL nTestCol = rParam.nCol2 + 1; // right of the data SCROW nTestRow = rParam.nRow1 + 1; // below the title row - while ( nTestCol <= MAXCOL && + while ( nTestCol <= rDoc.MaxCol() && rDoc.GetCellType(ScAddress( nTestCol, nTestRow, nTab )) == CELLTYPE_FORMULA ) { ++nTestCol; @@ -429,7 +429,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, SCCOL nMinEndCol = std::min( rParam.nCol2, nEndCol ); // not too much nMinEndCol = sal::static_int_cast<SCCOL>( nMinEndCol + nFormulaCols ); // only if column count unchanged - pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, InsertDeleteFlags::ATTRIB ); + pImportDoc->DeleteAreaTab( 0,0, rDoc.MaxCol(),rDoc.MaxRow(), nTab, InsertDeleteFlags::ATTRIB ); rDoc.CopyToDocument(rParam.nCol1, rParam.nRow1, nTab, nMinEndCol, rParam.nRow1, nTab, InsertDeleteFlags::ATTRIB, false, *pImportDoc); @@ -453,7 +453,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, { ScPatternAttr aPattern(pImportDoc->GetPool()); aPattern.GetItemSet().Put( ScProtectionAttr( false,false,false,false ) ); - pImportDoc->ApplyPatternAreaTab( 0,0,MAXCOL,MAXROW, nTab, aPattern ); + pImportDoc->ApplyPatternAreaTab( 0,0,rDoc.MaxCol(),rDoc.MaxRow(), nTab, aPattern ); } // copy old data for undo @@ -588,7 +588,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, sc::SetFormulaDirtyContext aCxt; rDoc.SetAllFormulasDirty(aCxt); - rDocShell.PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab), PaintPartFlags::Grid); + rDocShell.PostPaint(ScRange(0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab), PaintPartFlags::Grid); aModificator.SetDocumentModified(); ScDBRangeRefreshedHint aHint( rParam ); |