summaryrefslogtreecommitdiff
path: root/sd
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:32:28 +0200
commit090ad6b02c84e04642dbcd53ddd3a079b0d17471 (patch)
treeb56e9b2c0132b14d38f81c043e38d28eb250d51d /sd
parent0b52089c1d88a5223981d8c177b3044d53eff700 (diff)
lok search sd: Off-by-one; and send the page only when it changed.
Change-Id: Ifc56c7771bfdf75531a0c5153cbcbb5c36f051b7
Diffstat (limited to 'sd')
-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;