﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2076	Object value can't be set True	chrisg1941@…	trancexx	"I have been trying to implement programming of Open Office through AutoIt. Open Office requires the passing of an object to its loadComponentFromURL function. This object consists of a Name and a Value, and is used to pass various information on the file, such as password (passes a string value) and Readonly (passes a boolean).

I have implemented a function to set up this up, based on several examples in these forums. However, I find that while this passes strings OK, it apparently cannot be used to set boolean values to true - whatever I try, it stays as false.

Here's a quick and dirty example which demonstrates this:

{{{
Dim $OpenPar

; This returns object with both fields correct
$OpenPar = MakePropertyValue(""Password"", ""secret"")

; This returns object with value False as requested
$OpenPar = MakePropertyValue(""ReadOnly"", False)

; This returns object with Vlue False, not True as reuqested
$OpenPar = MakePropertyValue(""ReadOnly"", True)

Exit

Func MakePropertyValue($cName, $uValue)
    $oSM = Objcreate(""com.sun.star.ServiceManager"")
    $oPropertyValue = $oSM.Bridge_GetStruct(""com.sun.star.beans.PropertyValue"")
    $oPropertyValue.Name = $cName
    $oPropertyValue.Value = $uValue
    MsgBox(0,$oPropertyValue.Name,$oPropertyValue.Value)
    $setOOoProp = $oPropertyValue
    Return $setOOoProp
EndFunc
}}}
"	Bug	closed	3.3.9.0	AutoIt	3.3.8.0	None	Fixed		
