summaryrefslogtreecommitdiffstats
path: root/sfx2
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
parentResolves: tdf#100140 crash on exit of report design (diff)
downloadcore-c97422fa103618ba19bde0d815674a0173058bb4.tar.gz
core-c97422fa103618ba19bde0d815674a0173058bb4.zip
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')
-rw-r--r--sfx2/source/view/viewimp.hxx2
-rw-r--r--sfx2/source/view/viewsh.cxx24
2 files changed, 26 insertions, 0 deletions
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index e3e60e228f32..fe3b4940e43f 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -61,6 +61,8 @@ struct SfxViewShell_Impl
LibreOfficeKitCallback m_pLibreOfficeKitViewCallback;
void* m_pLibreOfficeKitViewData;
+ /// Set if we are in the middle of a tiled search.
+ bool m_bTiledSearching;
explicit SfxViewShell_Impl(SfxViewShellFlags const nFlags);
~SfxViewShell_Impl();
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]