sw/source/ui/fldui/flddinf.cxx | 21 ++++++++++++++------- sw/source/ui/fldui/flddok.cxx | 16 ++++++++++------ sw/source/ui/fldui/fldedt.cxx | 2 +- sw/source/ui/fldui/fldfunc.cxx | 14 +++++++++----- sw/source/ui/fldui/fldref.cxx | 16 ++++++++++------ sw/source/ui/fldui/fldvar.cxx | 18 +++++++++++------- sw/uiconfig/swriter/ui/editfielddialog.ui | 18 ++++++++++++++---- vcl/jsdialog/enabled.cxx | 7 +++++++ 8 files changed, 76 insertions(+), 36 deletions(-)
New commits: commit 3532b81f367cdbe9ed73cca1cee3c2c2381f8dae Author: Szymon Kłos <[email protected]> AuthorDate: Wed Dec 31 09:24:01 2025 +0000 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Mon Jan 5 06:43:32 2026 +0100 jsdialog: enable cross-reference dialogs - disable name reassignment ued for uitests in LOK - it is not supported and fails on asertion - EditFieldDialog had wrong order of items (buttons on top) Change-Id: I111918b808901cfa7b4020c7c352d969ce76d032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196356 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 36743339ab56..be93a1c28d91 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <comphelper/lok.hxx> #include <sfx2/frame.hxx> #include <svl/numformat.hxx> #include <svl/zforlist.hxx> @@ -86,10 +87,13 @@ SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* pPage, weld::DialogControl if ( pItem ) pItem->GetValue() >>= m_xCustomPropertySet; - // 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"); + 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"); + } } SwFieldDokInfPage::~SwFieldDokInfPage() @@ -110,19 +114,22 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* ) if (aCustomProperties.hasElements()) { m_xTypeList->hide(); - m_xTypeList->set_buildable_name(u"type-list"_ustr); + if (!comphelper::LibreOfficeKit::isActive()) + m_xTypeList->set_buildable_name(u"type-list"_ustr); m_xTypeTree->show(); m_pTypeView = m_xTypeTree.get(); } else { m_xTypeTree->hide(); - m_xTypeTree->set_buildable_name(u"type-tree"_ustr); + if (!comphelper::LibreOfficeKit::isActive()) + m_xTypeTree->set_buildable_name(u"type-tree"_ustr); m_xTypeList->show(); m_pTypeView = m_xTypeList.get(); } - m_pTypeView->set_buildable_name(u"type-docinf"_ustr); + if (!comphelper::LibreOfficeKit::isActive()) + 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 bb1048a94563..f07fed53d965 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -24,6 +24,7 @@ #include "flddok.hxx" #include <swmodule.hxx> #include <wrtsh.hxx> +#include <comphelper/lok.hxx> #include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <o3tl/string_view.hxx> @@ -73,12 +74,15 @@ SwFieldDokPage::SwFieldDokPage(weld::Container* pPage, weld::DialogController* p //enable 'active' language selection m_xNumFormatLB->SetShowLanguageControl(true); - // 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"); + 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"); + } } SwFieldDokPage::~SwFieldDokPage() diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 60dcf41b43a6..bbd360456832 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -99,7 +99,7 @@ void SwFieldEditDlg::EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr) } SwFieldEditDlg::SwFieldEditDlg(SwView const & rVw) - : SfxSingleTabDialogController(rVw.GetViewFrame().GetFrameWeld(), nullptr, + : SfxSingleTabDialogController(rVw.GetViewFrame().GetFrameWeld(), nullptr, u"content"_ustr, u"modules/swriter/ui/editfielddialog.ui"_ustr, u"EditFieldDialog"_ustr) , m_pSh(rVw.GetWrtShellPtr()) , m_xPrevBT(m_xBuilder->weld_button(u"prev"_ustr)) diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 98fac8e93515..c128fcd39e43 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -26,6 +26,7 @@ #include "fldfunc.hxx" #include "flddinf.hxx" #include <flddropdown.hxx> +#include <comphelper/lok.hxx> #include <o3tl/string_view.hxx> #define USER_DATA_VERSION_1 "1" @@ -78,11 +79,14 @@ SwFieldFuncPage::SwFieldFuncPage(weld::Container* pPage, weld::DialogController* m_xCond1ED->ShowBrackets(false); m_xCond2ED->ShowBrackets(false); - // 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"); + 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"); + } } SwFieldFuncPage::~SwFieldFuncPage() diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index ef88650962f0..7d10d2c1484f 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -34,6 +34,7 @@ #include <unotools/charclass.hxx> #include <osl/diagnose.h> +#include <comphelper/lok.hxx> #include <comphelper/string.hxx> #include <editeng/frmdiritem.hxx> #include <o3tl/safeint.hxx> @@ -124,12 +125,15 @@ SwFieldRefPage::SwFieldRefPage(weld::Container* pPage, weld::DialogController* p m_xSelectionToolTipLB->connect_row_activated( LINK(this, SwFieldRefPage, TreeViewInsertHdl) ); m_xFilterED->grab_focus(); - // 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"); + 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"); + } } SwFieldRefPage::~SwFieldRefPage() diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 71e588b17253..1630b1ef596b 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -18,6 +18,7 @@ */ #include <swtypes.hxx> +#include <comphelper/lok.hxx> #include <sfx2/linkmgr.hxx> #include <IDocumentFieldsAccess.hxx> #include <usrfld.hxx> @@ -85,13 +86,16 @@ SwFieldVarPage::SwFieldVarPage(weld::Container* pPage, weld::DialogController* p //enable 'active' language selection m_xNumFormatLB->SetShowLanguageControl(true); - // 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"); + 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"); + } } SwFieldVarPage::~SwFieldVarPage() diff --git a/sw/uiconfig/swriter/ui/editfielddialog.ui b/sw/uiconfig/swriter/ui/editfielddialog.ui index 4a566b995b44..8da47c64ed27 100644 --- a/sw/uiconfig/swriter/ui/editfielddialog.ui +++ b/sw/uiconfig/swriter/ui/editfielddialog.ui @@ -83,9 +83,22 @@ <property name="position">0</property> </packing> </child> + <child> + <object class="GtkBox" id="content"> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">start</property> + <property name="position">0</property> + </packing> + </child> <child> <!-- n-columns=1 n-rows=1 --> - <object class="GtkGrid" id="grid2"> + <object class="GtkGrid" id="EditFieldGrid"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="column_spacing">6</property> @@ -160,9 +173,6 @@ <property name="position">1</property> </packing> </child> - <child> - <placeholder/> - </child> </object> </child> <action-widgets> diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 26ba3101ab59..b4d8997e564d 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -225,6 +225,13 @@ constexpr auto SwriterDialogList { u"modules/swriter/ui/dropdownfielddialog.ui" }, { u"modules/swriter/ui/editsectiondialog.ui" }, { u"modules/swriter/ui/endnotepage.ui" }, + { u"modules/swriter/ui/editfielddialog.ui" }, + { u"modules/swriter/ui/fielddialog.ui" }, + { u"modules/swriter/ui/flddocumentpage.ui" }, + { u"modules/swriter/ui/fldvarpage.ui" }, + { u"modules/swriter/ui/flddocinfopage.ui" }, + { u"modules/swriter/ui/fldrefpage.ui" }, + { u"modules/swriter/ui/fldfuncpage.ui"}, { u"modules/swriter/ui/footendnotedialog.ui" }, { u"modules/swriter/ui/footnoteareapage.ui" }, { u"modules/swriter/ui/footnotepage.ui" },
