diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-09-26 15:49:12 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-26 22:01:59 +0200 |
commit | b5d35c7e57a6adb650493cc3a04a2f3c57e0f8a6 (patch) | |
tree | f86f4a69c0cf9d7ab1851790aa61e16076c647a2 /sd | |
parent | 0917993d078b58f19cbfcb27e67518cb260ef63c (diff) |
tdf#112647: Fixed line spacing is saved incorrectly to PPTX
The values were not converted to the right unit. Also the
spcPts attribute means an exact value not a minimum one.
Reviewed-on: https://gerrit.libreoffice.org/42763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit ef2e9b19a52e04ae0ed45900bcf64bf375a910ef)
Change-Id: Ia49683e66153611e96a830f821e3a2487adec505
Reviewed-on: https://gerrit.libreoffice.org/42813
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/qa/unit/data/odp/tdf112647.odp | bin | 0 -> 11172 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf112647.odp b/sd/qa/unit/data/odp/tdf112647.odp Binary files differnew file mode 100755 index 000000000000..72a6621b8e86 --- /dev/null +++ b/sd/qa/unit/data/odp/tdf112647.odp diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index c7311ef1b5ca..abce5cda2c36 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -66,6 +66,8 @@ #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/text/WritingMode2.hpp> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> +#include <com/sun/star/style/LineSpacing.hpp> +#include <com/sun/star/style/LineSpacingMode.hpp> #include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/table/XTable.hpp> #include <com/sun/star/table/XMergeableCell.hpp> @@ -103,6 +105,7 @@ public: void testTdf105739(); void testTdf112552(); void testTdf112557(); + void testTdf112647(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest2); @@ -129,6 +132,7 @@ public: CPPUNIT_TEST(testTdf105739); CPPUNIT_TEST(testTdf112552); CPPUNIT_TEST(testTdf112557); + CPPUNIT_TEST(testTdf112647); CPPUNIT_TEST_SUITE_END(); @@ -813,6 +817,21 @@ void SdOOXMLExportTest2::testTdf112557() xDocShRef->DoClose(); } +void SdOOXMLExportTest2::testTdf112647() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf112647.odp"), ODP); + xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); + uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) ); + uno::Reference<text::XTextRange> xParagraph( getParagraphFromShape( 0, xShape ) ); + uno::Reference< beans::XPropertySet > xPropSet( xParagraph, uno::UNO_QUERY_THROW ); + + css::style::LineSpacing aLineSpacing; + xPropSet->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; + CPPUNIT_ASSERT_EQUAL(sal_Int16(css::style::LineSpacingMode::FIX), aLineSpacing.Mode); + CPPUNIT_ASSERT_EQUAL(sal_Int16(2117), aLineSpacing.Height); + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2); CPPUNIT_PLUGIN_IMPLEMENT(); |