[Libreoffice-commits] .: 3 commits - vcl/inc vcl/source

Tor Lillqvist tml at kemper.freedesktop.org
Fri May 20 02:12:48 PDT 2011


 vcl/inc/vcl/toolbox.hxx       |    2 +-
 vcl/source/window/toolbox.cxx |   25 +++++++++++++------------
 2 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit c625409930ff646531158b9949c82b269f1c678f
Author: Lucas Baudin <xapantu at gmail.com>
Date:   Thu May 19 21:37:14 2011 +0200

    Fix headers for the toolbox

diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 2daf42a..7065982 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -261,7 +261,7 @@ private:
     SAL_DLLPRIVATE void            ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn );
     SAL_DLLPRIVATE void            ImplDrawNext( sal_Bool bIn );
     SAL_DLLPRIVATE void            ImplDrawSeparator( sal_uInt16 nPos, Rectangle rRect );
-    SAL_DLLPRIVATE void            ImplDrawItem( sal_uInt16 nPos, sal_Bool bHighlight = sal_False, sal_Bool bPaint = sal_False, sal_Bool bLayout = sal_False );
+    SAL_DLLPRIVATE void            ImplDrawItem( sal_uInt16 nPos, sal_uInt16 bHighlight = sal_False, sal_Bool bPaint = sal_False, sal_Bool bLayout = sal_False );
     using Window::ImplInvalidate;
     SAL_DLLPRIVATE void            ImplInvalidate( sal_Bool bNewCalc = sal_False, sal_Bool bFullPaint = sal_False );
     SAL_DLLPRIVATE void            ImplUpdateItem( sal_uInt16 nIndex = 0xFFFF );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index fc737c2..c9d92b5 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3476,7 +3476,7 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 h
         pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, sal_True, bIsWindow, 2, NULL, NULL );
 }
 
-void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHighlight, sal_Bool bPaint, sal_Bool bLayout )
+void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 bHighlight, sal_Bool bPaint, sal_Bool bLayout )
 {
     DBG_CHKTHIS( Window, ImplDbgCheckWindow );
 
commit a7d3ed7cd872ae714302eb931a4980492fb95d74
Author: Lucas Baudin <xapantu at gmail.com>
Date:   Thu May 19 21:26:51 2011 +0200

    Fix a bug about presssed button state

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 5e1e3a4..fc737c2 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3494,7 +3494,8 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHighlight, sal_Bool bPain
     MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : NULL;
     String* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : NULL;
     
-    bHighlight = bHighlight && pItem->mbEnabled;
+    if(!pItem->mbEnabled)
+        bHighlight = 0;
 
     // Falls Rechteck ausserhalb des sichbaren Bereichs liegt
     if ( pItem->maRect.IsEmpty() )
commit b1bfc20b092cb670920f5ef0318b749a881be7c9
Author: Lucas Baudin <xapantu at gmail.com>
Date:   Thu May 19 21:22:28 2011 +0200

    Put tabs instead of space in toolbox.cxx

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 0897047..5e1e3a4 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -569,7 +569,7 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi
 {
     // just invalidate to trigger paint of the parent
 
-    const bool		bOldPaintLock = pThis->mpData->mbIsPaintLocked;
+    const bool        bOldPaintLock = pThis->mpData->mbIsPaintLocked;
     pThis->mpData->mbIsPaintLocked = true;
 
     // send an invalidate to the first opaque parent and invalidate the whole hierarchy from there (noclipchildren)
@@ -1574,7 +1574,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
     ImplGetWindowImpl()->mbToolBox         = sal_True;
     mpBtnDev          = NULL;
     mpFloatSizeAry    = NULL;
-    mpData				= new ImplToolBoxPrivateData;
+    mpData                = new ImplToolBoxPrivateData;
     mpFloatWin        = NULL;
     mnDX              = 0;
     mnDY              = 0;
@@ -1593,7 +1593,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
     mnCurItemId       = 0;
     mnDownItemId      = 0;
     mnCurPos          = TOOLBOX_ITEM_NOTFOUND;
-    mnFocusPos        = TOOLBOX_ITEM_NOTFOUND;	// current position during keyboard access
+    mnFocusPos        = TOOLBOX_ITEM_NOTFOUND;    // current position during keyboard access
     mnLines           = 1;
     mnCurLine         = 1;
     mnCurLines        = 1;
@@ -1618,7 +1618,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
     mbCustomizeMode   = sal_False;
     mbDragging        = sal_False;
     mbMenuStrings     = sal_False;
-    mbIsShift		  = sal_False;
+    mbIsShift          = sal_False;
     mbIsKeyEvent = sal_False;
     mbChangingHighlight = sal_False;
     meButtonType      = BUTTON_SYMBOL;
@@ -1626,7 +1626,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
     meLastStyle       = POINTER_ARROW;
     mnWinStyle        = nStyle;
     mnLastFocusItemId          = 0;
-    mnKeyModifier	  = 0;
+    mnKeyModifier      = 0;
     mnActivateCount   = 0;
 
     maTimer.SetTimeout( 50 );
@@ -3462,7 +3462,7 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 h
         ControlState        nState = 0;
 
         if ( highlight == 1 )   nState |= CTRL_STATE_PRESSED;
-        if ( highlight == 2 ) 	nState |= CTRL_STATE_ROLLOVER;
+        if ( highlight == 2 )     nState |= CTRL_STATE_ROLLOVER;
         if ( bEnabled )         nState |= CTRL_STATE_ENABLED;
 
         aControlValue.setTristateVal( bChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
@@ -5759,7 +5759,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
         case KEY_UP:
         {
             // Ctrl-Cursor activates next toolbox, indicated by a blue arrow pointing to the left/up
-            if( aKeyCode.GetModifier() )	// allow only pure cursor keys
+            if( aKeyCode.GetModifier() )    // allow only pure cursor keys
                 break;
             if( !IsHorizontal() )
                 ImplChangeHighlightUpDn( sal_True );
@@ -5769,7 +5769,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
         break;
         case KEY_LEFT:
         {
-            if( aKeyCode.GetModifier() )	// allow only pure cursor keys
+            if( aKeyCode.GetModifier() )    // allow only pure cursor keys
                 break;
             if( IsHorizontal() )
                 ImplChangeHighlightUpDn( sal_True );
@@ -5779,7 +5779,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
         break;
         case KEY_DOWN:
         {
-            if( aKeyCode.GetModifier() )	// allow only pure cursor keys
+            if( aKeyCode.GetModifier() )    // allow only pure cursor keys
                 break;
             if( !IsHorizontal() )
                 ImplChangeHighlightUpDn( sal_False );
@@ -5789,7 +5789,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
         break;
         case KEY_RIGHT:
         {
-            if( aKeyCode.GetModifier() )	// allow only pure cursor keys
+            if( aKeyCode.GetModifier() )    // allow only pure cursor keys
                 break;
             if( IsHorizontal() )
                 ImplChangeHighlightUpDn( sal_False );


More information about the Libreoffice-commits mailing list