summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-01-16 23:21:53 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-01-16 23:38:30 +0100
commit7f7a0275be241b8a5e1d1cda0a1da613e3af61d3 (patch)
treed37e982980425971daf87655515977baca4f2fc1
parent31321832dc043b959c6a3b6a6a1f4c49576d3751 (diff)
fdo#71511: reload ColorConfig after tweaking relevant a11y settings
note that the autodetect HC option is somewhat broken anyway: it resets the icon theme hard, so there are not simple roundtrips enableing/disabling it for that, but those havent been there before either. Change-Id: Ia35a41717224dfb7437054bb885c61d7e0b189d7
-rw-r--r--include/svtools/colorcfg.hxx1
-rw-r--r--svtools/source/config/accessibilityoptions.cxx4
-rw-r--r--svtools/source/config/colorcfg.cxx5
3 files changed, 9 insertions, 1 deletions
diff --git a/include/svtools/colorcfg.hxx b/include/svtools/colorcfg.hxx
index 2872f4c03977..ddc84850bf71 100644
--- a/include/svtools/colorcfg.hxx
+++ b/include/svtools/colorcfg.hxx
@@ -105,6 +105,7 @@ public:
// instead of the automatic color
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, sal_Bool bSmart = sal_True)const;
static Color GetDefaultColor(ColorConfigEntry eEntry);
+ void Reload();
};
class SVT_DLLPUBLIC EditableColorConfig
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index 4294e7cc091a..84f0e1c30b7e 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -31,6 +31,8 @@
#include <svl/smplhint.hxx>
+#include <svtools/colorcfg.hxx>
+
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <rtl/instance.hxx>
@@ -386,7 +388,7 @@ void SvtAccessibilityOptions_Impl::SetAutoDetectSystemHC(sal_Bool bSet)
{
xNode->setPropertyValue(s_sAutoDetectSystemHC, css::uno::makeAny(bSet));
::comphelper::ConfigurationHelper::flush(m_xCfg);
-
+ svtools::ColorConfig().Reload();
bIsModified = sal_True;
}
}
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 81a1b20440d5..a8e5ba89929a 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -510,6 +510,11 @@ ColorConfigValue ColorConfig::GetColorValue(ColorConfigEntry eEntry, sal_Bool bS
return aRet;
}
+void ColorConfig::Reload()
+{
+ m_pImpl->Load(OUString());
+}
+
EditableColorConfig::EditableColorConfig() :
m_pImpl(new ColorConfig_Impl),
m_bModified(sal_False)