Apache OpenOffice (AOO) Bugzilla – Issue 69604
Macro crashes OOo 10% of time
Last modified: 2008-05-30 11:40:36 UTC
The following simple macro works 90% and crashes 10%. The macro simply applies the "Text body" style from style list. If it crashed 100%, the fault is mine. But if it only crashes 10%, then I think the fault is OOo. sub TextBody 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(1) as new com.sun.star.beans.PropertyValue args1(0).Name = "Template" args1(0).Value = "Text body" args1(1).Name = "Family" args1(1).Value = 2 dispatcher.executeDispatch(document, ".uno:StyleApply", "", 0, args1()) end sub
Reassigned to JSK.
alandavidson, can't reproduce with OO 2.0.4 on Win XP. Please provide sample document, that exposes the issue.
Due to frequent crashes, I no longer use this macro. I use the style list instead. As I mentioned, it only crashes 10% of the time, but I can never guarantee to reproduce the crash on demand. I'm starting to learn Star Basic, so hopefully I don't need the recorder (and hence the dispatcher). I suggest you close this issue.
I've just tried macro on winxp, OOo2.2.1 and cannot reproduce crash (ran it quite a few times). Will close issue - user can reopen if required.
close