KEY6Parser.h Source File documentation

KEY6Parser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libetonyek project.
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
10 #ifndef KEY6PARSER_H_INCLUDED
11 #define KEY6PARSER_H_INCLUDED
12
13 #include "IWAParser.h"
14
15 #include "KEYTypes_fwd.h"
16
17 namespace libetonyek
18 {
19
20 class KEYCollector;
21
22 class KEY6Parser : public IWAParser
23 {
24 public:
25 KEY6Parser(const RVNGInputStreamPtr_t &fragments, const RVNGInputStreamPtr_t &package, KEYCollector &collector);
26
27 private:
28 bool parseDocument() override;
29
30 bool dispatchShape(unsigned id);
31
32 bool parsePresentation(unsigned id);
33 bool parseSlideList(unsigned id);
34 KEYSlidePtr_t parseSlide(unsigned id, bool master);
35 bool parsePlaceholder(unsigned id);
36 void parseNotes(unsigned id);
37
38 bool parseStickyNote(const IWAMessage &msg);
39
40 const IWORKStylePtr_t querySlideStyle(unsigned id) const;
41
42 void parseSlideStyle(unsigned id, IWORKStylePtr_t &style);
43
44 private:
45 KEYCollector &m_collector;
46
47 mutable std::unordered_map<unsigned, KEYSlidePtr_t> m_masterSlides;
48 mutable std::deque<KEYSlidePtr_t> m_slides;
49 mutable StyleMap_t m_slideStyles;
50 };
51
52 }
53
54 #endif
55
56 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWAParser::readRef
static boost::optional< unsigned > readRef(const IWAMessage &msg, unsigned field)
Definition: IWAParser.cpp:229
libetonyek::IWAParser::parseText
bool parseText(unsigned id, const std::function< void(unsigned, IWORKStylePtr_t)> &openPageSpan=nullptr)
Definition: IWAParser.cpp:483
libetonyek::KEY6Parser::m_slideStyles
StyleMap_t m_slideStyles
Definition: KEY6Parser.h:49
libetonyek::IWAParser::parseComment
void parseComment(unsigned id)
Definition: IWAParser.cpp:2092
libetonyek
Definition: IWORKBezierElement.cpp:20
libetonyek::IWORKToken::none
@ none
Definition: IWORKToken.h:666
libetonyek::KEY6Parser::parseDocument
bool parseDocument() override
Definition: KEY6Parser.cpp:45
libetonyek::IWORKCollector::startLevel
void startLevel()
Definition: IWORKCollector.cpp:635
libetonyek::IWAParser::parseShapePlacement
bool parseShapePlacement(const IWAMessage &msg, IWORKGeometryPtr_t &geometry)
Definition: IWAParser.cpp:1300
libetonyek::IWORKToken::shape
@ shape
Definition: IWORKToken.h:394
libetonyek::KEY6Parser::parseSlideStyle
void parseSlideStyle(unsigned id, IWORKStylePtr_t &style)
Definition: KEY6Parser.cpp:288
libetonyek::KEYCollector::endLayer
void endLayer()
Definition: KEYCollector.cpp:339
IWORKProperties.h
libetonyek::KEYPlaceholderPtr_t
std::shared_ptr< KEYPlaceholder > KEYPlaceholderPtr_t
Definition: KEYTypes_fwd.h:26
libetonyek::IWORKToken::type
@ type
Definition: IWORKToken.h:486
libetonyek::IWAParser
Definition: IWAParser.h:48
libetonyek::KEY6ObjectType::Presentation
@ Presentation
Definition: KEY6ObjectType.h:22
IWAObjectType.h
libetonyek::KEYSlidePtr_t
std::shared_ptr< KEYSlide > KEYSlidePtr_t
Definition: KEYTypes_fwd.h:31
IWAParser.h
KEY6ObjectType.h
libetonyek::KEY6Parser
Definition: KEY6Parser.h:22
libetonyek::KEYCollector::collectStickyNote
void collectStickyNote()
Definition: KEYCollector.cpp:193
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
KEYCollector.h
libetonyek::detail::IWAFieldImpl::optional
const boost::optional< value_type > optional() const
Definition: IWAField.h:159
libetonyek::KEYCollector::startLayer
void startLayer()
Definition: KEYCollector.cpp:328
libetonyek::KEY6Parser::parsePlaceholder
bool parsePlaceholder(unsigned id)
Definition: KEY6Parser.cpp:162
libetonyek::IWORKCollector::endLevel
void endLevel()
Definition: IWORKCollector.cpp:656
libetonyek::KEY6ObjectType::SlideStyle
@ SlideStyle
Definition: KEY6ObjectType.h:26
libetonyek::IWAParser::readFill
bool readFill(const IWAMessage &msg, IWORKFill &fill)
Definition: IWAParser.cpp:338
libetonyek::IWAParser::readRefs
static std::deque< unsigned > readRefs(const IWAMessage &msg, unsigned field)
Definition: IWAParser.cpp:236
libetonyek::KEY6Parser::m_collector
KEYCollector & m_collector
Definition: KEY6Parser.h:45
libetonyek::KEYCollector::insertLayer
void insertLayer(const KEYLayerPtr_t &layer)
Definition: KEYCollector.cpp:75
libetonyek::KEYCollector::startPage
void startPage()
Definition: KEYCollector.cpp:301
libetonyek::IWORKPropertyMap::clear
void clear()
Clear property.
Definition: IWORKPropertyMap.h:145
libetonyek::IWAMessageField
Definition: IWAField.h:222
libetonyek::KEYCollector::endSlides
void endSlides()
Definition: KEYCollector.cpp:288
libetonyek::IWORKToken::size
@ size
Definition: IWORKToken.h:395
libetonyek::KEY6Parser::parsePresentation
bool parsePresentation(unsigned id)
Definition: KEY6Parser.cpp:57
libetonyek::IWORKToken::id
@ id
Definition: IWORKToken.h:259
libetonyek::KEY6ObjectType::SlideList
@ SlideList
Definition: KEY6ObjectType.h:23
libetonyek::KEYCollector::sendSlides
void sendSlides(const std::deque< KEYSlidePtr_t > &slides)
Definition: KEYCollector.cpp:233
libetonyek::KEY6ObjectType::Slide
@ Slide
Definition: KEY6ObjectType.h:24
libetonyek::KEY1Token::slide
@ slide
Definition: KEY1Token.h:92
libetonyek::KEYCollector::startSlides
void startSlides()
Definition: KEYCollector.cpp:283
libetonyek::KEY6Parser::querySlideStyle
const IWORKStylePtr_t querySlideStyle(unsigned id) const
Definition: KEY6Parser.cpp:283
libetonyek::IWORKCollector::createText
virtual std::shared_ptr< IWORKText > createText(const IWORKLanguageManager &langManager, bool discardEmptyContent=false, bool allowListInsertion=true) const
Definition: IWORKCollector.cpp:630
libetonyek::IWAMessage::message
const IWAMessageField & message(std::size_t field) const
Definition: IWAMessage.cpp:167
libetonyek::KEY6Parser::m_slides
std::deque< KEYSlidePtr_t > m_slides
Definition: KEY6Parser.h:48
libetonyek::KEYCollector::collectSlide
KEYSlidePtr_t collectSlide()
Definition: KEYCollector.cpp:101
libetonyek::KEY6Parser::parseSlideList
bool parseSlideList(unsigned id)
Definition: KEY6Parser.cpp:90
libetonyek::KEY6ObjectType::Document
@ Document
Definition: KEY6ObjectType.h:21
libetonyek::IWORKPropertyMap::put
void put(const typename IWORKPropertyInfo< Property >::ValueType &value)
Insert a new value for key key.
Definition: IWORKPropertyMap.h:134
libetonyek::KEYCollector::collectNote
void collectNote()
Definition: KEYCollector.cpp:184
libetonyek::KEY6ObjectType::Placeholder
@ Placeholder
Definition: KEY6ObjectType.h:25
libetonyek::IWORKToken::layer
@ layer
Definition: IWORKToken.h:286
libetonyek::IWORKToken::string
@ string
Definition: IWORKToken.h:411
IWORKText.h
libetonyek::KEYCollector::collectPresentationSize
void collectPresentationSize(const IWORKSize &size)
Definition: KEYCollector.cpp:54
libetonyek::IWAMessage
Definition: IWAMessage.h:21
libetonyek::KEYCollector::collectLayer
KEYLayerPtr_t collectLayer()
Definition: KEYCollector.cpp:59
libetonyek::KEY6Parser::m_masterSlides
std::unordered_map< unsigned, KEYSlidePtr_t > m_masterSlides
Definition: KEY6Parser.h:47
libetonyek::KEYCollector::insertTextPlaceholder
void insertTextPlaceholder(const KEYPlaceholderPtr_t &placeholder)
Definition: KEYCollector.cpp:166
libetonyek::IWORKToken::style
@ style
Definition: IWORKToken.h:414
libetonyek::KEY6Parser::parseSlide
KEYSlidePtr_t parseSlide(unsigned id, bool master)
Definition: KEY6Parser.cpp:103
libetonyek::IWAParser::m_langManager
IWORKLanguageManager m_langManager
Definition: IWAParser.h:120
libetonyek::IWORKSize
Definition: IWORKTypes.h:44
libetonyek::IWAObjectType::StickyNote
@ StickyNote
Definition: IWAObjectType.h:28
libetonyek::KEYLayerPtr_t
std::shared_ptr< KEYLayer > KEYLayerPtr_t
Definition: KEYTypes_fwd.h:21
KEY6Parser.h
libetonyek::KEY6Parser::dispatchShape
bool dispatchShape(unsigned id)
Definition: KEY6Parser.cpp:232
libetonyek::KEY6Parser::KEY6Parser
KEY6Parser(const RVNGInputStreamPtr_t &fragments, const RVNGInputStreamPtr_t &package, KEYCollector &collector)
Definition: KEY6Parser.cpp:36
libetonyek::KEYCollector::setSlideStyle
void setSlideStyle(const IWORKStylePtr_t &style)
Definition: KEYCollector.cpp:219
libetonyek::IWORKFill
boost::variant< IWORKColor, IWORKGradient, IWORKMediaContent > IWORKFill
Definition: IWORKTypes.h:309
libetonyek::IWORKToken::_1
@ _1
Definition: IWORKToken.h:641
libetonyek::IWAParser::ObjectMessage::getType
unsigned getType() const
Definition: IWAParser.cpp:214
libetonyek::IWORKPropertyMap
Represents a (hierarchical) property map.
Definition: IWORKPropertyMap.h:24
libetonyek::IWORKGeometryPtr_t
std::shared_ptr< IWORKGeometry > IWORKGeometryPtr_t
Definition: IWORKTypes_fwd.h:41
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
IWAMessage.h
KEYTypes_fwd.h
libetonyek::IWORKToken::fill
@ fill
Definition: IWORKToken.h:200
libetonyek::KEY6ObjectType::Notes
@ Notes
Definition: KEY6ObjectType.h:27
libetonyek::KEYCollector::endDocument
void endDocument()
Definition: KEYCollector.cpp:278
libetonyek::RVNGInputStreamPtr_t
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr_t
Definition: libetonyek_utils.h:82
libetonyek::KEY6Parser::parseStickyNote
bool parseStickyNote(const IWAMessage &msg)
Definition: KEY6Parser.cpp:248
libetonyek::IWAParser::ObjectMessage
Definition: IWAParser.h:62
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
libetonyek::KEYCollector
Definition: KEYCollector.h:24
libetonyek::IWAMessageField::string
const IWAStringField & string(std::size_t field) const
Definition: IWAField.cpp:65
libetonyek::IWORKToken::geometry
@ geometry
Definition: IWORKToken.h:232
libetonyek::KEYCollector::collectTextPlaceholder
KEYPlaceholderPtr_t collectTextPlaceholder(const IWORKStylePtr_t &style, bool title)
Definition: KEYCollector.cpp:145
libetonyek::IWAParser::StyleMap_t
std::map< unsigned, IWORKStylePtr_t > StyleMap_t
Definition: IWAParser.h:86
libetonyek::IWAParser::queryStyle
const IWORKStylePtr_t queryStyle(unsigned id, StyleMap_t &styleMap, StyleParseFun_t parse) const
Definition: IWAParser.cpp:779
libetonyek::IWAParser::dispatchShape
bool dispatchShape(unsigned id)
Definition: IWAParser.cpp:453
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKCollector::collectText
void collectText(const std::shared_ptr< IWORKText > &text)
Definition: IWORKCollector.cpp:549
libetonyek::KEYCollector::endPage
void endPage()
Definition: KEYCollector.cpp:315
libetonyek::KEY6Parser::parseNotes
void parseNotes(unsigned id)
Definition: KEY6Parser.cpp:214
libetonyek::KEYCollector::startDocument
void startDocument()
Definition: KEYCollector.cpp:228
libetonyek::IWAParser::m_currentText
std::shared_ptr< IWORKText > m_currentText
Definition: IWAParser.h:121
m_collector
IWORKCollector & m_collector
Definition: IWORKRecorder.cpp:340