Modified: openoffice/trunk/main/vcl/inc/ilstbox.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/ilstbox.hxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/ilstbox.hxx (original)
+++ openoffice/trunk/main/vcl/inc/ilstbox.hxx Mon Apr 22 16:38:05 2013
@@ -66,33 +66,33 @@ struct ImplEntryType
        long            mnFlags;
     long        mnHeight;
 
-                               ImplEntryType( const XubString& rStr, const 
Image& rImage ) :
-                                       maStr( rStr ),
-                                       maImage( rImage ),
-                                       mnFlags( 0 ),
-                    mnHeight( 0 )
-                               {
-                                       mbIsSelected = sal_False;
-                                       mpUserData = NULL;
-                               }
-
-                               ImplEntryType( const XubString& rStr ) :
-                                       maStr( rStr ),
-                                       mnFlags( 0 ),
-                    mnHeight( 0 )
-                               {
-                                       mbIsSelected = sal_False;
-                                       mpUserData = NULL;
-                               }
-
-                               ImplEntryType( const Image& rImage ) :
-                                       maImage( rImage ),
-                                       mnFlags( 0 ),
-                    mnHeight( 0 )
-                               {
-                                       mbIsSelected = sal_False;
-                                       mpUserData = NULL;
-                               }
+       ImplEntryType( const XubString& rStr, const Image& rImage ) :
+               maStr( rStr ),
+               maImage( rImage ),
+               mnFlags( 0 ),
+        mnHeight( 0 )
+       {
+               mbIsSelected = sal_False;
+               mpUserData = NULL;
+       }
+
+       ImplEntryType( const XubString& rStr ) :
+               maStr( rStr ),
+               mnFlags( 0 ),
+        mnHeight( 0 )
+       {
+               mbIsSelected = sal_False;
+               mpUserData = NULL;
+       }
+
+       ImplEntryType( const Image& rImage ) :
+               maImage( rImage ),
+               mnFlags( 0 ),
+        mnHeight( 0 )
+       {
+               mbIsSelected = sal_False;
+               mpUserData = NULL;
+       }
 };
 
 // -----------------
@@ -223,24 +223,26 @@ private:
 
        sal_uInt16                      mnSelectModifier;       // Modifiers
 
-    sal_Bool                   mbHasFocusRect:         1,
-                    mbSort:                            1,      // ListBox 
sortiert
-                                       mbTrack:                                
1,      // Tracking
-                                       mbMulti:                                
1,      // MultiListBox
-                                       mbStackMode:                    1,      
// StackSelection
-                                       mbSimpleMode:                   1,      
// SimpleMode fuer MultiListBox
-                                       mbImgsDiffSz:                   1,      
// Images haben verschiedene Groessen
-                                       mbTravelSelect:                 1,      
// TravelSelect
-                                       mbTrackingSelect:               1,      
// Selektiert bei MouseMove
-                                       mbSelectionChanged:             1,      
// Select() nicht zu oft rufen...
-                                       mbMouseMoveSelect:              1,  // 
Selektieren bei MouseMove
-                                       mbGrabFocus:                    1,  // 
Focus bei MBDown grabben
-                                       mbUserDrawEnabled:              1,      
// UserDraw possible
-                                       mbInUserDraw:                   1,      
// In UserDraw
-                                       mbReadOnly:                             
1,      // ReadOnly
-                                       mbMirroring:                    1,      
// pb: #106948# explicit mirroring for calc
-                    mbRight:                1,  // right align Text output
-                    mbCenter:               1;  // center Text output
+    /// bitfield
+    bool mbHasFocusRect : 1;
+    bool mbSort : 1;             // ListBox sortiert
+    bool mbTrack : 1;            // Tracking
+    bool mbMulti : 1;            // MultiListBox
+    bool mbStackMode : 1;        // StackSelection
+    bool mbSimpleMode : 1;       // SimpleMode fuer MultiListBox
+    bool mbImgsDiffSz : 1;       // Images haben verschiedene Groessen
+    bool mbTravelSelect : 1;     // TravelSelect
+    bool mbTrackingSelect : 1;   // Selektiert bei MouseMove
+    bool mbSelectionChanged : 1; // Select() nicht zu oft rufen...
+    bool mbMouseMoveSelect : 1;  // Selektieren bei MouseMove
+    bool mbGrabFocus : 1;        // Focus bei MBDown grabben
+    bool mbUserDrawEnabled : 1;  // UserDraw possible
+    bool mbInUserDraw : 1;       // In UserDraw
+    bool mbReadOnly : 1;         // ReadOnly
+    bool mbMirroring : 1;        // pb: #106948# explicit mirroring for calc
+    bool mbRight : 1;            // right align Text output
+    bool mbCenter : 1;           // center Text output
+    bool mbEdgeBlending : 1;
 
        Link                    maScrollHdl;
        Link                    maSelectHdl;
@@ -249,8 +251,7 @@ private:
        Link                    maUserDrawHdl;
        Link                    maMRUChangedHdl;
 
-    ::vcl::QuickSelectionEngine
-                    maQuickSelectionEngine;
+    ::vcl::QuickSelectionEngine maQuickSelectionEngine;
 
 protected:
        virtual void    KeyInput( const KeyEvent& rKEvt );
@@ -315,31 +316,31 @@ public:
        void                    SetLeftIndent( long n );
        void                    ScrollHorz( long nDiff );
 
-       void                    AllowGrabFocus( sal_Bool b )            { 
mbGrabFocus = b; }
-       sal_Bool                        IsGrabFocusAllowed() const              
{ return mbGrabFocus; }
+       void                    AllowGrabFocus( bool b )                { 
mbGrabFocus = b; }
+       bool            IsGrabFocusAllowed() const              { return 
mbGrabFocus; }
 
        void                    SetSeparatorPos( sal_uInt16 n )         { 
mnSeparatorPos = n; }
        sal_uInt16                      GetSeparatorPos() const                 
{ return mnSeparatorPos; }
 
-       void            SetTravelSelect( sal_Bool bTravelSelect ) { 
mbTravelSelect = bTravelSelect; }
-       sal_Bool                        IsTravelSelect() const                  
{ return mbTravelSelect; }
-       sal_Bool                        IsTrackingSelect() const                
        { return mbTrackingSelect; }
+       void            SetTravelSelect( bool bTravelSelect ) { mbTravelSelect 
= bTravelSelect; }
+       bool            IsTravelSelect() const                  { return 
mbTravelSelect; }
+       bool            IsTrackingSelect() const                { return 
mbTrackingSelect; }
 
        void                    SetUserItemSize( const Size& rSz );
        const Size&             GetUserItemSize() const                         
{ return maUserItemSize; }
 
-       void                    EnableUserDraw( sal_Bool bUserDraw ) { 
mbUserDrawEnabled = bUserDraw; }
-       sal_Bool                        IsUserDrawEnabled() const       { 
return mbUserDrawEnabled; }
+       void                    EnableUserDraw( bool bUserDraw ) { 
mbUserDrawEnabled = bUserDraw; }
+       bool            IsUserDrawEnabled() const       { return 
mbUserDrawEnabled; }
 
-       void                    EnableMultiSelection( sal_Bool bMulti, sal_Bool 
bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; }
-       sal_Bool                        IsMultiSelectionEnabled() const         
{ return mbMulti; }
+       void                    EnableMultiSelection( bool bMulti, bool 
bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; }
+       bool            IsMultiSelectionEnabled() const         { return 
mbMulti; }
 
-       void                    SetMultiSelectionSimpleMode( sal_Bool bSimple ) 
{ mbSimpleMode = bSimple; }
-       sal_Bool                        IsMultiSelectionSimpleMode() const      
                { return mbSimpleMode; }
+       void                    SetMultiSelectionSimpleMode( bool bSimple )     
{ mbSimpleMode = bSimple; }
+       bool            IsMultiSelectionSimpleMode() const                      
{ return mbSimpleMode; }
 
-       void                    EnableMouseMoveSelect( sal_Bool 
bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; }
-       sal_Bool                        IsMouseMoveSelectEnabled() const        
{ return mbMouseMoveSelect; }
-       sal_Bool                        IsMouseMoveSelect() const       { 
return mbMouseMoveSelect||mbStackMode; }
+       void                    EnableMouseMoveSelect( bool bMouseMoveSelect ) 
{ mbMouseMoveSelect = bMouseMoveSelect; }
+       bool            IsMouseMoveSelectEnabled() const        { return 
mbMouseMoveSelect; }
+       bool            IsMouseMoveSelect() const       { return 
mbMouseMoveSelect||mbStackMode; }
 
        Size                    CalcSize( sal_uInt16 nMaxLines ) const;
     Rectangle       GetBoundingRectangle( sal_uInt16 nItem ) const;
@@ -360,21 +361,24 @@ public:
        void                    SetMRUChangedHdl( const Link& rLink )   { 
maMRUChangedHdl = rLink; }
        const Link&     GetMRUChangedHdl() const                                
{ return maMRUChangedHdl; }
 
-       sal_Bool                        IsSelectionChanged() const { return 
mbSelectionChanged; }
+       bool            IsSelectionChanged() const { return mbSelectionChanged; 
}
        sal_uInt16                      GetSelectModifier() const { return 
mnSelectModifier; }
 
-       void                    EnableSort( sal_Bool b ) { mbSort = b; }
+       void                    EnableSort( bool b ) { mbSort = b; }
 
-       void                    SetReadOnly( sal_Bool bReadOnly )       { 
mbReadOnly = bReadOnly; }
-       sal_Bool                        IsReadOnly() const                      
        { return mbReadOnly; }
+       void                    SetReadOnly( bool bReadOnly )   { mbReadOnly = 
bReadOnly; }
+       bool            IsReadOnly() const                              { 
return mbReadOnly; }
 
     using Control::ImplInitSettings;
        void                    ImplInitSettings( sal_Bool bFont, sal_Bool 
bForeground, sal_Bool bBackground );
     sal_uInt16          ImplGetTextStyle() const;
 
        // pb: #106948# explicit mirroring for calc
-       inline void             EnableMirroring()               { mbMirroring = 
sal_True; }
-       inline sal_Bool         IsMirroring() const { return mbMirroring; }
+       inline void             EnableMirroring()               { mbMirroring = 
true; }
+       inline bool     IsMirroring() const { return mbMirroring; }
+
+    bool GetEdgeBlending() const { return mbEdgeBlending; }
+    void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; }
 
 protected:
     // ISearchableStringList
@@ -394,9 +398,13 @@ private:
        ScrollBar*                      mpHScrollBar;
        ScrollBar*                      mpVScrollBar;
        ScrollBarBox*           mpScrollBarBox;
-       sal_Bool                                mbVScroll               : 1,    
// VScroll an oder aus
-                                               mbHScroll               : 1,    
// HScroll an oder aus
-                                               mbAutoHScroll   : 1;    // 
AutoHScroll an oder aus
+
+    /// bitfield
+    bool mbVScroll : 1;     // VScroll an oder aus
+    bool mbHScroll : 1;     // HScroll an oder aus
+    bool mbAutoHScroll : 1; // AutoHScroll an oder aus
+    bool mbEdgeBlending : 1;
+
        Link                            maScrollHdl;    // Weil der vom 
ImplListBoxWindow selbst benoetigt wird.
     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > 
mxDNDListenerContainer;
 
@@ -501,7 +509,10 @@ public:
     sal_uInt16                 GetDisplayLineCount() const
     { return maLBWindow.GetDisplayLineCount(); }
 
-       // pb: #106948# explicit mirroring for calc
+    bool GetEdgeBlending() const { return mbEdgeBlending; }
+    void SetEdgeBlending(bool bNew);
+
+    // pb: #106948# explicit mirroring for calc
        inline void             EnableMirroring()       { 
maLBWindow.EnableMirroring(); }
     inline void     SetDropTraget(const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >& i_xDNDListenerContainer){ 
mxDNDListenerContainer= i_xDNDListenerContainer; }
 };
@@ -568,9 +579,10 @@ private:
        Link                    maMBDownHdl;
        Link                    maUserDrawHdl;
 
-       sal_Bool                        mbUserDrawEnabled       : 1,
-                                       mbInUserDraw            : 1;
-
+    /// bitfield
+    bool            mbUserDrawEnabled : 1;
+    bool            mbInUserDraw : 1;
+    bool            mbEdgeBlending : 1;
 
     void ImplDraw( bool bLayout = false );
 protected:
@@ -610,10 +622,13 @@ public:
        void                    SetUserItemSize( const Size& rSz )      { 
maUserItemSize = rSz; }
        const Size&             GetUserItemSize() const                         
{ return maUserItemSize; }
 
-       void                    EnableUserDraw( sal_Bool bUserDraw )    { 
mbUserDrawEnabled = bUserDraw; }
-       sal_Bool                        IsUserDrawEnabled() const               
        { return mbUserDrawEnabled; }
+       void                    EnableUserDraw( bool bUserDraw )        { 
mbUserDrawEnabled = bUserDraw; }
+       bool            IsUserDrawEnabled() const                       { 
return mbUserDrawEnabled; }
 
        void                    DrawEntry( sal_Bool bDrawImage, sal_Bool 
bDrawText, sal_Bool bDrawTextAtImagePos = sal_False, bool bLayout = false );
+
+    bool GetEdgeBlending() const { return mbEdgeBlending; }
+    void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; }
 };
 
 // -----------

Modified: openoffice/trunk/main/vcl/inc/vcl/combobox.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/vcl/combobox.hxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/vcl/combobox.hxx (original)
+++ openoffice/trunk/main/vcl/inc/vcl/combobox.hxx Mon Apr 22 16:38:05 2013
@@ -112,6 +112,7 @@ public:
     // returns empty rectangle in DropDown mode,
     // else it returns the PosSize of the ListBox
 
+    void AdaptDropDownLineCountToMaximum();
     void            SetDropDownLineCount( sal_uInt16 nLines );
     sal_uInt16          GetDropDownLineCount() const;
 

Modified: openoffice/trunk/main/vcl/inc/vcl/lstbox.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/vcl/lstbox.hxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/vcl/lstbox.hxx (original)
+++ openoffice/trunk/main/vcl/inc/vcl/lstbox.hxx Mon Apr 22 16:38:05 2013
@@ -45,12 +45,15 @@ private:
        ImplListBoxFloatingWindow*      mpFloatWin;
        ImplWin*                                        mpImplWin;
        ImplBtn*                                        mpBtn;
-       sal_uInt16                                              mnDDHeight;
-       sal_uInt16                                              mnSaveValue;
-       sal_Bool                                                mbDDAutoSize;
+       sal_uInt16                                      mnDDHeight;
+       sal_uInt16                                      mnSaveValue;
        Link                                            maSelectHdl;
        Link                                            maDoubleClickHdl;
-    sal_uInt16 mnLineCount;
+    sal_uInt16                  mnLineCount;
+
+    /// bitfield
+    bool            mbDDAutoSize : 1;
+    bool            mbEdgeBlending : 1;
 
 //#if 0 // _SOLAR__PRIVATE
 private:
@@ -107,11 +110,12 @@ public:
 
     Rectangle              GetDropDownPosSizePixel() const;
 
+    void AdaptDropDownLineCountToMaximum();
        void                        SetDropDownLineCount( sal_uInt16 nLines );
        sal_uInt16                          GetDropDownLineCount() const;
 
-       void                        EnableAutoSize( sal_Bool bAuto );
-       sal_Bool                            IsAutoSizeEnabled() const { return 
mbDDAutoSize; }
+       void                EnableAutoSize( bool bAuto );
+       bool                IsAutoSizeEnabled() const { return mbDDAutoSize; }
 
     void                EnableDDAutoWidth( sal_Bool b );
     sal_Bool                IsDDAutoWidthEnabled() const;
@@ -218,6 +222,9 @@ public:
 
        void                    EnableMirroring();
 
+    bool GetEdgeBlending() const { return mbEdgeBlending; }
+    void SetEdgeBlending(bool bNew);
+
     /** checks whether a certain point lies within the bounds of
         a listbox item and returns the item as well as the character position
         the point is at.

Modified: openoffice/trunk/main/vcl/inc/vcl/settings.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/vcl/settings.hxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/inc/vcl/settings.hxx (original)
+++ openoffice/trunk/main/vcl/inc/vcl/settings.hxx Mon Apr 22 16:38:05 2013
@@ -408,28 +408,38 @@ private:
     long                            mnIconHorzSpace;
     long                            mnIconVertSpace;
     long                            mnAntialiasedMin;
-    sal_uLong                           mnCursorBlinkTime;
-    sal_uLong                           mnDragFullOptions;
-    sal_uLong                           mnAnimationOptions;
-    sal_uLong                           mnSelectionOptions;
-    sal_uLong                           mnLogoDisplayTime;
-    sal_uLong                           mnDisplayOptions;
-    sal_uLong                           mnToolbarIconSize;
-    sal_uLong                           mnUseFlatMenues;
-    sal_uLong                           mnOptions;
-    sal_uInt16                          mnScreenZoom;
-    sal_uInt16                          mnScreenFontZoom;
-    sal_uInt16                          mnHighContrast;
-    sal_uInt16                          mnUseSystemUIFonts;
-    sal_uInt16                          mnAutoMnemonic;
-    sal_uInt16                          mnUseImagesInMenus;
-    sal_uLong                           mnUseFlatBorders;
+    sal_uLong                       mnCursorBlinkTime;
+    sal_uLong                       mnDragFullOptions;
+    sal_uLong                       mnAnimationOptions;
+    sal_uLong                       mnSelectionOptions;
+    sal_uLong                       mnLogoDisplayTime;
+    sal_uLong                       mnDisplayOptions;
+    sal_uLong                       mnToolbarIconSize;
+    sal_uLong                       mnUseFlatMenues;
+    sal_uLong                       mnOptions;
+    sal_uInt16                      mnScreenZoom;
+    sal_uInt16                      mnScreenFontZoom;
+    sal_uInt16                      mnHighContrast;
+    sal_uInt16                      mnUseSystemUIFonts;
+    sal_uInt16                      mnAutoMnemonic;
+    sal_uInt16                      mnUseImagesInMenus;
+    sal_uLong                       mnUseFlatBorders;
     long                            mnMinThumbSize;
-    sal_uLong                           mnSymbolsStyle;
-    sal_uLong                           mnPreferredSymbolsStyle;
-    sal_uInt16                          mnSkipDisabledInMenus;
+    sal_uLong                       mnSymbolsStyle;
+    sal_uLong                       mnPreferredSymbolsStyle;
+    sal_uInt16                      mnSkipDisabledInMenus;
     Wallpaper                       maWorkspaceGradient;
     const void*                     mpFontOptions;
+
+    sal_uInt16                      mnEdgeBlending;
+    Color                           maEdgeBlendingTopLeftColor;
+    Color                           maEdgeBlendingBottomRightColor;
+    sal_uInt16                      mnListBoxMaximumLineCount;
+    sal_uInt16                      mnColorValueSetColumnCount;
+    sal_uInt16                      mnColorValueSetMaximumRowCount;
+    Size                            maListBoxPreviewDefaultLogicSize;
+    Size                            maListBoxPreviewDefaultPixelSize;
+    sal_uInt16                      mnListBoxPreviewDefaultLineWidth;
 };
 
 #define DEFAULT_WORKSPACE_GRADIENT_START_COLOR Color( 0xa3, 0xae, 0xb8 )
@@ -916,6 +926,49 @@ public:
     void                            SetWorkspaceGradient( const Wallpaper& 
rWall )
                                         { CopyData(); 
mpData->maWorkspaceGradient = rWall; }
 
+    // global switch to allow EdgeBlenging; currently possible for ValueSet 
and ListBox
+    // when activated there using Get/SetEdgeBlending; default is true
+    void SetEdgeBlending(sal_uInt16 nCount) { CopyData(); 
mpData->mnEdgeBlending = nCount; }
+    sal_uInt16 GetEdgeBlending() const { return mpData->mnEdgeBlending; }
+
+    // TopLeft (default RGB_COLORDATA(0xC0, 0xC0, 0xC0)) and BottomRight 
(default RGB_COLORDATA(0x40, 0x40, 0x40))
+    // default colors for EdgeBlending
+    void SetEdgeBlendingTopLeftColor(const Color& rTopLeft) { CopyData(); 
mpData->maEdgeBlendingTopLeftColor = rTopLeft; }
+    const Color& GetEdgeBlendingTopLeftColor() const { return 
mpData->maEdgeBlendingTopLeftColor; }
+    void SetEdgeBlendingBottomRightColor(const Color& rBottomRight) { 
CopyData(); mpData->maEdgeBlendingBottomRightColor = rBottomRight; }
+    const Color& GetEdgeBlendingBottomRightColor() const { return 
mpData->maEdgeBlendingBottomRightColor; }
+
+    // maximum line count for ListBox control; to use this, call 
AdaptDropDownLineCountToMaximum() at the
+    // ListBox after it's ItemCount has changed/got filled. Default is 25. If 
more Items exist, a scrollbar
+    // will be used
+    void SetListBoxMaximumLineCount(sal_uInt16 nCount) { CopyData(); 
mpData->mnListBoxMaximumLineCount = nCount; }
+    sal_uInt16 GetListBoxMaximumLineCount() const { return 
mpData->mnListBoxMaximumLineCount; }
+
+    // maximum column count for the ColorValueSet control. Default is 12 and 
this is optimized for the
+    // color scheme which has 12-color alogned layout for the part taken over 
from Symphony. Do
+    // only change this if you know what you are doing.
+    void SetColorValueSetColumnCount(sal_uInt16 nCount) { CopyData(); 
mpData->mnColorValueSetColumnCount = nCount; }
+    sal_uInt16 GetColorValueSetColumnCount() const { return 
mpData->mnColorValueSetColumnCount; }
+
+    // maximum row/line count for the ColorValueSet control. If more lines 
would be needed, a scrollbar will
+    // be used. Default is 40.
+    void SetColorValueSetMaximumRowCount(sal_uInt16 nCount) { CopyData(); 
mpData->mnColorValueSetMaximumRowCount = nCount; }
+    sal_uInt16 GetColorValueSetMaximumRowCount() const { return 
mpData->mnColorValueSetMaximumRowCount; }
+
+    // the logical size for preview graphics in the ListBoxes (e.g. FillColor, 
FillGradient, FillHatch, FillGraphic, ..). The
+    // default defines a UI-Scale independent setting which will be scaled 
using MAP_APPFONT. This ensures that the size will
+    // fit independent from the used SystemFont (as all the ressources for UI 
elements). The default is Size(15, 7) which gives
+    // the correct height and a decent width. Do not change the height, but 
you may adapt the width to change the preview width.
+    // GetListBoxPreviewDefaultPixelSize() is for convenience so that not 
everyone has to do the scaling itself and contains
+    // the logical size scaled by MAP_APPFONT.
+    void SetListBoxPreviewDefaultLogicSize(const Size& rSize) { CopyData(); 
mpData->maListBoxPreviewDefaultLogicSize = rSize; 
mpData->maListBoxPreviewDefaultPixelSize = Size(0, 0);}
+    const Size& GetListBoxPreviewDefaultLogicSize() const { return 
mpData->maListBoxPreviewDefaultLogicSize; }
+    const Size& GetListBoxPreviewDefaultPixelSize() const;
+
+    // the default LineWidth for ListBox UI previews (LineStyle, LineDash, 
LineStartEnd). Default is 1.
+    void SetListBoxPreviewDefaultLineWidth(sal_uInt16 nWidth) { CopyData(); 
mpData->mnListBoxPreviewDefaultLineWidth = nWidth; }
+    sal_uInt16 GetListBoxPreviewDefaultLineWidth() const { return 
mpData->mnListBoxPreviewDefaultLineWidth; }
+
     void                            SetStandardStyles();
 
     const StyleSettings&            operator =( const StyleSettings& rSet );

Modified: openoffice/trunk/main/vcl/source/app/settings.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/app/settings.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/app/settings.cxx (original)
+++ openoffice/trunk/main/vcl/source/app/settings.cxx Mon Apr 22 16:38:05 2013
@@ -36,6 +36,7 @@
 #include "vcl/gradient.hxx"
 #include "vcl/unohelp.hxx"
 #include "vcl/bitmapex.hxx"
+#include "vcl/outdev.hxx"
 
 #include "unotools/fontcfg.hxx"
 #include "unotools/localedatawrapper.hxx"
@@ -431,6 +432,15 @@ ImplStyleData::ImplStyleData()
     mnSymbolsStyle                             = STYLE_SYMBOLS_AUTO;
     mnPreferredSymbolsStyle                    = STYLE_SYMBOLS_AUTO;
     mpFontOptions              = NULL;
+    mnEdgeBlending = 35;
+    maEdgeBlendingTopLeftColor = RGB_COLORDATA(0xC0, 0xC0, 0xC0);
+    maEdgeBlendingBottomRightColor = RGB_COLORDATA(0x40, 0x40, 0x40);
+    mnListBoxMaximumLineCount = 25;
+    mnColorValueSetColumnCount = 12;
+    mnColorValueSetMaximumRowCount = 40;
+    maListBoxPreviewDefaultLogicSize = Size(15, 7);
+    maListBoxPreviewDefaultPixelSize = Size(0, 0); // on-demand calculated in 
GetListBoxPreviewDefaultPixelSize()
+    mnListBoxPreviewDefaultLineWidth = 1;
 
     SetStandardStyles();
 }
@@ -532,8 +542,17 @@ ImplStyleData::ImplStyleData( const Impl
     mnSkipDisabledInMenus              = rData.mnSkipDisabledInMenus;
     mnToolbarIconSize                  = rData.mnToolbarIconSize;
     mnSymbolsStyle                             = rData.mnSymbolsStyle;
-    mnPreferredSymbolsStyle                    = rData.mnPreferredSymbolsStyle;
+    mnPreferredSymbolsStyle            = rData.mnPreferredSymbolsStyle;
     mpFontOptions               = rData.mpFontOptions;
+    mnEdgeBlending              = rData.mnEdgeBlending;
+    maEdgeBlendingTopLeftColor  = rData.maEdgeBlendingTopLeftColor;
+    maEdgeBlendingBottomRightColor = rData.maEdgeBlendingBottomRightColor;
+    mnListBoxMaximumLineCount   = rData.mnListBoxMaximumLineCount;
+    mnColorValueSetColumnCount  = rData.mnColorValueSetColumnCount;
+    mnColorValueSetMaximumRowCount = rData.mnColorValueSetMaximumRowCount;
+    maListBoxPreviewDefaultLogicSize = rData.maListBoxPreviewDefaultLogicSize;
+    maListBoxPreviewDefaultPixelSize = rData.maListBoxPreviewDefaultPixelSize;
+    mnListBoxPreviewDefaultLineWidth = rData.mnListBoxPreviewDefaultLineWidth;
 }
 
 // -----------------------------------------------------------------------
@@ -652,6 +671,17 @@ StyleSettings::~StyleSettings()
         mpData->mnRefCount--;
 }
 
+const Size& StyleSettings::GetListBoxPreviewDefaultPixelSize() const 
+{
+    if(0 == mpData->maListBoxPreviewDefaultPixelSize.Width() || 0 == 
mpData->maListBoxPreviewDefaultPixelSize.Height())
+    {
+        const_cast< StyleSettings* 
>(this)->mpData->maListBoxPreviewDefaultPixelSize = 
+            
Application::GetDefaultDevice()->LogicToPixel(mpData->maListBoxPreviewDefaultLogicSize,
 MAP_APPFONT);
+    }
+
+    return mpData->maListBoxPreviewDefaultPixelSize; 
+}
+
 // -----------------------------------------------------------------------
 
 void StyleSettings::Set3DColors( const Color& rColor )
@@ -1033,7 +1063,16 @@ sal_Bool StyleSettings::operator ==( con
          (mpData->maIconFont                == rSet.mpData->maIconFont)        
                                &&
          (mpData->mnUseImagesInMenus           == 
rSet.mpData->mnUseImagesInMenus)                     &&
          (mpData->mnSkipDisabledInMenus                == 
rSet.mpData->mnSkipDisabledInMenus)          &&
-                (mpData->maFontColor                           == 
rSet.mpData->maFontColor ))
+         (mpData->maFontColor                          == 
rSet.mpData->maFontColor)                &&
+         (mpData->mnEdgeBlending                    == 
rSet.mpData->mnEdgeBlending)                     &&
+         (mpData->maEdgeBlendingTopLeftColor        == 
rSet.mpData->maEdgeBlendingTopLeftColor)         &&
+         (mpData->maEdgeBlendingBottomRightColor    == 
rSet.mpData->maEdgeBlendingBottomRightColor)     &&
+         (mpData->mnListBoxMaximumLineCount         == 
rSet.mpData->mnListBoxMaximumLineCount)          &&
+         (mpData->mnColorValueSetColumnCount        == 
rSet.mpData->mnColorValueSetColumnCount)         &&
+         (mpData->mnColorValueSetMaximumRowCount    == 
rSet.mpData->mnColorValueSetMaximumRowCount)     &&
+         (mpData->maListBoxPreviewDefaultLogicSize  == 
rSet.mpData->maListBoxPreviewDefaultLogicSize)   &&
+         (mpData->maListBoxPreviewDefaultPixelSize  == 
rSet.mpData->maListBoxPreviewDefaultPixelSize)   &&
+         (mpData->mnListBoxPreviewDefaultLineWidth  == 
rSet.mpData->mnListBoxPreviewDefaultLineWidth))
         return sal_True;
     else
         return sal_False;

Modified: openoffice/trunk/main/vcl/source/control/combobox.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/control/combobox.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/control/combobox.cxx (original)
+++ openoffice/trunk/main/vcl/source/control/combobox.cxx Mon Apr 22 16:38:05 
2013
@@ -546,9 +546,14 @@ void ComboBox::EnableAutoSize( sal_Bool 
        if ( mpFloatWin )
        {
                if ( bAuto && !mpFloatWin->GetDropDownLineCount() )
-                       mpFloatWin->SetDropDownLineCount( 5 );
+        {
+            // Adapt to GetListBoxMaximumLineCount here; was on fixed number 
of five before
+            AdaptDropDownLineCountToMaximum();
+        }
                else if ( !bAuto )
+        {
                        mpFloatWin->SetDropDownLineCount( 0 );
+        }
        }
 }
 
@@ -578,6 +583,14 @@ void ComboBox::SetDropDownLineCount( sal
 
 // -----------------------------------------------------------------------
 
+void ComboBox::AdaptDropDownLineCountToMaximum()
+{
+    // adapt to maximum allowed number
+    SetDropDownLineCount(std::min(GetEntryCount(), 
GetSettings().GetStyleSettings().GetListBoxMaximumLineCount()));
+}
+
+// -----------------------------------------------------------------------
+
 sal_uInt16 ComboBox::GetDropDownLineCount() const
 {
        sal_uInt16 nLines = 0;

Modified: openoffice/trunk/main/vcl/source/control/ilstbox.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/control/ilstbox.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/control/ilstbox.cxx (original)
+++ openoffice/trunk/main/vcl/source/control/ilstbox.cxx Mon Apr 22 16:38:05 
2013
@@ -531,26 +531,27 @@ ImplListBoxWindow::ImplListBoxWindow( Wi
        mnBorder                        = 1;
        mnSelectModifier        = 0;
        mnUserDrawEntry         = LISTBOX_ENTRY_NOTFOUND;
-       mbTrack                         = sal_False;
-       mbImgsDiffSz            = sal_False;
-       mbTravelSelect          = sal_False;
-       mbTrackingSelect        = sal_False;
-       mbSelectionChanged      = sal_False;
-       mbMouseMoveSelect       = sal_False;
-       mbMulti                         = sal_False;
-       mbStackMode             = sal_False;
-       mbGrabFocus             = sal_False;
-       mbUserDrawEnabled       = sal_False;
-       mbInUserDraw            = sal_False;
-       mbReadOnly                      = sal_False;
-    mbHasFocusRect      = sal_False;
-    mbRight             = ( nWinStyle & WB_RIGHT )      ? sal_True : sal_False;
-    mbCenter            = ( nWinStyle & WB_CENTER )     ? sal_True : sal_False;
-       mbSimpleMode            = ( nWinStyle & WB_SIMPLEMODE ) ? sal_True : 
sal_False;
-       mbSort                          = ( nWinStyle & WB_SORT )       ? 
sal_True : sal_False;
+       mbTrack                         = false;
+       mbImgsDiffSz            = false;
+       mbTravelSelect          = false;
+       mbTrackingSelect        = false;
+       mbSelectionChanged      = false;
+       mbMouseMoveSelect       = false;
+       mbMulti                         = false;
+       mbStackMode             = false;
+       mbGrabFocus             = false;
+       mbUserDrawEnabled       = false;
+       mbInUserDraw            = false;
+       mbReadOnly                      = false;
+    mbHasFocusRect      = false;
+    mbRight             = ( nWinStyle & WB_RIGHT );
+    mbCenter            = ( nWinStyle & WB_CENTER );
+       mbSimpleMode            = ( nWinStyle & WB_SIMPLEMODE );
+       mbSort                          = ( nWinStyle & WB_SORT );
+    mbEdgeBlending      = false;
 
        // pb: #106948# explicit mirroring for calc
-       mbMirroring                     = sal_False;
+       mbMirroring                     = false;
 
        mnCurrentPos                    = LISTBOX_ENTRY_NOTFOUND;
        mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND;
@@ -625,7 +626,7 @@ void ImplListBoxWindow::Clear()
        mnMaxImgHeight  = 0;
        mnTop                   = 0;
        mnLeft                  = 0;
-       mbImgsDiffSz    = sal_False;
+       mbImgsDiffSz    = false;
     ImplClearLayoutData();
 
     mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
@@ -701,9 +702,9 @@ void ImplListBoxWindow::ImplUpdateEntryM
                aMetrics.nImgHeight = (sal_uInt16) CalcZoom( aImgSz.Height() );
 
         if( mnMaxImgWidth && ( aMetrics.nImgWidth != mnMaxImgWidth ) )
-            mbImgsDiffSz = sal_True;
+            mbImgsDiffSz = true;
         else if ( mnMaxImgHeight && ( aMetrics.nImgHeight != mnMaxImgHeight ) )
-            mbImgsDiffSz = sal_True;
+            mbImgsDiffSz = true;
 
         if( aMetrics.nImgWidth > mnMaxImgWidth )
             mnMaxImgWidth = aMetrics.nImgWidth;
@@ -778,7 +779,7 @@ void ImplListBoxWindow::ImplCallSelect()
        }
 
        maSelectHdl.Call( NULL );
-       mbSelectionChanged = sal_False;
+       mbSelectionChanged = false;
 }
 
 // -----------------------------------------------------------------------
@@ -823,7 +824,7 @@ void ImplListBoxWindow::ImplShowFocusRec
     if ( mbHasFocusRect )
         HideFocus();
     ShowFocus( maFocusRect );
-    mbHasFocusRect = sal_True;
+    mbHasFocusRect = true;
 }
 
 // -----------------------------------------------------------------------
@@ -833,7 +834,7 @@ void ImplListBoxWindow::ImplHideFocusRec
     if ( mbHasFocusRect )
     {
         HideFocus();
-        mbHasFocusRect = sal_False;
+        mbHasFocusRect = false;
     }
 }
 
@@ -899,7 +900,7 @@ sal_uInt16 ImplListBoxWindow::GetLastVis
 
 void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
 {
-       mbMouseMoveSelect = sal_False;  // Nur bis zum ersten MouseButtonDown
+       mbMouseMoveSelect = false;      // Nur bis zum ersten MouseButtonDown
     maQuickSelectionEngine.Reset();
 
        if ( !IsReadOnly() )
@@ -915,9 +916,9 @@ void ImplListBoxWindow::MouseButtonDown(
                                        mnTrackingSaveSelection = 
LISTBOX_ENTRY_NOTFOUND;
 
                                mnCurrentPos = nSelect;
-                               mbTrackingSelect = sal_True;
+                               mbTrackingSelect = true;
                                SelectEntries( nSelect, LET_MBDOWN, 
rMEvt.IsShift(), rMEvt.IsMod1() );
-                               mbTrackingSelect = sal_False;
+                               mbTrackingSelect = false;
                                if ( mbGrabFocus )
                                        GrabFocus();
 
@@ -950,10 +951,10 @@ void ImplListBoxWindow::MouseMove( const
                 SetTopEntry( 0 );
                                if ( mbStackMode ) // #87072#, #92323#
                                {
-                                       mbTravelSelect = sal_True;
+                                       mbTravelSelect = true;
                                        mnSelectModifier = rMEvt.GetModifier();
                                        ImplCallSelect();
-                                       mbTravelSelect = sal_False;
+                                       mbTravelSelect = false;
                                }
 
                        }
@@ -977,18 +978,18 @@ void ImplListBoxWindow::MouseMove( const
                                        mpEntryList->IsEntrySelectable( nSelect 
) &&
                                        ( ( nSelect != mnCurrentPos ) || 
!GetEntryList()->GetSelectEntryCount() || ( nSelect != 
GetEntryList()->GetSelectEntryPos( 0 ) ) ) )
                                {
-                                       mbTrackingSelect = sal_True;
+                                       mbTrackingSelect = true;
                                        if ( SelectEntries( nSelect, 
LET_TRACKING, sal_False, sal_False ) )
                            {
                         if ( mbStackMode ) // #87072#
                         {
-                                       mbTravelSelect = sal_True;
+                                       mbTravelSelect = true;
                                        mnSelectModifier = rMEvt.GetModifier();
                                        ImplCallSelect();
-                                       mbTravelSelect = sal_False;
+                                       mbTravelSelect = false;
                         }
                            }
-                                       mbTrackingSelect = sal_False;
+                                       mbTrackingSelect = false;
                                }
                        }
 
@@ -1068,7 +1069,7 @@ void ImplListBoxWindow::SelectEntry( sal
                        mpEntryList->SelectEntry( nPos, sal_False );
                        ImplPaint( nPos, sal_True );
                }
-               mbSelectionChanged = sal_True;
+               mbSelectionChanged = true;
        }
 }
 
@@ -1208,7 +1209,7 @@ sal_Bool ImplListBoxWindow::SelectEntrie
                }
 
                if( bSelectionChanged )
-                       mbSelectionChanged = sal_True;
+                       mbSelectionChanged = true;
 
                if( bFocusChanged )
                {
@@ -1245,9 +1246,9 @@ void ImplListBoxWindow::Tracking( const 
                        maCancelHdl.Call( NULL );
                        if ( !mbMulti )
                        {
-                               mbTrackingSelect = sal_True;
+                               mbTrackingSelect = true;
                                SelectEntry( mnTrackingSaveSelection, sal_True 
);
-                               mbTrackingSelect = sal_False;
+                               mbTrackingSelect = false;
                                if ( mnTrackingSaveSelection != 
LISTBOX_ENTRY_NOTFOUND )
                                {
                     long nHeightDiff = mpEntryList->GetAddedHeight( 
mnCurrentPos, mnTop, 0 );
@@ -1260,7 +1261,7 @@ void ImplListBoxWindow::Tracking( const 
                        }
                }
 
-               mbTrack = sal_False;
+               mbTrack = false;
        }
        else
        {
@@ -1269,14 +1270,14 @@ void ImplListBoxWindow::Tracking( const 
                {
                        if ( bInside )
                        {
-                               mbTrack = sal_True;
+                               mbTrack = true;
                        }
 
                        // Folgender Fall tritt nur auf, wenn man ganz kurz die 
Maustaste drueckt
                        if( rTEvt.IsTrackingEnded() && mbTrack )
                        {
                                bTrackOrQuickClick = sal_True;
-                               mbTrack = sal_False;
+                               mbTrack = false;
                        }
                }
 
@@ -1317,27 +1318,27 @@ void ImplListBoxWindow::Tracking( const 
                        {
                                if ( ( nSelect != mnCurrentPos ) || 
!GetEntryList()->GetSelectEntryCount() )
                                {
-                                       mbTrackingSelect = sal_True;
+                                       mbTrackingSelect = true;
                                        if ( SelectEntries( nSelect, 
LET_TRACKING, bShift, bCtrl ) )
                            {
                         if ( mbStackMode ) // #87734# (#87072#)
                         {
-                                       mbTravelSelect = sal_True;
+                                       mbTravelSelect = true;
                                        mnSelectModifier = 
rTEvt.GetMouseEvent().GetModifier();
                                        ImplCallSelect();
-                                       mbTravelSelect = sal_False;
+                                       mbTravelSelect = false;
                         }
                            }
-                                       mbTrackingSelect = sal_False;
+                                       mbTrackingSelect = false;
                                }
                        }
                        else
                        {
                                if ( !mbMulti && 
GetEntryList()->GetSelectEntryCount() )
                                {
-                                       mbTrackingSelect = sal_True;
+                                       mbTrackingSelect = true;
                                        SelectEntry( 
GetEntryList()->GetSelectEntryPos( 0 ), sal_False );
-                                       mbTrackingSelect = sal_False;
+                                       mbTrackingSelect = false;
                                }
                                else if ( mbStackMode )
                 {
@@ -1359,18 +1360,18 @@ void ImplListBoxWindow::Tracking( const 
                             }
                             else
                             {
-                                                   mbTrackingSelect = sal_True;
+                                                   mbTrackingSelect = true;
                                 bSelectionChanged = SelectEntries( nSelect, 
LET_TRACKING, bShift, bCtrl );
-                                                   mbTrackingSelect = 
sal_False;
+                                                   mbTrackingSelect = false;
                             }
 
                             if ( bSelectionChanged )
                                    {
-                                mbSelectionChanged = sal_True;
-                                           mbTravelSelect = sal_True;
+                                mbSelectionChanged = true;
+                                           mbTravelSelect = true;
                                            mnSelectModifier = 
rTEvt.GetMouseEvent().GetModifier();
                                            ImplCallSelect();
-                                           mbTravelSelect = sal_False;
+                                           mbTravelSelect = false;
                                    }
                                        }
                     }
@@ -1684,10 +1685,10 @@ sal_Bool ImplListBoxWindow::ProcessKeyIn
                mnCurrentPos = nSelect;
                if ( SelectEntries( nSelect, eLET, bShift, bCtrl ) )
                {
-                       mbTravelSelect = sal_True;
+                       mbTravelSelect = true;
                        mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
                        ImplCallSelect();
-                       mbTravelSelect = sal_False;
+                       mbTravelSelect = false;
                }
        }
 
@@ -1753,10 +1754,10 @@ void ImplListBoxWindow::SelectEntry( ::v
     mnCurrentPos = nSelect;
        if ( SelectEntries( nSelect, LET_KEYMOVE, sal_False, sal_False ) )
        {
-               mbTravelSelect = sal_True;
+               mbTravelSelect = true;
                mnSelectModifier = 0;
                ImplCallSelect();
-               mbTravelSelect = sal_False;
+               mbTravelSelect = false;
        }
 }
 
@@ -1796,7 +1797,7 @@ void ImplListBoxWindow::ImplPaint( sal_u
 
     if ( IsUserDrawEnabled() )
     {
-        mbInUserDraw = sal_True;
+        mbInUserDraw = true;
                mnUserDrawEntry = nPos;
                aRect.Left() -= mnLeft;
                if ( nPos < GetEntryList()->GetMRUCount() )
@@ -1804,7 +1805,7 @@ void ImplListBoxWindow::ImplPaint( sal_u
                nPos = sal::static_int_cast<sal_uInt16>(nPos - 
GetEntryList()->GetMRUCount());
                UserDrawEvent aUDEvt( this, aRect, nPos, 0 );
                maUserDrawHdl.Call( &aUDEvt );
-               mbInUserDraw = sal_False;
+               mbInUserDraw = false;
        }
        else
        {
@@ -1851,6 +1852,25 @@ void ImplListBoxWindow::DrawEntry( sal_u
                                aImgSz.Height() = CalcZoom( aImgSz.Height() );
                                DrawImage( aPtImg, aImgSz, aImage );
                        }
+
+            const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+            const sal_uInt16 nEdgeBlendingPercent(GetEdgeBlending() ? 
rStyleSettings.GetEdgeBlending() : 0);
+
+            if(nEdgeBlendingPercent)
+            {
+                const Rectangle aRect(aPtImg, aImgSz);
+                Bitmap aBitmap(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);
+                    DrawBitmap(aRect.TopLeft(), aBitmap);
+                }
+            }
                }
        }
 
@@ -2236,12 +2256,14 @@ ImplListBox::ImplListBox( Window* pParen
        mpVScrollBar->SetScrollHdl( aLink );
        mpHScrollBar->SetScrollHdl( aLink );
 
-       mbVScroll               = sal_False;
-       mbHScroll               = sal_False;
-       mbAutoHScroll   = ( nWinStyle & WB_AUTOHSCROLL ) ? sal_True : sal_False;
+       mbVScroll               = false;
+       mbHScroll               = false;
+       mbAutoHScroll   = ( nWinStyle & WB_AUTOHSCROLL );
+    mbEdgeBlending  = false;
 
        maLBWindow.SetScrollHdl( LINK( this, ImplListBox, LBWindowScrolled ) );
        maLBWindow.SetMRUChangedHdl( LINK( this, ImplListBox, MRUChanged ) );
+    maLBWindow.SetEdgeBlending(GetEdgeBlending());
        maLBWindow.Show();
 }
 
@@ -2411,7 +2433,7 @@ void ImplListBox::ImplCheckScrollBars()
        {
                if( !mbVScroll )
                        bArrange = sal_True;
-               mbVScroll = sal_True;
+               mbVScroll = true;
 
                // Ueberpruefung des rausgescrollten Bereichs
         if( GetEntryList()->GetSelectEntryCount() == 1 &&
@@ -2424,7 +2446,7 @@ void ImplListBox::ImplCheckScrollBars()
        {
                if( mbVScroll )
                        bArrange = sal_True;
-               mbVScroll = sal_False;
+               mbVScroll = false;
                SetTopEntry( 0 );
        }
 
@@ -2440,7 +2462,7 @@ void ImplListBox::ImplCheckScrollBars()
                {
                        if( !mbHScroll )
                                bArrange = sal_True;
-                       mbHScroll = sal_True;
+                       mbHScroll = true;
 
                        if ( !mbVScroll )       // ggf. brauchen wir jetzt doch 
einen
                        {
@@ -2448,7 +2470,7 @@ void ImplListBox::ImplCheckScrollBars()
                                if( nEntries > nMaxVisEntries )
                                {
                                        bArrange = sal_True;
-                                       mbVScroll = sal_True;
+                                       mbVScroll = true;
 
                                        // Ueberpruefung des rausgescrollten 
Bereichs
                     if( GetEntryList()->GetSelectEntryCount() == 1 &&
@@ -2468,7 +2490,7 @@ void ImplListBox::ImplCheckScrollBars()
                {
                        if( mbHScroll )
                                bArrange = sal_True;
-                       mbHScroll = sal_False;
+                       mbHScroll = false;
                        SetLeftIndent( 0 );
                }
        }
@@ -2725,6 +2747,17 @@ XubString ImplListBox::GetMRUEntries( xu
        return aEntries;
 }
 
+// -----------------------------------------------------------------------
+
+void ImplListBox::SetEdgeBlending(bool bNew) 
+{ 
+    if(mbEdgeBlending != bNew)
+    {
+        mbEdgeBlending = bNew; 
+        maLBWindow.SetEdgeBlending(GetEdgeBlending());
+    }
+}
+
 // =======================================================================
 
 ImplWin::ImplWin( Window* pParent, WinBits nWinStyle ) :
@@ -2736,8 +2769,9 @@ ImplWin::ImplWin( Window* pParent, WinBi
        else
                SetBackground( Wallpaper( 
GetSettings().GetStyleSettings().GetFieldColor() ) );
 
-       mbInUserDraw = sal_False;
-       mbUserDrawEnabled = sal_False;
+       mbInUserDraw = false;
+       mbUserDrawEnabled = false;
+    mbEdgeBlending = false;
        mnItemPos = LISTBOX_ENTRY_NOTFOUND;
 }
 
@@ -2905,10 +2939,10 @@ void ImplWin::ImplDraw( bool bLayout )
 
        if ( IsUserDrawEnabled() )
        {
-               mbInUserDraw = sal_True;
+               mbInUserDraw = true;
                UserDrawEvent aUDEvt( this, maFocusRect, mnItemPos, 0 );
                maUserDrawHdl.Call( &aUDEvt );
-               mbInUserDraw = sal_False;
+               mbInUserDraw = false;
        }
        else
        {
@@ -2936,13 +2970,14 @@ void ImplWin::DrawEntry( sal_Bool bDrawI
                sal_uInt16 nStyle = 0;
                Size aImgSz = maImage.GetSizePixel();
                Point aPtImg( nBorder, ( ( aOutSz.Height() - aImgSz.Height() ) 
/ 2 ) );
+        const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
 
                // check for HC mode
                Image *pImage = &maImage;
 
                if( !!maImageHC )
                {
-                       if( 
GetSettings().GetStyleSettings().GetHighContrastMode() )
+                       if( rStyleSettings.GetHighContrastMode() )
                                pImage = &maImageHC;
                }
 
@@ -2956,6 +2991,24 @@ void ImplWin::DrawEntry( sal_Bool bDrawI
                        aImgSz.Height() = CalcZoom( aImgSz.Height() );
                        DrawImage( aPtImg, aImgSz, *pImage, nStyle );
                }
+
+        const sal_uInt16 nEdgeBlendingPercent(GetEdgeBlending() ? 
rStyleSettings.GetEdgeBlending() : 0);
+
+        if(nEdgeBlendingPercent)
+        {
+            const Rectangle aRect(aPtImg, aImgSz);
+            Bitmap aBitmap(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);
+                DrawBitmap(aRect.TopLeft(), aBitmap);
+            }
+        }
        }
 
        if( bDrawText && maString.Len() )

Modified: openoffice/trunk/main/vcl/source/control/lstbox.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/control/lstbox.cxx?rev=1470611&r1=1470610&r2=1470611&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/control/lstbox.cxx (original)
+++ openoffice/trunk/main/vcl/source/control/lstbox.cxx Mon Apr 22 16:38:05 2013
@@ -99,11 +99,11 @@ void ListBox::ImplInitListBoxData()
        mpFloatWin              = NULL;
        mpImplWin               = NULL;
        mpBtn                   = NULL;
-
        mnDDHeight              = 0;
-       mbDDAutoSize    = sal_True;
        mnSaveValue     = LISTBOX_ENTRY_NOTFOUND;
     mnLineCount     = 0;
+       mbDDAutoSize    = true;
+    mbEdgeBlending  = false;
 }
 
 // -----------------------------------------------------------------------
@@ -152,13 +152,13 @@ void ListBox::ImplInit( Window* pParent,
                mpImplWin->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl 
) );
                mpImplWin->Show();
         mpImplWin->GetDropTarget()->addDropTargetListener(xDrop);
+        mpImplWin->SetEdgeBlending(GetEdgeBlending());
 
                mpBtn = new ImplBtn( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
                ImplInitDropDownButton( mpBtn );
                mpBtn->SetMBDownHdl( LINK( this, ListBox, ImplClickBtnHdl ) );
                mpBtn->Show();
         mpBtn->GetDropTarget()->addDropTargetListener(xDrop);
-
        }
 
        Window* pLBParent = this;
@@ -171,6 +171,7 @@ void ListBox::ImplInit( Window* pParent,
        mpImplLB->SetDoubleClickHdl( LINK( this, ListBox, ImplDoubleClickHdl ) 
);
        mpImplLB->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
        mpImplLB->SetPosPixel( Point() );
+    mpImplLB->SetEdgeBlending(GetEdgeBlending());
        mpImplLB->Show();
     
     mpImplLB->GetDropTarget()->addDropTargetListener(xDrop);
@@ -584,15 +585,20 @@ void ListBox::DataChanged( const DataCha
 
 // -----------------------------------------------------------------------
 
-void ListBox::EnableAutoSize( sal_Bool bAuto )
+void ListBox::EnableAutoSize( bool bAuto )
 {
        mbDDAutoSize = bAuto;
        if ( mpFloatWin )
        {
                if ( bAuto && !mpFloatWin->GetDropDownLineCount() )
-                       mpFloatWin->SetDropDownLineCount( 5 );
+        {
+            // use GetListBoxMaximumLineCount here; before, was on fixed 
number of five
+            AdaptDropDownLineCountToMaximum();
+        }
                else if ( !bAuto )
+        {
                        mpFloatWin->SetDropDownLineCount( 0 );
+        }
        }
 }
 
@@ -622,6 +628,14 @@ void ListBox::SetDropDownLineCount( sal_
 
 // -----------------------------------------------------------------------
 
+void ListBox::AdaptDropDownLineCountToMaximum()
+{
+    // adapt to maximum allowed number
+    SetDropDownLineCount(std::min(GetEntryCount(), 
GetSettings().GetStyleSettings().GetListBoxMaximumLineCount()));
+}
+
+// -----------------------------------------------------------------------
+
 sal_uInt16 ListBox::GetDropDownLineCount() const
 {
     if ( mpFloatWin )
@@ -1624,6 +1638,37 @@ const Wallpaper& ListBox::GetDisplayBack
     return mpImplLB->GetDisplayBackground();
 }
 
+// -----------------------------------------------------------------------
+
+void ListBox::SetEdgeBlending(bool bNew)
+{
+    if(mbEdgeBlending != bNew)
+    {
+        mbEdgeBlending = bNew;
+
+        if(IsDropDownBox())
+        {
+            mpImplWin->Invalidate();
+        }
+        else
+        {
+            mpImplLB->Invalidate();
+        }
+
+        if(mpImplWin)
+        {
+            mpImplWin->SetEdgeBlending(GetEdgeBlending());
+        }
+
+        if(mpImplLB)
+        {
+            mpImplLB->SetEdgeBlending(GetEdgeBlending());
+        }
+
+        Invalidate();
+    }
+}
+
 // =======================================================================
 MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) :
        ListBox( WINDOW_MULTILISTBOX )
@@ -1646,3 +1691,4 @@ MultiListBox::MultiListBox( Window* pPar
                Show();
        EnableMultiSelection( sal_True );
 }
+


Reply via email to