Issue 74133 - new chart: Writer should make use of createInternalDataProvider where possible
Summary: new chart: Writer should make use of createInternalDataProvider where possible
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 680m195
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords: new_implementation
Depends on:
Blocks:
 
Reported: 2007-02-02 15:24 UTC by thomas.lange
Modified: 2013-08-07 14:42 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description thomas.lange 2007-02-02 15:24:55 UTC
When a table is to be deleted completely createInternalDataProvider should be
called whereever it is possible. In cases where this can not easily be achieved
all data-sequence of that table should dipose.
Comment 1 thomas.lange 2007-02-02 15:29:56 UTC
There are several case to check this functionality:
- select some paragraphs before and after the table and press delete
- select all cell of a table and press delete
- select a column and call delete-rows
  (this is similar to: select a row and call delete-cols)
- convert table to text
- delete the table via use of the navigator
- merge two tables where both have a chart on their own
Comment 2 thomas.lange 2007-02-02 15:32:51 UTC
TL->BM: I also made the changes to detectArguments and introduced
DisposedExceptions. If you take care of the DisposedExceptions everything should
be fine.
Comment 3 thomas.lange 2007-02-02 16:19:35 UTC
TL->BM: Please take over. Thanks!
Comment 4 bjoern.milcke 2007-02-13 17:08:18 UTC
The chart now listens to disposing and forgets the sequences if they were
disposed of. This way the exception are not thrown. Catching DisposedExceptions
at every place where data is retrieved would be far too much places to adapt.

->TL: Please have a look at the method
SwChartDataProvider::DisposeAllDataSequences() in unochart.cxx:1553. I got a
crash in this line, I don't know exactly from what part of the calls in this
line, but the method was entered via the DTOR SwDoc::~SwDoc. At least it looks
strange to me that while the document is in the DTOR, you call GetDoc() here
without checking. I also saw some timer, for the unlocking of controllers, maybe
the unlock is triggered after everything else has been destroyed.

For checking do an update in chart2 before (and unochart.cxx, in sw where I
removed the debug-only code that caused a crash due to an exception)
Comment 5 thomas.lange 2007-02-16 08:23:08 UTC
.
Comment 6 thomas.lange 2007-02-16 10:15:25 UTC
The 'shut-down' of the chart related data-structures is now done in the
~SwDocShell which should be in time to avoid problems. Also I provided the
objects that locks the chart controllers with an explicit function to stop the
timer, unlock the controllers and forget the document pointer used to update the
charts.

Fixed in CWS chart2mst3.

Files changed:
- sw/inc/unochart.hxx
- sw/source/core/doc/docnew.cxx
- sw/source/core/unocore/unochart.cxx
- sw/source/ui/app/docshini.cxx
Comment 7 thomas.lange 2007-02-16 10:18:16 UTC
Tl->BM: please verify since this is nothing QA can easily hope to reproduce.
Comment 8 bjoern.milcke 2007-02-16 12:53:38 UTC
I got the crash quite well reproducable:

1. Create a Writer Table
2. Create a chart from the table
3. Convert the Table to Text
4. Close the Document without saving
=> GPF
Comment 9 bjoern.milcke 2007-02-16 13:07:13 UTC
Still crashes in the course of
~SwDocShell -> SwDataprovider::dispose -> DisposeAllDataSequences
Comment 10 bjoern.milcke 2007-02-16 13:08:06 UTC
->TL: Please try again. I think you should be able to reproduce the crash as
described before.
Comment 11 thomas.lange 2007-02-16 15:15:42 UTC
.
Comment 12 thomas.lange 2007-02-16 15:16:03 UTC
.
Comment 13 thomas.lange 2007-02-16 15:16:51 UTC
TL->BM: Please check.
Comment 14 thomas.lange 2007-02-20 09:47:42 UTC
TL->MRU: Please take over. Thanks!
Comment 15 IngridvdM 2007-03-01 18:29:57 UTC
changed summary to start with 'new chart:', set keyword and changed issue type
to reflect that this issue did only occur in the new chart and did not affect
the master branch
Comment 16 michael.ruess 2007-04-04 15:58:26 UTC
Verified fix in CWS chart2mst3.
Comment 17 michael.ruess 2007-07-26 13:09:49 UTC
Checked in 680m222.