Parameter for addShape for a child of a group in oox import

Miklos Vajna vmiklos at
Mon May 3 13:47:51 UTC 2021

Hi Regina,

On Fri, Apr 30, 2021 at 04:39:41PM +0200, Regina Henschel <rb.henschel at> wrote:
> So I still need a way to transport the values from the group to its
> children. Besides my first idea to put all group infos into a struct and use
> that instead of the aTransformation parameter, I can also think to put them
> into the grabbag of each child.

The primary purpose of the grabbag property of shapes is to carry
information from the importer to the exporter, when the document model
doesn't handle some information. So if you can solve this without
grabbags, that would be nice.

> Such transport of information from group to child is also needed, if e.g. 3D
> transformations are not made on the individual shapes but on the group.
> MSOffice allows to apply attributes to the group and writes it that way to
> file, but LibreOffice has no attributes on groups.

Yes, that's what I recall as well, our group shape is just a container
of shapes.

> I'm still interested in you opinion how to design it.

oox/ code creates oox::drawing::Shape instances, then once all of them
is created, it turns them into XShapes ("creates and inserts them").

Do you think it would be possible to improve
oox::drawingml::Shape::createAndInsert(), so that it would get not only
the parent transform but also the parent oox::drawing::Shape? If that
would work, then setChildPosition() and setChildSize() already stores
chOff/chExt values on the parent, and you could access the needed

If this doesn't work, then the above grabbag way is also acceptable (I
would say), just less nice: what you set there will stay around even
after the import finished and nobody needs that.



More information about the LibreOffice mailing list