LibreOffice Module sc (master)  1
Public Types | Public Member Functions | Private Attributes | List of all members
ScDocProtection Class Referencefinal

#include <tabprotection.hxx>

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

Public Types

enum  Option {
  STRUCTURE = 0,
  WINDOWS,
  NONE
}
 

Public Member Functions

 ScDocProtection ()
 
 ScDocProtection (const ScDocProtection &r)
 
virtual ~ScDocProtection () override
 
virtual bool isProtected () const override
 
virtual bool isProtectedWithPass () const override
 
virtual void setProtected (bool bProtected) override
 
virtual bool isPasswordEmpty () const override
 
virtual bool hasPasswordHash (ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) const override
 
virtual void setPassword (const OUString &aPassText) override
 
virtual css::uno::Sequence< sal_Int8getPasswordHash (ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) const override
 
virtual const ScOoxPasswordHashgetPasswordHash () const override
 
virtual void setPasswordHash (const css::uno::Sequence< sal_Int8 > &aPassword, ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) override
 
virtual void setPasswordHash (const OUString &rAlgorithmName, const OUString &rHashValue, const OUString &rSaltValue, sal_uInt32 nSpinCount) override
 
virtual bool verifyPassword (const OUString &aPassText) const override
 
bool isOptionEnabled (Option eOption) const
 
void setOption (Option eOption, bool bEnabled)
 
- Public Member Functions inherited from ScPassHashProtectable
virtual ~ScPassHashProtectable ()=0
 

Private Attributes

std::unique_ptr< ScTableProtectionImplmpImpl
 

Detailed Description

Definition at line 96 of file tabprotection.hxx.

Member Enumeration Documentation

Enumerator
STRUCTURE 
WINDOWS 
NONE 

last item - used to resize the vector

Definition at line 99 of file tabprotection.hxx.

Constructor & Destructor Documentation

ScDocProtection::ScDocProtection ( )
explicit

Definition at line 526 of file tabprotection.cxx.

ScDocProtection::ScDocProtection ( const ScDocProtection r)
explicit

Definition at line 531 of file tabprotection.cxx.

ScDocProtection::~ScDocProtection ( )
overridevirtual

Definition at line 537 of file tabprotection.cxx.

Member Function Documentation

uno::Sequence< sal_Int8 > ScDocProtection::getPasswordHash ( ScPasswordHash  eHash,
ScPasswordHash  eHash2 = PASSHASH_UNSPECIFIED 
) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 576 of file tabprotection.cxx.

References mpImpl.

Referenced by lcl_AddWorkbookProtection(), and ScXMLExport::SetBodyAttributes().

const ScOoxPasswordHash & ScDocProtection::getPasswordHash ( ) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 581 of file tabprotection.cxx.

References mpImpl.

bool ScDocProtection::hasPasswordHash ( ScPasswordHash  eHash,
ScPasswordHash  eHash2 = PASSHASH_UNSPECIFIED 
) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 566 of file tabprotection.cxx.

References mpImpl.

Referenced by ScPassHashHelper::needsPassHashRegen(), and ScXMLExport::SetBodyAttributes().

bool ScDocProtection::isOptionEnabled ( Option  eOption) const

Definition at line 603 of file tabprotection.cxx.

References mpImpl.

Referenced by XclExpRoot::IsDocumentEncrypted(), and lcl_AddWorkbookProtection().

bool ScDocProtection::isPasswordEmpty ( ) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 561 of file tabprotection.cxx.

References mpImpl.

Referenced by ScPassHashHelper::needsPassHashRegen().

bool ScDocProtection::isProtected ( ) const
overridevirtual
bool ScDocProtection::isProtectedWithPass ( ) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 546 of file tabprotection.cxx.

References mpImpl.

Referenced by ScTabViewShell::Execute().

void ScDocProtection::setOption ( Option  eOption,
bool  bEnabled 
)

Definition at line 608 of file tabprotection.cxx.

References mpImpl.

void ScDocProtection::setPassword ( const OUString &  aPassText)
overridevirtual

Implements ScPassHashProtectable.

Definition at line 571 of file tabprotection.cxx.

References mpImpl.

Referenced by ScDocFunc::Protect().

virtual void ScDocProtection::setPasswordHash ( const css::uno::Sequence< sal_Int8 > &  aPassword,
ScPasswordHash  eHash,
ScPasswordHash  eHash2 = PASSHASH_UNSPECIFIED 
)
overridevirtual

Implements ScPassHashProtectable.

void ScDocProtection::setPasswordHash ( const OUString &  rAlgorithmName,
const OUString &  rHashValue,
const OUString &  rSaltValue,
sal_uInt32  nSpinCount 
)
overridevirtual

Implements ScPassHashProtectable.

Definition at line 592 of file tabprotection.cxx.

References mpImpl.

void ScDocProtection::setProtected ( bool  bProtected)
overridevirtual

Implements ScPassHashProtectable.

Definition at line 551 of file tabprotection.cxx.

References mpImpl, and STRUCTURE.

Referenced by ScDocFunc::Protect().

bool ScDocProtection::verifyPassword ( const OUString &  aPassText) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 598 of file tabprotection.cxx.

References mpImpl.

Referenced by ScDocFunc::Unprotect().

Member Data Documentation

std::unique_ptr<ScTableProtectionImpl> ScDocProtection::mpImpl
private

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