Issue 93648 - form control groups which are deleted from the document still appear in alive mode
Summary: form control groups which are deleted from the document still appear in alive...
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: DEV300m30
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.1
Assignee: wolframgarten
QA Contact: issues@dba
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2008-09-09 07:56 UTC by Frank Schönheit
Modified: 2009-02-06 13:57 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2008-09-09 07:56:10 UTC
- open a new text document
- insert two arbitrary form controls (from the "Form Controls" toolbar)
- group those two controls
- delete the group
- switch off the form control design mode
=> the controls re-appear
Comment 1 Frank Schönheit 2008-09-09 07:57:07 UTC
regression between m29 and m30 => keyword, target
Comment 2 Armin Le Grand 2008-10-08 17:35:24 UTC
AW: Played around and have seen that the group is removed and inserted from the
page, there is indeed no mechanism which travels over contained controls and
deletes them if they are VCL-Windows. There is a FmFormPage::RemoveObject()
which uses a FmXUndoEnvironment::Removed(...) which travels over a evtl.
contained hierarchy, but not with the purpose to delete VCL-Window
visualisations of controls. I have NO idea who may have done that before aw033.
It NEEDS to be some extra mechanism which reacts on group removal (insertion is
not neede since here VCL-Window creation is handled from the repaint). Need to
check a m29 for this...
Comment 3 Armin Le Grand 2008-10-08 17:56:03 UTC
AW: Found. In earlier versions, the removal of a group used
ViewContact::ActionRemoved() which deleted all VOCs not only from the object
itself, but also from the complete draw hierarchy, including FormControls in
this example. That leaded to
ViewObjectContactOfUnoControl::~ViewObjectContactOfUnoControl() which disposed
the control as VCL-Window accordingly.
This no longer happens after aw033, only the VC (and thus the VOCs) of the
SdrObject itself are removed using FlushViewContact(), but a hierarchy is no
longer taken into account. This works with normal objects since the group object
gets invalidated and the next repaint will use the new hierarchy anyways showing
the correct refresh - despite the fact that VOCs for sub-objects still exist.
This VOCs are no longer needed, but are not used. In fact, after doing UNDO, the
same VOCs (and their decompositions) would be reused for display again. On the
other hand - when the UNDO stack runs over and actually deletes the objects -
the deletion of the VOCs would then invalidate non-visible objects in the OC
they still know and think they are visualized in.
Hmmm....
Comment 4 Armin Le Grand 2008-10-10 19:30:14 UTC
AW: Moved from FlushViewContact() at SdrObject, SdrPage and MasterPageObject to
flushViewObjectContacts() at the ViewContact with a common imlementation to not
flush the VC of a visualizable object, but the visualize-helpers, the VOCs
themselves. Added a bool (bWithHierarchy) defaulting to true which will flush
for the whole hierarchy starting from the VC called at. Adapted all
FlushViewContact usages.
Works well, grouped FormControls in live mode vanish now on delete an reoccurr
accordingly (this may also fix some other related weaknesses).
Works well, ready to commit. Will check further on monday.
Comment 5 Armin Le Grand 2008-10-15 10:36:25 UTC
AW: Committed, checked again. Works well, done.
Comment 6 Armin Le Grand 2008-11-06 11:23:13 UTC
AW->WG: Please review as described in the task. Maybe FS wants to check, too.
Comment 7 Frank Schönheit 2008-11-13 08:51:02 UTC
looks good in CWS aw058, thanks.
Comment 8 wolframgarten 2009-02-06 13:57:35 UTC
Tested in DEV300_m41. Closed.