summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/view.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview/view.cxx')
-rw-r--r--sw/source/uibase/uiview/view.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index b035e53eb38f..dcd88c9e05d4 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <hintids.hxx>
#include <comphelper/string.hxx>
+#include <comphelper/lok.hxx>
#include <o3tl/any.hxx>
#include <o3tl/string_view.hxx>
#include <officecfg/Office/Common.hxx>
@@ -100,7 +101,7 @@
#include <PostItMgr.hxx>
#include <annotsh.hxx>
#include <swruler.hxx>
-
+#include <svx/theme/ThemeColorPaletteManager.hxx>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
@@ -1177,6 +1178,18 @@ SwView::~SwView()
m_pFormatClipboard.reset();
}
+void SwView::afterCallbackRegistered()
+{
+ if (!comphelper::LibreOfficeKit::isActive())
+ return;
+ auto* pDocShell = GetDocShell();
+ if (pDocShell)
+ {
+ svx::ThemeColorPaletteManager aManager(pDocShell->GetThemeColors());
+ libreOfficeKitViewCallback(LOK_CALLBACK_COLOR_PALETTES, aManager.generateJSON());
+ }
+}
+
SwDocShell* SwView::GetDocShell()
{
SfxObjectShell* pDocShell = GetViewFrame().GetObjectShell();