26#include <quazipfile.h>
34 QFile *p_file =
new QFile(filename);
42 QObject::tr(
"error opening ODS file. check file permission for %1")
43 .arg(QFileInfo(filename).absoluteFilePath()));
58 bool open_ok =
_p_quaZip->open(QuaZip::mdCreate);
62 throw OdsException(QObject::tr(
"error opening ODS file."));
69 QByteArray *messageIn =
new QByteArray();
70 *messageIn =
"application/vnd.oasis.opendocument.spreadsheet";
74 quint32 crc(crc32.calculate(*messageIn));
75 QuaZipNewInfo info(
"mimetype");
76 info.uncompressedSize = messageIn->length();
77 outFile.open(QIODevice::WriteOnly, info, NULL, crc, 0, 0,
true);
78 outFile.write(*messageIn);
105 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
129 qDebug() <<
"_p_device_delete";
186 QString textQt(text);
void writeCell(double value, const QString &annotation)
void writeCellPercentage(double value, const QString &annotation)
OdsTableCellStyleRef getTableCellStyleRef(const OdsTableCellStyle &style)
void writeEmptyCell(const QString &annotation)
void addColorScale(const OdsColorScale &ods_color_scale)
void setTableCellStyleRef(OdsTableCellStyleRef style_ref)
void writeSheet(const QString &sheetName)
QString getCellCoordinate()
SettingsXml _settings_xml
void writeSheet(const QString &sheetName) override
QString getOdsCellCoordinate() override
get the last written cell coordinate in ODS coordinate format get the coordinate of the last written ...
void writeEmptyCell() override
void writeCellPercentage(double value) override
void setCellAnnotation(const QString &annotation) override
set annotation to write in the next cell
void openDevice(QIODevice *device)
OdsTableCellStyleRef getTableCellStyleRef(const OdsTableCellStyle &style) override
void writeCell(const char *) override
write a text cell
void addColorScale(const OdsColorScale &ods_color_scale) override
apply solor scale conditional format on a cell range
void setTableCellStyleRef(OdsTableCellStyleRef style_ref) override
void setCurrentOdsTableSettings(const OdsTableSettings &settings) override
set ODS table settings of the current sheet (table)
void writeLine() override
OdsDocWriter(const QString &filename)
void setCurrentOdsTableSettings(const OdsTableSettings &settings)
void write(QuaZip *p_quazip)