summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
authorHans-Joachim Lankenau <hjs@openoffice.org>2004-06-28 16:06:29 +0000
committerHans-Joachim Lankenau <hjs@openoffice.org>2004-06-28 16:06:29 +0000
commitb903a114506625904ed7917cb39738e4d70e377e (patch)
treefaa6d4a43e4bcba8ba8a252d60c6f5d5388f128c /svtools/source/control
parent05ed694099e97952612cfd4d0822061f4970919d (diff)
INTEGRATION: CWS dba12 (1.3.156); FILE MERGED
2004/05/04 07:41:59 fs 1.3.156.1: #i28669# properly respect WB_LEFT/CENTER/RIGHT styles
Diffstat (limited to 'svtools/source/control')
-rw-r--r--svtools/source/control/calendar.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 4e115b003a66..c9341aa072f8 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: calendar.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2003-12-01 10:02:18 $
+ * last change: $Author: hjs $ $Date: 2004-06-28 17:06:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2961,3 +2961,18 @@ Calendar* CalendarField::GetCalendar()
return mpCalendar;
}
+
+// -----------------------------------------------------------------------
+
+void CalendarField::StateChanged( StateChangedType nStateChange )
+{
+ DateField::StateChanged( nStateChange );
+
+ if ( ( nStateChange == STATE_CHANGE_STYLE ) && GetSubEdit() )
+ {
+ WinBits nAllAlignmentBits = ( WB_LEFT | WB_CENTER | WB_RIGHT | WB_TOP | WB_VCENTER | WB_BOTTOM );
+ WinBits nMyAlignment = GetStyle() & nAllAlignmentBits;
+ GetSubEdit()->SetStyle( ( GetSubEdit()->GetStyle() & ~nAllAlignmentBits ) | nAllAlignmentBits );
+ }
+}
+