Apache OpenOffice (AOO) Bugzilla – Issue 93648
form control groups which are deleted from the document still appear in alive mode
Last modified: 2009-02-06 13:57:35 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
regression between m29 and m30 => keyword, target
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...
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....
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.
AW: Committed, checked again. Works well, done.
AW->WG: Please review as described in the task. Maybe FS wants to check, too.
looks good in CWS aw058, thanks.
Tested in DEV300_m41. Closed.