sw/qa/extras/ooxmlexport/data/chart-dupe.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 +++++++++ sw/source/filter/ww8/wrtw8nds.cxx | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit eae5d8de6dde0ea4dd1494b0e1f036789b7c6220 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Sep 23 17:48:40 2014 +0200 DOCX export: fix duplicated OLE objects Change-Id: I5b73fcbdbad26505e3ddd66d246354110c0f2e88 diff --git a/sw/qa/extras/ooxmlexport/data/chart-dupe.docx b/sw/qa/extras/ooxmlexport/data/chart-dupe.docx new file mode 100644 index 0000000..545f966 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/chart-dupe.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index dd458e9..d45db67 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -263,6 +263,15 @@ DECLARE_OOXMLEXPORT_TEST(testSdtRunPicture, "sdt-run-picture.docx") } } +DECLARE_OOXMLEXPORT_TEST(testChartDupe, "chart-dupe.docx") +{ + // Single chart was exported back as two charts. + uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY); + // This was 2, on second import we got a duplicated chart copy. + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xEmbeddedObjects->getCount()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index c17e3af..540ed19 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2236,7 +2236,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if ( aAttrIter.IsDropCap( nNextAttr ) ) AttrOutput().FormatDrop( rNode, aAttrIter.GetSwFmtDrop(), nStyle, pTextNodeInfo, pTextNodeInfoInner ); - if (0 != nEnd) + // Only output character attributes if this is not a postponed text run. + if (0 != nEnd && !(bPostponeWritingText && FLY_PROCESSED == nStateOfFlyFrame)) { // Output the character attributes // #i51277# do this before writing flys at end of paragraph _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits