openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1470611 [1/2] - in /openoffice/trunk/main: cui/source/tabpages/ officecfg/registry/schema/org/openoffice/Office/ svtools/inc/svtools/ svtools/source/config/ svtools/source/control/ svtools/source/inc/configitems/ svx/inc/svx/ svx/source/di...
Date Mon, 22 Apr 2013 16:38:06 GMT
Author: alg
Date: Mon Apr 22 16:38:05 2013
New Revision: 1470611

URL: http://svn.apache.org/r1470611
Log:
i122041 More unifications for FillStyles, better defaults, better preview visualizations

Modified:
    openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx
    openoffice/trunk/main/officecfg/registry/schema/org/openoffice/Office/Common.xcs
    openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx
    openoffice/trunk/main/svtools/inc/svtools/valueset.hxx
    openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx
    openoffice/trunk/main/svtools/source/control/ctrlbox.cxx
    openoffice/trunk/main/svtools/source/control/valueset.cxx
    openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx
    openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx
    openoffice/trunk/main/svx/inc/svx/xtable.hxx
    openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx
    openoffice/trunk/main/svx/source/sidebar/area/AreaPropertyPanel.cxx
    openoffice/trunk/main/svx/source/sidebar/line/LinePropertyPanel.cxx
    openoffice/trunk/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
    openoffice/trunk/main/svx/source/tbxctrls/SvxColorValueSet.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtable.cxx
    openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx
    openoffice/trunk/main/vcl/inc/ilstbox.hxx
    openoffice/trunk/main/vcl/inc/vcl/combobox.hxx
    openoffice/trunk/main/vcl/inc/vcl/lstbox.hxx
    openoffice/trunk/main/vcl/inc/vcl/settings.hxx
    openoffice/trunk/main/vcl/source/app/settings.cxx
    openoffice/trunk/main/vcl/source/control/combobox.cxx
    openoffice/trunk/main/vcl/source/control/ilstbox.cxx
    openoffice/trunk/main/vcl/source/control/lstbox.cxx

Modified: openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx (original)
+++ openoffice/trunk/main/cui/source/tabpages/tpbitmap.cxx Mon Apr 22 16:38:05 2013
@@ -593,8 +593,8 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl
 		if( pEntry )
 		{
 			pBitmapList->Insert( pEntry );
-            const Size aUiSize(pBitmapList->getUiBitmapWidth(), pBitmapList->getUiBitmapHeight());
-			aLbBitmaps.Append(aUiSize, *pEntry );
+            const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+			aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
 			aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
 
 #ifdef WNT
@@ -701,8 +701,8 @@ IMPL_LINK( SvxBitmapTabPage, ClickImport
 				XBitmapEntry* pEntry = new XBitmapEntry( aGraphic, aName );
 				pBitmapList->Insert( pEntry );
 
-                const Size aUiSize(pBitmapList->getUiBitmapWidth(), pBitmapList->getUiBitmapHeight());
-				aLbBitmaps.Append(aUiSize, *pEntry );
+                const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+                aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
 				aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
 
 #ifdef WNT
@@ -757,7 +757,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModify
 		long nCount = pBitmapList->Count();
 		sal_Bool bDifferent = sal_False;
 		sal_Bool bLoop = sal_True;
-        const Size aUiSize(pBitmapList->getUiBitmapWidth(), pBitmapList->getUiBitmapHeight());
+        const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
 
 		while( bLoop && pDlg->Execute() == RET_OK )
 		{
@@ -782,7 +782,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModify
 
 				pEntry->SetGraphicObject(Graphic(aBitmapEx));
 
-				aLbBitmaps.Modify( aUiSize, *pEntry, nPos );
+				aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry, nPos );
 				aLbBitmaps.SelectEntryPos( nPos );
 
 				// Flag fuer modifiziert setzen

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=1470611&r1=1470610&r2=1470611&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 Mon Apr 22 16:38:05 2013
@@ -6156,46 +6156,14 @@
 				</info>
 				<value>false</value>
 			</prop>
-          <prop oor:name="ColorValueSetMaximumRowCount" oor:type="xs:short">
-            <info>
-              <author>ALG</author>
-              <desc>
-                Defines the maximum row count for ColorValueSets. If more rows are needed, a Scrollbar will be used.
-              </desc>
-              <label>A Scrollbar will be used when more rows are needed.</label>
-            </info>
-            <value>40</value>
-          </prop>
-          <prop oor:name="ColorValueSetEntryEdgeLength" oor:type="xs:short">
-            <info>
-              <author>ALG</author>
-              <desc>
-                Defines the EdgeLength in Pixels for Entries generated inside of ColorValueSets. The Entries are quadratic for Colors.
-              </desc>
-              <label>Entries in ColorValueSets will have this quadratic size in Pixels.</label>
-            </info>
-            <value>14</value>
-          </prop>
-          <prop oor:name="ColorValueSetColumnCount" oor:type="xs:short">
-            <info>
-              <author>ALG</author>
-              <desc>
-                Defines how many colums are to be used in ColorValueSets. The idea is to use this defined count to have a
-                good visualisation in ColorValueSets which offers the used ColorTable Schema nicely layouted to the User.
-                This Schema is layouted to a width of twelve colums, though this value should not be changed.
-              </desc>
-              <label>The ColumnCount used in ColorValueSets.</label>
-            </info>
-            <value>12</value>
-          </prop>
           <prop oor:name="EdgeBlending" oor:type="xs:short">
             <info>
               <author>ALG</author>
               <desc>
-                Option to use EdgeBlending for previews in the UI (for ColorValueSet, ColorDropDown, FillStyle/LineStyle 
+                Option to use EdgeBlending for previews in the UI (for ColorValueSet, ColorDropDown, FillStyle/LineStyle
                 previews, etc...). EdgeBlending will visualize a one pixel border on the preview object with interpolated
-                colors (default: TopLeft White, BottomRight Black) so that a nice 3D effect is shown. It is a percent 
-                value describing how strong the effect shall be. The value 0% switches it off, while the value 100% will 
+                colors (default: TopLeft White, BottomRight Black) so that a nice 3D effect is shown. It is a percent
+                value describing how strong the effect shall be. The value 0% switches it off, while the value 100% will
                 cover the preview object's border completely with one pixel. Values in-between vill be alpha-blended with
                 the original preview image.
               </desc>
@@ -6203,6 +6171,20 @@
             </info>
             <value>35</value>
           </prop>
+          <prop oor:name="ListBoxMaximumLineCount" oor:type="xs:short">
+            <info>
+              <author>ALG</author>
+              <desc>
+                This option controls how many lines of a ListBox will be shown as a maximum. If the ListBox has less lines,
+                all lines will be shown when opening the drop down content. If it has more lines, the visible number of
+                lines will be limited to this number. The value 0 disables this feature, negative values are not allowed.
+                This feature may not be used automatically by all ListBox implementations,
+                but it gives a central hint value to use if an implementation wants to adapt to something useful.
+              </desc>
+              <label>Defines the maximum number of lines visible in a ListBox.</label>
+            </info>
+            <value>25</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=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx (original)
+++ openoffice/trunk/main/svtools/inc/svtools/accessibilityoptions.hxx Mon Apr 22 16:38:05 2013
@@ -56,15 +56,14 @@ public:
     sal_Bool    IsSelectionInReadonly() const;
 	sal_Bool	GetAutoDetectSystemHC() const;
 
-    // options for configuring the look and feel for the ColorValueSet (color selector)
-    sal_Int16   GetColorValueSetMaximumRowCount() const;
-    sal_Int16   GetColorValueSetEntryEdgeLength() const;
-    sal_Int16   GetColorValueSetColumnCount() const;
-
     // option to activate EdgeBlending for previews in the UI (ColorValueSet, ColorDropDown,
     // FillStyle/LineStyle previews, etc...). 0 == off, 100% == full paint, in-between == alpha
     sal_Int16   GetEdgeBlending() const;
 
+    // option to set a maximum line count for ListBoxes; when less or equal than this count
+    // is in a ListBox, all will be shown, else a ScrollBar will be used
+    sal_Int16   GetListBoxMaximumLineCount() const;
+
     void        SetIsForPagePreviews(sal_Bool bSet);
 	void 		SetIsHelpTipsDisappear(sal_Bool bSet);
 	void 		SetIsAllowAnimatedGraphics(sal_Bool bSet);
@@ -75,10 +74,8 @@ public:
     void        SetSelectionInReadonly(sal_Bool bSet);
 	void        SetAutoDetectSystemHC(sal_Bool bSet);
     
-    void        SetColorValueSetMaximumRowCount(sal_Int16 nSet);
-    void        SetColorValueSetEntryEdgeLength(sal_Int16 nSet);
-    void        SetColorValueSetColumnCount(sal_Int16 nSet);
     void        SetEdgeBlending(sal_Int16 nSet);
+    void        SetListBoxMaximumLineCount(sal_Int16 nSet);
 
 	sal_Bool                IsModified() const;
 	void		            Commit();

Modified: openoffice/trunk/main/svtools/inc/svtools/valueset.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/inc/svtools/valueset.hxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/inc/svtools/valueset.hxx (original)
+++ openoffice/trunk/main/svtools/inc/svtools/valueset.hxx Mon Apr 22 16:38:05 2013
@@ -250,31 +250,34 @@ private:
 	long			mnLines;
 	long			mnUserItemWidth;
 	long			mnUserItemHeight;
-	sal_uInt16			mnOldItemId;
-	sal_uInt16			mnSelItemId;
-	sal_uInt16			mnHighItemId;
-	sal_uInt16			mnDropPos;
-	sal_uInt16			mnCols;
-	sal_uInt16			mnCurCol;
-	sal_uInt16			mnUserCols;
-	sal_uInt16			mnUserVisLines;
-	sal_uInt16			mnFirstLine;
-	sal_uInt16			mnSpacing;
-	sal_uInt16			mnFrameStyle;
-	sal_Bool			mbFormat;
-	sal_Bool			mbHighlight;
-	sal_Bool			mbSelection;
-	sal_Bool			mbNoSelection;
-	sal_Bool			mbDrawSelection;
-	sal_Bool			mbBlackSel;
-	sal_Bool			mbDoubleSel;
-	sal_Bool			mbScroll;
-	sal_Bool			mbDropPos;
-	sal_Bool			mbFullMode;
+	sal_uInt16		mnOldItemId;
+	sal_uInt16		mnSelItemId;
+	sal_uInt16		mnHighItemId;
+	sal_uInt16		mnDropPos;
+	sal_uInt16		mnCols;
+	sal_uInt16		mnCurCol;
+	sal_uInt16		mnUserCols;
+	sal_uInt16		mnUserVisLines;
+	sal_uInt16		mnFirstLine;
+	sal_uInt16		mnSpacing;
+	sal_uInt16		mnFrameStyle;
 	Color			maColor;
 	Link			maDoubleClickHdl;
 	Link			maSelectHdl;
 
+    // bitfield
+    bool            mbFormat : 1;
+    bool            mbHighlight : 1;
+    bool            mbSelection : 1;
+    bool            mbNoSelection : 1;
+    bool            mbDrawSelection : 1;
+    bool            mbBlackSel : 1;
+    bool            mbDoubleSel : 1;
+    bool            mbScroll : 1;
+    bool            mbDropPos : 1;
+    bool            mbFullMode : 1;
+    bool            mbEdgeBlending : 1;
+
 #ifdef _SV_VALUESET_CXX
     friend class ValueSetAcc;
     friend class ValueItemAcc;
@@ -368,8 +371,8 @@ public:
 	sal_uInt16			GetItemId( const Point& rPos ) const;
 	Rectangle		GetItemRect( sal_uInt16 nItemId ) const;
 
-	void			EnableFullItemMode( sal_Bool bFullMode = sal_True );
-	sal_Bool			IsFullItemModeEnabled() const { return mbFullMode; }
+	void			EnableFullItemMode( bool bFullMode = true );
+	bool            IsFullItemModeEnabled() const { return mbFullMode; }
 	void			SetColCount( sal_uInt16 nNewCols = 1 );
 	sal_uInt16			GetColCount() const { return mnUserCols; }
 	void			SetLineCount( sal_uInt16 nNewLines = 0 );
@@ -383,10 +386,10 @@ public:
 
 	void			SelectItem( sal_uInt16 nItemId );
 	sal_uInt16			GetSelectItemId() const { return mnSelItemId; }
-	sal_Bool			IsItemSelected( sal_uInt16 nItemId ) const
-						{ return ((!mbNoSelection && (nItemId == mnSelItemId)) ? sal_True : sal_False); }
+	bool            IsItemSelected( sal_uInt16 nItemId ) const
+						{ return (!mbNoSelection && (nItemId == mnSelItemId)); }
 	void			SetNoSelection();
-	sal_Bool			IsNoSelection() const { return mbNoSelection; }
+	bool            IsNoSelection() const { return mbNoSelection; }
 
 	void			SetItemBits( sal_uInt16 nItemId, sal_uInt16 nBits );
 	sal_uInt16			GetItemBits( sal_uInt16 nItemId ) const;
@@ -401,7 +404,7 @@ public:
 	void			SetColor( const Color& rColor );
 	void			SetColor() { SetColor( Color( COL_TRANSPARENT ) ); }
 	Color			GetColor() const { return maColor; }
-	sal_Bool			IsColor() const { return maColor.GetTransparency() == 0; }
+	bool            IsColor() const { return maColor.GetTransparency() == 0; }
 
 	void			SetExtraSpacing( sal_uInt16 nNewSpacing );
 	sal_uInt16			GetExtraSpacing() { return mnSpacing; }
@@ -414,7 +417,7 @@ public:
 	Size			CalcWindowSizePixel( const Size& rItemSize,
 										 sal_uInt16 nCalcCols = 0,
 										 sal_uInt16 nCalcLines = 0 );
-	Size			CalcItemSizePixel( const Size& rSize, sal_Bool bOut = sal_True ) const;
+	Size			CalcItemSizePixel( const Size& rSize, bool bOut = true ) const;
 	long			GetScrollWidth() const;
 
 	void			SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
@@ -425,6 +428,9 @@ public:
 	void			SetHighlightHdl( const Link& rLink );
 	const Link& 	GetHighlightHdl() const;
 
+    bool GetEdgeBlending() const { return mbEdgeBlending; }
+    void SetEdgeBlending(bool bNew);
+
 private:
     /** Determine whether RTL (right to left writing) is active.  For this
         method to return <true/> two conditions have to be fullfilled:

Modified: openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx (original)
+++ openoffice/trunk/main/svtools/source/config/accessibilityoptions.cxx Mon Apr 22 16:38:05 2013
@@ -86,10 +86,8 @@ public:
 	sal_Bool	GetIsSystemFont() const;
 	sal_Int16	GetHelpTipSeconds() const;
 	sal_Bool	IsSelectionInReadonly() const;
-    sal_Int16   GetColorValueSetMaximumRowCount() const;
-    sal_Int16   GetColorValueSetEntryEdgeLength() const;
-    sal_Int16   GetColorValueSetColumnCount() const;
     sal_Int16   GetEdgeBlending() const;
+    sal_Int16   GetListBoxMaximumLineCount() const;
 
 	void		SetAutoDetectSystemHC(sal_Bool bSet);
 	void		SetIsForPagePreviews(sal_Bool bSet);
@@ -100,10 +98,8 @@ public:
 	void		SetIsSystemFont(sal_Bool bSet);
 	void		SetHelpTipSeconds(sal_Int16 nSet);
 	void		SetSelectionInReadonly(sal_Bool bSet);
-    void        SetColorValueSetMaximumRowCount(sal_Int16 nSet);
-    void        SetColorValueSetEntryEdgeLength(sal_Int16 nSet);
-    void        SetColorValueSetColumnCount(sal_Int16 nSet);
     void        SetEdgeBlending(sal_Int16 nSet);
+    void        SetListBoxMaximumLineCount(sal_Int16 nSet);
 
 	sal_Bool	IsModified() const { return bIsModified; };
 };
@@ -308,51 +304,15 @@ sal_Bool SvtAccessibilityOptions_Impl::I
 	return bRet;
 }
 
-sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetMaximumRowCount() const
-{
-    css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
-    sal_Int16 nRet = 40;
-
-    try
-    {
-        if(xNode.is())
-            xNode->getPropertyValue(s_sColorValueSetMaximumRowCount) >>= nRet;
-    }
-    catch(const css::uno::Exception& ex)
-    {
-        LogHelper::logIt(ex);
-    }
-
-    return nRet;
-}
-
-sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetEntryEdgeLength() const
-{
-    css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
-    sal_Int16 nRet = 14;
-
-    try
-    {
-        if(xNode.is())
-            xNode->getPropertyValue(s_sColorValueSetEntryEdgeLength) >>= nRet;
-    }
-    catch(const css::uno::Exception& ex)
-    {
-        LogHelper::logIt(ex);
-    }
-
-    return nRet;
-}
-
-sal_Int16 SvtAccessibilityOptions_Impl::GetColorValueSetColumnCount() const
+sal_Int16 SvtAccessibilityOptions_Impl::GetEdgeBlending() const
 {
     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
-    sal_Int16 nRet = 12;
+    sal_Int16 nRet = 35;
 
     try
     {
         if(xNode.is())
-            xNode->getPropertyValue(s_sColorValueSetColumnCount) >>= nRet;
+            xNode->getPropertyValue(s_sEdgeBlending) >>= nRet;
     }
     catch(const css::uno::Exception& ex)
     {
@@ -362,15 +322,15 @@ sal_Int16 SvtAccessibilityOptions_Impl::
     return nRet;
 }
 
-sal_Int16 SvtAccessibilityOptions_Impl::GetEdgeBlending() const
+sal_Int16 SvtAccessibilityOptions_Impl::GetListBoxMaximumLineCount() const
 {
     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
-    sal_Int16 nRet = 35;
+    sal_Int16 nRet = 25;
 
     try
     {
         if(xNode.is())
-            xNode->getPropertyValue(s_sEdgeBlending) >>= nRet;
+            xNode->getPropertyValue(s_sListBoxMaximumLineCount) >>= nRet;
     }
     catch(const css::uno::Exception& ex)
     {
@@ -562,70 +522,58 @@ void SvtAccessibilityOptions_Impl::SetSe
 
 void SvtAccessibilityOptions_Impl::SetVCLSettings()
 {
-	AllSettings aAllSettings = Application::GetSettings();
-	HelpSettings aHelpSettings = aAllSettings.GetHelpSettings();
-	aHelpSettings.SetTipTimeout( GetIsHelpTipsDisappear() ? GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT);
-	aAllSettings.SetHelpSettings(aHelpSettings);
-	if(aAllSettings.GetStyleSettings().GetUseSystemUIFonts() != GetIsSystemFont() )
-	{
-		StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
-		aStyleSettings.SetUseSystemUIFonts( GetIsSystemFont()  );
-		aAllSettings.SetStyleSettings(aStyleSettings);
-		Application::MergeSystemSettings( aAllSettings );
-	}
+    AllSettings aAllSettings(Application::GetSettings());
+    StyleSettings aStyleSettings(aAllSettings.GetStyleSettings());
+    HelpSettings aHelpSettings(aAllSettings.GetHelpSettings());
+    bool StyleSettingsChanged(false);
 
-	Application::SetSettings(aAllSettings);
-}
+    aHelpSettings.SetTipTimeout( GetIsHelpTipsDisappear() ? GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT);
+    aAllSettings.SetHelpSettings(aHelpSettings);
 
-void SvtAccessibilityOptions_Impl::SetColorValueSetMaximumRowCount(sal_Int16 nSet)
-{
-    css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
-
-    try
+    if(aStyleSettings.GetUseSystemUIFonts() != GetIsSystemFont())
     {
-        if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetMaximumRowCount)!=nSet)
-        {
-            xNode->setPropertyValue(s_sColorValueSetMaximumRowCount, css::uno::makeAny(nSet));
-            ::comphelper::ConfigurationHelper::flush(m_xCfg);
-
-            bIsModified = sal_True;
-        }
+        aStyleSettings.SetUseSystemUIFonts(GetIsSystemFont());
+        StyleSettingsChanged = true;
     }
-    catch(const css::uno::Exception& ex)
+
+    const sal_Int16 nEdgeBlendingCountA(GetEdgeBlending());
+    OSL_ENSURE(nEdgeBlendingCountA >= 0, "OOps, negative values for EdgeBlending are not allowed (!)");
+    const sal_uInt16 nEdgeBlendingCountB(static_cast< sal_uInt16 >(nEdgeBlendingCountA >= 0 ? nEdgeBlendingCountA : 0));
+
+    if(aStyleSettings.GetEdgeBlending() != nEdgeBlendingCountB)
     {
-        LogHelper::logIt(ex);
+        aStyleSettings.SetEdgeBlending(nEdgeBlendingCountB);
+        StyleSettingsChanged = true;
     }
-}
 
-void SvtAccessibilityOptions_Impl::SetColorValueSetEntryEdgeLength(sal_Int16 nSet)
-{
-    css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
+    const sal_Int16 nMaxLineCountA(GetListBoxMaximumLineCount());
+    OSL_ENSURE(nMaxLineCountA >= 0, "OOps, negative values for ListBoxMaximumLineCount are not allowed (!)");
+    const sal_uInt16 nMaxLineCountB(static_cast< sal_uInt16 >(nMaxLineCountA >= 0 ? nMaxLineCountA : 0));
 
-    try
+    if(aStyleSettings.GetListBoxMaximumLineCount() != nMaxLineCountB)
     {
-        if(xNode.is() && xNode->getPropertyValue(s_sColorValueSetEntryEdgeLength)!=nSet)
-        {
-            xNode->setPropertyValue(s_sColorValueSetEntryEdgeLength, css::uno::makeAny(nSet));
-            ::comphelper::ConfigurationHelper::flush(m_xCfg);
-
-            bIsModified = sal_True;
-        }
+        aStyleSettings.SetListBoxMaximumLineCount(nMaxLineCountB);
+        StyleSettingsChanged = true;
     }
-    catch(const css::uno::Exception& ex)
+
+    if(StyleSettingsChanged)
     {
-        LogHelper::logIt(ex);
+        aAllSettings.SetStyleSettings(aStyleSettings);
+        Application::MergeSystemSettings(aAllSettings);
     }
+
+    Application::SetSettings(aAllSettings);
 }
 
-void SvtAccessibilityOptions_Impl::SetColorValueSetColumnCount(sal_Int16 nSet)
+void SvtAccessibilityOptions_Impl::SetEdgeBlending(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)
+        if(xNode.is() && xNode->getPropertyValue(s_sEdgeBlending)!=nSet)
         {
-            xNode->setPropertyValue(s_sColorValueSetColumnCount, css::uno::makeAny(nSet));
+            xNode->setPropertyValue(s_sEdgeBlending, css::uno::makeAny(nSet));
             ::comphelper::ConfigurationHelper::flush(m_xCfg);
 
             bIsModified = sal_True;
@@ -637,15 +585,15 @@ void SvtAccessibilityOptions_Impl::SetCo
     }
 }
 
-void SvtAccessibilityOptions_Impl::SetEdgeBlending(sal_Int16 nSet)
+void SvtAccessibilityOptions_Impl::SetListBoxMaximumLineCount(sal_Int16 nSet)
 {
     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
 
     try
     {
-        if(xNode.is() && xNode->getPropertyValue(s_sEdgeBlending)!=nSet)
+        if(xNode.is() && xNode->getPropertyValue(s_sListBoxMaximumLineCount)!=nSet)
         {
-            xNode->setPropertyValue(s_sEdgeBlending, css::uno::makeAny(nSet));
+            xNode->setPropertyValue(s_sListBoxMaximumLineCount, css::uno::makeAny(nSet));
             ::comphelper::ConfigurationHelper::flush(m_xCfg);
 
             bIsModified = sal_True;
@@ -759,26 +707,14 @@ sal_Bool SvtAccessibilityOptions::IsSele
 {
 	return sm_pSingleImplConfig->IsSelectionInReadonly();
 }
-
-sal_Int16 SvtAccessibilityOptions::GetColorValueSetMaximumRowCount() const
-{
-    return sm_pSingleImplConfig->GetColorValueSetMaximumRowCount();
-}
-
-sal_Int16 SvtAccessibilityOptions::GetColorValueSetEntryEdgeLength() const
-{
-    return sm_pSingleImplConfig->GetColorValueSetEntryEdgeLength();
-}
-
-sal_Int16 SvtAccessibilityOptions::GetColorValueSetColumnCount() const
-{
-    return sm_pSingleImplConfig->GetColorValueSetColumnCount();
-}
-
 sal_Int16 SvtAccessibilityOptions::GetEdgeBlending() const
 {
     return sm_pSingleImplConfig->GetEdgeBlending();
 }
+sal_Int16 SvtAccessibilityOptions::GetListBoxMaximumLineCount() const
+{
+    return sm_pSingleImplConfig->GetListBoxMaximumLineCount();
+}
 
 // -----------------------------------------------------------------------
 void SvtAccessibilityOptions::SetAutoDetectSystemHC(sal_Bool bSet)
@@ -821,20 +757,12 @@ void SvtAccessibilityOptions::SetVCLSett
 {
 	sm_pSingleImplConfig->SetVCLSettings();
 }
-void SvtAccessibilityOptions::SetColorValueSetMaximumRowCount(sal_Int16 nSet)
-{
-    sm_pSingleImplConfig->SetColorValueSetMaximumRowCount(nSet);
-}
-void SvtAccessibilityOptions::SetColorValueSetEntryEdgeLength(sal_Int16 nSet)
-{
-    sm_pSingleImplConfig->SetColorValueSetEntryEdgeLength(nSet);
-}
-void SvtAccessibilityOptions::SetColorValueSetColumnCount(sal_Int16 nSet)
-{
-    sm_pSingleImplConfig->SetColorValueSetColumnCount(nSet);
-}
 void SvtAccessibilityOptions::SetEdgeBlending(sal_Int16 nSet)
 {
     sm_pSingleImplConfig->SetEdgeBlending(nSet);
 }
+void SvtAccessibilityOptions::SetListBoxMaximumLineCount(sal_Int16 nSet)
+{
+    sm_pSingleImplConfig->SetListBoxMaximumLineCount(nSet);
+}
 // -----------------------------------------------------------------------

Modified: openoffice/trunk/main/svtools/source/control/ctrlbox.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/control/ctrlbox.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/control/ctrlbox.cxx (original)
+++ openoffice/trunk/main/svtools/source/control/ctrlbox.cxx Mon Apr 22 16:38:05 2013
@@ -68,10 +68,8 @@ DECLARE_LIST( ImpColorList, ImplColorLis
 void ColorListBox::ImplInit()
 {
     pColorList = new ImpColorList( 256, 64 );
-    aImageSize.Width()  = GetTextWidth( XubString( RTL_CONSTASCII_USTRINGPARAM( "xxx" ) ) );
-    aImageSize.Height() = GetTextHeight();
-    aImageSize.Height() -= 2;
-
+    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+    aImageSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
     EnableUserDraw( sal_True );
     SetUserItemSize( aImageSize );
 }
@@ -94,6 +92,7 @@ ColorListBox::ColorListBox( Window* pPar
     ListBox( pParent, nWinStyle )
 {
     ImplInit();
+    SetEdgeBlending(true);
 }
 
 // -----------------------------------------------------------------------
@@ -102,6 +101,7 @@ ColorListBox::ColorListBox( Window* pPar
     ListBox( pParent, rResId )
 {
     ImplInit();
+    SetEdgeBlending(true);
 }
 
 // -----------------------------------------------------------------------
@@ -215,13 +215,36 @@ void ColorListBox::UserDraw( const UserD
         if ( pData->bColor )
         {
             Point aPos( rUDEvt.GetRect().TopLeft() );
+
             aPos.X() += 2;
             aPos.Y() += ( rUDEvt.GetRect().GetHeight() - aImageSize.Height() ) / 2;
+
+            const Rectangle aRect(aPos, aImageSize);
+
             rUDEvt.GetDevice()->Push();
             rUDEvt.GetDevice()->SetFillColor( pData->aColor );
             rUDEvt.GetDevice()->SetLineColor( rUDEvt.GetDevice()->GetTextColor() );
-            rUDEvt.GetDevice()->DrawRect( Rectangle( aPos, aImageSize ) );
+            rUDEvt.GetDevice()->DrawRect(aRect);
             rUDEvt.GetDevice()->Pop();
+
+            const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+            const sal_uInt16 nEdgeBlendingPercent(GetEdgeBlending() ? rStyleSettings.GetEdgeBlending() : 0);
+
+            if(nEdgeBlendingPercent)
+            {
+                Bitmap aBitmap(rUDEvt.GetDevice()->GetBitmap(aRect.TopLeft(), aRect.GetSize()));
+
+                if(!aBitmap.IsEmpty())
+                {
+                    const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor());
+                    const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor());
+                    const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
+
+                    aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight);
+                    rUDEvt.GetDevice()->DrawBitmap(aRect.TopLeft(), aBitmap);
+                }
+            }
+
             ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_False );
         }
         else

Modified: openoffice/trunk/main/svtools/source/control/valueset.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/control/valueset.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/control/valueset.cxx (original)
+++ openoffice/trunk/main/svtools/source/control/valueset.cxx Mon Apr 22 16:38:05 2013
@@ -38,7 +38,6 @@
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <rtl/ustring.hxx>
-#include <svtools/accessibilityoptions.hxx>
 #include "valueimp.hxx"
 
 #define _SV_VALUESET_CXX
@@ -70,16 +69,17 @@ void ValueSet::ImplInit()
 	mnUserVisLines		= 0;
 	mnSpacing			= 0;
 	mnFrameStyle		= 0;
-	mbFormat			= sal_True;
-	mbHighlight 		= sal_False ;
-	mbSelection 		= sal_False;
-	mbNoSelection		= sal_True;
-	mbDrawSelection 	= sal_True;
-	mbBlackSel			= sal_False;
-	mbDoubleSel 		= sal_False;
-	mbScroll			= sal_False;
-	mbDropPos			= sal_False;
-	mbFullMode			= sal_True;
+	mbFormat			= true;
+	mbHighlight 		= false;
+	mbSelection 		= false;
+	mbNoSelection		= true;
+	mbDrawSelection 	= true;
+	mbBlackSel			= false;
+	mbDoubleSel 		= false;
+	mbScroll			= false;
+	mbDropPos			= false;
+	mbFullMode			= true;
+    mbEdgeBlending      = false;
 
     // #106446#, #106601# force mirroring of virtual device
     maVirDev.EnableRTL( GetParent()->IsRTLEnabled() );
@@ -152,8 +152,7 @@ void ValueSet::ImplDeleteItems()
 
 // -----------------------------------------------------------------------
 
-void ValueSet::ImplInitSettings( sal_Bool bFont,
-								 sal_Bool bForeground, sal_Bool bBackground )
+void ValueSet::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
 {
 	const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
 
@@ -256,9 +255,10 @@ void ValueSet::ImplFormatItem( ValueSetI
 
 	if ( (aRect.GetHeight() > 0) && (aRect.GetWidth() > 0) )
 	{
+        const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
 		if ( pItem == mpNoneItem )
 		{
-			const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
 			maVirDev.SetFont( GetFont() );
 			maVirDev.SetTextColor( ( nStyle & WB_MENUSTYLEVALUESET ) ? rStyleSettings.GetMenuTextColor() : rStyleSettings.GetWindowTextColor() );
 			maVirDev.SetTextFillColor();
@@ -284,29 +284,9 @@ void ValueSet::ImplFormatItem( ValueSetI
 		{
 			maVirDev.SetFillColor( pItem->maColor );
 			maVirDev.DrawRect( aRect );
-
-            const SvtAccessibilityOptions aOptions;
-            const sal_Int16 nEdgeBlendingPercent(aOptions.GetEdgeBlending());
-            static bool bTest(false);
-
-            if(nEdgeBlendingPercent && bTest)
-            {
-                Bitmap aBitmap(maVirDev.GetBitmap(aRect.TopLeft(), aRect.GetSize()));
-
-                if(!aBitmap.IsEmpty())
-                {
-                    const Color aTopLeft(COL_WHITE);
-                    const Color aBottomRight(COL_BLACK);
-                    const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
-
-                    aBitmap.DrawBlendFrame(nAlpha, aTopLeft, aBottomRight);
-                    maVirDev.DrawBitmap(aRect.TopLeft(), aBitmap);
-                }
-            }
 		}
 		else
 		{
-			const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
 			if ( IsColor() )
 				maVirDev.SetFillColor( maColor );
             else if ( nStyle & WB_MENUSTYLEVALUESET )
@@ -345,6 +325,23 @@ void ValueSet::ImplFormatItem( ValueSetI
 					maVirDev.DrawImage( aPos, pItem->maImage, nImageStyle );
 			}
 		}
+
+        const sal_uInt16 nEdgeBlendingPercent(GetEdgeBlending() ? rStyleSettings.GetEdgeBlending() : 0);
+
+        if(nEdgeBlendingPercent)
+        {
+            Bitmap aBitmap(maVirDev.GetBitmap(aRect.TopLeft(), aRect.GetSize()));
+
+            if(!aBitmap.IsEmpty())
+            {
+                const Color& rTopLeft(rStyleSettings.GetEdgeBlendingTopLeftColor());
+                const Color& rBottomRight(rStyleSettings.GetEdgeBlendingBottomRightColor());
+                const sal_uInt8 nAlpha((nEdgeBlendingPercent * 255) / 100);
+
+                aBitmap.DrawBlendFrame(nAlpha, rTopLeft, rBottomRight);
+                maVirDev.DrawBitmap(aRect.TopLeft(), aBitmap);
+            }
+        }
 	}
 }
 
@@ -451,7 +448,7 @@ void ValueSet::Format()
 		mnCols = mnUserCols;
 
 	// Zeilenanzahl berechnen
-	mbScroll = sal_False;
+	mbScroll = false;
     mnLines = (long)mpImpl->mpItemList->Count() / mnCols;
     if ( mpImpl->mpItemList->Count() % mnCols )
 		mnLines++;
@@ -470,7 +467,7 @@ void ValueSet::Format()
 	else
 		mnVisLines = mnLines;
 	if ( mnLines > mnVisLines )
-		mbScroll = sal_True;
+		mbScroll = true;
 	if ( mnLines <= mnVisLines )
 		mnFirstLine = 0;
 	else
@@ -550,17 +547,17 @@ void ValueSet::Format()
 			  (aHighColor.GetBlue() > 0x80)) ||
 			 ((aHighColor.GetRed() == 0x80) && (aHighColor.GetGreen() == 0x80) &&
 			  (aHighColor.GetBlue() == 0x80)) )
-			mbBlackSel = sal_True;
+			mbBlackSel = true;
 		else
-			mbBlackSel = sal_False;
+			mbBlackSel = false;
 
 		// Wenn die Items groesser sind, dann die Selektion doppelt so breit
 		// zeichnen
 		if ( (nStyle & WB_DOUBLEBORDER) &&
 			 ((nItemWidth >= 25) && (nItemHeight >= 20)) )
-			mbDoubleSel = sal_True;
+			mbDoubleSel = true;
 		else
-			mbDoubleSel = sal_False;
+			mbDoubleSel = false;
 
 		// Calculate offsets
 		long nStartX;
@@ -682,7 +679,7 @@ void ValueSet::Format()
 	}
 
 	// Jetzt haben wir formatiert und warten auf das naechste
-	mbFormat = sal_False;
+	mbFormat = false;
 
 	// ScrollBar loeschen
 	if ( pDelScrBar )
@@ -947,12 +944,12 @@ void ValueSet::ImplHighlightItem( sal_uI
 
 		// Wenn keiner selektiert ist, dann Selektion nicht malen
 		if ( !bIsSelection && mbNoSelection )
-			mbDrawSelection = sal_False;
+			mbDrawSelection = false;
 
 		// Neu ausgeben und alte Selection wegnehmen
 		ImplHideSelect( nOldItem );
 		ImplDrawSelect();
-		mbDrawSelection = sal_True;
+		mbDrawSelection = true;
 	}
 }
 
@@ -1140,7 +1137,7 @@ sal_Bool ValueSet::ImplScroll( const Poi
 
 	if ( mnFirstLine != nOldLine )
 	{
-		mbFormat = sal_True;
+		mbFormat = true;
 		ImplDraw();
 		return sal_True;
 	}
@@ -1275,7 +1272,7 @@ IMPL_LINK( ValueSet,ImplScrollHdl, Scrol
 	if ( nNewFirstLine != mnFirstLine )
 	{
 		mnFirstLine = nNewFirstLine;
-		mbFormat = sal_True;
+		mbFormat = true;
 		ImplDraw();
 	}
 	return 0;
@@ -1310,14 +1307,14 @@ void ValueSet::ImplTracking( const Point
 	if ( pItem && (pItem->meType != VALUESETITEM_SPACE) )
 	{
 		if( GetStyle() & WB_MENUSTYLEVALUESET )
-			mbHighlight = sal_True;
+			mbHighlight = true;
 
 		ImplHighlightItem( pItem->mnId );
 	}
 	else
 	{
 		if( GetStyle() & WB_MENUSTYLEVALUESET )
-			mbHighlight = sal_True;
+			mbHighlight = true;
 
 		ImplHighlightItem( mnSelItemId, sal_False );
 	}
@@ -1340,15 +1337,15 @@ void ValueSet::ImplEndTracking( const Po
 		SelectItem( pItem->mnId );
 		if ( !mbSelection && !(GetStyle() & WB_NOPOINTERFOCUS) )
 			GrabFocus();
-		mbHighlight = sal_False;
-		mbSelection = sal_False;
+		mbHighlight = false;
+		mbSelection = false;
 		Select();
 	}
 	else
 	{
 		ImplHighlightItem( mnSelItemId, sal_False );
-		mbHighlight = sal_False;
-		mbSelection = sal_False;
+		mbHighlight = false;
+		mbSelection = false;
 	}
 }
 
@@ -1361,7 +1358,7 @@ void ValueSet::MouseButtonDown( const Mo
 		ValueSetItem* pItem = ImplGetItem( ImplGetItem( rMEvt.GetPosPixel() ) );
 		if ( mbSelection )
 		{
-			mbHighlight = sal_True;
+			mbHighlight = true;
 			if ( pItem && (pItem->meType != VALUESETITEM_SPACE) )
 			{
 				mnOldItemId  = mnSelItemId;
@@ -1378,7 +1375,7 @@ void ValueSet::MouseButtonDown( const Mo
 				if ( (pItem->mnBits & VIB_NODOUBLECLICK) || (rMEvt.GetClicks() == 1) )
 				{
 					mnOldItemId  = mnSelItemId;
-					mbHighlight  = sal_True;
+					mbHighlight  = true;
 					mnHighItemId = mnSelItemId;
 					ImplHighlightItem( pItem->mnId );
 					StartTracking( STARTTRACK_SCROLLREPEAT );
@@ -1712,7 +1709,7 @@ void ValueSet::LoseFocus()
 
 void ValueSet::Resize()
 {
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 	Control::Resize();
@@ -1786,7 +1783,7 @@ void ValueSet::StateChanged( StateChange
 	}
     else if ( (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_ENABLE) )
 	{
-		mbFormat = sal_True;
+		mbFormat = true;
 		ImplInitSettings( sal_False, sal_False, sal_True );
 		Invalidate();
 	}
@@ -1804,7 +1801,7 @@ void ValueSet::DataChanged( const DataCh
 		 ((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
 		  (rDCEvt.GetFlags() & SETTINGS_STYLE)) )
 	{
-		mbFormat = sal_True;
+		mbFormat = true;
 		ImplInitSettings( sal_True, sal_True, sal_True );
 		Invalidate();
 	}
@@ -1844,7 +1841,7 @@ void ValueSet::InsertItem( sal_uInt16 nI
 	pItem->maImage	= rImage;
     mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -1863,7 +1860,7 @@ void ValueSet::InsertItem( sal_uInt16 nI
 	pItem->maColor	= rColor;
     mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -1884,7 +1881,7 @@ void ValueSet::InsertItem( sal_uInt16 nI
 	pItem->maText	= rText;
     mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -1905,7 +1902,7 @@ void ValueSet::InsertItem( sal_uInt16 nI
 	pItem->maText	= rText;
     mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -1923,7 +1920,7 @@ void ValueSet::InsertItem( sal_uInt16 nI
 	pItem->meType	= VALUESETITEM_USERDRAW;
     mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -1941,7 +1938,7 @@ void ValueSet::InsertSpace( sal_uInt16 n
 	pItem->meType	= VALUESETITEM_SPACE;
     mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -1964,10 +1961,10 @@ void ValueSet::RemoveItem( sal_uInt16 nI
 		mnOldItemId 	= 0;
 		mnHighItemId	= 0;
 		mnSelItemId 	= 0;
-		mbNoSelection	= sal_True;
+		mbNoSelection	= true;
 	}
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -2003,9 +2000,9 @@ void ValueSet::CopyItems( const ValueSet
 	mnOldItemId 	= 0;
 	mnHighItemId	= 0;
 	mnSelItemId 	= 0;
-	mbNoSelection	= sal_True;
+	mbNoSelection	= true;
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -2022,9 +2019,9 @@ void ValueSet::Clear()
 	mnOldItemId 	= 0;
 	mnHighItemId	= 0;
 	mnSelItemId 	= 0;
-	mbNoSelection	= sal_True;
+	mbNoSelection	= true;
 
-	mbFormat = sal_True;
+	mbFormat = true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		Invalidate();
 }
@@ -2088,7 +2085,7 @@ Rectangle ValueSet::GetItemRect( sal_uIn
 
 // -----------------------------------------------------------------------
 
-void ValueSet::EnableFullItemMode( sal_Bool bFullMode )
+void ValueSet::EnableFullItemMode( bool bFullMode )
 {
 	mbFullMode = bFullMode;
 }
@@ -2100,7 +2097,7 @@ void ValueSet::SetColCount( sal_uInt16 n
 	if ( mnUserCols != nNewCols )
 	{
 		mnUserCols = nNewCols;
-		mbFormat = sal_True;
+		mbFormat = true;
 		if ( IsReallyVisible() && IsUpdateMode() )
 			Invalidate();
 	}
@@ -2113,7 +2110,7 @@ void ValueSet::SetLineCount( sal_uInt16 
 	if ( mnUserVisLines != nNewLines )
 	{
 		mnUserVisLines = nNewLines;
-		mbFormat = sal_True;
+		mbFormat = true;
 		if ( IsReallyVisible() && IsUpdateMode() )
 			Invalidate();
 	}
@@ -2126,7 +2123,7 @@ void ValueSet::SetItemWidth( long nNewIt
 	if ( mnUserItemWidth != nNewItemWidth )
 	{
 		mnUserItemWidth = nNewItemWidth;
-		mbFormat = sal_True;
+		mbFormat = true;
 		if ( IsReallyVisible() && IsUpdateMode() )
 			Invalidate();
 	}
@@ -2139,7 +2136,7 @@ void ValueSet::SetItemHeight( long nNewI
 	if ( mnUserItemHeight != nNewItemHeight )
 	{
 		mnUserItemHeight = nNewItemHeight;
-		mbFormat = sal_True;
+		mbFormat = true;
 		if ( IsReallyVisible() && IsUpdateMode() )
 			Invalidate();
 	}
@@ -2152,7 +2149,7 @@ void ValueSet::SetFirstLine( sal_uInt16 
 	if ( mnFirstLine != nNewLine )
 	{
 		mnFirstLine = nNewLine;
-		mbFormat = sal_True;
+		mbFormat = true;
 		if ( IsReallyVisible() && IsUpdateMode() )
 			Invalidate();
 	}
@@ -2177,7 +2174,7 @@ void ValueSet::SelectItem( sal_uInt16 nI
 	{
         sal_uInt16 nOldItem = mnSelItemId ? mnSelItemId : 1;
 		mnSelItemId = nItemId;
-		mbNoSelection = sal_False;
+		mbNoSelection = false;
 
 		sal_Bool bNewOut;
 		sal_Bool bNewLine;
@@ -2209,7 +2206,7 @@ void ValueSet::SelectItem( sal_uInt16 nI
 			{
 				// Falls sich der sichtbare Bereich geaendert hat,
 				// alles neu ausgeben
-				mbFormat = sal_True;
+				mbFormat = true;
 				ImplDraw();
 			}
 			else
@@ -2291,9 +2288,9 @@ void ValueSet::SelectItem( sal_uInt16 nI
 
 void ValueSet::SetNoSelection()
 {
-	mbNoSelection	= sal_True;
-	mbHighlight 	= sal_False;
-	mbSelection 	= sal_False;
+	mbNoSelection	= true;
+	mbHighlight 	= false;
+	mbSelection 	= false;
 
 	if ( IsReallyVisible() && IsUpdateMode() )
 		ImplDraw();
@@ -2340,7 +2337,7 @@ void ValueSet::SetItemImage( sal_uInt16 
 		Invalidate( pItem->maRect );
 	}
 	else
-		mbFormat = sal_True;
+		mbFormat = true;
 }
 
 // -----------------------------------------------------------------------
@@ -2374,7 +2371,7 @@ void ValueSet::SetItemColor( sal_uInt16 
 		Invalidate( pItem->maRect );
 	}
 	else
-		mbFormat = sal_True;
+		mbFormat = true;
 }
 
 // -----------------------------------------------------------------------
@@ -2409,7 +2406,7 @@ void ValueSet::SetItemData( sal_uInt16 n
 			Invalidate( pItem->maRect );
 		}
 		else
-			mbFormat = sal_True;
+			mbFormat = true;
 	}
 }
 
@@ -2485,7 +2482,7 @@ XubString ValueSet::GetItemText( sal_uIn
 void ValueSet::SetColor( const Color& rColor )
 {
 	maColor 	= rColor;
-	mbFormat	= sal_True;
+	mbFormat	= true;
 	if ( IsReallyVisible() && IsUpdateMode() )
 		ImplDraw();
 }
@@ -2498,7 +2495,7 @@ void ValueSet::SetExtraSpacing( sal_uInt
 	{
 		mnSpacing = nNewSpacing;
 
-		mbFormat = sal_True;
+		mbFormat = true;
 		if ( IsReallyVisible() && IsUpdateMode() )
 			Invalidate();
 	}
@@ -2509,8 +2506,8 @@ void ValueSet::SetExtraSpacing( sal_uInt
 void ValueSet::StartSelection()
 {
 	mnOldItemId 	= mnSelItemId;
-	mbHighlight 	= sal_True;
-	mbSelection 	= sal_True;
+	mbHighlight 	= true;
+	mbSelection 	= true;
 	mnHighItemId	= mnSelItemId;
 }
 
@@ -2524,9 +2521,9 @@ void ValueSet::EndSelection()
 			EndTracking( ENDTRACK_CANCEL );
 
 		ImplHighlightItem( mnSelItemId );
-		mbHighlight = sal_False;
+		mbHighlight = false;
 	}
-	mbSelection = sal_False;
+	mbSelection = false;
 }
 
 // -----------------------------------------------------------------------
@@ -2655,7 +2652,7 @@ Size ValueSet::CalcWindowSizePixel( cons
 
 // -----------------------------------------------------------------------
 
-Size ValueSet::CalcItemSizePixel( const Size& rItemSize, sal_Bool bOut ) const
+Size ValueSet::CalcItemSizePixel( const Size& rItemSize, bool bOut ) const
 {
 	Size aSize = rItemSize;
 
@@ -2701,7 +2698,7 @@ long ValueSet::GetScrollWidth() const
 
 sal_uInt16 ValueSet::ShowDropPos( const Point& rPos )
 {
-	mbDropPos = sal_True;
+	mbDropPos = true;
 
 	// Gegebenenfalls scrollen
 	ImplScroll( rPos );
@@ -2744,7 +2741,7 @@ void ValueSet::HideDropPos()
 	if ( mbDropPos )
 	{
 		ImplDrawDropPos( sal_False );
-		mbDropPos = sal_False;
+		mbDropPos = false;
 	}
 }
 
@@ -2771,3 +2768,19 @@ const Link& ValueSet::GetHighlightHdl() 
 
 // -----------------------------------------------------------------------
 
+void ValueSet::SetEdgeBlending(bool bNew)
+{
+    if(mbEdgeBlending != bNew)
+    {
+        mbEdgeBlending = bNew;
+        mbFormat = true;
+
+        if(IsReallyVisible() && IsUpdateMode())
+        {
+            Invalidate();
+        }
+    }
+}
+
+// -----------------------------------------------------------------------
+// eof

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=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx (original)
+++ openoffice/trunk/main/svtools/source/inc/configitems/accessibilityoptions_const.hxx Mon Apr 22 16:38:05 2013
@@ -41,11 +41,8 @@ namespace
 	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_sColorValueSetMaximumRowCount = ::rtl::OUString::createFromAscii("ColorValueSetMaximumRowCount");
-    static const ::rtl::OUString s_sColorValueSetEntryEdgeLength = ::rtl::OUString::createFromAscii("ColorValueSetEntryEdgeLength");
-    static const ::rtl::OUString s_sColorValueSetColumnCount = ::rtl::OUString::createFromAscii("ColorValueSetColumnCount");
-    static const ::rtl::OUString s_sEdgeBlending = ::rtl::OUString::createFromAscii("EdgeBlending");
+    static const ::rtl::OUString s_sEdgeBlending            = ::rtl::OUString::createFromAscii("EdgeBlending");
+    static const ::rtl::OUString s_sListBoxMaximumLineCount = ::rtl::OUString::createFromAscii("ListBoxMaximumLineCount");
 }
 
 #endif //  INCLUDE_CONFIGITEMS_ACCESSIBILITYOPTIONS_CONST_HXX

Modified: openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/dlgctrl.hxx Mon Apr 22 16:38:05 2013
@@ -30,6 +30,7 @@
 #include "svx/svxdllapi.h"
 #include <svx/rectenum.hxx>
 #include <vcl/graph.hxx>
+
 #ifndef _XTABLE_HXX
 class XBitmapEntry;
 class XBitmapList;
@@ -274,20 +275,17 @@ class SVX_DLLPUBLIC HatchingLB : public 
 {
 
 public:
-		 HatchingLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True );
-		 HatchingLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw = sal_True );
+	 explicit HatchingLB( Window* pParent, ResId Id);
+	 explicit HatchingLB( Window* pParent, WinBits aWB);
 
 	virtual void Fill( const XHatchList* pList );
-	virtual void UserDraw( const UserDrawEvent& rUDEvt );
 
 	void	Append( XHatchEntry* pEntry, Bitmap* pBmp = NULL );
 	void	Modify( XHatchEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
-	void	SelectEntryByList( const XHatchList* pList, const String& rStr,
-						const XHatch& rXHatch, sal_uInt16 nDist = 0 );
+	void	SelectEntryByList( const XHatchList* pList, const String& rStr, const XHatch& rXHatch, sal_uInt16 nDist = 0 );
 
 private:
 	XHatchList*		mpList;
-	sal_Bool			mbUserDraw;
 };
 
 /*************************************************************************
@@ -298,20 +296,17 @@ private:
 class SVX_DLLPUBLIC GradientLB : public ListBox
 {
 public:
-	GradientLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True );
-	GradientLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw = sal_True );
+	explicit GradientLB( Window* pParent, ResId Id);
+	explicit GradientLB( Window* pParent, WinBits aWB);
 
 	virtual void Fill( const XGradientList* pList );
-	virtual void UserDraw( const UserDrawEvent& rUDEvt );
 
 	void	Append( XGradientEntry* pEntry, Bitmap* pBmp = NULL );
 	void	Modify( XGradientEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
-	void	SelectEntryByList( const XGradientList* pList, const String& rStr,
-						const XGradient& rXGradient, sal_uInt16 nDist = 0 );
+	void	SelectEntryByList( const XGradientList* pList, const String& rStr, const XGradient& rXGradient, sal_uInt16 nDist = 0 );
 
 private:
 	XGradientList* mpList;
-	sal_Bool			mbUserDraw;
 };
 
 /*************************************************************************
@@ -322,23 +317,18 @@ private:
 class SVX_DLLPUBLIC BitmapLB : public ListBox
 {
 public:
-    BitmapLB(Window* pParent, ResId Id, bool bUserDraw = true);
+    explicit BitmapLB(Window* pParent, ResId Id);
 
 	virtual void Fill(const XBitmapList* pList);
-	virtual void UserDraw(const UserDrawEvent& rUDEvt);
 
 	void Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx = 0);
 	void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = 0);
 	void SelectEntryByList(const XBitmapList* pList, const String& rStr);
 
 private:
-	VirtualDevice	maVD;
 	BitmapEx        maBitmapEx;
 
 	XBitmapList*	mpList;
-	bool            mbUserDraw;
-
-	SVX_DLLPRIVATE void SetVirtualDevice(const Size& rSize);
 };
 
 /*************************************************************************
@@ -349,11 +339,8 @@ private:
 class FillAttrLB : public ColorListBox
 {
 private:
-	VirtualDevice	maVD;
 	BitmapEx		maBitmapEx;
 
-	void SetVirtualDevice(const Size& rSize);
-
 public:
     FillAttrLB( Window* pParent, ResId Id );
     FillAttrLB( Window* pParent, WinBits aWB );

Modified: openoffice/trunk/main/svx/inc/svx/xtable.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/xtable.hxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/xtable.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/xtable.hxx Mon Apr 22 16:38:05 2013
@@ -228,10 +228,6 @@ public:
 	virtual sal_Bool        Load() = 0;
 	virtual sal_Bool        Save() = 0;
 	virtual sal_Bool        Create() = 0;
-
-    sal_uInt32 getUiBitmapWidth() const;
-    sal_uInt32 getUiBitmapHeight() const;
-    sal_uInt32 getUiBitmapLineWidth() const;
 };
 
 // -------------------

Modified: openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx (original)
+++ openoffice/trunk/main/svx/source/dialog/dlgctrl.cxx Mon Apr 22 16:38:05 2013
@@ -1105,6 +1105,8 @@ void ColorLB::Fill( const XColorList* pC
         pEntry = pColorTab->GetColor( i );
 		InsertEntry( pEntry->GetColor(), pEntry->GetName() );
 	}
+
+    AdaptDropDownLineCountToMaximum();
 	SetUpdateMode( sal_True );
 }
 
@@ -1113,6 +1115,7 @@ void ColorLB::Fill( const XColorList* pC
 void ColorLB::Append( XColorEntry* pEntry, Bitmap* )
 {
 	InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+    AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
@@ -1140,7 +1143,9 @@ void FillAttrLB::Fill( const XColorList*
         pEntry = pColorTab->GetColor( i );
 		InsertEntry( pEntry->GetColor(), pEntry->GetName() );
 	}
-	SetUpdateMode( sal_True );
+
+    AdaptDropDownLineCountToMaximum();
+    SetUpdateMode( sal_True );
 }
 
 /*************************************************************************
@@ -1149,20 +1154,18 @@ void FillAttrLB::Fill( const XColorList*
 |*
 \************************************************************************/
 
-HatchingLB::HatchingLB( Window* pParent, ResId Id, sal_Bool bUserDraw /*= sal_True*/ )
+HatchingLB::HatchingLB( Window* pParent, ResId Id)
 : ListBox( pParent, Id ),
-  mpList ( NULL ),
-  mbUserDraw( bUserDraw )
+  mpList ( NULL )
 {
-	EnableUserDraw( mbUserDraw );
+    SetEdgeBlending(true);
 }
 
-HatchingLB::HatchingLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw /*= sal_True*/ )
+HatchingLB::HatchingLB( Window* pParent, WinBits aWB)
 : ListBox( pParent, aWB ),
-  mpList ( NULL ),
-  mbUserDraw( bUserDraw )
+  mpList ( NULL )
 {
-	EnableUserDraw( mbUserDraw );
+    SetEdgeBlending(true);
 }
 
 void HatchingLB::Fill( const XHatchList* pList )
@@ -1173,65 +1176,20 @@ void HatchingLB::Fill( const XHatchList*
 
 	SetUpdateMode( sal_False );
 
-	if( mbUserDraw )
-	{
-		for( long i = 0; i < nCount; i++ )
-            InsertEntry( pList->GetHatch( i )->GetName() );
-	}
-	else
+	for( long i = 0; i < nCount; i++ )
 	{
-		for( long i = 0; i < nCount; i++ )
-		{
-            pEntry = pList->GetHatch( i );
-			const Bitmap aBitmap = pList->GetUiBitmap( i );
-			if( !aBitmap.IsEmpty() )
-				InsertEntry( pEntry->GetName(), aBitmap );
-			else
-				InsertEntry( pEntry->GetName() );
-		}
+        pEntry = pList->GetHatch( i );
+		const Bitmap aBitmap = pList->GetUiBitmap( i );
+		if( !aBitmap.IsEmpty() )
+			InsertEntry( pEntry->GetName(), aBitmap );
+		else
+			InsertEntry( pEntry->GetName() );
 	}
 
+    AdaptDropDownLineCountToMaximum();
 	SetUpdateMode( sal_True );
 }
 
-void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt )
-{
-	if( mpList != NULL )
-	{
-		// Draw gradient with borderrectangle
-		const Rectangle& rDrawRect = rUDEvt.GetRect();
-		Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
-
-        sal_Int32 nId = rUDEvt.GetItemId();
-		if( nId >= 0 && nId <= mpList->Count() )
-		{
-			OutputDevice* pDevice = rUDEvt.GetDevice();
-
-			sal_uIntPtr nOldDrawMode = pDevice->GetDrawMode();
-		    pDevice->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
-
-            const XHatch& rXHatch = mpList->GetHatch( rUDEvt.GetItemId() )->GetHatch();
-			MapMode aMode( MAP_100TH_MM );
-			Hatch aHatch( (HatchStyle) rXHatch.GetHatchStyle(),
-						  rXHatch.GetColor(),
-						  rUDEvt.GetDevice()->LogicToPixel( Point( rXHatch.GetDistance(), 0 ), aMode ).X(),
-						  (sal_uInt16)rXHatch.GetAngle() );
-			const Polygon aPolygon( aRect );
-			const PolyPolygon aPolypoly( aPolygon );
-			pDevice->DrawHatch( aPolypoly, aHatch );
-
-			pDevice->SetLineColor( COL_BLACK );
-			pDevice->SetFillColor();
-			pDevice->DrawRect( aRect );
-
-			pDevice->SetDrawMode( nOldDrawMode );
-
-			// Draw name
-            pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetHatch( rUDEvt.GetItemId() )->GetName() );
-		}
-	}
-}
-
 /************************************************************************/
 
 void HatchingLB::Append( XHatchEntry* pEntry, Bitmap* pBmp )
@@ -1240,6 +1198,7 @@ void HatchingLB::Append( XHatchEntry* pE
 		InsertEntry( pEntry->GetName(), *pBmp );
 	else
 		InsertEntry( pEntry->GetName() );
+    AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
@@ -1299,6 +1258,8 @@ void FillAttrLB::Fill( const XHatchList*
 		else
 			InsertEntry( pEntry->GetName() );
 	}
+
+    AdaptDropDownLineCountToMaximum();
 	ListBox::SetUpdateMode( sal_True );
 }
 
@@ -1308,20 +1269,18 @@ void FillAttrLB::Fill( const XHatchList*
 |*
 \************************************************************************/
 
-GradientLB::GradientLB( Window* pParent, ResId Id, sal_Bool bUserDraw /*= sal_True*/ )
+GradientLB::GradientLB( Window* pParent, ResId Id)
 : ListBox( pParent, Id ),
-  mpList(NULL),
-  mbUserDraw( bUserDraw )
+  mpList(NULL)
 {
-	EnableUserDraw( mbUserDraw);
+    SetEdgeBlending(true);
 }
 
-GradientLB::GradientLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw /*= sal_True*/ )
+GradientLB::GradientLB( Window* pParent, WinBits aWB)
 : ListBox( pParent, aWB ),
-  mpList(NULL),
-  mbUserDraw( bUserDraw )
+  mpList(NULL)
 {
-	EnableUserDraw( mbUserDraw );
+    SetEdgeBlending(true);
 }
 
 void GradientLB::Fill( const XGradientList* pList )
@@ -1332,78 +1291,20 @@ void GradientLB::Fill( const XGradientLi
 
 	SetUpdateMode( sal_False );
 
-	if( mbUserDraw )
-	{
-		for( long i = 0; i < nCount; i++ )
-            InsertEntry( pList->GetGradient( i )->GetName() );
-	}
-	else
+	for( long i = 0; i < nCount; i++ )
 	{
-		for( long i = 0; i < nCount; i++ )
-		{
-            pEntry = pList->GetGradient( i );
-			const Bitmap aBitmap = pList->GetUiBitmap( i );
-			if( !aBitmap.IsEmpty() )
-				InsertEntry( pEntry->GetName(), aBitmap );
-			else
-				InsertEntry( pEntry->GetName() );
-		}
+        pEntry = pList->GetGradient( i );
+		const Bitmap aBitmap = pList->GetUiBitmap( i );
+		if( !aBitmap.IsEmpty() )
+			InsertEntry( pEntry->GetName(), aBitmap );
+		else
+			InsertEntry( pEntry->GetName() );
 	}
 
+    AdaptDropDownLineCountToMaximum();
 	SetUpdateMode( sal_True );
 }
 
-void GradientLB::UserDraw( const UserDrawEvent& rUDEvt )
-{
-	if( mpList != NULL )
-	{
-		// Draw gradient with borderrectangle
-		const Rectangle& rDrawRect = rUDEvt.GetRect();
-		Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
-
-        sal_Int32 nId = rUDEvt.GetItemId();
-		if( nId >= 0 && nId <= mpList->Count() )
-		{
-			OutputDevice* pDevice = rUDEvt.GetDevice();
-
-            const XGradient& rXGrad = mpList->GetGradient( rUDEvt.GetItemId() )->GetGradient();
-			Gradient aGradient( (GradientStyle) rXGrad.GetGradientStyle(), rXGrad.GetStartColor(), rXGrad.GetEndColor() );
-			aGradient.SetAngle( (sal_uInt16)rXGrad.GetAngle() );
-			aGradient.SetBorder( rXGrad.GetBorder() );
-			aGradient.SetOfsX( rXGrad.GetXOffset() );
-			aGradient.SetOfsY( rXGrad.GetYOffset() );
-			aGradient.SetStartIntensity( rXGrad.GetStartIntens() );
-			aGradient.SetEndIntensity( rXGrad.GetEndIntens() );
-			aGradient.SetSteps( 255 );
-            
-            // #i76307# always paint the preview in LTR, because this is what the document does
-            Window* pWin = dynamic_cast<Window*>(pDevice);
-            if( pWin && pWin->IsRTLEnabled() && Application::GetSettings().GetLayoutRTL())
-            {
-                long nWidth = pDevice->GetOutputSize().Width();
-
-                pWin->EnableRTL( sal_False );
-                
-                Rectangle aMirrorRect( Point( nWidth - aRect.Left() - aRect.GetWidth(), aRect.Top() ),
-                                       aRect.GetSize() );
-
-                pDevice->DrawGradient( aMirrorRect, aGradient );
-
-                pWin->EnableRTL( sal_True );
-            }
-            else
-                pDevice->DrawGradient( aRect, aGradient );
-
-			pDevice->SetLineColor( COL_BLACK );
-			pDevice->SetFillColor();
-			pDevice->DrawRect( aRect );
-
-			// Draw name
-            pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetGradient( rUDEvt.GetItemId() )->GetName() );
-		}
-	}
-}
-
 /************************************************************************/
 
 void GradientLB::Append( XGradientEntry* pEntry, Bitmap* pBmp )
@@ -1412,6 +1313,7 @@ void GradientLB::Append( XGradientEntry*
 		InsertEntry( pEntry->GetName(), *pBmp );
 	else
 		InsertEntry( pEntry->GetName() );
+    AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
@@ -1471,6 +1373,8 @@ void FillAttrLB::Fill( const XGradientLi
 		else
 			InsertEntry( pEntry->GetName() );
 	}
+
+    AdaptDropDownLineCountToMaximum();
 	ListBox::SetUpdateMode( sal_True );
 }
 
@@ -1480,41 +1384,61 @@ void FillAttrLB::Fill( const XGradientLi
 |*
 \************************************************************************/
 
-BitmapLB::BitmapLB(Window* pParent, ResId Id, bool bUserDraw /*= false*/ )
+BitmapLB::BitmapLB(Window* pParent, ResId Id)
 :   ListBox(pParent, Id),
-    maVD(),
     maBitmapEx(),
-    mpList(NULL),
-    mbUserDraw(bUserDraw)
+    mpList(NULL)
 {
-	EnableUserDraw(mbUserDraw);
+    SetEdgeBlending(true);
 }
 
 /************************************************************************/
 
-void BitmapLB::SetVirtualDevice(const Size& rSize)
+namespace
 {
-	maVD.SetOutputSizePixel(rSize);
+    void formatBitmapExToSize(BitmapEx& rBitmapEx, const Size& rSize)
+    {
+        if(!rBitmapEx.IsEmpty() && rSize.Width() > 0 && rSize.Height() > 0)
+        {
+            VirtualDevice aVirtualDevice;
+            aVirtualDevice.SetOutputSizePixel(rSize);
 
-	if(maBitmapEx.GetSizePixel().Width() > 8 || maBitmapEx.GetSizePixel().Height() > 8)
-	{
-		maVD.DrawBitmapEx(Point(0, 0), rSize, maBitmapEx);
-	}
-	else
-	{
-        const Size aBitmapSize(maBitmapEx.GetSizePixel());
+            if(rBitmapEx.IsTransparent())
+            {
+                const Point aNull(0, 0);
+                static const sal_uInt32 nLen(8);
+                static const Color aW(COL_WHITE);
+                static const Color aG(0xef, 0xef, 0xef);
 
-        for(sal_Int32 y(0); y < rSize.Height(); y += aBitmapSize.Height())
-        {
-            for(sal_Int32 x(0); x < rSize.Width(); x += aBitmapSize.Width())
+                aVirtualDevice.DrawCheckered(aNull, rSize, nLen, aW, aG);
+            }
+
+            if(rBitmapEx.GetSizePixel().Width() >= rSize.Width() && rBitmapEx.GetSizePixel().Height() >= rSize.Height())
             {
-                maVD.DrawBitmapEx(
-                    Point(x, y),
-                    maBitmapEx);
+                static sal_uInt32 nScaleFlag(BMP_SCALE_FASTESTINTERPOLATE);
+
+                rBitmapEx.Scale(rSize, nScaleFlag);
+                aVirtualDevice.DrawBitmapEx(Point(0, 0), rBitmapEx);
+            }
+            else
+            {
+                const Size aBitmapSize(rBitmapEx.GetSizePixel());
+
+                for(sal_Int32 y(0); y < rSize.Height(); y += aBitmapSize.Height())
+                {
+                    for(sal_Int32 x(0); x < rSize.Width(); x += aBitmapSize.Width())
+                    {
+                        aVirtualDevice.DrawBitmapEx(
+                            Point(x, y),
+                            rBitmapEx);
+                    }
+                }
             }
+
+            rBitmapEx = aVirtualDevice.GetBitmap(Point(0, 0), rSize);
         }
-	}
-}
+    }
+} // end of anonymous namespace
 
 /************************************************************************/
 
@@ -1523,76 +1447,23 @@ void BitmapLB::Fill(const XBitmapList* p
 	mpList = (XBitmapList*)pList;
 	XBitmapEntry* pEntry;
 	const long nCount(pList->Count());
+    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+    const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
 
 	SetUpdateMode(false);
 
-	if(mbUserDraw)
-	{
-		for(long i(0); i < nCount; i++)
-        {
-            InsertEntry(pList->GetBitmap(i)->GetName());
-        }
-	}
-	else
+	for(long i(0); i < nCount; i++)
 	{
-		for(long i(0); i < nCount; i++)
-		{
-            pEntry = pList->GetBitmap(i);
-			maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
-            const Size aSize(pList->getUiBitmapWidth(), pList->getUiBitmapHeight());
-			SetVirtualDevice(aSize);
-			InsertEntry(
-                pEntry->GetName(), 
-                maVD.GetBitmap(Point(0, 0), 
-                aSize));
-		}
+        pEntry = pList->GetBitmap(i);
+        maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
+        formatBitmapExToSize(maBitmapEx, aSize);
+        InsertEntry(pEntry->GetName(), maBitmapEx);
 	}
 
+    AdaptDropDownLineCountToMaximum();
 	SetUpdateMode(true);
 }
 
-void BitmapLB::UserDraw(const UserDrawEvent& rUDEvt)
-{
-	if(mpList)
-	{
-		// Draw bitmap
-		const Rectangle& rDrawRect = rUDEvt.GetRect();
-		const Rectangle aRect(rDrawRect.nLeft + 1, rDrawRect.nTop + 1, rDrawRect.nLeft + 33, rDrawRect.nBottom - 1);
-        const sal_Int32 nId(rUDEvt.GetItemId());
-		
-        if(nId >= 0 && nId <= mpList->Count())
-		{
-			const Rectangle aClipRect(rDrawRect.nLeft + 1, rDrawRect.nTop + 1, rDrawRect.nRight - 1, rDrawRect.nBottom - 1);
-			OutputDevice* pDevice = rUDEvt.GetDevice();
-			pDevice->SetClipRegion(Region(aClipRect));
-            maBitmapEx = mpList->GetBitmap(nId)->GetGraphicObject().GetGraphic().GetBitmapEx();
-			long nPosBaseX = aRect.nLeft;
-			long nPosBaseY = aRect.nTop;
-
-			if(maBitmapEx.GetSizePixel().Width() > 8 || maBitmapEx.GetSizePixel().Height() > 8)
-			{
-				pDevice->DrawBitmapEx(Point(nPosBaseX, nPosBaseY), Size(32, 16), maBitmapEx);
-			}
-			else
-			{
-				pDevice->DrawBitmapEx(Point(nPosBaseX+ 0, nPosBaseY+0 ), maBitmapEx);
-				pDevice->DrawBitmapEx(Point(nPosBaseX+ 8, nPosBaseY+0 ), maBitmapEx);
-				pDevice->DrawBitmapEx(Point(nPosBaseX+16, nPosBaseY+0 ), maBitmapEx);
-				pDevice->DrawBitmapEx(Point(nPosBaseX+24, nPosBaseY+0 ), maBitmapEx);
-				pDevice->DrawBitmapEx(Point(nPosBaseX+ 0, nPosBaseY+8 ), maBitmapEx);
-				pDevice->DrawBitmapEx(Point(nPosBaseX+ 8, nPosBaseY+8 ), maBitmapEx);
-				pDevice->DrawBitmapEx(Point(nPosBaseX+16, nPosBaseY+8 ), maBitmapEx);
-				pDevice->DrawBitmapEx(Point(nPosBaseX+24, nPosBaseY+8 ), maBitmapEx);
-			}
-
-			pDevice->SetClipRegion();
-
-			// Draw name
-            pDevice->DrawText(Point(aRect.nRight + 7, aRect.nTop - 1), mpList->GetBitmap(nId)->GetName());
-		}
-	}
-}
-
 /************************************************************************/
 
 void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx)
@@ -1600,16 +1471,15 @@ void BitmapLB::Append(const Size& rSize,
 	if(pBmpEx)
 	{
 		maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
-		SetVirtualDevice(rSize);
-		InsertEntry(
-            rEntry.GetName(), 
-            maVD.GetBitmap(Point(0, 0), 
-            rSize));
+        formatBitmapExToSize(maBitmapEx, rSize);
+		InsertEntry(rEntry.GetName(), maBitmapEx);
 	}
 	else
     {
 		InsertEntry(rEntry.GetName());
     }
+
+    AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
@@ -1621,11 +1491,8 @@ void BitmapLB::Modify(const Size& rSize,
 	if(pBmpEx)
 	{
 		maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
-		SetVirtualDevice(rSize);
-		InsertEntry(
-            rEntry.GetName(), 
-            maVD.GetBitmap(Point(0, 0), rSize), 
-            nPos);
+        formatBitmapExToSize(maBitmapEx, rSize);
+		InsertEntry(rEntry.GetName(), maBitmapEx, nPos);
 	}
 	else
     {
@@ -1667,7 +1534,6 @@ void BitmapLB::SelectEntryByList(const X
 
 FillAttrLB::FillAttrLB( Window* pParent, ResId Id ) 
 :   ColorListBox(pParent, Id),
-    maVD(),
     maBitmapEx()
 {
 }
@@ -1681,37 +1547,12 @@ FillAttrLB::FillAttrLB(Window* pParent, 
 
 /************************************************************************/
 
-void FillAttrLB::SetVirtualDevice(const Size& rSize)
-{
-	maVD.SetOutputSizePixel(rSize);
-    maVD.Erase();
-
-    if(maBitmapEx.GetSizePixel().Width() > 8 || maBitmapEx.GetSizePixel().Height() > 8)
-	{
-		maVD.DrawBitmapEx(Point(0, 0), rSize, maBitmapEx);
-	}
-	else
-	{
-        const Size aBitmapSize(maBitmapEx.GetSizePixel());
-
-        for(sal_Int32 y(0); y < rSize.Height(); y += aBitmapSize.Height())
-        {
-            for(sal_Int32 x(0); x < rSize.Width(); x += aBitmapSize.Width())
-            {
-                maVD.DrawBitmapEx(
-                    Point(x, y),
-                    maBitmapEx);
-            }
-        }
-	}
-}
-
-/************************************************************************/
-
 void FillAttrLB::Fill(const XBitmapList* pList)
 {
 	const long nCount(pList->Count());
 	XBitmapEntry* pEntry;
+    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+    const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
 	
     ListBox::SetUpdateMode(false);
 
@@ -1719,14 +1560,11 @@ void FillAttrLB::Fill(const XBitmapList*
 	{
         pEntry = pList->GetBitmap( i );
 		maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
-        const Size aSize(pList->getUiBitmapWidth(), pList->getUiBitmapHeight());
-		SetVirtualDevice(aSize);
-		ListBox::InsertEntry(
-            pEntry->GetName(), 
-            maVD.GetBitmap(Point(0, 0), 
-            aSize));
+        formatBitmapExToSize(maBitmapEx, aSize);
+		ListBox::InsertEntry(pEntry->GetName(), maBitmapEx);
 	}
 
+    AdaptDropDownLineCountToMaximum();
     ListBox::SetUpdateMode(true);
 }
 
@@ -1765,11 +1603,14 @@ void FillAttrLB::SelectEntryByList( cons
 void FillTypeLB::Fill()
 {
 	SetUpdateMode( sal_False );
-	InsertEntry( String( SVX_RES( RID_SVXSTR_INVISIBLE ) ) );
+
+    InsertEntry( String( SVX_RES( RID_SVXSTR_INVISIBLE ) ) );
 	InsertEntry( String( SVX_RES( RID_SVXSTR_COLOR ) ) );
 	InsertEntry( String( SVX_RES( RID_SVXSTR_GRADIENT ) ) );
 	InsertEntry( String( SVX_RES( RID_SVXSTR_HATCH ) ) );
 	InsertEntry( String( SVX_RES( RID_SVXSTR_BITMAP ) ) );
+
+    AdaptDropDownLineCountToMaximum();
 	SetUpdateMode( sal_True );
 }
 
@@ -1782,12 +1623,14 @@ LineLB::LineLB(Window* pParent, ResId Id
 :   ListBox(pParent, Id),
     mbAddStandardFields(true)
 {
+    // No EdgeBlending for LineStyle/Dash SetEdgeBlending(true);
 }
 
 LineLB::LineLB(Window* pParent, WinBits aWB) 
 :   ListBox(pParent, aWB),
     mbAddStandardFields(true)
 {
+    // No EdgeBlending for LineStyle/Dash SetEdgeBlending(true);
 }
 
 LineLB::~LineLB()
@@ -1832,6 +1675,8 @@ void LineLB::Fill( const XDashList* pLis
 		else
 			InsertEntry( pEntry->GetName() );
 	}
+
+    AdaptDropDownLineCountToMaximum();
 	SetUpdateMode( sal_True );
 }
 
@@ -1843,6 +1688,7 @@ void LineLB::Append( XDashEntry* pEntry,
 		InsertEntry( pEntry->GetName(), *pBmp );
 	else
 		InsertEntry( pEntry->GetName() );
+    AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/
@@ -1891,11 +1737,13 @@ void LineLB::SelectEntryByList( const XD
 LineEndLB::LineEndLB( Window* pParent, ResId Id )
     : ListBox( pParent, Id )
 {
+    // No EdgeBlending for LineEnds SetEdgeBlending(true);
 }
 
 LineEndLB::LineEndLB( Window* pParent, WinBits aWB )
     : ListBox( pParent, aWB )
 {
+    // No EdgeBlending for LineEnds SetEdgeBlending(true);
 }
 
 LineEndLB::~LineEndLB(void)
@@ -1927,6 +1775,8 @@ void LineEndLB::Fill( const XLineEndList
 		else
 			InsertEntry( pEntry->GetName() );
 	}
+
+    AdaptDropDownLineCountToMaximum();
 	SetUpdateMode( sal_True );
 }
 
@@ -1947,6 +1797,7 @@ void LineEndLB::Append( XLineEndEntry* p
 	}
 	else
 		InsertEntry( pEntry->GetName() );
+    AdaptDropDownLineCountToMaximum();
 }
 
 /************************************************************************/

Modified: openoffice/trunk/main/svx/source/sidebar/area/AreaPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/area/AreaPropertyPanel.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/area/AreaPropertyPanel.cxx (original)
+++ openoffice/trunk/main/svx/source/sidebar/area/AreaPropertyPanel.cxx Mon Apr 22 16:38:05 2013
@@ -329,7 +329,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
 							mpLbFillAttr->Fill( aItem.GetGradientList() );	
 						}
 
-                        mpLbFillAttr->SetDropDownLineCount(std::min(sal_uInt16(20), mpLbFillAttr->GetEntryCount()));
+                        mpLbFillAttr->AdaptDropDownLineCountToMaximum();
 
 						if ( mnLastPosGradient != LISTBOX_ENTRY_NOTFOUND)
 						{
@@ -364,7 +364,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
 							mpLbFillAttr->Fill( aItem.GetHatchList() );
 						}
 
-                        mpLbFillAttr->SetDropDownLineCount(std::min(sal_uInt16(20), mpLbFillAttr->GetEntryCount()));
+                        mpLbFillAttr->AdaptDropDownLineCountToMaximum();
 
 						if ( mnLastPosHatch != LISTBOX_ENTRY_NOTFOUND )
 						{
@@ -399,7 +399,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFill
 							mpLbFillAttr->Fill( aItem.GetBitmapList() );
 						}
 
-                        mpLbFillAttr->SetDropDownLineCount(std::min(sal_uInt16(20), mpLbFillAttr->GetEntryCount()));
+                        mpLbFillAttr->AdaptDropDownLineCountToMaximum();
 
 						if ( mnLastPosBitmap != LISTBOX_ENTRY_NOTFOUND )
 						{

Modified: openoffice/trunk/main/svx/source/sidebar/line/LinePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/line/LinePropertyPanel.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/line/LinePropertyPanel.cxx (original)
+++ openoffice/trunk/main/svx/source/sidebar/line/LinePropertyPanel.cxx Mon Apr 22 16:38:05 2013
@@ -305,7 +305,7 @@ void LinePropertyPanel::Initialize()
 	aLink = LINK( this, LinePropertyPanel, ChangeLineStyleHdl );
 	mpLBStyle->SetSelectHdl( aLink );
 	mpLBStyle->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Style")));
-    mpLBStyle->SetDropDownLineCount(std::min(sal_uInt16(20), mpLBStyle->GetEntryCount()));
+    mpLBStyle->AdaptDropDownLineCountToMaximum();
 
 	mpTBWidth->SetItemImage(TBI_WIDTH, mpIMGWidthIcon[0]);
 	aTbxSize = mpTBWidth->CalcWindowSizePixel() ;
@@ -324,11 +324,11 @@ void LinePropertyPanel::Initialize()
 	aLink = LINK( this, LinePropertyPanel, ChangeStartHdl );
 	mpLBStart->SetSelectHdl( aLink );
 	mpLBStart->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Beginning Style")));	//wj acc
-    mpLBStart->SetDropDownLineCount(std::min(sal_uInt16(20), mpLBStart->GetEntryCount()));
+    mpLBStart->AdaptDropDownLineCountToMaximum();
 	aLink = LINK( this, LinePropertyPanel, ChangeEndHdl );
 	mpLBEnd->SetSelectHdl( aLink );
 	mpLBEnd->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Ending Style")));	//wj acc
-    mpLBEnd->SetDropDownLineCount(std::min(sal_uInt16(20), mpLBEnd->GetEntryCount()));
+    mpLBEnd->AdaptDropDownLineCountToMaximum();
 
 	aLink = LINK(this, LinePropertyPanel, ChangeTransparentHdl);
 	mpMFTransparent->SetModifyHdl(aLink);

Modified: openoffice/trunk/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx (original)
+++ openoffice/trunk/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx Mon Apr 22 16:38:05 2013
@@ -207,7 +207,7 @@ void PosSizePropertyPanel::Initialize()
 	mpMtrAngle->InsertValue(22500, FUNIT_CUSTOM);
 	mpMtrAngle->InsertValue(27000, FUNIT_CUSTOM);
 	mpMtrAngle->InsertValue(31500, FUNIT_CUSTOM);
-    mpMtrAngle->SetDropDownLineCount(mpMtrAngle->GetEntryCount());
+    mpMtrAngle->AdaptDropDownLineCountToMaximum();
 
     SfxViewShell* pCurSh = SfxViewShell::Current();
 	if ( pCurSh )

Modified: openoffice/trunk/main/svx/source/tbxctrls/SvxColorValueSet.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/tbxctrls/SvxColorValueSet.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/tbxctrls/SvxColorValueSet.cxx (original)
+++ openoffice/trunk/main/svx/source/tbxctrls/SvxColorValueSet.cxx Mon Apr 22 16:38:05 2013
@@ -24,39 +24,41 @@
 
 #include <svx/SvxColorValueSet.hxx>
 #include <svx/xtable.hxx>
-#include <svtools/accessibilityoptions.hxx>
+#include <vcl/svapp.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 
 SvxColorValueSet::SvxColorValueSet(Window* _pParent, WinBits nWinStyle) 
 :   ValueSet(_pParent, nWinStyle)
 {
+    SetEdgeBlending(true);
 }
 
 SvxColorValueSet::SvxColorValueSet(Window* _pParent, const ResId& rResId) 
 :   ValueSet(_pParent, rResId)
 {
+    SetEdgeBlending(true);
 }
 
 sal_uInt32 SvxColorValueSet::getMaxRowCount() const 
 { 
-    const SvtAccessibilityOptions aOptions;
+    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
 
-    return aOptions.GetColorValueSetMaximumRowCount(); 
+    return rStyleSettings.GetColorValueSetMaximumRowCount();
 }
 
 sal_uInt32 SvxColorValueSet::getEntryEdgeLength() const
 {
-    const SvtAccessibilityOptions aOptions;
+    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
 
-    return aOptions.GetColorValueSetEntryEdgeLength(); 
+    return rStyleSettings.GetListBoxPreviewDefaultPixelSize().Height() + 1;
 }
 
 sal_uInt32 SvxColorValueSet::getColumnCount() const
 {
-    const SvtAccessibilityOptions aOptions;
+    const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
 
-    return aOptions.GetColorValueSetColumnCount(); 
+    return rStyleSettings.GetColorValueSetColumnCount();
 }
 
 void SvxColorValueSet::addEntriesForXColorList(const XColorList& rXColorList, sal_uInt32 nStartIndex)

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabdash.cxx Mon Apr 22 16:38:05 2013
@@ -117,9 +117,10 @@ void XDashList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
 		OSL_ENSURE(0 != pVirDev, "XDashList: no VirtualDevice created!" );
 		pVirDev->SetMapMode(MAP_100TH_MM);
+        const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
 		const Size aSize(pVirDev->PixelToLogic(Size(
-            bUseDoubleSize ? getUiBitmapWidth() * 5 : getUiBitmapWidth() * 5 / 2, 
-            bUseDoubleSize ? getUiBitmapHeight() * 2 : getUiBitmapHeight())));
+            bUseDoubleSize ? rSize.Width() * 5 : rSize.Width() * 5 / 2, 
+            bUseDoubleSize ? rSize.Height() * 2 : rSize.Height())));
 		pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
@@ -149,7 +150,7 @@ void XDashList::impCreate()
     	pLineObject->SetModel(pSdrModel);
         pLineObject->SetMergedItem(XLineStyleItem(XLINE_DASH));
         pLineObject->SetMergedItem(XLineColorItem(String(), rStyleSettings.GetFieldTextColor()));
-		const Size aLineWidth(pVirDev->PixelToLogic(Size(getUiBitmapLineWidth(), 0)));
+		const Size aLineWidth(pVirDev->PixelToLogic(Size(rStyleSettings.GetListBoxPreviewDefaultLineWidth(), 0)));
         pLineObject->SetMergedItem(XLineWidthItem(bUseDoubleSize ? aLineWidth.getWidth() * 2 : aLineWidth.getWidth()));
         mpData = new impXDashList(pVirDev, pSdrModel, pBackgroundObject, pLineObject);
 		OSL_ENSURE(0 != mpData, "XDashList: data creation went wrong!" );

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabgrdt.cxx Mon Apr 22 16:38:05 2013
@@ -106,7 +106,8 @@ void XGradientList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
 		OSL_ENSURE(0 != pVirDev, "XGradientList: no VirtualDevice created!" );
 		pVirDev->SetMapMode(MAP_100TH_MM);
-		const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth(), getUiBitmapHeight())));
+        const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
+		const Size aSize(pVirDev->PixelToLogic(rSize));
 		pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
@@ -125,7 +126,7 @@ void XGradientList::impCreate()
         pBackgroundObject->SetMergedItem(XFillStyleItem(XFILL_GRADIENT));
         pBackgroundObject->SetMergedItem(XLineStyleItem(XLINE_SOLID));
         pBackgroundObject->SetMergedItem(XLineColorItem(String(), Color(COL_BLACK)));
-        pBackgroundObject->SetMergedItem(XGradientStepCountItem(sal_uInt16((getUiBitmapWidth() + getUiBitmapHeight()) / 3)));
+        pBackgroundObject->SetMergedItem(XGradientStepCountItem(sal_uInt16((rSize.Width() + rSize.Height()) / 3)));
 
         mpData = new impXGradientList(pVirDev, pSdrModel, pBackgroundObject);
 		OSL_ENSURE(0 != mpData, "XGradientList: data creation went wrong!" );

Modified: openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtabhtch.cxx Mon Apr 22 16:38:05 2013
@@ -109,7 +109,7 @@ void XHatchList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
 		OSL_ENSURE(0 != pVirDev, "XDashList: no VirtualDevice created!" );
 		pVirDev->SetMapMode(MAP_100TH_MM);
-		const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth(), getUiBitmapHeight())));
+		const Size aSize(pVirDev->PixelToLogic(rStyleSettings.GetListBoxPreviewDefaultPixelSize()));
 		pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT

Modified: openoffice/trunk/main/svx/source/xoutdev/xtable.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtable.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtable.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtable.cxx Mon Apr 22 16:38:05 2013
@@ -210,25 +210,4 @@ void XPropertyList::SetName( const Strin
 	}
 }
 
-sal_uInt32 XPropertyList::getUiBitmapWidth() const
-{
-    static sal_uInt32 nWidth = 32; // alternative: 42;
-
-    return nWidth;
-}
-
-sal_uInt32 XPropertyList::getUiBitmapHeight() const
-{
-    static sal_uInt32 nHeight = 12; // alternative: 16;
-
-    return nHeight;
-}
-
-sal_uInt32 XPropertyList::getUiBitmapLineWidth() const
-{
-    static sal_uInt32 nLineWidth = 1;
-
-    return nLineWidth;
-}
-
 // eof

Modified: openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx (original)
+++ openoffice/trunk/main/svx/source/xoutdev/xtablend.cxx Mon Apr 22 16:38:05 2013
@@ -122,7 +122,8 @@ void XLineEndList::impCreate()
         VirtualDevice* pVirDev = new VirtualDevice;
 		OSL_ENSURE(0 != pVirDev, "XLineEndList: no VirtualDevice created!" );
 		pVirDev->SetMapMode(MAP_100TH_MM);
-		const Size aSize(pVirDev->PixelToLogic(Size(getUiBitmapWidth() * 2, getUiBitmapHeight())));
+        const Size& rSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
+		const Size aSize(pVirDev->PixelToLogic(Size(rSize.Width() * 2, rSize.Height())));
 		pVirDev->SetOutputSize(aSize);
         pVirDev->SetDrawMode(rStyleSettings.GetHighContrastMode()
             ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
@@ -149,7 +150,7 @@ void XLineEndList::impCreate()
 	    SdrObject* pLineObject = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygon));
 		OSL_ENSURE(0 != pLineObject, "XLineEndList: no LineObject created!" );
     	pLineObject->SetModel(pSdrModel);
-		const Size aLineWidth(pVirDev->PixelToLogic(Size(getUiBitmapLineWidth(), 0)));
+		const Size aLineWidth(pVirDev->PixelToLogic(Size(rStyleSettings.GetListBoxPreviewDefaultLineWidth(), 0)));
         pLineObject->SetMergedItem(XLineWidthItem(aLineWidth.getWidth()));
         const sal_uInt32 nArrowHeight((aSize.Height() * 8) / 10);
         pLineObject->SetMergedItem(XLineStartWidthItem(nArrowHeight));



Mime
View raw message