Refactoring: Rename OOXmlFile to AbstractOOXmlFile

This commit is contained in:
Debao Zhang
2014-02-26 17:18:39 +08:00
parent e76bed2ebc
commit 840d96a889
21 changed files with 69 additions and 69 deletions
+3 -3
View File
@@ -39,8 +39,8 @@ HEADERS += $$PWD/xlsxdocpropscore_p.h \
$$PWD/xlsxnumformatparser_p.h \
$$PWD/xlsxdrawinganchor_p.h \
$$PWD/xlsxmediafile_p.h \
$$PWD/xlsxooxmlfile.h \
$$PWD/xlsxooxmlfile_p.h \
$$PWD/xlsxabstractooxmlfile.h \
$$PWD/xlsxabstractooxmlfile_p.h \
$$PWD/xlsxchart.h \
$$PWD/xlsxchart_p.h \
$$PWD/xlsxexternallink_p.h
@@ -70,7 +70,7 @@ SOURCES += $$PWD/xlsxdocpropscore.cpp \
$$PWD/xlsxnumformatparser.cpp \
$$PWD/xlsxdrawinganchor.cpp \
$$PWD/xlsxmediafile.cpp \
$$PWD/xlsxooxmlfile.cpp \
$$PWD/xlsxabstractooxmlfile.cpp \
$$PWD/xlsxchart.cpp \
$$PWD/xlsxexternallink.cpp
@@ -23,21 +23,21 @@
**
****************************************************************************/
#include "xlsxooxmlfile.h"
#include "xlsxooxmlfile_p.h"
#include "xlsxabstractooxmlfile.h"
#include "xlsxabstractooxmlfile_p.h"
#include <QBuffer>
#include <QByteArray>
QT_BEGIN_NAMESPACE_XLSX
OOXmlFilePrivate::OOXmlFilePrivate(OOXmlFile *q)
AbstractOOXmlFilePrivate::AbstractOOXmlFilePrivate(AbstractOOXmlFile *q)
:relationships(new Relationships), q_ptr(q)
{
}
OOXmlFilePrivate::~OOXmlFilePrivate()
AbstractOOXmlFilePrivate::~AbstractOOXmlFilePrivate()
{
}
@@ -50,25 +50,25 @@ OOXmlFilePrivate::~OOXmlFilePrivate()
* Base class of all the ooxml part file.
*/
OOXmlFile::OOXmlFile()
:d_ptr(new OOXmlFilePrivate(this))
AbstractOOXmlFile::AbstractOOXmlFile()
:d_ptr(new AbstractOOXmlFilePrivate(this))
{
}
OOXmlFile::OOXmlFile(OOXmlFilePrivate *d)
AbstractOOXmlFile::AbstractOOXmlFile(AbstractOOXmlFilePrivate *d)
:d_ptr(d)
{
}
OOXmlFile::~OOXmlFile()
AbstractOOXmlFile::~AbstractOOXmlFile()
{
if (d_ptr->relationships)
delete d_ptr->relationships;
delete d_ptr;
}
QByteArray OOXmlFile::saveToXmlData() const
QByteArray AbstractOOXmlFile::saveToXmlData() const
{
QByteArray data;
QBuffer buffer(&data);
@@ -78,7 +78,7 @@ QByteArray OOXmlFile::saveToXmlData() const
return data;
}
bool OOXmlFile::loadFromXmlData(const QByteArray &data)
bool AbstractOOXmlFile::loadFromXmlData(const QByteArray &data)
{
QBuffer buffer;
buffer.setData(data);
@@ -90,18 +90,18 @@ bool OOXmlFile::loadFromXmlData(const QByteArray &data)
/*!
* \internal
*/
void OOXmlFile::setFilePath(const QString path)
void AbstractOOXmlFile::setFilePath(const QString path)
{
Q_D(OOXmlFile);
Q_D(AbstractOOXmlFile);
d->filePathInPackage = path;
}
/*!
* \internal
*/
QString OOXmlFile::filePath() const
QString AbstractOOXmlFile::filePath() const
{
Q_D(const OOXmlFile);
Q_D(const AbstractOOXmlFile);
return d->filePathInPackage;
}
@@ -109,9 +109,9 @@ QString OOXmlFile::filePath() const
/*!
* \internal
*/
Relationships *OOXmlFile::relationships() const
Relationships *AbstractOOXmlFile::relationships() const
{
Q_D(const OOXmlFile);
Q_D(const AbstractOOXmlFile);
return d->relationships;
}
@@ -23,8 +23,8 @@
**
****************************************************************************/
#ifndef QXLSX_XLSXOOXMLFILE_H
#define QXLSX_XLSXOOXMLFILE_H
#ifndef QXLSX_XLSXABSTRACTOOXMLFILE_H
#define QXLSX_XLSXABSTRACTOOXMLFILE_H
#include "xlsxglobal.h"
@@ -33,13 +33,13 @@ class QByteArray;
QT_BEGIN_NAMESPACE_XLSX
class Relationships;
class OOXmlFilePrivate;
class AbstractOOXmlFilePrivate;
class Q_XLSX_EXPORT OOXmlFile
class Q_XLSX_EXPORT AbstractOOXmlFile
{
Q_DECLARE_PRIVATE(OOXmlFile)
Q_DECLARE_PRIVATE(AbstractOOXmlFile)
public:
virtual ~OOXmlFile();
virtual ~AbstractOOXmlFile();
virtual void saveToXmlFile(QIODevice *device) const = 0;
virtual bool loadFromXmlFile(QIODevice *device) = 0;
@@ -52,12 +52,12 @@ public:
void setFilePath(const QString path);
QString filePath() const;
protected:
OOXmlFile();
OOXmlFile(OOXmlFilePrivate *d);
AbstractOOXmlFile();
AbstractOOXmlFile(AbstractOOXmlFilePrivate *d);
OOXmlFilePrivate *d_ptr;
AbstractOOXmlFilePrivate *d_ptr;
};
QT_END_NAMESPACE_XLSX
#endif // QXLSX_XLSXOOXMLFILE_H
#endif // QXLSX_XLSXABSTRACTOOXMLFILE_H
@@ -37,25 +37,25 @@
// We mean it.
//
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include "xlsxrelationships_p.h"
#include <QString>
QT_BEGIN_NAMESPACE_XLSX
class XLSX_AUTOTEST_EXPORT OOXmlFilePrivate
class XLSX_AUTOTEST_EXPORT AbstractOOXmlFilePrivate
{
Q_DECLARE_PUBLIC(OOXmlFile)
Q_DECLARE_PUBLIC(AbstractOOXmlFile)
public:
OOXmlFilePrivate(OOXmlFile *q);
virtual ~OOXmlFilePrivate();
AbstractOOXmlFilePrivate(AbstractOOXmlFile *q);
virtual ~AbstractOOXmlFilePrivate();
QString filePathInPackage;//such as "xl/worksheets/sheet1.xml"
//used when load the .xlsx file
Relationships *relationships;
OOXmlFile *q_ptr;
AbstractOOXmlFile *q_ptr;
};
QT_END_NAMESPACE_XLSX
+2 -2
View File
@@ -29,7 +29,7 @@
QT_BEGIN_NAMESPACE_XLSX
AbstractSheetPrivate::AbstractSheetPrivate(AbstractSheet *p)
: OOXmlFilePrivate(p)
: AbstractOOXmlFilePrivate(p)
{
hidden = false;
type = AbstractSheet::ST_WorkSheet;
@@ -58,7 +58,7 @@ AbstractSheetPrivate::~AbstractSheetPrivate()
* \internal
*/
AbstractSheet::AbstractSheet(const QString &name, int id, Workbook *workbook, AbstractSheetPrivate *d) :
OOXmlFile(d)
AbstractOOXmlFile(d)
{
d_func()->name = name;
d_func()->id = id;
+2 -2
View File
@@ -25,7 +25,7 @@
#ifndef XLSXABSTRACTSHEET_H
#define XLSXABSTRACTSHEET_H
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QStringList>
#include <QSharedPointer>
@@ -33,7 +33,7 @@ QT_BEGIN_NAMESPACE_XLSX
class Workbook;
class Drawing;
class AbstractSheetPrivate;
class Q_XLSX_EXPORT AbstractSheet : public OOXmlFile
class Q_XLSX_EXPORT AbstractSheet : public AbstractOOXmlFile
{
Q_DECLARE_PRIVATE(AbstractSheet)
public:
+2 -2
View File
@@ -38,13 +38,13 @@
#include "xlsxglobal.h"
#include "xlsxabstractsheet.h"
#include "xlsxooxmlfile_p.h"
#include "xlsxabstractooxmlfile_p.h"
#include <QSharedPointer>
namespace QXlsx {
class XLSX_AUTOTEST_EXPORT AbstractSheetPrivate : public OOXmlFilePrivate
class XLSX_AUTOTEST_EXPORT AbstractSheetPrivate : public AbstractOOXmlFilePrivate
{
Q_DECLARE_PUBLIC(AbstractSheet)
public:
+2 -2
View File
@@ -36,7 +36,7 @@
QT_BEGIN_NAMESPACE_XLSX
ChartPrivate::ChartPrivate(Chart *q)
:OOXmlFilePrivate(q), chartType(static_cast<Chart::ChartType>(0))
:AbstractOOXmlFilePrivate(q), chartType(static_cast<Chart::ChartType>(0))
{
}
@@ -78,7 +78,7 @@ ChartPrivate::~ChartPrivate()
* \internal
*/
Chart::Chart(Worksheet *parent)
:OOXmlFile(new ChartPrivate(this))
:AbstractOOXmlFile(new ChartPrivate(this))
{
d_func()->sheet = parent;
}
+2 -2
View File
@@ -26,7 +26,7 @@
#ifndef QXLSX_CHART_H
#define QXLSX_CHART_H
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QSharedPointer>
@@ -40,7 +40,7 @@ class ChartPrivate;
class CellRange;
class DrawingAnchor;
class Q_XLSX_EXPORT Chart : public OOXmlFile
class Q_XLSX_EXPORT Chart : public AbstractOOXmlFile
{
Q_DECLARE_PRIVATE(Chart)
+2 -2
View File
@@ -37,7 +37,7 @@
// We mean it.
//
#include "xlsxooxmlfile_p.h"
#include "xlsxabstractooxmlfile_p.h"
#include "xlsxchart.h"
#include <QSharedPointer>
@@ -87,7 +87,7 @@ public:
int crossAx;
};
class ChartPrivate : public OOXmlFilePrivate
class ChartPrivate : public AbstractOOXmlFilePrivate
{
Q_DECLARE_PUBLIC(Chart)
+2 -2
View File
@@ -36,7 +36,7 @@
// We mean it.
//
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QString>
#include <QStringList>
@@ -46,7 +46,7 @@ class QIODevice;
namespace QXlsx {
class ContentTypes : public OOXmlFile
class ContentTypes : public AbstractOOXmlFile
{
public:
ContentTypes();
+2 -2
View File
@@ -37,7 +37,7 @@
//
#include "xlsxglobal.h"
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QList>
#include <QPair>
#include <QStringList>
@@ -47,7 +47,7 @@ class QIODevice;
namespace QXlsx {
class XLSX_AUTOTEST_EXPORT DocPropsApp : public OOXmlFile
class XLSX_AUTOTEST_EXPORT DocPropsApp : public AbstractOOXmlFile
{
public:
DocPropsApp();
+2 -2
View File
@@ -37,7 +37,7 @@
//
#include "xlsxglobal.h"
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QMap>
#include <QStringList>
@@ -45,7 +45,7 @@ class QIODevice;
namespace QXlsx {
class XLSX_AUTOTEST_EXPORT DocPropsCore : public OOXmlFile
class XLSX_AUTOTEST_EXPORT DocPropsCore : public AbstractOOXmlFile
{
public:
explicit DocPropsCore();
+2 -2
View File
@@ -38,7 +38,7 @@
//
#include "xlsxrelationships_p.h"
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QList>
#include <QString>
@@ -54,7 +54,7 @@ class Workbook;
class Worksheet;
class MediaFile;
class Drawing : public OOXmlFile
class Drawing : public AbstractOOXmlFile
{
public:
Drawing(Worksheet *workbook);
+2 -2
View File
@@ -35,14 +35,14 @@
//
// We mean it.
//
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QString>
class QIODevice;
namespace QXlsx {
class ExternalLinK : public OOXmlFile
class ExternalLinK : public AbstractOOXmlFile
{
public:
ExternalLinK();
+2 -2
View File
@@ -38,7 +38,7 @@
#include "xlsxglobal.h"
#include "xlsxrichstring.h"
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QHash>
#include <QStringList>
#include <QSharedPointer>
@@ -61,7 +61,7 @@ public:
int count;
};
class XLSX_AUTOTEST_EXPORT SharedStrings : public OOXmlFile
class XLSX_AUTOTEST_EXPORT SharedStrings : public AbstractOOXmlFile
{
public:
SharedStrings();
+2 -2
View File
@@ -38,7 +38,7 @@
#include "xlsxglobal.h"
#include "xlsxformat.h"
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QSharedPointer>
#include <QHash>
#include <QList>
@@ -64,7 +64,7 @@ struct XlsxFormatNumberData
QString formatString;
};
class XLSX_AUTOTEST_EXPORT Styles : public OOXmlFile
class XLSX_AUTOTEST_EXPORT Styles : public AbstractOOXmlFile
{
public:
Styles(bool createEmpty=false);
+2 -2
View File
@@ -35,14 +35,14 @@
//
// We mean it.
//
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include <QString>
class QIODevice;
namespace QXlsx {
class Theme : public OOXmlFile
class Theme : public AbstractOOXmlFile
{
public:
Theme();
+2 -2
View File
@@ -42,7 +42,7 @@
QT_BEGIN_NAMESPACE_XLSX
WorkbookPrivate::WorkbookPrivate(Workbook *q) :
OOXmlFilePrivate(q)
AbstractOOXmlFilePrivate(q)
{
sharedStrings = QSharedPointer<SharedStrings> (new SharedStrings);
styles = QSharedPointer<Styles>(new Styles);
@@ -66,7 +66,7 @@ WorkbookPrivate::WorkbookPrivate(Workbook *q) :
}
Workbook::Workbook()
: OOXmlFile(new WorkbookPrivate(this))
: AbstractOOXmlFile(new WorkbookPrivate(this))
{
}
+2 -2
View File
@@ -26,7 +26,7 @@
#define XLSXWORKBOOK_H
#include "xlsxglobal.h"
#include "xlsxooxmlfile.h"
#include "xlsxabstractooxmlfile.h"
#include "xlsxabstractsheet.h"
#include <QList>
#include <QImage>
@@ -47,7 +47,7 @@ class MediaFile;
class Chart;
class WorkbookPrivate;
class Q_XLSX_EXPORT Workbook : public OOXmlFile
class Q_XLSX_EXPORT Workbook : public AbstractOOXmlFile
{
Q_DECLARE_PRIVATE(Workbook)
public:
+2 -2
View File
@@ -37,7 +37,7 @@
//
#include "xlsxworkbook.h"
#include "xlsxooxmlfile_p.h"
#include "xlsxabstractooxmlfile_p.h"
#include "xlsxtheme_p.h"
#include "xlsxexternallink_p.h"
#include "xlsxrelationships_p.h"
@@ -65,7 +65,7 @@ struct XlsxDefineNameData
int sheetId;
};
class WorkbookPrivate : public OOXmlFilePrivate
class WorkbookPrivate : public AbstractOOXmlFilePrivate
{
Q_DECLARE_PUBLIC(Workbook)
public: