summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-05-28 14:31:36 +0200
committerJan Holesovsky <kendy@collabora.com>2015-05-28 14:35:20 +0200
commite275f2c6808abe9f0bd9c720dee801a887198270 (patch)
tree40dde82f9cfeb180b2fc362dbd56cfa6e067023f
parenta1187a329ea735bf584f67a2f568e64676f8ae23 (diff)
lok search sd: Off-by-one; and send the page only when it changed.
Change-Id: Ifc56c7771bfdf75531a0c5153cbcbb5c36f051b7
-rw-r--r--sd/source/ui/view/Outliner.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index da24d0e1452f..feebd92d62b2 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -723,9 +723,12 @@ bool Outliner::SearchAndReplaceOnce()
{
::boost::shared_ptr<DrawViewShell> pDrawViewShell(::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell));
- sal_uInt16 nSelectedPage = pDrawViewShell->GetCurPageId();
- OString aPayload = OString::number(nSelectedPage);
- pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
+ sal_uInt16 nSelectedPage = pDrawViewShell->GetCurPageId() - 1;
+ if (nSelectedPage != mnStartPageIndex)
+ {
+ OString aPayload = OString::number(nSelectedPage);
+ pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
+ }
}
return mbEndOfSearch;