diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2024-05-24 14:34:15 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-08-08 16:43:43 +0200 |
commit | e0daa8a142387494d8f8b331d0802da552622073 (patch) | |
tree | ba036878eba539dea655e0f4dd248bdf1e37956d /sfx2/source | |
parent | 9612789609a74980447cd0309404cecb125374c3 (diff) |
ONLINE: Add Invert document background color command.
Change-Id: Ia8868a80e4eba9a9a1c0b31077d9eca0c5b00466
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171633
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 1505e3944d55..23358e7f8cfe 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -732,7 +732,24 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) Invalidate(FN_CHANGE_THEME); break; } + case FN_INVERT_BACKGROUND: + { + svtools::EditableColorConfig aColorConfig; + ::Color aCurrentColor = aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor; + ::Color aDefLightColor = svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 0); + ::Color aDefDarkColor = svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1); + + svtools::ColorConfigValue aValue; + aValue.bIsVisible = true; + + if(aCurrentColor == aDefLightColor) + aValue.nColor = aDefDarkColor; + else + aValue.nColor = aDefLightColor; + aColorConfig.SetColorValue(svtools::DOCCOLOR, aValue); + break; + } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_HELPINDEX: { |