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

#include <RegressionDialog.hxx>

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

Public Member Functions

 ScRegressionDialog (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData *pViewData)
 
virtual ~ScRegressionDialog () override
 
virtual void Close () override
 
- Public Member Functions inherited from ScStatisticsTwoVariableDialog
 ScStatisticsTwoVariableDialog (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData *pViewData, const OUString &rUIXMLDescription, const OString &rID)
 
virtual ~ScStatisticsTwoVariableDialog () override
 
virtual void SetReference (const ScRange &rRef, ScDocument &rDoc) override
 
virtual void SetActive () 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
 

Protected Member Functions

virtual const char * GetUndoNameId () override
 
virtual ScRange ApplyOutput (ScDocShell *pDocShell) override
 
virtual bool InputRangesValid () override
 
- Protected Member Functions inherited from ScStatisticsTwoVariableDialog
void CalculateInputAndWriteToOutput ()
 
void ValidateDialogInput ()
 
- 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 ()
 

Private Types

using CellValueGetter = const OUString &(size_t, size_t)
 
using CellWriter = void(const OUString &, size_t, size_t)
 

Private Member Functions

size_t GetRegressionTypeIndex () const
 
ScRange GetDataRange (const ScRange &rRange)
 
OUString GetVariableNameFormula (bool bXVar, size_t nIndex, bool bWithLog)
 
OUString GetXVariableNameFormula (size_t nIndex, bool bWithLog)
 
OUString GetYVariableNameFormula (bool bWithLog)
 
void WriteRawRegressionResults (AddressWalkerWriter &rOutput, FormulaTemplate &rTemplate, size_t nRegressionIndex)
 
void WriteRegressionStatistics (AddressWalkerWriter &rOutput, FormulaTemplate &rTemplate)
 
void WriteRegressionANOVAResults (AddressWalkerWriter &rOutput, FormulaTemplate &rTemplate)
 
void WriteRegressionEstimatesWithCI (AddressWalkerWriter &rOutput, FormulaTemplate &rTemplate, bool bTakeLogX)
 
void WritePredictionsWithResiduals (AddressWalkerWriter &rOutput, FormulaTemplate &rTemplate, size_t nRegressionIndex)
 
 DECL_LINK (CheckBoxHdl, weld::ToggleButton &, void)
 
 DECL_LINK (NumericFieldHdl, weld::SpinButton &, void)
 

Static Private Member Functions

static void WriteTable (const std::function< CellValueGetter > &rCellGetter, size_t nRowsInTable, size_t nColsInTable, AddressWalkerWriter &rOutput, const std::function< CellWriter > &rFunc)
 

Private Attributes

bool mbUnivariate
 
size_t mnNumIndependentVars
 
size_t mnNumObservations
 
bool mbUse3DAddresses
 
bool mbCalcIntercept
 
std::unique_ptr< weld::CheckButtonmxWithLabelsCheckBox
 
std::unique_ptr< weld::RadioButtonmxLinearRadioButton
 
std::unique_ptr< weld::RadioButtonmxLogarithmicRadioButton
 
std::unique_ptr< weld::RadioButtonmxPowerRadioButton
 
std::unique_ptr< weld::LabelmxErrorMessage
 
std::unique_ptr< weld::SpinButtonmxConfidenceLevelField
 
std::unique_ptr< weld::CheckButtonmxCalcResidualsCheckBox
 
std::unique_ptr< weld::CheckButtonmxNoInterceptCheckBox
 

Additional Inherited Members

- Public Types inherited from ScStatisticsTwoVariableDialog
enum  GroupedBy {
  BY_COLUMN,
  BY_ROW
}
 
- Public Types inherited from ScRefHdlrControllerImpl< SfxModelessDialogController >
enum  
 
- Static Public Member Functions inherited from ScRefHandler
static bool CanInputStart (const formula::RefEdit *pEdit)
 
- Protected Attributes inherited from ScStatisticsTwoVariableDialog
std::unique_ptr< weld::LabelmxVariable1RangeLabel
 
std::unique_ptr< formula::RefEditmxVariable1RangeEdit
 
std::unique_ptr< formula::RefButtonmxVariable1RangeButton
 
std::unique_ptr< weld::LabelmxVariable2RangeLabel
 
std::unique_ptr< formula::RefEditmxVariable2RangeEdit
 
std::unique_ptr< formula::RefButtonmxVariable2RangeButton
 
std::unique_ptr< weld::LabelmxOutputRangeLabel
 
std::unique_ptr< formula::RefEditmxOutputRangeEdit
 
std::unique_ptr< formula::RefButtonmxOutputRangeButton
 
ScViewDatamViewData
 
ScDocumentmDocument
 
ScRange mVariable1Range
 
ScRange mVariable2Range
 
ScAddress::Details const mAddressDetails
 
ScAddress mOutputAddress
 
GroupedBy mGroupedBy
 

Detailed Description

Definition at line 16 of file RegressionDialog.hxx.

Member Typedef Documentation

using ScRegressionDialog::CellValueGetter = const OUString&(size_t, size_t)
private

Definition at line 49 of file RegressionDialog.hxx.

using ScRegressionDialog::CellWriter = void(const OUString&, size_t, size_t)
private

Definition at line 50 of file RegressionDialog.hxx.

Constructor & Destructor Documentation

ScRegressionDialog::ScRegressionDialog ( SfxBindings pB,
SfxChildWindow pCW,
weld::Window pParent,
ScViewData pViewData 
)

Definition at line 137 of file RegressionDialog.cxx.

References LINK, mxConfidenceLevelField, and mxWithLabelsCheckBox.

ScRegressionDialog::~ScRegressionDialog ( )
overridevirtual

Definition at line 161 of file RegressionDialog.cxx.

Member Function Documentation

ScRange ScRegressionDialog::ApplyOutput ( ScDocShell pDocShell)
overrideprotectedvirtual
void ScRegressionDialog::Close ( )
overridevirtual
ScRegressionDialog::DECL_LINK ( CheckBoxHdl  ,
weld::ToggleButton ,
void   
)
private
ScRegressionDialog::DECL_LINK ( NumericFieldHdl  ,
weld::SpinButton ,
void   
)
private
ScRange ScRegressionDialog::GetDataRange ( const ScRange rRange)
private
size_t ScRegressionDialog::GetRegressionTypeIndex ( ) const
private

Definition at line 287 of file RegressionDialog.cxx.

References mxLinearRadioButton, and mxLogarithmicRadioButton.

Referenced by ApplyOutput().

const char * ScRegressionDialog::GetUndoNameId ( )
overrideprotectedvirtual

Implements ScStatisticsTwoVariableDialog.

Definition at line 170 of file RegressionDialog.cxx.

OUString ScRegressionDialog::GetVariableNameFormula ( bool  bXVar,
size_t  nIndex,
bool  bWithLog 
)
private
OUString ScRegressionDialog::GetXVariableNameFormula ( size_t  nIndex,
bool  bWithLog 
)
private
OUString ScRegressionDialog::GetYVariableNameFormula ( bool  bWithLog)
private

Definition at line 346 of file RegressionDialog.cxx.

References GetVariableNameFormula().

Referenced by WritePredictionsWithResiduals().

bool ScRegressionDialog::InputRangesValid ( )
overrideprotectedvirtual
void ScRegressionDialog::WritePredictionsWithResiduals ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate,
size_t  nRegressionIndex 
)
private
void ScRegressionDialog::WriteRawRegressionResults ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate,
size_t  nRegressionIndex 
)
private
void ScRegressionDialog::WriteRegressionANOVAResults ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate 
)
private
void ScRegressionDialog::WriteRegressionEstimatesWithCI ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate,
bool  bTakeLogX 
)
private
void ScRegressionDialog::WriteRegressionStatistics ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate 
)
private
void ScRegressionDialog::WriteTable ( const std::function< CellValueGetter > &  rCellGetter,
size_t  nRowsInTable,
size_t  nColsInTable,
AddressWalkerWriter rOutput,
const std::function< CellWriter > &  rFunc 
)
staticprivate

Member Data Documentation

bool ScRegressionDialog::mbCalcIntercept
private
bool ScRegressionDialog::mbUnivariate
private

Definition at line 18 of file RegressionDialog.hxx.

Referenced by InputRangesValid().

bool ScRegressionDialog::mbUse3DAddresses
private

Definition at line 21 of file RegressionDialog.hxx.

Referenced by ApplyOutput(), GetVariableNameFormula(), and InputRangesValid().

size_t ScRegressionDialog::mnNumIndependentVars
private
size_t ScRegressionDialog::mnNumObservations
private
std::unique_ptr<weld::CheckButton> ScRegressionDialog::mxCalcResidualsCheckBox
private

Definition at line 30 of file RegressionDialog.hxx.

Referenced by ApplyOutput().

std::unique_ptr<weld::SpinButton> ScRegressionDialog::mxConfidenceLevelField
private
std::unique_ptr<weld::Label> ScRegressionDialog::mxErrorMessage
private

Definition at line 28 of file RegressionDialog.hxx.

Referenced by InputRangesValid().

std::unique_ptr<weld::RadioButton> ScRegressionDialog::mxLinearRadioButton
private

Definition at line 25 of file RegressionDialog.hxx.

Referenced by GetRegressionTypeIndex().

std::unique_ptr<weld::RadioButton> ScRegressionDialog::mxLogarithmicRadioButton
private

Definition at line 26 of file RegressionDialog.hxx.

Referenced by GetRegressionTypeIndex().

std::unique_ptr<weld::CheckButton> ScRegressionDialog::mxNoInterceptCheckBox
private

Definition at line 31 of file RegressionDialog.hxx.

Referenced by ApplyOutput().

std::unique_ptr<weld::RadioButton> ScRegressionDialog::mxPowerRadioButton
private

Definition at line 27 of file RegressionDialog.hxx.

std::unique_ptr<weld::CheckButton> ScRegressionDialog::mxWithLabelsCheckBox
private

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