summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/drawdoc.hxx2
-rw-r--r--sw/source/core/draw/drawdoc.cxx6
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx13
3 files changed, 21 insertions, 0 deletions
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
index 339fbc7f9c3d..97efdb5f52bf 100644
--- a/sw/inc/drawdoc.hxx
+++ b/sw/inc/drawdoc.hxx
@@ -41,6 +41,8 @@ public:
virtual SdrPage* AllocPage(bool bMasterPage) override;
virtual css::uno::Reference<css::embed::XStorage> GetDocumentStorage() const override;
+ /// Get the callback and callback data, previously given to registerLibreOfficeKitCallback().
+ void getLibreOfficeKitCallback(LibreOfficeKitCallback& rCallback, void*& rLibreOfficeKitData);
protected:
/// override of <SdrModel::createUnoModel()> is needed to provide corresponding uno model.
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 786d86f91d3a..4e295d71bc1b 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -129,6 +129,12 @@ uno::Reference<embed::XStorage> SwDrawModel::GetDocumentStorage() const
return m_pDoc->GetDocStorage();
}
+void SwDrawModel::getLibreOfficeKitCallback(LibreOfficeKitCallback& rCallback, void*& rLibreOfficeKitData)
+{
+ rCallback = mpLibreOfficeKitCallback;
+ rLibreOfficeKitData = mpLibreOfficeKitData;
+}
+
uno::Reference< uno::XInterface > SwDrawModel::createUnoModel()
{
uno::Reference< uno::XInterface > xModel;
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index d1901f60b2dd..7449887284ef 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -81,6 +81,8 @@
#include <drawinglayer/primitive2d/shadowprimitive2d.hxx>
#include <memory>
#include <comphelper/lok.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <drawdoc.hxx>
namespace
{
@@ -531,6 +533,17 @@ void SwSidebarWin::InitControls()
mpOutlinerView->SetAttribs(DefaultItem());
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // If there is a callback already registered, inform the new outliner view about it.
+ SwDrawModel* pDrawModel = mrView.GetWrtShellPtr()->getIDocumentDrawModelAccess().GetDrawModel();
+ LibreOfficeKitCallback pCallback = 0;
+ void* pData = 0;
+ pDrawModel->getLibreOfficeKitCallback(pCallback, pData);
+ mpOutlinerView->setTiledRendering(mrView.GetWrtShellPtr()->isTiledRendering());
+ mpOutlinerView->registerLibreOfficeKitCallback(pCallback, pData);
+ }
+
//create Scrollbars
mpVScrollbar = VclPtr<ScrollBar>::Create(this, WB_3DLOOK |WB_VSCROLL|WB_DRAG);
mpVScrollbar->EnableNativeWidget(false);