sw/source/filter/ww8/docxattributeoutput.cxx | 11 +++++++---- sw/source/filter/ww8/docxtableexport.cxx | 20 ++++++++++++++------ 2 files changed, 21 insertions(+), 10 deletions(-)
New commits: commit 73cc45a5b13ee73678eedaed4575c0c753531b9e Author: Noel Grandin <[email protected]> AuthorDate: Tue Dec 9 17:10:47 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Fri Dec 12 13:59:43 2025 +0100 officeotron: w:cellIns needs to come at the end Found by running tdf127814 with validation on. Change-Id: I4f479596db9042fae507e52116f01aef762b3f2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195330 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins (cherry picked from commit ca61332eef143162454eb04993bd10c074348692) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195357 Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2c47c4eb42b3..b1ea0ffc1dd1 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4805,9 +4805,6 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point bool const bEcma = GetExport().GetFilter().getVersion() == oox::core::ECMA_376_1ST_EDITION; - // Output any table cell redlines if there are any attached to this specific cell - TableCellRedline( pTableTextNodeInfoInner ); - if (const SfxGrabBagItem* pItem = pTableBox->GetFrameFormat()->GetAttrSet().GetItem<SfxGrabBagItem>(RES_FRMATR_GRABBAG)) { const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag(); @@ -4874,6 +4871,9 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point TableVerticalCell( pTableTextNodeInfoInner ); + // Output any table cell redlines if there are any attached to this specific cell + TableCellRedline( pTableTextNodeInfoInner ); + m_pSerializer->endElementNS( XML_w, XML_tcPr ); } commit da48ce5fed29e3c82fa21e5691efb4e6641b1633 Author: Noel Grandin <[email protected]> AuthorDate: Tue Dec 9 19:03:51 2025 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Fri Dec 12 13:59:30 2025 +0100 officeotron: "0-00-00T00:00:00Z" is not a valid date similar to commit 8c5683ee74230931c9375a22981239ca1a2c1a2e Change-Id: I3de3e44ea4955a159d8e23932108d623fbb27c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195331 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins (cherry picked from commit f4ff6e8d27b44ac59c54eb130179b3da0e01a9e9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195358 Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 1eaa8ef4b7ee..2c47c4eb42b3 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4387,7 +4387,10 @@ void DocxAttributeOutput::StartRedline(const SwRedlineData* pRedlineData, bool b const DateTime& aDateTime = pRedlineData->GetTimeStamp(); bool bNoDate = bRemovePersonalInfo || - ( aDateTime.GetYear() == 1970 && aDateTime.GetMonth() == 1 && aDateTime.GetDay() == 1 ); + ( aDateTime.GetYear() == 1970 && aDateTime.GetMonth() == 1 && aDateTime.GetDay() == 1 ) || + // The officeotron validator does not think year 0 is valid, so just dont put anything, + // a zero year is not useful anyway. + ( aDateTime.GetYear() == 0 && aDateTime.GetMonth() == 0 && aDateTime.GetDay() == 0 ); bool isInMoveBookmark = false; for (const auto& openedBookmark : m_rOpenedBookmarksIds) { diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx index e1fd3f3d48c1..11ee65800f03 100644 --- a/sw/source/filter/ww8/docxtableexport.cxx +++ b/sw/source/filter/ww8/docxtableexport.cxx @@ -682,9 +682,13 @@ void DocxAttributeOutput::TableRowRedline( RTL_TEXTENCODING_UTF8)); const DateTime aDateTime = aRedlineData.GetTimeStamp(); - bool bNoDate = bRemovePersonalInfo - || (aDateTime.GetYear() == 1970 && aDateTime.GetMonth() == 1 - && aDateTime.GetDay() == 1); + bool bNoDate + = bRemovePersonalInfo + || (aDateTime.GetYear() == 1970 && aDateTime.GetMonth() == 1 + && aDateTime.GetDay() == 1) + // The officeotron validator does not think year 0 is valid, so just dont put anything, + // a zero year is not useful anyway. + || (aDateTime.GetYear() == 0 && aDateTime.GetMonth() == 0 && aDateTime.GetDay() == 0); if (bNoDate) m_pSerializer->singleElementNS( @@ -753,9 +757,13 @@ void DocxAttributeOutput::TableCellRedline( RTL_TEXTENCODING_UTF8)); const DateTime aDateTime = aRedlineData.GetTimeStamp(); - bool bNoDate = bRemovePersonalInfo - || (aDateTime.GetYear() == 1970 && aDateTime.GetMonth() == 1 - && aDateTime.GetDay() == 1); + bool bNoDate + = bRemovePersonalInfo + || (aDateTime.GetYear() == 1970 && aDateTime.GetMonth() == 1 + && aDateTime.GetDay() == 1) + // The officeotron validator does not think year 0 is valid, so just dont put anything, + // a zero year is not useful anyway. + || (aDateTime.GetYear() == 0 && aDateTime.GetMonth() == 0 && aDateTime.GetDay() == 0); if (bNoDate) m_pSerializer->singleElementNS(
