summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-02-26 18:25:00 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-26 20:32:26 +0100
commit0a29c928afa74123bca05dc089c751603d368467 (patch)
tree7e2f03bb0c2aaad57f4232042e23064e8ee3d016 /sd
parentaebc79b670fb60c43dd07e8e963abe019754c092 (diff)
oox smartart, picture strip: fix lack of spacing around the picture list
The snake algorithm in PowerPoint seem to interpret spacing as follows: if you have N elements, then there should be the requested amount of spacing between the elements, and also double amount of spacing around the actual list of elements. With this, the SmartArt and the title shape in the bugdoc no longer overlaps. Change-Id: I5d6885b434bfaff9de9aac595a298a5346524e19 Reviewed-on: https://gerrit.libreoffice.org/68397 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/smartart-picture-strip.pptxbin47928 -> 52395 bytes
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-picture-strip.pptx b/sd/qa/unit/data/pptx/smartart-picture-strip.pptx
index b117e4e70cf6..bfb8d4f2c1bd 100644
--- a/sd/qa/unit/data/pptx/smartart-picture-strip.pptx
+++ b/sd/qa/unit/data/pptx/smartart-picture-strip.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 0d47ad679edb..3d30f576cce0 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -955,6 +955,16 @@ void SdImportTestSmartArt::testPictureStrip()
CPPUNIT_ASSERT_GREATER(xFirstImageShape->getPosition().Y, xSecondImageShape->getPosition().Y);
CPPUNIT_ASSERT_GREATER(xSecondImageShape->getPosition().Y, xThirdImageShape->getPosition().Y);
+ // Make sure that the title shape doesn't overlap with the diagram.
+ // Note that real "no overlap" is asserted here, though in fact what we want is a less strict
+ // condition: that no text part of the title shape and the diagram overlaps.
+ uno::Reference<drawing::XShape> xTitle(getShapeFromPage(1, 0, xDocShRef), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTitle.is());
+ // Without the accompanying fix in place, this test would have failed with 'Expected greater
+ // than: 2873; Actual : 2320', i.e. the title shape and the diagram overlapped.
+ CPPUNIT_ASSERT_GREATER(xTitle->getPosition().Y + xTitle->getSize().Height,
+ xGroup->getPosition().Y);
+
xDocShRef->DoClose();
}