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
|
if not Assigned(AStylesNode) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
nodeName := AStylesNode.NodeName;
|
||||||
numFmtIndexDefault := FindNumFormatByName('N0');
|
numFmtIndexDefault := FindNumFormatByName('N0');
|
||||||
|
|
||||||
styleNode := AStylesNode.FirstChild;
|
styleNode := AStylesNode.FirstChild;
|
||||||
@ -3996,7 +3997,7 @@ begin
|
|||||||
family := GetAttrValue(stylenode, 'style:family');
|
family := GetAttrValue(stylenode, 'style:family');
|
||||||
if family = 'table-cell' then begin
|
if family = 'table-cell' then begin
|
||||||
InitFormatRecord(fmt);
|
InitFormatRecord(fmt);
|
||||||
fmt.Name := 'Default';
|
fmt.Name := 'DefaultStyle';
|
||||||
fnt := FWorkbook.GetFont(fmt.FontIndex);
|
fnt := FWorkbook.GetFont(fmt.FontIndex);
|
||||||
fntName := fnt.FontName;
|
fntName := fnt.FontName;
|
||||||
fntSize := fnt.Size;
|
fntSize := fnt.Size;
|
||||||
@ -4054,6 +4055,12 @@ begin
|
|||||||
idx := FCellFormatList.FindIndexOfName(parentstyle);
|
idx := FCellFormatList.FindIndexOfName(parentstyle);
|
||||||
if idx > -1 then
|
if idx > -1 then
|
||||||
fmt := FCellFormatList[idx]^;
|
fmt := FCellFormatList[idx]^;
|
||||||
|
end else
|
||||||
|
if styleName <> '' then
|
||||||
|
begin
|
||||||
|
idx := FCellFormatList.FindIndexOfName(stylename);
|
||||||
|
if idx > -1 then
|
||||||
|
fmt := FCellFormatList[idx]^;
|
||||||
end;
|
end;
|
||||||
fmt.Name := styleName;
|
fmt.Name := styleName;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user