diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-05-28 12:12:37 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-28 14:08:36 +0200 |
commit | a1187a329ea735bf584f67a2f568e64676f8ae23 (patch) | |
tree | 32e60ad89d23c690fa4136fd9b26a31128b61ccf /sd | |
parent | ad90d924ad5b29cd2209ef8b9217ae9377f85870 (diff) |
sd: Notify about the part change (when searching) only once.
Change-Id: Iae0e3fa0ec86898f17bc4b595075c3a2384ecfb2
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 60873d00a0ef..da24d0e1452f 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -717,6 +717,17 @@ bool Outliner::SearchAndReplaceOnce() mpDrawDocument->GetDocSh()->SetWaitCursor( false ); + // notify LibreOfficeKit about changed page + if (pViewShell && pViewShell->GetDoc()->isTiledRendering() && + mbStringFound && pViewShell->ISA(DrawViewShell)) + { + ::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()); + } + return mbEndOfSearch; } diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 74a77c44b564..9aa19dabd03c 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -81,7 +81,6 @@ #include <sfx2/request.hxx> #include <boost/bind.hpp> -#include <LibreOfficeKit/LibreOfficeKitEnums.h> using namespace com::sun::star; @@ -1099,11 +1098,6 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) mpDrawView->AdjustMarkHdl(); } - if (bOK) - { - OString aPayload = OString::number(nSelectedPage); - GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr()); - } return bOK; } |