diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-15 09:14:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-15 13:45:20 +0200 |
commit | 9aff7f3c491da9e3016e5a3cb9737f8bb7c3d0d9 (patch) | |
tree | bed8eb41dbbc07099e1c3be7354493e4d5fc99e0 /sc/source/ui/miscdlgs | |
parent | 932c96e158517bc1369d78e8180da4c04c214cff (diff) |
weld ScSolverNoSolutionDialog
Change-Id: I403e39e0f5cd642c5996a49f50cc7ee7bbdfbd02
Reviewed-on: https://gerrit.libreoffice.org/54354
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/miscdlgs')
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 96eaf1fd8ccb..d3cfa487eb42 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -77,22 +77,15 @@ void ScSolverProgressDialog::SetTimeLimit( sal_Int32 nSeconds ) m_pFtTime->SetText( aNew ); } -ScSolverNoSolutionDialog::ScSolverNoSolutionDialog( vcl::Window* pParent, const OUString& rErrorText ) - : ModalDialog(pParent, "NoSolutionDialog", "modules/scalc/ui/nosolutiondialog.ui") +ScSolverNoSolutionDialog::ScSolverNoSolutionDialog(weld::Window* pParent, const OUString& rErrorText) + : GenericDialogController(pParent, "modules/scalc/ui/nosolutiondialog.ui", "NoSolutionDialog") + , m_xFtErrorText(m_xBuilder->weld_label("error")) { - get(m_pFtErrorText, "error"); - m_pFtErrorText->SetText(rErrorText); + m_xFtErrorText->set_label(rErrorText); } ScSolverNoSolutionDialog::~ScSolverNoSolutionDialog() { - disposeOnce(); -} - -void ScSolverNoSolutionDialog::dispose() -{ - m_pFtErrorText.clear(); - ModalDialog::dispose(); } ScSolverSuccessDialog::ScSolverSuccessDialog(weld::Window* pParent, const OUString& rSolution) @@ -1059,8 +1052,8 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal uno::Reference<sheet::XSolverDescription> xDesc( xSolver, uno::UNO_QUERY ); if ( xDesc.is() ) aError = xDesc->getStatusDescription(); // error description from component - ScopedVclPtrInstance< ScSolverNoSolutionDialog > aDialog( this, aError ); - aDialog->Execute(); + ScSolverNoSolutionDialog aDialog(GetFrameWeld(), aError); + aDialog.run(); } if ( bRestore ) // restore old values |