Kaydet (Commit) afb82d37 authored tarafından Siqi Liu's avatar Siqi Liu

implement SfxObjectShell subclasses' LOK interface

Change-Id: Iee2fbf71375631a349992a90c67c1c4c34e6ba3b
üst 855b0af1
...@@ -766,6 +766,7 @@ public: ...@@ -766,6 +766,7 @@ public:
SfxBindings* GetViewBindings(); SfxBindings* GetViewBindings();
SfxObjectShell* GetDocumentShell() const { return pShell; } SfxObjectShell* GetDocumentShell() const { return pShell; }
SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return pDrawLayer; } SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return pDrawLayer; }
SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return pDrawLayer; }
SfxBroadcaster* GetDrawBroadcaster(); // to avoid header SfxBroadcaster* GetDrawBroadcaster(); // to avoid header
void BeginDrawUndo(); void BeginDrawUndo();
......
...@@ -3181,4 +3181,14 @@ bool ScDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal ...@@ -3181,4 +3181,14 @@ bool ScDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
return bRes; 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -430,6 +430,9 @@ public: ...@@ -430,6 +430,9 @@ public:
virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ) SAL_OVERRIDE; virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ) SAL_OVERRIDE;
void SnapVisArea( Rectangle& rRect ) const; void SnapVisArea( Rectangle& rRect ) const;
virtual void libreOfficeKitCallback(int nType, const char* pPayload) const SAL_OVERRIDE;
virtual bool isTiledRendering() const SAL_OVERRIDE;
}; };
void UpdateAcceptChangesDialog(); void UpdateAcceptChangesDialog();
......
...@@ -468,6 +468,21 @@ void DrawDocShell::ClearUndoBuffer() ...@@ -468,6 +468,21 @@ void DrawDocShell::ClearUndoBuffer()
pUndoManager->Clear(); 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 } // end of namespace sd
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -204,6 +204,9 @@ public: ...@@ -204,6 +204,9 @@ public:
void ClearUndoBuffer(); void ClearUndoBuffer();
virtual void libreOfficeKitCallback(int nType, const char* pPayload) const SAL_OVERRIDE;
virtual bool isTiledRendering() const SAL_OVERRIDE;
protected: protected:
SdDrawDocument* mpDoc; SdDrawDocument* mpDoc;
......
...@@ -646,6 +646,7 @@ bool SfxObjectShell::IsModifyPasswordEntered() ...@@ -646,6 +646,7 @@ bool SfxObjectShell::IsModifyPasswordEntered()
void SfxObjectShell::libreOfficeKitCallback(SAL_UNUSED_PARAMETER int nType, SAL_UNUSED_PARAMETER const char* pPayload) const { 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()); SAL_WARN("tiled-rendering", "LOK callback interface not overridden for SfxObjectShell subclass typeId: " << typeid(*this).name());
} }
bool SfxObjectShell::isTiledRendering() const { bool SfxObjectShell::isTiledRendering() const {
SAL_WARN("tiled-rendering", "LOK callback interface not overridden for SfxObjectShell subclass typeId: " << typeid(*this).name()); SAL_WARN("tiled-rendering", "LOK callback interface not overridden for SfxObjectShell subclass typeId: " << typeid(*this).name());
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment