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

Method readCfVo

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

Source from the content-addressed store, hash-verified

573}
574
575bool 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
605bool ConditionalFormatting::loadFromXml(QXmlStreamReader &reader, Styles *styles)
606{

Callers

nothing calls this directly

Calls 3

nameMethod · 0.45
toStringMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected