MakePropertyValue() broken in LibreOffice Calc 4.0

Some of my code has broken as I upgraded from LO3.5 to 4.0

It involves the popular function MakeProperty Value. This short macro demonstrates the problem on an empty spreadsheet:

LO40_bug.ods

I set a CellAddress. To prove the point, I open a MsgBox which displays the column, row and sheet.

I then pass this to MakePropertyValue:

MakePropertyValue( "SourcePosition", aAddress )

In LO 3.5 it sets the property value without error.

In LO 4.0 the second argument (uValue) appears to be empty, however it isn’t “missing” so the test:

If Not IsMissing( uValue ) Then

Succeeds yet the following assignment fails:

oPropertyValue.Value = uValue

With the error “Object Variable not set”

Is this a problem with my code?

Or is there a subtle bug in the common function MakePropertyValue?

I tried declaring uValue to be an object but then it fails when I pass it a string…

Hi @Gaffer,

This sure sounds like it could be a bug/regression. Please file a bug report and provide as much information as possible. The QA team will be happy to help you triage this issue in the bugtracker.

If you do file a bug, please post a link to it in a comment below using the format “fdo#123456”.

Thanks!

Filed. fdo#60878

@Gaffer – Cool, thanks!

This was a bug. Fixed in 4.0.1