diff --git a/components/fpspreadsheet/fpsopendocument.pas b/components/fpspreadsheet/fpsopendocument.pas index c91ae8b45..9bf4df894 100755 --- a/components/fpspreadsheet/fpsopendocument.pas +++ b/components/fpspreadsheet/fpsopendocument.pas @@ -497,12 +497,16 @@ begin ' ' + LineEnding; // Fields + + // style:text-properties if uffBold in FFormattingStyles[i].UsedFormattingFields then Result := Result + ' ' + LineEnding; + // style:table-cell-properties if (uffBorder in FFormattingStyles[i].UsedFormattingFields) or - (uffBackgroundColor in FFormattingStyles[i].UsedFormattingFields) then + (uffBackgroundColor in FFormattingStyles[i].UsedFormattingFields) or + (uffWordWrap in FFormattingStyles[i].UsedFormattingFields) then begin Result := Result + ' ' + LineEnding; end; @@ -660,9 +669,13 @@ var StrValue: string; DisplayStr: string; lStyle: string = ''; + lIndex: Integer; begin - if uffBold in ACell^.UsedFormattingFields then - lStyle := ' table:style-name="bold" '; + if ACell^.UsedFormattingFields <> [] then + begin + lIndex := FindFormattingInList(ACell); + lStyle := ' table:style-name="ce' + IntToStr(lIndex) + '" '; + end; // The row should already be the correct one if IsInfinite(AValue) then begin diff --git a/components/fpspreadsheet/fpspreadsheet.pas b/components/fpspreadsheet/fpspreadsheet.pas index e1dbdfe7d..91f8a150c 100755 --- a/components/fpspreadsheet/fpspreadsheet.pas +++ b/components/fpspreadsheet/fpspreadsheet.pas @@ -89,7 +89,8 @@ type {@@ List of possible formatting fields } - TsUsedFormattingField = (uffTextRotation, uffBold, uffBorder, uffBackgroundColor); + TsUsedFormattingField = (uffTextRotation, uffBold, uffBorder, uffBackgroundColor, + uffWordWrap); {@@ Describes which formatting fields are active }