File indexing completed on 2024-06-23 03:45:56

0001 // xlsxdocument_p.h
0002 
0003 #ifndef XLSXDOCUMENT_P_H
0004 #define XLSXDOCUMENT_P_H
0005 
0006 #include <QtGlobal>
0007 #include <QMap>
0008 
0009 #include "xlsxglobal.h"
0010 #include "xlsxdocument.h"
0011 #include "xlsxworkbook.h"
0012 #include "xlsxcontenttypes_p.h"
0013 
0014 QT_BEGIN_NAMESPACE_XLSX
0015 
0016 class DocumentPrivate
0017 {
0018     Q_DECLARE_PUBLIC(Document)
0019 public:
0020     DocumentPrivate(Document *p);
0021     void init();
0022 
0023     bool loadPackage(QIODevice *device);
0024     bool savePackage(QIODevice *device) const;
0025 
0026     // copy style from one xlsx file to other
0027     static bool copyStyle(const QString &from, const QString &to);
0028 
0029     Document *q_ptr;
0030     const QString defaultPackageName; //default name when package name not specified
0031     QString packageName; //name of the .xlsx file
0032 
0033     QMap<QString, QString> documentProperties; //core, app and custom properties
0034     QSharedPointer<Workbook> workbook;
0035     std::shared_ptr<ContentTypes> contentTypes;
0036     bool isLoad; 
0037 };
0038 
0039 QT_END_NAMESPACE_XLSX
0040 
0041 #endif // XLSXDOCUMENT_P_H