[PATCH 1/3] if changes selection only down, this is also valid for shrinking
Pierre-André Jacquod
pjacquod at alumni.ethz.ch
Mon Nov 28 00:54:59 PST 2011
and not only for expanding the selected area. Hence both part should
test this condition.
---
sc/source/core/data/table1.cxx | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 3cf1ca1..48d7455 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -813,14 +813,16 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
}
while( bChanged );
- if ( !bIncludeOld )
+ if ( !bIncludeOld && !bOnlyDown )
{
if ( !bLeft && rStartCol < MAXCOL && rStartCol < rEndCol )
if ( aCol[rStartCol].IsEmptyBlock(rStartRow,rEndRow) )
++rStartCol;
+
if ( !bRight && rEndCol > 0 && rStartCol < rEndCol )
if ( aCol[rEndCol].IsEmptyBlock(rStartRow,rEndRow) )
--rEndCol;
+
if ( !bTop && rStartRow < MAXROW && rStartRow < rEndRow )
{
bFound = false;
@@ -830,6 +832,10 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S
if (!bFound)
++rStartRow;
}
+ }
+
+ if ( !bIncludeOld )
+ {
if ( !bBottom && rEndRow > 0 && rStartRow < rEndRow )
{
bFound = false;
--
1.7.3.4
--------------040306070801060504050807--
More information about the LibreOffice
mailing list