Summary: | Wrong result because 'Property Let' fails to execute | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | tim |
Component: | BASIC | Assignee: | Noel Power <nopower> |
Status: | VERIFIED FIXED | ||
Severity: | major | CC: | aurimas, jp, LibreOffice, nopower, tim |
Priority: | medium | ||
Version: | 4.0.0.0.alpha0+ Master | ||
Hardware: | x86-64 (AMD64) | ||
OS: | All | ||
Whiteboard: | target:4.1.0 target:4.0.2 | ||
Crash report or crash signature: | Regression By: | ||
Attachments: | Test file for Basic LET problem |
Description
tim
2013-02-12 22:25:40 UTC
@tim Please attach a sample document with a working version of your Baisc program Created attachment 74739 [details]
Test file for Basic LET problem
Apologies - my comments on the attachment to my previous comment got lost. The code is all in my report, but the attachment has much the same code. You have to run the Macro TestPoint using the BASIC IDE. If it reports "4" it has worked. If it reports "0" the LET has failed. [Reproducible] with server installation of "Version 4.1.0.0.alpha0+ (Build ID: bdfd8de57bf5767ce5c179a5e8705c7587f7b32) TinderBox: Win-x86@6, Branch:master, Pull Time: 2013-02-06_22:06:22" ENGLISH UI / German Locale on German WIN7 Home Premium (64bit) with own separate User Profile: 0. Launch LibO 1. Make sure that macro execution is allowed 2. Form Start Center open reporter's sample' 3. Menu 'Tools -> Macros -> Run Macro -> TestLO4.odb -> Standard -> Test -> Macro "TestPoint" <Run>' Expected (from LibO 3.6): Shows result "4" Actual: Shows result "0" I will do some more research before I switch Bug to NEW. 1) If in the sample of code next lines [code] ---------------------------------------------------------------------------------- REM --- CLASS GET/LET/SET PROPERTIES --- REM ---------------------------------------------------------------------------------- Public Property Get X() As Double X = ZX End Property Public Property Let X(ByVal pValue As Double) ZX = pValue End Property [/code] are replaced by [code] ---------------------------------------------------------------------------------- REM --- CLASS GET/LET/SET PROPERTIES --- REM ---------------------------------------------------------------------------------- Public Property Get X() As Double X = ZX End Property Public Property Set X(ByVal pValue As Double) ZX = pValue End Property [/code] i.e. Set instead of Let, the program runs as in versions <= LO 3.6. But the Property Set syntax is normally reserved to assigning objects to properties, not basic values (strings, numbers, ...). Additionally Let is compatible with VBA, Set is not. 2) The same behaviour is observed on other operating systems: same experience for me in LO 4.0 Portable on a Windows7 platform. Tested in 4.0.1 RC1 (2013-02-22). The LET code is still not executed, even when the LET is explicit. The SET code is executed instead, which is incorrect and will, I assume, cause many class modules to fail. I did some tests where wrong Result "0" after macro execution started: Already [Reproducible] with unzipped installation of "LOdev 4.0.0.0.alpha1+ - ENGLISH UI / German Locale [Build ID: af60316514f3ae3d4c475819bf86f2af837171e)]" {tinderbox: Win-x86@6, pull time 2012-11-23 22:10:31} on German WIN7 Home Premium (64bit) with own separate User Profile Still worked fine with Server-installation of Master " 3.7.0.0.alpha0+ – ENGLISH UI [Build ID: f2e622]" {tinderbox: Win-x86@16, pull time 2012-10-06 09:31:39} on German WIN7 Home Premium (64bit) UserInstallation=$SYSUSERCONFIG/LOdev/3 May be we can narrow that down with Bibisect? @Noel: Can you help here? (In reply to comment #8) > @Noel: > Can you help here? (In reply to comment #8) > @Noel: > Can you help here? sure, I'll take the bug, weird though because it is working on master (In reply to comment #9) > (In reply to comment #8) > > @Noel: > > Can you help here? > > sure, I'll take the bug, weird though because it is working on master not weird, just wrong, must have had a 4.0 instance running, doesn't work on master :-) Noel Power committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9dcfc56c7cd76de237f45cf46448c14cfbb2f45c Fix Set/Let mixup ( from String -> OUString rework ) fdo#60752 The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Noel Power committed a patch related to this issue. It has been pushed to "libreoffice-4-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ee84eaa33aef7b7523ce949ad3e2ccf9bc467c6d&h=libreoffice-4-0 Fix Set/Let mixup ( from String -> OUString rework ) fdo#60752 It will be available in LibreOffice 4.0.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Noel Power committed a patch related to this issue. It has been pushed to "libreoffice-4-0-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=08a9069bc85daf9f628688346003087056308493&h=libreoffice-4-0-2 Fix Set/Let mixup ( from String -> OUString rework ) fdo#60752 It will be available already in LibreOffice 4.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Fix doesn't appear to be in 4.0.2_1 (RC1) as yet. Is that correct? Tested in 4.0.2 RC2. Works fine. Thanks to all. |