Re: Attempt for an UNO Undo API

Björn Michaelsen <[email protected]>
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <[email protected]>
Hi Malte, Michael,

Am Mon, 18 Oct 2010 15:46:00 +0200
schrieb Michael Stahl <[email protected]>:

> On 18/10/2010 14:55, Malte Timmermann wrote:
> > The Undo actions could have pointers to some data which doesn't
> > exist anymore, and the extension can't remove the actions from the
> > UndoManager.

That is broken by design.

> > Avoiding pointers could mean making the Undo actions
> > more "expensive" (memory, time). For example, Writer and EditEngine
> > simply keep Paragraph* when paragraphs are being deleted completely.
> 
> this is probably one of the reasons why using Undo/Redo in writer is
> the fastest way to crash OOo...
> using bare pointers to objects that are not owned by the Undo action
> is a horrible idea.

+1

> making copies of data is an acceptable overhead of an Undo
> implementation that actually _works_.

+1
 
> [oh, and what you said is not actually true for paragraphs, but lots
> of other stuff]

- Create page style
- Delete newly created page style
- undo twice => crash (issue i92304, fixed in cws swbookmarkfixes01)

BR,

Bjoern
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.