diff options
-rw-r--r-- | cui/source/dialogs/cuihyperdlg.cxx | 14 | ||||
-rw-r--r-- | cui/source/inc/cuihyperdlg.hxx | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 9ca722680a15..dd184e16a732 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -140,6 +140,7 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld: // Init Dialog Start(); + GetBindings().Update(SID_HYPERLINK_GETLINK); GetBindings().Update(SID_READONLY_MODE); m_xResetBtn->connect_clicked( LINK( this, SvxHpLinkDlg, ResetHdl ) ); @@ -163,6 +164,14 @@ SvxHpLinkDlg::~SvxHpLinkDlg() pOutSet.reset(); } +void SvxHpLinkDlg::Activate() { + if (mbGrabFocus) { + static_cast<SvxHyperlinkTabPageBase *>(GetTabPage(GetCurPageId()))->SetInitFocus(); + mbGrabFocus = false; + } + SfxModelessDialogController::Activate(); +} + void SvxHpLinkDlg::Close() { if (IsClosing()) @@ -259,11 +268,6 @@ void SvxHpLinkDlg::SetPage ( SvxHyperlinkItem const * pItem ) aPageSet.Put ( *pItem ); pCurrentPage->Reset( aPageSet ); - if ( mbGrabFocus ) - { - pCurrentPage->SetInitFocus(); // #92535# grab the focus only once at initialization - mbGrabFocus = false; - } } } diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx index 702cf6396304..70d28c820f1d 100644 --- a/cui/source/inc/cuihyperdlg.hxx +++ b/cui/source/inc/cuihyperdlg.hxx @@ -104,6 +104,7 @@ private: void DeActivatePageImpl (); void ResetPageImpl (); + void Activate() override; virtual void Close() override; void Apply(); |