You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/10/24 11:07:06 UTC

[Bug 123542] New: In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

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

            Bug ID: 123542
        Issue Type: DEFECT
           Summary: In 3dScene the attributes dr3d:min-edge and
                    dr3d:max-edge of a dr3d:cube are lost
           Product: Draw
           Version: 4.1.0-dev
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: save-export
          Assignee: issues@openoffice.apache.org
          Reporter: rb.henschel@t-online.de
                CC: issues@openoffice.apache.org

Created attachment 81816
  --> https://issues.apache.org/ooo/attachment.cgi?id=81816&action=edit
Example file with dr3d:min-edge and dr3d:max-edge

Open the attached document. It has a 10cm x 10cm x 10cm extrusion object
without fill. Therein is a dr3d:cube with dr3d:min-edge="(1000 1000 1000)" and
dr3:max-edge="(9000 7000 5000)". You see the dr3d:cube object as solid cuboid
in the size which respond to the min-edge and max-edge attributes.

Save the document as new document and reopen it. Notice, that the dr3d:cube is
reset to the default cube.

Expected behavior: The dr3d:min-edge and dr3d:max-edge attributes are
preserved, even if there exists no UI for them.

Less good, but acceptable as intermediate solution, convert the attributes to a
transformation matrix on import.

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #11 from Armin Le Grand <Ar...@me.com> ---
*** Bug 123561 has been marked as a duplicate of this bug. ***

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #4 from Armin Le Grand <Ar...@me.com> ---
ALG: @Regina: You are looking for defaults; some are comared in the exporters
(e.g. XMLShapeExport::ImpExport3DShape, see 'if(aPos3D !=
::basegfx::B3DVector(-2500.0, -2500.0, -2500.0)) // write only when not
default'), please look for similar stuff in xmloff project.

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #5 from Armin Le Grand <Ar...@me.com> ---
ALG: I found that the SvXMLElementExport constructor always clears the AttrList
on the exporter, but this would mean that the object size of sphere and cube
were never exported at all;
@Regina: How did you create that file? Is it a result of saving in AOO or
hand-crafted?

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #2 from Armin Le Grand <Ar...@me.com> ---
ALG: Cube is written in XMLShapeExport::ImpExport3DShape, and all the values
are passed as needed, no ignore due to defaults or similar. It looks as if the
values created are simply not written...

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

Armin Le Grand <Ar...@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |CONFIRMED
                 CC|                            |Armin.Le.Grand@me.com
           Assignee|issues@openoffice.apache.or |Armin.Le.Grand@me.com
                   |g                           |
   Target Milestone|---                         |4.1.0
     Ever confirmed|0                           |1

--- Comment #1 from Armin Le Grand <Ar...@me.com> ---
ALG: In the new saved file the entries for dr3d:min-edge and dr3d:max-edge in
dr3d:cube are simply missing. Same for dr3d:transform for the dr3d:extrude
object. I remember that there was something in ODF export to not write that
stuff when it's equal to the default values; need to check the exporter...

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #7 from Armin Le Grand <Ar...@me.com> ---
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.

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #8 from Armin Le Grand <Ar...@me.com> ---
ALG: Corrected cases XmlShapeTypeDraw3DCubeObject and
XmlShapeTypeDraw3DSphereObject in XMLShapeExport::ImpExport3DShape to create
the new scope after adding the attributes, not before that. Reload works as
expected. Preparing commit...

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #3 from Armin Le Grand <Ar...@me.com> ---
ALG: Already happens in 401, 400, 341, 330, 320 and 220, seems a rather old
problem...

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #6 from Regina Henschel <rb...@t-online.de> ---
It is "hand-crafted", following the ODF spec. A sphere example is in bug
123561.

I had tried "hand-crafted" transformation matrices too. I have found no
problems with transformation matrices, only the direct attributes are missing.

(Thanks for the hint to xmloff, it confirms my observations.)

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

Armin Le Grand <Ar...@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Armin Le Grand <Ar...@me.com> ---
ALG: Checked other cases, seemed to have been the only ones. Comitted, done.

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

[Bug 123542] In 3dScene the attributes dr3d:min-edge and dr3d:max-edge of a dr3d:cube are lost

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=123542

--- Comment #9 from SVN Robot <sv...@dev.null.org> ---
"alg" committed SVN revision 1537113 into trunk:
i123542 corrected ODF XML export of 3D cube and sphere

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