std::unique_ptr<SdrUndoAction> GetSdrUndoAction(ScDocument* pDoc)
{
ScDrawLayer* pLayer = pDoc->GetDrawLayer(); if (pLayer) return pLayer->GetCalcUndo(); // must exist else return nullptr;
}
void DoSdrUndoAction(SdrUndoAction* pUndoAction, ScDocument* pDoc)
{ if (pUndoAction)
pUndoAction->Undo(); else
{ // if no drawing layer existed when the action was created, // but it was created after that, there is no draw undo action, // and after undo there might be a drawing layer with a wrong page count. // The drawing layer must have been empty in that case, so any missing // pages can just be created now.
void RedoSdrUndoAction(SdrUndoAction* pUndoAction)
{ // DoSdrUndoAction/RedoSdrUndoAction is called even if the pointer is null if (pUndoAction)
pUndoAction->Redo();
}
void EnableDrawAdjust(ScDocument* pDoc, bool bEnable)
{
ScDrawLayer* pLayer = pDoc->GetDrawLayer(); if (pLayer)
pLayer->EnableAdjust(bEnable);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.