cui/source/dialogs/hltpbase.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
New commits: commit 0c6ffd3bbf410aed3e69f39556aac8bb15923c0d Author: Maya Stephens <[email protected]> AuthorDate: Mon Aug 11 12:01:32 2025 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Tue Sep 9 15:51:49 2025 +0200 Select hyperlinkdialog insert mode automatically in lokit Change-Id: I61bd5993e68ca27b512fbefa7807386339063581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189883 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190562 Tested-by: Jenkins diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index a5c0125e8892..b4cf9c4bdf16 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -205,13 +205,12 @@ void SvxHyperlinkTabPageBase::HideMarkWnd() // Fill Dialogfields void SvxHyperlinkTabPageBase::FillStandardDlgFields ( const SvxHyperlinkItem* pHyperlinkItem ) { + // Form + OUString aStrFormText = CuiResId( RID_CUISTR_HYPERDLG_FROM_TEXT ); + OUString aStrFormButton = CuiResId( RID_CUISTR_HYPERDLG_FORM_BUTTON ); + if (!comphelper::LibreOfficeKit::isActive()) { - // Form - OUString aStrFormText = CuiResId( RID_CUISTR_HYPERDLG_FROM_TEXT ); - - OUString aStrFormButton = CuiResId( RID_CUISTR_HYPERDLG_FORM_BUTTON ); - if( pHyperlinkItem->GetInsertMode() & HLINK_HTMLMODE ) { mxLbForm->clear(); @@ -230,6 +229,12 @@ void SvxHyperlinkTabPageBase::FillStandardDlgFields ( const SvxHyperlinkItem* pH { mxLbForm->hide(); mxFormLabel->hide(); + + // Although not visible, give fields so that default value can be used + mxLbForm->clear(); + mxLbForm->append_text( aStrFormText ); + mxLbForm->append_text( aStrFormButton ); + mxLbForm->set_active( pHyperlinkItem->GetInsertMode() == HLINK_BUTTON ? 1 : 0 ); } // URL
