diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-05-28 14:31:36 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-28 14:35:20 +0200 |
commit | e275f2c6808abe9f0bd9c720dee801a887198270 (patch) | |
tree | 40dde82f9cfeb180b2fc362dbd56cfa6e067023f /sd | |
parent | a1187a329ea735bf584f67a2f568e64676f8ae23 (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.cxx | 9 |
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; |