andre@1: /**************************************************************************** andre@1: ** Copyright (c) 2013-2014 Debao Zhang andre@1: ** All right reserved. andre@1: ** andre@1: ** Permission is hereby granted, free of charge, to any person obtaining andre@1: ** a copy of this software and associated documentation files (the andre@1: ** "Software"), to deal in the Software without restriction, including andre@1: ** without limitation the rights to use, copy, modify, merge, publish, andre@1: ** distribute, sublicense, and/or sell copies of the Software, and to andre@1: ** permit persons to whom the Software is furnished to do so, subject to andre@1: ** the following conditions: andre@1: ** andre@1: ** The above copyright notice and this permission notice shall be andre@1: ** included in all copies or substantial portions of the Software. andre@1: ** andre@1: ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, andre@1: ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF andre@1: ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND andre@1: ** NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE andre@1: ** LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION andre@1: ** OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION andre@1: ** WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. andre@1: ** andre@1: ****************************************************************************/ andre@1: #ifndef XLSXCONTENTTYPES_H andre@1: #define XLSXCONTENTTYPES_H andre@1: andre@1: // andre@1: // W A R N I N G andre@1: // ------------- andre@1: // andre@1: // This file is not part of the Qt Xlsx API. It exists for the convenience andre@1: // of the Qt Xlsx. This header file may change from andre@1: // version to version without notice, or even be removed. andre@1: // andre@1: // We mean it. andre@1: // andre@1: andre@1: #include "xlsxabstractooxmlfile.h" andre@1: andre@1: #include andre@1: #include andre@1: #include andre@1: andre@1: class QIODevice; andre@1: andre@1: namespace QXlsx { andre@1: andre@1: class ContentTypes : public AbstractOOXmlFile andre@1: { andre@1: public: andre@1: ContentTypes(CreateFlag flag); andre@1: andre@1: void addDefault(const QString &key, const QString &value); andre@1: void addOverride(const QString &key, const QString &value); andre@1: andre@1: //Convenient funcation for addOverride() andre@1: void addDocPropCore(); andre@1: void addDocPropApp(); andre@1: void addStyles(); andre@1: void addTheme(); andre@1: void addWorkbook(); andre@1: void addWorksheetName(const QString &name); andre@1: void addChartsheetName(const QString &name); andre@1: void addChartName(const QString &name); andre@1: void addDrawingName(const QString &name); andre@1: void addCommentName(const QString &name); andre@1: void addTableName(const QString &name); andre@1: void addExternalLinkName(const QString &name); andre@1: void addSharedString(); andre@1: void addVmlName(); andre@1: void addCalcChain(); andre@1: void addVbaProject(); andre@1: andre@1: void clearOverrides(); andre@1: andre@1: void saveToXmlFile(QIODevice *device) const; andre@1: bool loadFromXmlFile(QIODevice *device); andre@1: private: andre@1: QMap m_defaults; andre@1: QMap m_overrides; andre@1: andre@1: QString m_package_prefix; andre@1: QString m_document_prefix; andre@1: }; andre@1: andre@1: } andre@1: #endif // XLSXCONTENTTYPES_H