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
|
// Create the spreadsheet
|
||||||
MyWorkbook := TsWorkbook.Create;
|
MyWorkbook := TsWorkbook.Create;
|
||||||
MyWorkbook.SetDefaultFont('Times New Roman', 9);
|
|
||||||
|
|
||||||
MyWorksheet := MyWorkbook.AddWorksheet('Sheet');
|
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.Options := MyWorksheet.Options + [soHasFrozenPanes];
|
||||||
Myworksheet.TopPaneHeight := 1;
|
Myworksheet.TopPaneHeight := 1;
|
||||||
Myworksheet.LeftPaneWidth := 1;
|
Myworksheet.LeftPaneWidth := 1;
|
||||||
|
@ -3427,12 +3427,20 @@ procedure TsWorksheet.WriteCellValueAsString(ACell: PCell; AValue: String);
|
|||||||
var
|
var
|
||||||
isPercent: Boolean;
|
isPercent: Boolean;
|
||||||
number: Double;
|
number: Double;
|
||||||
|
r, c: Cardinal;
|
||||||
begin
|
begin
|
||||||
if ACell = nil then
|
if ACell = nil then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if AValue = '' then begin
|
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;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -428,6 +428,8 @@ begin
|
|||||||
// Default font
|
// Default font
|
||||||
lStyleStr := '';
|
lStyleStr := '';
|
||||||
lFont := FWorkbook.GetDefaultFont;
|
lFont := FWorkbook.GetDefaultFont;
|
||||||
|
if lFont.FontName <> DEFAULTFONTNAME then
|
||||||
|
lStyleStr := lStyleStr + Format('font-family:%s;', [lFont.FontName]);
|
||||||
if fssBold in lFont.Style then
|
if fssBold in lFont.Style then
|
||||||
lStyleStr := lStyleStr + 'font-weight:bold;';
|
lStyleStr := lStyleStr + 'font-weight:bold;';
|
||||||
if fssItalic in lFont.Style then
|
if fssItalic in lFont.Style then
|
||||||
|
Reference in New Issue
Block a user