Kaydet (Commit) b61d2784 authored tarafından Miklos Vajna's avatar Miklos Vajna

oox smartart: fix width of shapes with agl=lin, linDir=fromT

Smaller width only makes sense in the fromL/fromR cases, I think.

Change-Id: I21c643b90556e47593b62abc2466e808d1ef31e5
Reviewed-on: https://gerrit.libreoffice.org/62024
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 71fcb90f
......@@ -358,7 +358,9 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
awt::Size aChildSize = rShape->getSize();
aChildSize.Width /= (nCount + (nCount-1)*fSpace);
// Lineral vertically: no adjustment of width.
if (nDir != XML_fromT)
aChildSize.Width /= (nCount + (nCount-1)*fSpace);
aChildSize.Height /= (nCount + (nCount-1)*fSpace);
awt::Point aCurrPos(0, 0);
......
......@@ -371,6 +371,13 @@ void SdImportTestSmartArt::testVertialBoxList()
// 'actual: 0'.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xShapeGroup->getCount());
uno::Reference<drawing::XShape> xSecondChild(xShapeGroup->getByIndex(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xSecondChild.is());
// Without the accompanying fix in place, this test would have failed with
// 'actual: 7361' (and with the fix: 'actual: 16932', i.e. the width of the
// parent).
CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(10000), xSecondChild->getSize().Width);
xDocShRef->DoClose();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment