LibreOffice Module basctl (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
basctl::DocumentSignature Class Reference

encapsulates (actions on) the signature/state of a document More...

#include <docsignature.hxx>

Collaboration diagram for basctl::DocumentSignature:
[legend]

Public Member Functions

 DocumentSignature (ScriptDocument const &)
 creates a DocumentSignature instance for the given document More...
 
bool supportsSignatures () const
 determines whether the instance is valid More...
 
void signScriptingContent (weld::Window *pDialogParent) const
 signs the scripting content inside the document More...
 
SignatureState getScriptingSignatureState () const
 retrieves the state of the signature of the scripting content inside the document More...
 

Private Member Functions

 DocumentSignature ()=delete
 

Private Attributes

SfxObjectShellm_pShell
 

Detailed Description

encapsulates (actions on) the signature/state of a document

Definition at line 33 of file docsignature.hxx.

Constructor & Destructor Documentation

◆ DocumentSignature() [1/2]

basctl::DocumentSignature::DocumentSignature ( ScriptDocument const &  rDocument)
explicit

creates a DocumentSignature instance for the given document

If the given ScriptDocument instance refers to the application, or to a document which does not support being signed, the DocumentSignature instance is invalid afterwards.

Definition at line 36 of file docsignature.cxx.

References basctl::ScriptDocument::getDocument(), SfxObjectShell::GetFirst(), SfxObjectShell::GetModel(), SfxObjectShell::GetNext(), basctl::ScriptDocument::isDocument(), and m_pShell.

◆ DocumentSignature() [2/2]

basctl::DocumentSignature::DocumentSignature ( )
privatedelete

Member Function Documentation

◆ getScriptingSignatureState()

SignatureState basctl::DocumentSignature::getScriptingSignatureState ( ) const

retrieves the state of the signature of the scripting content inside the document

If the instance is not valid, then SIGNATURESTATE_NOSIGNATURES is returned.

Definition at line 66 of file docsignature.cxx.

References SfxObjectShell::GetScriptingSignatureState(), and m_pShell.

Referenced by basctl::Shell::GetState(), and basctl::Shell::SetMDITitle().

◆ signScriptingContent()

void basctl::DocumentSignature::signScriptingContent ( weld::Window pDialogParent) const

signs the scripting content inside the document

@precond isValid returns <TRUE>

Definition at line 59 of file docsignature.cxx.

References m_pShell, SfxObjectShell::SignScriptingContent(), and supportsSignatures().

Referenced by basctl::ModulWindow::ExecuteGlobal().

◆ supportsSignatures()

bool basctl::DocumentSignature::supportsSignatures ( ) const

determines whether the instance is valid

An instance is valid if and only if it has been constructed with a document which supports signatures.

Definition at line 54 of file docsignature.cxx.

References m_pShell.

Referenced by basctl::ModulWindow::ExecuteGlobal(), and signScriptingContent().

Member Data Documentation

◆ m_pShell

SfxObjectShell* basctl::DocumentSignature::m_pShell
private

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