From 286bfde8c3b855db8487dbc1337993056026a5a9 Mon Sep 17 00:00:00 2001 From: Adam Co Date: Thu, 23 May 2013 11:05:16 +0300 Subject: fdo#64826 : fix for track-changes export in DOCX Change-Id: I44b505f977edcf9e0af2108487870352277ee9f0 Reviewed-on: https://gerrit.libreoffice.org/4011 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna --- sw/qa/extras/ooxmlexport/data/fdo64826.docx | Bin 0 -> 12018 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 8 ++++++++ sw/source/filter/ww8/docxexport.cxx | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 sw/qa/extras/ooxmlexport/data/fdo64826.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlexport/data/fdo64826.docx b/sw/qa/extras/ooxmlexport/data/fdo64826.docx new file mode 100644 index 000000000000..ce4287cea522 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo64826.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 8dc69f2a197e..3ed2f188b175 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -69,6 +69,7 @@ public: void testMathLiteral(); void testFdo48557(); void testI120928(); + void testFdo64826(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -116,6 +117,7 @@ void Test::run() {"math-literal.docx", &Test::testMathLiteral}, {"fdo48557.odt", &Test::testFdo48557}, {"i120928.docx", &Test::testI120928}, + {"fdo64826.docx", &Test::testFdo64826}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -672,6 +674,12 @@ void Test::testI120928() CPPUNIT_ASSERT_EQUAL(true, bIsGraphic); } +void Test::testFdo64826() +{ + // 'Track-Changes' (Track Revisions) wasn't exported. + CPPUNIT_ASSERT_EQUAL(true, bool(getProperty(mxComponent, "RecordChanges"))); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index ca46cae61aa6..0ceacc05b15d 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -318,6 +318,9 @@ OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_In void DocxExport::ExportDocument_Impl() { + // Set the 'Track Revisions' flag in the settings structure + settings.trackRevisions = 0 != ( nsRedlineMode_t::REDLINE_ON & mnRedlineMode ); + InitStyles(); // init sections @@ -824,9 +827,6 @@ DocxExport::DocxExport( DocxExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCur m_nFooters( 0 ), m_pVMLExport( NULL ) { - // Set the 'Track Revisions' flag in the settings structure - settings.trackRevisions = 0 != ( nsRedlineMode_t::REDLINE_ON & mnRedlineMode ); - // Write the document properies WriteProperties( ); -- cgit