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

Armin Le Grand <[email protected]> changed:

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

--- Comment #3 from Armin Le Grand <[email protected]> ---
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.

Reply via email to