summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/brdwin.cxx21
-rw-r--r--vcl/source/window/decoview.cxx12
-rw-r--r--vcl/source/window/dockingarea.cxx10
-rw-r--r--vcl/source/window/menu.cxx55
-rw-r--r--vcl/source/window/printdlg.cxx6
-rw-r--r--vcl/source/window/status.cxx21
-rw-r--r--vcl/source/window/tabpage.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx29
-rw-r--r--vcl/source/window/window.cxx11
9 files changed, 77 insertions, 92 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,
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index a32790cfb0d4..e5c3dc525cec 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -877,12 +877,12 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
if( pWin->GetType() == WINDOW_BORDERWINDOW )
nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER;
ImplControlValue aControlValue( nValueStyle );
- Region aBound, aContent;
- Region aNatRgn( rRect );
+ Rectangle aBound, aContent;
+ Rectangle aNatRgn( rRect );
if(pWin && pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
- rRect = aContent.GetBoundRect();
+ rRect = aContent;
}
else if ( nStyle & FRAME_DRAW_MONO )
ImplDrawDPILineRect( pDev, rRect, NULL, bRound );
@@ -922,15 +922,15 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
if( pWin->GetType() == WINDOW_BORDERWINDOW )
nValueStyle |= FRAME_DRAW_BORDERWINDOWBORDER;
ImplControlValue aControlValue( nValueStyle );
- Region aBound, aContent;
- Region aNatRgn( rRect );
+ Rectangle aBound, aContent;
+ Rectangle aNatRgn( rRect );
if( pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
if( pWin->DrawNativeControl( CTRL_FRAME, PART_BORDER, aContent, CTRL_STATE_ENABLED,
aControlValue, rtl::OUString()) )
{
- rRect = aContent.GetBoundRect();
+ rRect = aContent;
return;
}
}
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 95e6c6113c45..9ea407e52ee3 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -152,23 +152,21 @@ void DockingAreaWindow::Paint( const Rectangle& )
EnableNativeWidget( TRUE ); // only required because the toolkit curently switches this flag off
if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) )
{
- ImplControlValue aControlValue;
- ToolbarValue aToolbarValue;
+ ToolbarValue aControlValue;
if( GetAlign() == WINDOWALIGN_TOP && ImplGetSVData()->maNWFData.mbMenuBarDockingAreaCommonBG )
{
// give NWF a hint that this dockingarea is adjacent to the menubar
// useful for special gradient effects that should cover both windows
- aToolbarValue.mbIsTopDockingArea = TRUE;
+ aControlValue.mbIsTopDockingArea = TRUE;
}
- aControlValue.setOptionalVal( (void *)(&aToolbarValue) );
ControlState nState = CTRL_STATE_ENABLED;
if( !ImplGetSVData()->maNWFData.mbDockingAreaSeparateTB )
{
// draw a single toolbar background covering the whole docking area
Point tmp;
- Region aCtrlRegion( Rectangle( tmp, GetOutputSizePixel() ) );
+ Rectangle aCtrlRegion( tmp, GetOutputSizePixel() );
DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
aCtrlRegion, nState, aControlValue, rtl::OUString() );
@@ -231,7 +229,7 @@ void DockingAreaWindow::Paint( const Rectangle& )
aTBRect.Bottom() = aOutSz.Height() - 1;
}
DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
- Region( aTBRect), nState, aControlValue, rtl::OUString() );
+ aTBRect, nState, aControlValue, rtl::OUString() );
}
}
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 1723d26ce399..81676eba3be4 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2268,10 +2268,10 @@ long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lon
if( ! bIsMenuBar )
{
ImplControlValue aVal;
- Region aNativeBounds;
- Region aNativeContent;
+ Rectangle aNativeBounds;
+ Rectangle aNativeContent;
Point tmp( 0, 0 );
- Region aCtrlRegion( Rectangle( tmp, Size( 100, 15 ) ) );
+ Rectangle aCtrlRegion( Rectangle( tmp, Size( 100, 15 ) ) );
if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM_CHECK_MARK ) )
{
if( pWin->GetNativeControlRegion( ControlType(CTRL_MENU_POPUP),
@@ -2284,8 +2284,8 @@ long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lon
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 ) )
@@ -2300,8 +2300,8 @@ long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lon
aNativeContent )
)
{
- rRadioHeight = aNativeBounds.GetBoundRect().GetHeight();
- rMaxWidth = Max (rMaxWidth, aNativeContent.GetBoundRect().GetWidth());
+ rRadioHeight = aNativeBounds.GetHeight();
+ rMaxWidth = Max (rMaxWidth, aNativeContent.GetWidth());
}
}
}
@@ -2516,10 +2516,10 @@ Size Menu::ImplCalcSize( Window* pWin )
if( pWindow->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
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( pWindow->GetNativeControlRegion( ControlType(CTRL_MENUBAR),
ControlPart(PART_ENTIRE_CONTROL),
aCtrlRegion,
@@ -2530,7 +2530,7 @@ Size Menu::ImplCalcSize( Window* pWin )
aNativeContent )
)
{
- int nNativeHeight = aNativeBounds.GetBoundRect().GetHeight();
+ int nNativeHeight = aNativeBounds.GetHeight();
if( nNativeHeight > aSz.Height() )
aSz.Height() = nNativeHeight;
}
@@ -2555,7 +2555,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
{
ImplControlValue aControlValue;
- Region aCtrlRegion( i_rRect );
+ Rectangle aCtrlRegion( i_rRect );
ControlState nState = CTRL_STATE_PRESSED | CTRL_STATE_ENABLED;
aControlValue.setTristateVal( BUTTONVALUE_ON );
@@ -2689,7 +2689,7 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
pWin->DrawNativeControl( CTRL_MENU_POPUP, nPart,
- Region( aCheckRect ),
+ aCheckRect,
nState,
ImplControlValue(),
OUString() );
@@ -4679,7 +4679,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.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() );
@@ -4688,7 +4688,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
{
bDrawItemRect = false;
if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM,
- Region( aItemRect ),
+ aItemRect,
CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ),
ImplControlValue(),
OUString() ) )
@@ -5026,7 +5026,7 @@ void MenuFloatingWindow::Paint( const Rectangle& )
Size aPxSize( GetOutputSizePixel() );
aPxSize.Width() -= nX;
DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
- Region( Rectangle( Point( nX, 0 ), aPxSize ) ),
+ Rectangle( Point( nX, 0 ), aPxSize ),
CTRL_STATE_ENABLED,
ImplControlValue(),
OUString() );
@@ -5540,23 +5540,21 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
// draw background (transparency)
- ImplControlValue aControlValue;
- MenubarValue aMenubarValue;
- aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
- aControlValue.setOptionalVal( (void *)(&aMenubarValue) );
+ MenubarValue aControlValue;
+ aControlValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
Point tmp(0,0);
- Region aBgRegion( Rectangle( tmp, GetOutputSizePixel() ) );
+ Rectangle aBgRegion( tmp, GetOutputSizePixel() );
DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL,
aBgRegion,
CTRL_STATE_ENABLED,
aControlValue,
OUString() );
- ImplAddNWFSeparator( this, aMenubarValue );
+ ImplAddNWFSeparator( this, aControlValue );
// draw selected item
DrawNativeControl( CTRL_MENUBAR, PART_MENU_ITEM,
- Region( aRect ),
+ aRect,
CTRL_STATE_ENABLED | CTRL_STATE_SELECTED,
aControlValue,
OUString() );
@@ -5572,18 +5570,15 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
{
if( IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) )
{
- ImplControlValue aControlValue;
MenubarValue aMenubarValue;
aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
- aControlValue.setOptionalVal( (void *)(&aMenubarValue) );
// use full window size to get proper gradient
// but clip accordingly
Point aPt;
Rectangle aCtrlRect( aPt, GetOutputSizePixel() );
- Region aCtrlRegion( aCtrlRect );
- DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRegion, CTRL_STATE_ENABLED, aControlValue, rtl::OUString() );
+ DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRect, CTRL_STATE_ENABLED, aMenubarValue, rtl::OUString() );
ImplAddNWFSeparator( this, aMenubarValue );
}
else
@@ -5814,14 +5809,12 @@ void MenuBarWindow::Paint( const Rectangle& )
if( IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) )
{
Point aPt;
- Region aCtrlRegion( Rectangle( aPt, GetOutputSizePixel() ) );
+ Rectangle aCtrlRegion( aPt, GetOutputSizePixel() );
- ImplControlValue aControlValue;
MenubarValue aMenubarValue;
aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight( this );
- aControlValue.setOptionalVal( (void *)(&aMenubarValue) );
- DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRegion, CTRL_STATE_ENABLED, aControlValue, rtl::OUString() );
+ DrawNativeControl( CTRL_MENUBAR, PART_ENTIRE_CONTROL, aCtrlRegion, CTRL_STATE_ENABLED, aMenubarValue, rtl::OUString() );
ImplAddNWFSeparator( this, aMenubarValue );
}
SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() );
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 35077b1cff0e..52f54db0e50e 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2514,13 +2514,13 @@ void PrintProgressDialog::implCalcProgressRect()
if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aValue;
- Region aControlRegion( Rectangle( Point(), Size( 100, mnProgressHeight ) ) );
- Region aNativeControlRegion, aNativeContentRegion;
+ Rectangle aControlRegion( Point(), Size( 100, mnProgressHeight ) );
+ Rectangle aNativeControlRegion, aNativeContentRegion;
if( GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
aNativeControlRegion, aNativeContentRegion ) )
{
- mnProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight();
+ mnProgressHeight = aNativeControlRegion.GetHeight();
}
mbNativeProgress = true;
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c139ae1ffb30..385dd241c770 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -544,7 +544,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2;
ImplControlValue aValue( nFullWidth * (long)nPerc / 10000 );
Rectangle aDrawRect( rPos, Size( nFullWidth, nPrgsHeight ) );
- Region aControlRegion( aDrawRect );
+ Rectangle aControlRegion( aDrawRect );
if( bNeedErase )
{
Window* pEraseWindow = pWindow;
@@ -711,13 +711,13 @@ void StatusBar::ImplCalcProgressRect()
if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aValue;
- Region aControlRegion( Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
- Region aNativeControlRegion, aNativeContentRegion;
+ Rectangle aControlRegion( Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
+ Rectangle aNativeControlRegion, aNativeContentRegion;
if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
aNativeControlRegion, aNativeContentRegion ) ) != FALSE )
{
- long nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight();
+ long nProgressHeight = aNativeControlRegion.GetHeight();
if( nProgressHeight > maPrgsFrameRect.GetHeight() )
{
long nDelta = nProgressHeight - maPrgsFrameRect.GetHeight();
@@ -1723,13 +1723,13 @@ Size StatusBar::CalcWindowSizePixel() const
if( pThis->IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aValue;
- Region aControlRegion( Rectangle( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) ) );
- Region aNativeControlRegion, aNativeContentRegion;
+ Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
+ Rectangle aNativeControlRegion, aNativeContentRegion;
if( pThis->GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
aNativeControlRegion, aNativeContentRegion ) )
{
- nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight();
+ nProgressHeight = aNativeControlRegion.GetHeight();
}
}
@@ -1737,14 +1737,13 @@ Size StatusBar::CalcWindowSizePixel() const
pThis->IsNativeControlSupported( CTRL_FRAME, PART_BORDER ) )
{
ImplControlValue aControlValue( FRAME_DRAW_NODRAW );
- Region aBound, aContent;
- Region aNatRgn( Rectangle( Point( 0, 0 ), Size( 150, 50 ) ) );
+ Rectangle aBound, aContent;
+ Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
if( pThis->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
mpImplData->mnItemBorderWidth =
- ( aBound.GetBoundRect().GetHeight() -
- aContent.GetBoundRect().GetHeight() ) / 2;
+ ( aBound.GetHeight() - aContent.GetHeight() ) / 2;
}
}
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 7bfd115af8f9..0589d57009f4 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -149,7 +149,7 @@ void TabPage::Paint( const Rectangle& )
// draw native tabpage only inside tabcontrols, standalone tabpages look ugly (due to bad dialog design)
if( IsNativeControlSupported(CTRL_TAB_BODY, PART_ENTIRE_CONTROL) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) )
{
- const ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 );
+ const ImplControlValue aControlValue;
ControlState nState = CTRL_STATE_ENABLED;
int part = PART_ENTIRE_CONTROL;
@@ -160,7 +160,7 @@ void TabPage::Paint( const Rectangle& )
Point aPoint;
// pass the whole window region to NWF as the tab body might be a gradient or bitmap
// that has to be scaled properly, clipping makes sure that we do not paint too much
- Region aCtrlRegion( Rectangle( aPoint, GetOutputSizePixel() ) );
+ Rectangle aCtrlRegion( aPoint, GetOutputSizePixel() );
DrawNativeControl( CTRL_TAB_BODY, part, aCtrlRegion, nState,
aControlValue, rtl::OUString() );
}
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 9ad0b8734437..cde91a8dcd97 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -215,13 +215,13 @@ int ToolBox::ImplGetDragWidth( ToolBox* pThis )
ImplControlValue aControlValue;
Point aPoint;
- Region aContent, aBound;
- Region aArea( Rectangle(aPoint, pThis->GetOutputSizePixel()) );
+ Rectangle aContent, aBound;
+ Rectangle aArea( aPoint, pThis->GetOutputSizePixel() );
if ( pThis->GetNativeControlRegion(CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_VERT : PART_THUMB_HORZ,
aArea, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
- width = pThis->mbHorz ? aContent.GetBoundRect().GetWidth() : aContent.GetBoundRect().GetHeight();
+ width = pThis->mbHorz ? aContent.GetWidth() : aContent.GetHeight();
}
}
return width;
@@ -338,16 +338,14 @@ void ToolBox::ImplDrawGrip( ToolBox* pThis )
BOOL bNativeOk = FALSE;
if( pThis->IsNativeControlSupported( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_HORZ : PART_THUMB_VERT ) )
{
- ImplControlValue aControlValue;
ToolbarValue aToolbarValue;
aToolbarValue.maGripRect = pWrapper->GetDragArea();
- aControlValue.setOptionalVal( (void *)(&aToolbarValue) );
Point aPt;
- Region aCtrlRegion( Rectangle( aPt, pThis->GetOutputSizePixel() ) );
+ Rectangle aCtrlRegion( aPt, pThis->GetOutputSizePixel() );
ControlState nState = CTRL_STATE_ENABLED;
bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_VERT : PART_THUMB_HORZ,
- aCtrlRegion, nState, aControlValue, rtl::OUString() );
+ aCtrlRegion, nState, aToolbarValue, rtl::OUString() );
}
if( bNativeOk )
@@ -557,7 +555,7 @@ BOOL ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & )
{
// use NWF
Point aPt;
- Region aCtrlRegion( Rectangle( aPt, pThis->GetOutputSizePixel() ) );
+ Rectangle aCtrlRegion( aPt, pThis->GetOutputSizePixel() );
ControlState nState = CTRL_STATE_ENABLED;
return pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
@@ -1918,9 +1916,9 @@ BOOL ToolBox::ImplCalcItem()
// determine minimum size necessary in NWF
{
Rectangle aRect( Point( 0, 0 ), Size( nMinWidth, nMinHeight ) );
- Region aReg = aRect;
+ Rectangle aReg( aRect );
ImplControlValue aVal;
- Region aNativeBounds, aNativeContent;
+ Rectangle aNativeBounds, aNativeContent;
if( IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
{
if( GetNativeControlRegion( CTRL_TOOLBAR, PART_BUTTON,
@@ -1929,7 +1927,7 @@ BOOL ToolBox::ImplCalcItem()
aVal, OUString(),
aNativeBounds, aNativeContent ) )
{
- aRect = aNativeBounds.GetBoundRect();
+ aRect = aNativeBounds;
if( aRect.GetWidth() > nMinWidth )
nMinWidth = aRect.GetWidth();
if( aRect.GetHeight() > nMinHeight )
@@ -1954,7 +1952,7 @@ BOOL ToolBox::ImplCalcItem()
aVal, OUString(),
aNativeBounds, aNativeContent ) )
{
- aRect = aNativeBounds.GetBoundRect();
+ aRect = aNativeBounds;
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
@@ -1966,7 +1964,7 @@ BOOL ToolBox::ImplCalcItem()
aVal, OUString(),
aNativeBounds, aNativeContent ) )
{
- aRect = aNativeBounds.GetBoundRect();
+ aRect = aNativeBounds;
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
@@ -1978,7 +1976,7 @@ BOOL ToolBox::ImplCalcItem()
aVal, OUString(),
aNativeBounds, aNativeContent ) )
{
- aRect = aNativeBounds.GetBoundRect();
+ aRect = aNativeBounds;
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
@@ -3418,7 +3416,6 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highl
if( !bIsWindow && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
{
ImplControlValue aControlValue;
- Region aCtrlRegion( rRect );
ControlState nState = 0;
if ( highlight == 1 ) nState |= CTRL_STATE_PRESSED;
@@ -3429,7 +3426,7 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highl
bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
- aCtrlRegion, nState, aControlValue, rtl::OUString() );
+ rRect, nState, aControlValue, rtl::OUString() );
}
if( !bNativeOk )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ebeb5c94d68a..35641ab8d6f9 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -243,18 +243,17 @@ void Window::ImplInitAppFontData( Window* pWindow )
// of control sizes, if yes, make app font scalings larger
// so dialog positioning is not completely off
ImplControlValue aControlValue;
- Region aCtrlRegion( (const Rectangle&)Rectangle( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) ) );
- Region aBoundingRgn( aCtrlRegion );
- Region aContentRgn( aCtrlRegion );
+ Rectangle aCtrlRegion( Point(), Size( nTextWidth < 10 ? 10 : nTextWidth, nTextHeight < 10 ? 10 : nTextHeight ) );
+ Rectangle aBoundingRgn( aCtrlRegion );
+ Rectangle aContentRgn( aCtrlRegion );
if( pWindow->GetNativeControlRegion( CTRL_EDITBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
aBoundingRgn, aContentRgn ) )
{
- Rectangle aContentRect( aContentRgn.GetBoundRect() );
// comment: the magical +6 is for the extra border in bordered
// (which is the standard) edit fields
- if( aContentRect.GetHeight() - nTextHeight > (nTextHeight+4)/4 )
- pSVData->maGDIData.mnAppFontY = (aContentRect.GetHeight()-4) * 10;
+ if( aContentRgn.GetHeight() - nTextHeight > (nTextHeight+4)/4 )
+ pSVData->maGDIData.mnAppFontY = (aContentRgn.GetHeight()-4) * 10;
}
}