You've already forked lazarus-ccr
fpspreadsheet: Improved handling of default cell format in ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5322 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -3986,6 +3986,7 @@ begin
|
||||
if not Assigned(AStylesNode) then
|
||||
exit;
|
||||
|
||||
nodeName := AStylesNode.NodeName;
|
||||
numFmtIndexDefault := FindNumFormatByName('N0');
|
||||
|
||||
styleNode := AStylesNode.FirstChild;
|
||||
@ -3996,7 +3997,7 @@ begin
|
||||
family := GetAttrValue(stylenode, 'style:family');
|
||||
if family = 'table-cell' then begin
|
||||
InitFormatRecord(fmt);
|
||||
fmt.Name := 'Default';
|
||||
fmt.Name := 'DefaultStyle';
|
||||
fnt := FWorkbook.GetFont(fmt.FontIndex);
|
||||
fntName := fnt.FontName;
|
||||
fntSize := fnt.Size;
|
||||
@ -4054,6 +4055,12 @@ begin
|
||||
idx := FCellFormatList.FindIndexOfName(parentstyle);
|
||||
if idx > -1 then
|
||||
fmt := FCellFormatList[idx]^;
|
||||
end else
|
||||
if styleName <> '' then
|
||||
begin
|
||||
idx := FCellFormatList.FindIndexOfName(stylename);
|
||||
if idx > -1 then
|
||||
fmt := FCellFormatList[idx]^;
|
||||
end;
|
||||
fmt.Name := styleName;
|
||||
|
||||
|
Reference in New Issue
Block a user