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
 
virtual bool isProtected () const =0
 
virtual bool isProtectedWithPass () const =0
 
virtual void setProtected (bool bProtected)=0
 
virtual bool isPasswordEmpty () const =0
 
virtual bool hasPasswordHash (ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) const =0
 
virtual void setPassword (const OUString &aPassText)=0
 
virtual css::uno::Sequence< sal_Int8getPasswordHash (ScPasswordHash eHash, ScPasswordHash eHas2=PASSHASH_UNSPECIFIED) const =0
 
virtual const ScOoxPasswordHashgetPasswordHash () const =0
 
virtual void setPasswordHash (const css::uno::Sequence< sal_Int8 > &aPassword, ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED)=0
 
virtual void setPasswordHash (const OUString &rAlgorithmName, const OUString &rHashValue, const OUString &rSaltValue, sal_uInt32 nSpinCount)=0
 
virtual bool verifyPassword (const OUString &aPassText) const =0
 

Private Attributes

std::unique_ptr< ScTableProtectionImplmpImpl
 

Detailed Description

Definition at line 95 of file tabprotection.hxx.

Member Enumeration Documentation

◆ Option

Enumerator
STRUCTURE 
WINDOWS 
NONE 

last item - used to resize the vector

Definition at line 98 of file tabprotection.hxx.

Constructor & Destructor Documentation

◆ ScDocProtection() [1/2]

ScDocProtection::ScDocProtection ( )
explicit

Definition at line 526 of file tabprotection.cxx.

◆ ScDocProtection() [2/2]

ScDocProtection::ScDocProtection ( const ScDocProtection r)
explicit

Definition at line 531 of file tabprotection.cxx.

◆ ~ScDocProtection()

ScDocProtection::~ScDocProtection ( )
overridevirtual

Definition at line 537 of file tabprotection.cxx.

Member Function Documentation

◆ getPasswordHash() [1/2]

const ScOoxPasswordHash & ScDocProtection::getPasswordHash ( ) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 581 of file tabprotection.cxx.

References mpImpl.

◆ getPasswordHash() [2/2]

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().

◆ hasPasswordHash()

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

Implements ScPassHashProtectable.

Definition at line 566 of file tabprotection.cxx.

References mpImpl.

◆ isOptionEnabled()

bool ScDocProtection::isOptionEnabled ( Option  eOption) const

Definition at line 603 of file tabprotection.cxx.

References mpImpl.

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

◆ isPasswordEmpty()

bool ScDocProtection::isPasswordEmpty ( ) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 561 of file tabprotection.cxx.

References mpImpl.

◆ isProtected()

bool ScDocProtection::isProtected ( ) const
overridevirtual

◆ isProtectedWithPass()

bool ScDocProtection::isProtectedWithPass ( ) const
overridevirtual

Implements ScPassHashProtectable.

Definition at line 546 of file tabprotection.cxx.

References mpImpl.

Referenced by ScTabViewShell::Execute().

◆ setOption()

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

Definition at line 608 of file tabprotection.cxx.

References mpImpl.

◆ setPassword()

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

Implements ScPassHashProtectable.

Definition at line 571 of file tabprotection.cxx.

References mpImpl.

Referenced by ScDocFunc::Protect().

◆ setPasswordHash() [1/2]

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

◆ setPasswordHash() [2/2]

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.

◆ setProtected()

void ScDocProtection::setProtected ( bool  bProtected)
overridevirtual

◆ verifyPassword()

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

◆ mpImpl

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

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