You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/01/25 15:39:13 UTC

[Bug 121665] Xstorable:StoreAsURL default Overwrite parameter not obeyed correctly

https://issues.apache.org/ooo/show_bug.cgi?id=121665

--- Comment #1 from ptoye <oo...@ptoye.com> ---
Here is some code which shows the problem

REM  *****  BASIC  *****

Sub Main

dim FileString as String
dim TrueProp as  Object
TrueProp = New com.sun.star.beans.PropertyValue
dim FalseProp as Object
FalseProp = New com.sun.star.beans.PropertyValue

TrueProp.Name="Overwrite"
TrueProp.Value=TRUE
FalseProp.Name="Overwrite"
FalseProp.Value=FALSE

dim EmptyArray() as Object
dim TrueArray(0) as Object
dim FalseArray(0) as Object

TrueArray(0)=TrueProp
FalseArray(0)=FalseProp

FileString=    "some suitable file string"

dim FileURL as String

FileURL=ConverttoURL(FileString)

Dim doc as Object

Doc=StarDesktop.LoadComponentfromURL(FileURL, "_blank", 0, Array())
msgbox "Document loaded"

Doc.StoreAsURL(FileURL,TrueArray)
msgbox "Document stored with Overwrite set to TRUE"

Doc.StoreAsURL(FileURL,EmptyArray)
msgbox "Document stored with default Overwrite" ' shouldn't be displayed but is

Doc.StoreAsURL(FileURL,FalseArray)
msgbox "Document stored with Overwrite set to FALSE"


End sub

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.