diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-07-01 20:17:02 +0200 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-07-01 20:17:02 +0200 |
commit | 959ca18eeb1d4b8f0b5ec5e2c0bd8558db4f18db (patch) | |
tree | 1deb195adb90c160463680758a9782f2c49b28b4 /svtools | |
parent | bd7beb161d6fc36c3b5d653f0710df49aa5ff7f7 (diff) |
vcl113: small cleanup
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index bcdc21bfe9f7..633cdc903ef6 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -418,15 +418,11 @@ void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */, //Native drawing /// BOOL bNativeOK = FALSE; - Window *pWin = NULL; - if( rDev.GetOutDevType() == OUTDEV_WINDOW ) - pWin = (Window*) &rDev; - ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX; - if ( nIndex != SV_BMP_STATICIMAGE && pWin && pWin->IsNativeControlSupported( eCtrlType, PART_ENTIRE_CONTROL) ) + if ( nIndex != SV_BMP_STATICIMAGE && rDev.IsNativeControlSupported( eCtrlType, PART_ENTIRE_CONTROL) ) { Size aSize(pData->Width(), pData->Height()); - ImplAdjustBoxSize( aSize, eCtrlType, pWin ); + ImplAdjustBoxSize( aSize, eCtrlType, &rDev ); ImplControlValue aControlValue; Region aCtrlRegion( Rectangle( rPos, aSize ) ); ControlState nState = 0; @@ -442,7 +438,7 @@ void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */, else if ( IsStateTristate() ) aControlValue.setTristateVal( BUTTONVALUE_MIXED ); - bNativeOK = pWin->DrawNativeControl( (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX, PART_ENTIRE_CONTROL, + bNativeOK = rDev.DrawNativeControl( eCtrlType, PART_ENTIRE_CONTROL, aCtrlRegion, nState, aControlValue, rtl::OUString() ); } |