cui/source/dialogs/cuihyperdlg.cxx |    5 ++---
 cui/source/dialogs/hldoctp.cxx     |   14 +++++++++++++-
 include/svtools/inettbc.hxx        |    1 +
 vcl/jsdialog/enabled.cxx           |    1 +
 4 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit d7d9253739fd1e78b91462dd253e400fd0707646
Author:     Maya Stephens <[email protected]>
AuthorDate: Fri Sep 12 14:04:57 2025 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Mon Sep 15 20:54:58 2025 +0200

    Add hyperlink dialog document tab to online
    
    We hide a lot more than on other tabs. The main idea is to allow
    bookmarks to be linked to, but this does add other behaviour.
    For example, linking to a shape using 'Shape 1|drawingobject' to
    link to a shape. When I tested this in online, this behaviour was
    very inconsistant and slow, although this could be related to
    document size.
    
    Change-Id: I6a6a696443a677cc54aa4a62594b4b6c6aa4d114
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190895
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 5d24fdffdf2246042732fb3bfe3e6d779abbcb85)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190990
    Tested-by: Jenkins

diff --git a/cui/source/dialogs/cuihyperdlg.cxx 
b/cui/source/dialogs/cuihyperdlg.cxx
index 005361c829bc..aae5973ec585 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -131,11 +131,10 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, 
SfxChildWindow* pChild, weld:
 
     AddTabPage(u"internet"_ustr, SvxHyperlinkInternetTp::Create);
     AddTabPage(u"mail"_ustr, SvxHyperlinkMailTp::Create);
+    AddTabPage(u"document"_ustr, SvxHyperlinkDocTp::Create);
+
     if (!comphelper::LibreOfficeKit::isActive())
-    {
-        AddTabPage(u"document"_ustr, SvxHyperlinkDocTp::Create);
         AddTabPage(u"newdocument"_ustr, SvxHyperlinkNewDocTp::Create);
-    }
 
     GetBindings().Update(SID_HYPERLINK_GETLINK);
     GetBindings().Update(SID_READONLY_MODE);
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 707445c7c965..cc3e3090eeff 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -46,7 +46,19 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp(weld::Container* 
pParent, SvxHpLinkDlg* pDl
 
     InitStdControls();
 
-    m_xCbbPath->show();
+    if (comphelper::LibreOfficeKit::isActive()) {
+        xBuilder->weld_label(u"label3"_ustr)->hide();
+
+        m_xBtFileopen->hide();
+        xBuilder->weld_label(u"path_label"_ustr)->hide();
+        m_xCbbPath->hide();
+
+        xBuilder->weld_label(u"url_label"_ustr)->hide();
+        m_xFtFullURL->hide();
+    } else {
+        m_xCbbPath->show();
+    }
+
     m_xCbbPath->SetBaseURL(INET_FILE_SCHEME);
 
     SetExchangeSupport();
diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx
index a4dcb5836228..76f37baeb94f 100644
--- a/include/svtools/inettbc.hxx
+++ b/include/svtools/inettbc.hxx
@@ -64,6 +64,7 @@ public:
 
     void                set_entry_text(const OUString& rStr) { 
m_xWidget->set_entry_text(rStr); }
     void                show() { m_xWidget->show(); }
+    void                hide() { m_xWidget->hide(); }
     void                clear() { m_xWidget->clear(); }
     void                connect_entry_activate(const Link<weld::ComboBox&, 
bool>& rLink) { m_xWidget->connect_entry_activate(rLink); }
     void                connect_key_press(const Link<const KeyEvent&, bool>& 
rLink) { m_xWidget->connect_key_press(rLink); }
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 386dee0dffbc..ca5b23711c44 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -69,6 +69,7 @@ constexpr auto CuiDialogList
         { u"cui/ui/hyperlinkdialog.ui" },
         { u"cui/ui/hyperlinkinternetpage.ui" },
         { u"cui/ui/hyperlinkmailpage.ui" },
+        { u"cui/ui/hyperlinkdocpage.ui" },
         { u"cui/ui/imagetabpage.ui" },
         { u"cui/ui/linedialog.ui" },
         { u"cui/ui/lineendstabpage.ui" },

Reply via email to