odsstream
calcwriterinterface.h
1 
12 /*******************************************************************************
13  * Copyright (c) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>.
14  *
15  * This file is part of the libodsstream library.
16  *
17  * libodsstream is a library to read and write ODS documents as streams
18  * Copyright (C) 2013 Olivier Langella <Olivier.Langella@u-psud.fr>
19  *
20  * This program is free software: you can redistribute it and/or modify
21  * it under the terms of the GNU Lesser General Public License as published
22  *by the Free Software Foundation, either version 3 of the License, or (at your
23  *option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28  * GNU Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public License
31  * along with this program. If not, see <http://www.gnu.org/licenses/>.
32  *
33  * Contributors:
34  * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
35  *implementation
36  ******************************************************************************/
37 
38 #pragma once
39 
40 
41 #include <QDate>
42 #include <QUrl>
47 
49 {
50  public:
51  virtual ~CalcWriterInterface(){};
52  virtual void close() = 0;
53 
59  virtual void writeSheet(const QString &sheetName) = 0;
60 
64  virtual void writeLine() = 0;
69  virtual void writeCell(const char *cell_text) = 0;
74  virtual void writeCell(const QString &cell_text) = 0;
78  virtual void writeEmptyCell() = 0;
83  virtual void writeCell(std::size_t number) = 0;
88  virtual void writeCell(int number) = 0;
93  virtual void writeCell(float number) = 0;
98  virtual void writeCell(double number) = 0;
99 
104  virtual void writeCellPercentage(double value) = 0;
109  virtual void writeCell(bool true_or_false) = 0;
114  virtual void writeCell(const QDate &date) = 0;
119  virtual void writeCell(const QDateTime &datetime) = 0;
125  virtual void writeCell(const QUrl &url_link, const QString &text) = 0;
126 
127 
134  virtual OdsTableCellStyleRef
135  getTableCellStyleRef([[maybe_unused ]] const OdsTableCellStyle &style)
136  {
137  return nullptr;
138  };
146  virtual void
147  setTableCellStyleRef([[maybe_unused ]] OdsTableCellStyleRef style_ref)
148  {
149  };
150 
156  void
158  {
160  };
161 
166  virtual void setCellAnnotation(const QString &annotation) = 0;
167 
171  virtual void addColorScale([[maybe_unused ]] const OdsColorScale &ods_color_scale)
172  {
173  };
174 
181  virtual QString
183  {
184  return QString();
185  };
186 
189  virtual void setCurrentOdsTableSettings([[maybe_unused ]] const OdsTableSettings &settings)
190  {
191  };
192 };
193 
CalcWriterInterface::addColorScale
virtual void addColorScale([[maybe_unused]] const OdsColorScale &ods_color_scale)
apply solor scale conditional format on a cell range
Definition: calcwriterinterface.h:195
CalcWriterInterface::writeEmptyCell
virtual void writeEmptyCell()=0
write an empty cell
OdsTableCellStyle
Definition: odstablecellstyle.h:33
CalcWriterInterface::setTableCellStyleRef
virtual void setTableCellStyleRef([[maybe_unused]] OdsTableCellStyleRef style_ref)
Definition: calcwriterinterface.h:171
CalcWriterInterface::setCurrentOdsTableSettings
virtual void setCurrentOdsTableSettings([[maybe_unused]] const OdsTableSettings &settings)
set ODS table settings of the current sheet (table)
Definition: calcwriterinterface.h:213
CalcWriterInterface::setCellAnnotation
virtual void setCellAnnotation(const QString &annotation)=0
set annotation to write in the next cell
CalcWriterInterface::writeCellPercentage
virtual void writeCellPercentage(double value)=0
write a double as a percentage
OdsColorScale
Definition: odscolorscale.h:43
odscolorscale.h
structure to apply a color scale in ODS sheets
CalcWriterInterface::getOdsCellCoordinate
virtual QString getOdsCellCoordinate()
get the last written cell coordinate in ODS coordinate format get the coordinate of the last written ...
Definition: calcwriterinterface.h:206
CalcWriterInterface::getTableCellStyleRef
virtual OdsTableCellStyleRef getTableCellStyleRef([[maybe_unused]] const OdsTableCellStyle &style)
Definition: calcwriterinterface.h:159
CalcWriterInterface::clearTableCellStyleRef
void clearTableCellStyleRef()
Definition: calcwriterinterface.h:181
CalcWriterInterface::writeLine
virtual void writeLine()=0
open a new line
odstablecellstyleref.h
internal reference on handler for ODS cell style
CalcWriterInterface
Definition: calcwriterinterface.h:48
CalcWriterInterface::writeCell
virtual void writeCell(const char *cell_text)=0
write a text cell
CalcWriterInterface::writeSheet
virtual void writeSheet(const QString &sheetName)=0
open a new sheet
odstablecellstyle.h
handler for ODS cell style
OdsTableSettings
Definition: odstablesettings.h:42
OdsTableCellStyleRefInternal
Definition: odstablecellstyleref.h:38
odstablesettings.h
store table settings