summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-05-07 09:37:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-18 16:46:39 +0100
commit60446a0386b6d40899f6817c9545414841ee3522 (patch)
tree252dfdcd5abf55c39d160d801803ab2ddc0ec0c4 /svtools
parent72703332ff42a70d19050d78a63286b9a9b6f930 (diff)
Related: #i122120# corrected flag for drawing checkerboards...
adapted previews, added to configuration (cherry picked from commit c17e634e125f524d153e1ad8febff6d11b810ee4) Conflicts: officecfg/registry/schema/org/openoffice/Office/Common.xcs svtools/inc/svtools/accessibilityoptions.hxx svtools/source/inc/configitems/accessibilityoptions_const.hxx vcl/inc/vcl/settings.hxx Change-Id: I3f4fd9525e31cd816599b963ecd2fa42b1f666d7
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/accessibilityoptions.cxx57
1 files changed, 57 insertions, 0 deletions
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index 679d7ac9291c..6ba0a24574bb 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -59,6 +59,7 @@ namespace
const char s_sColorValueSetColumnCount[] = "ColorValueSetColumnCount";
const char s_sEdgeBlending[] = "EdgeBlending";
const char s_sListBoxMaximumLineCount[] = "ListBoxMaximumLineCount";
+ const char s_sPreviewUsesCheckeredBackground[] = "PreviewUsesCheckeredBackground";
}
// class SvtAccessibilityOptions_Impl ---------------------------------------------
@@ -86,6 +87,7 @@ public:
sal_Int16 GetEdgeBlending() const;
sal_Int16 GetListBoxMaximumLineCount() const;
sal_Int16 GetColorValueSetColumnCount() const;
+ sal_Bool GetPreviewUsesCheckeredBackground() const;
void SetAutoDetectSystemHC(sal_Bool bSet);
void SetIsForPagePreviews(sal_Bool bSet);
@@ -99,6 +101,7 @@ public:
void SetEdgeBlending(sal_Int16 nSet);
void SetListBoxMaximumLineCount(sal_Int16 nSet);
void SetColorValueSetColumnCount(sal_Int16 nSet);
+ void SetPreviewUsesCheckeredBackground(sal_Bool bSet);
sal_Bool IsModified() const { return bIsModified; };
};
@@ -357,6 +360,24 @@ sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const
return nRet;
}
+sal_Bool SvtAccessibilityOptions_Impl::GetPreviewUsesCheckeredBackground() const
+{
+ css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
+ sal_Bool bRet = sal_False;
+
+ try
+ {
+ if(xNode.is())
+ xNode->getPropertyValue(s_sPreviewUsesCheckeredBackground) >>= bRet;
+ }
+ catch(const css::uno::Exception& ex)
+ {
+ SAL_WARN("svtools", "Caught unexpected: " << ex.Message);
+ }
+
+ return bRet;
+}
+
void SvtAccessibilityOptions_Impl::SetAutoDetectSystemHC(sal_Bool bSet)
{
css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
@@ -583,6 +604,14 @@ void SvtAccessibilityOptions_Impl::SetVCLSettings()
StyleSettingsChanged = true;
}
+ const bool bPreviewUsesCheckeredBackground(GetPreviewUsesCheckeredBackground());
+
+ if(aStyleSettings.GetPreviewUsesCheckeredBackground() != bPreviewUsesCheckeredBackground)
+ {
+ aStyleSettings.SetPreviewUsesCheckeredBackground(bPreviewUsesCheckeredBackground);
+ StyleSettingsChanged = true;
+ }
+
if(StyleSettingsChanged)
{
aAllSettings.SetStyleSettings(aStyleSettings);
@@ -652,6 +681,26 @@ void SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(sal_Int16 nSet)
}
}
+void SvtAccessibilityOptions_Impl::SetPreviewUsesCheckeredBackground(sal_Bool bSet)
+{
+ css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
+
+ try
+ {
+ if(xNode.is() && xNode->getPropertyValue(s_sPreviewUsesCheckeredBackground)!=bSet)
+ {
+ xNode->setPropertyValue(s_sPreviewUsesCheckeredBackground, css::uno::makeAny(bSet));
+ ::comphelper::ConfigurationHelper::flush(m_xCfg);
+
+ bIsModified = sal_True;
+ }
+ }
+ catch(const css::uno::Exception& ex)
+ {
+ SAL_WARN("svtools", "Caught unexpected: " << ex.Message);
+ }
+}
+
// -----------------------------------------------------------------------
// class SvtAccessibilityOptions --------------------------------------------------
@@ -756,6 +805,10 @@ sal_Int16 SvtAccessibilityOptions::GetColorValueSetColumnCount() const
{
return sm_pSingleImplConfig->GetColorValueSetColumnCount();
}
+sal_Bool SvtAccessibilityOptions::GetPreviewUsesCheckeredBackground() const
+{
+ return sm_pSingleImplConfig->GetPreviewUsesCheckeredBackground();
+}
// -----------------------------------------------------------------------
void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet)
@@ -810,6 +863,10 @@ void SvtAccessibilityOptions::SetColorValueSetColumnCount(sal_Int16 nSet)
{
sm_pSingleImplConfig->SetColorValueSetColumnCount(nSet);
}
+void SvtAccessibilityOptions::SetPreviewUsesCheckeredBackground(sal_Bool bSet)
+{
+ sm_pSingleImplConfig->SetPreviewUsesCheckeredBackground(bSet);
+}
// -----------------------------------------------------------------------