MCPcopy Create free account
hub / github.com/KDE/labplot / readCfDataBar

Method readCfDataBar

src/3rdparty/QXlsx/source/xlsxconditionalformatting.cpp:507–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507bool ConditionalFormattingPrivate::readCfDataBar(QXmlStreamReader &reader, XlsxCfRuleData *rule)
508{
509 Q_ASSERT(reader.name() == QLatin1String("dataBar"));
510 QXmlStreamAttributes attrs = reader.attributes();
511 if (attrs.value(QLatin1String("showValue")) == QLatin1String("0"))
512 rule->attrs[XlsxCfRuleData::A_hideData] = QStringLiteral("1");
513
514 while (!reader.atEnd()) {
515 reader.readNextStartElement();
516 if (reader.tokenType() == QXmlStreamReader::StartElement) {
517 if (reader.name() == QLatin1String("cfvo")) {
518 XlsxCfVoData data;
519 readCfVo(reader, data);
520 if (!rule->attrs.contains(XlsxCfRuleData::A_cfvo1))
521 rule->attrs[XlsxCfRuleData::A_cfvo1] = QVariant::fromValue(data);
522 else
523 rule->attrs[XlsxCfRuleData::A_cfvo2] = QVariant::fromValue(data);
524 } else if (reader.name() == QLatin1String("color")) {
525 XlsxColor color;
526 color.loadFromXml(reader);
527 rule->attrs[XlsxCfRuleData::A_color1] = color;
528 }
529 }
530 if (reader.tokenType() == QXmlStreamReader::EndElement
531 && reader.name() == QStringLiteral("dataBar")) {
532 break;
533 }
534 }
535
536 return true;
537}
538
539bool ConditionalFormattingPrivate::readCfColorScale(QXmlStreamReader &reader, XlsxCfRuleData *rule)
540{

Callers

nothing calls this directly

Calls 5

atEndMethod · 0.80
nameMethod · 0.45
valueMethod · 0.45
containsMethod · 0.45
loadFromXmlMethod · 0.45

Tested by

no test coverage detected