Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Use enhancements from #120498# in calc and writer for editing draw objects | ||
---|---|---|---|
Product: | Draw | Reporter: | Armin Le Grand <Armin.Le.Grand> |
Component: | editing | Assignee: | Armin Le Grand <Armin.Le.Grand> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | Normal | ||
Priority: | P3 | CC: | liushenf |
Version: | 4.0.0-dev | ||
Target Milestone: | 4.0.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
Armin Le Grand
2012-08-09 09:10:23 UTC
ALG: Changed to enhancement and took over. ALG: Checked for sc again; even when cleaning up some of the Undo stuff there the changes are dangerous, e.g. for each DrawingLayer undo sc is encapsulating it into a ScUndoDraw, doing some extra stuff. This would be missing when setting the document UndoManager from sc directly and is too dangerous without very deep analysis. Checking another possibility; just use the document UndoManager for the text edit itself. It could be provided bi derivations of SdrObjEditView in the apps (e.g. sc), used in SdrBeginTextEdit/SdrEndTextEdit, default would provide the UndoManager already registered at the DrawingLayer model. Checking if this is doable... ALG: That possibility is good, added virtual method getSdrUndoManagerForEnhancedTextEdit to SdrObjEditView, default gives UndoManager registered at SdrModel. It is used in the SdrObjEditView::SdrBeginTextEdit/SdrEndTextEdit implementations and make the Draw/Impress case work as expected. Committed this as preparation for adaption in apps with revision 1371711 for parent task #120498#. ALG: Exmainated the Calc case; apps outside of Draw/Impress use a mechanism SetNotifyUndoActionHandler. It sets a handler at SdrModel; when set all undo actions from DrawingLayer are sent over this link to the receiver with ownership change. Otherwise sc has it's own mechanisms for grouping undos from Drawinglayer. "alg" committed SVN revision 1371714 into trunk: #120515# Implemented and finetuned the enhanced Undo feature (see #120498#) f... ALG: Changed the UndoManger to be created from sc to SdrUndoManger, added and implemented getSdrUndoManagerForEnhancedTextEdit in the sc derivation of FmFormView. Some more finetuning needed, got the feature working for calc. Comitting changes as revision 1371714. "alg" committed SVN revision 1371716 into trunk: #120515# Implemented and finetuned the enhanced Undo feature (see #120498#) f... ALG: Checked Writer; it has a completely different, grown undo implementation and also an own derivation of UndoManager. Changed to use SdrUndoManager, implemented getSdrUndoManagerForEnhancedTextEdit. Still a lot of problems, needed to debug deeply and had to rail function calls in sw's own UndoManger implementation dependent of being in text edit mode. After some debugging got it working stable. Comitting changes as revision 1371716. "alg" committed SVN revision 1371717 into trunk: #120515# do not create undo action when in Init() ALG: Small optimization for outliner: No need to create undo actions during Init(), comitted as revision 1371717. ALG: The method SetNotifyUndoActionHdl is a good trace where the undo should be applied. Already done for Draw/Impress, Calc and Writer, the big apps are complete. Open are: - basctl (basic dialog editor) - chart2 Evaluating basctl: Seems as if it has no Undo/Redo at all, but creates a UndoManager and sets the link. In the link, the undo actions are ignored. This could be a big memory leak, need to check this deeper. The editor itself allows no draw shapes, but only controls. This means this feature is not needed. Evaluating chart2: Chart2 supports draw shapes (not in Symphony, a good reason for AOO as base btw). The undo is there, but does not really work. Could get to crash easily with playing around with draw shapes and text edit/undo in AOO3.4.1. Also needs more action. ALG: basctl: There is an undo/restore button, but not used. Indeed there is a memory leak in DialogWindow, NotifyUndoActionHdl. There is a comment saying 'DialogWindow, NotifyUndoActionHdl' and adding to the UndoManager is commented. No info in svn history who did it and why. This needs further evaluation, maybe an own task. "alg" committed SVN revision 1373773 into trunk: #120515# fixed memory leak ALG Wrote #120592# for Undo/Redo not working in basctl. I experimented with activation of Undo/Redo in basctl, but it is not working stable. For now I'll fix the memory leak there using this task. Comitted as rev 1373773. ALG: Wrote #120594# for chart issues. It is not easy to adapt for chart, so I decided for an extra issue. Done for main modules Draw/Impress, Calc and Writer. set Target Milestone to AOO 3.5.0 for PM purpose. |