[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-7-1' - sw/qa sw/source
László Németh (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 19 19:41:17 UTC 2021
sw/qa/extras/ooxmlexport/data/tdf142387.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 7 +++++++
sw/source/filter/ww8/docxattributeoutput.cxx | 6 +++++-
3 files changed, 12 insertions(+), 1 deletion(-)
New commits:
commit 9c6f5e21d6505ef772fba7fa9bbc924b46c8ca47
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Fri Jun 11 19:31:43 2021 +0200
Commit: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
CommitDate: Thu Aug 19 21:40:41 2021 +0200
tdf#142387 DOCX track changes: export w:del in w:ins
by processing stack (revision history) of redline ranges,
see GetStackCount() and GetRedlineData().
Change-Id: I7a9085bc1598f0a5e3ab4de6887a12e81738d4f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117069
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit eeee19b3fcf8b0374c361c7f6c285fd5c89b5a2f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120724
Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142387.docx b/sw/qa/extras/ooxmlexport/data/tdf142387.docx
new file mode 100644
index 000000000000..c4dc0d280cdc
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf142387.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 39485377a683..c48875a94e76 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -1350,6 +1350,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121176, "tdf121176.docx")
CPPUNIT_ASSERT_EQUAL( OUString( "must" ), getRun( getParagraph( 1 ), 2 )->getString());
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf142387, "tdf142387.docx")
+{
+ xmlDocUniquePtr pXmlDoc = parseExport();
+ // w:del in w:ins is exported correctly (only w:del was exported)
+ assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText", "inserts ");
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf123054, "tdf123054.docx")
{
CPPUNIT_ASSERT_EQUAL(OUString("No Spacing"),
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index c8aa253c1d30..be5c99f7f1c3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3196,7 +3196,8 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData * pRedlineData )
if ( !pRedlineData )
return;
- // FIXME check if it's necessary to travel over the Next()'s in pRedlineData
+ // write out stack of this redline recursively (first the oldest)
+ StartRedline( pRedlineData->Next() );
OString aId( OString::number( m_nRedlineId++ ) );
@@ -3250,6 +3251,9 @@ void DocxAttributeOutput::EndRedline( const SwRedlineData * pRedlineData )
default:
break;
}
+
+ // write out stack of this redline recursively (first the newest)
+ EndRedline( pRedlineData->Next() );
}
void DocxAttributeOutput::FormatDrop( const SwTextNode& /*rNode*/, const SwFormatDrop& /*rSwFormatDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
More information about the Libreoffice-commits
mailing list