| 573 | } |
| 574 | |
| 575 | bool ConditionalFormattingPrivate::readCfVo(QXmlStreamReader &reader, XlsxCfVoData &cfvo) |
| 576 | { |
| 577 | Q_ASSERT(reader.name() == QStringLiteral("cfvo")); |
| 578 | |
| 579 | QXmlStreamAttributes attrs = reader.attributes(); |
| 580 | |
| 581 | QString type = attrs.value(QLatin1String("type")).toString(); |
| 582 | ConditionalFormatting::ValueObjectType t; |
| 583 | if (type == QLatin1String("formula")) |
| 584 | t = ConditionalFormatting::VOT_Formula; |
| 585 | else if (type == QLatin1String("max")) |
| 586 | t = ConditionalFormatting::VOT_Max; |
| 587 | else if (type == QLatin1String("min")) |
| 588 | t = ConditionalFormatting::VOT_Min; |
| 589 | else if (type == QLatin1String("num")) |
| 590 | t = ConditionalFormatting::VOT_Num; |
| 591 | else if (type == QLatin1String("percent")) |
| 592 | t = ConditionalFormatting::VOT_Percent; |
| 593 | else //if (type == QLatin1String("percentile")) |
| 594 | t = ConditionalFormatting::VOT_Percentile; |
| 595 | |
| 596 | cfvo.type = t; |
| 597 | cfvo.value = attrs.value(QLatin1String("val")).toString(); |
| 598 | if (attrs.value(QLatin1String("gte")) == QLatin1String("0")) { |
| 599 | //default is true |
| 600 | cfvo.gte = false; |
| 601 | } |
| 602 | return true; |
| 603 | } |
| 604 | |
| 605 | bool ConditionalFormatting::loadFromXml(QXmlStreamReader &reader, Styles *styles) |
| 606 | { |