summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-07-05 11:20:24 +0200
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-07-05 11:20:24 +0200
commit599bb6c7fb505044634c65983508dcaa1425ca8b (patch)
treedc442b2f926858a6e922cb0bb703c0a8307f8d39 /svtools/source
parent30f3d5468216a926c5380d55666d6d2d2bb6f60b (diff)
ooo33gsl02: #i112873# change NativeWidget methods to be prepared for mapmodes
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/contnr/svimpbox.cxx14
-rw-r--r--svtools/source/contnr/svlbitm.cxx4
-rw-r--r--svtools/source/contnr/svtreebx.cxx2
-rw-r--r--svtools/source/control/toolbarmenu.cxx23
-rwxr-xr-xsvtools/source/toolpanel/paneltabbar.cxx10
5 files changed, 25 insertions, 28 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 7111a29a6a8a..484584828b9f 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -1067,14 +1067,14 @@ void SvImpLBox::DrawNet()
//so that SvImpLBox::DrawNet() doesn't draw anything too
if(pView->IsNativeControlSupported( CTRL_LISTNET, PART_ENTIRE_CONTROL)) {
ImplControlValue aControlValue;
- Point aTemp(0,0); // temporary needed for g++ 3.3.5
- Region aCtrlRegion( Rectangle(aTemp, Size( 0, 0 )) );
+ Point aTemp(0,0); // temporary needed for g++ 3.3.5
+ Rectangle aCtrlRegion( aTemp, Size( 0, 0 ) );
ControlState nState = CTRL_STATE_ENABLED;
- if( pView->DrawNativeControl( CTRL_LISTNET, PART_ENTIRE_CONTROL,
- aCtrlRegion, nState, aControlValue, rtl::OUString() ) )
- {
- return;
- }
+ if( pView->DrawNativeControl( CTRL_LISTNET, PART_ENTIRE_CONTROL,
+ aCtrlRegion, nState, aControlValue, rtl::OUString() ) )
+ {
+ return;
+ }
}
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index 82321b53259e..edb0a65cb39f 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -425,7 +425,7 @@ void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
if ( nIndex != SV_BMP_STATICIMAGE && pWin && pWin->IsNativeControlSupported( (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX, PART_ENTIRE_CONTROL) )
{
ImplControlValue aControlValue;
- Region aCtrlRegion( Rectangle(rPos, Size(pData->Width(), pData->Height())) );
+ Rectangle aCtrlRegion( rPos, Size(pData->Width(), pData->Height()) );
ControlState nState = 0;
//states CTRL_STATE_DEFAULT, CTRL_STATE_PRESSED and CTRL_STATE_ROLLOVER are not implemented
@@ -440,7 +440,7 @@ void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
aControlValue.setTristateVal( BUTTONVALUE_MIXED );
bNativeOK = pWin->DrawNativeControl( (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX, PART_ENTIRE_CONTROL,
- aCtrlRegion, nState, aControlValue, rtl::OUString() );
+ aCtrlRegion, nState, aControlValue, rtl::OUString() );
}
if( !bNativeOK)
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index bf6e41f93f36..b11a3f12ddf3 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -1814,7 +1814,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
if ( IsNativeControlSupported( CTRL_LISTNODE, PART_ENTIRE_CONTROL) )
{
ImplControlValue aControlValue;
- Region aCtrlRegion( Rectangle(aPos, pImg->GetSizePixel() ) );
+ Rectangle aCtrlRegion( aPos, pImg->GetSizePixel() );
ControlState nState = 0;
if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
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
{
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 38aee00c8f55..23067d3ee5d0 100755
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -296,19 +296,18 @@ namespace svt
const ControlState nState( lcl_ItemToControlState( i_nItemFlags ) );
TabitemValue tiValue;
- ImplControlValue aControlValue( (void*)(&tiValue) );
- Region aBoundingRegion, aContentRegion;
+ Rectangle aBoundingRegion, aContentRegion;
bool bNativeOK = getTargetDevice().GetNativeControlRegion(
CTRL_TAB_ITEM, PART_ENTIRE_CONTROL,
i_rContentArea, nState,
- aControlValue, ::rtl::OUString(),
+ tiValue, ::rtl::OUString(),
aBoundingRegion, aContentRegion
);
(void)bNativeOK;
OSL_ENSURE( bNativeOK, "NWFTabItemRenderer::calculateDecorations: GetNativeControlRegion not implemented for CTRL_TAB_ITEM?!" );
- return aBoundingRegion.GetBoundRect();
+ return aBoundingRegion;
}
//------------------------------------------------------------------------------------------------------------------
@@ -322,9 +321,8 @@ namespace svt
if ( i_nItemFlags & ITEM_POSITION_LAST )
tiValue.mnAlignment |= TABITEM_LAST_IN_GROUP;
- ImplControlValue aControlValue( (void *)(&tiValue) );
- bool bNativeOK = getTargetDevice().DrawNativeControl( CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, i_rContentRect, nState, aControlValue, rtl::OUString() );
+ bool bNativeOK = getTargetDevice().DrawNativeControl( CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, i_rContentRect, nState, tiValue, rtl::OUString() );
(void)bNativeOK;
OSL_ENSURE( bNativeOK, "NWFTabItemRenderer::preRenderItem: inconsistent NWF implementation!" );
// IsNativeControlSupported returned true, previously, otherwise we would not be here ...