summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-17 13:10:09 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-17 15:53:26 +0200
commit40377a6e26aa61a1c0788cad1c97a10911d38da8 (patch)
treee04e148e5953c22d44ce7d653c59203e52a7dbc4
parent622f7751b78fd8584e34f5fa96a04ed6e8bb98f5 (diff)
only use non blank cells in the visible data methods, fdo#54552
Change-Id: I2a0914fbaff3e3f707a9c06f693079aed2b89ba4
-rw-r--r--sc/source/core/data/column2.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 964f1d4fbe75..6a74d780d950 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1124,7 +1124,8 @@ bool ScColumn::IsEmptyVisData() const
SCSIZE i;
for (i=0; i<maItems.size() && !bVisData; i++)
{
- bVisData = true;
+ if(!maItems[i].pCell->IsBlank())
+ bVisData = true;
}
return !bVisData;
}
@@ -1158,8 +1159,11 @@ SCROW ScColumn::GetLastVisDataPos() const
for (i=maItems.size(); i>0 && !bFound; )
{
--i;
- bFound = true;
- nRet = maItems[i].nRow;
+ if(!maItems[i].pCell->IsBlank())
+ {
+ bFound = true;
+ nRet = maItems[i].nRow;
+ }
}
}
return nRet;