Apache OpenOffice (AOO) Bugzilla – Issue 20115
Basic runtime error after editing a formula or drawing
Last modified: 2003-10-10 10:24:11 UTC
I attch a file that shows the problem. Greetings Walter
Created attachment 9679 [details] Describe the problem with Basic runtime error after editing a formula.
reassigned to jsk can you please take a look on this issue?
Hi aspsaegesser, i just had a look at this issue. This was a little difficult because your screenshots in the document are not in line with the contents of the actual macro. It looks as if you are having a focus problem. Taking out the problematic lines: [...] dim document as object document = ThisComponent.CurrentController.Frame [...] works ok as soon as the focus is on the document and not the object (formula, drawing or whatever) Please try to ensure that the current frame is the document and report back if this solved the problem. For now, i set it to "Worksforme" Thank you Joerg
Reopen. aspsaegesser added: If I edit an object, lets say the formula, and then leave it again, I can do whatever I want: The first time the macro is invoked it fails. Even if I invoke it minutes later, after having typed a lot of text. I do not thoroughly understand the underlying data structure of OOO. It seems that either of the objects is not reset correctly when leaving the formula. This could be ThisComponent or ThisComponent.Currentcontroller or else the Frame. However - and this is interesting -, if after leaving the formula and setting the cursor to the text, I change to another OOO document (not necessarily doing anything there) and immediately back, the macro works without complaint. To make it clear: It need be another OOO document and not another windows application. Perhaps this could be a helpful input.
jsk->mba: can you have a look please?
Probably I should have placed the reply to Joerg Skottke here and not just mail directly. Sorry. ------------------ Hallo Joerg If I edit an object, lets say the formula, and then leave it again, I can do whatever I want: The first time the macro is invoked it fails. Even if I invoke it minutes later, after having typed a lot of text. I do not thoroughly understand the underlying data structure of OOO. It seems that either of the objects is not reset correctly when leaving the formula. This could be ThisComponent or ThisComponent.Currentcontroller or else the Frame. However - and this is interesting -, if after leaving the formula and setting the cursor to the text, I change to another OOO document (not necessarily doing anything there) and immediately back, the macro works without complaint. To make it clear: It need be another OOO document and not another windows application. Perhaps this could be a helpful input. Thanks and greetings Walter
The reason for the bug is that "ThisComponent" becomes invalid after editing an embedded object. There is already another task for this bug and a fix is targetted for OOo1.1.1. *** This issue has been marked as a duplicate of 20903 ***
I verified that this bug is a duplicate by fixing #20903#. :-)