LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScUndoDocProtect Class Reference

This class implements undo & redo of document protect & unprotect operations. More...

#include <undotab.hxx>

Inheritance diagram for ScUndoDocProtect:
[legend]
Collaboration diagram for ScUndoDocProtect:
[legend]

Public Member Functions

 ScUndoDocProtect (ScDocShell *pShell, ::std::unique_ptr< ScDocProtection > &&pProtectSettings)
 
virtual ~ScUndoDocProtect () override
 
virtual void Undo () override
 
virtual void Redo () override
 
virtual void Repeat (SfxRepeatTarget &rTarget) override
 
virtual bool CanRepeat (SfxRepeatTarget &rTarget) const override
 
virtual OUString GetComment () const override
 
- Public Member Functions inherited from ScSimpleUndo
 ScSimpleUndo (ScDocShell *pDocSh)
 
virtual bool Merge (SfxUndoAction *pNextAction) override
 
ViewShellId GetViewShellId () const override
 See SfxUndoAction::GetViewShellId(). More...
 
virtual std::optional< ScRangegetAffectedRange () const
 
- Public Member Functions inherited from SfxUndoAction
 SfxUndoAction ()
 
virtual ~SfxUndoAction () COVERITY_NOEXCEPT_FALSE
 
virtual void Undo ()
 
virtual void UndoWithContext (SfxUndoContext &i_context)
 
virtual void Redo ()
 
virtual void RedoWithContext (SfxUndoContext &i_context)
 
virtual void Repeat (SfxRepeatTarget &)
 
virtual bool CanRepeat (SfxRepeatTarget &) const
 
virtual bool Merge (SfxUndoAction *pNextAction)
 
virtual OUString GetComment () const
 
virtual OUString GetRepeatComment (SfxRepeatTarget &) const
 
virtual ViewShellId GetViewShellId () const
 
const DateTimeGetDateTime () const
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 

Private Member Functions

void DoProtect (bool bProtect)
 

Private Attributes

::std::unique_ptr< ScDocProtectionmpProtectSettings
 

Additional Inherited Members

- Public Types inherited from ScSimpleUndo
typedef std::map< SCTAB, std::unique_ptr< sc::ColumnSpanSet > > DataSpansType
 
- Protected Member Functions inherited from ScSimpleUndo
bool IsPaintLocked () const
 
bool SetViewMarkData (const ScMarkData &rMarkData)
 
void BeginUndo ()
 
void EndUndo ()
 
void BeginRedo ()
 
void EndRedo ()
 
void BroadcastChanges (const ScRange &rRange)
 
void BroadcastChanges (const DataSpansType &rSpans)
 Broadcast changes on specified spans. More...
 
- Static Protected Member Functions inherited from ScSimpleUndo
static void ShowTable (SCTAB nTab)
 
static void ShowTable (const ScRange &rRange)
 
- Protected Attributes inherited from ScSimpleUndo
ScDocShellpDocShell
 
std::unique_ptr< SfxUndoActionpDetectiveUndo
 
ViewShellId mnViewShellId
 

Detailed Description

This class implements undo & redo of document protect & unprotect operations.

Definition at line 331 of file undotab.hxx.

Constructor & Destructor Documentation

◆ ScUndoDocProtect()

ScUndoDocProtect::ScUndoDocProtect ( ScDocShell pShell,
::std::unique_ptr< ScDocProtection > &&  pProtectSettings 
)

Definition at line 1160 of file undotab.cxx.

◆ ~ScUndoDocProtect()

ScUndoDocProtect::~ScUndoDocProtect ( )
overridevirtual

Definition at line 1166 of file undotab.cxx.

Member Function Documentation

◆ CanRepeat()

bool ScUndoDocProtect::CanRepeat ( SfxRepeatTarget &  rTarget) const
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 1216 of file undotab.cxx.

◆ DoProtect()

void ScUndoDocProtect::DoProtect ( bool  bProtect)
private

◆ GetComment()

OUString ScUndoDocProtect::GetComment ( ) const
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 1221 of file undotab.cxx.

References mpProtectSettings, and ScResId().

◆ Redo()

void ScUndoDocProtect::Redo ( )
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 1204 of file undotab.cxx.

References ScSimpleUndo::BeginRedo(), DoProtect(), ScSimpleUndo::EndRedo(), and mpProtectSettings.

◆ Repeat()

void ScUndoDocProtect::Repeat ( SfxRepeatTarget &  rTarget)
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 1211 of file undotab.cxx.

◆ Undo()

void ScUndoDocProtect::Undo ( )
overridevirtual

Reimplemented from SfxUndoAction.

Definition at line 1197 of file undotab.cxx.

References ScSimpleUndo::BeginUndo(), DoProtect(), ScSimpleUndo::EndUndo(), and mpProtectSettings.

Member Data Documentation

◆ mpProtectSettings

::std::unique_ptr<ScDocProtection> ScUndoDocProtect::mpProtectSettings
private

Definition at line 345 of file undotab.hxx.

Referenced by DoProtect(), GetComment(), Redo(), and Undo().


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