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 2014/01/29 15:04:55 UTC

[Bug 124143] New: glue points on svg graphics are not read, when order in file format is first svg second png

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

            Bug ID: 124143
        Issue Type: DEFECT
           Summary: glue points on svg graphics are not read, when order
                    in file format is first svg second png
           Product: Draw
           Version: 4.1.0-dev
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: open-import
          Assignee: issues@openoffice.apache.org
          Reporter: rb.henschel@t-online.de
                CC: issues@openoffice.apache.org

Created attachment 82430
  --> https://issues.apache.org/ooo/attachment.cgi?id=82430&action=edit
Additional glue points on svg graphic, produced by LibreOffice.

If the order of image is first svg, second png, then additional glue points are
not read. Such files are generated be LO, see the attached document. When the
order is first png, second svg (as written by AOO), then the glue points are
correctly read.

-- 
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.

[Issue 124143] glue points on svg graphics are not read, when order in file format is first svg second png

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

Regina Henschel <rb...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED

--- Comment #7 from Regina Henschel <rb...@t-online.de> ---
Verified on AOO411m4(Build:9774)  -  Rev. 1614049 (=RC1)

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

[Bug 124143] glue points on svg graphics are not read, when order in file format is first svg second png

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

--- Comment #2 from Armin Le Grand <Ar...@me.com> ---
Taking a look, strage, the GluePoints are outside the graphics as it should
be...

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

[Bug 124143] glue points on svg graphics are not read, when order in file format is first svg second png

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ACCEPTED
   Target Milestone|---                         |4.1.0
     Ever confirmed|0                           |1

--- Comment #3 from Armin Le Grand <Ar...@me.com> ---
Regina, indeed a strange handling is involved here. Problem is the import
structure the xml importer is using. When e.g. a rectangle is used, the
GluePoints are part of the draw:rect element. Example (a):

        <draw:rect draw:style-name="gr2" draw:text-style-name="P1"
draw:layer="layout" svg:width="8.4cm" svg:height="6.6cm" svg:x="5.4cm"
svg:y="20.5cm">
          <draw:glue-point draw:id="4" svg:x="-2.142cm" svg:y="-1.666cm"/>
          <draw:glue-point draw:id="5" svg:x="-1.547cm" svg:y="0.454cm"/>
          <draw:glue-point draw:id="6" svg:x="0.714cm" svg:y="-0.606cm"/>
          <draw:glue-point draw:id="7" svg:x="2.857cm" svg:y="2.727cm"/>
          <text:p/>
        </draw:rect>

For GraphicObject, a draw:frame is used, which has as members a number of
draw:image which all represent the same image in various possible resolutions,
and the draw:glue-point also. Example (b):

        <draw:frame draw:style-name="gr1" draw:text-style-name="P1"
draw:layer="layout" svg:width="14.138cm" svg:height="14.138cm" svg:x="3.3cm"
svg:y="2.462cm">
          <draw:image
xlink:href="Pictures/100002010000021600000216274DD2E6.png" xlink:type="simple"
xlink:show="embed" xlink:actuate="onLoad"/>
          <draw:image
xlink:href="Pictures/10000FF90000373B0000373BA044D74E.svg" xlink:type="simple"
xlink:show="embed" xlink:actuate="onLoad">
            <text:p/>
          </draw:image>
          <draw:glue-point draw:id="4" svg:x="-1.18cm" svg:y="-1.295cm"/>
          <draw:glue-point draw:id="5" svg:x="-1.039cm" svg:y="-0.163cm"/>
          <draw:glue-point draw:id="6" svg:x="-0.048cm" svg:y="-0.234cm"/>
          <draw:glue-point draw:id="7" svg:x="0.729cm" svg:y="0.756cm"/>
          <draw:glue-point draw:id="8" svg:x="1.719cm" svg:y="0.26cm"/>
        </draw:frame>

The importer starts creating the needed xShape (the model object) in case (a)
with reading draw:rect, the draw:glue-point are then added to the current
xShape (which is the rectangle). This workls.

In case (b) the xShape gets not created with the start of draw:frame, but with
the start of draw:image, so in the example two xShapes are created and later
the most valuable is kept and the others are thrown away again. Problem is that
here also the draw:glue-point will be added to the 'current' xShape, thus
always in the example to the 2nd one. If the 2nd one is thrown away, the
GluePoints are gone.
Theoretically (not tried) this also means that when the draw:glue-point would
be added to the draw:frame before the draw:image these will be lost or added to
the xShape imported before since it would be the 'current' xShape.

To really do this in a clean way would mean to rewrite the importer for the
draw:frame case what is too expensive for now. I will try to move the read
GluePoints to the correct target shape at decision time (when the images with
less quality get thrown away)...

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

[Bug 124143] glue points on svg graphics are not read, when order in file format is first svg second png

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

--- Comment #4 from Armin Le Grand <Ar...@me.com> ---
Added methods to rescue already added GluePoints from a source shape and
context to a destination one by copying. This will produce the same data as if
the GluePoints were directly added to the destination. The critical point is to
get back the original mapping ID read at GluePoint import time (in the ODF
thats the draw:id from a draw:glue-point), but got that working.
Cheked with provided sample, but also with hand-made tests (by exchanging the
draw:image entries), works as intended. Preparing commit...

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

[Bug 124143] glue points on svg graphics are not read, when order in file format is first svg second png

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

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

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

--- Comment #6 from Armin Le Grand <Ar...@me.com> ---
Okay, done.

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

[Bug 124143] glue points on svg graphics are not read, when order in file format is first svg second png

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Armin.Le.Grand@me.com
           Assignee|issues@openoffice.apache.or |Armin.Le.Grand@me.com
                   |g                           |

--- Comment #1 from Armin Le Grand <Ar...@me.com> ---
There is a reason to first write PNG: All used older office versions before the
change will *not* be able to load files where the SVG is first, so I strongly
recommend to keep that order, also strongly recommend that order to any other
ODF writing application.
I can have a look at it, though. I guess ODF allows both, so it at least is a
valid ODF file.

-- 
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 124143] glue points on svg graphics are not read, when order in file format is first svg second png

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

--- Comment #5 from SVN Robot <sv...@dev.null.org> ---
"alg" committed SVN revision 1564400 into trunk:
i124143 for draw:frame containing multiple draw:image and draw:glue-point it
...

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