summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-10-14 20:17:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-10-15 21:09:34 +0200
commit75fd3093ea748e35beca1f903e7828ad82f2372f (patch)
tree77cab254a15b19c7854460cdb7523594c5078d22 /svtools
parent94e3cce5a9d8136d7c36d1ed596b995aaf47c297 (diff)
tdf#151522 drop Accessibility::AutoDetectSystemHC
which doesn't preclude having a different option to force it on/off against the system HighContrast mode setting. Change-Id: Iab9f7f501ac5fd7bb865d07b30b6fad9f1f6809c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141386 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/colorcfg.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 48889833f716..b29c7e4b3562 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -66,7 +66,6 @@ class ColorConfig_Impl : public utl::ConfigItem
{
ColorConfigValue m_aConfigValues[ColorConfigEntryCount];
OUString m_sLoadedScheme;
- bool m_bAutoDetectSystemHC;
virtual void ImplCommit() override;
@@ -94,7 +93,6 @@ public:
using ConfigItem::SetModified;
using ConfigItem::ClearModified;
void SettingsChanged();
- bool GetAutoDetectSystemHC() const {return m_bAutoDetectSystemHC;}
DECL_LINK( DataChangedEventListener, VclSimpleEvent&, void );
};
@@ -184,8 +182,7 @@ uno::Sequence< OUString> GetPropertyNames(std::u16string_view rScheme)
}
ColorConfig_Impl::ColorConfig_Impl() :
- ConfigItem("Office.UI/ColorScheme"),
- m_bAutoDetectSystemHC(true)
+ ConfigItem("Office.UI/ColorScheme")
{
//try to register on the root node - if possible
uno::Sequence < OUString > aNames(1);
@@ -237,15 +234,6 @@ void ColorConfig_Impl::Load(const OUString& rScheme)
if(pColorNames[nIndex].endsWith(g_sIsVisible))
m_aConfigValues[i].bIsVisible = Any2Bool(pColors[nIndex++]);
}
- // fdo#71511: check if we are running in a11y autodetect
- {
- utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext(comphelper::getProcessComponentContext(),"org.openoffice.Office.Common/Accessibility" );
- if(aNode.isValid())
- {
- uno::Any aValue = aNode.getNodeValue(OUString("AutoDetectSystemHC"));
- aValue >>= m_bAutoDetectSystemHC;
- }
- }
}
void ColorConfig_Impl::Notify( const uno::Sequence<OUString>& )
@@ -445,8 +433,8 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry eEntry)
default:
aRet = aAutoColors[eEntry];
}
- // fdo#71511: if in autodetected a11y HC mode, do pull background color from theme
- if(m_pImpl && m_pImpl->GetAutoDetectSystemHC())
+ // fdo#71511: if in a11y HC mode, do pull background color from theme
+ if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
{
switch(eEntry)
{