[Libreoffice-commits] core.git: sw/qa sw/source
Adam Co
rattles2013 at gmail.com
Thu May 23 05:28:46 PDT 2013
sw/qa/extras/ooxmlexport/data/fdo64826.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 8 ++++++++
sw/source/filter/ww8/docxexport.cxx | 6 +++---
3 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 286bfde8c3b855db8487dbc1337993056026a5a9
Author: Adam Co <rattles2013 at gmail.com>
Date: Thu May 23 11:05:16 2013 +0300
fdo#64826 : fix for track-changes export in DOCX
Change-Id: I44b505f977edcf9e0af2108487870352277ee9f0
Reviewed-on: https://gerrit.libreoffice.org/4011
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/sw/qa/extras/ooxmlexport/data/fdo64826.docx b/sw/qa/extras/ooxmlexport/data/fdo64826.docx
new file mode 100644
index 0000000..ce4287c
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 8dc69f2..3ed2f18 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<sal_Bool>(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 ca46cae..0ceacc05 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( );
More information about the Libreoffice-commits
mailing list