sw/qa/extras/htmlexport/htmlexport.cxx | 16 ++++++++++++++++ sw/source/filter/html/htmltabw.cxx | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-)
New commits: commit 4c515136ed3d7494638b6ecddcd5ae6419faf026 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Apr 11 15:35:26 2023 +0300 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Apr 11 21:14:08 2023 +0200 tdf#153923: In ReqIF case, avoid fake dl/dd used to emulate indentation Change-Id: Iac85350c8f52a39173a07131c67e7dc943aa140e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150229 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 3ce1616ea371e0efd317290bb4f943f319404800) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150200 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index a6ad141f1dd4..8ed189b44bb0 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -2411,6 +2411,22 @@ CPPUNIT_TEST_FIXTURE(HtmlExportTest, testTdf153923) assertXPath(pDoc, "/html/body//dd"); } +CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testTdf153923_ReqIF) +{ + createSwDoc("TableWithIndent.fodt"); + ExportToReqif(); + + SvMemoryStream aStream; + WrapReqifFromTempFile(aStream); + xmlDocUniquePtr pDoc = parseXmlStream(&aStream); + CPPUNIT_ASSERT(pDoc); + + assertXPath(pDoc, "//reqif-xhtml:table"); + // There should be no 'dd' or 'dl' tags, used as a hack for table indentation + assertXPath(pDoc, "//reqif-xhtml:dl", 0); + assertXPath(pDoc, "//reqif-xhtml:dd", 0); +} + CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIfTransparentTifImg) { // reqIf export must keep the TIF encoding of the image diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index fec5e4a10e31..8c86f70c97ff 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -1026,7 +1026,8 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, break; } - if( bCheckDefList ) + // In ReqIF case, do not emulate indentation with fake description list + if( bCheckDefList && !rHTMLWrt.mbReqIF ) { OSL_ENSURE( !rHTMLWrt.GetNumInfo().GetNumRule() || rHTMLWrt.GetNextNumInfo(),