Issue 20115 - Basic runtime error after editing a formula or drawing
Summary: Basic runtime error after editing a formula or drawing
Status: CLOSED DUPLICATE of issue 20903
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1 RC4
Hardware: PC Windows 2000
: P2 Trivial (vote)
Target Milestone: ---
Assignee: Mathias_Bauer
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-26 06:55 UTC by aspsaegesser
Modified: 2003-10-10 10:24 UTC (History)
1 user (show)

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


Attachments
Describe the problem with Basic runtime error after editing a formula. (29.36 KB, application/octet-stream)
2003-09-26 06:58 UTC, aspsaegesser
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aspsaegesser 2003-09-26 06:55:48 UTC
I attch a file that shows the problem.

Greetings
Walter
Comment 1 aspsaegesser 2003-09-26 06:58:02 UTC
Created attachment 9679 [details]
Describe the problem with Basic runtime error after editing a formula.
Comment 2 jack.warchold 2003-09-29 17:00:47 UTC
reassigned to jsk

can you please take a look on this issue?
Comment 3 joerg.skottke 2003-10-09 09:25:29 UTC
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
Comment 4 joerg.skottke 2003-10-09 10:07:39 UTC
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.

Comment 5 joerg.skottke 2003-10-09 10:08:43 UTC
jsk->mba: can you have a look please?
Comment 6 aspsaegesser 2003-10-09 10:10:46 UTC
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
 
Comment 7 Mathias_Bauer 2003-10-10 09:20:35 UTC
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 ***
Comment 8 Mathias_Bauer 2003-10-10 10:24:11 UTC
I verified that this bug is a duplicate by fixing #20903#. :-)