summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewsh.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-15 17:56:38 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-15 17:26:47 +0000
commitc97422fa103618ba19bde0d815674a0173058bb4 (patch)
tree88eaaf927f5991428e9e9d3f1d7a36f66c2acffa /sfx2/source/view/viewsh.cxx
parent38971bd6543143df41192b0552c51a8119d452a0 (diff)
sfx2: bring the view shell's LOK callback up to date with SdrModel
This fixes CppunitTest_sw_tiledrendering in the LOK_VIEW_CALLBACK=1 case. Change-Id: Ib79e57908c3edda0154341baba8279ede4281a42 Reviewed-on: https://gerrit.libreoffice.org/26313 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sfx2/source/view/viewsh.cxx')
-rw-r--r--sfx2/source/view/viewsh.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index e3ec058b725a..635ba12c0afc 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -56,6 +56,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/settings.hxx>
#include <vcl/commandinfoprovider.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sfx2/app.hxx>
#include "view.hrc"
@@ -250,6 +251,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
, mpIPClientList(nullptr)
, m_pLibreOfficeKitViewCallback(nullptr)
, m_pLibreOfficeKitViewData(nullptr)
+, m_bTiledSearching(false)
{}
SfxViewShell_Impl::~SfxViewShell_Impl()
@@ -1458,10 +1460,32 @@ void SfxViewShell::registerLibreOfficeKitViewCallback(LibreOfficeKitCallback pCa
void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) const
{
+ if (pImpl->m_bTiledSearching)
+ {
+ switch (nType)
+ {
+ case LOK_CALLBACK_TEXT_SELECTION:
+ case LOK_CALLBACK_TEXT_SELECTION_START:
+ case LOK_CALLBACK_TEXT_SELECTION_END:
+ case LOK_CALLBACK_GRAPHIC_SELECTION:
+ return;
+ }
+ }
+
if (pImpl->m_pLibreOfficeKitViewCallback)
pImpl->m_pLibreOfficeKitViewCallback(nType, pPayload, pImpl->m_pLibreOfficeKitViewData);
}
+void SfxViewShell::setTiledSearching(bool bTiledSearching)
+{
+ pImpl->m_bTiledSearching = bTiledSearching;
+}
+
+bool SfxViewShell::isTiledSearching() const
+{
+ return pImpl->m_bTiledSearching;
+}
+
bool SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
/* [Description]