To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=76341
Issue #|76341
Summary|storeAsURL side effects seem to happen asynchronosuly
Component|Word processor
Version|OOo 2.2
Platform|All
URL|
OS/Version|All
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P2
Subcomponent|programming
Assigned to|mru
Reported by|chanon
------- Additional comments from [EMAIL PROTECTED] Fri Apr 13 12:34:24 +0000
2007 -------
As we tried to find a workaround for bug id 76332 (saving a readonly document
puts its form controls in design mode) we coded a macro similar to this :
--------------------------------- sample code ----------------------------
Sub doOff
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SwitchControlDesignMode"
args1(0).Value = false
''print "doff"
dispatcher.executeDispatch(document, ".uno:SwitchControlDesignMode", "", 0,
args1())
end sub
...
thisComponent.storeAsURL(SavedName, EmptyArgs)
rem if we don't put the next statement
rem wait 500
rem the document ends in design mode
DoOff()
--------------------------------------
As indicated in the code, if we don't wait a bit after the storeAsUrl the
document ends in design mode. Our understanding is that the document saving is
not finished thus changing the designmode happens before the side effect occurs.
I think this is a very high annoyance for people try to do document automation
and create a lot of troubles.
I created a document with 2 save buttons, one with the wait and one without the
wait. We have this issue with several machines, yet I cannot exclude different
behavior related to performance of the local machine.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]