summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-02-18 18:14:05 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-18 21:38:39 +0100
commit34383064ac061497b0c46c449313877c6b6a2087 (patch)
tree1e99b4f64626b0ff68ccfc55199994fbcd71f03a /sd
parentc02a78b55a1806687120de1d7d2df274a811be34 (diff)
oox smartart, cycle matrix: handle aspect ratio in composite algo
This way the 4 quadrant shapes in the center of the SmartArt form a circle, as width is shrinking. It's not height growing, as OOXML spec clearly says "ar" always just shrinks one axis. (>1 and <1 "ar" is to be handled when they are seen in action in an actual document.) Change-Id: I69f2390ee881253151cccc336ecbf1806a1216dc Reviewed-on: https://gerrit.libreoffice.org/67980 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 9acf64ebe306..29b8ae2d7469 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -874,6 +874,12 @@ void SdImportTestSmartArt::testCycleMatrix()
CPPUNIT_ASSERT_EQUAL(xA2Shape->getPosition().X, xD2Shape->getPosition().X);
CPPUNIT_ASSERT_GREATER(xA2Shape->getPosition().Y, xD2Shape->getPosition().Y);
+ // Without the accompanying fix in place, this test would have failed: width was expected to be
+ // 4887, was actually 7331.
+ uno::Reference<drawing::XShape> xA1Shape(xA1, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xA1Shape.is());
+ CPPUNIT_ASSERT_EQUAL(xA1Shape->getSize().Height, xA1Shape->getSize().Width);
+
xDocShRef->DoClose();
}