This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch odf-devel in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 8522272b9142f60ce97db11afc0b450379e9de4c Author: Jim Jagielski <[email protected]> AuthorDate: Wed Oct 28 11:05:26 2026 -0400 sc: write table:dependency and omit table:is-group-field in ODF 1.2 strict mode --- main/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx | 4 +++- main/sc/source/filter/xml/XMLExportDataPilot.cxx | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/main/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx index 1f05229703..962c1e0787 100644 --- a/main/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx +++ b/main/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx @@ -196,7 +196,9 @@ void ScChangeTrackingExportHelper::WriteDepending(const ScChangeAction* pDependA // #i80033# save old "dependence" element if backward compatibility is requested, // correct "dependency" element otherwise - const bool bSaveBackwardsCompatible = ( rExport.getExportFlags() & EXPORT_SAVEBACKWARDCOMPATIBLE ); + // ("dependence" is not in the schema, so strict ODF 1.2 always writes "dependency") + const bool bSaveBackwardsCompatible = ( rExport.getExportFlags() & EXPORT_SAVEBACKWARDCOMPATIBLE ) && + rExport.getDefaultVersion() != SvtSaveOptions::ODFVER_012; SvXMLElementExport aDependElem(rExport, XML_NAMESPACE_TABLE, bSaveBackwardsCompatible ? XML_DEPENDENCE : XML_DEPENDENCY, sal_True, sal_True); diff --git a/main/sc/source/filter/xml/XMLExportDataPilot.cxx b/main/sc/source/filter/xml/XMLExportDataPilot.cxx index 81bb06aa48..6d0951eb29 100644 --- a/main/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/main/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -613,7 +613,8 @@ void ScXMLExportDataPilot::WriteGroupDimAttributes(const ScDPSaveGroupDimension* { if (pGroupDim) { - rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_GROUP_FIELD, XML_TRUE); + if (rExport.getDefaultVersion() != SvtSaveOptions::ODFVER_012) // not in the schema + rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_GROUP_FIELD, XML_TRUE); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, pGroupDim->GetSourceDimName()); if (pGroupDim->GetDatePart()) { @@ -627,7 +628,8 @@ void ScXMLExportDataPilot::WriteNumGroupDim(const ScDPSaveNumGroupDimension* pNu { if (pNumGroupDim) { - rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_GROUP_FIELD, XML_TRUE); + if (rExport.getDefaultVersion() != SvtSaveOptions::ODFVER_012) // not in the schema + rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_GROUP_FIELD, XML_TRUE); // required by the schema; empty marks a numeric or date group rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, rtl::OUString()); if (pNumGroupDim->GetDatePart())
