cui/source/dialogs/cuihyperdlg.cxx |   15 +++------------
 cui/source/dialogs/hltpbase.cxx    |   24 ++++++++----------------
 cui/source/inc/hltpbase.hxx        |    1 +
 3 files changed, 12 insertions(+), 28 deletions(-)

New commits:
commit e525459b064ecaab4c8e3b27e32622ec609352e6
Author:     Maya Stephens <maya.steph...@collabora.com>
AuthorDate: Tue Sep 2 14:35:22 2025 +0000
Commit:     Michael Stahl <michael.st...@collabora.com>
CommitDate: Mon Sep 15 16:02:26 2025 +0200

    Use set_visible in hyperlink dialog
    
    Use set_visible(bool) instead of if(bool) {show()} else {hide()}. This way 
is shorter, and acts the same, as set_visible calls either show or hide based 
of the parameter.
    
    Change-Id: I6a6a6964bd373c7592baaa1ebd63b3c9359ed750
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190529
    Reviewed-by: Michael Stahl <michael.st...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    (cherry picked from commit a41d9e0d7f2709f71e02d47cb3f43dfd3b7b5337)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190964
    Tested-by: Jenkins

diff --git a/cui/source/dialogs/cuihyperdlg.cxx 
b/cui/source/dialogs/cuihyperdlg.cxx
index 9559b34320ac..7747891361bc 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -111,18 +111,9 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, 
SfxChildWindow* pChild, weld:
     m_xOKBtn->show();
     m_xCancelBtn->show();
 
-    if (comphelper::LibreOfficeKit::isActive())
-    {
-        m_xApplyBtn->hide();
-        m_xHelpBtn->hide();
-        m_xResetBtn->hide();
-    }
-    else
-    {
-        m_xApplyBtn->show();
-        m_xHelpBtn->show();
-        m_xResetBtn->show();
-    }
+    m_xApplyBtn->set_visible(!comphelper::LibreOfficeKit::isActive());
+    m_xHelpBtn->set_visible(!comphelper::LibreOfficeKit::isActive());
+    m_xResetBtn->set_visible(!comphelper::LibreOfficeKit::isActive());
 
     mbGrabFocus = true;
 
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 946fa54c09a8..569a65dd21ad 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -246,21 +246,11 @@ void SvxHyperlinkTabPageBase::FillStandardDlgFields ( 
const SvxHyperlinkItem* pH
         mxLbForm->append_text( aStrFormButton );
         mxLbForm->set_active( pHyperlinkItem->GetInsertMode() == HLINK_BUTTON 
? 1 : 0 );
 
-        if (pHyperlinkItem->GetShowName()) {
-            mxNameLabel->show();
-            mxEdText->show();
-        } else {
-            mxNameLabel->hide();
-            mxEdText->hide();
-        }
+        mxNameLabel->set_visible(m_showName);
+        mxEdText->set_visible(m_showName);
 
-        if (pHyperlinkItem->GetShowText()) {
-            mxEdIndication->show();
-            mxIndicationLabel->show();
-        } else {
-            mxEdIndication->hide();
-            mxIndicationLabel->hide();
-        }
+        mxEdIndication->set_visible(m_showText);
+        mxIndicationLabel->set_visible(m_showText);
     }
 
     // Text
commit 34f3036db045bc4988b9a033c28e509564efc8c9
Author:     Maya Stephens <maya.steph...@collabora.com>
AuthorDate: Mon Sep 1 19:39:04 2025 +0000
Commit:     Michael Stahl <michael.st...@collabora.com>
CommitDate: Mon Sep 15 16:02:16 2025 +0200

    Change hyperlink dialog headers in lokit
    
    In lokit, hide both the tab label and the further settings label.
    
    Change-Id: I6a6a69646db3bac2a987e2e6cf8ebb206ebc99f0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190506
    Reviewed-by: Michael Stahl <michael.st...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    (cherry picked from commit acbe8fd091a9ca49af0b81950b851bebcc2fca12)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190963
    Tested-by: Jenkins

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 2ce3163037af..946fa54c09a8 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -109,6 +109,7 @@ 
SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase(weld::Container* pParent,
   , mxFormLabel(xBuilder->weld_label(u"form_label"_ustr))
   , mxNameLabel(xBuilder->weld_label(u"name_label"_ustr))
   , mxIndicationLabel(xBuilder->weld_label(u"indication_label"_ustr))
+  , mxTabLabel(xBuilder->weld_label(u"label2"_ustr))
   , mxFurtherSettings(xBuilder->weld_label(u"label1"_ustr))
   , mbIsCloseDisabled( false )
   , mpDialog( pDlg )
@@ -236,6 +237,9 @@ void SvxHyperlinkTabPageBase::FillStandardDlgFields ( const 
SvxHyperlinkItem* pH
         mxLbForm->hide();
         mxFormLabel->hide();
 
+        mxTabLabel->hide();
+        mxFurtherSettings->hide();
+
         // Although not visible, give fields so that default value can be used
         mxLbForm->clear();
         mxLbForm->append_text( aStrFormText );
@@ -245,11 +249,9 @@ void SvxHyperlinkTabPageBase::FillStandardDlgFields ( 
const SvxHyperlinkItem* pH
         if (pHyperlinkItem->GetShowName()) {
             mxNameLabel->show();
             mxEdText->show();
-            mxFurtherSettings->show();
         } else {
             mxNameLabel->hide();
             mxEdText->hide();
-            mxFurtherSettings->hide();
         }
 
         if (pHyperlinkItem->GetShowText()) {
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index ed204d384264..89279f3f6654 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -52,6 +52,7 @@ private:
     std::unique_ptr<weld::Label> mxFormLabel;
     std::unique_ptr<weld::Label> mxNameLabel;
     std::unique_ptr<weld::Label> mxIndicationLabel;
+    std::unique_ptr<weld::Label> mxTabLabel;
     std::unique_ptr<weld::Label> mxFurtherSettings;
 
     bool                        mbIsCloseDisabled;

Reply via email to