summaryrefslogtreecommitdiff
path: root/vcl/source/control/button.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-03-29 10:25:02 +0000
committerOliver Bolte <obo@openoffice.org>2006-03-29 10:25:02 +0000
commitff700d7c10db57e17a9fc852afdf7943109cd752 (patch)
tree8dabc9b6a2fb5cb9f053697186870d4c635f4acf /vcl/source/control/button.cxx
parent0e0ec2ab7cada0eb358d14a1f5c184cc2ac202d3 (diff)
INTEGRATION: CWS vcl54 (1.42.10); FILE MERGED
2006/02/16 17:35:20 pl 1.42.10.1: #i54154# clip checkbox and radiobutton to given size
Diffstat (limited to 'vcl/source/control/button.cxx')
-rw-r--r--vcl/source/control/button.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 0fc61ea9b310..861cb0a51d4c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: button.cxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: hr $ $Date: 2006-01-26 18:07:58 $
+ * last change: $Author: obo $ $Date: 2006-03-29 11:25:02 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2405,6 +2405,9 @@ void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : NULL;
String* pDisplayText = bLayout ? &mpLayoutData->m_aDisplayText : NULL;
+ pDev->Push( PUSH_CLIPREGION );
+ pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
+
// kein Image-RadioButton
if ( !maImage )
{
@@ -2508,6 +2511,8 @@ da im Writer ansonsten die Images noch weiter oben haengen
rMouseRect = aImageRect;
rStateRect = aImageRect;
}
+
+ pDev->Pop();
}
// -----------------------------------------------------------------------
@@ -3372,6 +3377,9 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
WinBits nWinStyle = GetStyle();
XubString aText( GetText() );
+ pDev->Push( PUSH_CLIPREGION );
+ pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
+
if ( ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) ||
( HasImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) ) )
{
@@ -3422,6 +3430,8 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
ImplSetFocusRect( rStateRect );
}
+
+ pDev->Pop();
}
// -----------------------------------------------------------------------