


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<xdr:twoCellAnchor editAs="oneCell">
<xdr:from>
<xdr:col>2</xdr:col>
<xdr:colOff>9525</xdr:colOff>
<xdr:row>3</xdr:row>
<xdr:rowOff>28575</xdr:rowOff>
</xdr:from>
<xdr:to>
<xdr:col>4</xdr:col>
<xdr:colOff>57150</xdr:colOff>
<xdr:row>6</xdr:row>
<xdr:rowOff>95250</xdr:rowOff>
</xdr:to>
<xdr:pic>
<xdr:nvPicPr>
<xdr:cNvPr id="1025" name="Picture 1" descr="logo"/>
<xdr:cNvPicPr>
<a:picLocks noChangeAspect="1" noChangeArrowheads="1"/>
</xdr:cNvPicPr>
</xdr:nvPicPr>
<xdr:blipFill>
<a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId1"/>
<a:srcRect/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</xdr:blipFill>
<xdr:spPr bwMode="auto">
<a:xfrm>
<a:off x="1228725" y="514350"/>
<a:ext cx="1266825" cy="552450"/>
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst/>
</a:prstGeom>
<a:noFill/>
</xdr:spPr>
</xdr:pic>
<xdr:clientData/>
</xdr:twoCellAnchor>
</xdr:wsDr>
In the XML fragment of –
<xdr:wsDr xmlns:xdr=http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing…>
<xdr:twoCellAnchor editAs="oneCell">
The attribute “editAs” specifies how the drawing object is moved/resized when the rows and columns are resized.
<xdr:colOff> and <xdr:rowOff> elements determines the actual placement of the drawing within the spreadsheet along with row and column information.
avLst (List of Shape Adjust Values)Export shapes in DrawingML

The main entry is the function of XclObjAny::SaveXml() in xcl97,cxx in sc module.
here is the snapshot:
void XclObjAny::SaveXml( XclExpXmlStream& rStrm )
{
if( !mxShape.is() )
return;
sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream();
ShapeExport aDML( XML_xdr, pDrawing, NULL, &rStrm, DrawingML::DOCUMENT_XLSX );
pDrawing->startElement( FSNS( XML_xdr, XML_twoCellAnchor ), // OOXTODO: oneCellAnchor, absoluteAnchor
XML_editAs, GetEditAs( *this ),
FSEND );
Reference< XPropertySet > xPropSet( mxShape, UNO_QUERY );
if (xPropSet.is())
{
WriteFromTo( rStrm, *this );
aDML.WriteShape( mxShape );
}
pDrawing->singleElement( FSNS( XML_xdr, XML_clientData),
// OOXTODO: XML_fLocksWithSheet
// OOXTODO: XML_fPrintsWithSheet
FSEND );
pDrawing->endElement( FSNS( XML_xdr, XML_twoCellAnchor ) );
}
The function of WriteFromTo() write the size/position information of a shape, the real shape info is written in aDML.WriteShape().
There is a table to make sure how to export different shape type. It is defined in oox moduel.
static const NameToConvertMapType& lcl_GetConverters()
{
static bool shape_map_inited = false;
static NameToConvertMapType shape_converters;
if( shape_map_inited )
{
return shape_converters;
}
shape_converters[ "com.sun.star.drawing.ClosedBezierShape" ] = &ShapeExport::WriteClosedBezierShape;
shape_converters[ "com.sun.star.drawing.ConnectorShape" ] = &ShapeExport::WriteConnectorShape;
shape_converters[ "com.sun.star.drawing.CustomShape" ] = &ShapeExport::WriteCustomShape;
shape_converters[ "com.sun.star.drawing.EllipseShape" ] = &ShapeExport::WriteEllipseShape;
shape_converters[ "com.sun.star.drawing.GraphicObjectShape" ] = &ShapeExport::WriteGraphicObjectShape;
shape_converters[ "com.sun.star.drawing.LineShape" ] = &ShapeExport::WriteLineShape;
shape_converters[ "com.sun.star.drawing.OpenBezierShape" ] = &ShapeExport::WriteOpenBezierShape;
shape_converters[ "com.sun.star.drawing.RectangleShape" ] = &ShapeExport::WriteRectangleShape;
shape_converters[ "com.sun.star.drawing.TextShape" ] = &ShapeExport::WriteTextShape;
shape_converters[ "com.sun.star.presentation.DateTimeShape" ] = &ShapeExport::WriteTextShape;
shape_converters[ "com.sun.star.presentation.FooterShape" ] = &ShapeExport::WriteTextShape;
shape_converters[ "com.sun.star.presentation.HeaderShape" ] = &ShapeExport::WriteTextShape;
shape_converters[ "com.sun.star.presentation.NotesShape" ] = &ShapeExport::WriteTextShape;
shape_converters[ "com.sun.star.presentation.OutlinerShape" ] = &ShapeExport::WriteTextShape;
shape_converters[ "com.sun.star.presentation.SlideNumberShape" ] = &ShapeExport::WriteTextShape;
shape_converters[ "com.sun.star.presentation.TitleTextShape" ] = &ShapeExport::WriteTextShape;
shape_map_inited = true;
return shape_converters;
}
And a lot of shape use ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) to export the real content.