diff options
author | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-11-27 18:17:32 +0100 |
---|---|---|
committer | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-11-27 19:17:29 +0100 |
commit | 88611e702a18d2a281c22b6d9c28e881be3df223 (patch) | |
tree | c4f7a762376f03f37671a3905f0a2da60a0a24db | |
parent | c3dc0189848f3e4ab48985860ad1a627cec5850a (diff) |
fdo#42286 call correctly GetDataArea to avoid unwanted shrinking
GetDataArea flags documented and call from ExtendedDataArea adapted.
-rw-r--r-- | sc/source/core/data/table1.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/tool/dbdata.cxx | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index b746ffc863ee..3cf1ca15e377 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -741,9 +741,12 @@ bool ScTable::GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, bool bIncludeOld, bool bOnlyDown ) const { - bool bLeft = false; + // bIncludeOld = true ensure that the returned area contains at least the initial area, + // independently of the case if this area has empty rows / columns at its borders + // bOnlyDown = true means extend the inputed area only down, i.e increase only rEndRow + bool bLeft = false; bool bRight = false; - bool bTop = false; + bool bTop = false; bool bBottom = false; bool bChanged; bool bFound; diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index e897630b277c..7014601e036a 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -548,7 +548,7 @@ void ScDBData::ExtendDataArea(ScDocument* pDoc) // Extend the DB area to include data rows immediately below. SCCOL nCol1a = nStartCol, nCol2a = nEndCol; SCROW nRow1a = nStartRow, nRow2a = nEndRow; - pDoc->GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, false, false); + pDoc->GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, true, true); nEndRow = nRow2a; } |