openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1478676 - in /openoffice/trunk/main: officecfg/registry/schema/org/openoffice/Office/ svtools/inc/svtools/ svtools/source/config/ svtools/source/inc/configitems/
Date Fri, 03 May 2013 09:01:43 GMT
Author: alg
Date: Fri May  3 09:01:43 2013
New Revision: 1478676

URL: http://svn.apache.org/r1478676
Log:
i122198 added ColorValueSetColumnCount entry to configuration, default is 12

Modified:
    openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Common.xcs
    openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx
    openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx
    openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx

Modified: openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Common.xcs
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Common.xcs?rev=1478676&r1=1478675&r2=1478676&view=diff
==============================================================================
--- openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Common.xcs (original)
+++ openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Common.xcs Fri May
 3 09:01:43 2013
@@ -6185,6 +6185,19 @@
             </info>
             <value>25</value>
           </prop>
+          <prop oor:name="ColorValueSetColumnCount" oor:type="xs:short">
+            <info>
+              <author>ALG</author>
+              <desc>
+                This option controls how many columns the ColorValueSets (the matrix-organized
dialogs for color select)
+                will have. The default is 12 and this is aligned with the layout of the standard
color palette. thus, when you
+                change this value, you should know what you do. This setting also influences
some width-oriented layouts in
+                dialogs where this ColorValueSets are used, e.g. FillStyle dialog.
+              </desc>
+              <label>Defines the number of columns that will be shown in a ColorValueSet.</label>
+            </info>
+            <value>12</value>
+          </prop>
         </group>
  		<set oor:name="OfficeObjects" oor:node-type="ObjectNames">
  			<info>

Modified: openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx?rev=1478676&r1=1478675&r2=1478676&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx (original)
+++ openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx Fri May  3 09:01:43
2013
@@ -64,6 +64,11 @@ public:
     // is in a ListBox, all will be shown, else a ScrollBar will be used
     sal_Int16   GetListBoxMaximumLineCount() const;
 
+    // option to set the width of ColorValueSets in columns; this allows
+    // adaption to own colr set layouts. The default layout is 12 columns and should
+    // only be changed when the color palette is changed from the default
+    sal_Int16   GetColorValueSetColumnCount() const;
+
     void        SetIsForPagePreviews(sal_Bool bSet);
 	void 		SetIsHelpTipsDisappear(sal_Bool bSet);
 	void 		SetIsAllowAnimatedGraphics(sal_Bool bSet);
@@ -76,6 +81,7 @@ public:
     
     void        SetEdgeBlending(sal_Int16 nSet);
     void        SetListBoxMaximumLineCount(sal_Int16 nSet);
+    void        SetColorValueSetColumnCount(sal_Int16 nSet);
 
 	sal_Bool                IsModified() const;
 	void		            Commit();

Modified: openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx?rev=1478676&r1=1478675&r2=1478676&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx (original)
+++ openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx Fri May  3 09:01:43
2013
@@ -88,6 +88,7 @@ public:
 	sal_Bool	IsSelectionInReadonly() const;
     sal_Int16   GetEdgeBlending() const;
     sal_Int16   GetListBoxMaximumLineCount() const;
+    sal_Int16   GetColorValueSetColumnCount() const;
 
 	void		SetAutoDetectSystemHC(sal_Bool bSet);
 	void		SetIsForPagePreviews(sal_Bool bSet);
@@ -100,6 +101,7 @@ public:
 	void		SetSelectionInReadonly(sal_Bool bSet);
     void        SetEdgeBlending(sal_Int16 nSet);
     void        SetListBoxMaximumLineCount(sal_Int16 nSet);
+    void        SetColorValueSetColumnCount(sal_Int16 nSet);
 
 	sal_Bool	IsModified() const { return bIsModified; };
 };
@@ -340,6 +342,24 @@ sal_Int16 SvtAccessibilityOptions_Impl::
     return nRet;
 }
 
+sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const
+{
+    css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
+    sal_Int16 nRet = 12;
+
+    try
+    {
+        if(xNode.is())
+            xNode->getPropertyValue(s_sColorValueSetColumnCount) >>= nRet;
+    }
+    catch(const css::uno::Exception& ex)
+    {
+        LogHelper::logIt(ex);
+    }
+
+    return nRet;
+}
+
 void SvtAccessibilityOptions_Impl::SetAutoDetectSystemHC(sal_Bool bSet)
 {
 	css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
@@ -556,6 +576,16 @@ void SvtAccessibilityOptions_Impl::SetVC
         StyleSettingsChanged = true;
     }
 
+    const sal_Int16 nMaxColumnCountA(GetColorValueSetColumnCount());
+    OSL_ENSURE(nMaxColumnCountA >= 0, "OOps, negative values for ColorValueSetColumnCount
are not allowed (!)");
+    const sal_uInt16 nMaxColumnCountB(static_cast< sal_uInt16 >(nMaxColumnCountA >=
0 ? nMaxColumnCountA : 0));
+
+    if(aStyleSettings.GetColorValueSetColumnCount() != nMaxColumnCountB)
+    {
+        aStyleSettings.SetColorValueSetColumnCount(nMaxColumnCountB);
+        StyleSettingsChanged = true;
+    }
+
     if(StyleSettingsChanged)
     {
         aAllSettings.SetStyleSettings(aStyleSettings);
@@ -605,6 +635,26 @@ void SvtAccessibilityOptions_Impl::SetLi
     }
 }
 
+void SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(sal_Int16 nSet)
+{
+    css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
+
+    try
+    {
+        if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetColumnCount)!=nSet)
+        {
+            xNode->setPropertyValue(s_sColorValueSetColumnCount, css::uno::makeAny(nSet));
+            ::comphelper::ConfigurationHelper::flush(m_xCfg);
+
+            bIsModified = sal_True;
+        }
+    }
+    catch(const css::uno::Exception& ex)
+    {
+        LogHelper::logIt(ex);
+    }
+}
+
 // -----------------------------------------------------------------------
 // class SvtAccessibilityOptions --------------------------------------------------
 
@@ -715,6 +765,10 @@ sal_Int16 SvtAccessibilityOptions::GetLi
 {
     return sm_pSingleImplConfig->GetListBoxMaximumLineCount();
 }
+sal_Int16 SvtAccessibilityOptions::GetColorValueSetColumnCount() const
+{
+    return sm_pSingleImplConfig->GetColorValueSetColumnCount();
+}
 
 // -----------------------------------------------------------------------
 void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet)
@@ -765,4 +819,9 @@ void SvtAccessibilityOptions::SetListBox
 {
     sm_pSingleImplConfig->SetListBoxMaximumLineCount(nSet);
 }
+void SvtAccessibilityOptions::SetColorValueSetColumnCount(sal_Int16 nSet)
+{
+    sm_pSingleImplConfig->SetColorValueSetColumnCount(nSet);
+}
+
 // -----------------------------------------------------------------------

Modified: openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx?rev=1478676&r1=1478675&r2=1478676&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx (original)
+++ openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx Fri
May  3 09:01:43 2013
@@ -31,18 +31,19 @@
 
 namespace
 {
-	static const ::rtl::OUString s_sAccessibility           = ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/Accessibility");
-	static const ::rtl::OUString s_sAutoDetectSystemHC      = ::rtl::OUString::createFromAscii("AutoDetectSystemHC");
-	static const ::rtl::OUString s_sIsForPagePreviews       = ::rtl::OUString::createFromAscii("IsForPagePreviews");
-	static const ::rtl::OUString s_sIsHelpTipsDisappear     = ::rtl::OUString::createFromAscii("IsHelpTipsDisappear");
-	static const ::rtl::OUString s_sHelpTipSeconds          = ::rtl::OUString::createFromAscii("HelpTipSeconds");
-	static const ::rtl::OUString s_sIsAllowAnimatedGraphics = ::rtl::OUString::createFromAscii("IsAllowAnimatedGraphics");
-	static const ::rtl::OUString s_sIsAllowAnimatedText     = ::rtl::OUString::createFromAscii("IsAllowAnimatedText");
-	static const ::rtl::OUString s_sIsAutomaticFontColor    = ::rtl::OUString::createFromAscii("IsAutomaticFontColor");
-	static const ::rtl::OUString s_sIsSystemFont            = ::rtl::OUString::createFromAscii("IsSystemFont");
-	static const ::rtl::OUString s_sIsSelectionInReadonly   = ::rtl::OUString::createFromAscii("IsSelectionInReadonly");
-    static const ::rtl::OUString s_sEdgeBlending            = ::rtl::OUString::createFromAscii("EdgeBlending");
-    static const ::rtl::OUString s_sListBoxMaximumLineCount = ::rtl::OUString::createFromAscii("ListBoxMaximumLineCount");
+	static const ::rtl::OUString s_sAccessibility               = ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/Accessibility");
+	static const ::rtl::OUString s_sAutoDetectSystemHC          = ::rtl::OUString::createFromAscii("AutoDetectSystemHC");
+	static const ::rtl::OUString s_sIsForPagePreviews           = ::rtl::OUString::createFromAscii("IsForPagePreviews");
+	static const ::rtl::OUString s_sIsHelpTipsDisappear         = ::rtl::OUString::createFromAscii("IsHelpTipsDisappear");
+	static const ::rtl::OUString s_sHelpTipSeconds              = ::rtl::OUString::createFromAscii("HelpTipSeconds");
+	static const ::rtl::OUString s_sIsAllowAnimatedGraphics     = ::rtl::OUString::createFromAscii("IsAllowAnimatedGraphics");
+	static const ::rtl::OUString s_sIsAllowAnimatedText         = ::rtl::OUString::createFromAscii("IsAllowAnimatedText");
+	static const ::rtl::OUString s_sIsAutomaticFontColor        = ::rtl::OUString::createFromAscii("IsAutomaticFontColor");
+	static const ::rtl::OUString s_sIsSystemFont                = ::rtl::OUString::createFromAscii("IsSystemFont");
+	static const ::rtl::OUString s_sIsSelectionInReadonly       = ::rtl::OUString::createFromAscii("IsSelectionInReadonly");
+    static const ::rtl::OUString s_sEdgeBlending                = ::rtl::OUString::createFromAscii("EdgeBlending");
+    static const ::rtl::OUString s_sListBoxMaximumLineCount     = ::rtl::OUString::createFromAscii("ListBoxMaximumLineCount");
+    static const ::rtl::OUString s_sColorValueSetColumnCount    = ::rtl::OUString::createFromAscii("ColorValueSetColumnCount");
 }
 
 #endif //  INCLUDE_CONFIGITEMS_ACCESSIBILITYOPTIONS_CONST_HXX



Mime
View raw message