sw/source/uibase/app/apphdl.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 0dca587be41718d2d88e80fc585829ad83da59ea Author: Paris Oplopoios <paris.oplopo...@collabora.com> AuthorDate: Sat Apr 1 18:03:44 2023 +0300 Commit: Paris Oplopoios <parisop...@gmail.com> CommitDate: Sat Apr 1 19:29:52 2023 +0200 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 <parisop...@gmail.com> Reviewed-by: Paris Oplopoios <parisop...@gmail.com> 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)