summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-02 11:43:39 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-02 11:13:48 +0000
commit0762a119fc0a17b80dab1e49fb832a2214f85fdc (patch)
tree707aa8239a80e37ba353f12282ba40365a8f8696 /include
parent9162c483bcc6288cc2a92503b6ec34d58496327b (diff)
editeng: make SfxUndoAction::GetViewShellId() interface available
Extend the existing OutlinerViewCallable interface to be able to obtain the view shell ID of a view shell, even from editeng. Change-Id: I13708b0e4f58ee86643b913c7d21de022a685223 Reviewed-on: https://gerrit.libreoffice.org/27788 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/editview.hxx7
-rw-r--r--include/editeng/outliner.hxx12
-rw-r--r--include/sfx2/viewsh.hxx5
3 files changed, 12 insertions, 12 deletions
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index b8d16cefd22d..3175cd0d10c8 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -35,8 +35,7 @@
class EditEngine;
class ImpEditEngine;
class ImpEditView;
-class OutlinerSearchable;
-class OutlinerViewCallable;
+class OutlinerViewShell;
class SvxSearchItem;
class SvxFieldItem;
namespace vcl { class Window; }
@@ -183,8 +182,8 @@ public:
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
- /// Register a LOK view callback.
- void registerLibreOfficeKitViewCallback(OutlinerViewCallable *pCallable);
+ /// Informs this edit view about which view shell contains it.
+ void RegisterViewShell(OutlinerViewShell* pViewShell);
void SetControlWord( EVControlBits nWord );
EVControlBits GetControlWord() const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index f019696d43e0..495352b044e6 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -72,8 +72,7 @@ class SvKeyValueIterator;
class SvxForbiddenCharactersTable;
class OverflowingText;
class NonOverflowingText;
-class OutlinerSearchable;
-class OutlinerViewCallable;
+class OutlinerViewShell;
namespace svl
{
@@ -270,8 +269,8 @@ public:
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor();
- /// Registers a LOK view callback.
- void registerLibreOfficeKitViewCallback(OutlinerViewCallable* pCallable);
+ /// Informs this edit view about which view shell contains it.
+ void RegisterViewShell(OutlinerViewShell* pViewShell);
SfxItemSet GetAttribs();
@@ -374,13 +373,14 @@ public:
};
/// Interface class to not depend on SfxViewShell in editeng.
-class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI OutlinerViewCallable
+class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI OutlinerViewShell
{
public:
virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const = 0;
+ virtual sal_uInt32 GetViewShellId() const = 0;
protected:
- ~OutlinerViewCallable() throw () {}
+ ~OutlinerViewShell() throw () {}
};
// some thesaurus functionality to avoid code duplication in different projects...
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index f6e5777bee1d..62df5542da7f 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -141,7 +141,7 @@ template<class T> bool checkSfxViewShell(const SfxViewShell* pShell)
return dynamic_cast<const T*>(pShell) != nullptr;
}
-class SFX2_DLLPUBLIC SfxViewShell: public SfxShell, public SfxListener, public OutlinerViewCallable
+class SFX2_DLLPUBLIC SfxViewShell: public SfxShell, public SfxListener, public OutlinerViewShell
{
#ifdef INCLUDED_SFX2_VIEWSH_HXX
friend class SfxViewFrame;
@@ -334,7 +334,8 @@ public:
/// See lok::Document::getPart().
virtual int getPart() const;
virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
- sal_uInt32 GetViewShellId() const;
+ /// See OutlinerViewShell::GetViewShellId().
+ sal_uInt32 GetViewShellId() const override;
};