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)."/>
|
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)."/>
|
<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"/>
|
<Version Major="1" Minor="17"/>
|
||||||
<Files Count="62">
|
<Files Count="61">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="source\fps.inc"/>
|
<Filename Value="source\fps.inc"/>
|
||||||
<Type Value="Include"/>
|
<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"/>
|
<UnitName Value="xlsxooxmlChart"/>
|
||||||
</Item60>
|
</Item60>
|
||||||
<Item61>
|
<Item61>
|
||||||
<Filename Value="source\common\xlsxooxmlchart_hatch.inc"/>
|
|
||||||
<Type Value="Binary"/>
|
|
||||||
</Item61>
|
|
||||||
<Item62>
|
|
||||||
<Filename Value="source\common\fpspatterns.pas"/>
|
<Filename Value="source\common\fpspatterns.pas"/>
|
||||||
<UnitName Value="fpspatterns"/>
|
<UnitName Value="fpspatterns"/>
|
||||||
</Item62>
|
</Item61>
|
||||||
</Files>
|
</Files>
|
||||||
<CompatibilityMode Value="True"/>
|
<CompatibilityMode Value="True"/>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
@ -6672,6 +6672,7 @@ procedure TsSpreadOOXMLWriter.WriteDrawings(AWorksheet: TsBasicWorksheet);
|
|||||||
descr: String;
|
descr: String;
|
||||||
hlink: String;
|
hlink: String;
|
||||||
xdr_cNvPr: String;
|
xdr_cNvPr: String;
|
||||||
|
rotStr: String = '';
|
||||||
begin
|
begin
|
||||||
book := FWorkbook as TsWorkbook;
|
book := FWorkbook as TsWorkbook;
|
||||||
sheet := TsWorksheet(AWorksheet);
|
sheet := TsWorksheet(AWorksheet);
|
||||||
@ -6688,6 +6689,8 @@ procedure TsSpreadOOXMLWriter.WriteDrawings(AWorksheet: TsBasicWorksheet);
|
|||||||
descr := ExtractFileName(book.GetEmbeddedObj(img.index).Filename);
|
descr := ExtractFileName(book.GetEmbeddedObj(img.index).Filename);
|
||||||
if descr = '' then descr := 'image';
|
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
|
// This part defines the relationship to the graphic and, if available, to
|
||||||
// a hyperlink.
|
// a hyperlink.
|
||||||
xdr_cNvPr := Format('id="%d" name="Graphic %d" descr="%s"', [AIndex+3, AIndex+2, descr]);
|
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 +
|
' </a:stretch>' + LE +
|
||||||
' </xdr:blipFill>' + LE +
|
' </xdr:blipFill>' + LE +
|
||||||
' <xdr:spPr>' + LE +
|
' <xdr:spPr>' + LE +
|
||||||
' <a:xfrm>' + LE +
|
' <a:xfrm%s>' + LE +
|
||||||
' <a:off x="%d" y="%d"/>' + LE +
|
' <a:off x="%d" y="%d"/>' + LE +
|
||||||
' <a:ext cx="%d" cy="%d"/>' + LE + // size in EMU
|
' <a:ext cx="%d" cy="%d"/>' + LE + // size in EMU
|
||||||
' </a:xfrm>' + LE +
|
' </a:xfrm>' + LE +
|
||||||
@ -6742,6 +6745,7 @@ procedure TsSpreadOOXMLWriter.WriteDrawings(AWorksheet: TsBasicWorksheet);
|
|||||||
' <xdr:clientData/>' + LE, [
|
' <xdr:clientData/>' + LE, [
|
||||||
// i + 3, i+2, descr,
|
// i + 3, i+2, descr,
|
||||||
SCHEMAS_DOC_RELS, RelID,
|
SCHEMAS_DOC_RELS, RelID,
|
||||||
|
rotStr, // img.RotationAngle
|
||||||
mmToEMU(x), mmToEMU(y),
|
mmToEMU(x), mmToEMU(y),
|
||||||
mmToEMU(w), mmToEMU(h)
|
mmToEMU(w), mmToEMU(h)
|
||||||
]));
|
]));
|
||||||
|
Loading…
Reference in New Issue
Block a user