1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-16 04:42:53 +08:00

Remove unused QtGlobal header

This commit is contained in:
Daniel Nicoletti 2024-09-02 16:16:17 -03:00
parent f5d07959d5
commit c643be3647
52 changed files with 27 additions and 89 deletions

View File

@ -14,7 +14,6 @@
#include <QString>
#include <QTime>
#include <QVariant>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -11,7 +11,6 @@
#include <QList>
#include <QObject>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -12,7 +12,6 @@
#include <QObject>
#include <QString>
#include <QVector>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -7,7 +7,6 @@
#include "xlsxglobal.h"
#include <QObject>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -5,8 +5,6 @@
#include "xlsxglobal.h"
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX
const int XLSX_ROW_MAX = 1048576;

View File

@ -7,7 +7,6 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -6,7 +6,6 @@
#include "xlsxabstractsheet.h"
#include <QStringList>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -7,8 +7,6 @@
#include "xlsxchartsheet.h"
#include "xlsxglobal.h"
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX
class ChartsheetPrivate : public AbstractSheetPrivate

View File

@ -9,7 +9,6 @@
#include <QVariant>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -13,7 +13,6 @@
#include <QString>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
class ConditionalFormattingTest;

View File

@ -9,7 +9,6 @@
#include <QMap>
#include <QString>
#include <QStringList>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -10,7 +10,6 @@
#include <QString>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
class QXmlStreamReader;
class QXmlStreamWriter;

View File

@ -6,7 +6,6 @@
#include "xlsxdatavalidation.h"
#include <QSharedData>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -11,7 +11,6 @@
#include <QString>
#include <QStringList>
#include <QTime>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -11,7 +11,6 @@
#include <QImage>
#include <QObject>
#include <QVariant>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -9,7 +9,6 @@
#include "xlsxworkbook.h"
#include <QMap>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -8,7 +8,6 @@
#include <QList>
#include <QString>
#include <QtGlobal>
class QIODevice;
class QXmlStreamWriter;

View File

@ -7,7 +7,6 @@
#include <QMap>
#include <QSet>
#include <QSharedData>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -13,7 +13,6 @@
#include <QString>
#include <QStringList>
#include <QVariant>
#include <QtGlobal>
#if defined(QXlsx_SHAREDLIB)
# if defined(QXlsx_EXPORTS)

View File

@ -7,7 +7,6 @@
#include <QIODevice>
#include <QString>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -14,7 +14,6 @@
#include <QStringList>
#include <QTime>
#include <QVariant>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -13,7 +13,6 @@
#include <QImage>
#include <QList>
#include <QSharedPointer>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -11,7 +11,6 @@
#include <QSharedPointer>
#include <QStringList>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -18,7 +18,6 @@
#include <QStringList>
#include <QUrl>
#include <QVariant>
#include <QtGlobal>
class WorksheetTest;

View File

@ -227,23 +227,23 @@ public:
public:
CellTable cellTable;
QMap<int, QMap<int, QString>> comments;
QMap<int, QMap<int, QSharedPointer<XlsxHyperlinkData>>> urlTable;
QHash<int, QHash<int, QString>> comments;
QHash<int, QHash<int, QSharedPointer<XlsxHyperlinkData>>> urlTable;
QList<CellRange> merges;
QMap<int, QSharedPointer<XlsxRowInfo>> rowsInfo;
QMap<int, QSharedPointer<XlsxColumnInfo>> colsInfo;
QMap<int, QSharedPointer<XlsxColumnInfo>> colsInfoHelper;
QHash<int, QSharedPointer<XlsxRowInfo>> rowsInfo;
QHash<int, QSharedPointer<XlsxColumnInfo>> colsInfo;
QHash<int, QSharedPointer<XlsxColumnInfo>> colsInfoHelper;
QList<DataValidation> dataValidationsList;
QList<ConditionalFormatting> conditionalFormattingList;
QMap<int, CellFormula> sharedFormulaMap; // shared formula map
QHash<int, CellFormula> sharedFormulaMap; // shared formula map
CellRange dimension;
mutable QMap<int, QString> row_spans;
QMap<int, double> row_sizes;
QMap<int, double> col_sizes;
mutable QHash<int, QString> row_spans;
QHash<int, double> row_sizes;
QHash<int, double> col_sizes;
// pagesetup and print settings add by liufeijin 20181028, liufeijin
QString PpaperSize;

View File

@ -7,7 +7,6 @@
#include <QIODevice>
#include <QString>
#include <QtGlobal>
class QZipWriter;

View File

@ -6,7 +6,6 @@
#include <QBuffer>
#include <QByteArray>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -5,8 +5,6 @@
#include "xlsxabstractsheet_p.h"
#include "xlsxworkbook.h"
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX
AbstractSheetPrivate::AbstractSheetPrivate(AbstractSheet *p, AbstractSheet::CreateFlag flag)

View File

@ -15,7 +15,6 @@
#include <QDateTime>
#include <QDebug>
#include <QTime>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -10,7 +10,6 @@
#include <QString>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -9,7 +9,6 @@
#include <QObject>
#include <QString>
#include <QVector>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -7,7 +7,6 @@
#include <QPoint>
#include <QString>
#include <QStringList>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -10,7 +10,6 @@
#include <QString>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -12,7 +12,6 @@
#include <QDir>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -10,7 +10,6 @@
#include <QDebug>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -8,7 +8,6 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -5,8 +5,6 @@
#include "xlsxglobal.h"
#include "xlsxutility_p.h"
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX
DateType::DateType()

View File

@ -9,7 +9,6 @@
#include <QFile>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -27,7 +27,6 @@
#include <QPointF>
#include <QSharedPointer>
#include <QTemporaryFile>
#include <QtGlobal>
/*
From Wikipedia: The Open Packaging Conventions (OPC) is a

View File

@ -7,7 +7,6 @@
#include <QBuffer>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -12,7 +12,6 @@
#include <QDir>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -8,7 +8,6 @@
#include <QDataStream>
#include <QDebug>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -3,7 +3,6 @@
#include "xlsxmediafile_p.h"
#include <QCryptographicHash>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -3,7 +3,6 @@
#include "xlsxnumformatparser_p.h"
#include <QString>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -7,7 +7,6 @@
#include <QFile>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -8,7 +8,6 @@
#include <QDebug>
#include <QTextDocument>
#include <QTextFragment>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -12,7 +12,6 @@
#include <QFile>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -3,7 +3,6 @@
#include "xlsxsimpleooxmlfile_p.h"
#include <QIODevice>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -13,7 +13,6 @@
#include <QMap>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -20,7 +20,6 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtDebug>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX

View File

@ -39,7 +39,6 @@
#include <QVariant>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX
@ -1341,9 +1340,8 @@ void Worksheet::saveToXmlFile(QIODevice *device) const
if (!d->colsInfo.isEmpty()) {
writer.writeStartElement(QStringLiteral("cols"));
QMapIterator<int, QSharedPointer<XlsxColumnInfo>> it(d->colsInfo);
while (it.hasNext()) {
it.next();
for (auto it = d->colsInfo.begin(); it != d->colsInfo.end(); ++it) {
QSharedPointer<XlsxColumnInfo> col_info = it.value();
writer.writeStartElement(QStringLiteral("col"));
writer.writeAttribute(QStringLiteral("min"), QString::number(col_info->firstColumn));
@ -1558,17 +1556,20 @@ void WorksheetPrivate::saveXmlCellData(QXmlStreamWriter &writer,
writer.writeStartElement(QStringLiteral("c"));
writer.writeAttribute(QStringLiteral("r"), cell_pos);
QMap<int, QSharedPointer<XlsxRowInfo>>::ConstIterator rIt;
QMap<int, QSharedPointer<XlsxColumnInfo>>::ConstIterator cIt;
// Style used by the cell, row or col
if (!cell->format().isEmpty())
if (!cell->format().isEmpty()) {
writer.writeAttribute(QStringLiteral("s"), QString::number(cell->format().xfIndex()));
else if ((rIt = rowsInfo.constFind(row)) != rowsInfo.constEnd() && !(*rIt)->format.isEmpty())
writer.writeAttribute(QStringLiteral("s"), QString::number((*rIt)->format.xfIndex()));
else if ((cIt = colsInfoHelper.constFind(col)) != colsInfoHelper.constEnd() &&
!(*cIt)->format.isEmpty())
writer.writeAttribute(QStringLiteral("s"), QString::number((*cIt)->format.xfIndex()));
} else {
auto rIt = rowsInfo.constFind(row);
if (rIt != rowsInfo.constEnd() && !(*rIt)->format.isEmpty()) {
writer.writeAttribute(QStringLiteral("s"), QString::number((*rIt)->format.xfIndex()));
} else {
auto cIt = colsInfoHelper.constFind(col);
if (cIt != colsInfoHelper.constEnd() && !(*cIt)->format.isEmpty()) {
writer.writeAttribute(QStringLiteral("s"), QString::number((*cIt)->format.xfIndex()));
}
}
}
if (cell->cellType() == Cell::SharedStringType) // 's'
{
@ -1719,15 +1720,10 @@ void WorksheetPrivate::saveXmlHyperlinks(QXmlStreamWriter &writer) const
return;
writer.writeStartElement(QStringLiteral("hyperlinks"));
QMapIterator<int, QMap<int, QSharedPointer<XlsxHyperlinkData>>> it(urlTable);
while (it.hasNext()) {
it.next();
for (auto it = urlTable.begin(); it != urlTable.end(); ++it) {
int row = it.key();
QMapIterator<int, QSharedPointer<XlsxHyperlinkData>> it2(it.value());
while (it2.hasNext()) {
it2.next();
for (auto it2 = it.value().begin(); it2 != it.value().end(); ++it2) {
int col = it2.key();
QSharedPointer<XlsxHyperlinkData> data = it2.value();
QString ref = CellReference(row, col).toString();
@ -1787,9 +1783,7 @@ void WorksheetPrivate::splitColsInfo(int colFirst, int colLast)
// we are trying to set "B:D", there should be "A", "B:D", "E:H".
// This will be more complex if we try to set "C:F" after "B:D".
{
QMapIterator<int, QSharedPointer<XlsxColumnInfo>> it(colsInfo);
while (it.hasNext()) {
it.next();
for (auto it = colsInfo.begin(); it != colsInfo.end(); ++it) {
QSharedPointer<XlsxColumnInfo> info = it.value();
if (colFirst > info->firstColumn && colFirst <= info->lastColumn) {
// split the range,
@ -1805,9 +1799,7 @@ void WorksheetPrivate::splitColsInfo(int colFirst, int colLast)
}
}
{
QMapIterator<int, QSharedPointer<XlsxColumnInfo>> it(colsInfo);
while (it.hasNext()) {
it.next();
for (auto it = colsInfo.begin(); it != colsInfo.end(); ++it) {
QSharedPointer<XlsxColumnInfo> info = it.value();
if (colLast >= info->firstColumn && colLast < info->lastColumn) {
QSharedPointer<XlsxColumnInfo> info2(new XlsxColumnInfo(*info));

View File

@ -5,7 +5,6 @@
#include <private/qzipwriter_p.h>
#include <QDebug>
#include <QtGlobal>
QT_BEGIN_NAMESPACE_XLSX