diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-10 16:42:00 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-12 22:06:35 -0400 |
commit | 6bda991914d6e0d08db1ec7f8b1fe80701a8b583 (patch) | |
tree | 8d530348ca4cae8a7169e069ef8697e6c02ad683 /include/editeng/outliner.hxx | |
parent | ebd3cb79940bb08fa3aa1578859e3d6a550fae7e (diff) |
editeng: implement per-view LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
Given that the per-view callback is in SfxViewShell, and editeng doesn't
depend on sfx2, add an interface class in editeng to invert the
dependency.
With this, gtktiledviewer no longer crashes when starting editeng text
edit with per-view callbacks.
Change-Id: I783cdc646b890a6b597000f1d88428c8042417cf
Reviewed-on: https://gerrit.libreoffice.org/26169
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 89bbd0ecbf18a1e9030e49443fa15d068b19f767)
Diffstat (limited to 'include/editeng/outliner.hxx')
-rw-r--r-- | include/editeng/outliner.hxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index b5186b56f270..50dafd4b7178 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -73,6 +73,7 @@ class SvxForbiddenCharactersTable; class OverflowingText; class NonOverflowingText; class OutlinerSearchable; +class OutlinerViewCallable; namespace svl { @@ -273,8 +274,10 @@ public: void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor(); - /// @see vcl::ITiledRenderable::registerCallback(). + /// Registers a LOK model callback. void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable); + /// Registers a LOK view callback. + void registerLibreOfficeKitViewCallback(OutlinerViewCallable* pCallable); SfxItemSet GetAttribs(); @@ -385,6 +388,16 @@ public: virtual void libreOfficeKitCallback(int nType, const char* pPayload) const = 0; }; +/// Interface class to not depend on SfxViewShell in editeng, meant to replace OutlinerSearchable at the end. +class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI OutlinerViewCallable +{ +public: + virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const = 0; + +protected: + ~OutlinerViewCallable() throw () {} +}; + // some thesaurus functionality to avoid code duplication in different projects... bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( OUString &rStatusVal, LanguageType &rLang, const EditView &rEditView ); void EDITENG_DLLPUBLIC ReplaceTextWithSynonym( EditView &rEditView, const OUString &rSynonmText ); |