xlsxsimpleooxmlfile.cpp 622 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // xlsxsimpleooxmlfile.cpp
  2. #include "xlsxsimpleooxmlfile_p.h"
  3. #include <QtGlobal>
  4. #include <QIODevice>
  5. QT_BEGIN_NAMESPACE_XLSX
  6. SimpleOOXmlFile::SimpleOOXmlFile(CreateFlag flag)
  7. :AbstractOOXmlFile(flag)
  8. {
  9. }
  10. void SimpleOOXmlFile::saveToXmlFile(QIODevice *device) const
  11. {
  12. device->write(xmlData);
  13. }
  14. QByteArray SimpleOOXmlFile::saveToXmlData() const
  15. {
  16. return xmlData;
  17. }
  18. bool SimpleOOXmlFile::loadFromXmlData(const QByteArray &data)
  19. {
  20. xmlData = data;
  21. return true;
  22. }
  23. bool SimpleOOXmlFile::loadFromXmlFile(QIODevice *device)
  24. {
  25. xmlData = device->readAll();
  26. return true;
  27. }
  28. QT_END_NAMESPACE_XLSX