summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-14 11:06:08 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-14 13:40:35 +0100
commitdacc616f7020d045a1cfdb3806436e06046dae10 (patch)
tree1e954609f48bbbf69f40e9ae74edddbaba8c168f /sw/source/uibase
parente320d070bb0d4dd0ceb696f2c7cc5afb7c4273c3 (diff)
sw lok comments: fix callback of newly created outliner views
SwPostItMgr::registerLibreOfficeKitCallback() already took care of informing existing outliners, this commit gives a callback to newly registered ones as well. Change-Id: I660dcb54231a9d404bf80b4284003d119dae6a5c
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx13
1 files changed, 13 insertions, 0 deletions
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);