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

#include <RandomNumberGeneratorDialog.hxx>

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

Public Member Functions

 ScRandomNumberGeneratorDialog (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData)
 
virtual ~ScRandomNumberGeneratorDialog () override
 
virtual void SetReference (const ScRange &rRef, ScDocument &rDoc) override
 
virtual void SetActive () override
 
virtual void Close () override
 
- Public Member Functions inherited from ScAnyRefDlgController
 ScAnyRefDlgController (SfxBindings *rt1, SfxChildWindow *rt2, weld::Window *rt3, const OUString &rt4, const OUString &rt5)
 
- Public Member Functions inherited from ScRefHdlrControllerImpl< SfxModelessDialogController >
 ScRefHdlrControllerImpl (weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *pArg, SfxBindings *pB)
 
 ScRefHdlrControllerImpl (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID)
 
- Public Member Functions inherited from SfxModelessDialogController
virtual ~SfxModelessDialogController () override
 
void Initialize (SfxChildWinInfo const *pInfo)
 
bool IsClosing () const
 
virtual void Close () override
 
virtual void EndDialog (int nResponse) override
 
virtual void Activate () override
 
virtual void Deactivate () override
 
virtual void ChildWinDispose () override
 
virtual void FillInfo (SfxChildWinInfo &) const
 
SfxBindingsGetBindings () const
 
- Public Member Functions inherited from SfxDialogController
 SfxDialogController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId)
 
virtual void Activate ()
 
virtual void Deactivate ()
 
virtual void ChildWinDispose ()
 
virtual void Close ()
 
virtual void EndDialog (int nResponse)
 
virtual bool CloseOnHide () const
 
- Public Member Functions inherited from ScRefHandler
 ScRefHandler (SfxDialogController &rController, SfxBindings *pB, bool bBindRef)
 
virtual ~ScRefHandler () COVERITY_NOEXCEPT_FALSE override
 
virtual void SetReference (const ScRange &rRef, ScDocument &rDoc) override=0
 
virtual void AddRefEntry () override
 
virtual bool IsRefInputMode () const override
 
virtual bool IsTableLocked () const override
 
virtual bool IsDocAllowed (SfxObjectShell *pDocSh) const override
 
virtual void ShowReference (const OUString &rStr) override
 
virtual void HideReference (bool bDoneRefMode=true) override
 
virtual void ToggleCollapsed (formula::RefEdit *pEdit, formula::RefButton *pButton) override
 
virtual void ReleaseFocus (formula::RefEdit *pEdit) override
 
virtual void ViewShellChanged () override
 
void SwitchToDocument ()
 
virtual void SetActive () override=0
 
bool EnterRefMode ()
 
bool LeaveRefMode ()
 
bool CanInputDone (bool bForced)
 

Private Member Functions

void Init ()
 
void GetRangeFromSelection ()
 
template<class RNG >
void GenerateNumbers (RNG &randomGenerator, TranslateId pDistributionStringId, const std::optional< sal_Int8 > aDecimalPlaces)
 
void SelectGeneratorAndGenerateNumbers ()
 
 DECL_LINK (OkClicked, weld::Button &, void)
 
 DECL_LINK (CloseClicked, weld::Button &, void)
 
 DECL_LINK (ApplyClicked, weld::Button &, void)
 
 DECL_LINK (GetEditFocusHandler, formula::RefEdit &, void)
 
 DECL_LINK (GetButtonFocusHandler, formula::RefButton &, void)
 
 DECL_LINK (LoseEditFocusHandler, formula::RefEdit &, void)
 
 DECL_LINK (LoseButtonFocusHandler, formula::RefButton &, void)
 
 DECL_LINK (InputRangeModified, formula::RefEdit &, void)
 
 DECL_LINK (Parameter1ValueModified, weld::SpinButton &, void)
 
 DECL_LINK (Parameter2ValueModified, weld::SpinButton &, void)
 
 DECL_LINK (DistributionChanged, weld::ComboBox &, void)
 
 DECL_LINK (CheckChanged, weld::Toggleable &, void)
 

Private Attributes

ScViewDatamrViewData
 
const ScDocumentmrDoc
 
ScRange maInputRange
 
bool mbDialogLostFocus
 
std::unique_ptr< weld::LabelmxInputRangeText
 
std::unique_ptr< formula::RefEditmxInputRangeEdit
 
std::unique_ptr< formula::RefButtonmxInputRangeButton
 
std::unique_ptr< weld::ComboBoxmxDistributionCombo
 
std::unique_ptr< weld::LabelmxParameter1Text
 
std::unique_ptr< weld::SpinButtonmxParameter1Value
 
std::unique_ptr< weld::LabelmxParameter2Text
 
std::unique_ptr< weld::SpinButtonmxParameter2Value
 
std::unique_ptr< weld::SpinButtonmxSeed
 
std::unique_ptr< weld::CheckButtonmxEnableSeed
 
std::unique_ptr< weld::SpinButtonmxDecimalPlaces
 
std::unique_ptr< weld::CheckButtonmxEnableRounding
 
std::unique_ptr< weld::ButtonmxButtonApply
 
std::unique_ptr< weld::ButtonmxButtonOk
 
std::unique_ptr< weld::ButtonmxButtonClose
 

Additional Inherited Members

- Public Types inherited from ScRefHdlrControllerImpl< SfxModelessDialogController >
enum  
 
- Static Public Member Functions inherited from ScRefHandler
static bool CanInputStart (const formula::RefEdit *pEdit)
 
- Protected Member Functions inherited from SfxModelessDialogController
 SfxModelessDialogController (SfxBindings *, SfxChildWindow *pChildWin, weld::Window *pParent, const OUString &rUIXMLDescription, const OUString &rID)
 
- Protected Member Functions inherited from ScRefHandler
void disposeRefHandler ()
 
bool DoClose (sal_uInt16 nId)
 
void SetDispatcherLock (bool bLock)
 
virtual void RefInputStart (formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
 
virtual void RefInputDone (bool bForced=false) override
 
bool ParseWithNames (ScRangeList &rRanges, std::u16string_view rStr, const ScDocument &pDoc)
 

Detailed Description

Definition at line 21 of file RandomNumberGeneratorDialog.hxx.

Constructor & Destructor Documentation

◆ ScRandomNumberGeneratorDialog()

ScRandomNumberGeneratorDialog::ScRandomNumberGeneratorDialog ( SfxBindings pB,
SfxChildWindow pCW,
weld::Window pParent,
ScViewData rViewData 
)

◆ ~ScRandomNumberGeneratorDialog()

ScRandomNumberGeneratorDialog::~ScRandomNumberGeneratorDialog ( )
overridevirtual

Definition at line 78 of file RandomNumberGeneratorDialog.cxx.

Member Function Documentation

◆ Close()

void ScRandomNumberGeneratorDialog::Close ( )
overridevirtual

◆ DECL_LINK() [1/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( ApplyClicked  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [2/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( CheckChanged  ,
weld::Toggleable ,
void   
)
private

◆ DECL_LINK() [3/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( CloseClicked  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [4/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( DistributionChanged  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [5/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( GetButtonFocusHandler  ,
formula::RefButton ,
void   
)
private

◆ DECL_LINK() [6/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( GetEditFocusHandler  ,
formula::RefEdit ,
void   
)
private

◆ DECL_LINK() [7/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( InputRangeModified  ,
formula::RefEdit ,
void   
)
private

◆ DECL_LINK() [8/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( LoseButtonFocusHandler  ,
formula::RefButton ,
void   
)
private

◆ DECL_LINK() [9/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( LoseEditFocusHandler  ,
formula::RefEdit ,
void   
)
private

◆ DECL_LINK() [10/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( OkClicked  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [11/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( Parameter1ValueModified  ,
weld::SpinButton ,
void   
)
private

◆ DECL_LINK() [12/12]

ScRandomNumberGeneratorDialog::DECL_LINK ( Parameter2ValueModified  ,
weld::SpinButton ,
void   
)
private

◆ GenerateNumbers()

template<class RNG >
void ScRandomNumberGeneratorDialog::GenerateNumbers ( RNG &  randomGenerator,
TranslateId  pDistributionStringId,
const std::optional< sal_Int8 aDecimalPlaces 
)
private

◆ GetRangeFromSelection()

void ScRandomNumberGeneratorDialog::GetRangeFromSelection ( )
private

◆ Init()

void ScRandomNumberGeneratorDialog::Init ( void  )
private

◆ SelectGeneratorAndGenerateNumbers()

void ScRandomNumberGeneratorDialog::SelectGeneratorAndGenerateNumbers ( )
private

◆ SetActive()

void ScRandomNumberGeneratorDialog::SetActive ( )
overridevirtual

◆ SetReference()

void ScRandomNumberGeneratorDialog::SetReference ( const ScRange rRef,
ScDocument rDoc 
)
overridevirtual

Member Data Documentation

◆ maInputRange

ScRange ScRandomNumberGeneratorDialog::maInputRange
private

◆ mbDialogLostFocus

bool ScRandomNumberGeneratorDialog::mbDialogLostFocus
private

Definition at line 41 of file RandomNumberGeneratorDialog.hxx.

Referenced by SetActive().

◆ mrDoc

const ScDocument& ScRandomNumberGeneratorDialog::mrDoc
private

Definition at line 37 of file RandomNumberGeneratorDialog.hxx.

Referenced by GetRangeFromSelection().

◆ mrViewData

ScViewData& ScRandomNumberGeneratorDialog::mrViewData
private

Definition at line 36 of file RandomNumberGeneratorDialog.hxx.

Referenced by GenerateNumbers(), and GetRangeFromSelection().

◆ mxButtonApply

std::unique_ptr<weld::Button> ScRandomNumberGeneratorDialog::mxButtonApply
private

Definition at line 56 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and SetReference().

◆ mxButtonClose

std::unique_ptr<weld::Button> ScRandomNumberGeneratorDialog::mxButtonClose
private

Definition at line 58 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init().

◆ mxButtonOk

std::unique_ptr<weld::Button> ScRandomNumberGeneratorDialog::mxButtonOk
private

Definition at line 57 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and SetReference().

◆ mxDecimalPlaces

std::unique_ptr<weld::SpinButton> ScRandomNumberGeneratorDialog::mxDecimalPlaces
private

Definition at line 54 of file RandomNumberGeneratorDialog.hxx.

Referenced by SelectGeneratorAndGenerateNumbers().

◆ mxDistributionCombo

std::unique_ptr<weld::ComboBox> ScRandomNumberGeneratorDialog::mxDistributionCombo
private

Definition at line 47 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and SelectGeneratorAndGenerateNumbers().

◆ mxEnableRounding

std::unique_ptr<weld::CheckButton> ScRandomNumberGeneratorDialog::mxEnableRounding
private

Definition at line 55 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and SelectGeneratorAndGenerateNumbers().

◆ mxEnableSeed

std::unique_ptr<weld::CheckButton> ScRandomNumberGeneratorDialog::mxEnableSeed
private

Definition at line 53 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and SelectGeneratorAndGenerateNumbers().

◆ mxInputRangeButton

std::unique_ptr<formula::RefButton> ScRandomNumberGeneratorDialog::mxInputRangeButton
private

Definition at line 46 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and ScRandomNumberGeneratorDialog().

◆ mxInputRangeEdit

std::unique_ptr<formula::RefEdit> ScRandomNumberGeneratorDialog::mxInputRangeEdit
private

◆ mxInputRangeText

std::unique_ptr<weld::Label> ScRandomNumberGeneratorDialog::mxInputRangeText
private

Definition at line 44 of file RandomNumberGeneratorDialog.hxx.

Referenced by ScRandomNumberGeneratorDialog().

◆ mxParameter1Text

std::unique_ptr<weld::Label> ScRandomNumberGeneratorDialog::mxParameter1Text
private

Definition at line 48 of file RandomNumberGeneratorDialog.hxx.

◆ mxParameter1Value

std::unique_ptr<weld::SpinButton> ScRandomNumberGeneratorDialog::mxParameter1Value
private

Definition at line 49 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and SelectGeneratorAndGenerateNumbers().

◆ mxParameter2Text

std::unique_ptr<weld::Label> ScRandomNumberGeneratorDialog::mxParameter2Text
private

Definition at line 50 of file RandomNumberGeneratorDialog.hxx.

◆ mxParameter2Value

std::unique_ptr<weld::SpinButton> ScRandomNumberGeneratorDialog::mxParameter2Value
private

Definition at line 51 of file RandomNumberGeneratorDialog.hxx.

Referenced by Init(), and SelectGeneratorAndGenerateNumbers().

◆ mxSeed

std::unique_ptr<weld::SpinButton> ScRandomNumberGeneratorDialog::mxSeed
private

Definition at line 52 of file RandomNumberGeneratorDialog.hxx.

Referenced by SelectGeneratorAndGenerateNumbers().


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