editeng/source/editeng/impedit.cxx | 16 ++-------------- include/editeng/outliner.hxx | 4 ++-- include/svx/svdmodel.hxx | 4 ++-- 3 files changed, 6 insertions(+), 18 deletions(-)
New commits: commit 9ecd31fd3fda782dd16e88fd99dc9c71361482fe Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Feb 18 09:26:39 2016 +0100 Fix SdrModel::libreOfficeKitCallback() vs ImpEditView duplication It's better if ImpEditView doesn't have a copy of the event types which should be ignored during searching. Change-Id: I9044b9a6af4e3f8e5bf75973e1f975fb45ec72cf diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 8e9f48c..db15166 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -128,20 +128,8 @@ void ImpEditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallbac void ImpEditView::libreOfficeKitCallback(int nType, const char* pPayload) const { - if (mpLibreOfficeKitSearchable && mpLibreOfficeKitSearchable->isTiledSearching()) - { - 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); + if (mpLibreOfficeKitSearchable) + mpLibreOfficeKitSearchable->libreOfficeKitCallback(nType, pPayload); } void ImpEditView::SetEditSelection( const EditSelection& rEditSelection ) diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 8e428f2..aee54ea 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -376,13 +376,13 @@ public: void SetEndCutPasteLinkHdl(const Link<LinkParamNone*,void> &rLink) { aEndCutPasteLink = rLink; } }; -/// Interface class to know if we do tiled searching. +/// Interface class to not depend on SdrModel in editeng. class EDITENG_DLLPUBLIC OutlinerSearchable { public: virtual ~OutlinerSearchable(); - virtual bool isTiledSearching() const = 0; + virtual void libreOfficeKitCallback(int nType, const char* pPayload) const = 0; }; // some thesaurus functionality to avoid code duplication in different projects... diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index 9015910..6bf3fd2 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -341,11 +341,11 @@ public: /// Gets the LOK data registered by registerLibreOfficeKitCallback(). void* getLibreOfficeKitData() const; /// Invokes the registered callback, if there are any. - void libreOfficeKitCallback(int nType, const char* pPayload) const; + void libreOfficeKitCallback(int nType, const char* pPayload) const override; /// Set if we are doing tiled searching. void setTiledSearching(bool bTiledSearching); /// Are we doing tiled searching? - bool isTiledSearching() const override; + bool isTiledSearching() const; // If a new MapMode is set on the RefDevice (or similar) void RefDeviceChanged(); // not yet implemented // default font height in logical units _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits