diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-08-03 09:19:17 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-03 08:14:57 +0000 |
commit | 1477e3a2229310a2c439c5f6d9c0d32b2191ec18 (patch) | |
tree | 0b163e75d23b6b2bf0931b8bbb180c71a025f1fe /sw/qa/extras | |
parent | 815e403237ab178c8d9d51f02ea10e9f473784d8 (diff) |
tdf#87924 DOCX import: rot=90 and vert=vert270 means no text rotation
If the shape is rotated 90 degrees clockwise and the text is further
rotated 270 degrees clockwise that means we shouldn't do anything with
the text and the result will be correct.
Also: cid#1315264 incorrect expression
(cherry picked from commit dbfed66eebde65f5844a0f1a2cfe548ad4eda962 and
1c09657c5c25cf941588610eeab653217399f9b5)
Change-Id: I7c65319258136288520bd24fa2bf8e3c598b0878
Reviewed-on: https://gerrit.libreoffice.org/18274
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf87924.docx | bin | 0 -> 15925 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf87924.docx b/sw/qa/extras/ooxmlimport/data/tdf87924.docx Binary files differnew file mode 100644 index 000000000000..5265d6638a88 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf87924.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index c1ef511a73ff..20cb6fe74140 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2633,6 +2633,14 @@ DECLARE_OOXMLIMPORT_TEST(testTdf86374, "tdf86374.docx") CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty<sal_Int16>(xTableRows->getByIndex(0), "SizeType")); } +DECLARE_OOXMLIMPORT_TEST(testTdf87924, "tdf87924.docx") +{ + uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY); + comphelper::SequenceAsHashMap aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry")); + // This was -270, the text rotation angle was set when it should not be rotated. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aGeometry["TextPreRotateAngle"].get<sal_Int32>()); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |