include/svx/hdft.hxx       |    1 +
 svx/source/dialog/hdft.cxx |    3 +++
 2 files changed, 4 insertions(+)

New commits:
commit 5ee8258ff3ea660504467397313ae0ff54175b27
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Wed Mar 26 16:32:27 2025 -0300
Commit:     Olivier Hallot <olivier.hal...@libreoffice.org>
CommitDate: Thu Mar 27 20:34:09 2025 +0100

    tdf#165836 - Page style header/footer HelpID
    
    + Page style' header and footer dialog share the same .ui file
    
    + Under SAL_USE_VCLPLUGIN gen and kf5, the controller send HelpID for
      "frame1" widget, thus it was impossible to separate help for header and
      footer.
       + added variable m_xFrame to catch frame1 widget and assign HelpId
         according to logic in the contructor.
    
    + Under gnome, use the existing m_xContainer, that is, the issue does
      not show.
    
    Note: this is a hack. For gen and kf5/6 it should be like gnome.
    
    Change-Id: Ief6d17689361b1446e7e76bf59dbe962397614cb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183353
    Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index 091137eed358..1b6d05896a51 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -78,6 +78,7 @@ protected:
     std::unique_ptr<weld::MetricSpinButton> m_xHeightEdit;
     std::unique_ptr<weld::CheckButton> m_xHeightDynBtn;
     std::unique_ptr<weld::Button> m_xBackgroundBtn;
+    std::unique_ptr<weld::Frame>  m_xFrame;
     std::unique_ptr<weld::CustomWeld> m_xBspWin;
 
     void            InitHandler();
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 0bce3b3f4381..64576d29e6c8 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -138,12 +138,14 @@ SvxHFPage::SvxHFPage(weld::Container* pPage, 
weld::DialogController* pController
     , m_xHeightEdit(m_xBuilder->weld_metric_spin_button(u"spinHeight"_ustr, 
FieldUnit::CM))
     , m_xHeightDynBtn(m_xBuilder->weld_check_button(u"checkAutofit"_ustr))
     , m_xBackgroundBtn(m_xBuilder->weld_button(u"buttonMore"_ustr))
+    , m_xFrame(m_xBuilder->weld_frame(u"frame1"_ustr))
     , m_xBspWin(new weld::CustomWeld(*m_xBuilder, u"drawingareaPageHF"_ustr, 
m_aBspWin))
 {
     //swap header <-> footer in UI
     if (nId == SID_ATTR_PAGE_FOOTERSET)
     {
         
m_xContainer->set_help_id(u"svx/ui/headfootformatpage/FFormatPage"_ustr);
+        m_xFrame->set_help_id(u"svx/ui/headfootformatpage/FFormatPage"_ustr);
         m_xPageLbl = m_xBuilder->weld_label(u"labelFooterFormat"_ustr);
         m_xTurnOnBox = m_xBuilder->weld_check_button(u"checkFooterOn"_ustr);
 
@@ -163,6 +165,7 @@ SvxHFPage::SvxHFPage(weld::Container* pPage, 
weld::DialogController* pController
     else //Header
     {
         
m_xContainer->set_help_id(u"svx/ui/headfootformatpage/HFormatPage"_ustr);
+        m_xFrame->set_help_id(u"svx/ui/headfootformatpage/HFormatPage"_ustr);
         m_xPageLbl = m_xBuilder->weld_label(u"labelHeaderFormat"_ustr);
         m_xTurnOnBox = m_xBuilder->weld_check_button(u"checkHeaderOn"_ustr);
     }

Reply via email to