summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-06 07:03:57 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-06 07:03:57 +0000
commit1292b6f43400b617341ebb71fd5d60f3e72dd299 (patch)
tree630d810d113947e3011898ea3343f502517bb7f9 /svtools/source
parentfe7730a8b63926d0850cc177a2e2a96039c9f17b (diff)
INTEGRATION: CWS dateinput (1.50.74); FILE MERGED
2008/06/02 21:43:21 er 1.50.74.1: #155535# GetDateRef: also in MDY order accept two number x/y as valid MY date if MD was not valid, similar to DMY DM MY and YMD MD YM
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/numbers/zforfind.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/svtools/source/numbers/zforfind.cxx b/svtools/source/numbers/zforfind.cxx
index 441401d80518..b143ad4d8f79 100644
--- a/svtools/source/numbers/zforfind.cxx
+++ b/svtools/source/numbers/zforfind.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: zforfind.cxx,v $
- * $Revision: 1.50 $
+ * $Revision: 1.51 $
*
* This file is part of OpenOffice.org.
*
@@ -1196,6 +1196,12 @@ input for the following reasons:
// M D
pCal->setValue( CalendarFieldIndex::DAY_OF_MONTH, ImplGetDay(1) );
pCal->setValue( CalendarFieldIndex::MONTH, ImplGetMonth(0) );
+ if ( !pCal->isValid() ) // 2nd try
+ { // M Y
+ pCal->setValue( CalendarFieldIndex::DAY_OF_MONTH, 1 );
+ pCal->setValue( CalendarFieldIndex::MONTH, ImplGetMonth(0) );
+ pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(1) );
+ }
break;
case DMY:
// D M