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 &rViewData)
 
virtual ~ScRegressionDialog () override
 
virtual void Close () override
 
- Public Member Functions inherited from ScStatisticsTwoVariableDialog
 ScStatisticsTwoVariableDialog (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData, const OUString &rUIXMLDescription, const OUString &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 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)
 

Protected Member Functions

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

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::Toggleable &, 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::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

◆ CellValueGetter

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

Definition at line 48 of file RegressionDialog.hxx.

◆ CellWriter

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

Definition at line 49 of file RegressionDialog.hxx.

Constructor & Destructor Documentation

◆ ScRegressionDialog()

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

Definition at line 137 of file RegressionDialog.cxx.

References LINK, mxConfidenceLevelField, and mxWithLabelsCheckBox.

◆ ~ScRegressionDialog()

ScRegressionDialog::~ScRegressionDialog ( )
overridevirtual

Definition at line 160 of file RegressionDialog.cxx.

Member Function Documentation

◆ ApplyOutput()

ScRange ScRegressionDialog::ApplyOutput ( ScDocShell pDocShell)
overrideprotectedvirtual

◆ Close()

void ScRegressionDialog::Close ( )
overridevirtual

◆ DECL_LINK() [1/2]

ScRegressionDialog::DECL_LINK ( CheckBoxHdl  ,
weld::Toggleable ,
void   
)
private

◆ DECL_LINK() [2/2]

ScRegressionDialog::DECL_LINK ( NumericFieldHdl  ,
weld::SpinButton ,
void   
)
private

◆ GetDataRange()

ScRange ScRegressionDialog::GetDataRange ( const ScRange rRange)
private

◆ GetRegressionTypeIndex()

size_t ScRegressionDialog::GetRegressionTypeIndex ( ) const
private

Definition at line 286 of file RegressionDialog.cxx.

References mxLinearRadioButton, and mxLogarithmicRadioButton.

Referenced by ApplyOutput().

◆ GetUndoNameId()

TranslateId ScRegressionDialog::GetUndoNameId ( )
overrideprotectedvirtual

Implements ScStatisticsTwoVariableDialog.

Definition at line 169 of file RegressionDialog.cxx.

◆ GetVariableNameFormula()

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

◆ GetXVariableNameFormula()

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

◆ GetYVariableNameFormula()

OUString ScRegressionDialog::GetYVariableNameFormula ( bool  bWithLog)
private

Definition at line 345 of file RegressionDialog.cxx.

References GetVariableNameFormula().

Referenced by WritePredictionsWithResiduals().

◆ InputRangesValid()

bool ScRegressionDialog::InputRangesValid ( )
overrideprotectedvirtual

◆ WritePredictionsWithResiduals()

void ScRegressionDialog::WritePredictionsWithResiduals ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate,
size_t  nRegressionIndex 
)
private

◆ WriteRawRegressionResults()

void ScRegressionDialog::WriteRawRegressionResults ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate,
size_t  nRegressionIndex 
)
private

◆ WriteRegressionANOVAResults()

void ScRegressionDialog::WriteRegressionANOVAResults ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate 
)
private

◆ WriteRegressionEstimatesWithCI()

void ScRegressionDialog::WriteRegressionEstimatesWithCI ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate,
bool  bTakeLogX 
)
private

◆ WriteRegressionStatistics()

void ScRegressionDialog::WriteRegressionStatistics ( AddressWalkerWriter rOutput,
FormulaTemplate rTemplate 
)
private

◆ WriteTable()

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

◆ mbCalcIntercept

bool ScRegressionDialog::mbCalcIntercept
private

◆ mbUnivariate

bool ScRegressionDialog::mbUnivariate
private

Definition at line 18 of file RegressionDialog.hxx.

Referenced by InputRangesValid().

◆ mbUse3DAddresses

bool ScRegressionDialog::mbUse3DAddresses
private

◆ mnNumIndependentVars

size_t ScRegressionDialog::mnNumIndependentVars
private

◆ mnNumObservations

size_t ScRegressionDialog::mnNumObservations
private

◆ mxCalcResidualsCheckBox

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

Definition at line 29 of file RegressionDialog.hxx.

Referenced by ApplyOutput().

◆ mxConfidenceLevelField

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

◆ mxErrorMessage

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

Definition at line 27 of file RegressionDialog.hxx.

Referenced by InputRangesValid().

◆ mxLinearRadioButton

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

Definition at line 25 of file RegressionDialog.hxx.

Referenced by GetRegressionTypeIndex().

◆ mxLogarithmicRadioButton

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

Definition at line 26 of file RegressionDialog.hxx.

Referenced by GetRegressionTypeIndex().

◆ mxNoInterceptCheckBox

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

Definition at line 30 of file RegressionDialog.hxx.

Referenced by ApplyOutput().

◆ mxWithLabelsCheckBox

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

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