summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-11-27 10:34:56 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-11-28 09:36:08 +0100
commit8c727d1a9a8cfdc309896ed02c546e192e006575 (patch)
tree9fd555e28dd24e25360d14cfb583c9ef017e4622 /sfx2
parentcd2ba8cd78c1cd66d5c74e5d35acdcda1bf5abbc (diff)
Always send theme-change in kit-mode even if the global theme is the same
Kit explicitly ignores changes to the global color scheme, except for the current ViewShell, so an attempted change to the same global color scheme when the now current ViewShell ignored the last change requires re-sending the change. In which case individual shells will have to decide if this color-scheme change is a change from their perspective to avoid unnecessary invalidations. Add ConfigurationHints::OnlyCurrentDocumentColorScheme as the hint that only the document color scheme has changed, so individual shells can see if their document color scheme is different to this new color scheme and not invalidate if unnecessary. So dark/light mode changes work properly without reintroducing unwanted invalidations. Change-Id: I5ebb4878694ceb6b9afe26286a30da06ea6ff3ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160002 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appserv.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 9c1b3c9d2a57..aa0699e78137 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -594,7 +594,12 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
}
const OUString& rSchemeName = pNewThemeArg->GetValue();
svtools::EditableColorConfig aEditableConfig;
- if (aEditableConfig.GetCurrentSchemeName() != rSchemeName)
+ // kit explicitly ignores changes to the global color scheme, except for the current ViewShell,
+ // so an attempted change to the same global color scheme when the now current ViewShell ignored
+ // the last change requires re-sending the change. In which case individual shells will have to
+ // decide if this color-scheme change is a change from their perspective to avoid unnecessary
+ // invalidations.
+ if (aEditableConfig.GetCurrentSchemeName() != rSchemeName || comphelper::LibreOfficeKit::isActive())
aEditableConfig.LoadScheme(rSchemeName);
break;
}