This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 74aa672165c7b4e248154d726d303c44b7632ba7 Author: Jim Jagielski <[email protected]> AuthorDate: Tue Nov 3 09:23:44 2026 -0500 xmloff: write the XForms list source of a combobox in the ooo namespace in ODF 1.4 Extended The ODF 1.4 schema allows form:xforms-list-source on list boxes only. --- main/xmloff/source/forms/elementexport.cxx | 6 +++++- main/xmloff/source/forms/elementimport.cxx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/main/xmloff/source/forms/elementexport.cxx b/main/xmloff/source/forms/elementexport.cxx index e7ff814888..0d77d0c14c 100644 --- a/main/xmloff/source/forms/elementexport.cxx +++ b/main/xmloff/source/forms/elementexport.cxx @@ -1890,7 +1890,11 @@ namespace xmloff void OControlExport::exportXFormsListAttributes() { rtl::OUString sBindName = getXFormsListBindName( m_xProps ); - AddAttribute( XML_NAMESPACE_FORM, XML_XFORMS_LIST_SOURCE, sBindName ); + // the ODF 1.4 schema allows form:xforms-list-source on a list box only + if ( m_eType == COMBOBOX && m_rContext.getGlobalContext().getDefaultVersion() == SvtSaveOptions::ODFVER_014_EXT ) + AddAttribute( XML_NAMESPACE_OOO, XML_XFORMS_LIST_SOURCE, sBindName ); + else + AddAttribute( XML_NAMESPACE_FORM, XML_XFORMS_LIST_SOURCE, sBindName ); } //--------------------------------------------------------------------- void OControlExport::exportXFormsSubmissionAttributes() diff --git a/main/xmloff/source/forms/elementimport.cxx b/main/xmloff/source/forms/elementimport.cxx index 9310c4eb3f..65cb65e13e 100644 --- a/main/xmloff/source/forms/elementimport.cxx +++ b/main/xmloff/source/forms/elementimport.cxx @@ -766,7 +766,7 @@ namespace xmloff return true; } - if ( _nNamespaceKey == XML_NAMESPACE_FORM && IsXMLToken( _rLocalName, XML_XFORMS_LIST_SOURCE ) ) + if ( ( _nNamespaceKey == XML_NAMESPACE_FORM || _nNamespaceKey == XML_NAMESPACE_OOO ) && IsXMLToken( _rLocalName, XML_XFORMS_LIST_SOURCE ) ) { m_sListBindingID = _rValue; return true;
