diff options
author | Priyanka Gaikwad <priyanka.gaikwad@synerzip.com> | 2013-11-12 11:29:34 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-14 13:51:52 +0100 |
commit | 7e115a4685ad21872e6759686860c5113e19c473 (patch) | |
tree | c5db71f9a2aa4c8363b730288e70c8ce4e565458 /sw | |
parent | 99b2f2bdef388bafd127139f7a05e47dc1592738 (diff) |
Fixed for spacing between lines in paragraph.
Problem Description:
In "w:spacing" value of "w:line" attribute value is not getting preserved.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/6645
Change-Id: Id9da4f9234d14cf4599c6520b4a191ad9af92c25
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/test_line_spacing.docx | bin | 0 -> 9997 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/test_line_spacing.docx b/sw/qa/extras/ooxmlexport/data/test_line_spacing.docx Binary files differnew file mode 100644 index 000000000000..2f92afbb7069 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/test_line_spacing.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index d2efe7c26fd8..24d242b7c0e1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1704,6 +1704,20 @@ DECLARE_OOXML_TEST(testFdo70838, "fdo70838.docx") } } +DECLARE_OOXML_TEST(testLineSpacingexport, "test_line_spacing.docx") +{ + // The Problem was that the w:line attribute value in w:spacing tag was incorrect + uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration(); + CPPUNIT_ASSERT(xParaEnum->hasMoreElements()); + + style::LineSpacing alineSpacing = getProperty<style::LineSpacing>(xParaEnum->nextElement(), "ParaLineSpacing"); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(13200), static_cast<sal_Int16>(alineSpacing.Height)); + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:spacing", "line", "31680"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |