WPSContentListener.h Source File documentation

WPSContentListener.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwps
3 * Version: MPL 2.0 / LGPLv2.1+
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * Major Contributor(s):
10 * Copyright (C) 2006, 2007 Andrew Ziem
11 * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
12 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
13 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
14 *
15 * For minor contributions see the git repository.
16 *
17 * Alternatively, the contents of this file may be used under the terms
18 * of the GNU Lesser General Public License Version 2.1 or later
19 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
20 * applicable instead of those above.
21 *
22 * For further information visit http://libwps.sourceforge.net
23 */
24
25 #ifndef WPSCONTENTLISTENER_H
26 #define WPSCONTENTLISTENER_H
27
28 #include <vector>
29
30 #include <librevenge/librevenge.h>
31
32 #include "libwps_internal.h"
33
34 #include "WPSListener.h"
35
36 class WPSList;
37 class WPSPageSpan;
38 struct WPSParagraph;
39 struct WPSTabStop;
40
41 struct WPSContentParsingState;
42 struct WPSDocumentParsingState;
43
44 class WPSContentListener final : public WPSListener
45 {
46 public:
47 WPSContentListener(std::vector<WPSPageSpan> const &pageList, librevenge::RVNGTextInterface *documentInterface);
48 ~WPSContentListener() final;
49
50 void setDocumentLanguage(int lcid) final;
51 void setMetaData(const librevenge::RVNGPropertyList &list);
52
53 void startDocument();
54 void endDocument();
55 void handleSubDocument(WPSSubDocumentPtr &subDocument, libwps::SubDocumentType subDocumentType);
56 bool isHeaderFooterOpened() const;
57
58 // ------ text data -----------
59
61 void insertCharacter(uint8_t character) final;
65 void insertUnicode(uint32_t character) final;
67 void insertUnicodeString(librevenge::RVNGString const &str) final;
68
69 void insertTab() final;
70 void insertEOL(bool softBreak=false) final;
71 void insertBreak(const uint8_t breakType) final;
72
73 // ------ text format -----------
75 void setFont(const WPSFont &font) final;
77 WPSFont const &getFont() const final;
78
79 // ------ paragraph format -----------
81 bool isParagraphOpened() const final;
83 void setParagraph(const WPSParagraph &para) final;
85 WPSParagraph const &getParagraph() const final;
86
87 // ------ list format -----------
89 void setCurrentList(std::shared_ptr<WPSList> list);
91 std::shared_ptr<WPSList> getCurrentList() const;
92
93 // ------- fields ----------------
95 void insertField(WPSField const &field) final;
96
97 // ------- subdocument -----------------
99 enum NoteType { FOOTNOTE, ENDNOTE };
101 void insertNote(const NoteType noteType, WPSSubDocumentPtr &subDocument);
103 void insertLabelNote(const NoteType noteType, librevenge::RVNGString const &label, WPSSubDocumentPtr &subDocument);
105 void insertComment(WPSSubDocumentPtr &subDocument);
106
108 void insertPicture(WPSPosition const &pos, const librevenge::RVNGBinaryData &binaryData,
109 std::string type="image/pict",
110 librevenge::RVNGPropertyList frameExtras=librevenge::RVNGPropertyList());
112 void insertObject(WPSPosition const &pos, const WPSEmbeddedObject &obj,
113 librevenge::RVNGPropertyList frameExtras=librevenge::RVNGPropertyList());
114
116 void insertTextBox(WPSPosition const &pos, WPSSubDocumentPtr subDocument,
117 librevenge::RVNGPropertyList frameExtras=librevenge::RVNGPropertyList());
119 bool openGroup(WPSPosition const &pos) final;
121 void closeGroup() final;
122
123 // ------- table -----------------
125 void openTable(std::vector<float> const &colWidth, librevenge::RVNGUnit unit);
127 void closeTable();
129 void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false);
131 void closeTableRow();
135 void openTableCell(WPSCell const &cell, librevenge::RVNGPropertyList const &extras=librevenge::RVNGPropertyList());
137 void closeTableCell();
139 void addEmptyTableCell(Vec2i const &pos, Vec2i span=Vec2i(1,1));
140
141 // ------- section ---------------
143 bool isSectionOpened() const;
145 int getSectionNumColumns() const;
147 bool openSection(std::vector<int> colsWidth=std::vector<int>(), librevenge::RVNGUnit unit=librevenge::RVNG_INCH);
149 bool closeSection();
150
151 protected:
152 void _openSection();
153 void _closeSection();
154
155 void _openPageSpan();
156 void _closePageSpan();
157 void _updatePageSpanDependent(bool set);
158
159 void _startSubDocument();
160 void _endSubDocument();
161
162 void _handleFrameParameters(librevenge::RVNGPropertyList &propList, WPSPosition const &pos);
163 bool _openFrame(WPSPosition const &pos, librevenge::RVNGPropertyList extras=librevenge::RVNGPropertyList());
164 void _closeFrame();
165
166 void _openParagraph();
167 void _closeParagraph();
168 void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false);
169 void _resetParagraphState(const bool isListElement=false);
170
171 void _openListElement();
172 void _closeListElement();
173 void _changeList();
174
175 void _openSpan();
176 void _closeSpan();
177
178 void _flushText();
179 void _flushDeferredTabs();
180
181 void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList);
182
186 std::shared_ptr<WPSContentParsingState> _pushParsingState();
188 void _popParsingState();
189
190 protected:
191 std::shared_ptr<WPSDocumentParsingState> m_ds; // main parse state
192 std::shared_ptr<WPSContentParsingState> m_ps; // parse state
193 std::vector<std::shared_ptr<WPSContentParsingState> > m_psStack;
194 librevenge::RVNGTextInterface *m_documentInterface;
195
196 private:
197 WPSContentListener(const WPSContentListener &);
198 WPSContentListener &operator=(const WPSContentListener &);
199 };
200
201 #endif
202 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPSTextSubDocument.h
WPSContentParsingState::m_list
std::shared_ptr< WPSList > m_list
Definition: WPSContentListener.cpp:95
WPSContentListener::_appendParagraphProperties
void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false)
Definition: WPSContentListener.cpp:793
WPSContentListener::closeGroup
void closeGroup() final
close a group
Definition: WPSContentListener.cpp:1227
WPSPosition::XLeft
@ XLeft
Definition: WPSPosition.h:47
WPSPosition::WRunThrough
@ WRunThrough
Definition: WPSPosition.h:45
WPSParagraph.h
WPSContentListener::closeTableCell
void closeTableCell()
close a cell
Definition: WPSContentListener.cpp:1777
WPSPageSpan::sendHeaderFooters
void sendHeaderFooters(WPSContentListener *listener, librevenge::RVNGTextInterface *documentInterface)
Definition: WPSPageSpan.cpp:155
WPSContentListener::getCurrentList
std::shared_ptr< WPSList > getCurrentList() const
returns the current list
Definition: WPSContentListener.cpp:419
WPSContentParsingState::m_pageFormWidth
double m_pageFormWidth
Definition: WPSContentListener.cpp:130
WPSPosition::getScaleFactor
static float getScaleFactor(librevenge::RVNGUnit orig, librevenge::RVNGUnit dest)
returns a float which can be used to convert between to unit
Definition: WPSPosition.h:138
WPSField
a field
Definition: libwps_internal.h:463
WPSContentListener::_changeList
void _changeList()
Definition: WPSContentListener.cpp:864
WPSContentParsingState::m_sectionAttributesChanged
bool m_sectionAttributesChanged
Definition: WPSContentListener.cpp:124
WPSParagraph::m_listLevelIndex
int m_listLevelIndex
the actual level index
Definition: WPSParagraph.h:121
WPSContentParsingState::m_inSubDocument
bool m_inSubDocument
a stack used to know what is open
Definition: WPSContentListener.cpp:140
WPSContentParsingState::m_isTableCellOpened
bool m_isTableCellOpened
Definition: WPSContentListener.cpp:118
WPS_SOFT_PAGE_BREAK
#define WPS_SOFT_PAGE_BREAK
Definition: libwps_internal.h:520
WPSContentParsingState::m_isPageSpanOpened
bool m_isPageSpanOpened
Definition: WPSContentListener.cpp:100
WPSContentListener::isSectionOpened
bool isSectionOpened() const
returns true if a section is opened
Definition: WPSContentListener.cpp:449
WPSContentListener::_openPageSpan
void _openPageSpan()
Definition: WPSContentListener.cpp:591
WPSContentListener::~WPSContentListener
~WPSContentListener() final
Definition: WPSContentListener.cpp:220
WPSContentParsingState::m_listOrderedLevels
std::vector< bool > m_listOrderedLevels
Definition: WPSContentListener.cpp:138
WPSPosition::XCenter
@ XCenter
Definition: WPSPosition.h:47
WPSContentListener::isParagraphOpened
bool isParagraphOpened() const final
returns true if a paragraph or a list is opened
Definition: WPSContentListener.cpp:376
WPSContentParsingState::m_isListElementOpened
bool m_isListElementOpened
Definition: WPSContentListener.cpp:110
WPSCell.h
WPSContentListener::setFont
void setFont(const WPSFont &font) final
set the actual font
Definition: WPSContentListener.cpp:354
WPSPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: WPSPosition.h:241
WPSContentListener::m_documentInterface
librevenge::RVNGTextInterface * m_documentInterface
Definition: WPSContentListener.h:194
WPSDocumentParsingState::WPSDocumentParsingState
WPSDocumentParsingState(std::vector< WPSPageSpan > const &pageList)
constructor
Definition: WPSContentListener.cpp:67
WPSPageSpan::getFormLength
double getFormLength() const
Definition: WPSPageSpan.h:59
WPSContentParsingState::m_pageMarginLeft
double m_pageMarginLeft
Definition: WPSContentListener.cpp:133
WPSParagraph::m_margins
double m_margins[3]
the margins
Definition: WPSParagraph.h:101
WPS_SUBSCRIPT_BIT
#define WPS_SUBSCRIPT_BIT
Definition: libwps_internal.h:500
WPSContentParsingState::m_paragraph
WPSParagraph m_paragraph
Definition: WPSContentListener.cpp:94
WPSContentParsingState::m_pageFormOrientationIsPortrait
bool m_pageFormOrientationIsPortrait
Definition: WPSContentListener.cpp:131
WPSContentListener::setDocumentLanguage
void setDocumentLanguage(int lcid) final
Definition: WPSContentListener.cpp:528
WPSContentListener::_closeParagraph
void _closeParagraph()
Definition: WPSContentListener.cpp:751
WPS_OVERLINE_BIT
#define WPS_OVERLINE_BIT
Definition: libwps_internal.h:515
WPS_UNDERLINE_BIT
#define WPS_UNDERLINE_BIT
Definition: libwps_internal.h:508
WPSContentParsingState::~WPSContentParsingState
~WPSContentParsingState()
Definition: WPSContentListener.cpp:207
WPSContentParsingState::m_isParagraphOpened
bool m_isParagraphOpened
Definition: WPSContentListener.cpp:109
WPSContentListener::_handleFrameParameters
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, WPSPosition const &pos)
Definition: WPSContentListener.cpp:1308
libwps
Definition: libwps_internal.cpp:39
WPSContentListener::_openFrame
bool _openFrame(WPSPosition const &pos, librevenge::RVNGPropertyList extras=librevenge::RVNGPropertyList())
Definition: WPSContentListener.cpp:1239
WPSContentParsingState::m_isFrameOpened
bool m_isFrameOpened
Definition: WPSContentListener.cpp:102
WPS_SUPERSCRIPT_BIT
#define WPS_SUPERSCRIPT_BIT
Definition: libwps_internal.h:499
WPSContentParsingState::m_isTableColumnOpened
bool m_isTableColumnOpened
Definition: WPSContentListener.cpp:117
WPSPosition::naturalSize
Vec2f const & naturalSize() const
returns the natural size (if known)
Definition: WPSPosition.h:128
WPSPageSpan::getMarginLeft
double getMarginLeft() const
Definition: WPSPageSpan.h:71
WPSDocumentParsingState::m_isHeaderFooterStarted
bool m_isHeaderFooterStarted
Definition: WPSContentListener.cpp:59
WPSContentListener::insertEOL
void insertEOL(bool softBreak=false) final
Definition: WPSContentListener.cpp:255
WPSContentListener::_endSubDocument
void _endSubDocument()
Definition: WPSContentListener.cpp:1637
WPSPosition::m_wrapping
Wrapping m_wrapping
Wrapping.
Definition: WPSPosition.h:249
WPSList.h
WPSContentParsingState::operator=
WPSContentParsingState & operator=(const WPSContentParsingState &)=delete
WPSPosition::m_anchorCellName
librevenge::RVNGString m_anchorCellName
the anchor cell name
Definition: WPSPosition.h:243
WPSContentListener::_insertBreakIfNecessary
void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList)
Definition: WPSContentListener.cpp:334
WPSContentListener
Definition: WPSContentListener.h:45
WPSFont::m_languageId
int m_languageId
the language (simplified locale name id) if known
Definition: WPSFont.h:93
WPSFont
define the font properties
Definition: WPSFont.h:37
WPSContentListener::WPSContentListener
WPSContentListener(std::vector< WPSPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
Definition: WPSContentListener.cpp:211
WPSContentListener::setCurrentList
void setCurrentList(std::shared_ptr< WPSList > list)
function to set the actual list
Definition: WPSContentListener.cpp:413
WPSPosition::Char
@ Char
Definition: WPSPosition.h:43
WPSTabStop
Definition: WPSParagraph.h:38
WPSContentParsingState::m_textBuffer
librevenge::RVNGString m_textBuffer
Definition: WPSContentListener.cpp:90
WPSParagraph::m_listLevel
ListLevel m_listLevel
the actual level
Definition: WPSParagraph.h:123
WPSContentListener::_closeFrame
void _closeFrame()
Definition: WPSContentListener.cpp:1296
WPSContentListener::_openSection
void _openSection()
Definition: WPSContentListener.cpp:666
WPSContentListener::insertLabelNote
void insertLabelNote(const NoteType noteType, librevenge::RVNGString const &label, WPSSubDocumentPtr &subDocument)
adds a label note
Definition: WPSContentListener.cpp:1046
WPSContentListener::insertNote
void insertNote(const NoteType noteType, WPSSubDocumentPtr &subDocument)
adds note
Definition: WPSContentListener.cpp:1035
WPSColumnDefinition
Definition: libwps_internal.h:256
WPSContentListener::getSectionNumColumns
int getSectionNumColumns() const
returns the actual number of columns ( or 1 if no section is opened )
Definition: WPSContentListener.cpp:454
WPSContentListener::openGroup
bool openGroup(WPSPosition const &pos) final
open a group
Definition: WPSContentListener.cpp:1173
WPSContentListener::insertField
void insertField(WPSField const &field) final
adds a field
Definition: WPSContentListener.cpp:427
libwps::DOC_TEXT_BOX
@ DOC_TEXT_BOX
Definition: libwps_internal.h:248
WPSPosition::CharBaseLine
@ CharBaseLine
Definition: WPSPosition.h:43
WPSContentListener::m_ds
std::shared_ptr< WPSDocumentParsingState > m_ds
Definition: WPSContentListener.h:191
WPS_PAGE_BREAK
#define WPS_PAGE_BREAK
Definition: libwps_internal.h:519
WPSContentListener::_openParagraph
void _openParagraph()
Definition: WPSContentListener.cpp:722
WPSContentParsingState::m_isSectionOpened
bool m_isSectionOpened
Definition: WPSContentListener.cpp:101
WPSPosition::origin
Vec2f const & origin() const
return the frame origin
Definition: WPSPosition.h:118
WPSPageSpan::getFormWidth
double getFormWidth() const
Definition: WPSPageSpan.h:63
WPSContentListener::_flushDeferredTabs
void _flushDeferredTabs()
Definition: WPSContentListener.cpp:978
WPSPageSpan.h
WPSContentListener::m_psStack
std::vector< std::shared_ptr< WPSContentParsingState > > m_psStack
Definition: WPSContentListener.h:193
WPSContentParsingState::m_isNote
bool m_isNote
Definition: WPSContentListener.cpp:142
WPSField::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition: libwps_internal.cpp:530
WPSContentParsingState::m_pageMarginBottom
double m_pageMarginBottom
Definition: WPSContentListener.cpp:136
WPSPosition::getInvUnitScale
float getInvUnitScale(librevenge::RVNGUnit unt) const
returns a float which can be used to scale some data in object unit
Definition: WPSPosition.h:176
libwps::ParseException
Definition: libwps_internal.h:152
WPSContentListener::_closeSpan
void _closeSpan()
Definition: WPSContentListener.cpp:965
Vec2< float >
WPSField::m_type
Type m_type
the type
Definition: libwps_internal.h:484
WPSPosition::size
Vec2f const & size() const
returns the frame size
Definition: WPSPosition.h:123
WPS_DEBUG_MSG
#define WPS_DEBUG_MSG(M)
Definition: libwps_internal.h:134
WPSPosition::YBottom
@ YBottom
Definition: WPSPosition.h:49
WPS_FALLTHROUGH
#define WPS_FALLTHROUGH
fall through attributes
Definition: libwps_internal.h:82
WPSParagraph
class to store the paragraph properties
Definition: WPSParagraph.h:58
WPSContentListener.h
WPSContentParsingState::m_subDocumentType
libwps::SubDocumentType m_subDocumentType
Definition: WPSContentListener.cpp:143
WPSContentListener::_updatePageSpanDependent
void _updatePageSpanDependent(bool set)
Definition: WPSContentListener.cpp:659
WPSContentListener::openTableCell
void openTableCell(WPSCell const &cell, librevenge::RVNGPropertyList const &extras=librevenge::RVNGPropertyList())
low level function to define a cell.
Definition: WPSContentListener.cpp:1757
WPSDocumentParsingState::m_footNoteNumber
int m_footNoteNumber
footnote number
Definition: WPSContentListener.cpp:56
Vec2::x
T x() const
first element
Definition: libwps_internal.h:542
WPSPageSpan::getPageProperty
void getPageProperty(librevenge::RVNGPropertyList &pList) const
Definition: WPSPageSpan.cpp:282
WPSPosition::YFull
@ YFull
Definition: WPSPosition.h:49
WPSContentListener::openSection
bool openSection(std::vector< int > colsWidth=std::vector< int >(), librevenge::RVNGUnit unit=librevenge::RVNG_INCH)
open a section if possible
Definition: WPSContentListener.cpp:459
WPSContentParsingState::m_isSpanOpened
bool m_isSpanOpened
Definition: WPSContentListener.cpp:108
libwps::DOC_COMMENT_ANNOTATION
@ DOC_COMMENT_ANNOTATION
Definition: libwps_internal.h:248
WPSContentListener::insertTextBox
void insertTextBox(WPSPosition const &pos, WPSSubDocumentPtr subDocument, librevenge::RVNGPropertyList frameExtras=librevenge::RVNGPropertyList())
adds a textbox in given position
Definition: WPSContentListener.cpp:1131
libwps::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string ( with correct encoding ).
Definition: libwps_internal.cpp:836
libwps::SubDocumentType
SubDocumentType
Definition: libwps_internal.h:248
WPSPageSpan::PORTRAIT
@ PORTRAIT
Definition: WPSPageSpan.h:41
WPSListener
virtual class for content listener
Definition: WPSListener.h:37
WPSContentListener::getFont
WPSFont const & getFont() const final
returns the actual font
Definition: WPSContentListener.cpp:368
WPSFont.h
WPSPosition::YCenter
@ YCenter
Definition: WPSPosition.h:49
WPSContentParsingState::m_pageMarginTop
double m_pageMarginTop
Definition: WPSContentListener.cpp:135
WPSDocumentParsingState::m_endNoteNumber
int m_endNoteNumber
endnote number
Definition: WPSContentListener.cpp:56
WPSField::getString
librevenge::RVNGString getString() const
returns a string corresponding to the field (if possible) *‍/
Definition: libwps_internal.cpp:584
WPSContentListener::_closeListElement
void _closeListElement()
Definition: WPSContentListener.cpp:847
WPSContentParsingState::m_isHeaderFooterWithoutParagraph
bool m_isHeaderFooterWithoutParagraph
Definition: WPSContentListener.cpp:104
WPSDocumentParsingState::WPSDocumentParsingState
WPSDocumentParsingState(const WPSDocumentParsingState &)=delete
list of document actually open
WPSPosition::YTop
@ YTop
Definition: WPSPosition.h:49
WPSContentListener::handleSubDocument
void handleSubDocument(WPSSubDocumentPtr &subDocument, libwps::SubDocumentType subDocumentType)
Definition: WPSContentListener.cpp:1538
WPSContentListener::startDocument
void startDocument()
Definition: WPSContentListener.cpp:546
libwps::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition: libwps_internal.h:248
WPSContentListener::_resetParagraphState
void _resetParagraphState(const bool isListElement=false)
Definition: WPSContentListener.cpp:774
WPSCell::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: WPSCell.cpp:534
WPSContentListener::setMetaData
void setMetaData(const librevenge::RVNGPropertyList &list)
Definition: WPSContentListener.cpp:536
WPSContentParsingState::m_isParagraphPageBreak
bool m_isParagraphPageBreak
Definition: WPSContentListener.cpp:98
WPSPosition::Paragraph
@ Paragraph
Definition: WPSPosition.h:43
WPSContentParsingState::m_textColumns
std::vector< WPSColumnDefinition > m_textColumns
Definition: WPSContentListener.cpp:126
WPSPosition::page
int page() const
returns the frame page
Definition: WPSPosition.h:113
libwps::DOC_CHART_ZONE
@ DOC_CHART_ZONE
Definition: libwps_internal.h:248
WPSContentListener::insertPicture
void insertPicture(WPSPosition const &pos, const librevenge::RVNGBinaryData &binaryData, std::string type="image/pict", librevenge::RVNGPropertyList frameExtras=librevenge::RVNGPropertyList())
adds a picture in given position
Definition: WPSContentListener.cpp:1144
WPSFont::m_size
double m_size
font size
Definition: WPSFont.h:85
WPSContentListener::insertObject
void insertObject(WPSPosition const &pos, const WPSEmbeddedObject &obj, librevenge::RVNGPropertyList frameExtras=librevenge::RVNGPropertyList())
adds an object with replacement picture in given position
Definition: WPSContentListener.cpp:1157
WPSSubDocumentPtr
std::shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition: libwps_internal.h:111
WPSEmbeddedObject
small class use to define a embedded object
Definition: libwps_internal.h:1077
WPSContentParsingState::m_isGroupOpened
bool m_isGroupOpened
a flag to know if openGroup was called
Definition: WPSContentListener.cpp:106
WPSPosition::unit
librevenge::RVNGUnit unit() const
returns the unit
Definition: WPSPosition.h:133
WPSContentListener::_flushText
void _flushText()
Definition: WPSContentListener.cpp:1001
WPSContentListener::_closePageSpan
void _closePageSpan()
Definition: WPSContentListener.cpp:647
WPSPosition::ParagraphContent
@ ParagraphContent
Definition: WPSPosition.h:43
libwps::DOC_NOTE
@ DOC_NOTE
Definition: libwps_internal.h:248
WPSCell
a structure used to defined the cell position, and a format
Definition: WPSCell.h:291
WPSContentListener::insertTab
void insertTab() final
adds an unicode character to a string ( with correct encoding ).
Definition: WPSContentListener.cpp:276
WPSContentListener::openTableRow
void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false)
open a row with given height.
Definition: WPSContentListener.cpp:1702
WPSPageSpan::getMarginTop
double getMarginTop() const
Definition: WPSPageSpan.h:79
WPSContentParsingState::m_numPagesRemainingInSpan
int m_numPagesRemainingInSpan
Definition: WPSContentListener.cpp:121
WPSContentListener::_popParsingState
void _popParsingState()
resets the previous parsing state
Definition: WPSContentListener.cpp:1818
libwps::DOC_NONE
@ DOC_NONE
Definition: libwps_internal.h:248
WPSContentParsingState::m_isParagraphColumnBreak
bool m_isParagraphColumnBreak
Definition: WPSContentListener.cpp:97
WPSPosition::XRight
@ XRight
Definition: WPSPosition.h:47
WPSContentParsingState::m_currentPageNumber
int m_currentPageNumber
Definition: WPSContentListener.cpp:122
WPSPosition::Cell
@ Cell
Definition: WPSPosition.h:43
WPSPageSpan::getPageSpan
int getPageSpan() const
Definition: WPSPageSpan.h:107
libwps_tools_win.h
WPSList::Level::m_labelWidth
double m_labelWidth
the list width
Definition: WPSList.h:94
WPSContentListener::openTable
void openTable(std::vector< float > const &colWidth, librevenge::RVNGUnit unit)
open a table
Definition: WPSContentListener.cpp:1651
WPSTextSubDocument::parse
virtual void parse(std::shared_ptr< WPSContentListener > &listener, libwps::SubDocumentType subDocumentType)=0
virtual parse function
WPSPageSpan
Definition: WPSPageSpan.h:39
WPSPosition::Page
@ Page
Definition: WPSPosition.h:43
WPSColumnDefinition::m_width
double m_width
Definition: libwps_internal.h:263
WPSPageSpan::getMarginBottom
double getMarginBottom() const
Definition: WPSPageSpan.h:83
WPSContentListener::insertBreak
void insertBreak(const uint8_t breakType) final
Definition: WPSContentListener.cpp:288
WPSContentListener::closeTable
void closeTable()
closes this table
Definition: WPSContentListener.cpp:1687
WPSContentParsingState
the content state
Definition: WPSContentListener.cpp:86
WPSDocumentParsingState::operator=
WPSDocumentParsingState & operator=(const WPSDocumentParsingState &)=delete
libwps::DOC_TABLE
@ DOC_TABLE
Definition: libwps_internal.h:248
WPSContentParsingState::m_pageFormLength
double m_pageFormLength
Definition: WPSContentListener.cpp:129
WPSContentListener::addEmptyTableCell
void addEmptyTableCell(Vec2i const &pos, Vec2i span=Vec2i(1, 1))
add empty cell
Definition: WPSContentListener.cpp:1736
WPSContentListener::isHeaderFooterOpened
bool isHeaderFooterOpened() const
Definition: WPSContentListener.cpp:1626
WPSDocumentParsingState::m_metaData
librevenge::RVNGPropertyList m_metaData
Definition: WPSContentListener.cpp:54
WPSContentParsingState::m_isTableRowOpened
bool m_isTableRowOpened
Definition: WPSContentListener.cpp:116
WPSContentListener::_closeSection
void _closeSection()
Definition: WPSContentListener.cpp:703
WPSPosition.h
WPSPageSpan::getMarginRight
double getMarginRight() const
Definition: WPSPageSpan.h:75
WPSTextSubDocument
Basic class used to store a sub document.
Definition: WPSTextSubDocument.h:36
WPSPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: WPSPosition.h:40
WPSPosition::XFull
@ XFull
Definition: WPSPosition.h:47
WPSEmbeddedObject::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist
Definition: libwps_internal.cpp:784
WPSContentParsingState::m_isTextColumnWithoutParagraph
bool m_isTextColumnWithoutParagraph
Definition: WPSContentListener.cpp:127
WPSList
a small structure used to store the informations about a list
Definition: WPSList.h:37
WPSContentParsingState::m_firstParagraphInPageSpan
bool m_firstParagraphInPageSpan
Definition: WPSContentListener.cpp:112
WPSContentListener::getParagraph
WPSParagraph const & getParagraph() const final
returns the actual paragraph
Definition: WPSContentListener.cpp:381
WPSPosition::m_yPos
YPos m_yPos
Y relative position.
Definition: WPSPosition.h:247
WPSContentListener::NoteType
NoteType
defines the footnote type
Definition: WPSContentListener.h:99
WPSDocumentParsingState::~WPSDocumentParsingState
~WPSDocumentParsingState()
destructor
Definition: WPSContentListener.cpp:79
WPSContentListener::insertUnicodeString
void insertUnicodeString(librevenge::RVNGString const &str) final
adds a unicode string
Definition: WPSContentListener.cpp:248
WPSContentListener::m_ps
std::shared_ptr< WPSContentParsingState > m_ps
Definition: WPSContentListener.h:192
libwps_internal.h
WPSContentParsingState::m_numDeferredTabs
int m_numDeferredTabs
Definition: WPSContentListener.cpp:91
WPSContentListener::ENDNOTE
@ ENDNOTE
Definition: WPSContentListener.h:99
WPSContentParsingState::m_isPageSpanBreakDeferred
bool m_isPageSpanBreakDeferred
Definition: WPSContentListener.cpp:103
WPSDocumentParsingState::m_subDocuments
std::vector< WPSSubDocumentPtr > m_subDocuments
Definition: WPSContentListener.cpp:60
WPSContentParsingState::m_isTableOpened
bool m_isTableOpened
Definition: WPSContentListener.cpp:115
WPSDocumentParsingState::m_newListId
int m_newListId
Definition: WPSContentListener.cpp:57
WPSDocumentParsingState::m_isDocumentStarted
bool m_isDocumentStarted
Definition: WPSContentListener.cpp:59
WPS_COLUMN_BREAK
#define WPS_COLUMN_BREAK
Definition: libwps_internal.h:521
WPSContentParsingState::m_pageMarginRight
double m_pageMarginRight
Definition: WPSContentListener.cpp:134
WPSContentListener::endDocument
void endDocument()
Definition: WPSContentListener.cpp:562
WPSContentListener::closeTableRow
void closeTableRow()
closes this row
Definition: WPSContentListener.cpp:1725
librevenge
Definition: WPSOLEStream.h:34
WPSPageSpan::getFormOrientation
FormOrientation getFormOrientation() const
Definition: WPSPageSpan.h:67
WPSContentListener::insertCharacter
void insertCharacter(uint8_t character) final
adds a basic character, ..
Definition: WPSContentListener.cpp:227
WPSContentListener::_openSpan
void _openSpan()
Definition: WPSContentListener.cpp:940
WPSDocumentParsingState::m_pageList
std::vector< WPSPageSpan > m_pageList
Definition: WPSContentListener.cpp:53
WPSContentListener::_startSubDocument
void _startSubDocument()
Definition: WPSContentListener.cpp:1631
libwps_tools_win::Language::localeName
std::string localeName(long id)
returns the simplified locale name
Definition: libwps_tools_win.cpp:7423
WPS_shared_ptr_noop_deleter
a noop deleter used to transform a librevenge pointer in a false std::shared_ptr
Definition: libwps_internal.h:72
WPSContentParsingState::m_numColumns
int m_numColumns
Definition: WPSContentListener.cpp:125
WPSListener.h
WPSPosition::PageContent
@ PageContent
Definition: WPSPosition.h:43
WPSContentParsingState::m_numRowsToSkip
std::vector< unsigned int > m_numRowsToSkip
Definition: WPSContentListener.cpp:114
WPSContentListener::insertUnicode
void insertUnicode(uint32_t character) final
adds an unicode character
Definition: WPSContentListener.cpp:239
WPSPageSpan::getPageNumber
int getPageNumber() const
Definition: WPSPageSpan.h:91
WPSContentListener::insertComment
void insertComment(WPSSubDocumentPtr &subDocument)
adds comment
Definition: WPSContentListener.cpp:1104
Vec2::y
T y() const
second element
Definition: libwps_internal.h:547
WPSPosition::m_xPos
XPos m_xPos
X relative position.
Definition: WPSPosition.h:245
WPSContentParsingState::m_font
WPSFont m_font
Definition: WPSContentListener.cpp:93
WPSContentListener::setParagraph
void setParagraph(const WPSParagraph &para) final
sets the actual paragraph
Definition: WPSContentListener.cpp:386
WPSContentParsingState::m_currentPage
unsigned m_currentPage
Definition: WPSContentListener.cpp:120
WPSContentListener::_pushParsingState
std::shared_ptr< WPSContentParsingState > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: WPSContentListener.cpp:1798
WPSContentListener::closeSection
bool closeSection()
close a section
Definition: WPSContentListener.cpp:507
WPSDocumentParsingState
the document state
Definition: WPSContentListener.cpp:47
WPSFont::m_name
librevenge::RVNGString m_name
font name
Definition: WPSFont.h:83
WPSContentListener::FOOTNOTE
@ FOOTNOTE
Definition: WPSContentListener.h:99
WPSContentListener::_openListElement
void _openListElement()
Definition: WPSContentListener.cpp:822
WPSContentParsingState::WPSContentParsingState
WPSContentParsingState()
Definition: WPSContentListener.cpp:150
WPSPosition::WDynamic
@ WDynamic
Definition: WPSPosition.h:45
WPSContentParsingState::WPSContentParsingState
WPSContentParsingState(const WPSContentParsingState &)=delete