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

#include <retypepassdlg.hxx>

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

Classes

struct  TableItem
 

Public Types

typedef std::shared_ptr< ScDocProtectionDocProtectionPtr
 
typedef std::shared_ptr< ScTableProtectionTabProtectionPtr
 

Public Member Functions

 ScRetypePassDlg (weld::Window *pParent)
 
virtual ~ScRetypePassDlg () override
 
virtual short run () override
 
void SetDataFromDocument (const ScDocument &rDoc)
 
void SetDesiredHash (ScPasswordHash eHash)
 
void WriteNewDataToDocument (ScDocument &rDoc) const
 Write the new set of password data to the document instance to overwrite the current ones. More...
 
- Public Member Functions inherited from weld::GenericDialogController
 GenericDialogController (weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId, bool bMobile=false)
 
virtual DialoggetDialog () override
 
virtual ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override
 
- Public Member Functions inherited from weld::DialogController
const DialoggetConstDialog () const
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OString &rHelpId)
 
OString get_help_id () const
 
void response (int nResponse)
 
virtual ~DialogController () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

void Init ()
 
void PopulateDialog ()
 
void SetDocData ()
 
void SetTableData (size_t nRowPos, SCTAB nTab)
 
void CheckHashStatus ()
 Check the status of all hash values to see if it's okay to enable the OK button. More...
 
void DeleteSheets ()
 
 DECL_LINK (OKHdl, weld::Button &, void)
 
 DECL_LINK (RetypeBtnHdl, weld::Button &, void)
 

Private Attributes

OUString maTextNotProtected
 
OUString maTextNotPassProtected
 
OUString maTextHashBad
 
OUString maTextHashGood
 
::std::vector< TableItemmaTableItems
 
DocProtectionPtr mpDocItem
 
ScPasswordHash meDesiredHash
 
std::unique_ptr< weld::ButtonmxBtnOk
 
std::unique_ptr< weld::LabelmxTextDocStatus
 
std::unique_ptr< weld::ButtonmxBtnRetypeDoc
 
std::unique_ptr< weld::ScrolledWindowmxScrolledWindow
 
std::unique_ptr< weld::ContainermxSheetsBox
 
std::vector< std::unique_ptr< PassFragment > > maSheets
 

Additional Inherited Members

- Static Public Member Functions inherited from weld::DialogController
static bool runAsync (const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
 
- Protected Attributes inherited from weld::GenericDialogController
std::unique_ptr< weld::Builderm_xBuilder
 
std::shared_ptr< weld::Dialogm_xDialog
 

Detailed Description

Definition at line 40 of file retypepassdlg.hxx.

Member Typedef Documentation

Definition at line 43 of file retypepassdlg.hxx.

Definition at line 44 of file retypepassdlg.hxx.

Constructor & Destructor Documentation

ScRetypePassDlg::ScRetypePassDlg ( weld::Window pParent)
explicit

Definition at line 27 of file retypepassdlg.cxx.

References Init(), and mxScrolledWindow.

ScRetypePassDlg::~ScRetypePassDlg ( )
overridevirtual

Definition at line 45 of file retypepassdlg.cxx.

Member Function Documentation

void ScRetypePassDlg::CheckHashStatus ( )
private

Check the status of all hash values to see if it's okay to enable the OK button.

Definition at line 206 of file retypepassdlg.cxx.

References i, lcl_IsInGoodStatus(), maTableItems, meDesiredHash, mpDocItem, and mxBtnOk.

Referenced by run().

ScRetypePassDlg::DECL_LINK ( OKHdl  ,
weld::Button ,
void   
)
private
ScRetypePassDlg::DECL_LINK ( RetypeBtnHdl  ,
weld::Button ,
void   
)
private
void ScRetypePassDlg::DeleteSheets ( )
private

Definition at line 49 of file retypepassdlg.cxx.

References maSheets.

Referenced by SetDataFromDocument().

void ScRetypePassDlg::Init ( void  )
private

Definition at line 119 of file retypepassdlg.cxx.

References LINK, maTextNotProtected, mxBtnOk, mxBtnRetypeDoc, and mxTextDocStatus.

Referenced by ScRetypePassDlg().

void ScRetypePassDlg::PopulateDialog ( )
private

Definition at line 131 of file retypepassdlg.cxx.

References i, maTableItems, SetDocData(), and SetTableData().

Referenced by run().

short ScRetypePassDlg::run ( )
overridevirtual

Reimplemented from weld::DialogController.

Definition at line 54 of file retypepassdlg.cxx.

References CheckHashStatus(), and PopulateDialog().

Referenced by ScTabViewShell::ExecuteRetypePassDlg().

void ScRetypePassDlg::SetDataFromDocument ( const ScDocument rDoc)
void ScRetypePassDlg::SetDesiredHash ( ScPasswordHash  eHash)

Definition at line 96 of file retypepassdlg.cxx.

References meDesiredHash.

Referenced by ScTabViewShell::ExecuteRetypePassDlg().

void ScRetypePassDlg::SetDocData ( )
private
void ScRetypePassDlg::SetTableData ( size_t  nRowPos,
SCTAB  nTab 
)
private
void ScRetypePassDlg::WriteNewDataToDocument ( ScDocument rDoc) const

Write the new set of password data to the document instance to overwrite the current ones.

Definition at line 101 of file retypepassdlg.cxx.

References ScDocument::GetTableCount(), i, maTableItems, mpDocItem, n, ScDocument::SetDocProtection(), and ScDocument::SetTabProtection().

Referenced by ScTabViewShell::ExecuteRetypePassDlg().

Member Data Documentation

std::vector<std::unique_ptr<PassFragment> > ScRetypePassDlg::maSheets
private

Definition at line 94 of file retypepassdlg.hxx.

Referenced by DeleteSheets(), SetDataFromDocument(), and SetTableData().

::std::vector<TableItem> ScRetypePassDlg::maTableItems
private
OUString ScRetypePassDlg::maTextHashBad
private

Definition at line 73 of file retypepassdlg.hxx.

Referenced by SetDocData(), and SetTableData().

OUString ScRetypePassDlg::maTextHashGood
private

Definition at line 74 of file retypepassdlg.hxx.

Referenced by SetDocData(), and SetTableData().

OUString ScRetypePassDlg::maTextNotPassProtected
private

Definition at line 72 of file retypepassdlg.hxx.

Referenced by SetDocData(), and SetTableData().

OUString ScRetypePassDlg::maTextNotProtected
private

Definition at line 71 of file retypepassdlg.hxx.

Referenced by Init(), and SetTableData().

ScPasswordHash ScRetypePassDlg::meDesiredHash
private

Definition at line 87 of file retypepassdlg.hxx.

Referenced by CheckHashStatus(), SetDesiredHash(), SetDocData(), and SetTableData().

DocProtectionPtr ScRetypePassDlg::mpDocItem
private
std::unique_ptr<weld::Button> ScRetypePassDlg::mxBtnOk
private

Definition at line 89 of file retypepassdlg.hxx.

Referenced by CheckHashStatus(), and Init().

std::unique_ptr<weld::Button> ScRetypePassDlg::mxBtnRetypeDoc
private

Definition at line 91 of file retypepassdlg.hxx.

Referenced by Init(), and SetDocData().

std::unique_ptr<weld::ScrolledWindow> ScRetypePassDlg::mxScrolledWindow
private

Definition at line 92 of file retypepassdlg.hxx.

Referenced by ScRetypePassDlg().

std::unique_ptr<weld::Container> ScRetypePassDlg::mxSheetsBox
private

Definition at line 93 of file retypepassdlg.hxx.

Referenced by SetDataFromDocument().

std::unique_ptr<weld::Label> ScRetypePassDlg::mxTextDocStatus
private

Definition at line 90 of file retypepassdlg.hxx.

Referenced by Init(), and SetDocData().


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