Improve html rich text support
If contains only one text fragment with format, then it should be plain text. And the format should be considered as Cell format
This commit is contained in:
@@ -621,6 +621,8 @@ int Worksheet::writeString(int row, int column, const RichString &value, const F
|
||||
|
||||
d->sharedStrings()->addSharedString(value);
|
||||
Format fmt = format.isValid() ? format : d->cellFormat(row, column);
|
||||
if (value.fragmentCount() == 1 && value.fragmentFormat(0).isValid())
|
||||
fmt.mergeFormat(value.fragmentFormat(0));
|
||||
d->workbook->styles()->addXfFormat(fmt);
|
||||
QSharedPointer<Cell> cell = QSharedPointer<Cell>(new Cell(value.toPlainString(), Cell::String, fmt, this));
|
||||
cell->d_ptr->richString = value;
|
||||
|
||||
Reference in New Issue
Block a user