My question is : How to insert a shape in cells of the table on the left side of the cell.
This code put the shape center.
Code: Select all
TableCell:= Table.getCellByPosition(c-1, r-1); //c r
Shape:= Document.createInstance('com.sun.star.text.TextGraphicObject');
objSize:= result.getsize;
objSize.Width := w*35; //40
objSize.Height := h*35; //40
result.setSize(objSize) ;
Fic := 'file:///'+StringReplace(nomfic, '\', '/', [rfReplaceAll, rfIgnoreCase]);
Shape.GraphicURL := fic;
TableCell.insertTextContent(TableCell, shape, false);