summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-14 11:22:13 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-14 14:45:09 +0100
commitb9565ef0a73c235cd1e14fce9031db6e9237c524 (patch)
treeee810d03ec7e860b2d07a725c9ffc8534683804e /svx
parentd99fc6f2ad8b9078e9adc56796728d7e38b3ca80 (diff)
sd tiled rendering: it's pointless to send selection changes during search all
But they do cause annoying flashing. Change-Id: Ic313a15429c5db98c5660a5274aa49e95dd217e5
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdmodel.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 85a5c541732f..737a1790cad7 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -90,6 +90,7 @@
#include <vcl/svapp.hxx>
#include <memory>
#include <libxml/xmlwriter.h>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -128,6 +129,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
mbTiledRendering = false;
mpLibreOfficeKitCallback = nullptr;
mpLibreOfficeKitData = nullptr;
+ mbTiledSearching = false;
nProgressAkt=0;
nProgressMax=0;
nProgressOfs=0;
@@ -828,10 +830,32 @@ void SdrModel::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback,
void SdrModel::libreOfficeKitCallback(int nType, const char* pPayload) const
{
+ if (mbTiledSearching)
+ {
+ 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 (mpLibreOfficeKitCallback)
mpLibreOfficeKitCallback(nType, pPayload, mpLibreOfficeKitData);
}
+void SdrModel::setTiledSearching(bool bTiledSearching)
+{
+ mbTiledSearching = bTiledSearching;
+}
+
+bool SdrModel::isTiledSearching() const
+{
+ return mbTiledSearching;
+}
+
LibreOfficeKitCallback SdrModel::getLibreOfficeKitCallback() const
{
return mpLibreOfficeKitCallback;