34 #ifndef MWAW_GRAPHIC_LISTENER_H
35 #define MWAW_GRAPHIC_LISTENER_H
39 #include <libwpd/libwpd.h>
49 namespace MWAWGraphicListenerInternal
71 bool endGraphic(WPXBinaryData &data, std::string &mimeType);
111 void setFont(MWAWFont
const &font);
113 MWAWFont
const &
getFont()
const;
130 const WPXBinaryData &binaryData, std::string type=
"image/pict");
197 shared_ptr<MWAWGraphicListenerInternal::GraphicState>
m_gs;
199 shared_ptr<MWAWGraphicListenerInternal::State>
m_ps;
201 std::vector<shared_ptr<MWAWGraphicListenerInternal::State> >
m_psStack;
void insertChar(uint8_t character)
adds a basic character, ..
Definition: MWAWGraphicListener.cxx:142
void _openParagraph()
Definition: MWAWGraphicListener.cxx:443
bool endGraphic(WPXBinaryData &data, std::string &mimeType)
ends the actual graphic and fill the final WPXBinaryData, ...
Definition: MWAWGraphicListener.cxx:396
void _flushText()
Definition: MWAWGraphicListener.cxx:657
bool openSection(MWAWSection const §ion)
open a section if possible
Definition: MWAWGraphicListener.cxx:694
bool canOpenSectionAddBreak() const
returns true if we can add open a section, add page break, ...
Definition: MWAWGraphicListener.hxx:140
bool isSubDocumentOpened(libmwaw::SubDocumentType &subdocType) const
returns try if a subdocument is open
Definition: MWAWGraphicListener.cxx:909
bool openFrame()
Definition: MWAWGraphicListener.cxx:791
void _resetParagraphState(const bool isListElement=false)
Definition: MWAWGraphicListener.cxx:485
void insertTab()
adds a tab
Definition: MWAWGraphicListener.cxx:247
a structure used to define a picture style
Definition: MWAWGraphicStyle.hxx:47
This class contains the minimal code needed to write a Graphic sub document.
Definition: MWAWGraphicListener.hxx:60
SubDocumentType
Definition: libmwaw_internal.hxx:162
void insertPicture(Box2f const &bdbox, MWAWGraphicStyle const &style, const WPXBinaryData &binaryData, std::string type="image/pict")
adds a picture in given position
Definition: MWAWGraphicListener.cxx:724
void _openListElement()
open a list level
Definition: MWAWGraphicListener.cxx:494
bool closeSection()
close a section
Definition: MWAWGraphicListener.hxx:152
bool isSectionOpened() const
returns true if a section is opened
Definition: MWAWGraphicListener.hxx:144
void _endSubDocument()
Definition: MWAWGraphicListener.cxx:923
shared_ptr< MWAWGraphicListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: MWAWGraphicListener.cxx:937
shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition: libmwaw_internal.hxx:358
void insertTextBox(Box2f const &bdbox, MWAWSubDocumentPtr subDocument, MWAWGraphicStyle const &style)
adds a textbox in given position
Definition: MWAWGraphicListener.cxx:751
void setFont(MWAWFont const &font)
sets the font
Definition: MWAWGraphicListener.cxx:261
void insertBreak(BreakType breakType)
inserts a break type: ColumBreak, PageBreak, ..
Definition: MWAWGraphicListener.cxx:700
MWAWGraphicListener(MWAWParserState &parserState)
constructor
Definition: MWAWGraphicListener.cxx:130
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level. ...
Definition: MWAWGraphicListener.cxx:533
void insertGroup(Box2f const &bdbox, MWAWSubDocumentPtr subDocument)
adds a group: ie.
Definition: MWAWGraphicListener.cxx:779
MWAWGraphicListener & operator=(const MWAWGraphicListener &)
void insertUnicode(uint32_t character)
adds an unicode character.
Definition: MWAWGraphicListener.cxx:206
a class to define the parser state
Definition: MWAWParser.hxx:51
BreakType
the different break type
Definition: MWAWListener.hxx:52
void insertEOL(bool softBreak=false)
adds an end of line ( by default an hard one)
Definition: MWAWGraphicListener.cxx:229
void closeFrame()
Definition: MWAWGraphicListener.cxx:805
std::vector< shared_ptr< MWAWGraphicListenerInternal::State > > m_psStack
stack of local state
Definition: MWAWGraphicListener.hxx:201
void _closeListElement()
close a list level
Definition: MWAWGraphicListener.cxx:520
void _handleFrameParameters(WPXPropertyList &propList, Box2f const &pos, MWAWGraphicStyle const &style)
Definition: MWAWGraphicListener.cxx:816
void _popParsingState()
resets the previous parsing state
Definition: MWAWGraphicListener.cxx:945
shared_ptr< MWAWGraphicListenerInternal::GraphicState > m_gs
the actual global state
Definition: MWAWGraphicListener.hxx:197
a class which stores section properties
Definition: MWAWSection.hxx:45
MWAWParagraph const & getParagraph() const
returns the actual paragraph
Definition: MWAWGraphicListener.cxx:302
void insertCharacter(unsigned char c)
insert a character using the font converter to find the utf8 character
Definition: MWAWGraphicListener.cxx:156
shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition: libmwaw_internal.hxx:348
a structure used to define a picture shape
Definition: MWAWGraphicShape.hxx:46
virtual ~MWAWGraphicListener()
destructor
Definition: MWAWGraphicListener.cxx:135
MWAWParserState & m_parserState
the parser state
Definition: MWAWGraphicListener.hxx:203
class to store the paragraph properties
Definition: MWAWParagraph.hxx:82
a field
Definition: libmwaw_internal.hxx:286
void setParagraph(MWAWParagraph const ¶graph)
sets the paragraph
Definition: MWAWGraphicListener.cxx:291
void _openSpan()
Definition: MWAWGraphicListener.cxx:615
void insertUnicodeString(WPXString const &str)
adds a unicode string
Definition: MWAWGraphicListener.cxx:219
This class contains a virtual interface to all listener.
Definition: MWAWListener.hxx:46
void startGraphic(Box2f const &bdbox)
starts a new graphic
Definition: MWAWGraphicListener.cxx:375
bool isDocumentStarted() const
returns true if a document is opened
Definition: MWAWGraphicListener.cxx:425
void _closeParagraph()
Definition: MWAWGraphicListener.cxx:464
void _startSubDocument()
Definition: MWAWGraphicListener.cxx:917
void _changeList()
update the list so that it corresponds to the actual level
Definition: MWAWGraphicListener.cxx:550
bool canWriteText() const
returns true if a text zone is opened
Definition: MWAWGraphicListener.cxx:430
void handleSubDocument(Vec2f const &orig, MWAWSubDocumentPtr subDocument, libmwaw::SubDocumentType subDocumentType)
function called to add a subdocument
Definition: MWAWGraphicListener.cxx:864
void _closeSpan()
Definition: MWAWGraphicListener.cxx:640
MWAWSection const & getSection() const
returns the actual section
Definition: MWAWGraphicListener.cxx:687
MWAWFont const & getFont() const
returns the actual font
Definition: MWAWGraphicListener.cxx:281
Box2f const & getGraphicBdBox()
returns the graphic bdbox.
Definition: MWAWGraphicListener.cxx:435
bool isParagraphOpened() const
returns true if a paragraph or a list is opened
Definition: MWAWGraphicListener.cxx:286
shared_ptr< MWAWGraphicListenerInternal::State > m_ps
the actual local parse state
Definition: MWAWGraphicListener.hxx:199
void insertField(MWAWField const &field)
adds a field type
Definition: MWAWGraphicListener.cxx:310