info/CWS undoapi : new: framework::DocumentUndoGuard

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

info/CWS undoapi : new: framework::DocumentUndoGuard

frank.schoenheit


          Type: info
         Title: new: framework::DocumentUndoGuard
     Posted by: [hidden email]
      Affected: -
         TaskId: i33781
<http://www.openoffice.org/issues/show_bug.cgi?id=33781>
Effective from: CWS undoapi
           CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/undoapi>
    CWS status: new


*Summary*
--------
+ <framework/documentundoguard.hxx>
+ framework::DocumentUndoGuard

*Description*
-------------
The class DocumentUndoGuard is a scope guard to protect a document's
Undo manager state.

For instance, if some external script code is called which operates on
a document, and potentially tampers with the document's Undo Manager,
then it is possible that the manager is left inconsistent. The
DocumentUndoGuard protects the Undo Manager (to some extent), by at
least ensuring that XUndoManager::enterUndoContext calls are matched
by respective XUndoManager::leaveUndoContext calls.

All places which today call an external script, and where this is
reasonable (which excludes, for instance, execution of Basic scripts
from with cell formulas), have been pampered with an
DocumentUndoGuard. If you introduce new such places in the future,
please consider using the guard as well.


Send feedback to [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]