summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-07-27 16:33:31 +0200
committerEike Rathke <erack@redhat.com>2016-07-27 16:33:45 +0200
commit09cc958dee93ad0ad2ab0d8cc9cc4c09e46c3653 (patch)
treebcd965bcc94a6fc7715e57906139edcccff5ee45
parentf027c77c520adbdf8cec59e0484fc87b33cf203b (diff)
use GetCellArea() when searching for notes, tdf#65334 follow-up
... so empty cells with notes are included as last "data" position if they are below or right of the last "real" data, which GetLastDataPos() doesn't. Change-Id: I9bb7464033736e7e7fa24e635ef1a3d39626002b
-rw-r--r--sc/source/core/data/table6.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index a41aa64c2572..e5582b4ddb41 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -300,7 +300,10 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
{
SCCOL nLastCol;
SCROW nLastRow;
- GetLastDataPos(nLastCol, nLastRow);
+ if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE)
+ GetCellArea( nLastCol, nLastRow);
+ else
+ GetLastDataPos(nLastCol, nLastRow);
return Search(rSearchItem, rCol, rRow, nLastCol, nLastRow, rMark, rUndoStr, pUndoDoc);
}