Modify

Opened 8 years ago

Closed 8 years ago

#2076 closed Bug (Fixed)

Object value can't be set True

Reported by: chrisg1941@… Owned by: trancexx
Milestone: 3.3.9.0 Component: AutoIt
Version: 3.3.8.0 Severity: None
Keywords: Cc:

Description

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

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by trancexx

  • Milestone set to 3.3.9.0
  • Owner set to trancexx
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [6571] in version: 3.3.9.0

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain trancexx.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.