STOFFSpreadsheetListener.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3 /* libstaroffice
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Major Contributor(s):
17 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
18 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
19 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
20 * Copyright (C) 2006, 2007 Andrew Ziem
21 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
22 *
23 *
24 * All Rights Reserved.
25 *
26 * For minor contributions see the git repository.
27 *
28 * Alternatively, the contents of this file may be used under the terms of
29 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
30 * in which case the provisions of the LGPLv2+ are applicable
31 * instead of those above.
32 */
33
40 #ifndef STOFF_SPREADSHEET_LISTENER_H
41 #define STOFF_SPREADSHEET_LISTENER_H
42
43 #include <vector>
44
45 #include <librevenge/librevenge.h>
46
47 #include "libstaroffice_internal.hxx"
48
49 #include "STOFFListener.hxx"
50
51 class STOFFCell;
52 class STOFFCellContent;
53 class STOFFChart;
54 class STOFFGraphicStyle;
55 class STOFFTable;
56
57 namespace STOFFSpreadsheetListenerInternal
58 {
59 struct DocumentState;
60 struct State;
61 }
62
64 class STOFFSpreadsheetListener final : public STOFFListener
65 {
66 public:
68 STOFFSpreadsheetListener(STOFFListManagerPtr &listManager, std::vector<STOFFPageSpan> const &pageList, librevenge::RVNGSpreadsheetInterface *documentInterface);
70 ~STOFFSpreadsheetListener() final;
71
73 Type getType() const final
74 {
75 return Spreadsheet;
76 }
77
79 void setDocumentLanguage(std::string locale) final;
81 void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final;
82
84 void startDocument() final;
86 void endDocument(bool sendDelayedSubDoc=true) final;
88 bool isDocumentStarted() const final;
89
91 void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final;
93 bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final;
95 bool openFrame(STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
97 void closeFrame() final;
99 bool openGroup(STOFFFrameStyle const &frame) final;
101 void closeGroup() final;
102
104 bool canWriteText() const final;
105
106 // ------ page --------
108 bool isPageSpanOpened() const final;
112 STOFFPageSpan const &getPageSpan() final;
113
114 // ------ header/footer --------
116 bool openHeader(librevenge::RVNGPropertyList const &extras) final;
118 bool openFooter(librevenge::RVNGPropertyList const &extras) final;
120 bool closeHeader() final;
122 bool closeFooter() final;
124 bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final;
126 bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final;
128 bool isHeaderFooterOpened() const final;
129
130 // ------- sheet -----------------
132 void openSheet(std::vector<float> const &colWidth, librevenge::RVNGUnit unit,
133 std::vector<int> const &repeatColWidthNumber=std::vector<int>(), librevenge::RVNGString const &name="");
135 void closeSheet();
137 void openSheetRow(float h, librevenge::RVNGUnit unit, int numRepeated=1);
139 void closeSheetRow();
141 void openSheetCell(STOFFCell const &cell, STOFFCellContent const &content, int numRepeated=1);
143 void closeSheetCell();
144
145 // ------- chart -----------------
147 void insertChart(STOFFFrameStyle const &frame, STOFFChart &chart, STOFFGraphicStyle const &style=STOFFGraphicStyle());
148
149 // ------ text data -----------
150
152 void insertChar(uint8_t character) final;
155 void insertUnicode(uint32_t character) final;
157 void insertUnicodeString(librevenge::RVNGString const &str) final;
158
160 void insertTab() final;
162 void insertEOL(bool softBreak=false) final;
163
164 // ------ text format -----------
166 void setFont(STOFFFont const &font) final;
168 STOFFFont const &getFont() const final;
169
170 // ------ paragraph format -----------
172 bool isParagraphOpened() const final;
174 void setParagraph(STOFFParagraph const &paragraph) final;
176 STOFFParagraph const &getParagraph() const final;
177
178 // ------ style definition -----------
180 void defineStyle(STOFFFont const &style) final;
182 bool isFontStyleDefined(librevenge::RVNGString const &name) const final;
184 void defineStyle(STOFFGraphicStyle const &style) final;
186 bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final;
188 void defineStyle(STOFFParagraph const &style) final;
190 bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final;
191
192 // ------- fields ----------------
194 void insertField(STOFFField const &field) final;
195
196 // ------- link ----------------
198 void openLink(STOFFLink const &link) final;
200 void closeLink() final;
201
202 // ------- subdocument -----------------
204 void insertNote(STOFFNote const &note, STOFFSubDocumentPtr &subDocument) final;
206 void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final;
207
209 void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture,
210 STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
212 void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation,
213 STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
215 void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final;
217 void insertTextBox(STOFFFrameStyle const &frame, STOFFSubDocumentPtr subDocument,
218 STOFFGraphicStyle const &frameStyle=STOFFGraphicStyle()) final;
219 // ------- table -----------------
221 void openTable(STOFFTable const &table) final;
223 void closeTable() final;
225 void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false) final;
227 void closeTableRow() final;
229 void openTableCell(STOFFCell const &cell) final;
231 void closeTableCell() final;
233 void addCoveredTableCell(STOFFVec2i const &pos) final;
235 void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1,1)) final;
236
237 // ------- section ---------------
239 bool canOpenSectionAddBreak() const final
240 {
241 return false;
242 }
244 bool isSectionOpened() const final
245 {
246 return false;
247 }
249 STOFFSection const &getSection() const final;
251 bool openSection(STOFFSection const &section) final;
253 bool closeSection() final;
255 void insertBreak(BreakType breakType) final;
256
257 protected:
259 void _openPageSpan(bool sendHeaderFooters=true);
261 void _closePageSpan();
262
263 void _startSubDocument();
264 void _endSubDocument();
265
266 void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame);
267
268 void _openParagraph();
269 void _closeParagraph();
270 void _resetParagraphState(const bool isListElement=false);
271
273 void _openListElement();
275 void _closeListElement();
277 void _changeList();
282 int _getListId() const;
283
284 void _openSpan();
285 void _closeSpan();
286
287 void _flushText();
288 void _flushDeferredTabs();
289
293 std::shared_ptr<STOFFSpreadsheetListenerInternal::State> _pushParsingState();
295 void _popParsingState();
296
297 protected:
299 std::shared_ptr<STOFFSpreadsheetListenerInternal::DocumentState> m_ds;
301 std::shared_ptr<STOFFSpreadsheetListenerInternal::State> m_ps;
303 std::vector<std::shared_ptr<STOFFSpreadsheetListenerInternal::State> > m_psStack;
305 librevenge::RVNGSpreadsheetInterface *m_documentInterface;
306
307 private:
309 STOFFSpreadsheetListener(const STOFFSpreadsheetListener &);
311 STOFFSpreadsheetListener &operator=(const STOFFSpreadsheetListener &);
312 };
313
314 #endif
315 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
STOFFSpreadsheetListenerInternal::DocumentState::m_definedGraphicStyleSet
std::set< librevenge::RVNGString > m_definedGraphicStyleSet
the set of defined graphic style
Definition: STOFFSpreadsheetListener.cxx:125
STOFFCell::F_NUMBER
@ F_NUMBER
Definition: STOFFCell.hxx:57
libstoff::DOC_CHART
@ DOC_CHART
Definition: libstaroffice_internal.hxx:185
STOFFPosition::Paragraph
@ Paragraph
Definition: STOFFPosition.hxx:51
STOFFCellContent::m_formula
std::vector< FormulaInstruction > m_formula
the formula list of instruction
Definition: STOFFCell.hxx:324
STOFFSpreadsheetListenerInternal::DocumentState::m_sentListMarkers
std::vector< int > m_sentListMarkers
the list of marker corresponding to sent list
Definition: STOFFSpreadsheetListener.cxx:118
STOFFGraphicStyle::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFGraphicStyle.hxx:66
STOFFParagraph
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
STOFFCellContent
small class use to define a sheet cell content
Definition: STOFFCell.hxx:234
STOFFSpreadsheetListener::isParagraphOpened
bool isParagraphOpened() const final
returns true if a paragraph or a list is opened
Definition: STOFFSpreadsheetListener.cxx:424
STOFFSpreadsheetListenerInternal::DocumentState::m_isSheetOpened
bool m_isSheetOpened
a flag to know if a sheet is open
Definition: STOFFSpreadsheetListener.cxx:115
STOFFSpreadsheetListener::_flushText
void _flushText()
Definition: STOFFSpreadsheetListener.cxx:943
STOFFField
a field
Definition: libstaroffice_internal.hxx:363
STOFFSpreadsheetListener::closeTableRow
void closeTableRow() final
closes this row
Definition: STOFFSpreadsheetListener.cxx:1659
STOFFSpreadsheetListener::isGraphicStyleDefined
bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final
check if a graphic style with a display name is already defined
Definition: STOFFSpreadsheetListener.cxx:284
STOFFVec2< int >
STOFFSpreadsheetListenerInternal::State::m_inSubDocument
bool m_inSubDocument
a stack used to know what is open
Definition: STOFFSpreadsheetListener.cxx:186
STOFFSpreadsheetListener::isParagraphStyleDefined
bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final
check if a paragraph style with a display name is already defined
Definition: STOFFSpreadsheetListener.cxx:289
STOFFGraphicShape::C_Unknown
@ C_Unknown
Definition: STOFFGraphicShape.hxx:49
STOFFSpreadsheetListener::getFont
const STOFFFont & getFont() const final
returns the actual font
Definition: STOFFSpreadsheetListener.cxx:419
STOFFSpreadsheetListener::_openPageSpan
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: STOFFSpreadsheetListener.cxx:576
STOFFSpreadsheetListenerInternal::State::m_isTableColumnOpened
bool m_isTableColumnOpened
Definition: STOFFSpreadsheetListener.cxx:177
STOFFSpreadsheetListener::_resetParagraphState
void _resetParagraphState(const bool isListElement=false)
Definition: STOFFSpreadsheetListener.cxx:782
STOFFGraphicShape::C_Rectangle
@ C_Rectangle
Definition: STOFFGraphicShape.hxx:49
STOFFSpreadsheetListener::insertEquation
void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a equation given a position
Definition: STOFFSpreadsheetListener.cxx:1096
STOFFSpreadsheetListenerInternal::DocumentState
a class to store the document state of a STOFFSpreadsheetListener
Definition: STOFFSpreadsheetListener.cxx:79
STOFF_DEBUG_MSG
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
STOFFSpreadsheetListener::closeHeader
bool closeHeader() final
close a header
Definition: STOFFSpreadsheetListener.cxx:667
STOFFSpreadsheetListener::_closePageSpan
void _closePageSpan()
does close a page (low level)
Definition: STOFFSpreadsheetListener.cxx:620
STOFFSpreadsheetListenerInternal::DocumentState::m_isSheetRowOpened
bool m_isSheetRowOpened
a flag to know if a row is open
Definition: STOFFSpreadsheetListener.cxx:116
STOFFSpreadsheetListener::_openSpan
void _openSpan()
Definition: STOFFSpreadsheetListener.cxx:897
STOFFFrameStyle.hxx
STOFFGraphicShape::m_command
Command m_command
the command
Definition: STOFFGraphicShape.hxx:65
STOFFSpreadsheetListener::setFont
void setFont(STOFFFont const &font) final
sets the font
Definition: STOFFSpreadsheetListener.cxx:412
STOFFSpreadsheetListenerInternal::State::m_isListElementOpened
bool m_isListElementOpened
Definition: STOFFSpreadsheetListener.cxx:170
STOFFChart
a class used to store a chart associated to a spreadsheet ....
Definition: STOFFChart.hxx:57
STOFFSpreadsheetListener::_startSubDocument
void _startSubDocument()
Definition: STOFFSpreadsheetListener.cxx:1346
STOFFGraphicShape::C_Polygon
@ C_Polygon
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicShape::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the property
Definition: STOFFGraphicShape.hxx:69
libstoff::DOC_GRAPHIC_GROUP
@ DOC_GRAPHIC_GROUP
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListener::insertUnicode
void insertUnicode(uint32_t character) final
adds an unicode character.
Definition: STOFFSpreadsheetListener.cxx:317
STOFFSpreadsheetListener::isDocumentStarted
bool isDocumentStarted() const final
returns true if a document is opened
Definition: STOFFSpreadsheetListener.cxx:512
STOFFListener::m_listManager
STOFFListManagerPtr m_listManager
the list manager
Definition: STOFFListener.hxx:250
STOFFSpreadsheetListenerInternal::State
the state of a STOFFSpreadsheetListener
Definition: STOFFSpreadsheetListener.cxx:136
STOFFSpreadsheetListenerInternal::State::m_subDocumentType
libstoff::SubDocumentType m_subDocumentType
Definition: STOFFSpreadsheetListener.cxx:190
STOFFSpreadsheetListener::isFontStyleDefined
bool isFontStyleDefined(librevenge::RVNGString const &name) const final
check if a font style with a display name is already defined
Definition: STOFFSpreadsheetListener.cxx:279
STOFFGraphicShape
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
STOFFListener::Type
Type
the listener type
Definition: STOFFListener.hxx:57
STOFFSpreadsheetListenerInternal::ColumnBreakBit
@ ColumnBreakBit
Definition: STOFFSpreadsheetListener.cxx:77
STOFFSpreadsheetListener::_popParsingState
void _popParsingState()
resets the previous parsing state
Definition: STOFFSpreadsheetListener.cxx:1752
STOFFSpreadsheetListenerInternal::State::m_currentPageNumber
int m_currentPageNumber
Definition: STOFFSpreadsheetListener.cxx:182
STOFFListener::BreakType
BreakType
the different break type
Definition: STOFFListener.hxx:59
STOFFFrameStyle
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
libstoff::DOC_SHEET
@ DOC_SHEET
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListenerInternal::State::m_currentPage
unsigned m_currentPage
Definition: STOFFSpreadsheetListener.cxx:180
STOFFPageSpan
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
STOFFSpreadsheetListener::insertEOL
void insertEOL(bool softBreak=false) final
adds an end of line ( by default an hard one)
Definition: STOFFSpreadsheetListener.cxx:351
STOFFSpreadsheetListenerInternal::State::m_isTextboxOpened
bool m_isTextboxOpened
Definition: STOFFSpreadsheetListener.cxx:164
STOFFSpreadsheetListener::openTableRow
void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false) final
open a row with given height ( if h < 0.0, set min-row-height = -h )
Definition: STOFFSpreadsheetListener.cxx:1638
STOFFSection.hxx
STOFFSpreadsheetListener::openTableCell
void openTableCell(STOFFCell const &cell) final
open a cell
Definition: STOFFSpreadsheetListener.cxx:1704
STOFFSpreadsheetListenerInternal::State::m_isHeaderFooterOpened
bool m_isHeaderFooterOpened
a flag to know if the header footer is started
Definition: STOFFSpreadsheetListener.cxx:161
STOFFSpreadsheetListener::closeSection
bool closeSection() final
close a section
Definition: STOFFSpreadsheetListener.cxx:734
STOFFSpreadsheetListenerInternal::DocumentState::~DocumentState
~DocumentState()
destructor
Definition: STOFFSpreadsheetListener.cxx:100
STOFFSpreadsheetListener::closeSheetRow
void closeSheetRow()
closes this row
Definition: STOFFSpreadsheetListener.cxx:1439
STOFFCellContent::FormulaInstruction::F_None
@ F_None
Definition: STOFFCell.hxx:239
STOFFSpreadsheetListenerInternal::State::m_listOrderedLevels
std::vector< bool > m_listOrderedLevels
Definition: STOFFSpreadsheetListener.cxx:184
STOFFSpreadsheetListener::addEmptyTableCell
void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) final
add empty cell
Definition: STOFFSpreadsheetListener.cxx:1685
STOFFCellContent::isValueSet
bool isValueSet() const
returns true if the value has been setted
Definition: STOFFCell.hxx:299
STOFFChart.hxx
STOFFFont::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFFont.hxx:88
STOFFCell
a structure used to define a cell and its format
Definition: STOFFCell.hxx:53
STOFFPosition::Frame
@ Frame
Definition: STOFFPosition.hxx:51
STOFFGraphicShape::C_Ellipse
@ C_Ellipse
Definition: STOFFGraphicShape.hxx:49
STOFFSpreadsheetListenerInternal::DocumentState::m_metaData
librevenge::RVNGPropertyList m_metaData
the document meta data
Definition: STOFFSpreadsheetListener.cxx:109
STOFFSpreadsheetListener::insertPicture
void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a picture with potential various representationin given position
Definition: STOFFSpreadsheetListener.cxx:1081
STOFFSpreadsheetListener::insertHeaderRegion
bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a header
Definition: STOFFSpreadsheetListener.cxx:649
STOFFSpreadsheetListenerInternal::State::m_isHeaderFooterWithoutParagraph
bool m_isHeaderFooterWithoutParagraph
Definition: STOFFSpreadsheetListener.cxx:166
STOFFEmbeddedObject::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist
Definition: libstaroffice_internal.cxx:309
libstoff::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libstaroffice_internal.cxx:81
STOFFSpreadsheetListenerInternal::State::m_isTableCellOpened
bool m_isTableCellOpened
Definition: STOFFSpreadsheetListener.cxx:178
STOFFSpreadsheetListenerInternal::State::m_list
std::shared_ptr< STOFFList > m_list
Definition: STOFFSpreadsheetListener.cxx:158
STOFFSpreadsheetListener::getPageSpan
const STOFFPageSpan & getPageSpan() final
returns the current page span
Definition: STOFFSpreadsheetListener.cxx:568
libstoff::DOC_TEXT_BOX
@ DOC_TEXT_BOX
Definition: libstaroffice_internal.hxx:185
STOFFNote
a note
Definition: libstaroffice_internal.hxx:389
STOFFGraphicStyle::checkForDefault
static void checkForDefault(librevenge::RVNGPropertyList &propList)
check if the line style is set and the fill style is set.
Definition: STOFFGraphicStyle.cxx:93
STOFFSpreadsheetListener::closeTableCell
void closeTableCell() final
close a cell
Definition: STOFFSpreadsheetListener.cxx:1721
STOFFSpreadsheetListener::_pushParsingState
std::shared_ptr< STOFFSpreadsheetListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: STOFFSpreadsheetListener.cxx:1741
STOFFCellContent::double2Date
static bool double2Date(double val, int &Y, int &M, int &D)
conversion beetween double days since 1900 and a date, ie val=0 corresponds to 1/1/1900,...
Definition: STOFFCell.cxx:302
STOFFGraphicStyle::checkForPadding
static void checkForPadding(librevenge::RVNGPropertyList &propList)
check if the padding margins are set, if not set them to 0
Definition: STOFFGraphicStyle.cxx:80
STOFFSpreadsheetListener::openSheetCell
void openSheetCell(STOFFCell const &cell, STOFFCellContent const &content, int numRepeated=1)
open a cell
Definition: STOFFSpreadsheetListener.cxx:1449
STOFFCell::getNumberingStyle
const librevenge::RVNGPropertyList & getNumberingStyle() const
returns the numbering style
Definition: STOFFCell.hxx:201
STOFFParser.hxx
STOFFEmbeddedObject
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
STOFFPageSpan::sendHeaderFooters
void sendHeaderFooters(STOFFListener *listener) const
send the page's headers/footers if some exists
Definition: STOFFPageSpan.cxx:94
libstaroffice_internal.hxx
STOFFSpreadsheetListenerInternal::State::canWriteText
bool canWriteText() const
returns true if we are in a text zone
Definition: STOFFSpreadsheetListener.cxx:142
STOFFSpreadsheetListenerInternal::State::m_isSpanOpened
bool m_isSpanOpened
Definition: STOFFSpreadsheetListener.cxx:168
STOFFSpreadsheetListener::m_ds
std::shared_ptr< STOFFSpreadsheetListenerInternal::DocumentState > m_ds
the main parse state
Definition: STOFFSpreadsheetListener.hxx:299
STOFFSpreadsheetListenerInternal::State::m_paragraph
STOFFParagraph m_paragraph
the paragraph
Definition: STOFFSpreadsheetListener.cxx:156
STOFFSpreadsheetListener::addCoveredTableCell
void addCoveredTableCell(STOFFVec2i const &pos) final
add covered cell
Definition: STOFFSpreadsheetListener.cxx:1669
STOFF_FALLTHROUGH
#define STOFF_FALLTHROUGH
fall through attributes
Definition: libstaroffice_internal.hxx:110
STOFFPageSpan.hxx
libstoff::DOC_TABLE
@ DOC_TABLE
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListener::insertNote
void insertNote(STOFFNote const &note, STOFFSubDocumentPtr &subDocument) final
insert a note
Definition: STOFFSpreadsheetListener.cxx:974
STOFFCell::F_BOOLEAN
@ F_BOOLEAN
Definition: STOFFCell.hxx:57
STOFFCell::getFormat
const Format & getFormat() const
returns the cell format
Definition: STOFFCell.hxx:163
STOFFParagraph.hxx
STOFFSpreadsheetListener::startDocument
void startDocument() final
starts the document
Definition: STOFFSpreadsheetListener.cxx:517
STOFFSpreadsheetListener::_openParagraph
void _openParagraph()
Definition: STOFFSpreadsheetListener.cxx:743
STOFFSubDocument.hxx
STOFFSpreadsheetListenerInternal::State::operator=
State & operator=(const State &)
STOFFSpreadsheetListenerInternal::State::m_isTableOpened
bool m_isTableOpened
Definition: STOFFSpreadsheetListener.cxx:175
STOFFSpreadsheetListener::openGroup
bool openGroup(STOFFFrameStyle const &frame) final
open a group (not implemented)
Definition: STOFFSpreadsheetListener.cxx:1175
STOFFSubDocumentPtr
std::shared_ptr< STOFFSubDocument > STOFFSubDocumentPtr
a smart pointer of STOFFSubDocument
Definition: libstaroffice_internal.hxx:499
libstoff::DOC_COMMENT_ANNOTATION
@ DOC_COMMENT_ANNOTATION
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListener::insertShape
void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final
adds a shape picture in given position
Definition: STOFFSpreadsheetListener.cxx:1116
STOFFListener.hxx
STOFFList.hxx
STOFFSpreadsheetListenerInternal::State::~State
~State()
destructor
Definition: STOFFSpreadsheetListener.cxx:140
libstoff::DOC_NONE
@ DOC_NONE
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListener::setDocumentLanguage
void setDocumentLanguage(std::string locale) final
sets the document language
Definition: STOFFSpreadsheetListener.cxx:499
STOFFCell::Format::m_format
FormatType m_format
the cell format : by default unknown
Definition: STOFFCell.hxx:83
STOFFSpreadsheetListener::insertTextBox
void insertTextBox(STOFFFrameStyle const &frame, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &frameStyle=STOFFGraphicStyle()) final
adds a textbox in given position
Definition: STOFFSpreadsheetListener.cxx:1062
STOFFPosition::Cell
@ Cell
Definition: STOFFPosition.hxx:51
libstoff::SubDocumentType
SubDocumentType
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListener::_endSubDocument
void _endSubDocument()
Definition: STOFFSpreadsheetListener.cxx:1352
STOFFSpreadsheetListenerInternal::State::m_isTableRowOpened
bool m_isTableRowOpened
Definition: STOFFSpreadsheetListener.cxx:176
STOFFSpreadsheetListenerInternal::DocumentState::m_footNoteNumber
int m_footNoteNumber
footnote number
Definition: STOFFSpreadsheetListener.cxx:111
STOFFGraphicShape::C_Connector
@ C_Connector
Definition: STOFFGraphicShape.hxx:49
STOFFSpreadsheetListenerInternal::DocumentState::m_definedParagraphStyleSet
std::set< librevenge::RVNGString > m_definedParagraphStyleSet
the set of defined paragraph style
Definition: STOFFSpreadsheetListener.cxx:127
STOFFSpreadsheetListenerInternal::State::m_isNote
bool m_isNote
Definition: STOFFSpreadsheetListener.cxx:188
STOFFSpreadsheetListenerInternal::State::m_inLink
bool m_inLink
Definition: STOFFSpreadsheetListener.cxx:189
STOFFGraphicStyle::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFGraphicStyle.cxx:65
STOFFSpreadsheetListener
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: STOFFSpreadsheetListener.hxx:64
libstoff::DOC_HEADER_FOOTER_REGION
@ DOC_HEADER_FOOTER_REGION
Definition: libstaroffice_internal.hxx:185
STOFFPageSpan::m_pageSpan
int m_pageSpan
the number of page
Definition: STOFFPageSpan.hxx:108
STOFFTable
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
STOFFCell::Format::getValueType
std::string getValueType() const
returns a value type
Definition: STOFFCell.cxx:58
STOFFSpreadsheetListener::openTable
void openTable(STOFFTable const &table) final
open a table
Definition: STOFFSpreadsheetListener.cxx:1599
STOFFSpreadsheetListener::_changeList
void _changeList()
update the list so that it corresponds to the actual level
Definition: STOFFSpreadsheetListener.cxx:843
STOFFCell::F_TIME
@ F_TIME
Definition: STOFFCell.hxx:57
STOFFSpreadsheetListenerInternal::State::m_isHeaderFooterRegionOpened
bool m_isHeaderFooterRegionOpened
a flag to know if the header footer region is started
Definition: STOFFSpreadsheetListener.cxx:162
STOFFSpreadsheetListener::_flushDeferredTabs
void _flushDeferredTabs()
Definition: STOFFSpreadsheetListener.cxx:933
STOFFSpreadsheetListenerInternal::State::State
State()
constructor
Definition: STOFFSpreadsheetListener.cxx:197
STOFFSpreadsheetListener::setDocumentMetaData
void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final
sets the document meta data
Definition: STOFFSpreadsheetListener.cxx:505
STOFFGraphicStyle.hxx
STOFFSpreadsheetListener::closeLink
void closeLink() final
close a link
Definition: STOFFSpreadsheetListener.cxx:485
libstoff::ParseException
Definition: libstaroffice_internal.hxx:143
STOFFSpreadsheetListener::openSection
bool openSection(STOFFSection const &section) final
open a section if possible
Definition: STOFFSpreadsheetListener.cxx:728
STOFFGraphicShape.hxx
STOFFSpreadsheetListener::closeGroup
void closeGroup() final
close a group (not implemented)
Definition: STOFFSpreadsheetListener.cxx:1181
STOFFFrameStyle::m_position
STOFFPosition m_position
the position
Definition: STOFFFrameStyle.hxx:73
STOFFSpreadsheetListener::openHeader
bool openHeader(librevenge::RVNGPropertyList const &extras) final
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
Definition: STOFFSpreadsheetListener.cxx:637
STOFFSpreadsheetListener::openFooter
bool openFooter(librevenge::RVNGPropertyList const &extras) final
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
Definition: STOFFSpreadsheetListener.cxx:678
STOFFSpreadsheetListener::isHeaderFooterOpened
bool isHeaderFooterOpened() const final
returns true if the header/footer is open
Definition: STOFFSpreadsheetListener.cxx:632
STOFFSpreadsheetListener::closeSheet
void closeSheet()
closes this sheet
Definition: STOFFSpreadsheetListener.cxx:1405
libstoff::DOC_CHART_ZONE
@ DOC_CHART_ZONE
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListener::insertUnicodeString
void insertUnicodeString(librevenge::RVNGString const &str) final
adds a unicode string
Definition: STOFFSpreadsheetListener.cxx:339
STOFFSpreadsheetListener::handleSubDocument
void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final
function called to add a subdocument
Definition: STOFFSpreadsheetListener.cxx:1275
STOFFCell::F_DATETIME
@ F_DATETIME
Definition: STOFFCell.hxx:57
STOFFSpreadsheetListener::~STOFFSpreadsheetListener
~STOFFSpreadsheetListener() final
destructor
Definition: STOFFSpreadsheetListener.cxx:249
STOFFFont
Class to store font.
Definition: STOFFFont.hxx:43
STOFFSpreadsheetListener::m_ps
std::shared_ptr< STOFFSpreadsheetListenerInternal::State > m_ps
the actual local parse state
Definition: STOFFSpreadsheetListener.hxx:301
STOFFListener::Spreadsheet
@ Spreadsheet
Definition: STOFFListener.hxx:57
STOFFCell::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
adds to the propList
Definition: STOFFCell.cxx:246
STOFFSpreadsheetListener::insertFooterRegion
bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a footer
Definition: STOFFSpreadsheetListener.cxx:690
STOFFSpreadsheetListenerInternal::DocumentState::m_pageList
std::vector< STOFFPageSpan > m_pageList
the pages definition
Definition: STOFFSpreadsheetListener.cxx:105
STOFFTable::addTablePropertiesTo
void addTablePropertiesTo(librevenge::RVNGPropertyList &propList) const
adds the table properties to propList
Definition: STOFFTable.cxx:68
STOFFGraphicStyle
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
STOFFSpreadsheetListenerInternal::State::m_textBuffer
librevenge::RVNGString m_textBuffer
a buffer to stored the text
Definition: STOFFSpreadsheetListener.cxx:149
STOFFSpreadsheetListener::setParagraph
void setParagraph(STOFFParagraph const &paragraph) final
sets the paragraph
Definition: STOFFSpreadsheetListener.cxx:429
STOFFSpreadsheetListener::_closeParagraph
void _closeParagraph()
Definition: STOFFSpreadsheetListener.cxx:761
STOFFSpreadsheetListenerInternal::State::m_isSheetCellOpened
bool m_isSheetCellOpened
Definition: STOFFSpreadsheetListener.cxx:173
STOFFSpreadsheetListenerInternal::State::m_isPageSpanOpened
bool m_isPageSpanOpened
Definition: STOFFSpreadsheetListener.cxx:160
STOFFCellContent::double2Time
static bool double2Time(double val, int &H, int &M, int &S)
conversion beetween double: second since 0:00 and time
Definition: STOFFCell.cxx:382
STOFFSpreadsheetListenerInternal::DocumentState::m_numberingIdMap
std::map< librevenge::RVNGString, int > m_numberingIdMap
a map cell's format to id
Definition: STOFFSpreadsheetListener.cxx:120
STOFFGraphicShape::C_Path
@ C_Path
Definition: STOFFGraphicShape.hxx:49
STOFFSpreadsheetListenerInternal::State::m_isSheetColumnOpened
bool m_isSheetColumnOpened
Definition: STOFFSpreadsheetListener.cxx:172
STOFFGraphicShape::C_Polyline
@ C_Polyline
Definition: STOFFGraphicShape.hxx:49
STOFFSpreadsheetListener::isPageSpanOpened
bool isPageSpanOpened() const final
returns true if a page is opened
Definition: STOFFSpreadsheetListener.cxx:563
STOFFSpreadsheetListenerInternal::State::m_numDeferredTabs
int m_numDeferredTabs
the number of tabs to add
Definition: STOFFSpreadsheetListener.cxx:151
STOFFSpreadsheetListener::insertBreak
void insertBreak(BreakType breakType) final
inserts a break type: ColumBreak, PageBreak, ..
Definition: STOFFSpreadsheetListener.cxx:387
STOFFSpreadsheetListenerInternal::State::m_numPagesRemainingInSpan
int m_numPagesRemainingInSpan
Definition: STOFFSpreadsheetListener.cxx:181
STOFFSpreadsheetListener::openFrame
bool openFrame(STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
tries to open a frame
Definition: STOFFSpreadsheetListener.cxx:1185
STOFFPosition::Page
@ Page
Definition: STOFFPosition.hxx:51
STOFFSpreadsheetListenerInternal::DocumentState::m_isDocumentStarted
bool m_isDocumentStarted
a flag to know if the document is open
Definition: STOFFSpreadsheetListener.cxx:114
STOFFNote::m_label
librevenge::RVNGString m_label
the note label
Definition: libstaroffice_internal.hxx:399
STOFFSpreadsheetListenerInternal::DocumentState::m_smallPictureNumber
int m_smallPictureNumber
number of small picture
Definition: STOFFSpreadsheetListener.cxx:113
STOFFSpreadsheetListener::m_documentInterface
librevenge::RVNGSpreadsheetInterface * m_documentInterface
the document interface
Definition: STOFFSpreadsheetListener.hxx:305
STOFFSpreadsheetListenerInternal::DocumentState::m_section
STOFFSection m_section
an empty section
Definition: STOFFSpreadsheetListener.cxx:129
STOFFNote::FootNote
@ FootNote
Definition: libstaroffice_internal.hxx:391
STOFFSpreadsheetListener::getType
Type getType() const final
returns the listener type
Definition: STOFFSpreadsheetListener.hxx:73
STOFFSpreadsheetListener::closeFooter
bool closeFooter() final
close a footer
Definition: STOFFSpreadsheetListener.cxx:708
STOFFSpreadsheetListenerInternal::State::m_isParagraphOpened
bool m_isParagraphOpened
Definition: STOFFSpreadsheetListener.cxx:169
STOFFSpreadsheetListenerInternal::DocumentState::m_pageSpan
STOFFPageSpan m_pageSpan
the current page span
Definition: STOFFSpreadsheetListener.cxx:107
STOFFSection
a class which stores section properties
Definition: STOFFSection.hxx:45
STOFFSpreadsheetListenerInternal
Internal and low level namespace to define the states of STOFFSpreadsheetListener.
Definition: STOFFSpreadsheetListener.cxx:74
STOFFSpreadsheetListener::isSectionOpened
bool isSectionOpened() const final
returns true if a section is opened
Definition: STOFFSpreadsheetListener.hxx:244
STOFFSpreadsheetListenerInternal::State::m_isFrameOpened
bool m_isFrameOpened
Definition: STOFFSpreadsheetListener.cxx:163
STOFFSpreadsheetListener::getSection
const STOFFSection & getSection() const final
returns the actual section
Definition: STOFFSpreadsheetListener.cxx:722
STOFFTable.hxx
STOFFCell::Format
a structure uses to define the format of a cell content
Definition: STOFFCell.hxx:61
STOFFChart::sendChart
void sendChart(STOFFSpreadsheetListenerPtr &listener, librevenge::RVNGSpreadsheetInterface *interface)
send the chart to the listener
Definition: STOFFChart.cxx:197
STOFFCell::F_TEXT
@ F_TEXT
Definition: STOFFCell.hxx:57
STOFFListManagerPtr
std::shared_ptr< STOFFListManager > STOFFListManagerPtr
a smart pointer of STOFFListManager
Definition: libstaroffice_internal.hxx:493
STOFFListener::PageBreak
@ PageBreak
Definition: STOFFListener.hxx:59
STOFFNote::m_type
Type m_type
the note type
Definition: libstaroffice_internal.hxx:397
STOFFSpreadsheetListener::_closeListElement
void _closeListElement()
close a list level
Definition: STOFFSpreadsheetListener.cxx:814
STOFFPosition::CharBaseLine
@ CharBaseLine
Definition: STOFFPosition.hxx:51
STOFFSpreadsheetListener::closeFrame
void closeFrame() final
tries to close a frame
Definition: STOFFSpreadsheetListener.cxx:1254
STOFFSpreadsheetListener::_openListElement
void _openListElement()
open a list level
Definition: STOFFSpreadsheetListener.cxx:792
STOFFSpreadsheetListenerInternal::DocumentState::m_definedFontStyleSet
std::set< librevenge::RVNGString > m_definedFontStyleSet
list of document actually open
Definition: STOFFSpreadsheetListener.cxx:123
STOFFPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: STOFFPosition.hxx:145
STOFFPageSpan::getPageProperty
void getPageProperty(librevenge::RVNGPropertyList &pList) const
add the page properties in pList
Definition: STOFFPageSpan.cxx:120
STOFFPosition.hxx
STOFFSpreadsheetListener::_getListId
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level.
Definition: STOFFSpreadsheetListener.cxx:827
STOFFNote::m_number
int m_number
the note number if defined
Definition: libstaroffice_internal.hxx:401
STOFFLink::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if needed )
Definition: libstaroffice_internal.cxx:247
STOFFCell::F_DATE
@ F_DATE
Definition: STOFFCell.hxx:57
STOFFSpreadsheetListener::getParagraph
const STOFFParagraph & getParagraph() const final
returns the actual paragraph
Definition: STOFFSpreadsheetListener.cxx:440
STOFFSpreadsheetListener::m_psStack
std::vector< std::shared_ptr< STOFFSpreadsheetListenerInternal::State > > m_psStack
stack of local state
Definition: STOFFSpreadsheetListener.hxx:303
STOFFSpreadsheetListener::insertTab
void insertTab() final
adds a tab
Definition: STOFFSpreadsheetListener.cxx:371
STOFFField::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition: libstaroffice_internal.cxx:234
STOFFSpreadsheetListener::openSheet
void openSheet(std::vector< float > const &colWidth, librevenge::RVNGUnit unit, std::vector< int > const &repeatColWidthNumber=std::vector< int >(), librevenge::RVNGString const &name="")
open a sheet
Definition: STOFFSpreadsheetListener.cxx:1368
STOFFSpreadsheetListener::insertChart
void insertChart(STOFFFrameStyle const &frame, STOFFChart &chart, STOFFGraphicStyle const &style=STOFFGraphicStyle())
adds a chart in given position
Definition: STOFFSpreadsheetListener.cxx:1574
STOFFSpreadsheetListener::endDocument
void endDocument(bool sendDelayedSubDoc=true) final
ends the document
Definition: STOFFSpreadsheetListener.cxx:530
STOFFCellContent::m_value
double m_value
the cell value
Definition: STOFFCell.hxx:318
STOFFFrameStyle::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFFrameStyle.cxx:79
STOFFListener
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
STOFFSpreadsheetListener::closeTable
void closeTable() final
closes this table
Definition: STOFFSpreadsheetListener.cxx:1624
STOFFSpreadsheetListenerInternal::DocumentState::operator=
DocumentState & operator=(const DocumentState &)
librevenge
Definition: STOFFDocument.hxx:42
STOFFSpreadsheetListener::isSubDocumentOpened
bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final
returns try if a subdocument is open
Definition: STOFFSpreadsheetListener.cxx:1338
STOFFSpreadsheetListener::canWriteText
bool canWriteText() const final
returns true if we can add text data
Definition: STOFFSpreadsheetListener.cxx:297
STOFFParagraph::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the properties
Definition: STOFFParagraph.hxx:73
STOFFPosition::Unknown
@ Unknown
Definition: STOFFPosition.hxx:51
STOFFSpreadsheetListener::insertChar
void insertChar(uint8_t character) final
adds a basic character, ..
Definition: STOFFSpreadsheetListener.cxx:302
STOFFSpreadsheetListenerInternal::DocumentState::m_subDocuments
std::vector< STOFFSubDocumentPtr > m_subDocuments
Definition: STOFFSpreadsheetListener.cxx:121
STOFFSpreadsheetListenerInternal::State::m_font
STOFFFont m_font
the font
Definition: STOFFSpreadsheetListener.cxx:154
STOFFFont.hxx
STOFFSpreadsheetListener::closeSheetCell
void closeSheetCell()
close a cell
Definition: STOFFSpreadsheetListener.cxx:1556
libstoff
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libstaroffice_internal.cxx:50
STOFFInputStream.hxx
STOFFSpreadsheetListener::insertField
void insertField(STOFFField const &field) final
adds a field type
Definition: STOFFSpreadsheetListener.cxx:448
STOFFCell::Format::hasBasicFormat
bool hasBasicFormat() const
returns true if this is a basic format style
Definition: STOFFCell.hxx:71
STOFFLink
a link
Definition: libstaroffice_internal.hxx:375
STOFFSpreadsheetListener::_closeSpan
void _closeSpan()
Definition: STOFFSpreadsheetListener.cxx:919
STOFFSpreadsheetListener::defineStyle
void defineStyle(STOFFFont const &style) final
defines a font styles
Definition: STOFFSpreadsheetListener.cxx:253
STOFFSpreadsheetListenerInternal::PageBreakBit
@ PageBreakBit
Definition: STOFFSpreadsheetListener.cxx:77
STOFFGraphicShape::addTo
void addTo(librevenge::RVNGPropertyList &list) const
add shape to property list
Definition: STOFFGraphicShape.cxx:60
libstoff::DOC_NOTE
@ DOC_NOTE
Definition: libstaroffice_internal.hxx:185
STOFFSpreadsheetListener::canOpenSectionAddBreak
bool canOpenSectionAddBreak() const final
returns true if we can add open a section, add page break, ...
Definition: STOFFSpreadsheetListener.hxx:239
STOFFSpreadsheetListener::openLink
void openLink(STOFFLink const &link) final
open a link
Definition: STOFFSpreadsheetListener.cxx:463
STOFFSpreadsheetListener::_handleFrameParameters
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame)
Definition: STOFFSpreadsheetListener.cxx:1265
STOFF_shared_ptr_noop_deleter
an noop deleter used to transform a libwpd pointer in a false std::shared_ptr
Definition: libstaroffice_internal.hxx:100
STOFFSpreadsheetListener::STOFFSpreadsheetListener
STOFFSpreadsheetListener(STOFFListManagerPtr &listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGSpreadsheetInterface *documentInterface)
constructor
Definition: STOFFSpreadsheetListener.cxx:240
STOFFPosition::Char
@ Char
Definition: STOFFPosition.hxx:51
STOFFSpreadsheetListener::openSheetRow
void openSheetRow(float h, librevenge::RVNGUnit unit, int numRepeated=1)
open a row with given height ( if h < 0.0, set min-row-height = -h )
Definition: STOFFSpreadsheetListener.cxx:1418
STOFFSpreadsheetListenerInternal::DocumentState::DocumentState
DocumentState(std::vector< STOFFPageSpan > const &pageList)
constructor
Definition: STOFFSpreadsheetListener.cxx:81
STOFFSpreadsheetListener::insertComment
void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final
adds comment
Definition: STOFFSpreadsheetListener.cxx:1027
STOFFSpreadsheetListener.hxx
STOFFCell::F_UNKNOWN
@ F_UNKNOWN
Definition: STOFFCell.hxx:57
STOFFCell.hxx
STOFFFont::checkForDefault
static void checkForDefault(librevenge::RVNGPropertyList &propList)
check if the font name defined.
Definition: STOFFFont.cxx:106