DR 09-0173 - WML: shapeID attribute semantics missing

Shawn Villaron shawnv at microsoft.com
Thu Mar 18 23:41:59 CET 2010


This is in regards to the CH defect report.

I'm interested in getting some guidance from the group on how we should respond to this defect report.

The defect report states that it is undefined as to what a consuming application should do with the objectEmbed and/or ObjectLink elements if the shapeId attribute is missing or otherwise doesn't resolve to a known shape in the WordprocessingML document.

We have a couple of options:


1.       we can leave it undefined and allow implementers to best decide how they want to handle error cases like this; or,

2.       we can provide some prescriptive guidance.

If we elect choice 2, the most obvious guidance is that the embedded data of the shape is lost ( that is, it now is just a shape instead of a shape with embedded data ).  A quick look at the XML can show why this is:

<w:document ...>
    <w:body>
        <w:bookmarkStart w:id="0" w:name="_GoBack"/>
        <w:p w:rsidR="00766663" w:rsidRDefault="005C624B">
            <w:r>
                <w:object w:dxaOrig="7191" w:dyaOrig="5399">
                    <v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m at 4@5l at 4@11 at 9@11 at 9@5xe" filled="f" stroked="f">
                        <v:stroke joinstyle="miter"/>
                        <v:formulas>
...
                        </v:formulas>
                        <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
                        <o:lock v:ext="edit" aspectratio="t"/>
                    </v:shapetype>
                    <v:shape id="_x0000_i1025" type="#_x0000_t75" style="width:5in;height:270pt" o:ole="">
                        <v:imagedata r:id="rId5" o:title=""/>
                    </v:shape>
                    <o:OLEObject Type="Embed" ProgID="PowerPoint.Show.12" ShapeID="_x0000_i1025" DrawAspect="Content" ObjectID="_1330431051" r:id="rId6"/>
                </w:object>
            </w:r>
            <w:bookmarkEnd w:id="0"/>
        </w:p>
        ...
    </w:body>
</w:document>

What it comes down to is this.


*         There is an object ( green ) on the document surface.  The object is made up of a shape type ( ignore this for the purposes of this defect report), a shape ( blue ) which represents the cached visual of the embedding, and the embedded object ( red ) which represents the embedded data.

*         The shapeId attribute of the OLEObject element is used to associate the embedded object with the shape.  If the shapeId is missing or doesn't resolve, it is ambiguous as to with which shape the OLEObject should be associated.

Microsoft Word's behavior here is that it discards the OLEObject and leave the shape on the surface.  That said, it's perfectly reasonable for other implementations to decide on their own behavior.

Looking forward to hearing what everyone thinks we should do here.

Thanks,

shawn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.vse.cz/pipermail/sc34wg4/attachments/20100318/cbb306e0/attachment-0001.htm>


More information about the sc34wg4 mailing list