diff options
author | Siqi Liu <me@siqi.fr> | 2015-04-14 00:55:04 +0200 |
---|---|---|
committer | Siqi Liu <me@siqi.fr> | 2015-04-14 00:55:17 +0200 |
commit | afb82d3729bda2754d0add08cc6c4dce1dc76d59 (patch) | |
tree | 9b457709d2e7cabaf927fc12241f9d937bc1d41c | |
parent | 855b0af13803c810593ed16ad65eed542d023756 (diff) |
implement SfxObjectShell subclasses' LOK interface
Change-Id: Iee2fbf71375631a349992a90c67c1c4c34e6ba3b
-rw-r--r-- | sc/inc/document.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawDocShell.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 1 |
6 files changed, 33 insertions, 0 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index a9f538096c9b..b88ffecbc56c 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -766,6 +766,7 @@ public: SfxBindings* GetViewBindings(); SfxObjectShell* GetDocumentShell() const { return pShell; } SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return pDrawLayer; } + SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return pDrawLayer; } SfxBroadcaster* GetDrawBroadcaster(); // to avoid header void BeginDrawUndo(); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 1261dab65c72..79ce486e6e6c 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -3181,4 +3181,14 @@ bool ScDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal return bRes; } +void ScDocShell::libreOfficeKitCallback(int nType, const char* pPayload) const +{ + aDocument.GetDrawLayer()->libreOfficeKitCallback(nType, pPayload); +} + +bool ScDocShell::isTiledRendering() const +{ + return aDocument.GetDrawLayer()->isTiledRendering(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 340508c1601c..5cd1d00d04fc 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -430,6 +430,9 @@ public: virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ) SAL_OVERRIDE; void SnapVisArea( Rectangle& rRect ) const; + + virtual void libreOfficeKitCallback(int nType, const char* pPayload) const SAL_OVERRIDE; + virtual bool isTiledRendering() const SAL_OVERRIDE; }; void UpdateAcceptChangesDialog(); diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index b848becc4ffb..f51d93407a23 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -468,6 +468,21 @@ void DrawDocShell::ClearUndoBuffer() pUndoManager->Clear(); } +void DrawDocShell::libreOfficeKitCallback(int nType, const char* pPayload) const +{ + if (mpDoc) + mpDoc->libreOfficeKitCallback(nType, pPayload); +} + +bool DrawDocShell::isTiledRendering() const +{ + if (!mpDoc) + return false; + return mpDoc->isTiledRendering(); +} + + + } // end of namespace sd /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index bd7fec402ab5..5b25bb8d7339 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -204,6 +204,9 @@ public: void ClearUndoBuffer(); + virtual void libreOfficeKitCallback(int nType, const char* pPayload) const SAL_OVERRIDE; + virtual bool isTiledRendering() const SAL_OVERRIDE; + protected: SdDrawDocument* mpDoc; diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 40d1e195e0a5..6fdc6916dd79 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -646,6 +646,7 @@ bool SfxObjectShell::IsModifyPasswordEntered() void SfxObjectShell::libreOfficeKitCallback(SAL_UNUSED_PARAMETER int nType, SAL_UNUSED_PARAMETER const char* pPayload) const { SAL_WARN("tiled-rendering", "LOK callback interface not overridden for SfxObjectShell subclass typeId: " << typeid(*this).name()); } + bool SfxObjectShell::isTiledRendering() const { SAL_WARN("tiled-rendering", "LOK callback interface not overridden for SfxObjectShell subclass typeId: " << typeid(*this).name()); return false; |