29 #include <docfunc.hxx>
32 #include <unonames.hxx>
35 #include <globstr.hrc>
40 #include <com/sun/star/sheet/SolverConstraint.hpp>
41 #include <com/sun/star/sheet/SolverConstraintOperator.hpp>
42 #include <com/sun/star/sheet/XSolverDescription.hpp>
43 #include <com/sun/star/sheet/XSolver.hpp>
48 : GenericDialogController(pParent,
"modules/scalc/ui/solverprogressdialog.ui",
49 "SolverProgressDialog")
50 , m_xFtTime(m_xBuilder->weld_label(
"progress"))
66 OUString aNew = aOld.replaceFirst(
"#", OUString::number(nSeconds));
71 : GenericDialogController(pParent,
"modules/scalc/ui/nosolutiondialog.ui",
"NoSolutionDialog")
72 , m_xFtErrorText(m_xBuilder->weld_label(
"error"))
82 : GenericDialogController(pParent,
"modules/scalc/ui/solversuccessdialog.ui",
"SolverSuccessDialog")
83 , m_xFtResult(m_xBuilder->weld_label(
"result"))
84 , m_xBtnOk(m_xBuilder->weld_button(
"ok"))
85 , m_xBtnCancel(m_xBuilder->weld_button(
"cancel"))
89 OUString aMessage =
m_xFtResult->get_label() +
" " + rSolution;
99 if (&rBtn == m_xBtnOk.get())
126 maCursorUpLink.Call( *
this );
128 maCursorDownLink.Call( *
this );
135 const OUString& rTarget,
const OUString& rVariable,
136 std::vector<ScOptConditionRow>&& rConditions,
137 const OUString& rEngine,
138 const uno::Sequence<beans::PropertyValue>& rProperties ) :
139 maObjective( rObjective ),
144 maVariable( rVariable ),
145 maConditions(
std::move(rConditions) ),
154 , maInputError(
ScResId(STR_INVALIDINPUT))
155 , maConditionError(
ScResId(STR_INVALIDCONDITION))
158 , mrDoc(pDocSh->GetDocument())
159 , mnCurTab(aCursorPos.
Tab())
160 , mbDlgLostFocus(
false)
162 , mpEdActive(nullptr)
163 , m_xFtObjectiveCell(m_xBuilder->weld_label(
"targetlabel"))
164 , m_xEdObjectiveCell(new
formula::RefEdit(m_xBuilder->weld_entry(
"targetedit")))
165 , m_xRBObjectiveCell(new
formula::RefButton(m_xBuilder->weld_button(
"targetbutton")))
166 , m_xRbMax(m_xBuilder->weld_radio_button(
"max"))
167 , m_xRbMin(m_xBuilder->weld_radio_button(
"min"))
168 , m_xRbValue(m_xBuilder->weld_radio_button(
"value"))
169 , m_xEdTargetValue(new
formula::RefEdit(m_xBuilder->weld_entry(
"valueedit")))
170 , m_xRBTargetValue(new
formula::RefButton(m_xBuilder->weld_button(
"valuebutton")))
171 , m_xFtVariableCells(m_xBuilder->weld_label(
"changelabel"))
172 , m_xEdVariableCells(new
formula::RefEdit(m_xBuilder->weld_entry(
"changeedit")))
173 , m_xRBVariableCells(new
formula::RefButton(m_xBuilder->weld_button(
"changebutton")))
174 , m_xFtCellRef(m_xBuilder->weld_label(
"cellreflabel"))
176 , m_xRBLeft1(new
formula::RefButton(m_xBuilder->weld_button(
"ref1button")))
177 , m_xFtOperator(m_xBuilder->weld_label(
"oplabel"))
178 , m_xLbOp1(m_xBuilder->weld_combo_box(
"op1list"))
179 , m_xFtConstraint(m_xBuilder->weld_label(
"constraintlabel"))
181 , m_xRBRight1(new
formula::RefButton(m_xBuilder->weld_button(
"val1button")))
182 , m_xBtnDel1(m_xBuilder->weld_button(
"del1"))
184 , m_xRBLeft2(new
formula::RefButton(m_xBuilder->weld_button(
"ref2button")))
185 , m_xLbOp2(m_xBuilder->weld_combo_box(
"op2list"))
187 , m_xRBRight2(new
formula::RefButton(m_xBuilder->weld_button(
"val2button")))
188 , m_xBtnDel2(m_xBuilder->weld_button(
"del2"))
190 , m_xRBLeft3(new
formula::RefButton(m_xBuilder->weld_button(
"ref3button")))
191 , m_xLbOp3(m_xBuilder->weld_combo_box(
"op3list"))
193 , m_xRBRight3(new
formula::RefButton(m_xBuilder->weld_button(
"val3button")))
194 , m_xBtnDel3(m_xBuilder->weld_button(
"del3"))
196 , m_xRBLeft4(new
formula::RefButton(m_xBuilder->weld_button(
"ref4button")))
197 , m_xLbOp4(m_xBuilder->weld_combo_box(
"op4list"))
199 , m_xRBRight4(new
formula::RefButton(m_xBuilder->weld_button(
"val4button")))
200 , m_xBtnDel4(m_xBuilder->weld_button(
"del4"))
201 , m_xScrollBar(m_xBuilder->weld_scrolled_window(
"scrollbar", true))
202 , m_xBtnOpt(m_xBuilder->weld_button(
"options"))
203 , m_xBtnClose(m_xBuilder->weld_button(
"close"))
204 , m_xBtnSolve(m_xBuilder->weld_button(
"ok"))
205 , m_xBtnResetAll(m_xBuilder->weld_button(
"resetall"))
206 , m_xResultFT(m_xBuilder->weld_label(
"result"))
207 , m_xContents(m_xBuilder->weld_widget(
"grid"))
272 pButton->set_image(xDelNm);
329 m_xContents->set_size_request(aSize.Width(), aSize.Height());
332 m_xScrollBar->vadjustment_set_page_increment( EDIT_ROW_COUNT );
333 m_xScrollBar->vadjustment_set_page_size( EDIT_ROW_COUNT );
361 if ( bImplHasElements )
383 if ( nVecPos < static_cast<tools::Long>(
maConditions.size()) )
388 while ( nSize > 0 &&
maConditions[ nSize-1 ].IsDefault() )
401 if ( nVecPos < static_cast<tools::Long>(
maConditions.size()) )
413 EDIT_ROW_COUNT - 1, EDIT_ROW_COUNT);
432 DoClose( ScOptSolverDlgWrapper::GetChildWindowId() );
485 aVal = aVal.replaceAt( aSel.
Min(), aSel.
Len(), aStr );
510 auto xKeepAlive = shared_from_this();
511 if (&rBtn == m_xBtnSolve.get() || &rBtn == m_xBtnClose.get())
513 bool bSolve = ( &rBtn == m_xBtnSolve.get() );
515 SetDispatcherLock(
false );
520 bClose = CallSolver();
527 m_xEdObjectiveCell->GetText(), m_xRbMax->get_active(), m_xRbMin->get_active(), m_xRbValue->get_active(),
528 m_xEdTargetValue->GetText(), m_xEdVariableCells->GetText(), std::vector(maConditions), maEngine,
maProperties ) );
529 mpDocShell->SetSolverSaveData( std::move(pSave) );
535 SetDispatcherLock(
true );
538 else if (&rBtn == m_xBtnOpt.get())
541 m_xOptDlg = std::make_shared<ScSolverOptionsDialog>(
m_xDialog.get(), maImplNames, maDescriptions, maEngine,
maProperties);
545 maEngine = m_xOptDlg->GetEngine();
551 else if (&rBtn == m_xBtnResetAll.get())
554 m_xEdObjectiveCell->SetText(sEmpty);
555 m_xEdTargetValue->SetText(sEmpty);
556 m_xEdVariableCells->SetText(sEmpty);
559 maEngine = maImplNames[0];
563 maConditions.clear();
565 sEmpty,
true,
false,
false,
566 sEmpty, sEmpty, std::vector(maConditions), maEngine,
maProperties ) );
567 mpDocShell->SetSolverSaveData( std::move(pEmpty) );
570 m_xRbMax->set_active(
true);
571 m_xEdObjectiveCell->GrabFocus();
572 mpEdActive = m_xEdObjectiveCell.get();
579 mpEdActive =
nullptr;
581 if( &rCtrl == m_xEdObjectiveCell.get() )
582 pEdit = mpEdActive = m_xEdObjectiveCell.get();
583 else if( &rCtrl == m_xEdTargetValue.get() )
584 pEdit = mpEdActive = m_xEdTargetValue.get();
585 else if( &rCtrl == m_xEdVariableCells.get() )
586 pEdit = mpEdActive = m_xEdVariableCells.get();
587 for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
589 if( &rCtrl == mpLeftEdit[nRow] )
590 pEdit = mpEdActive = mpLeftEdit[nRow];
591 else if( &rCtrl == mpRightEdit[nRow] )
592 pEdit = mpEdActive = mpRightEdit[nRow];
602 mpEdActive =
nullptr;
604 if( &rCtrl == m_xRBObjectiveCell.get() )
605 pEdit = mpEdActive = m_xEdObjectiveCell.get();
606 else if( &rCtrl == m_xRBTargetValue.get() )
607 pEdit = mpEdActive = m_xEdTargetValue.get();
608 else if( &rCtrl == m_xRBVariableCells.get() )
609 pEdit = mpEdActive = m_xEdVariableCells.get();
610 for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
612 if( &rCtrl == mpLeftButton[nRow] )
613 pEdit = mpEdActive = mpLeftEdit[nRow];
614 else if( &rCtrl == mpRightButton[nRow] )
615 pEdit = mpEdActive = mpRightEdit[nRow];
625 if( &rCtrl == m_xRbValue.get() )
626 mpEdActive = m_xEdTargetValue.get();
629 for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
631 if( &rCtrl == mpOperator[nRow] )
632 mpEdActive = mpRightEdit[nRow];
639 mbDlgLostFocus = !
m_xDialog->has_toplevel_focus();
644 mbDlgLostFocus = !
m_xDialog->has_toplevel_focus();
649 for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
650 if (&rBtn == mpDelButton[nRow])
652 bool bHadFocus = rBtn.has_focus();
656 if ( nVecPos < static_cast<tools::Long>(maConditions.size()) )
658 maConditions.erase( maConditions.begin() + nVecPos );
661 if ( bHadFocus && !rBtn.get_sensitive() )
666 mpEdActive = mpLeftEdit[nRow];
667 mpEdActive->GrabFocus();
677 if ( !m_xEdTargetValue->GetText().isEmpty() )
678 m_xRbValue->set_active(
true);
698 nScrollPos = m_xScrollBar->vadjustment_get_value();
701 mpEdActive->SelectAll();
706 if ( &
rEdit == mpLeftEdit[0] || &
rEdit == mpRightEdit[0] )
708 if ( nScrollPos > 0 )
714 mpEdActive->SelectAll();
720 for ( sal_uInt16 nRow = 1; nRow < EDIT_ROW_COUNT; ++nRow )
722 if ( &
rEdit == mpLeftEdit[nRow] )
723 pFocus = mpLeftEdit[nRow-1];
724 else if ( &
rEdit == mpRightEdit[nRow] )
725 pFocus = mpRightEdit[nRow-1];
737 if ( &
rEdit == mpLeftEdit[EDIT_ROW_COUNT-1] || &
rEdit == mpRightEdit[EDIT_ROW_COUNT-1] )
744 mpEdActive->SelectAll();
749 for ( sal_uInt16 nRow = 0; nRow+1 < EDIT_ROW_COUNT; ++nRow )
751 if ( &
rEdit == mpLeftEdit[nRow] )
752 pFocus = mpLeftEdit[nRow+1];
753 else if ( &
rEdit == mpRightEdit[nRow] )
754 pFocus = mpRightEdit[nRow+1];
768 VclMessageType::Warning, VclButtonsType::Ok,
788 return ( bAllowRange || rRange.
aStart == rRange.
aEnd );
791 return ( bAllowRange || rRange.
aStart == rRange.
aEnd );
804 for (sal_Int32 nProp=0; nProp<nPropCount && !bFound; ++nProp)
806 const beans::PropertyValue& rValue =
maProperties[nProp];
808 bFound = ( rValue.Value >>= rTimeout );
817 auto xProgress = std::make_shared<ScSolverProgressDialog>(
m_xDialog.get());
818 sal_Int32 nTimeout = 0;
820 xProgress->SetTimeLimit( nTimeout );
822 xProgress->HideTimeLimit();
833 uno::Reference<sheet::XSpreadsheetDocument> xDocument(
mpDocShell->
GetModel(), uno::UNO_QUERY );
841 table::CellAddress aObjective( aObjRange.aStart.Tab(), aObjRange.aStart.Col(), aObjRange.aStart.Row() );
850 uno::Sequence<table::CellAddress> aVariables;
851 sal_Int32 nVarPos = 0;
853 for (
size_t nRangePos=0, nRange = aVarRanges.size(); nRangePos < nRange; ++nRangePos )
855 ScRange aRange( aVarRanges[ nRangePos ] );
863 aVariables.realloc( nVarPos + nAdd );
864 auto pVariables = aVariables.getArray();
868 pVariables[nVarPos++] = table::CellAddress( nTab, nCol, nRow );
871 uno::Sequence<sheet::SolverConstraint> aConstraints;
872 sal_Int32 nConstrPos = 0;
875 if ( !rConstr.aLeftStr.isEmpty() )
877 sheet::SolverConstraint aConstraint;
879 aConstraint.Operator =
static_cast<sheet::SolverConstraintOperator
>(rConstr.nOperator);
882 if ( !
ParseRef( aLeftRange, rConstr.aLeftStr,
true ) )
888 bool bIsRange =
false;
890 if (
ParseRef( aRightRange, rConstr.aRightStr,
true ) )
893 aConstraint.Right <<= table::CellAddress( aRightRange.
aStart.
Tab(),
906 sal_uInt32 nFormat = 0;
909 aConstraint.Right <<= fValue;
910 else if ( aConstraint.Operator != sheet::SolverConstraintOperator_INTEGER &&
911 aConstraint.Operator != sheet::SolverConstraintOperator_BINARY )
922 aConstraints.realloc( nConstrPos + nAdd );
923 auto pConstraints = aConstraints.getArray();
928 aConstraint.Left = table::CellAddress( aLeftRange.
aStart.
Tab(), nCol, nRow );
930 aConstraint.Right <<= table::CellAddress( aRightRange.
aStart.
Tab(),
934 pConstraints[nConstrPos++] = aConstraint;
939 bool bMaximize =
m_xRbMax->get_active();
944 sheet::SolverConstraint aConstraint;
945 aConstraint.Left = aObjective;
946 aConstraint.Operator = sheet::SolverConstraintOperator_EQUAL;
950 if (
ParseRef( aRightRange, aValStr,
false ) )
951 aConstraint.Right <<= table::CellAddress( aRightRange.
aStart.
Tab(),
955 sal_uInt32 nFormat = 0;
958 aConstraint.Right <<= fValue;
966 aConstraints.realloc( nConstrPos + 1 );
967 aConstraints.getArray()[nConstrPos++] = aConstraint;
972 sal_Int32 nVarCount = aVariables.getLength();
973 uno::Sequence<double> aOldValues( nVarCount );
974 std::transform(std::cbegin(aVariables), std::cend(aVariables), aOldValues.getArray(),
975 [
this](
const table::CellAddress& rVariable) ->
double {
978 return mrDoc.GetValue( aCellPos );
984 OSL_ENSURE( xSolver.is(),
"can't get solver component" );
988 xSolver->setDocument( xDocument );
989 xSolver->setObjective( aObjective );
990 xSolver->setVariables( aVariables );
991 xSolver->setConstraints( aConstraints );
992 xSolver->setMaximize( bMaximize );
995 uno::Reference<beans::XPropertySet> xOptProp(xSolver, uno::UNO_QUERY);
998 for (
const beans::PropertyValue& rValue : std::as_const(maProperties))
1002 xOptProp->setPropertyValue( rValue.Name, rValue.Value );
1004 catch ( uno::Exception & )
1006 OSL_FAIL(
"Exception in solver option property");
1012 bool bSuccess = xSolver->getSuccess();
1014 xProgress->response(RET_CLOSE);
1016 bool bClose =
false;
1017 bool bRestore =
true;
1021 uno::Sequence<double> aSolution = xSolver->getSolution();
1022 if ( aSolution.getLength() == nVarCount )
1024 mpDocShell->LockPaint();
1025 ScDocFunc &rFunc = mpDocShell->GetDocFunc();
1026 for (nVarPos=0; nVarPos<nVarCount; ++nVarPos)
1030 rFunc.
SetValueCell(aCellPos, aSolution[nVarPos],
false);
1032 mpDocShell->UnlockPaint();
1037 OUString aResultStr = mrDoc.GetString(
1038 static_cast<SCCOL>(aObjective.Column), static_cast<SCROW>(aObjective.Row),
1039 static_cast<SCTAB>(aObjective.Sheet));
1042 if (aDialog.run() ==
RET_OK)
1052 uno::Reference<sheet::XSolverDescription> xDesc( xSolver, uno::UNO_QUERY );
1054 aError = xDesc->getStatusDescription();
1061 mpDocShell->LockPaint();
1062 ScDocFunc &rFunc = mpDocShell->GetDocFunc();
1063 for (nVarPos=0; nVarPos<nVarCount; ++nVarPos)
1067 rFunc.
SetValueCell(aCellPos, std::as_const(aOldValues)[nVarPos],
false);
1069 mpDocShell->UnlockPaint();
ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
#define LINK(Instance, Class, Member)
std::unique_ptr< formula::RefButton > m_xRBRight1
std::unique_ptr< formula::RefEdit > m_xEdVariableCells
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
void SetTimeLimit(sal_Int32 nSeconds)
std::unique_ptr< weld::Label > m_xResultFT
OUString ScResId(TranslateId aId)
std::unique_ptr< weld::Label > m_xFtErrorText
virtual void SetActive() override
std::unique_ptr< formula::RefButton > m_xRBRight4
static bool MakeRangeFromName(const OUString &rName, const ScDocument &rDoc, SCTAB nCurTab, ScRange &rRange, RutlNameScope eScope=RUTL_NAMES, ScAddress::Details const &rDetails=ScAddress::detailsOOOa1, bool bUseDetailsPos=false)
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
static const sal_uInt16 EDIT_ROW_COUNT
formula::RefButton * mpRightButton[EDIT_ROW_COUNT]
ScCursorRefEdit(std::unique_ptr< weld::Entry > xEntry)
std::unique_ptr< weld::ScrolledWindow > m_xScrollBar
std::unique_ptr< ScCursorRefEdit > m_xEdLeft3
IMPL_LINK_NOARG(ScOptSolverDlg, LoseEditFocusHdl, formula::RefEdit &, void)
std::unique_ptr< formula::RefButton > m_xRBLeft2
std::unique_ptr< formula::RefButton > m_xRBLeft1
const OUString & GetObjective() const
virtual ~ScSolverSuccessDialog() override
virtual ~ScOptSolverDlg() override
Reference< XFrame > xFrame
css::uno::Reference< css::frame::XFrame > GetActiveFrame() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
const std::vector< ScOptConditionRow > & GetConditions() const
css::uno::Sequence< OUString > maImplNames
ScOptSolverSave(const OUString &rObjective, bool bMax, bool bMin, bool bValue, const OUString &rTarget, const OUString &rVariable, std::vector< ScOptConditionRow > &&rConditions, const OUString &rEngine, const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
std::unique_ptr< weld::ComboBox > m_xLbOp2
std::unique_ptr< weld::Label > m_xFtObjectiveCell
sal_uInt16 GetCode() const
Link< ScCursorRefEdit &, void > maCursorUpLink
Link< ScCursorRefEdit &, void > maCursorDownLink
IMPL_LINK(ScSolverSuccessDialog, ClickHdl, weld::Button &, rBtn, void)
std::unique_ptr< formula::RefButton > m_xRBVariableCells
virtual int get_active() const =0
std::unique_ptr< weld::RadioButton > m_xRbMin
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
std::unique_ptr< ScCursorRefEdit > m_xEdLeft2
constexpr sal_uInt16 KEY_UP
std::unique_ptr< weld::Button > m_xBtnOpt
std::unique_ptr< formula::RefEdit > m_xEdObjectiveCell
virtual bool IsRefInputMode() const override
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
std::unique_ptr< formula::RefButton > m_xRBLeft4
std::unique_ptr< ScCursorRefEdit > m_xEdRight4
ScCursorRefEdit * mpRightEdit[EDIT_ROW_COUNT]
css::uno::Sequence< OUString > maDescriptions
std::unique_ptr< weld::Button > m_xBtnSolve
static css::uno::Sequence< css::beans::PropertyValue > GetDefaults(std::u16string_view rImplName)
static void GetImplementations(css::uno::Sequence< OUString > &rImplNames, css::uno::Sequence< OUString > &rDescriptions)
SvGenericNameContainerMapImpl maProperties
void ShowError(bool bCondition, formula::RefEdit *pFocus)
std::unique_ptr< ScCursorRefEdit > m_xEdLeft1
void Init(const ScAddress &rCursorPos)
std::unique_ptr< weld::ComboBox > m_xLbOp4
css::uno::Sequence< css::beans::PropertyValue > maProperties
std::vector< ScOptConditionRow > maConditions
constexpr sal_uInt16 KEY_DOWN
bool SetValueCell(const ScAddress &rPos, double fVal, bool bInteraction)
std::unique_ptr< weld::RadioButton > m_xRbMax
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
std::unique_ptr< formula::RefEdit > m_xEdTargetValue
static bool Reschedule(bool bHandleAllCurrentEvents=false)
std::unique_ptr< weld::Widget > m_xContents
std::unique_ptr< weld::Button > m_xBtnDel1
void connect_changed(const Link< ComboBox &, void > &rLink)
The dialog's content for a row, not yet parsed.
#define SC_UNONAME_TIMEOUT
std::unique_ptr< ScCursorRefEdit > m_xEdRight3
Reference< graphic::XGraphic > GetXGraphicForCommand(const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame, vcl::ImageType eImageType)
std::unique_ptr< weld::Button > m_xBtnClose
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
void SetCursorLinks(const Link< ScCursorRefEdit &, void > &rUp, const Link< ScCursorRefEdit &, void > &rDown)
ScCursorRefEdit * mpLeftEdit[EDIT_ROW_COUNT]
const OUString & GetTarget() const
virtual void RefInputDone(bool bForced=false) override
ScSolverNoSolutionDialog(weld::Window *pParent, const OUString &rErrorText)
const OUString & GetEngine() const
std::unique_ptr< weld::Label > m_xFtTime
virtual void set_active(int pos)=0
ScSolverSuccessDialog(weld::Window *pParent, std::u16string_view rSolution)
std::unique_ptr< weld::Button > m_xBtnResetAll
std::unique_ptr< formula::RefButton > m_xRBTargetValue
static void FillScAddress(ScAddress &rScAddress, const css::table::CellAddress &rApiAddress)
std::unique_ptr< weld::ComboBox > m_xLbOp3
std::unique_ptr< weld::RadioButton > m_xRbValue
std::unique_ptr< weld::Label > m_xFtCellRef
std::unique_ptr< formula::RefButton > m_xRBRight3
ScOptSolverDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScDocShell *pDocSh, const ScAddress &aCursorPos)
std::unique_ptr< weld::ComboBox > m_xLbOp1
std::unique_ptr< weld::Button > m_xBtnDel2
bool FindTimeout(sal_Int32 &rTimeout)
SfxBindings & GetBindings() const
std::unique_ptr< weld::Label > m_xFtConstraint
const ScOptSolverSave * GetSolverSaveData() const
const OUString & GetVariable() const
std::unique_ptr< formula::RefButton > m_xRBRight2
All settings from the dialog, saved with the DocShell for the next call.
weld::ComboBox * mpOperator[EDIT_ROW_COUNT]
virtual ~ScSolverProgressDialog() override
ScSolverProgressDialog(weld::Window *pParent)
if(aStr!=aBuf) UpdateName_Impl(m_xFollowLb.get()
std::unique_ptr< weld::Label > m_xFtVariableCells
Reference< XExecutableDialog > m_xDialog
weld::Button * mpDelButton[EDIT_ROW_COUNT]
OUString maConditionError
virtual void Close() override
formula::RefEdit * mpEdActive
std::shared_ptr< ScSolverOptionsDialog > m_xOptDlg
std::unique_ptr< ScCursorRefEdit > m_xEdRight1
std::unique_ptr< weld::Button > m_xBtnDel4
SC_DLLPUBLIC const ScRangeData * GetRangeAtBlock(const ScRange &rBlock, OUString &rName, bool *pSheetLocal=nullptr) const
std::unique_ptr< formula::RefButton > m_xRBLeft3
bool ParseWithNames(ScRangeList &rRanges, std::u16string_view rStr, const ScDocument &pDoc)
std::unique_ptr< ScCursorRefEdit > m_xEdLeft4
bool DoClose(sal_uInt16 nId)
bool ParseRef(ScRange &rRange, const OUString &rInput, bool bAllowRange)
const css::uno::Sequence< css::beans::PropertyValue > & GetProperties() const
std::unique_ptr< ScCursorRefEdit > m_xEdRight2
virtual ~ScSolverNoSolutionDialog() override
std::unique_ptr< weld::Button > m_xBtnCancel
std::unique_ptr< formula::RefButton > m_xRBObjectiveCell
std::unique_ptr< weld::Button > m_xBtnOk
static css::uno::Reference< css::sheet::XSolver > GetSolver(std::u16string_view rImplName)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
std::unique_ptr< weld::Label > m_xFtResult
formula::RefButton * mpLeftButton[EDIT_ROW_COUNT]
bool m_bDetectedRangeSegmentation false
std::unique_ptr< weld::Button > m_xBtnDel3