svx/source/dialog/hdft.cxx           |   17 ++++-------------
 vcl/inc/jsdialog/jsdialogbuilder.hxx |    7 +++----
 2 files changed, 7 insertions(+), 17 deletions(-)

New commits:
commit fd9887f802b9baefcb3fb2a4408b52909c6e3327
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Mar 3 14:55:17 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Wed Mar 4 07:49:16 2026 +0100

    jsdialog: Don't do anything in JSWidget::set_buildable_name
    
    As
    
        commit ef1acd9cba6521ae00f71f7bb8336f9e20d72796
        Author: Sahil Gautam <[email protected]>
        Date:   Fri Feb 27 17:21:56 2026 +0530
    
            fix: don't use set_buildable_name with LOKit as it crashes
    
            JSWidget::set_buildable_name isn't handled on the online side, it 
has
            an assert(false) which is reached because of changes introduced in
            commit f04247351a22d77f4f219342fdc425a832e711df
    
    mentions, calling weld::Widget::set_buildable_name so far
    triggered an assert. That commit also introduced a workaround
    in SvxHFPage to avoid calling the method when LibreOfficeKit
    is active.
    
    Instead of spreading workarounds across the code base to
    avoid calling the method altogether, rather just let the
    method do nothing for the jsdialog case.
    
    This also reverts the workaround from the above commit as it
    should be obsolete now.
    
    Change-Id: I81bf87267b43d29276fae7894e4af7e3ea2e6780
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200889
    Tested-by: Jenkins
    Reviewed-by: Sahil Gautam <[email protected]>

diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 9c66bb50cac6..45e877c2221c 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -19,7 +19,6 @@
 
 #include <sal/config.h>
 
-#include <comphelper/lok.hxx>
 #include <o3tl/unit_conversion.hxx>
 #include <svl/itemiter.hxx>
 #include <sfx2/objsh.hxx>
@@ -173,12 +172,8 @@ SvxHFPage::SvxHFPage(weld::Container* pPage, 
weld::DialogController* pController
         m_xBackgroundBtn->set_help_id( u"SVX_HID_FOOTER_BUTTONMORE"_ustr );
 
         // uitest
-        if (!comphelper::LibreOfficeKit::isActive())
-        {
-            
m_xCntSharedBox->set_buildable_name(m_xCntSharedBox->get_buildable_name() + 
"-footer");
-            
m_xCntSharedFirstBox->set_buildable_name(m_xCntSharedFirstBox->get_buildable_name()
-                                                     + "-footer");
-        }
+        
m_xCntSharedBox->set_buildable_name(m_xCntSharedBox->get_buildable_name() + 
"-footer");
+        
m_xCntSharedFirstBox->set_buildable_name(m_xCntSharedFirstBox->get_buildable_name()
 + "-footer");
     }
     else //Header
     {
@@ -188,12 +183,8 @@ SvxHFPage::SvxHFPage(weld::Container* pPage, 
weld::DialogController* pController
         m_xTurnOnBox = m_xBuilder->weld_check_button(u"checkHeaderOn"_ustr);
 
         // uitest
-        if (!comphelper::LibreOfficeKit::isActive())
-        {
-            
m_xCntSharedBox->set_buildable_name(m_xCntSharedBox->get_buildable_name() + 
"-header");
-            
m_xCntSharedFirstBox->set_buildable_name(m_xCntSharedFirstBox->get_buildable_name()
-                                                     + "-header");
-        }
+        
m_xCntSharedBox->set_buildable_name(m_xCntSharedBox->get_buildable_name() + 
"-header");
+        
m_xCntSharedFirstBox->set_buildable_name(m_xCntSharedFirstBox->get_buildable_name()
 + "-header");
     }
     m_xTurnOnBox->show();
 
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 9b93cda40890..aeca637344bc 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -427,11 +427,10 @@ public:
             m_pSender->sendClosePopup(nWindowId);
     }
 
-    virtual void set_buildable_name(const OUString& rName) override
+    virtual void set_buildable_name(const OUString&) override
     {
-        SalInstanceWidget::set_buildable_name(rName);
-        assert(false); // we remember old name in GetLOKWeldWidgetsMap()
-        // TODO: implement renaming or avoid it for LOK
+        // we remember old name in GetLOKWeldWidgetsMap()
+        // Therefore, avoid renaming for LOK
     }
 };
 

Reply via email to