From b9565ef0a73c235cd1e14fce9031db6e9237c524 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 14 Jan 2016 11:22:13 +0100 Subject: sd tiled rendering: it's pointless to send selection changes during search all But they do cause annoying flashing. Change-Id: Ic313a15429c5db98c5660a5274aa49e95dd217e5 --- svx/source/svdraw/svdmodel.cxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'svx') 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 #include #include +#include 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; -- cgit