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

Method loadFromXmlFile

src/3rdparty/QXlsx/source/xlsxdrawing.cpp:44–82  ·  view source on GitHub ↗

check point

Source from the content-addressed store, hash-verified

42
43// check point
44bool Drawing::loadFromXmlFile(QIODevice *device)
45{
46 /*
47 <xsd:group name="EG_Anchor">
48 <xsd:choice>
49 <xsd:element name="twoCellAnchor" type="CT_TwoCellAnchor"/>
50 <xsd:element name="oneCellAnchor" type="CT_OneCellAnchor"/>
51 <xsd:element name="absoluteAnchor" type="CT_AbsoluteAnchor"/>
52 </xsd:choice>
53 </xsd:group>
54 */
55
56 QXmlStreamReader reader(device);
57
58 while (!reader.atEnd())
59 {
60 reader.readNextStartElement();
61 if (reader.tokenType() == QXmlStreamReader::StartElement)
62 {
63 if (reader.name() == QLatin1String("absoluteAnchor")) // CT_AbsoluteAnchor
64 {
65 DrawingAbsoluteAnchor * anchor = new DrawingAbsoluteAnchor(this);
66 anchor->loadFromXml(reader);
67 }
68 else if (reader.name() == QLatin1String("oneCellAnchor")) // CT_OneCellAnchor
69 {
70 DrawingOneCellAnchor * anchor = new DrawingOneCellAnchor(this);
71 anchor->loadFromXml(reader);
72 }
73 else if (reader.name() == QLatin1String("twoCellAnchor")) // CT_TwoCellAnchor
74 {
75 DrawingTwoCellAnchor * anchor = new DrawingTwoCellAnchor(this);
76 anchor->loadFromXml(reader);
77 }
78 }
79 }
80
81 return true;
82}
83
84QT_END_NAMESPACE_XLSX

Callers

nothing calls this directly

Calls 3

atEndMethod · 0.80
nameMethod · 0.45
loadFromXmlMethod · 0.45

Tested by

no test coverage detected