diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-29 21:22:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-29 23:22:45 +0000 |
commit | eb91348f8dee9ca6f46050a7170ff2bb39c13146 (patch) | |
tree | 5f6e1032c4065bfcf500c161b5883aed3f9b55a9 /sc/source/ui/miscdlgs/optsolver.cxx | |
parent | 5825567cbaf516037906770ef73bf87f076c5d80 (diff) |
convert solver success dialog to .ui
Change-Id: Ia9062a21afde96510a4953d1b51e7e59e9012fb7
Diffstat (limited to 'sc/source/ui/miscdlgs/optsolver.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index d0020e2c7110..7648ac2bd4a2 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -88,21 +88,24 @@ ScSolverNoSolutionDialog::ScSolverNoSolutionDialog( Window* pParent, const OUStr //---------------------------------------------------------------------------- ScSolverSuccessDialog::ScSolverSuccessDialog( Window* pParent, const OUString& rSolution ) - : ModalDialog( pParent, ScResId( RID_SCDLG_SOLVER_SUCCESS ) ), - maFtSuccess ( this, ScResId( FT_SUCCESS ) ), - maFtResult ( this, ScResId( FT_RESULT ) ), - maFtQuestion ( this, ScResId( FT_QUESTION ) ), - maFlButtons ( this, ScResId( FL_BUTTONS ) ), - maBtnOk ( this, ScResId( BTN_OK ) ), - maBtnCancel ( this, ScResId( BTN_CANCEL ) ) + : ModalDialog(pParent, "SolverSuccessDialog", "modules/scalc/ui/solversuccessdialog.ui") { - OUString aMessage = maFtResult.GetText() + " " + rSolution; - maFtResult.SetText( aMessage ); - FreeResource(); + get(m_pFtResult, "result"); + get(m_pBtnOk, "ok"); + m_pBtnOk->SetClickHdl(LINK(this, ScSolverSuccessDialog, ClickHdl)); + get(m_pBtnCancel, "cancel"); + m_pBtnCancel->SetClickHdl(LINK(this, ScSolverSuccessDialog, ClickHdl)); + OUString aMessage = m_pFtResult->GetText() + " " + rSolution; + m_pFtResult->SetText(aMessage); } -ScSolverSuccessDialog::~ScSolverSuccessDialog() +IMPL_LINK( ScSolverSuccessDialog, ClickHdl, PushButton*, pBtn ) { + if (pBtn == m_pBtnOk) + EndDialog(true); + else + EndDialog(false); + return 0; } //---------------------------------------------------------------------------- |