This is a regression from the last release version. I have never had this not work. Problem description: In a BASIC Macro, create a PropertyValue. Create another struct (I tested with a Locale and a PropertyValue) Assign that struct to the Value entry of the PropertyValue The error is "Object Variable Not Set" Steps to reproduce: Run this macro: Sub Main Dim oPropertyValue As New com.sun.star.beans.PropertyValue Dim noLocale As New com.sun.star.lang.Locale Dim cName As String cName = "name" noLocale.Country = "" noLocale.Language = "zxx" oPropertyValue.Name = cName oPropertyValue.Value = noLocale End Sub The error occurs at the line: oPropertyValue.Value = noLocale Note: I have only seen this error when i assign a struct to the value. If I assign an UNO service or a string, there is no problem. In fact, this code will work: oPropertyValue.Value = ThisComponent oPropertyValue.Value = noLocale oPropertyValue.Value = "" oPropertyValue.Value = noLocale A temporary work around for my problem is demonstrated in this macro Function CreateProperty( Optional cName As String, Optional uValue ) As com.sun.star.beans.PropertyValue Dim oPropertyValue As New com.sun.star.beans.PropertyValue If Not IsMissing( cName ) Then oPropertyValue.Name = cName EndIf If Not IsMissing( uValue ) Then If IsUnoStruct(uValue) Then oPropertyValue.Value = ThisComponent End If oPropertyValue.Value = uValue EndIf CreateProperty() = oPropertyValue End Function Operating System: Fedora Version: 4.0.0.2 rc Last worked in: 3.6.5.2 release
Is this a duplicate of https://bugs.freedesktop.org/show_bug.cgi?id=60065
(Testing using 4.0.0.3 on Ubuntu 12.04.2) Running the macro as described by Pitonyak gives me an error on line 11: oPropertyValue.Value = noLocale The error given is: BASIC runtime error. Object variable not set. Result: I can reproduce Pitonyak's results using 4.0.0.3
The fix for the bug #60065 helped here as well => closing as duplicate *** This bug has been marked as a duplicate of bug 60065 ***