fpspreadsheet: Add some comments

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7573 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-07-26 21:43:23 +00:00
parent edfd9698ca
commit 866b232fa8

View File

@ -2021,6 +2021,13 @@ var
isHidden: Boolean; isHidden: Boolean;
isPageBreak: Boolean; isPageBreak: Boolean;
begin begin
{
for j := 0 to FCellFormatList.Count-1 do
begin
WriteLn(j, ' ', FCellFormatList[j]^.Name);
end;
}
s := GetAttrValue(AColNode, 'table:style-name'); s := GetAttrValue(AColNode, 'table:style-name');
colStyleIndex := FindColStyleByName(s); colStyleIndex := FindColStyleByName(s);
if colStyleIndex <> -1 then if colStyleIndex <> -1 then
@ -2730,7 +2737,7 @@ begin
FreeAndNil(Doc); FreeAndNil(Doc);
end; end;
//process the content.xml file // process the content.xml file
XMLStream := CreateXMLStream; XMLStream := CreateXMLStream;
try try
if UnzipToStream(AStream, 'content.xml', XMLStream) then if UnzipToStream(AStream, 'content.xml', XMLStream) then
@ -6136,6 +6143,8 @@ begin
end; end;
end; end;
{ Writes the "office:automatic" > "style:style" node for table-column style family
in content.xml for all column records. }
procedure TsSpreadOpenDocWriter.WriteColStyles(AStream: TStream); procedure TsSpreadOpenDocWriter.WriteColStyles(AStream: TStream);
var var
i: Integer; i: Integer;
@ -6790,6 +6799,18 @@ begin
AppendToStream(AStream, AppendToStream(AStream,
'<office:styles>'); '<office:styles>');
{ --- causes trouble with empty columns
AppendToStream(AStream,
'<style:default-style style:family="table-cell">' +
'<style:paragraph-properties style:tab-stop-distance="1.25cm" />' +
WriteDefaultFontXMLAsString +
// '<style:text-properties style:font-name="Liberation Sans" />' +
'</style:default-style>');
}
AppendToStream(AStream,
'<style:style style:name="Default" style:famile="table-cell" />');
AppendToStream(AStream, AppendToStream(AStream,
'<style:style style:name="Default" style:family="table-cell">', '<style:style style:name="Default" style:family="table-cell">',
WriteDefaultFontXMLAsString, WriteDefaultFontXMLAsString,
@ -6805,6 +6826,7 @@ begin
AppendToStream(AStream, AppendToStream(AStream,
'</office:styles>'); '</office:styles>');
end; end;
procedure TsSpreadOpenDocWriter.WriteRowsAndCells(AStream: TStream; procedure TsSpreadOpenDocWriter.WriteRowsAndCells(AStream: TStream;