[Libreoffice-commits] core.git: sc/inc sc/source sd/source sfx2/source

Siqi Liu me at siqi.fr
Mon Apr 13 15:55:49 PDT 2015


 sc/inc/document.hxx                |    1 +
 sc/source/ui/docshell/docsh.cxx    |   10 ++++++++++
 sc/source/ui/inc/docsh.hxx         |    3 +++
 sd/source/ui/docshell/docshell.cxx |   15 +++++++++++++++
 sd/source/ui/inc/DrawDocShell.hxx  |    3 +++
 sfx2/source/doc/objcont.cxx        |    1 +
 6 files changed, 33 insertions(+)

New commits:
commit afb82d3729bda2754d0add08cc6c4dce1dc76d59
Author: Siqi Liu <me at siqi.fr>
Date:   Tue Apr 14 00:55:04 2015 +0200

    implement SfxObjectShell subclasses' LOK interface
    
    Change-Id: Iee2fbf71375631a349992a90c67c1c4c34e6ba3b

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index a9f5380..b88ffec 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 1261dab..79ce486 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 340508c..5cd1d00 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 b848bec..f51d934 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 bd7fec4..5b25bb8 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 40d1e19..6fdc691 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;


More information about the Libreoffice-commits mailing list