diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-07-22 10:55:12 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-07-22 10:55:12 +0200 |
commit | 2c2a74a576e35b3a142804cd35de75dbc086bcd3 (patch) | |
tree | 7b6512155c00e266d6b461ab40bcc61ee06dea46 /vcl/source/control/tabctrl.cxx | |
parent | 70146da8808a0aeb48bda3bb837711fa3a812042 (diff) | |
parent | 32c76a4434c49e687c0a6e955f521586f9c75be5 (diff) |
CWS changehid: resync to m85
Diffstat (limited to 'vcl/source/control/tabctrl.cxx')
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index f5c8a9fe5aab..e9696aa8c492 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -409,15 +409,14 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ) aSize.Width() += TAB_TABOFFSET_X*2; aSize.Height() += TAB_TABOFFSET_Y*2; - Region aCtrlRegion( Rectangle( (const Point&)Point( 0, 0 ), aSize ) ); - Region aBoundingRgn, aContentRgn; - const ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 ); + Rectangle aCtrlRegion( Point( 0, 0 ), aSize ); + Rectangle aBoundingRgn, aContentRgn; + const ImplControlValue aControlValue; if(GetNativeControlRegion( CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, aCtrlRegion, CTRL_STATE_ENABLED, aControlValue, rtl::OUString(), aBoundingRgn, aContentRgn ) ) { - Rectangle aCont(aContentRgn.GetBoundRect()); - return aCont.GetSize(); + return aContentRgn.GetSize(); } // For systems without synthetic bold support @@ -929,8 +928,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == TRUE ) { - ImplControlValue aControlValue; - Region aCtrlRegion( pItem->maRect ); + Rectangle aCtrlRegion( pItem->maRect ); ControlState nState = 0; if( pItem->mnId == mnCurPageId ) @@ -965,10 +963,9 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo tiValue.mnAlignment |= TABITEM_FIRST_IN_GROUP; if ( bLastInGroup ) tiValue.mnAlignment |= TABITEM_LAST_IN_GROUP; - aControlValue.setOptionalVal( (void *)(&tiValue) ); bNativeOK = DrawNativeControl( CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, aCtrlRegion, nState, - aControlValue, rtl::OUString() ); + tiValue, rtl::OUString() ); } if( ! bLayout && !bNativeOK ) @@ -1227,7 +1224,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) BOOL bNativeOK = FALSE; if( ! bLayout && (bNativeOK = IsNativeControlSupported( CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) == TRUE ) { - const ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 ); + const ImplControlValue aControlValue; ControlState nState = CTRL_STATE_ENABLED; int part = PART_ENTIRE_CONTROL; @@ -1241,10 +1238,8 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) if( !rRect.IsEmpty() ) aClipRgn.Intersect( rRect ); - Region aCtrlRegion( aRect ); - Rectangle aClipRect( aClipRgn.GetBoundRect() ); - if( !aClipRgn.IsEmpty() ) //&& aClipRect.getHeight() && aClipRect.getWidth() ) - bNativeOK = DrawNativeControl( CTRL_TAB_PANE, part, aCtrlRegion, nState, + if( !aClipRgn.IsEmpty() ) + bNativeOK = DrawNativeControl( CTRL_TAB_PANE, part, aRect, nState, aControlValue, rtl::OUString() ); } else |