Code refactoring: Clean up code of QXlsx::Package
We should merge the class Package with the class Document
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QFile>
|
||||
#include <QMapIterator>
|
||||
#include <QBuffer>
|
||||
|
||||
namespace QXlsx {
|
||||
|
||||
@@ -111,6 +112,15 @@ void ContentTypes::addVbaProject()
|
||||
addOverride(QStringLiteral("bin"), QStringLiteral("application/vnd.ms-office.vbaProject"));
|
||||
}
|
||||
|
||||
QByteArray ContentTypes::saveToXmlData() const
|
||||
{
|
||||
QByteArray data;
|
||||
QBuffer buffer(&data);
|
||||
buffer.open(QIODevice::WriteOnly);
|
||||
saveToXmlFile(&buffer);
|
||||
return data;
|
||||
}
|
||||
|
||||
void ContentTypes::saveToXmlFile(QIODevice *device) const
|
||||
{
|
||||
QXmlStreamWriter writer(device);
|
||||
|
||||
Reference in New Issue
Block a user