34 #ifndef MWAW_CONTENT_LISTENER_H
35 #define MWAW_CONTENT_LISTENER_H
39 #include <libwpd/libwpd.h>
50 namespace MWAWContentListenerInternal
127 void setFont(MWAWFont
const &font);
129 MWAWFont
const &
getFont()
const;
152 std::string type=
"image/pict",
153 WPXPropertyList frameExtras=WPXPropertyList());
159 WPXPropertyList frameExtras=WPXPropertyList(),
160 WPXPropertyList textboxExtras=WPXPropertyList());
164 void openTable(
MWAWTable const &table, WPXPropertyList tableExtras=WPXPropertyList());
168 void openTableRow(
float h, WPXUnit unit,
bool headerRow=
false);
241 shared_ptr<MWAWContentListenerInternal::DocumentState>
m_ds;
243 shared_ptr<MWAWContentListenerInternal::State>
m_ps;
245 std::vector<shared_ptr<MWAWContentListenerInternal::State> >
m_psStack;
void _openParagraph()
Definition: MWAWContentListener.cxx:715
bool isHeaderFooterOpened() const
returns true if the header/footer is open
Definition: MWAWContentListener.cxx:594
bool isParagraphOpened() const
returns true if a paragraph or a list is opened
Definition: MWAWContentListener.cxx:385
void closeTable()
closes this table
Definition: MWAWContentListener.cxx:1543
void _closeListElement()
close a list level
Definition: MWAWContentListener.cxx:818
bool isDocumentStarted() const
returns true if a document is opened
Definition: MWAWContentListener.cxx:472
shared_ptr< MWAWContentListenerInternal::DocumentState > m_ds
the main parse state
Definition: MWAWContentListener.hxx:241
void insertCharacter(unsigned char c)
insert a character using the font converter to find the utf8 character
Definition: MWAWContentListener.cxx:214
MWAWParagraph const & getParagraph() const
returns the actual paragraph
Definition: MWAWContentListener.cxx:397
MWAWPageSpan const & getPageSpan()
returns the current page span
Definition: MWAWContentListener.cxx:528
void insertField(MWAWField const &field)
adds a field type
Definition: MWAWContentListener.cxx:405
A class which defines the page properties.
Definition: MWAWPageSpan.hxx:95
bool isSectionOpened() const
returns true if a section is opened
Definition: MWAWContentListener.cxx:628
bool closeSection()
close a section
Definition: MWAWContentListener.cxx:659
bool openSection(MWAWSection const §ion)
open a section if possible
Definition: MWAWContentListener.cxx:643
void handleSubDocument(MWAWSubDocumentPtr subDocument, libmwaw::SubDocumentType subDocumentType)
function called to add a subdocument
Definition: MWAWContentListener.cxx:1419
bool insertHeader(MWAWSubDocumentPtr subDocument, WPXPropertyList const &extras)
insert a header
Definition: MWAWContentListener.cxx:599
void _openSection()
Definition: MWAWContentListener.cxx:674
void openTableRow(float h, WPXUnit unit, bool headerRow=false)
open a row with given height ( if h < 0.0, set min-row-height = -h )
Definition: MWAWContentListener.cxx:1557
void insertUnicode(uint32_t character)
adds an unicode character.
Definition: MWAWContentListener.cxx:256
void insertEOL(bool softBreak=false)
adds an end of line ( by default an hard one)
Definition: MWAWContentListener.cxx:273
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
void _flushText()
Definition: MWAWContentListener.cxx:970
SubDocumentType
Definition: libmwaw_internal.hxx:162
void insertComment(MWAWSubDocumentPtr &subDocument)
adds comment
Definition: MWAWContentListener.cxx:1055
a class used to recreate the table structure using cell informations, ....
Definition: MWAWTable.hxx:53
void _insertBreakIfNecessary(WPXPropertyList &propList)
Definition: MWAWContentListener.cxx:345
void startDocument()
starts the document
Definition: MWAWContentListener.cxx:477
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level. ...
Definition: MWAWContentListener.cxx:834
void insertTab()
adds a tab
Definition: MWAWContentListener.cxx:290
virtual ~MWAWContentListener()
destructor
Definition: MWAWContentListener.cxx:196
void _appendParagraphProperties(WPXPropertyList &propList, const bool isListElement=false)
Definition: MWAWContentListener.cxx:773
a structure used to define a cell and its format
Definition: MWAWCell.hxx:50
Vec2< int > Vec2i
Vec2 of int.
Definition: libmwaw_internal.hxx:592
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:358
WPXDocumentInterface * m_documentInterface
the document interface
Definition: MWAWContentListener.hxx:249
void _handleFrameParameters(WPXPropertyList &propList, MWAWPosition const &pos)
Definition: MWAWContentListener.cxx:1219
bool canOpenSectionAddBreak() const
returns true if we can add open a section, add page break, ...
Definition: MWAWContentListener.cxx:638
shared_ptr< MWAWContentListenerInternal::State > m_ps
the actual local parse state
Definition: MWAWContentListener.hxx:243
bool canWriteText() const
returns true if we can add text data
Definition: MWAWContentListener.hxx:81
void closeTableRow()
closes this row
Definition: MWAWContentListener.cxx:1578
void addEmptyTableCell(Vec2i const &pos, Vec2i span=Vec2i(1, 1))
add empty cell
Definition: MWAWContentListener.cxx:1588
bool isPageSpanOpened() const
returns true if a page is opened
Definition: MWAWContentListener.cxx:523
a class to define the parser state
Definition: MWAWParser.hxx:51
BreakType
the different break type
Definition: MWAWListener.hxx:52
void insertUnicodeString(WPXString const &str)
adds a unicode string
Definition: MWAWContentListener.cxx:266
void endDocument(bool sendDelayedSubDoc=true)
ends the document
Definition: MWAWContentListener.cxx:492
void _openPageSpan(bool sendHeaderFooters=true)
Definition: MWAWContentListener.cxx:536
void insertBreak(BreakType breakType)
inserts a break type: ColumBreak, PageBreak, ..
Definition: MWAWContentListener.cxx:301
bool insertFooter(MWAWSubDocumentPtr subDocument, WPXPropertyList const &extras)
insert a footer
Definition: MWAWContentListener.cxx:612
void _resetParagraphState(const bool isListElement=false)
Definition: MWAWContentListener.cxx:765
void openTableCell(MWAWCell const &cell)
open a cell
Definition: MWAWContentListener.cxx:1607
void _closeSection()
Definition: MWAWContentListener.cxx:695
void _closeParagraph()
Definition: MWAWContentListener.cxx:744
void _openSpan()
Definition: MWAWContentListener.cxx:914
void _closeSpan()
Definition: MWAWContentListener.cxx:938
void _flushDeferredTabs()
Definition: MWAWContentListener.cxx:951
void openTable(MWAWTable const &table, WPXPropertyList tableExtras=WPXPropertyList())
open a table
Definition: MWAWContentListener.cxx:1518
void _openListElement()
open a list level
Definition: MWAWContentListener.cxx:786
void setParagraph(MWAWParagraph const ¶graph)
sets the paragraph
Definition: MWAWContentListener.cxx:390
a class which stores section properties
Definition: MWAWSection.hxx:45
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:348
void setFont(MWAWFont const &font)
sets the font
Definition: MWAWContentListener.cxx:364
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
void _changeList()
update the list so that it corresponds to the actual level
Definition: MWAWContentListener.cxx:851
void insertTextBox(MWAWPosition const &pos, MWAWSubDocumentPtr subDocument, WPXPropertyList frameExtras=WPXPropertyList(), WPXPropertyList textboxExtras=WPXPropertyList())
adds a textbox in given position
Definition: MWAWContentListener.cxx:1080
MWAWFont const & getFont() const
returns the actual font
Definition: MWAWContentListener.cxx:380
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
void _endSubDocument()
Definition: MWAWContentListener.cxx:1504
void insertChar(uint8_t character)
adds a basic character, ..
Definition: MWAWContentListener.cxx:203
bool openFrame(MWAWPosition const &pos, WPXPropertyList extras=WPXPropertyList())
Definition: MWAWContentListener.cxx:1152
a field
Definition: libmwaw_internal.hxx:286
void insertNote(MWAWNote const ¬e, MWAWSubDocumentPtr &subDocument)
insert a note
Definition: MWAWContentListener.cxx:1000
void _popParsingState()
resets the previous parsing state
Definition: MWAWContentListener.cxx:1658
bool isSubDocumentOpened(libmwaw::SubDocumentType &subdocType) const
returns try if a subdocument is open
Definition: MWAWContentListener.cxx:1490
MWAWParserState & m_parserState
the parser state
Definition: MWAWContentListener.hxx:247
a note
Definition: libmwaw_internal.hxx:304
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: MWAWPosition.hxx:47
This class contains a virtual interface to all listener.
Definition: MWAWListener.hxx:46
MWAWContentListener & operator=(const MWAWContentListener &)
void _startSubDocument()
Definition: MWAWContentListener.cxx:1498
This class contents the main functions needed to create a Writer Document.
Definition: MWAWContentListener.hxx:57
void _closePageSpan()
Definition: MWAWContentListener.cxx:579
void closeFrame()
Definition: MWAWContentListener.cxx:1208
shared_ptr< MWAWContentListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: MWAWContentListener.cxx:1644
void insertPicture(MWAWPosition const &pos, const WPXBinaryData &binaryData, std::string type="image/pict", WPXPropertyList frameExtras=WPXPropertyList())
adds a picture in given position
Definition: MWAWContentListener.cxx:1127
std::vector< shared_ptr< MWAWContentListenerInternal::State > > m_psStack
stack of local state
Definition: MWAWContentListener.hxx:245
void closeTableCell()
close a cell
Definition: MWAWContentListener.cxx:1624
void setDocumentLanguage(std::string locale)
sets the documents language
Definition: MWAWContentListener.cxx:466
MWAWSection const & getSection() const
returns the actual section
Definition: MWAWContentListener.cxx:633
MWAWContentListener(MWAWParserState &parserState, std::vector< MWAWPageSpan > const &pageList, WPXDocumentInterface *documentInterface)
constructor
Definition: MWAWContentListener.cxx:190