ooo-build r11537 - in trunk: . patches/vba



Author: noelpwer
Date: Fri Feb  8 10:21:41 2008
New Revision: 11537
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11537&view=rev

Log:
2008-02-08  Noel Power  <noel power novell com>

        * patches/vba/n353254-dateserial.diff: tweak behaviour ( both vba 
        and normal mode ) when entering a two-digit year



Modified:
   trunk/ChangeLog
   trunk/patches/vba/n353254-dateserial.diff

Modified: trunk/patches/vba/n353254-dateserial.diff
==============================================================================
--- trunk/patches/vba/n353254-dateserial.diff	(original)
+++ trunk/patches/vba/n353254-dateserial.diff	Fri Feb  8 10:21:41 2008
@@ -1,12 +1,18 @@
---- basic/source/runtime/methods.cxx	2008-02-07 12:25:54.000000000 +0000
-+++ basic/source/runtime/methods.cxx	2008-02-07 12:36:22.000000000 +0000
-@@ -1830,15 +1830,48 @@ BOOL implDateSerial( INT16 nYear, INT16 
+--- basic/source/runtime/methods.cxx	2008-02-08 10:18:11.000000000 +0000
++++ basic/source/runtime/methods.cxx	2008-02-08 10:17:15.000000000 +0000
+@@ -1829,16 +1829,53 @@ INT16 implGetDateYear( double aDate )
+ BOOL implDateSerial( INT16 nYear, INT16 nMonth, INT16 nDay, double& rdRet )
  {
  	if ( nYear < 100 )
- 		nYear += 1900;
+-		nYear += 1900;
 -	if ((nYear < 100 || nYear > 9999)   ||
 -		(nMonth < 1 || nMonth > 12 )	||
 -		(nDay < 1 || nDay > 31 ))
++	{
++		Date now;
++		INT16 nCentury = ( now.GetYear() / 100 ) * 100;
++		nYear += nCentury;
++	}
 +	Date aCurDate( nDay, nMonth, nYear );
 +	if ((nYear < 100 || nYear > 9999) )  
  	{



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]