STOFFTextListener.hxx Source File documentation

STOFFTextListener.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 /* libstoff
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
34 #ifndef STOFF_TEXT_LISTENER_H
35 #define STOFF_TEXT_LISTENER_H
36
37 #include <vector>
38
39 #include <librevenge/librevenge.h>
40
41 #include "libstaroffice_internal.hxx"
42
43 #include "STOFFGraphicStyle.hxx"
44
45 #include "STOFFListener.hxx"
46
47 class STOFFTextShape;
48
49 namespace STOFFTextListenerInternal
50 {
51 struct TextState;
52 struct State;
53 }
54
59 class STOFFTextListener final : public STOFFListener
60 {
61 public:
63 STOFFTextListener(STOFFListManagerPtr &listManager, std::vector<STOFFPageSpan> const &pageList, librevenge::RVNGTextInterface *documentInterface);
65 ~STOFFTextListener() final;
66
68 Type getType() const final
69 {
70 return Text;
71 }
72
74 void setDocumentLanguage(std::string locale) final;
76 void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final;
78 void startDocument() final;
80 void endDocument(bool sendDelayedSubDoc=true) final;
81
82 // ------ general information --------
84 bool canWriteText() const final
85 {
86 return STOFFTextListener::isDocumentStarted();
87 }
88
90 bool isDocumentStarted() const final;
91
93 void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final;
95 bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final;
97 bool openFrame(STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
99 void closeFrame() final;
101 bool openGroup(STOFFFrameStyle const &frame) final;
103 void closeGroup() final;
105 bool openLayer(librevenge::RVNGString const &name);
107 void closeLayer();
108
109 // ------ page --------
111 bool openMasterPage(STOFFPageSpan &/*masterPage*/);
113 void closeMasterPage()
114 {
115 }
117 bool isPageSpanOpened() const final;
121 STOFFPageSpan const &getPageSpan() final;
122
123 // ------ header/footer --------
125 bool openHeader(librevenge::RVNGPropertyList const &extras) final;
127 bool openFooter(librevenge::RVNGPropertyList const &extras) final;
129 bool closeHeader() final;
131 bool closeFooter() final;
133 bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final;
135 bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final;
137 bool isHeaderFooterOpened() const final;
138
139 // ------ text data -----------
141 void insertChar(uint8_t character) final;
146 void insertUnicode(uint32_t character) final;
148 void insertUnicodeString(librevenge::RVNGString const &str) final;
149
151 void insertTab() final;
153 void insertEOL(bool softBreak=false) final;
154
155 // ------ text format -----------
157 void setFont(STOFFFont const &font) final;
159 STOFFFont const &getFont() const final;
160
161 // ------ paragraph format -----------
163 bool isParagraphOpened() const final;
165 void setParagraph(STOFFParagraph const &paragraph) final;
167 STOFFParagraph const &getParagraph() const final;
168
169 // ------ style definition -----------
171 void defineStyle(STOFFFont const &style) final;
173 bool isFontStyleDefined(librevenge::RVNGString const &name) const final;
175 void defineStyle(STOFFGraphicStyle const &style) final;
177 bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final;
179 void defineStyle(STOFFParagraph const &style) final;
181 bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final;
182
183 // ------- fields ----------------
185 void insertField(STOFFField const &field) final;
186
187 // ------- link ----------------
189 void openLink(STOFFLink const &link) final;
191 void closeLink() final;
192
193 // ------- subdocument -----------------
195 void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final;
197 void insertTextBox(STOFFFrameStyle const &pos, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
199 void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture,
200 STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
202 void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation,
203 STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
205 void insertNote(STOFFNote const &note, STOFFSubDocumentPtr &subDocument) final;
207 void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final;
208
209 // ------- table -----------------
210
212 void openTable(STOFFTable const &table) final;
214 void closeTable() final;
216 void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false) final;
218 void closeTableRow() final;
220 void openTableCell(STOFFCell const &cell) final;
222 void closeTableCell() final;
224 void addCoveredTableCell(STOFFVec2i const &pos) final;
226 void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1,1)) final;
227
228 // ------- section ---------------
229
231 bool canOpenSectionAddBreak() const final;
233 bool isSectionOpened() const final;
235 STOFFSection const &getSection() const final;
237 bool openSection(STOFFSection const &section) final;
239 bool closeSection() final;
241 void insertBreak(BreakType breakType) final;
242
243 protected:
245 void _openSection();
247 void _closeSection();
249 void _openPageSpan(bool sendHeaderFooters=true);
251 void _closePageSpan();
252
253 void _startSubDocument();
254 void _endSubDocument();
255
259 void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame, STOFFGraphicStyle const &style);
260
261 void _openParagraph();
262 void _closeParagraph();
263 void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false);
264 void _resetParagraphState(const bool isListElement=false);
265
267 void _openListElement();
269 void _closeListElement();
271 void _changeList();
276 int _getListId() const;
277
279 void _openSpan();
281 void _closeSpan();
282
284 void _flushText();
286 void _flushDeferredTabs();
287
288 void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList);
289
293 std::shared_ptr<STOFFTextListenerInternal::State> _pushParsingState();
295 void _popParsingState();
296
297 protected:
299 std::shared_ptr<STOFFTextListenerInternal::TextState> m_ds;
301 std::shared_ptr<STOFFTextListenerInternal::State> m_ps;
303 std::vector<std::shared_ptr<STOFFTextListenerInternal::State> > m_psStack;
305 librevenge::RVNGTextInterface *m_documentInterface;
306
307 private:
308 STOFFTextListener(const STOFFTextListener &);
309 STOFFTextListener &operator=(const STOFFTextListener &);
310 };
311
312 #endif
313 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
libstoff::DOC_CHART
@ DOC_CHART
Definition: libstaroffice_internal.hxx:185
STOFFPosition::Paragraph
@ Paragraph
Definition: STOFFPosition.hxx:51
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
STOFFTextListenerInternal::TextState::m_subDocuments
std::vector< STOFFSubDocumentPtr > m_subDocuments
Definition: STOFFTextListener.cxx:113
STOFFTextListener::_appendParagraphProperties
void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false)
Definition: STOFFTextListener.cxx:859
STOFFField
a field
Definition: libstaroffice_internal.hxx:363
STOFFTextListener::insertComment
void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final
adds comment
Definition: STOFFTextListener.cxx:1127
STOFFTextListener::_startSubDocument
void _startSubDocument()
Definition: STOFFTextListener.cxx:1511
STOFFTextListenerInternal::State::m_isTableCellOpened
bool m_isTableCellOpened
Definition: STOFFTextListener.cxx:164
STOFFVec2< int >
STOFFTextListenerInternal::TextState::m_definedGraphicStyleSet
std::set< librevenge::RVNGString > m_definedGraphicStyleSet
the set of defined graphic style
Definition: STOFFTextListener.cxx:117
STOFFTextListenerInternal::State::operator=
State & operator=(const State &)
STOFFTextListenerInternal::State::m_isParagraphOpened
bool m_isParagraphOpened
Definition: STOFFTextListener.cxx:156
STOFFTextListener::_openSpan
void _openSpan()
low level: the function which opens a new span property
Definition: STOFFTextListener.cxx:993
STOFFTextListenerInternal::State::m_isListElementOpened
bool m_isListElementOpened
Definition: STOFFTextListener.cxx:157
STOFFTextListenerInternal::State::m_inLink
bool m_inLink
Definition: STOFFTextListener.cxx:179
STOFFTextListener::_openParagraph
void _openParagraph()
Definition: STOFFTextListener.cxx:799
STOFFGraphicShape::C_Unknown
@ C_Unknown
Definition: STOFFGraphicShape.hxx:49
STOFFTextListener::isParagraphStyleDefined
bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final
check if a paragraph style with a display name is already defined
Definition: STOFFTextListener.cxx:282
STOFFTextListener::closeTable
void closeTable() final
closes this table
Definition: STOFFTextListener.cxx:1555
STOFFTextListener::m_ds
std::shared_ptr< STOFFTextListenerInternal::TextState > m_ds
the actual global state
Definition: STOFFTextListener.hxx:299
STOFFTextListener::handleSubDocument
void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final
function called to add a subdocument and modify the origin
Definition: STOFFTextListener.cxx:1420
STOFFGraphicShape::C_Rectangle
@ C_Rectangle
Definition: STOFFGraphicShape.hxx:49
STOFFTextListener::openLink
void openLink(STOFFLink const &link) final
open a link
Definition: STOFFTextListener.cxx:467
STOFFTextListener::insertPicture
void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a picture with potential various representationin given position
Definition: STOFFTextListener.cxx:1239
STOFF_DEBUG_MSG
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
STOFFTextListenerInternal::State::m_isTableOpened
bool m_isTableOpened
Definition: STOFFTextListener.cxx:161
STOFFFrameStyle.hxx
STOFFGraphicShape::m_command
Command m_command
the command
Definition: STOFFGraphicShape.hxx:65
STOFFTextListener::startDocument
void startDocument() final
starts a new document
Definition: STOFFTextListener.cxx:517
STOFFTextListener::_endSubDocument
void _endSubDocument()
Definition: STOFFTextListener.cxx:1517
STOFFGraphicShape::C_Polygon
@ C_Polygon
Definition: STOFFGraphicShape.hxx:49
libstoff::DOC_GRAPHIC_GROUP
@ DOC_GRAPHIC_GROUP
Definition: libstaroffice_internal.hxx:185
STOFFListener::m_listManager
STOFFListManagerPtr m_listManager
the list manager
Definition: STOFFListener.hxx:250
STOFFTextListener::_closeParagraph
void _closeParagraph()
Definition: STOFFTextListener.cxx:827
STOFFTextListener::insertEquation
void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a equation given a position
Definition: STOFFTextListener.cxx:1249
STOFFGraphicShape
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
STOFFListener::Type
Type
the listener type
Definition: STOFFListener.hxx:57
STOFFTextListener::_closeSection
void _closeSection()
does close a section (low level)
Definition: STOFFTextListener.cxx:779
STOFFListener::BreakType
BreakType
the different break type
Definition: STOFFListener.hxx:59
STOFFTextListenerInternal::ColumnBreakBit
@ ColumnBreakBit
Definition: STOFFTextListener.cxx:72
STOFFFrameStyle
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
libstoff::DOC_SHEET
@ DOC_SHEET
Definition: libstaroffice_internal.hxx:185
STOFFTextListenerInternal::TextState::m_sentListMarkers
std::vector< int > m_sentListMarkers
the list of marker corresponding to sent list
Definition: STOFFTextListener.cxx:112
STOFFTextListener::m_psStack
std::vector< std::shared_ptr< STOFFTextListenerInternal::State > > m_psStack
stack of local state
Definition: STOFFTextListener.hxx:303
STOFFListener::Text
@ Text
Definition: STOFFListener.hxx:57
STOFFTextListener::setFont
void setFont(STOFFFont const &font) final
sets the font
Definition: STOFFTextListener.cxx:420
STOFFPageSpan
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
STOFFSection.hxx
STOFFTextListenerInternal::State::~State
~State()
destructor
Definition: STOFFTextListener.cxx:131
STOFFTextListener::canWriteText
bool canWriteText() const final
returns true if a text zone is opened
Definition: STOFFTextListener.hxx:84
STOFFTextListener::openSection
bool openSection(STOFFSection const &section) final
open a section if possible
Definition: STOFFTextListener.cxx:730
STOFFTextListener::canOpenSectionAddBreak
bool canOpenSectionAddBreak() const final
returns true if we can add open a section, add page break, ...
Definition: STOFFTextListener.cxx:725
STOFFTextListenerInternal::State::State
State()
constructor
Definition: STOFFTextListener.cxx:187
STOFFTextListener
This class contains the code needed to create Text document.
Definition: STOFFTextListener.hxx:59
STOFFTextListener::insertUnicodeString
void insertUnicodeString(librevenge::RVNGString const &str) final
adds a unicode string
Definition: STOFFTextListener.cxx:318
STOFFTextListener::openFooter
bool openFooter(librevenge::RVNGPropertyList const &extras) final
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
Definition: STOFFTextListener.cxx:677
STOFFTextListenerInternal::State::m_isTableRowOpened
bool m_isTableRowOpened
Definition: STOFFTextListener.cxx:162
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
STOFFTextListener::defineStyle
void defineStyle(STOFFFont const &style) final
defines a font styles
Definition: STOFFTextListener.cxx:246
STOFFTextListener::_getListId
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level.
Definition: STOFFTextListener.cxx:918
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
STOFFTextListener::_closeSpan
void _closeSpan()
low level: the function which closes the last opened span property
Definition: STOFFTextListener.cxx:1017
STOFFTextListener::getFont
const STOFFFont & getFont() const final
returns the actual font
Definition: STOFFTextListener.cxx:428
libstoff::DOC_TEXT_BOX
@ DOC_TEXT_BOX
Definition: libstaroffice_internal.hxx:185
STOFFNote
a note
Definition: libstaroffice_internal.hxx:389
STOFFTextListener::endDocument
void endDocument(bool sendDelayedSubDoc=true) final
ends the actual document
Definition: STOFFTextListener.cxx:530
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
STOFFTextListenerInternal::TextState::m_pageSpan
STOFFPageSpan m_pageSpan
the current page span
Definition: STOFFTextListener.cxx:102
STOFFTextListener::getSection
const STOFFSection & getSection() const final
returns the actual section
Definition: STOFFTextListener.cxx:720
STOFFTextListener::isSectionOpened
bool isSectionOpened() const final
returns true if a section is opened
Definition: STOFFTextListener.cxx:715
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
STOFFTextListenerInternal::State
the state of a STOFFTextListener
Definition: STOFFTextListener.cxx:127
STOFFParser.hxx
STOFFEmbeddedObject
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
STOFFTextListenerInternal::State::m_isTableColumnOpened
bool m_isTableColumnOpened
Definition: STOFFTextListener.cxx:163
STOFFTextListenerInternal::TextState::m_metaData
librevenge::RVNGPropertyList m_metaData
the document meta data
Definition: STOFFTextListener.cxx:104
libstaroffice_internal.hxx
STOFFTextListener::setParagraph
void setParagraph(STOFFParagraph const &paragraph) final
sets the paragraph
Definition: STOFFTextListener.cxx:438
STOFFTextListenerInternal::PageBreakBit
@ PageBreakBit
Definition: STOFFTextListener.cxx:72
STOFFTextListenerInternal::State::m_isPageSpanOpened
bool m_isPageSpanOpened
Definition: STOFFTextListener.cxx:147
STOFFTextListener::insertBreak
void insertBreak(BreakType breakType) final
inserts a break type: ColumBreak, PageBreak, ..
Definition: STOFFTextListener.cxx:351
STOFFTextListenerInternal::State::m_firstParagraphInPageSpan
bool m_firstParagraphInPageSpan
Definition: STOFFTextListener.cxx:159
STOFFTextListener::isPageSpanOpened
bool isPageSpanOpened() const final
returns true if a page is opened
Definition: STOFFTextListener.cxx:561
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
STOFFTextListener::insertField
void insertField(STOFFField const &field) final
adds a field type
Definition: STOFFTextListener.cxx:457
STOFFParagraph.hxx
STOFFTextListener::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: STOFFTextListener.cxx:1569
STOFFTextListener.hxx
STOFFTextListener::insertHeaderRegion
bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a header
Definition: STOFFTextListener.cxx:654
STOFFSubDocument.hxx
STOFFTextListenerInternal::TextState::m_definedParagraphStyleSet
std::set< librevenge::RVNGString > m_definedParagraphStyleSet
the set of defined paragraph style
Definition: STOFFTextListener.cxx:119
STOFFTextListenerInternal::State::m_font
STOFFFont m_font
the font
Definition: STOFFTextListener.cxx:139
STOFFTextListenerInternal::State::m_list
std::shared_ptr< STOFFList > m_list
Definition: STOFFTextListener.cxx:145
STOFFTextListener::insertTab
void insertTab() final
adds a tab
Definition: STOFFTextListener.cxx:340
STOFFTextListener::_changeList
void _changeList()
update the list so that it corresponds to the actual level
Definition: STOFFTextListener.cxx:934
STOFFTextListener::_handleFrameParameters
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame, STOFFGraphicStyle const &style)
adds in propList the frame parameters.
Definition: STOFFTextListener.cxx:1409
STOFFListener::SoftPageBreak
@ SoftPageBreak
Definition: STOFFListener.hxx:59
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
STOFFListener.hxx
STOFFList.hxx
STOFFTextListener::closeFooter
bool closeFooter() final
close a footer
Definition: STOFFTextListener.cxx:701
libstoff::DOC_NONE
@ DOC_NONE
Definition: libstaroffice_internal.hxx:185
STOFFTextListener::getParagraph
const STOFFParagraph & getParagraph() const final
returns the actual paragraph
Definition: STOFFTextListener.cxx:449
STOFFTextListenerInternal::TextState::m_definedFontStyleSet
std::set< librevenge::RVNGString > m_definedFontStyleSet
list of document actually open
Definition: STOFFTextListener.cxx:115
STOFFTextListenerInternal::TextState::~TextState
~TextState()
destructor
Definition: STOFFTextListener.cxx:95
STOFFPosition::Cell
@ Cell
Definition: STOFFPosition.hxx:51
libstoff::SubDocumentType
SubDocumentType
Definition: libstaroffice_internal.hxx:185
STOFFGraphicShape::C_Connector
@ C_Connector
Definition: STOFFGraphicShape.hxx:49
STOFFTextListener::getPageSpan
const STOFFPageSpan & getPageSpan() final
returns the current page span
Definition: STOFFTextListener.cxx:566
STOFFTextListener::closeTableRow
void closeTableRow() final
closes this row
Definition: STOFFTextListener.cxx:1590
STOFFTextListener::_flushDeferredTabs
void _flushDeferredTabs()
low level: flush the deferred tabs
Definition: STOFFTextListener.cxx:1031
STOFFGraphicStyle::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFGraphicStyle.cxx:65
libstoff::DOC_HEADER_FOOTER_REGION
@ DOC_HEADER_FOOTER_REGION
Definition: libstaroffice_internal.hxx:185
STOFFTable
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
STOFFTextListenerInternal::TextState::operator=
TextState & operator=(const TextState &)
STOFFTextListener::_closeListElement
void _closeListElement()
close a list level
Definition: STOFFTextListener.cxx:902
STOFFTextListener::addCoveredTableCell
void addCoveredTableCell(STOFFVec2i const &pos) final
add covered cell
Definition: STOFFTextListener.cxx:1600
STOFFTextListener::closeFrame
void closeFrame() final
close a frame
Definition: STOFFTextListener.cxx:1337
STOFFTextListenerInternal::State::m_paragraphNeedBreak
int m_paragraphNeedBreak
a sequence of bit used to know if we need page/column break
Definition: STOFFTextListener.cxx:143
STOFFTextListener::setDocumentMetaData
void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final
sets the document meta data
Definition: STOFFTextListener.cxx:499
STOFFTextListenerInternal::TextState::m_isHeaderFooterRegionOpened
bool m_isHeaderFooterRegionOpened
a flag to know if the header footer region is started
Definition: STOFFTextListener.cxx:110
STOFFTextListener::closeHeader
bool closeHeader() final
close a header
Definition: STOFFTextListener.cxx:666
STOFFTextListener::isSubDocumentOpened
bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final
returns try if a subdocument is open
Definition: STOFFTextListener.cxx:1503
STOFFTextListener::m_documentInterface
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: STOFFTextListener.hxx:305
STOFFGraphicStyle.hxx
libstoff::ParseException
Definition: libstaroffice_internal.hxx:143
STOFFTextListenerInternal::State::m_isSectionOpened
bool m_isSectionOpened
Definition: STOFFTextListener.cxx:148
STOFFGraphicShape.hxx
STOFFTextListener::openMasterPage
bool openMasterPage(STOFFPageSpan &)
opens a master page
STOFFTextListener::openTableCell
void openTableCell(STOFFCell const &cell) final
open a cell
Definition: STOFFTextListener.cxx:1635
STOFFFrameStyle::m_position
STOFFPosition m_position
the position
Definition: STOFFFrameStyle.hxx:73
STOFFTextListener::isParagraphOpened
bool isParagraphOpened() const final
returns true if a paragraph or a list is opened
Definition: STOFFTextListener.cxx:433
libstoff::DOC_CHART_ZONE
@ DOC_CHART_ZONE
Definition: libstaroffice_internal.hxx:185
STOFFTextListener::closeLayer
void closeLayer()
close a layer
STOFFFont
Class to store font.
Definition: STOFFFont.hxx:43
STOFFTextListener::closeSection
bool closeSection() final
close a section
Definition: STOFFTextListener.cxx:746
STOFFTextListener::getType
Type getType() const final
returns the listener type
Definition: STOFFTextListener.hxx:68
STOFFTextListenerInternal::State::m_numPagesRemainingInSpan
int m_numPagesRemainingInSpan
Definition: STOFFTextListener.cxx:167
STOFFTextListenerInternal::State::m_inSubDocument
bool m_inSubDocument
a stack used to know what is open
Definition: STOFFTextListener.cxx:176
STOFFTextListener::openFrame
bool openFrame(STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
store the position and the style (which will be needed further to insert a textbox or a table with op...
Definition: STOFFTextListener.cxx:1268
STOFFTextListenerInternal::TextState::m_pageList
std::vector< STOFFPageSpan > m_pageList
the pages definition
Definition: STOFFTextListener.cxx:100
STOFFCell::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
adds to the propList
Definition: STOFFCell.cxx:246
STOFFTextListener::insertFooterRegion
bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a footer
Definition: STOFFTextListener.cxx:689
STOFFTextListener::openHeader
bool openHeader(librevenge::RVNGPropertyList const &extras) final
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
Definition: STOFFTextListener.cxx:642
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
STOFFTextListenerInternal::TextState::m_isHeaderFooterOpened
bool m_isHeaderFooterOpened
a flag to know if the header footer is started
Definition: STOFFTextListener.cxx:109
STOFFTextListener::_resetParagraphState
void _resetParagraphState(const bool isListElement=false)
Definition: STOFFTextListener.cxx:851
STOFFTextListenerInternal::TextState::m_footNoteNumber
int m_footNoteNumber
footnote number
Definition: STOFFTextListener.cxx:106
STOFFTextListener::insertNote
void insertNote(STOFFNote const &note, STOFFSubDocumentPtr &subDocument) final
insert a note
Definition: STOFFTextListener.cxx:1070
STOFFGraphicShape::C_Path
@ C_Path
Definition: STOFFGraphicShape.hxx:49
STOFFTextListenerInternal::State::m_isHeaderFooterWithoutParagraph
bool m_isHeaderFooterWithoutParagraph
Definition: STOFFTextListener.cxx:151
STOFFTextListener::_openListElement
void _openListElement()
open a list level
Definition: STOFFTextListener.cxx:872
STOFFGraphicShape::C_Polyline
@ C_Polyline
Definition: STOFFGraphicShape.hxx:49
STOFFTextListener::closeTableCell
void closeTableCell() final
close a cell
Definition: STOFFTextListener.cxx:1652
STOFFTextListener::_pushParsingState
std::shared_ptr< STOFFTextListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: STOFFTextListener.cxx:1672
STOFFTextListener::isDocumentStarted
bool isDocumentStarted() const final
returns true if a document is opened
Definition: STOFFTextListener.cxx:512
STOFFTextListener::closeGroup
void closeGroup() final
close a group
Definition: STOFFTextListener.cxx:1397
STOFFTextListener::openTable
void openTable(STOFFTable const &table) final
open a table (using the last parameters of openFrame for the position )
Definition: STOFFTextListener.cxx:1531
STOFFTextListenerInternal::State::m_currentPageNumber
int m_currentPageNumber
Definition: STOFFTextListener.cxx:168
STOFFTextListenerInternal::State::m_isGroupOpened
bool m_isGroupOpened
a flag to know if openGroup was called
Definition: STOFFTextListener.cxx:153
STOFFTextListener::insertEOL
void insertEOL(bool softBreak=false) final
adds an end of line ( by default an hard one)
Definition: STOFFTextListener.cxx:325
STOFFTextListenerInternal::State::m_currentPage
unsigned m_currentPage
Definition: STOFFTextListener.cxx:166
STOFFTextListenerInternal::TextState
a class to store the document state of a STOFFTextListener
Definition: STOFFTextListener.cxx:74
STOFFTextListener::closeMasterPage
void closeMasterPage()
close a master page
Definition: STOFFTextListener.hxx:113
STOFFTextListenerInternal::State::m_sectionAttributesChanged
bool m_sectionAttributesChanged
Definition: STOFFTextListener.cxx:170
STOFFPosition::Page
@ Page
Definition: STOFFPosition.hxx:51
STOFFTextListenerInternal
Internal and low level namespace to define the states of STOFFTextListener.
Definition: STOFFTextListener.cxx:69
STOFFNote::m_label
librevenge::RVNGString m_label
the note label
Definition: libstaroffice_internal.hxx:399
STOFFTextListener::_popParsingState
void _popParsingState()
resets the previous parsing state
Definition: STOFFTextListener.cxx:1683
STOFFTextListenerInternal::State::m_isPageSpanBreakDeferred
bool m_isPageSpanBreakDeferred
Definition: STOFFTextListener.cxx:150
STOFFTextListener::_openPageSpan
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: STOFFTextListener.cxx:574
STOFFNote::FootNote
@ FootNote
Definition: libstaroffice_internal.hxx:391
STOFFTextListenerInternal::State::m_paragraph
STOFFParagraph m_paragraph
the paragraph
Definition: STOFFTextListener.cxx:141
STOFFTextListener::isHeaderFooterOpened
bool isHeaderFooterOpened() const final
returns true if the header/footer is open
Definition: STOFFTextListener.cxx:637
STOFFTextListener::openGroup
bool openGroup(STOFFFrameStyle const &frame) final
open a group
Definition: STOFFTextListener.cxx:1347
STOFFSection
a class which stores section properties
Definition: STOFFSection.hxx:45
STOFFTextListenerInternal::State::m_section
STOFFSection m_section
the section
Definition: STOFFTextListener.cxx:172
STOFFTextListener::_flushText
void _flushText()
low level: flush the deferred text
Definition: STOFFTextListener.cxx:1039
STOFFTable.hxx
STOFFTextListener::_openSection
void _openSection()
does open a section (low level)
Definition: STOFFTextListener.cxx:761
STOFFTextListener::closeLink
void closeLink() final
close a link
Definition: STOFFTextListener.cxx:485
STOFFTextListener::isGraphicStyleDefined
bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final
check if a graphic style with a display name is already defined
Definition: STOFFTextListener.cxx:277
STOFFTextListener::insertTextBox
void insertTextBox(STOFFFrameStyle const &pos, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a textbox in given position
Definition: STOFFTextListener.cxx:1154
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
STOFFTextListener::insertUnicode
void insertUnicode(uint32_t character) final
insert a character using the font converter to find the utf8 character
Definition: STOFFTextListener.cxx:301
STOFFPosition::CharBaseLine
@ CharBaseLine
Definition: STOFFPosition.hxx:51
STOFFTextListener::STOFFTextListener
STOFFTextListener(STOFFListManagerPtr &listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
constructor
Definition: STOFFTextListener.cxx:233
STOFFTextListenerInternal::State::m_listOrderedLevels
std::vector< bool > m_listOrderedLevels
Definition: STOFFTextListener.cxx:174
STOFFTextListener::insertShape
void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final
adds a shape picture in given position
Definition: STOFFTextListener.cxx:1169
STOFFTextListenerInternal::State::m_subDocumentType
libstoff::SubDocumentType m_subDocumentType
Definition: STOFFTextListener.cxx:180
STOFFTextListenerInternal::State::m_numDeferredTabs
int m_numDeferredTabs
the number of tabs to add
Definition: STOFFTextListener.cxx:136
STOFFPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: STOFFPosition.hxx:145
STOFFPosition.hxx
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
STOFFTextListener::~STOFFTextListener
~STOFFTextListener() final
destructor
Definition: STOFFTextListener.cxx:242
STOFFTextListenerInternal::State::m_textBuffer
librevenge::RVNGString m_textBuffer
a buffer to stored the text
Definition: STOFFTextListener.cxx:134
STOFFTextListener::_insertBreakIfNecessary
void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList)
Definition: STOFFTextListener.cxx:399
STOFFTextListenerInternal::TextState::m_isDocumentStarted
bool m_isDocumentStarted
a flag to know if the document is open
Definition: STOFFTextListener.cxx:109
STOFFTextListener::addEmptyTableCell
void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) final
add empty cell
Definition: STOFFTextListener.cxx:1616
STOFFTextListener::setDocumentLanguage
void setDocumentLanguage(std::string locale) final
sets the documents language
Definition: STOFFTextListener.cxx:506
STOFFTextListenerInternal::TextState::m_smallPictureNumber
int m_smallPictureNumber
number of small picture
Definition: STOFFTextListener.cxx:108
STOFFTextListenerInternal::TextState::m_endNoteNumber
int m_endNoteNumber
endnote number
Definition: STOFFTextListener.cxx:106
STOFFField::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition: libstaroffice_internal.cxx:234
STOFFTextListener::openLayer
bool openLayer(librevenge::RVNGString const &name)
open a layer
STOFFTextListener::_closePageSpan
void _closePageSpan()
does close a page (low level)
Definition: STOFFTextListener.cxx:622
STOFFTextListenerInternal::State::m_isSpanOpened
bool m_isSpanOpened
Definition: STOFFTextListener.cxx:155
STOFFFrameStyle::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFFrameStyle.cxx:79
STOFFTextListenerInternal::State::m_isNote
bool m_isNote
Definition: STOFFTextListener.cxx:178
STOFFTextListenerInternal::TextState::TextState
TextState(std::vector< STOFFPageSpan > const &pageList)
constructor
Definition: STOFFTextListener.cxx:76
STOFFListener
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
STOFFListener::ColumnBreak
@ ColumnBreak
Definition: STOFFListener.hxx:59
librevenge
Definition: STOFFDocument.hxx:42
STOFFParagraph::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the properties
Definition: STOFFParagraph.hxx:73
STOFFPosition::Unknown
@ Unknown
Definition: STOFFPosition.hxx:51
STOFFFont.hxx
libstoff
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libstaroffice_internal.cxx:50
STOFFInputStream.hxx
STOFFLink
a link
Definition: libstaroffice_internal.hxx:375
STOFFTextListener::m_ps
std::shared_ptr< STOFFTextListenerInternal::State > m_ps
the actual local parse state
Definition: STOFFTextListener.hxx:301
STOFFGraphicShape::addTo
void addTo(librevenge::RVNGPropertyList &list) const
add shape to property list
Definition: STOFFGraphicShape.cxx:60
STOFFTextListenerInternal::State::m_isFrameOpened
bool m_isFrameOpened
Definition: STOFFTextListener.cxx:149
libstoff::DOC_NOTE
@ DOC_NOTE
Definition: libstaroffice_internal.hxx:185
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
STOFFPosition::Char
@ Char
Definition: STOFFPosition.hxx:51
STOFFTextListener::isFontStyleDefined
bool isFontStyleDefined(librevenge::RVNGString const &name) const final
check if a font style with a display name is already defined
Definition: STOFFTextListener.cxx:272
STOFFCell.hxx
STOFFTextListener::insertChar
void insertChar(uint8_t character) final
adds a basic character, ..
Definition: STOFFTextListener.cxx:290
STOFFFont::checkForDefault
static void checkForDefault(librevenge::RVNGPropertyList &propList)
check if the font name defined.
Definition: STOFFFont.cxx:106