Add read support for indexedColors
Some old .xlsx files use indexed colors
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
|
||||
class QIODevice;
|
||||
class StylesTest;
|
||||
@@ -81,6 +82,10 @@ private:
|
||||
bool readBorder(XmlStreamReader &reader);
|
||||
bool readSubBorder(XmlStreamReader &reader, const QString &name, Format::BorderStyle &style, QColor &color);
|
||||
bool readCellXfs(XmlStreamReader &reader);
|
||||
bool readColors(XmlStreamReader &reader);
|
||||
bool readIndexedColors(XmlStreamReader &reader);
|
||||
|
||||
QColor getColorByIndex(int idx);
|
||||
|
||||
QHash<QString, int> m_builtinNumFmtsHash;
|
||||
QMap<int, QSharedPointer<NumberData> > m_customNumFmtIdMap;
|
||||
@@ -93,6 +98,8 @@ private:
|
||||
QHash<QByteArray, QSharedPointer<FillData> > m_fillsHash;
|
||||
QHash<QByteArray, QSharedPointer<BorderData> > m_bordersHash;
|
||||
|
||||
QVector<QColor> m_indexedColors;
|
||||
|
||||
QList<QSharedPointer<Format> > m_createdFormatsList; //All created formats
|
||||
|
||||
QList<Format *> m_xf_formatsList;
|
||||
|
||||
Reference in New Issue
Block a user