IWORKPElement.h Source File documentation

IWORKPElement.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 IWORKPELEMENT_H_INCLUDED
11 #define IWORKPELEMENT_H_INCLUDED
12
13 #include <boost/optional.hpp>
14
15 #include "IWORKTypes.h"
16 #include "IWORKXMLContextBase.h"
17
18 namespace libetonyek
19 {
20
21 class IWORKPElement : public IWORKXMLMixedContextBase
22 {
23 public:
24 explicit IWORKPElement(IWORKXMLParserState &state);
25
26 protected:
27 void attribute(int name, const char *value) override;
28 IWORKXMLContextPtr_t element(int name) override;
29 void endOfElement() override;
30 void text(const char *value) override;
31
32 void ensureOpened();
33
34 private:
35 IWORKStylePtr_t m_style;
36 bool m_opened;
37 bool m_delayedPageBreak;
38 boost::optional<unsigned> m_listLevel;
39 boost::optional<bool> m_restartList;
40 };
41
42 }
43
44 #endif // IWORKPELEMENT_H_INCLUDED
45
46 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKXMLEmptyContextBase
IWORKXMLContextBase< IWORKXMLContextEmpty, IWORKXMLParserState > IWORKXMLEmptyContextBase
Definition: IWORKXMLContextBase.h:128
libetonyek::IWORKToken::link
@ link
Definition: IWORKToken.h:303
IWORKDictionary.h
m_style
IWORKStylePtr_t m_style
Definition: IWORKPropertyMapElement.cpp:172
libetonyek
Definition: IWORKBezierElement.cpp:20
m_opened
bool m_opened
Definition: PAG1TextStorageElement.cpp:666
libetonyek::IWORKToken::filename
@ filename
Definition: IWORKToken.h:199
libetonyek::IWORKPElement::m_listLevel
boost::optional< unsigned > m_listLevel
Definition: IWORKPElement.h:38
libetonyek::IWORKToken::ID
@ ID
Definition: IWORKToken.h:499
libetonyek::IWORKToken::lnbr
@ lnbr
Definition: IWORKToken.h:315
IWORKProperties.h
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::IWORKToken::NS_URI_SFA
@ NS_URI_SFA
Definition: IWORKToken.h:689
libetonyek::IWORKPElement::m_style
IWORKStylePtr_t m_style
Definition: IWORKPElement.h:35
libetonyek::IWORKPElement::element
IWORKXMLContextPtr_t element(int name) override
Definition: IWORKPElement.cpp:137
ETONYEK_DEBUG_MSG
#define ETONYEK_DEBUG_MSG(M)
Definition: libetonyek_utils.h:54
libetonyek::IWORKPElement::IWORKPElement
IWORKPElement(IWORKXMLParserState &state)
Definition: IWORKPElement.cpp:108
IWORKTabElement.h
libetonyek::IWORKPElement::attribute
void attribute(int name, const char *value) override
Definition: IWORKPElement.cpp:118
libetonyek::try_int_cast
boost::optional< int > try_int_cast(const char *value)
Definition: libetonyek_xml.cpp:99
libetonyek::IWORKToken::localize
@ localize
Definition: IWORKToken.h:316
libetonyek::IWORK_FIELD_PAGENUMBER
@ IWORK_FIELD_PAGENUMBER
Definition: IWORKEnum.h:147
libetonyek::try_bool_cast
boost::optional< bool > try_bool_cast(const char *value)
Definition: libetonyek_xml.cpp:61
libetonyek::IWORKToken::date_time
@ date_time
Definition: IWORKToken.h:180
libetonyek::IWORKXMLParserState
Definition: IWORKXMLParserState.h:31
libetonyek::IWAObjectType::ListStyle
@ ListStyle
Definition: IWAObjectType.h:31
libetonyek::IWORK_FIELD_FILENAME
@ IWORK_FIELD_FILENAME
Definition: IWORKEnum.h:145
libetonyek::IWORKToken::page_number
@ page_number
Definition: IWORKToken.h:348
libetonyek::IWORKPElement::endOfElement
void endOfElement() override
Definition: IWORKPElement.cpp:187
libetonyek::IWORKToken::restart_list
@ restart_list
Definition: IWORKToken.h:596
libetonyek::IWORKPElement
Definition: IWORKPElement.h:21
libetonyek::IWORKPElement::m_delayedPageBreak
bool m_delayedPageBreak
Definition: IWORKPElement.h:37
libetonyek::IWORKToken::intratopicbr
@ intratopicbr
Definition: IWORKToken.h:271
libetonyek::IWORKToken::element
@ element
Definition: IWORKToken.h:188
libetonyek::IWORKToken::br
@ br
Definition: IWORKToken.h:119
libetonyek::IWORKPElement::ensureOpened
void ensureOpened()
Definition: IWORKPElement.cpp:198
IWORKText.h
libetonyek::IWORKToken::style
@ style
Definition: IWORKToken.h:414
IWORKTypes.h
libetonyek::IWORKXMLContextBase
Definition: IWORKXMLContextBase.h:27
libetonyek::IWORKToken::pgbr
@ pgbr
Definition: IWORKToken.h:361
IWORKXMLParserState.h
libetonyek::IWORKToken::IDREF
@ IDREF
Definition: IWORKToken.h:500
libetonyek::IWORKPElement::m_opened
bool m_opened
Definition: IWORKPElement.h:36
libetonyek::IWORKToken::ghost_text
@ ghost_text
Definition: IWORKToken.h:234
libetonyek::IWORKToken::span
@ span
Definition: IWORKToken.h:402
libetonyek::IWORKPElement::m_restartList
boost::optional< bool > m_restartList
Definition: IWORKPElement.h:39
libetonyek::IWORKToken::NS_URI_SF
@ NS_URI_SF
Definition: IWORKToken.h:688
IWORKBrContext.h
libetonyek::IWORKStylePtr_t
std::shared_ptr< IWORKStyle > IWORKStylePtr_t
Definition: IWORKStyle_fwd.h:21
IWORKXMLContextBase.h
IWORKToken.h
libetonyek::IWORKToken::ghost_text_ref
@ ghost_text_ref
Definition: IWORKToken.h:235
libetonyek::IWORKToken::crbr
@ crbr
Definition: IWORKToken.h:169
libetonyek::get
const ValueT & get(const detail::IWAFieldImpl< TagV, ValueT, Reader > &field)
Definition: IWAField.h:190
libetonyek::IWORK_FIELD_PAGECOUNT
@ IWORK_FIELD_PAGECOUNT
Definition: IWORKEnum.h:146
IWORKLinkElement.h
libetonyek::IWORK_FIELD_DATETIME
@ IWORK_FIELD_DATETIME
Definition: IWORKEnum.h:144
libetonyek::IWORKToken::page_count
@ page_count
Definition: IWORKToken.h:347
libetonyek::IWORKToken::name
@ name
Definition: IWORKToken.h:578
libetonyek::IWORKToken::value
@ value
Definition: IWORKToken.h:624
IWORKPElement.h
libetonyek::IWORKToken::list_level
@ list_level
Definition: IWORKToken.h:569
IWORKFieldElement.h
IWORKStyle.h
IWORKSpanElement.h
libetonyek_xml.h
libetonyek::IWORKToken::text
@ text
Definition: IWORKToken.h:465
libetonyek::IWORKPElement::text
void text(const char *value) override
Definition: IWORKPElement.cpp:180
libetonyek::IWORKToken::tab
@ tab
Definition: IWORKToken.h:421
libetonyek::IWORKXMLContextBase::getState
State & getState()
Definition: IWORKXMLContextBase.h:43