LibreOffice Module sc (master) 1
Classes | 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 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 OUString &rDialogId, bool bMobile=false)
 
virtual DialoggetDialog () override
 
virtual ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override
 
- Public Member Functions inherited from weld::DialogController
virtual DialoggetDialog ()=0
 
const DialoggetConstDialog () const
 
virtual short run ()
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OUString &rHelpId)
 
OUString 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
 
std::shared_ptr< ScDocProtectionmpDocItem
 
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 39 of file retypepassdlg.hxx.

Constructor & Destructor Documentation

◆ ScRetypePassDlg()

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

Definition at line 27 of file retypepassdlg.cxx.

References Init(), and mxScrolledWindow.

◆ ~ScRetypePassDlg()

ScRetypePassDlg::~ScRetypePassDlg ( )
overridevirtual

Definition at line 45 of file retypepassdlg.cxx.

Member Function Documentation

◆ CheckHashStatus()

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 198 of file retypepassdlg.cxx.

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

Referenced by run().

◆ DECL_LINK() [1/2]

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

◆ DECL_LINK() [2/2]

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

◆ DeleteSheets()

void ScRetypePassDlg::DeleteSheets ( )
private

Definition at line 47 of file retypepassdlg.cxx.

References maSheets.

Referenced by SetDataFromDocument().

◆ Init()

void ScRetypePassDlg::Init ( void  )
private

Definition at line 111 of file retypepassdlg.cxx.

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

Referenced by ScRetypePassDlg().

◆ PopulateDialog()

void ScRetypePassDlg::PopulateDialog ( )
private

Definition at line 123 of file retypepassdlg.cxx.

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

Referenced by run().

◆ run()

short ScRetypePassDlg::run ( )
overridevirtual

Reimplemented from weld::DialogController.

Definition at line 49 of file retypepassdlg.cxx.

References CheckHashStatus(), and PopulateDialog().

Referenced by ScTabViewShell::ExecuteRetypePassDlg().

◆ SetDataFromDocument()

void ScRetypePassDlg::SetDataFromDocument ( const ScDocument rDoc)

◆ SetDesiredHash()

void ScRetypePassDlg::SetDesiredHash ( ScPasswordHash  eHash)

Definition at line 91 of file retypepassdlg.cxx.

References meDesiredHash.

Referenced by ScTabViewShell::ExecuteRetypePassDlg().

◆ SetDocData()

void ScRetypePassDlg::SetDocData ( )
private

◆ SetTableData()

void ScRetypePassDlg::SetTableData ( size_t  nRowPos,
SCTAB  nTab 
)
private

◆ WriteNewDataToDocument()

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 93 of file retypepassdlg.cxx.

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

Referenced by ScTabViewShell::ExecuteRetypePassDlg().

Member Data Documentation

◆ maSheets

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

Definition at line 90 of file retypepassdlg.hxx.

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

◆ maTableItems

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

◆ maTextHashBad

OUString ScRetypePassDlg::maTextHashBad
private

Definition at line 69 of file retypepassdlg.hxx.

Referenced by SetDocData(), and SetTableData().

◆ maTextHashGood

OUString ScRetypePassDlg::maTextHashGood
private

Definition at line 70 of file retypepassdlg.hxx.

Referenced by SetDocData(), and SetTableData().

◆ maTextNotPassProtected

OUString ScRetypePassDlg::maTextNotPassProtected
private

Definition at line 68 of file retypepassdlg.hxx.

Referenced by SetDocData(), and SetTableData().

◆ maTextNotProtected

OUString ScRetypePassDlg::maTextNotProtected
private

Definition at line 67 of file retypepassdlg.hxx.

Referenced by Init(), and SetTableData().

◆ meDesiredHash

ScPasswordHash ScRetypePassDlg::meDesiredHash
private

Definition at line 83 of file retypepassdlg.hxx.

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

◆ mpDocItem

std::shared_ptr<ScDocProtection> ScRetypePassDlg::mpDocItem
private

◆ mxBtnOk

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

Definition at line 85 of file retypepassdlg.hxx.

Referenced by CheckHashStatus(), and Init().

◆ mxBtnRetypeDoc

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

Definition at line 87 of file retypepassdlg.hxx.

Referenced by Init(), and SetDocData().

◆ mxScrolledWindow

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

Definition at line 88 of file retypepassdlg.hxx.

Referenced by ScRetypePassDlg().

◆ mxSheetsBox

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

Definition at line 89 of file retypepassdlg.hxx.

Referenced by SetDataFromDocument().

◆ mxTextDocStatus

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

Definition at line 86 of file retypepassdlg.hxx.

Referenced by Init(), and SetDocData().


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