Kai Sommerfeld wrote:
Hi all,

Andreas Saeger wrote:
Matthias B. wrote:
[...]

Sub mkNewDocWithMacro()
oDoc =
Stardesktop.loadComponentFromURL("private:factory/swriter","_default",0,Array())

oDocLibs = oDoc.BasicLibraries
oLib = oDocLibs.createLibrary("testLib")
sCode = "REM  *****  BASIC  *****"& Chr(10)
sCode = sCode &"REM inserted by Sub mkNewDocWithMacro()"& Chr(10)
sCode = sCode &"Sub test"& Chr(10)
sCode = sCode &"Msgbox ""Sub test has been called"",64,""Library
test"""& Chr(10)
sCode = sCode &"End Sub"
'msgbox sCode,64
oLib.insertByName("Module1",sCode)
REM this is not changed automatically:
oDoc.setModified(True)
End Sub

 I consider it a bug that the document's modified state is not set
automatically by the implementation of insertByName(). Any comments?
Hi Kai,

The user interface configuration also uses the document as a container for document based user interface elements. It definitely sets the modified state of the document whenever you change the user interface configuration inside the document. So from my point of view this is clearly a bug and can lead to lost data.

Regards,
Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to