STOFFGraphicListener.hxx Source File documentation

STOFFGraphicListener.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_GRAPHIC_LISTENER_H
35 #define STOFF_GRAPHIC_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 STOFFGraphicShape;
48
49 namespace STOFFGraphicListenerInternal
50 {
51 struct GraphicState;
52 struct State;
53 }
54
59 class STOFFGraphicListener final : public STOFFListener
60 {
61 public:
63 STOFFGraphicListener(STOFFListManagerPtr listManager, std::vector<STOFFPageSpan> const &pageList, librevenge::RVNGDrawingInterface *drawingInterface);
65 STOFFGraphicListener(STOFFListManagerPtr listManager, std::vector<STOFFPageSpan> const &pageList, librevenge::RVNGPresentationInterface *presentationInterface);
67 ~STOFFGraphicListener() final;
68
70 Type getType() const final
71 {
72 return Graphic;
73 }
74
76 void setDocumentLanguage(std::string locale) final;
78 void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final;
80 void startDocument() final;
82 void endDocument(bool sendDelayedSubDoc=true) final;
83
84 // ------ general information --------
86 bool canWriteText() const final;
88 bool isDocumentStarted() const final;
89
91 void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final;
93 bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final;
95 bool openFrame(STOFFFrameStyle const &frame, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
97 void closeFrame() final;
99 bool openGroup(STOFFFrameStyle const &frame) final;
101 void closeGroup() final;
103 bool openLayer(librevenge::RVNGString const &name);
105 void closeLayer();
106
107 // ------ page --------
109 bool openMasterPage(STOFFPageSpan &masterPage);
111 void closeMasterPage()
112 {
113 _closePageSpan(true);
114 }
116 bool isPageSpanOpened() const final;
120 STOFFPageSpan const &getPageSpan() final;
121
122 // ------ header/footer --------
124 bool openHeader(librevenge::RVNGPropertyList const &extras) final;
126 bool openFooter(librevenge::RVNGPropertyList const &extras) final;
128 bool closeHeader() final;
130 bool closeFooter() final;
132 bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final;
134 bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final;
136 bool isHeaderFooterOpened() const final;
137
138 // ------ text data -----------
140 void insertChar(uint8_t character) final;
145 void insertUnicode(uint32_t character) final;
147 void insertUnicodeString(librevenge::RVNGString const &str) final;
148
150 void insertTab() final;
152 void insertEOL(bool softBreak=false) final;
153
154 // ------ text format -----------
156 void setFont(STOFFFont const &font) final;
158 STOFFFont const &getFont() const final;
159
160 // ------ paragraph format -----------
162 bool isParagraphOpened() const final;
164 void setParagraph(STOFFParagraph const &paragraph) final;
166 STOFFParagraph const &getParagraph() const final;
167
168 // ------ style definition -----------
170 void defineStyle(STOFFFont const &style) final;
172 bool isFontStyleDefined(librevenge::RVNGString const &name) const final;
174 void defineStyle(STOFFGraphicStyle const &style) final;
176 bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final;
178 void defineStyle(STOFFParagraph const &style) final;
180 bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final;
181
182 // ------- fields ----------------
184 void insertField(STOFFField const &field) final;
185
186 // ------- link ----------------
188 void openLink(STOFFLink const &link) final;
190 void closeLink() final;
191
192 // ------- subdocument -----------------
194 void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final;
196 void insertTextBox(STOFFFrameStyle const &frame, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
198 void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture,
199 STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
201 void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation,
202 STOFFGraphicStyle const &style=STOFFGraphicStyle()) final;
206 void insertNote(STOFFNote const &note, STOFFSubDocumentPtr &subDocument) final;
210 void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final;
211
212 // ------- table -----------------
213
215 void openTable(STOFFTable const &table) final;
217 void openTable(STOFFFrameStyle const &frame, STOFFTable const &table);
219 void closeTable() final;
221 void openTableRow(float h, librevenge::RVNGUnit unit, bool headerRow=false) final;
223 void closeTableRow() final;
225 void openTableCell(STOFFCell const &cell) final;
227 void closeTableCell() final;
229 void addCoveredTableCell(STOFFVec2i const &pos) final;
231 void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1,1)) final;
232
233 // ------- section ---------------
234
236 bool canOpenSectionAddBreak() const final
237 {
238 return false;
239 }
241 bool isSectionOpened() const final
242 {
243 return false;
244 }
246 STOFFSection const &getSection() const final;
248 bool openSection(STOFFSection const &section) final;
250 bool closeSection() final
251 {
252 return false;
253 }
255 void insertBreak(BreakType breakType) final;
256
257 protected:
259 void _openPageSpan(bool sendHeaderFooters=true);
261 void _closePageSpan(bool masterPage=false);
262
263 void _startSubDocument();
264 void _endSubDocument();
265
269 void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame, STOFFGraphicStyle const &style);
270
271 void _openParagraph();
272 void _closeParagraph();
273 void _resetParagraphState(const bool isListElement=false);
274
276 void _openListElement();
278 void _closeListElement();
280 void _changeList();
285 int _getListId() const;
286
287 void _openSpan();
288 void _closeSpan();
289
290 void _flushText();
291
295 std::shared_ptr<STOFFGraphicListenerInternal::State> _pushParsingState();
297 void _popParsingState();
298
299 protected:
301 std::shared_ptr<STOFFGraphicListenerInternal::GraphicState> m_ds;
303 std::shared_ptr<STOFFGraphicListenerInternal::State> m_ps;
305 std::vector<std::shared_ptr<STOFFGraphicListenerInternal::State> > m_psStack;
307 librevenge::RVNGDrawingInterface *m_drawingInterface;
309 librevenge::RVNGPresentationInterface *m_presentationInterface;
310
311 private:
312 STOFFGraphicListener(const STOFFGraphicListener &);
313 STOFFGraphicListener &operator=(const STOFFGraphicListener &);
314 };
315
316 #endif
317 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
STOFFGraphicListener::_closeParagraph
void _closeParagraph()
Definition: STOFFGraphicListener.cxx:699
STOFFPosition::Paragraph
@ Paragraph
Definition: STOFFPosition.hxx:51
STOFFGraphicListenerInternal::State::m_isGroupOpened
bool m_isGroupOpened
a flag to know if openGroup was called
Definition: STOFFGraphicListener.cxx:159
STOFFGraphicStyle::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: STOFFGraphicStyle.hxx:66
STOFFGraphicListenerInternal::GraphicState::m_isMasterPageSpanOpened
bool m_isMasterPageSpanOpened
true if a masterpage is open
Definition: STOFFGraphicListener.cxx:103
STOFFGraphicListenerInternal::GraphicState::m_sentListMarkers
std::vector< int > m_sentListMarkers
the list of marker corresponding to sent list
Definition: STOFFGraphicListener.cxx:112
STOFFParagraph
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
STOFFGraphicListener::defineStyle
void defineStyle(STOFFFont const &style) final
defines a font styles
Definition: STOFFGraphicListener.cxx:242
STOFFGraphicListener::isFontStyleDefined
bool isFontStyleDefined(librevenge::RVNGString const &name) const final
check if a font style with a display name is already defined
Definition: STOFFGraphicListener.cxx:277
STOFFGraphicListener::openLink
void openLink(STOFFLink const &link) final
open a link
Definition: STOFFGraphicListener.cxx:434
STOFFGraphicListener::operator=
STOFFGraphicListener & operator=(const STOFFGraphicListener &)
STOFFGraphicListenerInternal::State::m_currentPageNumber
int m_currentPageNumber
Definition: STOFFGraphicListener.cxx:175
STOFFField
a field
Definition: libstaroffice_internal.hxx:363
STOFFGraphicListener::_closeSpan
void _closeSpan()
Definition: STOFFGraphicListener.cxx:898
STOFFVec2< float >
STOFFGraphicListener::_closeListElement
void _closeListElement()
close a list level
Definition: STOFFGraphicListener.cxx:762
STOFFGraphicListenerInternal::GraphicState::GraphicState
GraphicState(std::vector< STOFFPageSpan > const &pageList)
constructor
Definition: STOFFGraphicListener.cxx:68
STOFFGraphicListener::_openSpan
void _openSpan()
Definition: STOFFGraphicListener.cxx:867
STOFFGraphicShape::C_Unknown
@ C_Unknown
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicListenerInternal::GraphicState::m_isHeaderFooterOpened
bool m_isHeaderFooterOpened
a flag to know if the header footer is started
Definition: STOFFGraphicListener.cxx:107
STOFFGraphicShape::C_Rectangle
@ C_Rectangle
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicListenerInternal::State::m_subDocumentType
libstoff::SubDocumentType m_subDocumentType
Definition: STOFFGraphicListener.cxx:180
STOFF_DEBUG_MSG
#define STOFF_DEBUG_MSG(M)
Definition: libstaroffice_internal.hxx:129
STOFFGraphicListenerInternal::State::m_isTableOpened
bool m_isTableOpened
a stack used to know what is open
Definition: STOFFGraphicListener.cxx:168
STOFFGraphicListenerInternal::State::m_currentPage
unsigned m_currentPage
Definition: STOFFGraphicListener.cxx:173
STOFFFrameStyle.hxx
STOFFGraphicShape::m_command
Command m_command
the command
Definition: STOFFGraphicShape.hxx:65
STOFFGraphicListener::_endSubDocument
void _endSubDocument()
Definition: STOFFGraphicListener.cxx:1718
STOFFGraphicListener::isSubDocumentOpened
bool isSubDocumentOpened(libstoff::SubDocumentType &subdocType) const final
returns try if a subdocument is open
Definition: STOFFGraphicListener.cxx:1704
STOFFGraphicListener::getParagraph
const STOFFParagraph & getParagraph() const final
returns the actual paragraph
Definition: STOFFGraphicListener.cxx:410
STOFFGraphicListenerInternal::State::m_framePosition
STOFFFrameStyle m_framePosition
the frame position
Definition: STOFFGraphicListener.cxx:152
STOFFGraphicListenerInternal::State::m_isTableRowOpened
bool m_isTableRowOpened
Definition: STOFFGraphicListener.cxx:169
STOFFGraphicListenerInternal::GraphicState::operator=
GraphicState & operator=(GraphicState const &)=default
STOFFGraphicListener::isParagraphOpened
bool isParagraphOpened() const final
returns true if a paragraph or a list is opened
Definition: STOFFGraphicListener.cxx:390
STOFFGraphicShape::C_Polygon
@ C_Polygon
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicListener::closeFrame
void closeFrame() final
close a frame
Definition: STOFFGraphicListener.cxx:1543
STOFFListener::m_listManager
STOFFListManagerPtr m_listManager
the list manager
Definition: STOFFListener.hxx:250
STOFFGraphicShape
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
STOFFListener::Type
Type
the listener type
Definition: STOFFListener.hxx:57
STOFFGraphicListenerInternal::GraphicState::m_pageList
std::vector< STOFFPageSpan > m_pageList
the pages definition
Definition: STOFFGraphicListener.cxx:95
STOFFListener::BreakType
BreakType
the different break type
Definition: STOFFListener.hxx:59
STOFFFrameStyle
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
STOFFGraphicListenerInternal::State::m_origin
STOFFVec2f m_origin
the origin position
Definition: STOFFGraphicListener.cxx:138
STOFFGraphicListenerInternal::State::isInTextZone
bool isInTextZone() const
returns true if we are in a text zone, ie. either in a textbox or a table cell
Definition: STOFFGraphicListener.cxx:133
STOFFGraphicListener::closeMasterPage
void closeMasterPage()
close a master page
Definition: STOFFGraphicListener.hxx:111
STOFFPageSpan
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
STOFFGraphicListener::canWriteText
bool canWriteText() const final
returns true if a text zone is opened
Definition: STOFFGraphicListener.cxx:534
STOFFGraphicListener
This class contains the code needed to create Graphic document.
Definition: STOFFGraphicListener.hxx:59
STOFFGraphicListener::closeTableRow
void closeTableRow() final
closes this row
Definition: STOFFGraphicListener.cxx:1423
STOFFGraphicListener::canOpenSectionAddBreak
bool canOpenSectionAddBreak() const final
returns true if we can add open a section, add page break, ...
Definition: STOFFGraphicListener.hxx:236
STOFFGraphicListenerInternal::State::m_numPagesRemainingInSpan
int m_numPagesRemainingInSpan
Definition: STOFFGraphicListener.cxx:174
STOFFSection.hxx
STOFFGraphicListener::insertHeaderRegion
bool insertHeaderRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a header
Definition: STOFFGraphicListener.cxx:994
STOFFGraphicListener::closeTableCell
void closeTableCell() final
close a cell
Definition: STOFFGraphicListener.cxx:1500
STOFFGraphicListenerInternal::State::~State
~State()
destructor
Definition: STOFFGraphicListener.cxx:130
STOFFGraphicListenerInternal::State::m_isFrameOpened
bool m_isFrameOpened
a flag to know if openFrame was called
Definition: STOFFGraphicListener.cxx:150
STOFFGraphicListener::openMasterPage
bool openMasterPage(STOFFPageSpan &masterPage)
opens a master page
Definition: STOFFGraphicListener.cxx:554
STOFFGraphicListener::closeLayer
void closeLayer()
close a layer
Definition: STOFFGraphicListener.cxx:1623
STOFFGraphicListener::closeSection
bool closeSection() final
close a section
Definition: STOFFGraphicListener.hxx:250
STOFFGraphicListenerInternal::GraphicState::m_isPageSpanOpened
bool m_isPageSpanOpened
true if a page is open
Definition: STOFFGraphicListener.cxx:101
STOFFGraphicListener::insertChar
void insertChar(uint8_t character) final
adds a basic character, ..
Definition: STOFFGraphicListener.cxx:295
STOFFGraphicListener::setDocumentLanguage
void setDocumentLanguage(std::string locale) final
sets the documents language
Definition: STOFFGraphicListener.cxx:516
STOFFGraphicListener::insertEquation
void insertEquation(STOFFFrameStyle const &frame, librevenge::RVNGString const &equation, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a equation given a position
Definition: STOFFGraphicListener.cxx:1182
STOFFGraphicListener::insertFooterRegion
bool insertFooterRegion(STOFFSubDocumentPtr subDocument, librevenge::RVNGString const &which) final
insert a footer
Definition: STOFFGraphicListener.cxx:1048
STOFFGraphicListener::m_psStack
std::vector< std::shared_ptr< STOFFGraphicListenerInternal::State > > m_psStack
stack of local state
Definition: STOFFGraphicListener.hxx:305
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
STOFFGraphicShape::C_Ellipse
@ C_Ellipse
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicListener::insertUnicode
void insertUnicode(uint32_t character) final
insert a character using the font converter to find the utf8 character
Definition: STOFFGraphicListener.cxx:309
STOFFGraphicListenerInternal::State::m_inNote
bool m_inNote
Definition: STOFFGraphicListener.cxx:178
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
STOFFGraphicListener::m_ps
std::shared_ptr< STOFFGraphicListenerInternal::State > m_ps
the actual local parse state
Definition: STOFFGraphicListener.hxx:303
libstoff::DOC_TEXT_BOX
@ DOC_TEXT_BOX
Definition: libstaroffice_internal.hxx:185
STOFFNote
a note
Definition: libstaroffice_internal.hxx:389
libstaroffice.hxx
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
STOFFGraphicListenerInternal::GraphicState::~GraphicState
~GraphicState()
destructor
Definition: STOFFGraphicListener.cxx:91
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
STOFFGraphicListener::setFont
void setFont(STOFFFont const &font) final
sets the font
Definition: STOFFGraphicListener.cxx:374
STOFFGraphicListenerInternal::State::m_inLink
bool m_inLink
Definition: STOFFGraphicListener.cxx:177
STOFFGraphicListenerInternal::State
the state of a STOFFGraphicListener
Definition: STOFFGraphicListener.cxx:126
STOFFGraphicListener::openSection
bool openSection(STOFFSection const &section) final
open a section if possible
Definition: STOFFGraphicListener.cxx:1082
STOFFEmbeddedObject
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
STOFFPageSpan::sendHeaderFooters
void sendHeaderFooters(STOFFListener *listener) const
send the page's headers/footers if some exists
Definition: STOFFPageSpan.cxx:94
libstaroffice_internal.hxx
STOFFGraphicListener::_popParsingState
void _popParsingState()
resets the previous parsing state
Definition: STOFFGraphicListener.cxx:1744
STOFFGraphicListener::getFont
const STOFFFont & getFont() const final
returns the actual font
Definition: STOFFGraphicListener.cxx:385
STOFFGraphicListener::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: STOFFGraphicListener.cxx:1521
STOFFGraphicListener::getSection
const STOFFSection & getSection() const final
returns the actual section
Definition: STOFFGraphicListener.cxx:1076
STOFFGraphicListener::closeGroup
void closeGroup() final
close a group
Definition: STOFFGraphicListener.cxx:1579
STOFFGraphicListener::isSectionOpened
bool isSectionOpened() const final
returns true if a section is opened
Definition: STOFFGraphicListener.hxx:241
STOFFPageSpan.hxx
libstoff::DOC_TABLE
@ DOC_TABLE
Definition: libstaroffice_internal.hxx:185
STOFFGraphicListenerInternal::State::m_isTableColumnOpened
bool m_isTableColumnOpened
Definition: STOFFGraphicListener.cxx:170
STOFFGraphicListener::STOFFGraphicListener
STOFFGraphicListener(STOFFListManagerPtr listManager, std::vector< STOFFPageSpan > const &pageList, librevenge::RVNGDrawingInterface *drawingInterface)
constructor with a drawing interface
Definition: STOFFGraphicListener.cxx:218
STOFFGraphicListener::_openPageSpan
void _openPageSpan(bool sendHeaderFooters=true)
does open a new page (low level)
Definition: STOFFGraphicListener.cxx:578
STOFFGraphicListener::m_ds
std::shared_ptr< STOFFGraphicListenerInternal::GraphicState > m_ds
the actual global state
Definition: STOFFGraphicListener.hxx:301
STOFFParagraph.hxx
STOFFGraphicListenerInternal::State::State
State()
constructor
Definition: STOFFGraphicListener.cxx:187
STOFFGraphicListener::closeTable
void closeTable() final
closes this table
Definition: STOFFGraphicListener.cxx:1382
STOFFSubDocument.hxx
STOFFGraphicListener::insertBreak
void insertBreak(BreakType breakType) final
inserts a break type: ColumBreak, PageBreak, ..
Definition: STOFFGraphicListener.cxx:1088
STOFFGraphicListener::isGraphicStyleDefined
bool isGraphicStyleDefined(librevenge::RVNGString const &name) const final
check if a graphic style with a display name is already defined
Definition: STOFFGraphicListener.cxx:282
STOFFGraphicListener::_flushText
void _flushText()
Definition: STOFFGraphicListener.cxx:920
STOFFListener::SoftPageBreak
@ SoftPageBreak
Definition: STOFFListener.hxx:59
STOFFGraphicListener::_getListId
int _getListId() const
low level: find a list id which corresponds to actual list and a change of level.
Definition: STOFFGraphicListener.cxx:778
STOFFSubDocumentPtr
std::shared_ptr< STOFFSubDocument > STOFFSubDocumentPtr
a smart pointer of STOFFSubDocument
Definition: libstaroffice_internal.hxx:499
STOFFGraphicListenerInternal::State::m_font
STOFFFont m_font
the font
Definition: STOFFGraphicListener.cxx:143
STOFFGraphicListenerInternal::State::m_isParagraphOpened
bool m_isParagraphOpened
Definition: STOFFGraphicListener.cxx:163
libstoff::DOC_COMMENT_ANNOTATION
@ DOC_COMMENT_ANNOTATION
Definition: libstaroffice_internal.hxx:185
STOFFListener.hxx
STOFFList.hxx
libstoff::DOC_NONE
@ DOC_NONE
Definition: libstaroffice_internal.hxx:185
STOFFGraphicListener::addCoveredTableCell
void addCoveredTableCell(STOFFVec2i const &pos) final
add covered cell
Definition: STOFFGraphicListener.cxx:1436
STOFFGraphicListener::openGroup
bool openGroup(STOFFFrameStyle const &frame) final
open a group
Definition: STOFFGraphicListener.cxx:1552
STOFFGraphicListenerInternal::GraphicState::m_section
STOFFSection m_section
am empty section
Definition: STOFFGraphicListener.cxx:122
libstoff::SubDocumentType
SubDocumentType
Definition: libstaroffice_internal.hxx:185
STOFFGraphicListenerInternal
Internal and low level namespace to define the states of STOFFGraphicListener.
Definition: STOFFGraphicListener.cxx:63
STOFFGraphicShape::C_Connector
@ C_Connector
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicListener::closeHeader
bool closeHeader() final
close a header
Definition: STOFFGraphicListener.cxx:1004
STOFFGraphicListenerInternal::State::m_listOrderedLevels
std::vector< bool > m_listOrderedLevels
Definition: STOFFGraphicListener.cxx:166
STOFFGraphicListenerInternal::State::m_isLayerOpened
bool m_isLayerOpened
a flag to know if openLayer was called
Definition: STOFFGraphicListener.cxx:161
STOFFGraphicListener::_handleFrameParameters
void _handleFrameParameters(librevenge::RVNGPropertyList &propList, STOFFFrameStyle const &frame, STOFFGraphicStyle const &style)
adds in propList the frame parameters.
Definition: STOFFGraphicListener.cxx:1637
STOFFGraphicListener::isHeaderFooterOpened
bool isHeaderFooterOpened() const final
returns true if the header/footer is open
Definition: STOFFGraphicListener.cxx:960
STOFFGraphicListener::openLayer
bool openLayer(librevenge::RVNGString const &name)
open a layer
Definition: STOFFGraphicListener.cxx:1593
STOFFGraphicListener::endDocument
void endDocument(bool sendDelayedSubDoc=true) final
ends the actual document
Definition: STOFFGraphicListener.cxx:493
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
STOFFPageSpan::m_pageSpan
int m_pageSpan
the number of page
Definition: STOFFPageSpan.hxx:108
STOFFTable
a class used to recreate the table structure using cell informations, ....
Definition: STOFFTable.hxx:51
STOFFGraphicListener::~STOFFGraphicListener
~STOFFGraphicListener() final
destructor
Definition: STOFFGraphicListener.cxx:238
STOFFGraphicListenerInternal::GraphicState::m_definedGraphicStyleSet
std::set< librevenge::RVNGString > m_definedGraphicStyleSet
the set of defined graphic style
Definition: STOFFGraphicListener.cxx:118
STOFFGraphicListener::openHeader
bool openHeader(librevenge::RVNGPropertyList const &extras) final
open a header (interaction with STOFFPageSpan which fills the parameters for openHeader)
Definition: STOFFGraphicListener.cxx:965
STOFFGraphicListener::insertShape
void insertShape(STOFFFrameStyle const &frame, STOFFGraphicShape const &shape, STOFFGraphicStyle const &style) final
adds a shape picture in given position
Definition: STOFFGraphicListener.cxx:1216
STOFFGraphicListenerInternal::GraphicState
the global graphic state of STOFFGraphicListener
Definition: STOFFGraphicListener.cxx:66
STOFFGraphicListenerInternal::State::m_inSubDocument
bool m_inSubDocument
Definition: STOFFGraphicListener.cxx:179
STOFFGraphicStyle.hxx
libstoff::ParseException
Definition: libstaroffice_internal.hxx:143
STOFFGraphicShape.hxx
STOFFGraphicListener::isPageSpanOpened
bool isPageSpanOpened() const final
returns true if a page is opened
Definition: STOFFGraphicListener.cxx:542
STOFFGraphicListenerInternal::State::m_isSpanOpened
bool m_isSpanOpened
Definition: STOFFGraphicListener.cxx:162
STOFFFrameStyle::m_position
STOFFPosition m_position
the position
Definition: STOFFFrameStyle.hxx:73
STOFFGraphicListener::insertPicture
void insertPicture(STOFFFrameStyle const &frame, STOFFEmbeddedObject const &picture, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a picture with potential various representationin given position
Definition: STOFFGraphicListener.cxx:1154
STOFFGraphicListener::_openParagraph
void _openParagraph()
Definition: STOFFGraphicListener.cxx:676
STOFFGraphicListenerInternal::GraphicState::m_definedParagraphStyleSet
std::set< librevenge::RVNGString > m_definedParagraphStyleSet
the set of defined paragraph style
Definition: STOFFGraphicListener.cxx:120
STOFFFont
Class to store font.
Definition: STOFFFont.hxx:43
STOFFGraphicListenerInternal::GraphicState::m_definedFontStyleSet
std::set< librevenge::RVNGString > m_definedFontStyleSet
the set of defined font style
Definition: STOFFGraphicListener.cxx:116
STOFFGraphicListener::closeFooter
bool closeFooter() final
close a footer
Definition: STOFFGraphicListener.cxx:1058
STOFFGraphicListener::insertTab
void insertTab() final
adds a tab
Definition: STOFFGraphicListener.cxx:357
STOFFGraphicListener::isDocumentStarted
bool isDocumentStarted() const final
returns true if a document is opened
Definition: STOFFGraphicListener.cxx:529
STOFFCell::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
adds to the propList
Definition: STOFFCell.cxx:246
STOFFGraphicListenerInternal::GraphicState::m_isHeaderFooterRegionOpened
bool m_isHeaderFooterRegionOpened
a flag to know if the header footer region is started
Definition: STOFFGraphicListener.cxx:108
STOFFGraphicListener.hxx
STOFFGraphicListener::setDocumentMetaData
void setDocumentMetaData(const librevenge::RVNGPropertyList &list) final
sets the document meta data
Definition: STOFFGraphicListener.cxx:522
STOFFTable::addTablePropertiesTo
void addTablePropertiesTo(librevenge::RVNGPropertyList &propList) const
adds the table properties to propList
Definition: STOFFTable.cxx:68
STOFFVec2f
STOFFVec2< float > STOFFVec2f
STOFFVec2 of float.
Definition: libstaroffice_internal.hxx:771
STOFFGraphicStyle
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
STOFFGraphicListener::setParagraph
void setParagraph(STOFFParagraph const &paragraph) final
sets the paragraph
Definition: STOFFGraphicListener.cxx:395
STOFFGraphicListener::closeLink
void closeLink() final
close a link
Definition: STOFFGraphicListener.cxx:459
STOFFGraphicListenerInternal::State::m_isTableCellOpened
bool m_isTableCellOpened
Definition: STOFFGraphicListener.cxx:171
STOFFGraphicShape::C_Path
@ C_Path
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicShape::C_Polyline
@ C_Polyline
Definition: STOFFGraphicShape.hxx:49
STOFFGraphicListenerInternal::State::m_isListElementOpened
bool m_isListElementOpened
Definition: STOFFGraphicListener.cxx:164
STOFFGraphicListener::m_drawingInterface
librevenge::RVNGDrawingInterface * m_drawingInterface
the drawing interface
Definition: STOFFGraphicListener.hxx:307
STOFFPosition::Page
@ Page
Definition: STOFFPosition.hxx:51
STOFFGraphicListenerInternal::GraphicState::m_isDocumentStarted
bool m_isDocumentStarted
a flag to know if the document is open
Definition: STOFFGraphicListener.cxx:99
STOFFGraphicListener::openTableCell
void openTableCell(STOFFCell const &cell) final
open a cell
Definition: STOFFGraphicListener.cxx:1480
STOFFGraphicListener::openTable
void openTable(STOFFTable const &table) final
open a table (using the last parameters of openFrame for the position )
Definition: STOFFGraphicListener.cxx:1335
STOFFGraphicListener::_startSubDocument
void _startSubDocument()
Definition: STOFFGraphicListener.cxx:1712
STOFFGraphicListener::_pushParsingState
std::shared_ptr< STOFFGraphicListenerInternal::State > _pushParsingState()
creates a new parsing state (copy of the actual state)
Definition: STOFFGraphicListener.cxx:1736
STOFFGraphicListener::openFooter
bool openFooter(librevenge::RVNGPropertyList const &extras) final
open a footer (interaction with STOFFPageSpan which fills the parameters for openFooter)
Definition: STOFFGraphicListener.cxx:1019
STOFFSection
a class which stores section properties
Definition: STOFFSection.hxx:45
STOFFTable.hxx
STOFFGraphicListener::insertUnicodeString
void insertUnicodeString(librevenge::RVNGString const &str) final
adds a unicode string
Definition: STOFFGraphicListener.cxx:328
STOFFGraphicListener::insertComment
void insertComment(STOFFSubDocumentPtr &subDocument, librevenge::RVNGString const &creator="", librevenge::RVNGString const &date="") final
adds comment
Definition: STOFFGraphicListener.cxx:1115
STOFFGraphicListener::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: STOFFGraphicListener.cxx:1399
STOFFListManagerPtr
std::shared_ptr< STOFFListManager > STOFFListManagerPtr
a smart pointer of STOFFListManager
Definition: libstaroffice_internal.hxx:493
STOFFListener::PageBreak
@ PageBreak
Definition: STOFFListener.hxx:59
STOFFPosition::CharBaseLine
@ CharBaseLine
Definition: STOFFPosition.hxx:51
STOFFGraphicListenerInternal::GraphicState::m_isAtLeastOnePageOpened
bool m_isAtLeastOnePageOpened
true if the first page has been open
Definition: STOFFGraphicListener.cxx:105
STOFFGraphicListener::addEmptyTableCell
void addEmptyTableCell(STOFFVec2i const &pos, STOFFVec2i span=STOFFVec2i(1, 1)) final
add empty cell
Definition: STOFFGraphicListener.cxx:1455
STOFFGraphicListener::startDocument
void startDocument() final
starts a new document
Definition: STOFFGraphicListener.cxx:476
STOFFPosition::m_anchorTo
AnchorTo m_anchorTo
anchor position
Definition: STOFFPosition.hxx:145
STOFFPageSpan::getPageProperty
void getPageProperty(librevenge::RVNGPropertyList &pList) const
add the page properties in pList
Definition: STOFFPageSpan.cxx:120
STOFFPosition.hxx
STOFFLink::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if needed )
Definition: libstaroffice_internal.cxx:247
STOFFGraphicListener::_closePageSpan
void _closePageSpan(bool masterPage=false)
does close a page (low level)
Definition: STOFFGraphicListener.cxx:629
STOFFGraphicListener::handleSubDocument
void handleSubDocument(STOFFSubDocumentPtr subDocument, libstoff::SubDocumentType subDocumentType) final
function called to add a subdocument and modify the origin
Definition: STOFFGraphicListener.cxx:1650
STOFFGraphicListener::insertField
void insertField(STOFFField const &field) final
adds a field type
Definition: STOFFGraphicListener.cxx:418
STOFFGraphicListener::_resetParagraphState
void _resetParagraphState(const bool isListElement=false)
Definition: STOFFGraphicListener.cxx:724
STOFFField::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition: libstaroffice_internal.cxx:234
STOFFFrameStyle::addTo
void addTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition: STOFFFrameStyle.cxx:79
STOFFGraphicListener::_changeList
void _changeList()
update the list so that it corresponds to the actual level
Definition: STOFFGraphicListener.cxx:794
STOFFGraphicListenerInternal::State::m_paragraph
STOFFParagraph m_paragraph
the paragraph
Definition: STOFFGraphicListener.cxx:145
STOFFGraphicListenerInternal::State::m_isTextBoxOpened
bool m_isTextBoxOpened
a flag to know if we are in a textbox
Definition: STOFFGraphicListener.cxx:157
STOFFListener::Graphic
@ Graphic
Definition: STOFFListener.hxx:57
STOFFListener
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
STOFFListener::ColumnBreak
@ ColumnBreak
Definition: STOFFListener.hxx:59
STOFFGraphicListener::insertNote
void insertNote(STOFFNote const &note, STOFFSubDocumentPtr &subDocument) final
insert a note
Definition: STOFFGraphicListener.cxx:1133
librevenge
Definition: STOFFDocument.hxx:42
STOFFParagraph::m_propertyList
librevenge::RVNGPropertyList m_propertyList
the properties
Definition: STOFFParagraph.hxx:73
STOFFGraphicListenerInternal::State::operator=
State & operator=(const State &)
STOFFGraphicListenerInternal::State::m_textBuffer
librevenge::RVNGString m_textBuffer
a buffer to stored the text
Definition: STOFFGraphicListener.cxx:140
STOFFGraphicListenerInternal::State::m_list
std::shared_ptr< STOFFList > m_list
the list of list
Definition: STOFFGraphicListener.cxx:147
STOFFGraphicListener::insertTextBox
void insertTextBox(STOFFFrameStyle const &frame, STOFFSubDocumentPtr subDocument, STOFFGraphicStyle const &style=STOFFGraphicStyle()) final
adds a textbox in given position
Definition: STOFFGraphicListener.cxx:1302
STOFFGraphicListenerInternal::State::m_frameStyle
STOFFGraphicStyle m_frameStyle
the frame style
Definition: STOFFGraphicListener.cxx:154
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
STOFFGraphicListenerInternal::GraphicState::m_metaData
librevenge::RVNGPropertyList m_metaData
the document meta data
Definition: STOFFGraphicListener.cxx:97
STOFFLink
a link
Definition: libstaroffice_internal.hxx:375
STOFFGraphicListener::getType
Type getType() const final
returns the listener type
Definition: STOFFGraphicListener.hxx:70
STOFFPosition::setOrigin
void setOrigin(STOFFVec2f const &origin)
utility function to set a origin in point
Definition: STOFFPosition.hxx:101
STOFFGraphicShape::addTo
void addTo(librevenge::RVNGPropertyList &list) const
add shape to property list
Definition: STOFFGraphicShape.cxx:60
STOFFGraphicListener::_openListElement
void _openListElement()
open a list level
Definition: STOFFGraphicListener.cxx:733
libstoff::DOC_NOTE
@ DOC_NOTE
Definition: libstaroffice_internal.hxx:185
STOFFGraphicListenerInternal::GraphicState::m_subDocuments
std::vector< STOFFSubDocumentPtr > m_subDocuments
the list of actual subdocument
Definition: STOFFGraphicListener.cxx:114
STOFFGraphicListener::isParagraphStyleDefined
bool isParagraphStyleDefined(librevenge::RVNGString const &name) const final
check if a paragraph style with a display name is already defined
Definition: STOFFGraphicListener.cxx:287
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
STOFFGraphicListener::getPageSpan
const STOFFPageSpan & getPageSpan() final
returns the current page span
Definition: STOFFGraphicListener.cxx:547
STOFFGraphicListenerInternal::GraphicState::m_pageSpan
STOFFPageSpan m_pageSpan
! the current page span
Definition: STOFFGraphicListener.cxx:110
STOFFGraphicListener::insertEOL
void insertEOL(bool softBreak=false) final
adds an end of line ( by default an hard one)
Definition: STOFFGraphicListener.cxx:338
STOFFCell.hxx
STOFFGraphicListener::m_presentationInterface
librevenge::RVNGPresentationInterface * m_presentationInterface
the presentation interface
Definition: STOFFGraphicListener.hxx:309
STOFFFont::checkForDefault
static void checkForDefault(librevenge::RVNGPropertyList &propList)
check if the font name defined.
Definition: STOFFFont.cxx:106