summaryrefslogtreecommitdiff
path: root/svtools/source/control/toolbarmenu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/control/toolbarmenu.cxx')
-rw-r--r--svtools/source/control/toolbarmenu.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index fa393da3d5a8..f0bd192fc02c 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -920,7 +920,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pEntry->maSize.Height() ) ) );
Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) );
DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
- Region( aCtrlRect ),
+ aCtrlRect,
CTRL_STATE_ENABLED,
ImplControlValue(),
OUString() );
@@ -928,7 +928,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
{
bDrawItemRect = false;
if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM,
- Region( aItemRect ),
+ aItemRect,
CTRL_STATE_SELECTED | ( pEntry->mbEnabled? CTRL_STATE_ENABLED: 0 ),
ImplControlValue(),
OUString() ) )
@@ -1312,13 +1312,12 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
{
ImplControlValue aControlValue;
- Region aCtrlRegion( i_rRect );
ControlState nState = CTRL_STATE_PRESSED | CTRL_STATE_ENABLED;
aControlValue.setTristateVal( BUTTONVALUE_ON );
bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
- aCtrlRegion, nState, aControlValue,
+ i_rRect, nState, aControlValue,
rtl::OUString() );
}
@@ -1335,10 +1334,10 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo
rMaxWidth = rCheckHeight = rRadioHeight = 0;
ImplControlValue aVal;
- Region aNativeBounds;
- Region aNativeContent;
+ Rectangle aNativeBounds;
+ Rectangle aNativeContent;
Point tmp( 0, 0 );
- Region aCtrlRegion( Rectangle( tmp, Size( 100, 15 ) ) );
+ Rectangle aCtrlRegion( tmp, Size( 100, 15 ) );
if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM_CHECK_MARK ) )
{
if( pWin->GetNativeControlRegion( ControlType(CTRL_MENU_POPUP),
@@ -1351,8 +1350,8 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo
aNativeContent )
)
{
- rCheckHeight = aNativeBounds.GetBoundRect().GetHeight();
- rMaxWidth = aNativeContent.GetBoundRect().GetWidth();
+ rCheckHeight = aNativeBounds.GetHeight();
+ rMaxWidth = aNativeContent.GetWidth();
}
}
if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM_RADIO_MARK ) )
@@ -1367,8 +1366,8 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo
aNativeContent )
)
{
- rRadioHeight = aNativeBounds.GetBoundRect().GetHeight();
- rMaxWidth = Max (rMaxWidth, aNativeContent.GetBoundRect().GetWidth());
+ rRadioHeight = aNativeBounds.GetHeight();
+ rMaxWidth = Max (rMaxWidth, aNativeContent.GetWidth());
}
}
return (rCheckHeight > rRadioHeight) ? rCheckHeight : rRadioHeight;
@@ -1492,7 +1491,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2;
Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
- DrawNativeControl( CTRL_MENU_POPUP, nPart, Region( aCheckRect ), nState, ImplControlValue(), OUString() );
+ DrawNativeControl( CTRL_MENU_POPUP, nPart, aCheckRect, nState, ImplControlValue(), OUString() );
}
else if ( pEntry->mbChecked ) // by default do nothing for unchecked items
{