16 lines
432 B
Plaintext
16 lines
432 B
Plaintext
Function _WordGetLastShape();
|
|
Begin
|
|
node := TOfficeApi().Get('CurrentShape');
|
|
if not ifObj(node) then return nil;
|
|
uri := 'w:r/w:drawing/wp:inline/a:graphic/a:graphicData/c:chart';
|
|
cNode := class(TSXml).GetNode(node, uri);
|
|
if ifObj(cNode) then Begin
|
|
chart := TOfficeObj('TChart');
|
|
chart.Init(TOfficeApi().GetDocument(), node, cNode);
|
|
return chart;
|
|
End;
|
|
|
|
pic := TOfficeObj('TPicture');
|
|
pic.Init(node);
|
|
return pic;
|
|
End; |