diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-04-26 09:33:56 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-04 10:51:59 +0000 |
commit | 14b212dd77799f16d538636a2fb1acc9cb850d8c (patch) | |
tree | 819db804d2bbd1d14d2f34e4d5fa7216fb79c07a /sw/qa/extras/rtfimport/rtfimport.cxx | |
parent | b45543c3f2e2f936eddc3c481a250b949733fc32 (diff) |
tdf#90097 RTF import: handle fRelFlipV property for line shapes
Can be extended later in every direction: fFlipV, fRelFlipH, non-line
shapes. See oox::drawingml::Shape::createAndInsert() on why the
convertMm100ToTwip() conversion is necessary.
Change-Id: Ifee401dd8dd392c2c9ff85cc871ca0169fcf930b
Reviewed-on: https://gerrit.libreoffice.org/24385
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 6046062719f30849cd97161c6a89d27a0b0d2a20)
Reviewed-on: https://gerrit.libreoffice.org/24612
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 5dfc751c55e5..185fba4eef2a 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2534,6 +2534,25 @@ DECLARE_RTFIMPORT_TEST(testTdf97035, "tdf97035.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int16(2299), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position); } +#ifndef WNT +DECLARE_RTFIMPORT_TEST(testTdf90097, "tdf90097.rtf") +{ + // Get the second child of the group shape. + uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xShape(xGroup->getByIndex(1), uno::UNO_QUERY); + uno::Sequence< uno::Sequence<awt::Point> > aPolyPolySequence; + xShape->getPropertyValue("PolyPolygon") >>= aPolyPolySequence; + uno::Sequence<awt::Point>& rPolygon = aPolyPolySequence[0]; + // Vertical flip for the line shape was ignored, so Y coordinates were swapped. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2819), rPolygon[0].X); + // This was 1619. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1963), rPolygon[0].Y); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3181), rPolygon[1].X); + // This was 1962. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1620), rPolygon[1].Y); +} +#endif + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |