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 &rViewData)
 
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 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 ()
 
void PerformSampling ()
 
sal_Int64 GetPopulationSize () const
 
void LimitSampleSizeAndPeriod ()
 
ScRange PerformRandomSampling (ScDocShell *pDocShell)
 
ScRange PerformRandomSamplingKeepOrder (ScDocShell *pDocShell)
 
ScRange PerformPeriodicSampling (ScDocShell *pDocShell)
 
 DECL_LINK (ButtonClicked, 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::Toggleable &, void)
 
 DECL_LINK (RefInputModifyHandler, formula::RefEdit &, void)
 
 DECL_LINK (CheckHdl, weld::Toggleable &, 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
 
std::unique_ptr< weld::ButtonmxButtonCancel
 

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 17 of file SamplingDialog.hxx.

Constructor & Destructor Documentation

◆ ScSamplingDialog()

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

◆ ~ScSamplingDialog()

ScSamplingDialog::~ScSamplingDialog ( )
overridevirtual

Definition at line 61 of file SamplingDialog.cxx.

Member Function Documentation

◆ Close()

void ScSamplingDialog::Close ( )
overridevirtual

◆ DECL_LINK() [1/10]

ScSamplingDialog::DECL_LINK ( ButtonClicked  ,
weld::Button ,
void   
)
private

◆ DECL_LINK() [2/10]

ScSamplingDialog::DECL_LINK ( CheckHdl  ,
weld::Toggleable ,
void   
)
private

◆ DECL_LINK() [3/10]

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

◆ DECL_LINK() [4/10]

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

◆ DECL_LINK() [5/10]

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

◆ DECL_LINK() [6/10]

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

◆ DECL_LINK() [7/10]

ScSamplingDialog::DECL_LINK ( PeriodValueModified  ,
weld::SpinButton ,
void   
)
private

◆ DECL_LINK() [8/10]

ScSamplingDialog::DECL_LINK ( RefInputModifyHandler  ,
formula::RefEdit ,
void   
)
private

◆ DECL_LINK() [9/10]

ScSamplingDialog::DECL_LINK ( SamplingSizeValueModified  ,
weld::SpinButton ,
void   
)
private

◆ DECL_LINK() [10/10]

ScSamplingDialog::DECL_LINK ( ToggleSamplingMethod  ,
weld::Toggleable ,
void   
)
private

◆ GetPopulationSize()

sal_Int64 ScSamplingDialog::GetPopulationSize ( ) const
private

◆ GetRangeFromSelection()

void ScSamplingDialog::GetRangeFromSelection ( )
private

◆ Init()

void ScSamplingDialog::Init ( void  )
private

◆ LimitSampleSizeAndPeriod()

void ScSamplingDialog::LimitSampleSizeAndPeriod ( )
private

Definition at line 364 of file SamplingDialog.cxx.

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

Referenced by SetReference().

◆ PerformPeriodicSampling()

ScRange ScSamplingDialog::PerformPeriodicSampling ( ScDocShell pDocShell)
private

◆ PerformRandomSampling()

ScRange ScSamplingDialog::PerformRandomSampling ( ScDocShell pDocShell)
private

◆ PerformRandomSamplingKeepOrder()

ScRange ScSamplingDialog::PerformRandomSamplingKeepOrder ( ScDocShell pDocShell)
private

◆ PerformSampling()

void ScSamplingDialog::PerformSampling ( )
private

◆ SetActive()

void ScSamplingDialog::SetActive ( )
overridevirtual

◆ SetReference()

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

◆ ToggleSamplingMethod()

void ScSamplingDialog::ToggleSamplingMethod ( )
private

Member Data Documentation

◆ mAddressDetails

ScAddress::Details ScSamplingDialog::mAddressDetails
private

Definition at line 38 of file SamplingDialog.hxx.

Referenced by GetRangeFromSelection(), and SetReference().

◆ mCurrentAddress

ScAddress ScSamplingDialog::mCurrentAddress
private

Definition at line 41 of file SamplingDialog.hxx.

Referenced by SetReference().

◆ mDialogLostFocus

bool ScSamplingDialog::mDialogLostFocus
private

Definition at line 46 of file SamplingDialog.hxx.

Referenced by SetActive().

◆ mDocument

const ScDocument& ScSamplingDialog::mDocument
private

◆ mInputRange

ScRange ScSamplingDialog::mInputRange
private

◆ mnLastPeriodValue

sal_Int64 ScSamplingDialog::mnLastPeriodValue
private

Definition at line 44 of file SamplingDialog.hxx.

Referenced by LimitSampleSizeAndPeriod().

◆ mnLastSampleSizeValue

sal_Int64 ScSamplingDialog::mnLastSampleSizeValue
private

Definition at line 43 of file SamplingDialog.hxx.

◆ mOutputAddress

ScAddress ScSamplingDialog::mOutputAddress
private

◆ mpActiveEdit

formula::RefEdit* ScSamplingDialog::mpActiveEdit
private

Definition at line 31 of file SamplingDialog.hxx.

Referenced by SetActive(), and SetReference().

◆ mViewData

ScViewData& ScSamplingDialog::mViewData
private

Definition at line 34 of file SamplingDialog.hxx.

Referenced by GetRangeFromSelection(), and PerformSampling().

◆ mxButtonCancel

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

Definition at line 66 of file SamplingDialog.hxx.

Referenced by Init().

◆ mxButtonOk

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

Definition at line 65 of file SamplingDialog.hxx.

Referenced by Init(), and SetReference().

◆ mxInputRangeButton

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

Definition at line 51 of file SamplingDialog.hxx.

Referenced by Init(), and ScSamplingDialog().

◆ mxInputRangeEdit

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

Definition at line 50 of file SamplingDialog.hxx.

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

◆ mxInputRangeLabel

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

Definition at line 49 of file SamplingDialog.hxx.

Referenced by ScSamplingDialog().

◆ mxKeepOrder

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

Definition at line 62 of file SamplingDialog.hxx.

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

◆ mxOutputRangeButton

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

Definition at line 55 of file SamplingDialog.hxx.

Referenced by Init(), and ScSamplingDialog().

◆ mxOutputRangeEdit

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

Definition at line 54 of file SamplingDialog.hxx.

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

◆ mxOutputRangeLabel

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

Definition at line 53 of file SamplingDialog.hxx.

Referenced by ScSamplingDialog().

◆ mxPeriod

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

◆ mxPeriodicMethodRadio

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

Definition at line 63 of file SamplingDialog.hxx.

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

◆ mxRandomMethodRadio

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

Definition at line 60 of file SamplingDialog.hxx.

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

◆ mxSampleSize

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

◆ mxWithReplacement

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

Definition at line 61 of file SamplingDialog.hxx.

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


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