sc/source/ui/dbgui/sortkeydlg.cxx |    9 +++------
 sfx2/source/dialog/dinfdlg.cxx    |   23 ++++++++++-------------
 sw/source/ui/fldui/flddinf.cxx    |   20 +++++++-------------
 sw/source/ui/fldui/flddok.cxx     |   15 ++++++---------
 sw/source/ui/fldui/fldfunc.cxx    |   13 +++++--------
 sw/source/ui/fldui/fldref.cxx     |   15 ++++++---------
 sw/source/ui/fldui/fldvar.cxx     |   17 +++++++----------
 7 files changed, 44 insertions(+), 68 deletions(-)

New commits:
commit d62b0d603ed404e8d35fc1d717924909dcf7fe00
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Mar 4 07:48:02 2026 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Wed Mar 4 08:38:43 2026 +0100

    lok/jsdialog: Drop more weld::Widget::set_buildable_name workarounds
    
    The workaround to not call weld::Widget::set_buildable_name
    for the LibreOfficeKit/jsdialog case is no longer
    needed now after
    
        commit fd9887f802b9baefcb3fb2a4408b52909c6e3327
        Author: Michael Weghorn <[email protected]>
        Date:   Tue Mar 3 14:55:17 2026 +0100
    
            jsdialog: Don't do anything in JSWidget::set_buildable_name
    
    (see that commit for more details), so drop it from more
    places across the code base.
    
    Change-Id: I2729f5c05ad5abd6ea39a2497bebabcbc6e70af0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200922
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx 
b/sc/source/ui/dbgui/sortkeydlg.cxx
index 02051d847ffa..7f8c2d7df3e3 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -66,13 +66,10 @@ void ScSortKeyWindow::AddSortKey( sal_uInt16 nItemNumber )
     pSortKeyItem->m_xFrame->set_label(aLine);
 
     // for ui-testing. Distinguish the sort keys
-    if (!comphelper::LibreOfficeKit::isActive())
+    if (m_aSortKeyItems.size() > 0)
     {
-        if ( m_aSortKeyItems.size() > 0 )
-        {
-            pSortKeyItem->m_xLbSort->set_buildable_name(
-                pSortKeyItem->m_xLbSort->get_buildable_name() + 
OUString::number(m_aSortKeyItems.size() + 1));
-        }
+        
pSortKeyItem->m_xLbSort->set_buildable_name(pSortKeyItem->m_xLbSort->get_buildable_name()
+                                                    + 
OUString::number(m_aSortKeyItems.size() + 1));
     }
 
     m_aSortKeyItems.push_back(std::unique_ptr<ScSortKeyItem>(pSortKeyItem));
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ff44b54ef980..d5874bf8bf46 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1714,19 +1714,16 @@ void CustomPropertiesWindow::CreateNewLine()
 
     m_aCustomPropertiesLines.emplace_back( pNewLine );
 
-    // this breaks online's jsdialogbuilder
-    if (!comphelper::LibreOfficeKit::isActive()){
-        // for ui-testing. Distinguish the elements in the lines
-        sal_uInt16 nSize = m_aCustomPropertiesLines.size();
-        pNewLine->m_xNameBox->set_buildable_name(
-            pNewLine->m_xNameBox->get_buildable_name() + 
OUString::number(nSize));
-        pNewLine->m_xTypeBox->set_buildable_name(
-            pNewLine->m_xTypeBox->get_buildable_name() + 
OUString::number(nSize));
-        pNewLine->m_xValueEdit->set_buildable_name(
-            pNewLine->m_xValueEdit->get_buildable_name() + 
OUString::number(nSize));
-        pNewLine->m_xRemoveButton->set_buildable_name(
-            pNewLine->m_xRemoveButton->get_buildable_name() + 
OUString::number(nSize));
-    }
+    // for ui-testing. Distinguish the elements in the lines
+    sal_uInt16 nSize = m_aCustomPropertiesLines.size();
+    
pNewLine->m_xNameBox->set_buildable_name(pNewLine->m_xNameBox->get_buildable_name()
+                                             + OUString::number(nSize));
+    
pNewLine->m_xTypeBox->set_buildable_name(pNewLine->m_xTypeBox->get_buildable_name()
+                                             + OUString::number(nSize));
+    
pNewLine->m_xValueEdit->set_buildable_name(pNewLine->m_xValueEdit->get_buildable_name()
+                                               + OUString::number(nSize));
+    
pNewLine->m_xRemoveButton->set_buildable_name(pNewLine->m_xRemoveButton->get_buildable_name()
+                                                  + OUString::number(nSize));
 
     pNewLine->DoTypeHdl(*pNewLine->m_xTypeBox);
 }
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index acd879a0ed43..01a217a7a7e8 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -87,13 +87,10 @@ SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* 
pPage, weld::DialogControl
     if ( pItem )
         pItem->GetValue() >>= m_xCustomPropertySet;
 
-    if (!comphelper::LibreOfficeKit::isActive())
-    {
-        // uitests
-        m_pTypeView->set_buildable_name(u"type-docinf"_ustr);
-        
m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-docinf");
-        m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-docinf");
-    }
+    // uitests
+    m_pTypeView->set_buildable_name(u"type-docinf"_ustr);
+    m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-docinf");
+    m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-docinf");
 }
 
 SwFieldDokInfPage::~SwFieldDokInfPage()
@@ -114,22 +111,19 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
     if (aCustomProperties.hasElements())
     {
         m_xTypeList->hide();
-        if (!comphelper::LibreOfficeKit::isActive())
-            m_xTypeList->set_buildable_name(u"type-list"_ustr);
+        m_xTypeList->set_buildable_name(u"type-list"_ustr);
         m_xTypeTree->show();
         m_pTypeView = m_xTypeTree.get();
     }
     else
     {
         m_xTypeTree->hide();
-        if (!comphelper::LibreOfficeKit::isActive())
-            m_xTypeTree->set_buildable_name(u"type-tree"_ustr);
+        m_xTypeTree->set_buildable_name(u"type-tree"_ustr);
         m_xTypeList->show();
         m_pTypeView = m_xTypeList.get();
     }
 
-    if (!comphelper::LibreOfficeKit::isActive())
-        m_pTypeView->set_buildable_name(u"type-docinf"_ustr);
+    m_pTypeView->set_buildable_name(u"type-docinf"_ustr);
 
     // initialise TypeListBox
     m_pTypeView->freeze();
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index b6adfd14c166..4412b032bf6c 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -75,15 +75,12 @@ SwFieldDokPage::SwFieldDokPage(weld::Container* pPage, 
weld::DialogController* p
     //enable 'active' language selection
     m_xNumFormatLB->SetShowLanguageControl(true);
 
-    if (!comphelper::LibreOfficeKit::isActive())
-    {
-        // uitests
-        m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + 
"-doc");
-        m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + 
"-doc");
-        
m_xNumFormatLB->set_buildable_name(m_xNumFormatLB->get_buildable_name() + 
"-doc");
-        
m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-doc");
-        m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-doc");
-    }
+    // uitests
+    m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + "-doc");
+    m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + "-doc");
+    m_xNumFormatLB->set_buildable_name(m_xNumFormatLB->get_buildable_name() + 
"-doc");
+    m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-doc");
+    m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-doc");
 }
 
 SwFieldDokPage::~SwFieldDokPage()
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index ebdc780e8966..5cde27a29154 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -80,14 +80,11 @@ SwFieldFuncPage::SwFieldFuncPage(weld::Container* pPage, 
weld::DialogController*
     m_xCond1ED->ShowBrackets(false);
     m_xCond2ED->ShowBrackets(false);
 
-    if (!comphelper::LibreOfficeKit::isActive())
-    {
-        // uitests
-        m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + 
"-func");
-        m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + 
"-func");
-        
m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-func");
-        m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-func");
-    }
+    // uitests
+    m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + "-func");
+    m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + "-func");
+    m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-func");
+    m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-func");
 }
 
 SwFieldFuncPage::~SwFieldFuncPage()
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 30beca4e3cd6..43a76e1e3373 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -127,15 +127,12 @@ SwFieldRefPage::SwFieldRefPage(weld::Container* pPage, 
weld::DialogController* p
     m_xSelectionToolTipLB->connect_row_activated( LINK(this, SwFieldRefPage, 
TreeViewInsertHdl) );
     m_xFilterED->grab_focus();
 
-    if (!comphelper::LibreOfficeKit::isActive())
-    {
-        // uitests
-        m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + 
"-ref");
-        m_xNameED->set_buildable_name(m_xNameED->get_buildable_name() + 
"-ref");
-        m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + 
"-ref");
-        
m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-ref");
-        m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-ref");
-    }
+    // uitests
+    m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + "-ref");
+    m_xNameED->set_buildable_name(m_xNameED->get_buildable_name() + "-ref");
+    m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + "-ref");
+    m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-ref");
+    m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-ref");
 }
 
 SwFieldRefPage::~SwFieldRefPage()
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 5ebfcf8dc467..54711dd06ac6 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -87,16 +87,13 @@ SwFieldVarPage::SwFieldVarPage(weld::Container* pPage, 
weld::DialogController* p
     //enable 'active' language selection
     m_xNumFormatLB->SetShowLanguageControl(true);
 
-    if (!comphelper::LibreOfficeKit::isActive())
-    {
-        // uitests
-        m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + 
"-var");
-        m_xNameED->set_buildable_name(m_xNameED->get_buildable_name() + 
"-var");
-        m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + 
"-var");
-        
m_xNumFormatLB->set_buildable_name(m_xNumFormatLB->get_buildable_name() + 
"-var");
-        
m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-var");
-        m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-var");
-    }
+    // uitests
+    m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + "-var");
+    m_xNameED->set_buildable_name(m_xNameED->get_buildable_name() + "-var");
+    m_xValueED->set_buildable_name(m_xValueED->get_buildable_name() + "-var");
+    m_xNumFormatLB->set_buildable_name(m_xNumFormatLB->get_buildable_name() + 
"-var");
+    m_xSelectionLB->set_buildable_name(m_xSelectionLB->get_buildable_name() + 
"-var");
+    m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + 
"-var");
 }
 
 SwFieldVarPage::~SwFieldVarPage()

Reply via email to