You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Frank-Michael Moser <mo...@decodon.com> on 2014/09/30 19:23:38 UTC

Using XSLFGroupShape with Anchor and InteriorAnchor

I suppose, I missed the concept behind setting anchors on XSLF group shapes:

First I noticed, that when I use grouping to create a PPTX slide show, the PPTX looks empty in MS
Powerpoint 2007 in contrast to Libre Office where it looks fine. After some investigation, I found
that the PPTX looks fine in MS Powerpoint, when I set an arbitrary anchor on the XSLFGroupShape,
e.g. [0,0,1,1]. But now the PPTX seems empty in Libre-Office. After some more investigation I came
out with setting an arbitrary anchor AND an interior anchor on the group shape lets the PPTX look
fine in MS Powerpoint 2007 AND Libre Office.

Now my questions:

1) Shouldn't a PPTX created by the XSLF high-level API (only), look the same in MS Powerpoint 2007
and Libre Office?
2) Shouldn't the anchors of a group computed implicitely from the anchors of their children?
3) What do I miss, how to use group anchors correctly?

I have attached a small self-contained test class which describes the behaviour from above in for
cases:

1) Test cases 1 and 4 (with no anchor at all or with both the anchor and the interior anchor set)
look fine in Libre Office while test cases 2 and 3 (with either the anchor or the interior anchor
set) do not.
2) Test cases 2 and 4 (with at least the anchor set) look fine in MS Powerpoint 2007 while test
cases 1 and 3 (without the regular anchor set) do not.

Fortunately test case 4 looks fine in MS Powerpoint as well as Libre Office, but I would prefer to
understand, why, instead of ending up with the outcome of trial and error.

Thanks in advance for any comment on this,
Frank-Michael