summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/cuihyperdlg.cxx
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2021-12-17 17:28:38 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-12-21 23:28:59 +0100
commit6fef768289f4dfa441a109282d253154a20a6123 (patch)
tree55e115eb626201d875a244ccf4211cf514a1659c /cui/source/dialogs/cuihyperdlg.cxx
parentbddf28af4a6fccb715fd29ad38fa100d2ac011a4 (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.cxx10
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 );
}
/*************************************************************************