diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-18 09:26:39 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-18 09:27:27 +0100 |
commit | 9ecd31fd3fda782dd16e88fd99dc9c71361482fe (patch) | |
tree | e504141a420750d664e94f6dafb4cd41819e89b9 | |
parent | cf6cbd29fdeba54bd83a87c1165d49312dc2d2a6 (diff) |
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
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 16 | ||||
-rw-r--r-- | include/editeng/outliner.hxx | 4 | ||||
-rw-r--r-- | include/svx/svdmodel.hxx | 4 |
3 files changed, 6 insertions, 18 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 8e9f48c740b4..db1516685d61 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 8e428f2c9979..aee54ea0a025 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 901591038765..6bf3fd2ce312 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 |