Apache OpenOffice (AOO) Bugzilla – Issue 111097
[CWS:npower13_objectmodules] Incorrect date returned for DateSerial(0,1,1)
Last modified: 2017-05-20 10:23:56 UTC
Autotest: framework/optional/f_basic_issues.bas # ---------------------------------------------------------------------------- # [i97038] ' Date should contain the year 1900 and the value should be 2 Sub Main Dim v v = DateSerial(0,1,1) Msgbox ("Date : " & v) MsgBox ("Value : " & CDbl(v)) End Sub # ---------------------------------------------------------------------------- #
Set kwd regression, OS = all.
Problem is not the behavior itself, but the changed vba status handling. Obviously "option vbasupport 1" had been executed in another context before the test script has been started. The issue here is that once vba support is enabled it never will be disabled when starting a new script unlike "option vbasupport 0" is used explicitely. STARTED, CC npower
the problem is basically that the parser now take the modules vba mode, the option vbasupport thingy can change the module's mode, however if you don't specify the option vbasupport thingy then the previous mode remains in place. solution is to use the document's library container vba mode as the default ( if you make any changes to the source ) In otherwords if you don't specify 'Option VBASupport 0|1' the default mode will be VBA ( in a imported document ) and Non-VBA in an odf document. In either case the default can be overridden by use of Option VBSupport Andreas, have a look at the patch, try it out, if your happy I'll commit it
Created attachment 69079 [details] patch
Created attachment 69107 [details] patch file
slight change to the path, -+ aTok.SetCompatible( true ); ++ aTok.SetCompatible( aTok.GetDbl()== 1 ); the previous version was setting the compatibly mode to true ( even for Option VBASupport 0 ) I really hate this stupid mode with ( a number ) and yes I know I have no-one to blame but myself
fixed
title corrected
Verified by autotest