MWAWTextListener.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 /* libmwaw
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 MWAW_TEXT_LISTENER_H
41 #define MWAW_TEXT_LISTENER_H
42 
43 #include <vector>
44 
45 #include <librevenge/librevenge.h>
46 
47 #include "libmwaw_internal.hxx"
48 #include "MWAWGraphicStyle.hxx"
49 
50 #include "MWAWListener.hxx"
51 
52 class MWAWCell;
53 class MWAWGraphicStyle;
54 class MWAWGraphicShape;
55 class MWAWTable;
56 
58 {
59 struct DocumentState;
60 struct State;
61 }
62 
65 {
66 public:
68  MWAWTextListener(MWAWParserState &parserState, std::vector<MWAWPageSpan> const &pageList, librevenge::RVNGTextInterface *documentInterface);
70  virtual ~MWAWTextListener();
71 
73  Type getType() const
74  {
75  return Text;
76  }
77 
79  void setDocumentMetaData(librevenge::RVNGPropertyList const &metadata);
81  void setDocumentLanguage(std::string const &locale);
82 
84  void startDocument();
86  void endDocument(bool sendDelayedSubDoc=true);
88  bool isDocumentStarted() const;
89 
91  void handleSubDocument(MWAWSubDocumentPtr subDocument, libmwaw::SubDocumentType subDocumentType);
93  bool isSubDocumentOpened(libmwaw::SubDocumentType &subdocType) const;
97  void closeFrame();
99  bool openGroup(MWAWPosition const &pos);
101  void closeGroup();
102 
104  bool canWriteText() const
105  {
107  }
108 
109  // ------ page --------
111  bool isPageSpanOpened() const;
115  MWAWPageSpan const &getPageSpan();
116 
117  // ------ header/footer --------
119  bool insertHeader(MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras);
121  bool insertFooter(MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras);
123  bool isHeaderFooterOpened() const;
124 
125  // ------ text data -----------
126 
128  void insertChar(uint8_t character);
131  void insertCharacter(unsigned char c);
137  int insertCharacter(unsigned char c, MWAWInputStreamPtr &input, long endPos=-1);
140  void insertUnicode(uint32_t character);
142  void insertUnicodeString(librevenge::RVNGString const &str);
143 
145  void insertTab();
147  void insertEOL(bool softBreak=false);
148 
149  // ------ text format -----------
151  void setFont(MWAWFont const &font);
153  MWAWFont const &getFont() const;
154 
155  // ------ paragraph format -----------
157  bool isParagraphOpened() const;
159  void setParagraph(MWAWParagraph const &paragraph);
161  MWAWParagraph const &getParagraph() const;
162 
163  // ------- fields ----------------
165  void insertField(MWAWField const &field);
166 
167  // ------- link ----------------
169  void openLink(MWAWLink const &link);
171  void closeLink();
172 
173  // ------- subdocument -----------------
175  void insertNote(MWAWNote const &note, MWAWSubDocumentPtr &subDocument);
176 
178  void insertComment(MWAWSubDocumentPtr &subDocument);
179 
181  void insertPicture(MWAWPosition const &pos, MWAWEmbeddedObject const &picture,
184  void insertShape(MWAWPosition const &pos, MWAWGraphicShape const &shape,
185  MWAWGraphicStyle const &style);
187  void insertTextBox(MWAWPosition const &pos, MWAWSubDocumentPtr subDocument,
188  MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle());
189 
190  // ------- table -----------------
192  void openTable(MWAWTable const &table);
194  void closeTable();
196  void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false);
198  void closeTableRow();
200  void openTableCell(MWAWCell const &cell);
202  void closeTableCell();
204  void addEmptyTableCell(MWAWVec2i const &pos, MWAWVec2i span=MWAWVec2i(1,1));
205 
206  // ------- section ---------------
208  bool canOpenSectionAddBreak() const;
210  bool isSectionOpened() const;
212  MWAWSection const &getSection() const;
214  bool openSection(MWAWSection const &section);
216  bool closeSection();
218  void insertBreak(BreakType breakType);
219 
220 protected:
222  void _openSection();
224  void _closeSection();
226  void _openPageSpan(bool sendHeaderFooters=true);
228  void _closePageSpan();
229 
230  void _startSubDocument();
231  void _endSubDocument();
232 
233  void _handleFrameParameters(librevenge::RVNGPropertyList &propList, MWAWPosition const &pos);
234 
235  void _openParagraph();
236  void _closeParagraph();
237  void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false);
238  void _resetParagraphState(const bool isListElement=false);
239 
241  void _openListElement();
243  void _closeListElement();
245  void _changeList();
250  int _getListId() const;
251 
253  void _openSpan();
255  void _closeSpan();
256 
258  void _flushText();
260  void _flushDeferredTabs();
261 
262  void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList);
263 
267  shared_ptr<MWAWTextListenerInternal::State> _pushParsingState();
269  void _popParsingState();
270 
271 protected:
273  shared_ptr<MWAWTextListenerInternal::DocumentState> m_ds;
275  shared_ptr<MWAWTextListenerInternal::State> m_ps;
277  std::vector<shared_ptr<MWAWTextListenerInternal::State> > m_psStack;
281  librevenge::RVNGTextInterface *m_documentInterface;
282 
283 private:
288 };
289 
290 #endif
291 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWEmbeddedObject::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist
Definition: libmwaw_internal.cxx:568
MWAWTextListenerInternal::State::m_isTableRowOpened
bool m_isTableRowOpened
Definition: MWAWTextListener.cxx:143
MWAWPosition::CharBaseLine
@ CharBaseLine
Definition: MWAWPosition.hxx:51
MWAWPosition::Cell
@ Cell
Definition: MWAWPosition.hxx:51
MWAWListener::BreakType
BreakType
the different break type
Definition: MWAWListener.hxx:58
MWAW_shared_ptr_noop_deleter
an noop deleter used to transform a libwpd pointer in a false shared_ptr
Definition: libmwaw_internal.hxx:109
MWAWTextListener::openTableCell
void openTableCell(MWAWCell const &cell)
open a cell
Definition: MWAWTextListener.cxx:1818
MWAWTextListener::insertUnicodeString
void insertUnicodeString(librevenge::RVNGString const &str)
adds a unicode string
Definition: MWAWTextListener.cxx:283
MWAWTextListenerInternal::State::m_currentPage
unsigned m_currentPage
Definition: MWAWTextListener.cxx:147
MWAWPosition::naturalSize
MWAWVec2f const & naturalSize() const
returns the natural size (if known)
Definition: MWAWPosition.hxx:124
MWAWTextListener::closeTable
void closeTable()
closes this table
Definition: MWAWTextListener.cxx:1754
MWAWNote
a note
Definition: libmwaw_internal.hxx:406
MWAWTextListenerInternal::DocumentState::m_metaData
librevenge::RVNGPropertyList m_metaData
the document meta data
Definition: MWAWTextListener.cxx:92
MWAWField::m_type
Type m_type
the type
Definition: libmwaw_internal.hxx:382
MWAWPosition::getInvUnitScale
float getInvUnitScale(librevenge::RVNGUnit fromUnit) const
returns a float which can be used to scale some data in object unit
Definition: MWAWPosition.hxx:183
MWAWTextListenerInternal::State::m_inSubDocument
bool m_inSubDocument
a stack used to know what is open
Definition: MWAWTextListener.cxx:157
MWAWGraphicShape::getBdBox
MWAWBox2f getBdBox() const
returns the basic bdbox
Definition: MWAWGraphicShape.hxx:172
MWAWTextListenerInternal::State::m_firstParagraphInPageSpan
bool m_firstParagraphInPageSpan
Definition: MWAWTextListener.cxx:140
MWAWTextListener::setFont
void setFont(MWAWFont const &font)
sets the font
Definition: MWAWTextListener.cxx:388
MWAW_DEBUG_MSG
#define MWAW_DEBUG_MSG(M)
Definition: libmwaw_internal.hxx:127
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:785
MWAWListener::ColumnBreak
@ ColumnBreak
Definition: MWAWListener.hxx:58
MWAWTextListenerInternal::State
the state of a MWAWTextListener
Definition: MWAWTextListener.cxx:108
MWAWGraphicShape::C_Polygon
@ C_Polygon
Definition: MWAWGraphicShape.hxx:51
MWAWGraphicStyle::addFrameTo
void addFrameTo(librevenge::RVNGPropertyList &pList) const
add all the frame parameters to propList: the background and the borders
Definition: MWAWGraphicStyle.cxx:370
MWAWParserState::m_listManager
MWAWListManagerPtr m_listManager
the list manager
Definition: MWAWParser.hxx:80
MWAWTextListener::openSection
bool openSection(MWAWSection const &section)
open a section if possible
Definition: MWAWTextListener.cxx:661
MWAWTextListener::m_ps
shared_ptr< MWAWTextListenerInternal::State > m_ps
the actual local parse state
Definition: MWAWTextListener.hxx:275
MWAWTextListenerInternal::DocumentState::~DocumentState
~DocumentState()
destructor
Definition: MWAWTextListener.cxx:83
MWAWGraphicShape::C_Path
@ C_Path
Definition: MWAWGraphicShape.hxx:51
MWAWPosition::XFull
@ XFull
Definition: MWAWPosition.hxx:55
MWAWTextListener::getFont
MWAWFont const & getFont() const
returns the actual font
Definition: MWAWTextListener.cxx:404
MWAWTextListenerInternal::DocumentState::m_endNoteNumber
int m_endNoteNumber
endnote number
Definition: MWAWTextListener.cxx:94
libmwaw::DOC_COMMENT_ANNOTATION
@ DOC_COMMENT_ANNOTATION
Definition: libmwaw_internal.hxx:178
MWAWTextListener::insertPicture
void insertPicture(MWAWPosition const &pos, MWAWEmbeddedObject const &picture, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
adds a picture with potential various representationin given position
Definition: MWAWTextListener.cxx:1212
MWAWTextListener::isHeaderFooterOpened
bool isHeaderFooterOpened() const
returns true if the header/footer is open
Definition: MWAWTextListener.cxx:612
MWAWFont::id
int id() const
returns the font id
Definition: MWAWFont.hxx:238
MWAWTextListener::isSectionOpened
bool isSectionOpened() const
returns true if a section is opened
Definition: MWAWTextListener.cxx:646
MWAWTextListener::insertTextBox
void insertTextBox(MWAWPosition const &pos, MWAWSubDocumentPtr subDocument, MWAWGraphicStyle const &frameStyle=MWAWGraphicStyle::emptyStyle())
adds a textbox in given position
Definition: MWAWTextListener.cxx:1099
MWAWPosition::order
int order() const
returns background/foward order
Definition: MWAWPosition.hxx:243
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition: MWAWTextListener.hxx:65
MWAWTextListener::_flushDeferredTabs
void _flushDeferredTabs()
low level: flush the deferred tabs
Definition: MWAWTextListener.cxx:967
MWAWTable.hxx
libmwaw::DOC_CHART
@ DOC_CHART
Definition: libmwaw_internal.hxx:178
libmwaw::DOC_CHART_ZONE
@ DOC_CHART_ZONE
Definition: libmwaw_internal.hxx:178
MWAWPosition::m_xPos
XPos m_xPos
X relative position.
Definition: MWAWPosition.hxx:258
MWAWTextListener::getParagraph
MWAWParagraph const & getParagraph() const
returns the actual paragraph
Definition: MWAWTextListener.cxx:421
MWAWGraphicListener::startDocument
void startDocument()
starts a new document
Definition: MWAWGraphicListener.cxx:432
MWAWPosition::WBackground
@ WBackground
Definition: MWAWPosition.hxx:53
MWAWTextListener::closeFrame
void closeFrame()
tries to close the last open frame
Definition: MWAWTextListener.cxx:1306
MWAWGraphicShape
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
MWAWPosition::YCenter
@ YCenter
Definition: MWAWPosition.hxx:57
MWAWTextListenerInternal::State::m_sectionAttributesChanged
bool m_sectionAttributesChanged
Definition: MWAWTextListener.cxx:151
MWAWFontConverter.hxx
libmwaw::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libmwaw_internal.cxx:63
MWAWTextListener::insertBreak
void insertBreak(BreakType breakType)
inserts a break type: ColumBreak, PageBreak, ..
Definition: MWAWTextListener.cxx:319
MWAWEmbeddedObject
small class use to define a embedded object
Definition: libmwaw_internal.hxx:425
MWAWTextListener::isSubDocumentOpened
bool isSubDocumentOpened(libmwaw::SubDocumentType &subdocType) const
returns try if a subdocument is open
Definition: MWAWTextListener.cxx:1703
MWAWTextListener::_startSubDocument
void _startSubDocument()
Definition: MWAWTextListener.cxx:1711
MWAWTextListener::_openPageSpan
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: MWAWTextListener.cxx:552
MWAWField::getString
librevenge::RVNGString getString() const
returns a string corresponding to the field (if possible) *‍/
Definition: libmwaw_internal.cxx:287
MWAWTextListenerInternal::State::m_isListElementOpened
bool m_isListElementOpened
Definition: MWAWTextListener.cxx:138
MWAWParagraph
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
MWAWPosition::WDynamic
@ WDynamic
Definition: MWAWPosition.hxx:53
MWAWNote::m_number
int m_number
the note number if defined
Definition: libmwaw_internal.hxx:418
MWAWTextListener::m_psStack
std::vector< shared_ptr< MWAWTextListenerInternal::State > > m_psStack
stack of local state
Definition: MWAWTextListener.hxx:277
MWAWGraphicListener::endDocument
void endDocument(bool delayed=true)
ends the actual document
Definition: MWAWGraphicListener.cxx:443
MWAWTextListener::isPageSpanOpened
bool isPageSpanOpened() const
returns true if a page is opened
Definition: MWAWTextListener.cxx:539
MWAWTextListenerInternal::DocumentState::DocumentState
DocumentState(const DocumentState &)
list of document actually open
MWAWTextListener::closeLink
void closeLink()
close a link
Definition: MWAWTextListener.cxx:463
MWAWTextListener::_handleFrameParameters
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, MWAWPosition const &pos)
Definition: MWAWTextListener.cxx:1379
MWAWTextListenerInternal::State::m_paragraphNeedBreak
int m_paragraphNeedBreak
a sequence of bit used to know if we need page/column break
Definition: MWAWTextListener.cxx:124
MWAWTextListener::insertShape
void insertShape(MWAWPosition const &pos, MWAWGraphicShape const &shape, MWAWGraphicStyle const &style)
adds a shape picture in given position
Definition: MWAWTextListener.cxx:1114
MWAWTextListenerInternal
Internal and low level namespace to define the states of MWAWTextListener.
Definition: MWAWTextListener.cxx:71
MWAWTextListener::closeTableCell
void closeTableCell()
close a cell
Definition: MWAWTextListener.cxx:1835
MWAWTextListener::~MWAWTextListener
virtual ~MWAWTextListener()
destructor
Definition: MWAWTextListener.cxx:209
MWAWTextListenerInternal::DocumentState::m_pageList
std::vector< MWAWPageSpan > m_pageList
the pages definition
Definition: MWAWTextListener.cxx:88
MWAWTextListenerInternal::State::m_subDocumentType
libmwaw::SubDocumentType m_subDocumentType
Definition: MWAWTextListener.cxx:161
MWAWTextListener::isParagraphOpened
bool isParagraphOpened() const
returns true if a paragraph or a list is opened
Definition: MWAWTextListener.cxx:409
MWAWGraphicStyle
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:48
MWAWTextListener::endDocument
void endDocument(bool sendDelayedSubDoc=true)
ends the document
Definition: MWAWTextListener.cxx:508
MWAWPageSpan::getPageProperty
void getPageProperty(librevenge::RVNGPropertyList &pList, bool isPresentation=false) const
add the page properties in pList
Definition: MWAWPageSpan.cxx:307
MWAWTextListener::_openSection
void _openSection()
does open a section (low level)
Definition: MWAWTextListener.cxx:693
MWAWTextListener::m_parserState
MWAWParserState & m_parserState
the parser state
Definition: MWAWTextListener.hxx:279
MWAWPosition::XCenter
@ XCenter
Definition: MWAWPosition.hxx:55
MWAWTextListenerInternal::DocumentState::m_subDocuments
std::vector< MWAWSubDocumentPtr > m_subDocuments
Definition: MWAWTextListener.cxx:100
MWAWPosition::Unknown
@ Unknown
Definition: MWAWPosition.hxx:51
MWAWTextListener::_popParsingState
void _popParsingState()
resets the previous parsing state
Definition: MWAWTextListener.cxx:1866
MWAWTextListener::handleSubDocument
void handleSubDocument(MWAWSubDocumentPtr subDocument, libmwaw::SubDocumentType subDocumentType)
function called to add a subdocument
Definition: MWAWTextListener.cxx:1621
MWAWGraphicListener::insertShape
void insertShape(MWAWPosition const &pos, MWAWGraphicShape const &shape, MWAWGraphicStyle const &style)
adds a shape picture in given position
Definition: MWAWGraphicListener.cxx:995
MWAWTextListener::_insertBreakIfNecessary
void _insertBreakIfNecessary(librevenge::RVNGPropertyList &propList)
Definition: MWAWTextListener.cxx:367
MWAWCell.hxx
MWAWTextListener::_appendParagraphProperties
void _appendParagraphProperties(librevenge::RVNGPropertyList &propList, const bool isListElement=false)
Definition: MWAWTextListener.cxx:794
MWAWTextListener::_openListElement
void _openListElement()
open a list level
Definition: MWAWTextListener.cxx:807
MWAWListener::SoftPageBreak
@ SoftPageBreak
Definition: MWAWListener.hxx:58
MWAWSubDocument.hxx
MWAWTextListener::addEmptyTableCell
void addEmptyTableCell(MWAWVec2i const &pos, MWAWVec2i span=MWAWVec2i(1, 1))
add empty cell
Definition: MWAWTextListener.cxx:1799
MWAWPosition::size
MWAWVec2f const & size() const
returns the frame size
Definition: MWAWPosition.hxx:119
MWAWTextListenerInternal::DocumentState::m_smallPictureNumber
int m_smallPictureNumber
number of small picture
Definition: MWAWTextListener.cxx:96
MWAWTextListenerInternal::State::m_isTableColumnOpened
bool m_isTableColumnOpened
Definition: MWAWTextListener.cxx:144
MWAWPageSpan::getPageSpan
int getPageSpan() const
Definition: MWAWPageSpan.hxx:164
MWAWGraphicShape::getType
Type getType() const
returns the type corresponding to a shape
Definition: MWAWGraphicShape.hxx:167
MWAWPosition::YFull
@ YFull
Definition: MWAWPosition.hxx:57
libmwaw::SubDocumentType
SubDocumentType
Definition: libmwaw_internal.hxx:178
MWAWTextListener::openLink
void openLink(MWAWLink const &link)
open a link
Definition: MWAWTextListener.cxx:447
MWAWTextListener::_pushParsingState
shared_ptr< MWAWTextListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: MWAWTextListener.cxx:1855
MWAWTextListener::setParagraph
void setParagraph(MWAWParagraph const &paragraph)
sets the paragraph
Definition: MWAWTextListener.cxx:414
MWAWTextListenerInternal::State::m_isHeaderFooterWithoutParagraph
bool m_isHeaderFooterWithoutParagraph
Definition: MWAWTextListener.cxx:132
MWAWTextListener::insertField
void insertField(MWAWField const &field)
adds a field type
Definition: MWAWTextListener.cxx:429
MWAWPosition::m_anchorCellName
librevenge::RVNGString m_anchorCellName
the anchor cell name
Definition: MWAWPosition.hxx:256
MWAWGraphicStyle::emptyStyle
static MWAWGraphicStyle emptyStyle()
returns an empty style.
Definition: MWAWGraphicStyle.hxx:268
MWAWTextListenerInternal::DocumentState::m_isHeaderFooterStarted
bool m_isHeaderFooterStarted
a flag to know if the header footer is started
Definition: MWAWTextListener.cxx:97
MWAWTextListener::closeGroup
void closeGroup()
close a group
Definition: MWAWTextListener.cxx:1367
MWAWTextListenerInternal::PageBreakBit
@ PageBreakBit
Definition: MWAWTextListener.cxx:73
MWAWTextListenerInternal::DocumentState
a class to store the document state of a MWAWTextListener
Definition: MWAWTextListener.cxx:75
MWAWParagraph.hxx
MWAWGraphicEncoder.hxx
MWAWTextListener::getPageSpan
MWAWPageSpan const & getPageSpan()
returns the current page span
Definition: MWAWTextListener.cxx:544
MWAWVec2::y
T y() const
second element
Definition: libmwaw_internal.hxx:620
MWAWPageSpan::sendHeaderFooters
void sendHeaderFooters(MWAWListener *listener) const
send the page's headers/footers if some exists
Definition: MWAWPageSpan.cxx:278
MWAWTextListenerInternal::State::m_numDeferredTabs
int m_numDeferredTabs
the number of tabs to add
Definition: MWAWTextListener.cxx:117
libmwaw_internal.hxx
MWAWListener
This class contains a virtual interface to all listener.
Definition: MWAWListener.hxx:50
MWAWPosition.hxx
MWAWTextListenerInternal::State::m_isPageSpanBreakDeferred
bool m_isPageSpanBreakDeferred
Definition: MWAWTextListener.cxx:131
MWAWGraphicShape::C_Bad
@ C_Bad
Definition: MWAWGraphicShape.hxx:51
MWAWVec2::x
T x() const
first element
Definition: libmwaw_internal.hxx:615
MWAWTextListener::openTable
void openTable(MWAWTable const &table)
open a table
Definition: MWAWTextListener.cxx:1731
MWAWTextListener::startDocument
void startDocument()
starts the document
Definition: MWAWTextListener.cxx:495
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition: MWAWPosition.hxx:48
MWAWTextListenerInternal::DocumentState::DocumentState
DocumentState(std::vector< MWAWPageSpan > const &pageList)
constructor
Definition: MWAWTextListener.cxx:77
MWAWGraphicEncoder::getBinaryResult
bool getBinaryResult(MWAWEmbeddedObject &result)
return the final graphic
Definition: MWAWGraphicEncoder.cxx:74
MWAWPosition::m_wrapping
Wrapping m_wrapping
Wrapping.
Definition: MWAWPosition.hxx:262
libmwaw::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition: libmwaw_internal.hxx:178
MWAWTextListenerInternal::State::m_isTableOpened
bool m_isTableOpened
Definition: MWAWTextListener.cxx:142
MWAWTextListener::openGroup
bool openGroup(MWAWPosition const &pos)
open a group
Definition: MWAWTextListener.cxx:1316
libmwaw::DOC_GRAPHIC_GROUP
@ DOC_GRAPHIC_GROUP
Definition: libmwaw_internal.hxx:178
MWAWListener::PageBreak
@ PageBreak
Definition: MWAWListener.hxx:58
MWAWTable
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:52
MWAWTextListenerInternal::State::m_listOrderedLevels
std::vector< bool > m_listOrderedLevels
Definition: MWAWTextListener.cxx:155
MWAWTextListener::closeSection
bool closeSection()
close a section
Definition: MWAWTextListener.cxx:678
MWAWVec2< float >
MWAWFont::size
float size() const
returns the font size
Definition: MWAWFont.hxx:249
MWAWCell::addTo
void addTo(librevenge::RVNGPropertyList &propList, shared_ptr< MWAWFontConverter > fontConverter) const
adds to the propList
Definition: MWAWCell.cxx:255
MWAWGraphicListener.hxx
MWAWTextListener::operator=
MWAWTextListener & operator=(const MWAWTextListener &)
operator= (unimplemented)
MWAWGraphicShape.hxx
MWAWSection
a class which stores section properties
Definition: MWAWSection.hxx:46
libmwaw::ParseException
Definition: libmwaw_internal.hxx:142
MWAWTextListenerInternal::State::operator=
State & operator=(const State &)
MWAWTextListener::canWriteText
bool canWriteText() const
returns true if we can add text data
Definition: MWAWTextListener.hxx:104
MWAWTextListenerInternal::State::m_isPageSpanOpened
bool m_isPageSpanOpened
Definition: MWAWTextListener.cxx:128
MWAWPosition::page
int page() const
returns the frame page
Definition: MWAWPosition.hxx:109
MWAWTextListener::_closeSpan
void _closeSpan()
low level: the function which closes the last opened span property
Definition: MWAWTextListener.cxx:953
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1134
MWAWTextListener::m_documentInterface
librevenge::RVNGTextInterface * m_documentInterface
the document interface
Definition: MWAWTextListener.hxx:281
MWAWFont::setId
void setId(int newId)
sets the font id
Definition: MWAWFont.hxx:243
MWAWGraphicShape::C_Polyline
@ C_Polyline
Definition: MWAWGraphicShape.hxx:51
MWAWTextListener::getType
Type getType() const
returns the listener type
Definition: MWAWTextListener.hxx:73
MWAWTextListenerInternal::State::m_isParagraphOpened
bool m_isParagraphOpened
Definition: MWAWTextListener.cxx:137
MWAWTextListenerInternal::DocumentState::m_footNoteNumber
int m_footNoteNumber
footnote number
Definition: MWAWTextListener.cxx:94
libmwaw::DOC_SHEET
@ DOC_SHEET
Definition: libmwaw_internal.hxx:178
MWAWTextListener::openTableRow
void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false)
open a row with given height ( if h < 0.0, set min-row-height = -h )
Definition: MWAWTextListener.cxx:1768
MWAWField
a field
Definition: libmwaw_internal.hxx:369
MWAWTextListener::_flushText
void _flushText()
low level: flush the deferred text
Definition: MWAWTextListener.cxx:986
MWAWTextListenerInternal::State::m_font
MWAWFont m_font
the font
Definition: MWAWTextListener.cxx:120
MWAWPosition::Char
@ Char
Definition: MWAWPosition.hxx:51
MWAWTextListenerInternal::State::State
State(const State &)
libmwaw::DOC_TABLE
@ DOC_TABLE
Definition: libmwaw_internal.hxx:178
MWAWTextListenerInternal::State::m_isSectionOpened
bool m_isSectionOpened
Definition: MWAWTextListener.cxx:129
MWAWInputStreamPtr
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:503
MWAWParserState::m_fontConverter
MWAWFontConverterPtr m_fontConverter
the font converter
Definition: MWAWParser.hxx:74
libmwaw::DOC_TEXT_BOX
@ DOC_TEXT_BOX
Definition: libmwaw_internal.hxx:178
MWAWFont::setSize
void setSize(float sz, bool isRelative=false)
sets the font size
Definition: MWAWFont.hxx:254
MWAWTextListener::insertComment
void insertComment(MWAWSubDocumentPtr &subDocument)
adds comment
Definition: MWAWTextListener.cxx:1074
MWAWGraphicEncoder
main class used to define store librevenge::RVNGDrawingInterface lists of command in a librevenge::RV...
Definition: MWAWGraphicEncoder.hxx:56
MWAWTextListener::getSection
MWAWSection const & getSection() const
returns the actual section
Definition: MWAWTextListener.cxx:651
MWAWList.hxx
libmwaw::DOC_NOTE
@ DOC_NOTE
Definition: libmwaw_internal.hxx:178
MWAWPosition::rightBottomClipping
MWAWVec2f const & rightBottomClipping() const
returns the right bottom clipping
Definition: MWAWPosition.hxx:134
MWAWTextListener::insertHeader
bool insertHeader(MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras)
insert a header
Definition: MWAWTextListener.cxx:617
MWAWGraphicShape::Line
@ Line
Definition: MWAWGraphicShape.hxx:49
MWAWTextListener::setDocumentLanguage
void setDocumentLanguage(std::string const &locale)
sets the documents language
Definition: MWAWTextListener.cxx:484
MWAWListener::Type
Type
the listener type
Definition: MWAWListener.hxx:56
MWAWTextListener::MWAWTextListener
MWAWTextListener(MWAWParserState &parserState, std::vector< MWAWPageSpan > const &pageList, librevenge::RVNGTextInterface *documentInterface)
constructor
Definition: MWAWTextListener.cxx:203
MWAWTextListenerInternal::State::m_isFrameOpened
bool m_isFrameOpened
Definition: MWAWTextListener.cxx:130
MWAWNote::m_type
Type m_type
the note type
Definition: libmwaw_internal.hxx:414
MWAWTextListener::insertCharacter
void insertCharacter(unsigned char c)
insert a character using the font converter to find the utf8 character
Definition: MWAWTextListener.cxx:227
MWAWTextListenerInternal::DocumentState::m_isDocumentStarted
bool m_isDocumentStarted
a flag to know if the document is open
Definition: MWAWTextListener.cxx:97
MWAWGraphicStyle.hxx
MWAWTextListenerInternal::State::m_paragraph
MWAWParagraph m_paragraph
the paragraph
Definition: MWAWTextListener.cxx:122
MWAWPageSpan.hxx
MWAWGraphicShape::C_Ellipse
@ C_Ellipse
Definition: MWAWGraphicShape.hxx:51
MWAWParserState
a class to define the parser state
Definition: MWAWParser.hxx:50
MWAWTextListener::insertTab
void insertTab()
adds a tab
Definition: MWAWTextListener.cxx:308
MWAWTextListener::m_ds
shared_ptr< MWAWTextListenerInternal::DocumentState > m_ds
the main parse state
Definition: MWAWTextListener.hxx:273
MWAWGraphicStyle::m_frameNextName
std::string m_frameNextName
the frame next name (if there is a link)
Definition: MWAWGraphicStyle.hxx:427
MWAWTextListener.hxx
MWAWTextListener::isDocumentStarted
bool isDocumentStarted() const
returns true if a document is opened
Definition: MWAWTextListener.cxx:490
MWAWTextListener::MWAWTextListener
MWAWTextListener(const MWAWTextListener &)
copy constructor (unimplemented)
MWAWTextListener::_closeSection
void _closeSection()
does close a section (low level)
Definition: MWAWTextListener.cxx:716
MWAWTextListener::insertUnicode
void insertUnicode(uint32_t character)
adds an unicode character.
Definition: MWAWTextListener.cxx:273
MWAWPosition::Page
@ Page
Definition: MWAWPosition.hxx:51
MWAWPosition::WForeground
@ WForeground
Definition: MWAWPosition.hxx:53
MWAWSection.hxx
MWAWTextListenerInternal::State::m_isTableCellOpened
bool m_isTableCellOpened
Definition: MWAWTextListener.cxx:145
MWAWParserState::m_fontManager
MWAWFontManagerPtr m_fontManager
the font manager
Definition: MWAWParser.hxx:76
MWAWNote::m_label
librevenge::RVNGString m_label
the note label
Definition: libmwaw_internal.hxx:416
MWAWTextListenerInternal::State::~State
~State()
destructor
Definition: MWAWTextListener.cxx:112
MWAWListener::Text
@ Text
Definition: MWAWListener.hxx:56
MWAWTextListener::_openSpan
void _openSpan()
low level: the function which opens a new span property
Definition: MWAWTextListener.cxx:929
MWAWTextListener::openFrame
bool openFrame(MWAWPosition const &pos, MWAWGraphicStyle const &style=MWAWGraphicStyle::emptyStyle())
tries to open a frame
Definition: MWAWTextListener.cxx:1236
MWAWTextListenerInternal::DocumentState::operator=
DocumentState & operator=(const DocumentState &)
MWAWPosition::origin
MWAWVec2f const & origin() const
return the frame origin
Definition: MWAWPosition.hxx:114
MWAWGraphicShape::addTo
Command addTo(MWAWVec2f const &orig, bool asSurface, librevenge::RVNGPropertyList &propList) const
updates the propList to send to an interface
Definition: MWAWGraphicShape.cxx:454
MWAWPosition::YTop
@ YTop
Definition: MWAWPosition.hxx:57
MWAWTextListener::_openParagraph
void _openParagraph()
Definition: MWAWTextListener.cxx:736
MWAWTextListenerInternal::State::m_numPagesRemainingInSpan
int m_numPagesRemainingInSpan
Definition: MWAWTextListener.cxx:148
MWAWTextListener::closeTableRow
void closeTableRow()
closes this row
Definition: MWAWTextListener.cxx:1789
MWAWListener.hxx
MWAWTextListener::_getListId
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level.
Definition: MWAWTextListener.cxx:853
MWAWTextListenerInternal::State::m_isSpanOpened
bool m_isSpanOpened
Definition: MWAWTextListener.cxx:136
MWAWPosition::unit
librevenge::RVNGUnit unit() const
returns the unit
Definition: MWAWPosition.hxx:139
MWAWTextListenerInternal::DocumentState::m_pageSpan
MWAWPageSpan m_pageSpan
the current page span
Definition: MWAWTextListener.cxx:90
MWAWPosition::m_yPos
YPos m_yPos
Y relative position.
Definition: MWAWPosition.hxx:260
MWAWPosition::XRight
@ XRight
Definition: MWAWPosition.hxx:55
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition: libmwaw_internal.hxx:1008
MWAWPosition::Frame
@ Frame
Definition: MWAWPosition.hxx:51
MWAWTextListener::_closePageSpan
void _closePageSpan()
does close a page (low level)
Definition: MWAWTextListener.cxx:597
MWAWTextListenerInternal::State::m_section
MWAWSection m_section
the section
Definition: MWAWTextListener.cxx:153
MWAWTextListenerInternal::State::m_textBuffer
librevenge::RVNGString m_textBuffer
a buffer to stored the text
Definition: MWAWTextListener.cxx:115
MWAWPosition::WRunThrough
@ WRunThrough
Definition: MWAWPosition.hxx:53
MWAWNote::FootNote
@ FootNote
Definition: libmwaw_internal.hxx:408
MWAWFont::Script
a small struct to define the script position in MWAWFont
Definition: MWAWFont.hxx:100
MWAWPosition::XLeft
@ XLeft
Definition: MWAWPosition.hxx:55
libmwaw
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libmwaw_internal.cxx:51
MWAWPosition::Paragraph
@ Paragraph
Definition: MWAWPosition.hxx:51
MWAWPosition::YBottom
@ YBottom
Definition: MWAWPosition.hxx:57
MWAWPosition::leftTopClipping
MWAWVec2f const & leftTopClipping() const
returns the left top clipping
Definition: MWAWPosition.hxx:129
MWAWTextListener::insertChar
void insertChar(uint8_t character)
adds a basic character, ..
Definition: MWAWTextListener.cxx:216
MWAWTextListenerInternal::State::m_inLink
bool m_inLink
Definition: MWAWTextListener.cxx:160
MWAWInputStream.hxx
MWAWTextListenerInternal::DocumentState::m_sentListMarkers
std::vector< int > m_sentListMarkers
the list of marker corresponding to sent list
Definition: MWAWTextListener.cxx:99
MWAWTextListenerInternal::State::m_list
shared_ptr< MWAWList > m_list
Definition: MWAWTextListener.cxx:126
MWAWPosition::getScaleFactor
static float getScaleFactor(librevenge::RVNGUnit orig, librevenge::RVNGUnit dest)
Definition: MWAWPosition.hxx:143
MWAWTextListener::_endSubDocument
void _endSubDocument()
Definition: MWAWTextListener.cxx:1717
MWAWFont.hxx
MWAWPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: MWAWPosition.hxx:254
MWAWGraphicStyle::addTo
void addTo(librevenge::RVNGPropertyList &pList, bool only1d=false) const
add all the parameters to the propList excepted the frame parameter: the background and the borders
Definition: MWAWGraphicStyle.cxx:191
MWAWSubDocumentPtr
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:517
MWAWBox2< float >
MWAWTextListenerInternal::State::m_isGroupOpened
bool m_isGroupOpened
a flag to know if openGroup was called
Definition: MWAWTextListener.cxx:134
MWAWFont
Class to store font.
Definition: MWAWFont.hxx:44
MWAWCell
a structure used to define a cell and its format
Definition: MWAWCell.hxx:53
MWAWField::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition: libmwaw_internal.cxx:239
MWAWPosition::WParallel
@ WParallel
Definition: MWAWPosition.hxx:53
MWAWTextListener::canOpenSectionAddBreak
bool canOpenSectionAddBreak() const
returns true if we can add open a section, add page break, ...
Definition: MWAWTextListener.cxx:656
libmwaw::DOC_NONE
@ DOC_NONE
Definition: libmwaw_internal.hxx:178
MWAWGraphicStyle::hasSurface
bool hasSurface() const
returns true if the interior surface is defined
Definition: MWAWGraphicStyle.hxx:309
MWAWTextListenerInternal::State::m_currentPageNumber
int m_currentPageNumber
Definition: MWAWTextListener.cxx:149
MWAWTextListener::setDocumentMetaData
void setDocumentMetaData(librevenge::RVNGPropertyList const &metadata)
sets the documents metadata
Definition: MWAWTextListener.cxx:477
MWAWTextListenerInternal::ColumnBreakBit
@ ColumnBreakBit
Definition: MWAWTextListener.cxx:73
MWAWTextListener::insertEOL
void insertEOL(bool softBreak=false)
adds an end of line ( by default an hard one)
Definition: MWAWTextListener.cxx:290
MWAWTextListener::insertNote
void insertNote(MWAWNote const &note, MWAWSubDocumentPtr &subDocument)
insert a note
Definition: MWAWTextListener.cxx:1017
MWAWTextListener::_closeListElement
void _closeListElement()
close a list level
Definition: MWAWTextListener.cxx:837
MWAWTextListenerInternal::State::m_isNote
bool m_isNote
Definition: MWAWTextListener.cxx:159
MWAWTextListener::_closeParagraph
void _closeParagraph()
Definition: MWAWTextListener.cxx:762
MWAWTable::addTablePropertiesTo
void addTablePropertiesTo(librevenge::RVNGPropertyList &propList) const
adds the table properties to propList
Definition: MWAWTable.cxx:123
MWAWTextListenerInternal::State::State
State()
constructor
Definition: MWAWTextListener.cxx:168
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition: libmwaw_internal.hxx:781
MWAWParser.hxx
MWAWTextListener::insertFooter
bool insertFooter(MWAWSubDocumentPtr subDocument, librevenge::RVNGPropertyList const &extras)
insert a footer
Definition: MWAWTextListener.cxx:630
MWAWPageSpan
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:96
MWAWTextListener::_resetParagraphState
void _resetParagraphState(const bool isListElement=false)
Definition: MWAWTextListener.cxx:786
MWAWGraphicShape::C_Rectangle
@ C_Rectangle
Definition: MWAWGraphicShape.hxx:51
MWAWGraphicListener
This class contains the code needed to create Graphic document.
Definition: MWAWGraphicListener.hxx:60
MWAWTextListener::_changeList
void _changeList()
update the list so that it corresponds to the actual level
Definition: MWAWTextListener.cxx:870

Generated on Wed Jun 17 2020 06:30:12 for libmwaw by doxygen 1.8.18