https://bugs.freedesktop.org/show_bug.cgi?id=60752
Priority: medium
Bug ID: 60752
Assignee: [email protected]
Summary: BASIC 'Property Let' fails to execute
Severity: major
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: x86-64 (AMD64)
Status: UNCONFIRMED
Version: 4.0.0.3 release
Component: BASIC
Product: LibreOffice
In LO 4.0.0.3 Basic ClassModules fail to implement/execute the LET Property.
These run fine in 3.6.5 and previous releases. A trivial version follows.
In Module Point:
[code]
Option Compatible
Option ClassModule
'Option Explicit
REM
-----------------------------------------------------------------------------------------------------------------------
REM --- Internal Variables
---
REM
-----------------------------------------------------------------------------------------------------------------------
Private ZX As Double
Private ZY As Double
REM
-----------------------------------------------------------------------------------------------------------------------
REM --- CONSTRUCTORS / DESTRUCTORS
---
REM
-----------------------------------------------------------------------------------------------------------------------
Private Sub Class_Initialize()
' Default point = Origin of axis
ZX = 0
ZY = 0
End Sub ' Constructor
REM
-----------------------------------------------------------------------------------------------------------------------
Private Sub Class_Terminate()
ZX = - 4.94065645841247E-324 ' Most negative value allowed for Double
variables
ZY = - 4.94065645841247E-324
end sub
REM
-----------------------------------------------------------------------------------------------------------------------
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
REM
-----------------------------------------------------------------------------------------------------------------------
Public Property Get Y() As Double
Y = ZY
End Property
Public Property Let Y(ByVal pValue As Double)
ZY = pValue
End property
REM
-----------------------------------------------------------------------------------------------------------------------
Public Property Get Dummy() As Double
Dummy = 0
End Property
REM
-----------------------------------------------------------------------------------------------------------------------
REM --- CLASS METHODS
---
REM
-----------------------------------------------------------------------------------------------------------------------
Public Sub Move(ByVal pX As Double, ByVal pY As Double)
ZX = ZX + pX
ZY = ZY + pY
End Sub
[/code]
And Test Program:
[code]
Sub TestPoint
Dim a As Object
Set a = New Point
Dim z as variant
a.X = 4
a.Y = 1
z = a.X
MsgBox a.X
End Sub
[/code]
The two LETs a.X and a.Y do nothing. When debugging and stepping through, the
LETs do not execute any code. The GET (z = a.X) does.
The Message box should say "4". It does on 3.6.5. On LO 4 it says "0".
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs