diff --git a/components/fpspreadsheet/fpsopendocument.pas b/components/fpspreadsheet/fpsopendocument.pas index 8a276647d..c476e95c5 100755 --- a/components/fpspreadsheet/fpsopendocument.pas +++ b/components/fpspreadsheet/fpsopendocument.pas @@ -2483,8 +2483,6 @@ begin end; function TsSpreadOpenDocWriter.WriteRowStylesXMLAsString: string; -const - FALSE_TRUE: array[boolean] of string = ('false', 'true'); var i: Integer; s: String; @@ -2501,16 +2499,16 @@ begin // Column width Result := Result + - ' ' + LineEnding; + ' ' + LineEnding; // End Result := Result + ' ' + LineEnding; - Result := Format(Result, - [rowStyle.Name, rowStyle.RowHeight, FALSE_TRUE[rowStyle.AutoRowHeight]], - FPointSeparatorSettings - ); + Result := Format(Result, [rowStyle.Name, rowStyle.RowHeight], FPointSeparatorSettings); end; end; @@ -2883,10 +2881,14 @@ var DisplayStr: string; lStyle: string = ''; lIndex: Integer; + valType: String; begin + valType := 'float'; if ACell^.UsedFormattingFields <> [] then begin lIndex := FindFormattingInList(ACell); lStyle := ' table:style-name="ce' + IntToStr(lIndex) + '" '; + if pos('%', ACell^.NumberFormatStr) <> 0 then + valType := 'percentage'; end else lStyle := ''; @@ -2899,7 +2901,7 @@ begin DisplayStr:=FloatToStr(AValue); // Uses locale decimal separator end; FCellContent := - ' ' + LineEnding + + ' ' + LineEnding + ' ' + DisplayStr + '' + LineEnding + ' ' + LineEnding; end;