fpspreadsheet: Write image rotation angle to xlsx.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9760 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
e5fd4afe65
commit
dadd421d58
@ -33,7 +33,7 @@
|
||||
This package is all you need if you don't want graphical components (such as grids and charts)."/>
|
||||
<License Value="LGPL with static linking exception. This is the same license as is used in the LCL (Lazarus Component Library)."/>
|
||||
<Version Major="1" Minor="17"/>
|
||||
<Files Count="62">
|
||||
<Files Count="61">
|
||||
<Item1>
|
||||
<Filename Value="source\fps.inc"/>
|
||||
<Type Value="Include"/>
|
||||
@ -314,13 +314,9 @@ This package is all you need if you don't want graphical components (such a
|
||||
<UnitName Value="xlsxooxmlChart"/>
|
||||
</Item60>
|
||||
<Item61>
|
||||
<Filename Value="source\common\xlsxooxmlchart_hatch.inc"/>
|
||||
<Type Value="Binary"/>
|
||||
</Item61>
|
||||
<Item62>
|
||||
<Filename Value="source\common\fpspatterns.pas"/>
|
||||
<UnitName Value="fpspatterns"/>
|
||||
</Item62>
|
||||
</Item61>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<i18n>
|
||||
|
@ -6672,6 +6672,7 @@ procedure TsSpreadOOXMLWriter.WriteDrawings(AWorksheet: TsBasicWorksheet);
|
||||
descr: String;
|
||||
hlink: String;
|
||||
xdr_cNvPr: String;
|
||||
rotStr: String = '';
|
||||
begin
|
||||
book := FWorkbook as TsWorkbook;
|
||||
sheet := TsWorksheet(AWorksheet);
|
||||
@ -6688,6 +6689,8 @@ procedure TsSpreadOOXMLWriter.WriteDrawings(AWorksheet: TsBasicWorksheet);
|
||||
descr := ExtractFileName(book.GetEmbeddedObj(img.index).Filename);
|
||||
if descr = '' then descr := 'image';
|
||||
|
||||
if img.RotationAngle <> 0.0 then rotStr := Format(' rot="%.0f"', [img.RotationAngle * 60000]);
|
||||
|
||||
// This part defines the relationship to the graphic and, if available, to
|
||||
// a hyperlink.
|
||||
xdr_cNvPr := Format('id="%d" name="Graphic %d" descr="%s"', [AIndex+3, AIndex+2, descr]);
|
||||
@ -6730,7 +6733,7 @@ procedure TsSpreadOOXMLWriter.WriteDrawings(AWorksheet: TsBasicWorksheet);
|
||||
' </a:stretch>' + LE +
|
||||
' </xdr:blipFill>' + LE +
|
||||
' <xdr:spPr>' + LE +
|
||||
' <a:xfrm>' + LE +
|
||||
' <a:xfrm%s>' + LE +
|
||||
' <a:off x="%d" y="%d"/>' + LE +
|
||||
' <a:ext cx="%d" cy="%d"/>' + LE + // size in EMU
|
||||
' </a:xfrm>' + LE +
|
||||
@ -6742,6 +6745,7 @@ procedure TsSpreadOOXMLWriter.WriteDrawings(AWorksheet: TsBasicWorksheet);
|
||||
' <xdr:clientData/>' + LE, [
|
||||
// i + 3, i+2, descr,
|
||||
SCHEMAS_DOC_RELS, RelID,
|
||||
rotStr, // img.RotationAngle
|
||||
mmToEMU(x), mmToEMU(y),
|
||||
mmToEMU(w), mmToEMU(h)
|
||||
]));
|
||||
|
Loading…
Reference in New Issue
Block a user