LibreOffice Module sw (master) 1
Classes | Namespaces | Functions
IDocumentUndoRedo.hxx File Reference
#include <sal/types.h>
#include "swundo.hxx"
#include <memory>
Include dependency graph for IDocumentUndoRedo.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sw::UndoGuard
 
class  sw::GroupUndoGuard
 Blocks grouping undo actions together into an SfxListUndoAction. More...
 
class  sw::DrawUndoGuard
 

Namespaces

namespace  sw
 Dialog to specify the properties of date form field.
 

Functions

class SAL_LOPLUGIN_ANNOTATE ("crosscast") IDocumentUndoRedo
 

Function Documentation

◆ SAL_LOPLUGIN_ANNOTATE()

class SAL_LOPLUGIN_ANNOTATE ( "crosscast"  )

Enable/Disable Undo.

Is Undo enabled?

Enable/Disable Group Undo. This determines whether successive Insert/Delete/Overwrite actions are combined.

Is Group Undo enabled?

Enable/Disable Undo for Drawing objects.

Is Undo for Drawing objects enabled? for Draw-Undo: writer wants to handle actions on Flys on its own.

Enable repair mode.

Is repair mode active?

Set the position at which the document is in the "unmodified" state to the current position in the Undo stack.

Prevent updates to the "unmodified" state position via SetUndoNoResetModified().

Allow updates to the "unmodified" state position via SetUndoNoResetModified().

Disable (re)setting the document modified flag on Undo/Redo.

Is setting the document modified flag on Undo/Redo disabled?

Execute Undo.

Returns
true if executing the last Undo action was successful.

Opens undo block.

Remarks
StartUndo() and EndUndo() do nothing if !DoesUndo().
Parameters
nUndoIdundo ID for the list action
pRewriterrewriter for comments
See also
SwUndo::GetComment

If the given nUndoId is equal to zero an undo object with ID SwUndoId::START will be generated.

Returns
the undo ID of the created object

Closes undo block.

Remarks
StartUndo() and EndUndo() do nothing if !DoesUndo().
Parameters
nUndoIdundo ID for the list action
pRewriterrewriter for comments
See also
SwUndo::GetComment

If the given nUndoId is not SwUndoId::EMPTY or SwUndoId::END, the comment of the resulting list action will be set via the nUndoId, applying the given pRewriter (if not 0). Otherwise the comment of the resulting list action is unchanged if it has an UndoId that is not SwUndoId::START set by StartUndo, and in case the UndoId is SwUndoId::START the comment of the list action defaults to the comment of the last action contained in the list action.

Delete all Undo actions. Of course Undo will be disabled during deletion.

Get Id and comment of last Undo action.

Parameters
o_pStrif not 0, receives comment of last Undo action.
o_pIdif not 0, receives Id of last Undo action.
pViewif not nullptr, get the info for this view
Returns
true if there is a Undo action, false if none

Get comments of Undo actions.

Returns
comments of all top-level Undo actions.

Execute Redo.

Returns
true if executing the first Redo action was successful.

Get Id and comment of first Redo action.

Parameters
o_pStrif not 0, receives comment of first Redo action.
o_pIdif not 0, receives Id of first Redo action.
pViewif not nullptr, get the info for this view
Returns
true if there is a Redo action, false if none

Get comments of Redo actions.

Returns
comments of all top-level Redo actions.

Repeat the last Undo action.

Returns
true if repeating the last Undo Redo action was attempted.

Get Id and comment of last Undo action, if it is Repeat capable.

Parameters
o_pStrif not 0, receives comment of last Undo action if it is Repeat capable.
Returns
Id of last Undo action if it is Repeat capable, or SwUndoId::EMPTY if there is none or it is not Repeat capable.

Add new Undo action. Takes over ownership of pUndo.

Remarks
calls ClearRedo(), except for SwUndoId::START/SwUndoId::END.
does nothing if !DoesUndo().

Delete all Redo actions.

Get the number of Undo actions.

Return undo/redo info for this view.

Zero offset means undoing the top undo action.

Definition at line 1 of file IDocumentUndoRedo.hxx.