diff options
author | Gabor Kelemen <kelemeng@ubuntu.com> | 2021-12-17 17:28:38 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-12-21 23:28:59 +0100 |
commit | 6fef768289f4dfa441a109282d253154a20a6123 (patch) | |
tree | 55e115eb626201d875a244ccf4211cf514a1659c /cui/source/dialogs/cuihyperdlg.cxx | |
parent | bddf28af4a6fccb715fd29ad38fa100d2ac011a4 (diff) |
tdf#109390 Warn about empty New Document only on Apply, not OK
Creating new document type hyperlink shows a warning about empty
file name only when pressing Apply, and closes silently on OK
Change-Id: I00e7b20a12df8e35e154e3cf532067cbad72c614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127010
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'cui/source/dialogs/cuihyperdlg.cxx')
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index e695ea331d34..3eef90cdf696 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -182,14 +182,16 @@ void SvxHpLinkDlg::Close() pViewFrame->ToggleChildWindow(SID_HYPERLINK_DIALOG); } -void SvxHpLinkDlg::Apply() +void SvxHpLinkDlg::Apply( bool bWarn ) { SfxItemSetFixed<SID_HYPERLINK_GETLINK, SID_HYPERLINK_SETLINK> aItemSet( SfxGetpApp()->GetPool() ); SvxHyperlinkTabPageBase* pCurrentPage = static_cast<SvxHyperlinkTabPageBase*>( GetTabPage( GetCurPageId() ) ); - if ( pCurrentPage->AskApply() ) + // tdf#109390: only show warning that the dialog was not filled properly + // if the user pressed Apply + if ( pCurrentPage->AskApply( bWarn ) ) { pCurrentPage->FillItemSet( &aItemSet ); @@ -205,7 +207,7 @@ void SvxHpLinkDlg::Apply() /// Click on OK button IMPL_LINK_NOARG(SvxHpLinkDlg, ClickOkHdl_Impl, weld::Button&, void) { - Apply(); + Apply( false ); m_xDialog->response(RET_OK); } @@ -216,7 +218,7 @@ IMPL_LINK_NOARG(SvxHpLinkDlg, ClickOkHdl_Impl, weld::Button&, void) |************************************************************************/ IMPL_LINK_NOARG(SvxHpLinkDlg, ClickApplyHdl_Impl, weld::Button&, void) { - Apply(); + Apply( true ); } /************************************************************************* |