diff options
author | Justin Luth <justin_luth@sil.org> | 2018-06-28 15:48:40 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-06-29 07:43:40 +0200 |
commit | 1cedd88d40a26a55ce433f8b742215aea83a5382 (patch) | |
tree | 2104981b42e82ef069992eb94a1cd71b4151e81e /sw/qa/extras/ww8export/ww8export2.cxx | |
parent | e20b14e1e9f22a4ac55a7c9e6160f0b7665ff24d (diff) |
tdf#118421 ww8export: rotate vertically: not Lines or groups
Lines and Groups often are exceptions.
Normally, the import code swaps vertical rotations also. In the case
of lines (from the tests that I observed) lines don't have a rotation
value at that point during import, so no correction is made.
Grouping always messes things up.
Change-Id: I344c5a29f887294b751ffc87c01b30e472cfb4c2
Reviewed-on: https://gerrit.libreoffice.org/56595
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ww8export/ww8export2.cxx')
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index e4e61cb6a084..83eaac7b9de5 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -315,6 +315,18 @@ DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt") CPPUNIT_ASSERT(aRect.GetHeight() > aRect.GetWidth()); } +DECLARE_WW8EXPORT_TEST(testTdf70838b_verticalRotation, "tdf70838b_verticalRotation.odt") +{ + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); + SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); + tools::Rectangle aGroupShape = pPage->GetObj(0)->GetSnapRect(); + tools::Rectangle aLine = pPage->GetObj(2)->GetSnapRect(); + + CPPUNIT_ASSERT_MESSAGE("Smiley faces are round", aGroupShape.GetHeight() > aGroupShape.GetWidth()); + CPPUNIT_ASSERT_MESSAGE("Line is taller, not wider", aLine.GetHeight() > aLine.GetWidth()); +} + DECLARE_WW8EXPORT_TEST( testActiveXCheckbox, "checkbox_control.odt" ) { // First check box anchored as a floating object |