LibreOffice Module sc (master) 1
|
#include <RegressionDialog.hxx>
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 |
SfxBindings & | GetBindings () 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::CheckButton > | mxWithLabelsCheckBox |
std::unique_ptr< weld::RadioButton > | mxLinearRadioButton |
std::unique_ptr< weld::RadioButton > | mxLogarithmicRadioButton |
std::unique_ptr< weld::Label > | mxErrorMessage |
std::unique_ptr< weld::SpinButton > | mxConfidenceLevelField |
std::unique_ptr< weld::CheckButton > | mxCalcResidualsCheckBox |
std::unique_ptr< weld::CheckButton > | mxNoInterceptCheckBox |
Definition at line 16 of file RegressionDialog.hxx.
|
private |
Definition at line 48 of file RegressionDialog.hxx.
|
private |
Definition at line 49 of file RegressionDialog.hxx.
ScRegressionDialog::ScRegressionDialog | ( | SfxBindings * | pB, |
SfxChildWindow * | pCW, | ||
weld::Window * | pParent, | ||
ScViewData & | rViewData | ||
) |
Definition at line 137 of file RegressionDialog.cxx.
References LINK, mxConfidenceLevelField, and mxWithLabelsCheckBox.
|
overridevirtual |
Definition at line 160 of file RegressionDialog.cxx.
|
overrideprotectedvirtual |
Implements ScStatisticsTwoVariableDialog.
Definition at line 174 of file RegressionDialog.cxx.
References FormulaTemplate::autoReplaceRange(), FormulaTemplate::autoReplaceUses3D(), ScAddress::Col(), ScAddress::Details::eConv, GetDataRange(), GetRegressionTypeIndex(), formula::FormulaGrammar::GRAM_ENGLISH, ScStatisticsTwoVariableDialog::mAddressDetails, mbCalcIntercept, mbUse3DAddresses, ScStatisticsTwoVariableDialog::mDocument, formula::FormulaGrammar::mergeToGrammar(), AddressWalker::mMaximumAddress, AddressWalker::mMinimumAddress, mnNumIndependentVars, ScStatisticsTwoVariableDialog::mOutputAddress, ScStatisticsTwoVariableDialog::mVariable1Range, ScStatisticsTwoVariableDialog::mVariable2Range, mxCalcResidualsCheckBox, mxNoInterceptCheckBox, ScAddress::SetCol(), WritePredictionsWithResiduals(), WriteRawRegressionResults(), WriteRegressionANOVAResults(), WriteRegressionEstimatesWithCI(), and WriteRegressionStatistics().
|
overridevirtual |
Reimplemented from SfxModelessDialogController.
Definition at line 164 of file RegressionDialog.cxx.
References ScRefHandler::DoClose(), and ChildControllerWrapper< SID_REGRESSION_DIALOG >::GetChildWindowId().
|
private |
|
private |
Definition at line 295 of file RegressionDialog.cxx.
References ScRange::aStart, ScStatisticsTwoVariableDialog::BY_COLUMN, ScAddress::IncCol(), ScAddress::IncRow(), ScStatisticsTwoVariableDialog::mGroupedBy, and mxWithLabelsCheckBox.
Referenced by ApplyOutput().
|
private |
Definition at line 286 of file RegressionDialog.cxx.
References mxLinearRadioButton, and mxLogarithmicRadioButton.
Referenced by ApplyOutput().
|
overrideprotectedvirtual |
Implements ScStatisticsTwoVariableDialog.
Definition at line 169 of file RegressionDialog.cxx.
|
private |
Definition at line 309 of file RegressionDialog.cxx.
References ADDR_ABS, ADDR_ABS_3D, ScRange::aStart, ScStatisticsTwoVariableDialog::BY_COLUMN, ScAddress::Format(), ScDocument::GetAddressConvention(), ScAddress::IncCol(), ScAddress::IncRow(), mbUse3DAddresses, ScStatisticsTwoVariableDialog::mDocument, ScStatisticsTwoVariableDialog::mGroupedBy, ScStatisticsTwoVariableDialog::mVariable1Range, ScStatisticsTwoVariableDialog::mVariable2Range, mxWithLabelsCheckBox, nIndex, and ScResId().
Referenced by GetXVariableNameFormula(), and GetYVariableNameFormula().
|
private |
Definition at line 339 of file RegressionDialog.cxx.
References GetVariableNameFormula(), mnNumIndependentVars, and nIndex.
Referenced by WritePredictionsWithResiduals(), and WriteRegressionEstimatesWithCI().
|
private |
Definition at line 345 of file RegressionDialog.cxx.
References GetVariableNameFormula().
Referenced by WritePredictionsWithResiduals().
|
overrideprotectedvirtual |
Reimplemented from ScStatisticsTwoVariableDialog.
Definition at line 211 of file RegressionDialog.cxx.
References ScRange::aEnd, ScRange::aStart, ScStatisticsTwoVariableDialog::BY_COLUMN, ScAddress::Col(), ScAddress::IsValid(), ScRange::IsValid(), lcl_GetNumRowsColsInRange(), mbUnivariate, mbUse3DAddresses, ScStatisticsTwoVariableDialog::mGroupedBy, mnNumIndependentVars, mnNumObservations, ScStatisticsTwoVariableDialog::mOutputAddress, ScStatisticsTwoVariableDialog::mVariable1Range, ScStatisticsTwoVariableDialog::mVariable2Range, mxConfidenceLevelField, mxErrorMessage, mxWithLabelsCheckBox, ScRange::PutInOrder(), ScAddress::Row(), ScResId(), and ScAddress::Tab().
|
private |
Definition at line 617 of file RegressionDialog.cxx.
References FormulaTemplate::autoReplaceRange(), ScStatisticsTwoVariableDialog::BY_COLUMN, AddressWalker::current(), FormulaTemplate::getTemplate(), GetXVariableNameFormula(), GetYVariableNameFormula(), ScStatisticsTwoVariableDialog::mGroupedBy, mnNumIndependentVars, mnNumObservations, AddressWalker::newLine(), AddressWalker::nextColumn(), AddressWalker::nextRow(), AddressWalker::push(), AddressWalker::reset(), ScResId(), FormulaTemplate::setTemplate(), AddressWalkerWriter::writeFormula(), AddressWalkerWriter::writeMatrixFormula(), and AddressWalkerWriter::writeString().
Referenced by ApplyOutput().
|
private |
Definition at line 350 of file RegressionDialog.cxx.
References FormulaTemplate::autoReplaceAddress(), FormulaTemplate::autoReplaceRange(), AddressWalker::current(), FormulaTemplate::getTemplate(), mbCalcIntercept, mnNumIndependentVars, AddressWalker::newLine(), AddressWalker::nextColumn(), AddressWalker::push(), ScResId(), FormulaTemplate::setTemplate(), u, AddressWalkerWriter::writeBoldString(), AddressWalkerWriter::writeMatrixFormula(), and AddressWalkerWriter::writeString().
Referenced by ApplyOutput().
|
private |
Definition at line 431 of file RegressionDialog.cxx.
References FormulaTemplate::autoReplaceAddress(), AddressWalker::current(), FormulaTemplate::getTemplate(), mxConfidenceLevelField, AddressWalker::newLine(), AddressWalker::nextColumn(), ScResId(), FormulaTemplate::setTemplate(), AddressWalkerWriter::writeFormula(), AddressWalkerWriter::writeString(), WriteTable(), and AddressWalkerWriter::writeValue().
Referenced by ApplyOutput().
|
private |
Definition at line 511 of file RegressionDialog.cxx.
References ADDR_ABS, ADDR_ABS_3D, FormulaTemplate::autoReplaceAddress(), FormulaTemplate::autoReplaceRange(), AddressWalker::current(), ScAddress::Format(), ScDocument::GetAddressConvention(), FormulaTemplate::getTemplate(), GetXVariableNameFormula(), ScAddress::IncCol(), mbUse3DAddresses, ScStatisticsTwoVariableDialog::mDocument, mnNumIndependentVars, AddressWalker::newLine(), AddressWalker::push(), ScResId(), FormulaTemplate::setTemplate(), AddressWalkerWriter::writeFormula(), AddressWalkerWriter::writeMatrixFormula(), AddressWalkerWriter::writeString(), and WriteTable().
Referenced by ApplyOutput().
|
private |
Definition at line 392 of file RegressionDialog.cxx.
References FormulaTemplate::autoReplaceAddress(), AddressWalker::current(), FormulaTemplate::getTemplate(), mbCalcIntercept, mnNumIndependentVars, mnNumObservations, AddressWalker::newLine(), AddressWalker::nextColumn(), SAL_N_ELEMENTS, ScResId(), FormulaTemplate::setTemplate(), u, AddressWalkerWriter::writeFormula(), and AddressWalkerWriter::writeString().
Referenced by ApplyOutput().
|
staticprivate |
Definition at line 669 of file RegressionDialog.cxx.
References AddressWalker::newLine(), and AddressWalker::nextColumn().
Referenced by WriteRegressionANOVAResults(), and WriteRegressionEstimatesWithCI().
|
private |
Definition at line 22 of file RegressionDialog.hxx.
Referenced by ApplyOutput(), WriteRawRegressionResults(), and WriteRegressionStatistics().
|
private |
Definition at line 18 of file RegressionDialog.hxx.
Referenced by InputRangesValid().
|
private |
Definition at line 21 of file RegressionDialog.hxx.
Referenced by ApplyOutput(), GetVariableNameFormula(), InputRangesValid(), and WriteRegressionEstimatesWithCI().
|
private |
Definition at line 19 of file RegressionDialog.hxx.
Referenced by ApplyOutput(), GetXVariableNameFormula(), InputRangesValid(), WritePredictionsWithResiduals(), WriteRawRegressionResults(), WriteRegressionEstimatesWithCI(), and WriteRegressionStatistics().
|
private |
Definition at line 20 of file RegressionDialog.hxx.
Referenced by InputRangesValid(), WritePredictionsWithResiduals(), and WriteRegressionStatistics().
|
private |
Definition at line 29 of file RegressionDialog.hxx.
Referenced by ApplyOutput().
|
private |
Definition at line 28 of file RegressionDialog.hxx.
Referenced by InputRangesValid(), ScRegressionDialog(), and WriteRegressionANOVAResults().
|
private |
Definition at line 27 of file RegressionDialog.hxx.
Referenced by InputRangesValid().
|
private |
Definition at line 25 of file RegressionDialog.hxx.
Referenced by GetRegressionTypeIndex().
|
private |
Definition at line 26 of file RegressionDialog.hxx.
Referenced by GetRegressionTypeIndex().
|
private |
Definition at line 30 of file RegressionDialog.hxx.
Referenced by ApplyOutput().
|
private |
Definition at line 24 of file RegressionDialog.hxx.
Referenced by GetDataRange(), GetVariableNameFormula(), InputRangesValid(), and ScRegressionDialog().