sc/source/core/data/table6.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
New commits: commit a02f7aa735c52f5d20df0e2a94cc06879cb3dfac Author: Eike Rathke <er...@redhat.com> Date: Wed Jul 27 18:18:43 2016 +0200 do not search in empty string if there is no note, tdf#65334 follow-up Change-Id: I6c347b5bccd4ffd6a43a80e9d73a0b5fcf82926b diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index e5582b4..121d1d2 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -68,12 +68,22 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo if (!bDoSearch) return false; - aCell = aCol[nCol].GetCellValue(nRow); - if (aCell.isEmpty() && rSearchItem.GetCellType() != SvxSearchCellType::NOTE) - return false; + ScPostIt* pNote; + if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE) + { + pNote = aCol[nCol].GetCellNote(nRow); + if (!pNote) + return false; + } + else + { + aCell = aCol[nCol].GetCellValue(nRow); + if (aCell.isEmpty()) + return false; + pNote = nullptr; + } bool bMultiLine = false; - ScPostIt* pNote = nullptr; CellType eCellType = aCell.meType; switch (rSearchItem.GetCellType()) { @@ -105,7 +115,6 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo break; case SvxSearchCellType::NOTE: { - pNote = aCol[nCol].GetCellNote(nRow); if (pNote) { aString = pNote->GetText(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits