LibreOffice Module sc (master) 1
|
#include <optsolver.hxx>
Public Member Functions | |
ScOptSolverDlg (SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScDocShell *pDocSh, const ScAddress &aCursorPos) | |
virtual | ~ScOptSolverDlg () override |
virtual void | SetReference (const ScRange &rRef, ScDocument &rDoc) override |
virtual bool | IsRefInputMode () const 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 |
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) |
Private Member Functions | |
void | Init (const ScAddress &rCursorPos) |
bool | CallSolver () |
void | ReadConditions () |
void | ShowConditions () |
void | EnableButtons () |
bool | ParseRef (ScRange &rRange, const OUString &rInput, bool bAllowRange) |
bool | FindTimeout (sal_Int32 &rTimeout) |
void | ShowError (bool bCondition, formula::RefEdit *pFocus) |
void | LoadSolverSettings () |
void | SaveSolverSettings () |
bool | IsEngineAvailable (std::u16string_view sEngineName) |
DECL_LINK (BtnHdl, weld::Button &, void) | |
DECL_LINK (DelBtnHdl, weld::Button &, void) | |
DECL_LINK (GetEditFocusHdl, formula::RefEdit &, void) | |
DECL_LINK (GetButtonFocusHdl, formula::RefButton &, void) | |
DECL_LINK (GetFocusHdl, weld::Widget &, void) | |
DECL_LINK (LoseEditFocusHdl, formula::RefEdit &, void) | |
DECL_LINK (LoseButtonFocusHdl, formula::RefButton &, void) | |
DECL_LINK (ScrollHdl, weld::ScrolledWindow &, void) | |
DECL_LINK (CursorUpHdl, ScCursorRefEdit &, void) | |
DECL_LINK (CursorDownHdl, ScCursorRefEdit &, void) | |
DECL_LINK (CondModifyHdl, formula::RefEdit &, void) | |
DECL_LINK (TargetModifyHdl, formula::RefEdit &, void) | |
DECL_LINK (SelectHdl, weld::ComboBox &, void) | |
Static Private Member Functions | |
static sc::ConstraintOperator | OperatorIndexToConstraintOperator (sal_Int32 nIndex) |
Static Private Attributes | |
static const sal_uInt16 | EDIT_ROW_COUNT = 4 |
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) |
Definition at line 50 of file optsolver.hxx.
ScOptSolverDlg::ScOptSolverDlg | ( | SfxBindings * | pB, |
SfxChildWindow * | pCW, | ||
weld::Window * | pParent, | ||
ScDocShell * | pDocSh, | ||
const ScAddress & | aCursorPos | ||
) |
Definition at line 136 of file optsolver.cxx.
References Init(), m_xBtnDel1, m_xBtnDel2, m_xBtnDel3, m_xBtnDel4, m_xEdLeft1, m_xEdLeft2, m_xEdLeft3, m_xEdLeft4, m_xEdObjectiveCell, m_xEdRight1, m_xEdRight2, m_xEdRight3, m_xEdRight4, m_xEdTargetValue, m_xEdVariableCells, m_xFtCellRef, m_xFtConstraint, m_xFtObjectiveCell, m_xFtVariableCells, m_xLbOp1, m_xLbOp2, m_xLbOp3, m_xLbOp4, m_xRBLeft1, m_xRBLeft2, m_xRBLeft3, m_xRBLeft4, m_xRBObjectiveCell, m_xRBRight1, m_xRBRight2, m_xRBRight3, m_xRBRight4, m_xRBTargetValue, m_xRBVariableCells, m_xResultFT, mpDelButton, mpLeftButton, mpLeftEdit, mpOperator, mpRightButton, and mpRightEdit.
|
overridevirtual |
Definition at line 248 of file optsolver.cxx.
|
private |
explicit language?
explicit language?
else error?
Definition at line 860 of file optsolver.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), ScUnoConversion::FillScAddress(), FindTimeout(), ScDocShell::GetDocFunc(), ScDocument::GetFormatTable(), ScDocShell::GetModel(), ScSolverUtil::GetSolver(), ScDocument::GetString(), SvNumberFormatter::IsNumberFormat(), ScDocShell::LockPaint(), m_aConditions, m_xDialog, m_xEdObjectiveCell, m_xEdTargetValue, m_xEdVariableCells, m_xRbMax, m_xRbValue, maEngine, maProperties, mpDocShell, mrDoc, ParseRef(), ScRefHandler::ParseWithNames(), ScRange::PutInOrder(), ReadConditions(), Application::Reschedule(), RET_CLOSE, RET_OK, ScAddress::Row(), weld::DialogController::run(), weld::DialogController::runAsync(), ScDocFunc::SetValueCell(), ShowError(), ScRangeList::size(), ScAddress::Tab(), and ScDocShell::UnlockPaint().
|
overridevirtual |
Reimplemented from SfxModelessDialogController.
Definition at line 399 of file optsolver.cxx.
References ScRefHandler::DoClose(), m_xOptDlg, and RET_CANCEL.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 390 of file optsolver.cxx.
References EDIT_ROW_COUNT, m_aConditions, mpDelButton, nScrollPos, and weld::Widget::set_sensitive().
Referenced by SetReference(), and ShowConditions().
|
private |
Definition at line 843 of file optsolver.cxx.
References ScSolverUtil::GetDefaults(), maEngine, maProperties, and SC_UNONAME_TIMEOUT.
Referenced by CallSolver().
|
private |
sort by descriptions?
Definition at line 252 of file optsolver.cxx.
References ADDR_ABS, weld::ComboBox::connect_changed(), weld::Button::connect_clicked(), weld::Widget::connect_focus_in(), EDIT_ROW_COUNT, ScAddress::Format(), SfxBindings::GetActiveFrame(), ScDocument::GetAddressConvention(), SfxModelessDialogController::GetBindings(), ScSolverUtil::GetImplementations(), ScDocument::GetRangeAtBlock(), vcl::CommandInfoProvider::GetXGraphicForCommand(), Size::Height(), LINK, LoadSolverSettings(), m_xBtnClose, m_xBtnOpt, m_xBtnResetAll, m_xBtnSolve, m_xContents, m_xEdObjectiveCell, m_xEdTargetValue, m_xEdVariableCells, m_xRBObjectiveCell, m_xRBTargetValue, m_xRbValue, m_xRBVariableCells, m_xScrollBar, maDescriptions, maImplNames, mpDelButton, mpEdActive, mpLeftButton, mpLeftEdit, mpOperator, mpRightButton, mpRightEdit, mrDoc, ScCursorRefEdit::SetCursorLinks(), formula::RefButton::SetGetFocusHdl(), formula::RefEdit::SetGetFocusHdl(), formula::RefButton::SetLoseFocusHdl(), formula::RefEdit::SetLoseFocusHdl(), formula::RefEdit::SetModifyHdl(), ShowConditions(), Size::Width(), and xFrame.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 540 of file optsolver.cxx.
References comphelper::findValue(), maImplNames, and nIndex.
Referenced by LoadSolverSettings().
|
overridevirtual |
Reimplemented from ScRefHandler.
Definition at line 473 of file optsolver.cxx.
References mpEdActive.
|
private |
Definition at line 479 of file optsolver.cxx.
References eType, ScSolverUtil::GetDefaults(), IsEngineAvailable(), m_aConditions, m_pSolverSettings, m_xEdObjectiveCell, m_xEdTargetValue, m_xEdVariableCells, m_xRbMax, m_xRbMin, m_xRbValue, maEngine, maImplNames, maProperties, sc::OT_MAXIMIZE, sc::OT_MINIMIZE, sc::OT_VALUE, sc::SP_LO_ENGINE, sc::SP_OBJ_CELL, sc::SP_OBJ_VAL, and sc::SP_VAR_CELLS.
Referenced by Init().
|
staticprivate |
Definition at line 798 of file optsolver.cxx.
References sc::CO_BINARY, sc::CO_EQUAL, sc::CO_GREATER_EQUAL, sc::CO_INTEGER, sc::CO_LESS_EQUAL, and nIndex.
Referenced by ReadConditions().
|
private |
Definition at line 825 of file optsolver.cxx.
References ScRange::aEnd, ScRange::aStart, ScDocument::GetAddressConvention(), ScRangeUtil::MakeRangeFromName(), mnCurTab, mrDoc, ScRange::ParseAny(), RUTL_NAMES, ScAddress::SetTab(), ScAddress::Tab(), TAB2_3D, TAB_3D, VALID, and ZERO.
Referenced by CallSolver().
|
private |
Definition at line 342 of file optsolver.cxx.
References sc::ModelConstraint::aLeftStr, sc::ModelConstraint::aRightStr, EDIT_ROW_COUNT, formula::RefEdit::GetText(), sc::ModelConstraint::IsDefault(), m_aConditions, mpLeftEdit, mpOperator, mpRightEdit, sc::ModelConstraint::nOperator, nScrollPos, and OperatorIndexToConstraintOperator().
Referenced by CallSolver(), and SetReference().
|
private |
Definition at line 512 of file optsolver.cxx.
References m_aConditions, m_pSolverSettings, m_xEdObjectiveCell, m_xEdTargetValue, m_xEdVariableCells, m_xRbMax, m_xRbMin, m_xRbValue, maEngine, maProperties, sc::OT_MAXIMIZE, sc::OT_MINIMIZE, sc::OT_VALUE, sc::SP_LO_ENGINE, sc::SP_OBJ_CELL, sc::SP_OBJ_VAL, and sc::SP_VAR_CELLS.
|
overridevirtual |
Implements ScRefHandler.
Definition at line 407 of file optsolver.cxx.
References formula::RefEdit::GrabFocus(), m_xDialog, mbDlgLostFocus, mpEdActive, and ScRefHandler::RefInputDone().
|
overridevirtual |
Implements ScRefHandler.
Definition at line 422 of file optsolver.cxx.
References ADDR_ABS, ADDR_ABS_3D, ScRange::aEnd, aName, ScRange::aStart, aStr, EnableButtons(), ScRange::Format(), ScAddress::Format(), ScDocument::GetAddressConvention(), ScDocument::GetRangeAtBlock(), formula::RefEdit::GetSelection(), formula::RefEdit::GetText(), Selection::Len(), m_xEdObjectiveCell, m_xEdTargetValue, m_xEdVariableCells, m_xRbValue, Selection::Min(), mnCurTab, mpEdActive, Selection::Normalize(), RANGE_ABS, ReadConditions(), ScRefHandler::RefInputStart(), formula::RefEdit::SetRefString(), formula::RefEdit::SetSelection(), and ScAddress::Tab().
|
private |
Definition at line 366 of file optsolver.cxx.
References sc::ModelConstraint::aLeftStr, sc::ModelConstraint::aRightStr, EDIT_ROW_COUNT, EnableButtons(), m_aConditions, m_xScrollBar, mpLeftEdit, mpOperator, mpRightEdit, sc::ModelConstraint::nOperator, nScrollPos, weld::ComboBox::set_active(), and formula::RefEdit::SetRefString().
Referenced by Init().
|
private |
Definition at line 811 of file optsolver.cxx.
References Application::CreateMessageDialog(), formula::RefEdit::GrabFocus(), m_xDialog, maConditionError, maInputError, and mpEdActive.
Referenced by CallSolver().
|
staticprivate |
Definition at line 79 of file optsolver.hxx.
Referenced by EnableButtons(), Init(), ReadConditions(), and ShowConditions().
|
private |
Definition at line 71 of file optsolver.hxx.
Referenced by CallSolver(), EnableButtons(), LoadSolverSettings(), ReadConditions(), SaveSolverSettings(), and ShowConditions().
|
private |
Definition at line 144 of file optsolver.hxx.
Referenced by LoadSolverSettings(), and SaveSolverSettings().
|
private |
Definition at line 136 of file optsolver.hxx.
Referenced by Init().
|
private |
Definition at line 110 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 117 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 124 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 131 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 135 of file optsolver.hxx.
Referenced by Init().
|
private |
Definition at line 138 of file optsolver.hxx.
Referenced by Init().
|
private |
Definition at line 137 of file optsolver.hxx.
Referenced by Init().
|
private |
Definition at line 141 of file optsolver.hxx.
Referenced by Init().
|
private |
Definition at line 104 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 112 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 119 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 126 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 90 of file optsolver.hxx.
Referenced by CallSolver(), Init(), LoadSolverSettings(), SaveSolverSettings(), ScOptSolverDlg(), and SetReference().
|
private |
Definition at line 108 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 115 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 122 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 129 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 96 of file optsolver.hxx.
Referenced by CallSolver(), Init(), LoadSolverSettings(), SaveSolverSettings(), ScOptSolverDlg(), and SetReference().
|
private |
Definition at line 100 of file optsolver.hxx.
Referenced by CallSolver(), Init(), LoadSolverSettings(), SaveSolverSettings(), ScOptSolverDlg(), and SetReference().
|
private |
Definition at line 103 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 107 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 89 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 99 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 106 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 114 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 121 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 128 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 143 of file optsolver.hxx.
Referenced by Close().
|
private |
Definition at line 105 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 113 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 120 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 127 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 93 of file optsolver.hxx.
Referenced by CallSolver(), LoadSolverSettings(), and SaveSolverSettings().
|
private |
Definition at line 94 of file optsolver.hxx.
Referenced by LoadSolverSettings(), and SaveSolverSettings().
|
private |
Definition at line 91 of file optsolver.hxx.
Referenced by Init(), and ScOptSolverDlg().
|
private |
Definition at line 109 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 116 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 123 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 130 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 97 of file optsolver.hxx.
Referenced by Init(), and ScOptSolverDlg().
|
private |
Definition at line 95 of file optsolver.hxx.
Referenced by CallSolver(), Init(), LoadSolverSettings(), SaveSolverSettings(), and SetReference().
|
private |
Definition at line 101 of file optsolver.hxx.
Referenced by Init(), and ScOptSolverDlg().
|
private |
Definition at line 140 of file optsolver.hxx.
Referenced by ScOptSolverDlg().
|
private |
Definition at line 133 of file optsolver.hxx.
Referenced by Init(), and ShowConditions().
|
private |
Definition at line 64 of file optsolver.hxx.
Referenced by ShowError().
|
private |
Definition at line 75 of file optsolver.hxx.
Referenced by Init().
|
private |
Definition at line 76 of file optsolver.hxx.
Referenced by CallSolver(), FindTimeout(), LoadSolverSettings(), and SaveSolverSettings().
|
private |
Definition at line 74 of file optsolver.hxx.
Referenced by Init(), IsEngineAvailable(), and LoadSolverSettings().
|
private |
Definition at line 63 of file optsolver.hxx.
Referenced by ShowError().
|
private |
Definition at line 77 of file optsolver.hxx.
Referenced by CallSolver(), FindTimeout(), LoadSolverSettings(), and SaveSolverSettings().
|
private |
Definition at line 69 of file optsolver.hxx.
Referenced by SetActive().
|
private |
Definition at line 68 of file optsolver.hxx.
Referenced by ParseRef(), and SetReference().
|
private |
Definition at line 85 of file optsolver.hxx.
Referenced by EnableButtons(), Init(), and ScOptSolverDlg().
|
private |
Definition at line 66 of file optsolver.hxx.
Referenced by CallSolver().
|
private |
Definition at line 87 of file optsolver.hxx.
Referenced by Init(), IsRefInputMode(), SetActive(), SetReference(), and ShowError().
|
private |
Definition at line 81 of file optsolver.hxx.
Referenced by Init(), and ScOptSolverDlg().
|
private |
Definition at line 80 of file optsolver.hxx.
Referenced by Init(), ReadConditions(), ScOptSolverDlg(), and ShowConditions().
|
private |
Definition at line 84 of file optsolver.hxx.
Referenced by Init(), ReadConditions(), ScOptSolverDlg(), and ShowConditions().
|
private |
Definition at line 83 of file optsolver.hxx.
Referenced by Init(), and ScOptSolverDlg().
|
private |
Definition at line 82 of file optsolver.hxx.
Referenced by Init(), ReadConditions(), ScOptSolverDlg(), and ShowConditions().
|
private |
Definition at line 67 of file optsolver.hxx.
Referenced by CallSolver(), Init(), and ParseRef().
|
private |
Definition at line 72 of file optsolver.hxx.
Referenced by EnableButtons(), ReadConditions(), and ShowConditions().