You've already forked lazarus-ccr
fpspreadsheet: Entering an empty string in an unformatted cell of the WorksheetGrid removes the cell from the worksheet. wiki writer takes stores font name.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3608 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -22,11 +22,9 @@ begin
|
||||
|
||||
// Create the spreadsheet
|
||||
MyWorkbook := TsWorkbook.Create;
|
||||
MyWorkbook.SetDefaultFont('Times New Roman', 9);
|
||||
|
||||
MyWorksheet := MyWorkbook.AddWorksheet('Sheet');
|
||||
|
||||
// Use first row and column as a header
|
||||
// Use first row and column as headers
|
||||
Myworksheet.Options := MyWorksheet.Options + [soHasFrozenPanes];
|
||||
Myworksheet.TopPaneHeight := 1;
|
||||
Myworksheet.LeftPaneWidth := 1;
|
||||
|
@ -3427,12 +3427,20 @@ procedure TsWorksheet.WriteCellValueAsString(ACell: PCell; AValue: String);
|
||||
var
|
||||
isPercent: Boolean;
|
||||
number: Double;
|
||||
r, c: Cardinal;
|
||||
begin
|
||||
if ACell = nil then
|
||||
exit;
|
||||
|
||||
if AValue = '' then begin
|
||||
WriteBlank(ACell^.Row, ACell^.Col);
|
||||
if ACell^.UsedFormattingFields = [] then
|
||||
begin
|
||||
r := ACell^.Row;
|
||||
c := ACell^.Col;
|
||||
RemoveCell(r, c);
|
||||
end
|
||||
else
|
||||
WriteBlank(ACell);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
@ -428,6 +428,8 @@ begin
|
||||
// Default font
|
||||
lStyleStr := '';
|
||||
lFont := FWorkbook.GetDefaultFont;
|
||||
if lFont.FontName <> DEFAULTFONTNAME then
|
||||
lStyleStr := lStyleStr + Format('font-family:%s;', [lFont.FontName]);
|
||||
if fssBold in lFont.Style then
|
||||
lStyleStr := lStyleStr + 'font-weight:bold;';
|
||||
if fssItalic in lFont.Style then
|
||||
|
Reference in New Issue
Block a user