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

#include <SamplingDialog.hxx>

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

Public Member Functions

 ScSamplingDialog (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData *pViewData)
 
virtual ~ScSamplingDialog () 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 OString &rt5)
 
- Public Member Functions inherited from ScRefHdlrControllerImpl< SfxModelessDialogController >
 ScRefHdlrControllerImpl (weld::Window *pParent, const OUString &rUIXMLDescription, const OString &rID, const SfxItemSet *pArg, SfxBindings *pB)
 
 ScRefHdlrControllerImpl (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, const OUString &rUIXMLDescription, const OString &rID)
 
- Public Member Functions inherited from SfxModelessDialogController
virtual ~SfxModelessDialogController () override
 
void Initialize (SfxChildWinInfo const *pInfo)
 
bool IsClosing () const
 
virtual void EndDialog () 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 OString &rDialogId)
 
- Public Member Functions inherited from ScRefHandler
 ScRefHandler (SfxDialogController &rController, SfxBindings *pB, bool bBindRef)
 
virtual ~ScRefHandler () COVERITY_NOEXCEPT_FALSE override
 
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 ()
 
bool EnterRefMode ()
 
bool LeaveRefMode ()
 
bool CanInputDone (bool bForced)
 
- Public Member Functions inherited from IAnyRefDialog
virtual ~IAnyRefDialog () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

void Init ()
 
void GetRangeFromSelection ()
 
void PerformSampling ()
 
sal_Int64 GetPopulationSize () const
 
void LimitSampleSizeAndPeriod ()
 
ScRange PerformRandomSampling (ScDocShell *pDocShell)
 
ScRange PerformRandomSamplingKeepOrder (ScDocShell *pDocShell)
 
ScRange PerformPeriodicSampling (ScDocShell *pDocShell)
 
 DECL_LINK (OkClicked, 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 (SamplingSizeValueModified, weld::SpinButton &, void)
 
 DECL_LINK (PeriodValueModified, weld::SpinButton &, void)
 
 DECL_LINK (ToggleSamplingMethod, weld::ToggleButton &, void)
 
 DECL_LINK (RefInputModifyHandler, formula::RefEdit &, void)
 
 DECL_LINK (CheckHdl, weld::Button &, void)
 
void ToggleSamplingMethod ()
 

Private Attributes

formula::RefEditmpActiveEdit
 
ScViewDatamViewData
 
const ScDocumentmDocument
 
ScRange mInputRange
 
ScAddress::Details mAddressDetails
 
ScAddress mOutputAddress
 
ScAddress mCurrentAddress
 
sal_Int64 mnLastSampleSizeValue
 
sal_Int64 mnLastPeriodValue
 
bool mDialogLostFocus
 
std::unique_ptr< weld::LabelmxInputRangeLabel
 
std::unique_ptr< formula::RefEditmxInputRangeEdit
 
std::unique_ptr< formula::RefButtonmxInputRangeButton
 
std::unique_ptr< weld::LabelmxOutputRangeLabel
 
std::unique_ptr< formula::RefEditmxOutputRangeEdit
 
std::unique_ptr< formula::RefButtonmxOutputRangeButton
 
std::unique_ptr< weld::SpinButtonmxSampleSize
 
std::unique_ptr< weld::SpinButtonmxPeriod
 
std::unique_ptr< weld::RadioButtonmxRandomMethodRadio
 
std::unique_ptr< weld::CheckButtonmxWithReplacement
 
std::unique_ptr< weld::CheckButtonmxKeepOrder
 
std::unique_ptr< weld::RadioButtonmxPeriodicMethodRadio
 
std::unique_ptr< weld::ButtonmxButtonOk
 

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 OString &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, const OUString &rStr, const ScDocument &pDoc)
 
- Protected Member Functions inherited from formula::IControlReferenceHandler
 ~IControlReferenceHandler ()
 

Detailed Description

Definition at line 18 of file SamplingDialog.hxx.

Constructor & Destructor Documentation

ScSamplingDialog::ScSamplingDialog ( SfxBindings pB,
SfxChildWindow pCW,
weld::Window pParent,
ScViewData pViewData 
)
ScSamplingDialog::~ScSamplingDialog ( )
overridevirtual

Definition at line 60 of file SamplingDialog.cxx.

Member Function Documentation

void ScSamplingDialog::Close ( )
overridevirtual
ScSamplingDialog::DECL_LINK ( OkClicked  ,
weld::Button ,
void   
)
private
ScSamplingDialog::DECL_LINK ( GetEditFocusHandler  ,
formula::RefEdit ,
void   
)
private
ScSamplingDialog::DECL_LINK ( GetButtonFocusHandler  ,
formula::RefButton ,
void   
)
private
ScSamplingDialog::DECL_LINK ( LoseEditFocusHandler  ,
formula::RefEdit ,
void   
)
private
ScSamplingDialog::DECL_LINK ( LoseButtonFocusHandler  ,
formula::RefButton ,
void   
)
private
ScSamplingDialog::DECL_LINK ( SamplingSizeValueModified  ,
weld::SpinButton ,
void   
)
private
ScSamplingDialog::DECL_LINK ( PeriodValueModified  ,
weld::SpinButton ,
void   
)
private
ScSamplingDialog::DECL_LINK ( ToggleSamplingMethod  ,
weld::ToggleButton ,
void   
)
private
ScSamplingDialog::DECL_LINK ( RefInputModifyHandler  ,
formula::RefEdit ,
void   
)
private
ScSamplingDialog::DECL_LINK ( CheckHdl  ,
weld::Button ,
void   
)
private
sal_Int64 ScSamplingDialog::GetPopulationSize ( ) const
private
void ScSamplingDialog::GetRangeFromSelection ( )
private
void ScSamplingDialog::Init ( void  )
private
void ScSamplingDialog::LimitSampleSizeAndPeriod ( )
private

Definition at line 360 of file SamplingDialog.cxx.

References GetPopulationSize(), mnLastPeriodValue, mxPeriod, and mxSampleSize.

Referenced by SetReference().

ScRange ScSamplingDialog::PerformPeriodicSampling ( ScDocShell pDocShell)
private
ScRange ScSamplingDialog::PerformRandomSampling ( ScDocShell pDocShell)
private
ScRange ScSamplingDialog::PerformRandomSamplingKeepOrder ( ScDocShell pDocShell)
private
void ScSamplingDialog::PerformSampling ( )
private
void ScSamplingDialog::SetActive ( )
overridevirtual
void ScSamplingDialog::SetReference ( const ScRange rRef,
ScDocument rDoc 
)
overridevirtual
void ScSamplingDialog::ToggleSamplingMethod ( )
private

Member Data Documentation

ScAddress::Details ScSamplingDialog::mAddressDetails
private

Definition at line 39 of file SamplingDialog.hxx.

Referenced by GetRangeFromSelection(), and SetReference().

ScAddress ScSamplingDialog::mCurrentAddress
private

Definition at line 42 of file SamplingDialog.hxx.

Referenced by SetReference().

bool ScSamplingDialog::mDialogLostFocus
private

Definition at line 47 of file SamplingDialog.hxx.

Referenced by SetActive().

const ScDocument& ScSamplingDialog::mDocument
private
ScRange ScSamplingDialog::mInputRange
private
sal_Int64 ScSamplingDialog::mnLastPeriodValue
private

Definition at line 45 of file SamplingDialog.hxx.

Referenced by LimitSampleSizeAndPeriod().

sal_Int64 ScSamplingDialog::mnLastSampleSizeValue
private

Definition at line 44 of file SamplingDialog.hxx.

ScAddress ScSamplingDialog::mOutputAddress
private
formula::RefEdit* ScSamplingDialog::mpActiveEdit
private

Definition at line 32 of file SamplingDialog.hxx.

Referenced by SetActive(), and SetReference().

ScViewData* ScSamplingDialog::mViewData
private

Definition at line 35 of file SamplingDialog.hxx.

Referenced by GetRangeFromSelection(), and PerformSampling().

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

Definition at line 66 of file SamplingDialog.hxx.

Referenced by Init(), and SetReference().

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

Definition at line 52 of file SamplingDialog.hxx.

Referenced by Init(), and ScSamplingDialog().

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

Definition at line 51 of file SamplingDialog.hxx.

Referenced by GetRangeFromSelection(), Init(), ScSamplingDialog(), and SetReference().

std::unique_ptr<weld::Label> ScSamplingDialog::mxInputRangeLabel
private

Definition at line 50 of file SamplingDialog.hxx.

Referenced by ScSamplingDialog().

std::unique_ptr<weld::CheckButton> ScSamplingDialog::mxKeepOrder
private

Definition at line 63 of file SamplingDialog.hxx.

Referenced by Init(), PerformSampling(), and ToggleSamplingMethod().

std::unique_ptr<formula::RefButton> ScSamplingDialog::mxOutputRangeButton
private

Definition at line 56 of file SamplingDialog.hxx.

Referenced by Init(), and ScSamplingDialog().

std::unique_ptr<formula::RefEdit> ScSamplingDialog::mxOutputRangeEdit
private

Definition at line 55 of file SamplingDialog.hxx.

Referenced by Init(), ScSamplingDialog(), and SetReference().

std::unique_ptr<weld::Label> ScSamplingDialog::mxOutputRangeLabel
private

Definition at line 54 of file SamplingDialog.hxx.

Referenced by ScSamplingDialog().

std::unique_ptr<weld::SpinButton> ScSamplingDialog::mxPeriod
private
std::unique_ptr<weld::RadioButton> ScSamplingDialog::mxPeriodicMethodRadio
private

Definition at line 64 of file SamplingDialog.hxx.

Referenced by Init(), PerformSampling(), and ToggleSamplingMethod().

std::unique_ptr<weld::RadioButton> ScSamplingDialog::mxRandomMethodRadio
private

Definition at line 61 of file SamplingDialog.hxx.

Referenced by Init(), PerformSampling(), and ToggleSamplingMethod().

std::unique_ptr<weld::SpinButton> ScSamplingDialog::mxSampleSize
private
std::unique_ptr<weld::CheckButton> ScSamplingDialog::mxWithReplacement
private

Definition at line 62 of file SamplingDialog.hxx.

Referenced by Init(), PerformRandomSampling(), and ToggleSamplingMethod().


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