summaryrefslogtreecommitdiff
path: root/vcl/source/window/brdwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/brdwin.cxx')
-rw-r--r--vcl/source/window/brdwin.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 8eedf76043da..b221d1f7d928 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1151,15 +1151,13 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
if( mbNWFBorder )
{
ImplControlValue aControlValue;
- Region aCtrlRegion( Rectangle( (const Point&)Point(), Size( mnWidth < 10 ? 10 : mnWidth, mnHeight < 10 ? 10 : mnHeight ) ) );
- Region aBoundingRgn( aCtrlRegion );
- Region aContentRgn( aCtrlRegion );
+ Rectangle aCtrlRegion( (const Point&)Point(), Size( mnWidth < 10 ? 10 : mnWidth, mnHeight < 10 ? 10 : mnHeight ) );
+ Rectangle aBounds( aCtrlRegion );
+ Rectangle aContent( aCtrlRegion );
if( pWin->GetNativeControlRegion( aCtrlType, PART_ENTIRE_CONTROL, aCtrlRegion,
CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
- aBoundingRgn, aContentRgn ) )
+ aBounds, aContent ) )
{
- Rectangle aBounds( aBoundingRgn.GetBoundRect() );
- Rectangle aContent( aContentRgn.GetBoundRect() );
mnLeftBorder = aContent.Left() - aBounds.Left();
mnRightBorder = aBounds.Right() - aContent.Right();
mnTopBorder = aContent.Top() - aBounds.Top();
@@ -1346,13 +1344,14 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
nState |= CTRL_STATE_ROLLOVER;
Point aPoint;
- Region aCtrlRegion( Rectangle( aPoint, Size( mnWidth, mnHeight ) ) );
+ Rectangle aCtrlRegion( aPoint, Size( mnWidth, mnHeight ) );
- Region aBoundingRgn( Rectangle( aPoint, Size( mnWidth, mnHeight ) ) );
- Region aContentRgn=aCtrlRegion;
+ Rectangle aBoundingRgn( aPoint, Size( mnWidth, mnHeight ) );
+ Rectangle aContentRgn( aCtrlRegion );
if(pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
- nState, aControlValue, rtl::OUString(), aBoundingRgn, aContentRgn )) {
- aCtrlRegion=aContentRgn;
+ nState, aControlValue, rtl::OUString(), aBoundingRgn, aContentRgn ))
+ {
+ aCtrlRegion=aContentRgn;
}
bNativeOK = pWin->DrawNativeControl( aCtrlType, aCtrlPart, aCtrlRegion, nState,