From 866b232fa851318d77052026abd0d644aa5006e8 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 26 Jul 2020 21:43:23 +0000 Subject: [PATCH] fpspreadsheet: Add some comments git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7573 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../source/common/fpsopendocument.pas | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/components/fpspreadsheet/source/common/fpsopendocument.pas b/components/fpspreadsheet/source/common/fpsopendocument.pas index ba2fd7b16..4a1f672bf 100644 --- a/components/fpspreadsheet/source/common/fpsopendocument.pas +++ b/components/fpspreadsheet/source/common/fpsopendocument.pas @@ -2021,6 +2021,13 @@ var isHidden: Boolean; isPageBreak: Boolean; begin + { + for j := 0 to FCellFormatList.Count-1 do + begin + WriteLn(j, ' ', FCellFormatList[j]^.Name); + end; + } + s := GetAttrValue(AColNode, 'table:style-name'); colStyleIndex := FindColStyleByName(s); if colStyleIndex <> -1 then @@ -2730,7 +2737,7 @@ begin FreeAndNil(Doc); end; - //process the content.xml file + // process the content.xml file XMLStream := CreateXMLStream; try if UnzipToStream(AStream, 'content.xml', XMLStream) then @@ -6136,6 +6143,8 @@ begin 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); var i: Integer; @@ -6790,6 +6799,18 @@ begin AppendToStream(AStream, ''); + { --- causes trouble with empty columns + AppendToStream(AStream, + '' + + '' + + WriteDefaultFontXMLAsString + +// '' + + ''); + } + + AppendToStream(AStream, + ''); + AppendToStream(AStream, '', WriteDefaultFontXMLAsString, @@ -6805,6 +6826,7 @@ begin AppendToStream(AStream, ''); + end; procedure TsSpreadOpenDocWriter.WriteRowsAndCells(AStream: TStream;