diff options
-rw-r--r-- | sc/source/ui/inc/solveroptions.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/solveroptions.cxx | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx index d58244eb27aa..48c58a6e628f 100644 --- a/sc/source/ui/inc/solveroptions.hxx +++ b/sc/source/ui/inc/solveroptions.hxx @@ -103,6 +103,7 @@ public: void SetOptionName( const OUString& rName ); void SetValue( sal_Int32 nValue ); + void SetMax( sal_Int32 nValue ); sal_Int32 GetValue() const; }; diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index 5c20611954d3..daad9e3b4220 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -268,6 +268,8 @@ void ScSolverOptionsDialog::EditOption() { m_xIntDialog = std::make_shared<ScSolverIntegerDialog>(m_xDialog.get()); m_xIntDialog->SetOptionName( pStringItem->GetText() ); + if (maProperties[nEntry].Name == "EpsilonLevel") + m_xIntDialog->SetMax(3); m_xIntDialog->SetValue( pStringItem->GetIntValue() ); weld::DialogController::runAsync(m_xIntDialog, [nEntry, pStringItem, this](sal_Int32 nResult){ if (nResult == RET_OK) @@ -347,6 +349,11 @@ void ScSolverIntegerDialog::SetValue( sal_Int32 nValue ) m_xNfValue->set_value( nValue ); } +void ScSolverIntegerDialog::SetMax( sal_Int32 nMax ) +{ + m_xNfValue->set_range(0, nMax); +} + sal_Int32 ScSolverIntegerDialog::GetValue() const { return m_xNfValue->get_value(); |