sw/source/uibase/app/apphdl.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit d4240225d159db9912f565f954598052ab7a63b8 Author: Paris Oplopoios <paris.oplopo...@collabora.com> AuthorDate: Sat Apr 1 18:03:44 2023 +0300 Commit: Paris Oplopoios <parisop...@gmail.com> CommitDate: Wed Apr 5 14:09:14 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> (cherry picked from commit 0dca587be41718d2d88e80fc585829ad83da59ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149892 Tested-by: Jenkins diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 546fd6902276..5b7e7bcd9137 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> @@ -989,9 +990,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)