Issue 5309 - Load template with script makes saving fail
Summary: Load template with script makes saving fail
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P2 Trivial
Target Milestone: ---
Assignee: ooo
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-27 13:58 UTC by martho
Modified: 2013-02-24 21:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description martho 2002-05-27 13:58:13 UTC
Win2000, OO 1.0, Writer, StarBasic

I load and process writer-template with Star-Basic like this:

Dim mArgs()
oDocument = oDesktop.loadComponentFromURL
("file:///"+sPath+sFileName+“.stw“, "_blank", 0, mArgs)

oDocument.lockControllers()
oReplace = oDocument.createReplaceDescriptor
... ' Doing some replaces
oDocument.storeAsURL(sUrl, mFileProperties())
oDocument.unlockControllers()

The saving works here without problems. The document is not closed, because 
sometimes the user want to chang something manually and then saves the document 
manually with File->Save.

And HERE you get a "generall I/O-error while saving [sUrl]". The filename 
is just a 6-digit-number (like "000123.sxw")

I tried to do a manual File->Save as... (for example "000123_2.sxw"), but 
then OO gives the same error and says it could not save "000123.swx" (!) 
(but I wrote "000123_2.sxw" in the file-dialog-box...).

This is all very strange and it happens only when opening the template 
with loadComponentFromURL. It could not be an error of Win2000, because 
when opening the same document manually with File->Open, it all works fine. I 
used the same script in StarOffice 6.0 Beta and it worked, too.
Comment 1 martho 2002-06-04 15:15:13 UTC
The problem was caused by an statement in my code:

mFileProperties(0).Value = FALSE

When not using this statement, everything works fine.



Comment 2 ooo 2003-01-08 11:37:35 UTC
closing