From 959ca18eeb1d4b8f0b5ec5e2c0bd8558db4f18db Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 1 Jul 2010 20:17:02 +0200 Subject: vcl113: small cleanup --- svtools/source/contnr/svlbitm.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'svtools/source') 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() ); } -- cgit v1.2.3