diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-23 10:38:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-24 11:55:01 +0200 |
commit | f8e06f7b77a6286d2c41bbc76f06a768c76cd87a (patch) | |
tree | 0aa5836b7dcdba477f0dfca47b24a5f9aa8bd952 /sfx2 | |
parent | b85ff98383942360901b8242cf77366782400426 (diff) |
weld AdvancedSettingsDialog
make run virtual and fold executes into it, so GenericUnoDialog
can call run on tabdialogs to do the right thing, and allows
Start_Impl to be private again
Change-Id: Ic457edfbdc7457f4c49d4e8ad679903f38ad9b42
Reviewed-on: https://gerrit.libreoffice.org/62227
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/passwd.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/printer.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 4 |
7 files changed, 19 insertions, 18 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 58ec3d6506d8..6bf964c8a98a 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -319,9 +319,9 @@ namespace { } - short execute() + virtual short run() override { - short nRet = m_xDialog->run(); + short nRet = GenericDialogController::run(); if (nRet == RET_OK) showDocument("LICENSE"); return nRet; @@ -336,9 +336,9 @@ namespace { } - short execute() + virtual short run() override { - short nRet = m_xDialog->run(); + short nRet = MessageDialogController::run(); if (nRet == RET_OK) { sfx2::SafeMode::putFlag(); @@ -574,7 +574,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SHOW_LICENSE: { LicenseDialog aDialog(rReq.GetFrameWeld()); - aDialog.execute(); + aDialog.run(); break; } @@ -1035,7 +1035,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SAFE_MODE: { SafeModeQueryDialog aDialog(rReq.GetFrameWeld()); - aDialog.execute(); + aDialog.run(); break; } diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 497deca9ccb7..ea859cad9a22 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -150,7 +150,7 @@ void SfxPasswordDialog::ShowMinLengthText(bool bShow) m_xMinLengthFT->show(bShow); } -short SfxPasswordDialog::execute() +short SfxPasswordDialog::run() { m_xUserFT->hide(); m_xUserED->hide(); @@ -188,7 +188,7 @@ short SfxPasswordDialog::execute() m_xConfirm2ED->show(); } - return m_xDialog->run(); + return GenericDialogController::run(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index d04d2166a686..19fecc8be22a 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -99,7 +99,7 @@ static bool lcl_GetPassword( aPasswdDlg.SetMinLen(1); if (bProtect) aPasswdDlg.ShowExtras( SfxShowExtras::CONFIRM ); - if (RET_OK == aPasswdDlg.execute() && !aPasswdDlg.GetPassword().isEmpty()) + if (RET_OK == aPasswdDlg.run() && !aPasswdDlg.GetPassword().isEmpty()) { rPassword = aPasswdDlg.GetPassword(); bRes = true; diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 37df9f36e67b..ae9a9cbfd0da 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -2161,10 +2161,10 @@ OString SfxTabDialogController::GetCurPageId() const return m_xTabCtrl->get_current_page_ident(); } -short SfxTabDialogController::execute() +short SfxTabDialogController::run() { Start_Impl(); - return m_xDialog->run(); + return SfxDialogController::run(); } bool SfxTabDialogController::runAsync(const std::shared_ptr<SfxTabDialogController>& rController, diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index d0f2a0df252c..a9efb2dbf696 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -216,7 +216,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void // ask for the password SfxPasswordDialog aPasswordDlg(m_pParent); aPasswordDlg.ShowExtras( SfxShowExtras::CONFIRM ); - short nRet = aPasswordDlg.execute(); + short nRet = aPasswordDlg.run(); if ( RET_OK == nRet ) { m_pItemSet->Put( SfxStringItem( SID_PASSWORD, aPasswordDlg.GetPassword() ) ); diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index cc96ee0e6c46..fcf370b1eae8 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -187,13 +187,14 @@ SfxPrintOptionsDialog::~SfxPrintOptionsDialog() pPage.disposeAndClear(); } -short SfxPrintOptionsDialog::execute() +short SfxPrintOptionsDialog::run() { - if( ! pPage ) + if (!pPage) return RET_CANCEL; - short nRet = m_xDialog->run(); - if ( nRet == RET_OK ) + short nRet = GenericDialogController::run(); + + if (nRet == RET_OK) pPage->FillItemSet( pOptions.get() ); else pPage->Reset( pOptions.get() ); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index da95bc54b9f3..3dd70f6d83e2 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -447,7 +447,7 @@ IMPL_LINK_NOARG(SfxDialogExecutor_Impl, Execute, weld::Button&, void) SfxPrintOptionsDialog aDlg(_rSetupParent.GetFrameWeld(), _pViewSh, _pOptions.get() ); if (_bHelpDisabled) aDlg.DisableHelp(); - if (aDlg.execute() == RET_OK) + if (aDlg.run() == RET_OK) { _pOptions = aDlg.GetOptions().Clone(); } @@ -834,7 +834,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) } aPrintSetupDlg.SetPrinter( pDlgPrinter ); - nDialogRet = aPrintSetupDlg.execute(); + nDialogRet = aPrintSetupDlg.run(); if ( pExecutor && pExecutor->GetOptions() ) { |