https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #7 from Armin Le Grand <[email protected]> ---
ALG: Thanks Regina, this makes me believe that for cube and sphere this never
worked at all; I just did not want to believe this, but it's true. It works as
follows:

(a) AddAttribute is used to collect any attributes at the export instance
(b) SvXMLElementExport constructor consumes all these, resets the list to null
(c) SvXMLElementExport destructor closes the scope

This is not very object oriented (that would require that attributes are
collected at the instance of the opened scope AKA SvXMLElementExport) and leads
to dangerous situations:

- All attributes have to be added before the scope is created using
SvXMLElementExport
- Attributes added after this are lost
- new scopes should only be created between (b) and (c); creating one between
(a) and (b) will add the attributes to the wrong scope.
This is especially dangerous with calling sub-routines in-between (a) (b) and
(c) without knowing if in there evtl. new scopes get opened and thus is a mine
field. Guess what: No line of documentation at the involved classes...

The result is that XMLShapeExport::ImpExport3DShape for cases
XmlShapeTypeDraw3DCubeObject and XmlShapeTypeDraw3DSphereObject create
attributes for position and size, but these never get written because they get
added after the scope is created using SvXMLElementExport. This only was never
detected since users usually do not resize cubes and spheres, but only modify
the 3D scene this shapes reside in. Argh!

Okay, but the fix should be easy...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.

Reply via email to