summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParis Oplopoios <paris.oplopoios@collabora.com>2023-04-01 18:03:44 +0300
committerParis Oplopoios <parisoplop@gmail.com>2023-04-01 19:29:52 +0200
commit0dca587be41718d2d88e80fc585829ad83da59ea (patch)
treebd488ebc34dc0dd05346e50c95f3cb899ba8e68d
parent5a563abb2c8d1d6c981ebfaa7247395a86a7ec84 (diff)
Notify LOK that application background color has been changed
Notify LOK when the application background color changes in Writer Change-Id: Ibc900cc8b3253aaa5b53602a007566896f04d9df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149906 Tested-by: Paris Oplopoios <parisoplop@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
-rw-r--r--sw/source/uibase/app/apphdl.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index ed1c5ee792d4..1bf1145a5dec 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -80,6 +80,7 @@
#include <comphelper/dispatchcommand.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/lok.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <salhelper/simplereferenceobject.hxx>
#include <rtl/ref.hxx>
@@ -984,9 +985,15 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con
{
SwViewOption aNewOptions = *pSwView->GetWrtShell().GetViewOptions();
aNewOptions.SetThemeName(m_pColorConfig->GetCurrentSchemeName());
- aNewOptions.SetColorConfig(*m_pColorConfig);
+ SwViewColors aViewColors(*m_pColorConfig);
+ aNewOptions.SetColorConfig(aViewColors);
pSwView->GetWrtShell().ApplyViewOptions(aNewOptions);
pViewShell->GetWindow()->Invalidate();
+ if (bOnlyInvalidateCurrentView)
+ {
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR,
+ aViewColors.m_aAppBackgroundColor.AsRGBHexString().toUtf8().getStr());
+ }
}
}
if (bOnlyInvalidateCurrentView)