LibreOffice Module chart2 (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
chart::UndoGuard Class Reference

A guard which does nothing, unless you explicitly call commitAction. More...

#include <UndoGuard.hxx>

Inheritance diagram for chart::UndoGuard:
[legend]
Collaboration diagram for chart::UndoGuard:
[legend]

Public Member Functions

 UndoGuard (OUString i_undoMessage, const css::uno::Reference< css::document::XUndoManager > &i_undoManager, const ModelFacet i_facet=E_MODEL)
 
 ~UndoGuard ()
 
void commit ()
 
void rollback ()
 

Protected Member Functions

bool isActionPosted () const
 

Private Member Functions

void discardSnapshot ()
 

Private Attributes

rtl::Reference<::chart::ChartModel > m_xChartModel
 
const css::uno::Reference< css::document::XUndoManager > m_xUndoManager
 
std::shared_ptr< ChartModelClonem_pDocumentSnapshot
 
OUString m_aUndoString
 
bool m_bActionPosted
 

Detailed Description

A guard which does nothing, unless you explicitly call commitAction.

In particular, in its destructor, it does neither auto-commit nor auto-rollback the model changes.

Definition at line 36 of file UndoGuard.hxx.

Constructor & Destructor Documentation

◆ UndoGuard()

chart::UndoGuard::UndoGuard ( OUString  i_undoMessage,
const css::uno::Reference< css::document::XUndoManager > &  i_undoManager,
const ModelFacet  i_facet = E_MODEL 
)
explicit

◆ ~UndoGuard()

chart::UndoGuard::~UndoGuard ( )

Definition at line 48 of file UndoGuard.cxx.

Member Function Documentation

◆ commit()

void chart::UndoGuard::commit ( )

Definition at line 54 of file UndoGuard.cxx.

References DBG_UNHANDLED_EXCEPTION.

Referenced by chart::ChartController::execute_MouseButtonUp(), chart::ChartController::executeDispatch_ChartType(), chart::ChartController::executeDispatch_Delete(), chart::ChartController::executeDispatch_DeleteAxis(), chart::ChartController::executeDispatch_DeleteDataLabel(), chart::ChartController::executeDispatch_DeleteDataLabels(), chart::ChartController::executeDispatch_DeleteDataTable(), chart::ChartController::executeDispatch_DeleteErrorBars(), chart::ChartController::executeDispatch_DeleteLegend(), chart::ChartController::executeDispatch_DeleteMajorGrid(), chart::ChartController::executeDispatch_DeleteMeanValue(), chart::ChartController::executeDispatch_DeleteMinorGrid(), chart::ChartController::executeDispatch_DeleteR2Value(), chart::ChartController::executeDispatch_DeleteTrendline(), chart::ChartController::executeDispatch_DeleteTrendlineEquation(), chart::ChartController::executeDispatch_EditData(), chart::ChartController::executeDispatch_InsertAxes(), chart::ChartController::executeDispatch_InsertAxis(), chart::ChartController::executeDispatch_InsertAxisTitle(), chart::ChartController::executeDispatch_InsertDataLabel(), chart::ChartController::executeDispatch_InsertDataLabels(), chart::ChartController::executeDispatch_InsertDataTable(), chart::ChartController::executeDispatch_InsertErrorBars(), chart::ChartController::executeDispatch_InsertGrid(), chart::ChartController::executeDispatch_InsertLegend(), chart::ChartController::executeDispatch_InsertMajorGrid(), chart::ChartController::executeDispatch_InsertMeanValue(), chart::ChartController::executeDispatch_InsertMenu_DataLabels(), chart::ChartController::executeDispatch_InsertMenu_MeanValues(), chart::ChartController::executeDispatch_InsertMinorGrid(), chart::ChartController::executeDispatch_InsertR2Value(), chart::ChartController::executeDispatch_InsertTitles(), chart::ChartController::executeDispatch_InsertTrendline(), chart::ChartController::executeDispatch_InsertTrendlineEquation(), chart::ChartController::executeDispatch_MoveSeries(), chart::ChartController::executeDispatch_NewArrangement(), chart::ChartController::executeDispatch_OpenInsertDataTableDialog(), chart::ChartController::executeDispatch_OpenLegendDialog(), chart::ChartController::executeDispatch_PositionAndSize(), chart::ChartController::executeDispatch_ResetAllDataPoints(), chart::ChartController::executeDispatch_ResetDataPoint(), chart::ChartController::executeDispatch_ScaleText(), chart::ChartController::executeDispatch_SourceData(), chart::ChartController::executeDispatch_ToggleGridHorizontal(), chart::ChartController::executeDispatch_ToggleGridVertical(), chart::ChartController::executeDispatch_ToggleLegend(), chart::ChartController::executeDispatch_View3D(), chart::ChartController::executeDlg_ObjectProperties(), chart::ChartController::impl_moveOrResizeObject(), and chart::ChartController::impl_switchDiagramPositioningToExcludingPositioning().

◆ discardSnapshot()

void chart::UndoGuard::discardSnapshot ( )
private

Definition at line 79 of file UndoGuard.cxx.

References ENSURE_OR_RETURN_VOID.

◆ isActionPosted()

bool chart::UndoGuard::isActionPosted ( ) const
inlineprotected

◆ rollback()

void chart::UndoGuard::rollback ( )

Member Data Documentation

◆ m_aUndoString

OUString chart::UndoGuard::m_aUndoString
private

Definition at line 60 of file UndoGuard.hxx.

◆ m_bActionPosted

bool chart::UndoGuard::m_bActionPosted
private

Definition at line 61 of file UndoGuard.hxx.

Referenced by isActionPosted().

◆ m_pDocumentSnapshot

std::shared_ptr< ChartModelClone > chart::UndoGuard::m_pDocumentSnapshot
private

Definition at line 59 of file UndoGuard.hxx.

◆ m_xChartModel

rtl::Reference<::chart::ChartModel> chart::UndoGuard::m_xChartModel
private

Definition at line 56 of file UndoGuard.hxx.

◆ m_xUndoManager

const css::uno::Reference< css::document::XUndoManager > chart::UndoGuard::m_xUndoManager
private

Definition at line 57 of file UndoGuard.hxx.


The documentation for this class was generated from the following files: