| 1 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the libabw 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 ABWOUTPUTELEMENTS_H |
| 11 |
#define ABWOUTPUTELEMENTS_H |
| 12 |
|
| 13 |
#include <list> |
| 14 |
#include <map> |
| 15 |
#include <memory> |
| 16 |
|
| 17 |
#include <librevenge/librevenge.h> |
| 18 |
|
| 19 |
namespace libabw |
| 20 |
{ |
| 21 |
|
| 22 |
class ABWOutputElement; |
| 23 |
|
| 24 |
class ABWOutputElements |
| 25 |
{ |
| 26 |
public: |
| 27 |
typedef std::list<std::unique_ptr<ABWOutputElement>> OutputElements_t; |
| 28 |
typedef std::map<int, OutputElements_t> OutputElementsMap_t; |
| 29 |
|
| 30 |
ABWOutputElements(); |
| 31 |
virtual ~ABWOutputElements(); |
| 32 |
void splice(ABWOutputElements &elements); |
| 33 |
void write(librevenge::RVNGTextInterface *iface) const; |
| 34 |
void addCloseEndnote(); |
| 35 |
void addCloseFooter(); |
| 36 |
void addCloseFootnote(); |
| 37 |
void addCloseFrame(); |
| 38 |
void addCloseHeader(); |
| 39 |
void addCloseLink(); |
| 40 |
void addCloseListElement(); |
| 41 |
void addCloseOrderedListLevel(); |
| 42 |
void addClosePageSpan(); |
| 43 |
void addCloseParagraph(); |
| 44 |
void addCloseSection(); |
| 45 |
void addCloseSpan(); |
| 46 |
void addCloseTable(); |
| 47 |
void addCloseTableCell(); |
| 48 |
void addCloseTableRow(); |
| 49 |
void addCloseTextBox(); |
| 50 |
void addCloseUnorderedListLevel(); |
| 51 |
void addInsertBinaryObject(const librevenge::RVNGPropertyList &propList); |
| 52 |
void addInsertCoveredTableCell(const librevenge::RVNGPropertyList &propList); |
| 53 |
void addInsertField(const librevenge::RVNGPropertyList &propList); |
| 54 |
void addInsertLineBreak(); |
| 55 |
void addInsertSpace(); |
| 56 |
void addInsertTab(); |
| 57 |
void addInsertText(const librevenge::RVNGString &text); |
| 58 |
void addOpenEndnote(const librevenge::RVNGPropertyList &propList); |
| 59 |
void addOpenFooter(const librevenge::RVNGPropertyList &propList, int id); |
| 60 |
void addOpenFootnote(const librevenge::RVNGPropertyList &propList); |
| 61 |
void addOpenFrame(const librevenge::RVNGPropertyList &propList); |
| 62 |
void addOpenHeader(const librevenge::RVNGPropertyList &propList, int id); |
| 63 |
void addOpenLink(const librevenge::RVNGPropertyList &propList); |
| 64 |
void addOpenListElement(const librevenge::RVNGPropertyList &propList); |
| 65 |
void addOpenOrderedListLevel(const librevenge::RVNGPropertyList &propList); |
| 66 |
void addOpenPageSpan(const librevenge::RVNGPropertyList &propList, |
| 67 |
int footer, int footerLeft, int footerFirst, int footerLast, |
| 68 |
int header, int headerLeft, int headerFirst, int headerLast); |
| 69 |
void addOpenParagraph(const librevenge::RVNGPropertyList &propList); |
| 70 |
void addOpenSection(const librevenge::RVNGPropertyList &propList); |
| 71 |
void addOpenSpan(const librevenge::RVNGPropertyList &propList); |
| 72 |
void addOpenTable(const librevenge::RVNGPropertyList &propList); |
| 73 |
void addOpenTableCell(const librevenge::RVNGPropertyList &propList); |
| 74 |
void addOpenTableRow(const librevenge::RVNGPropertyList &propList); |
| 75 |
void addOpenTextBox(const librevenge::RVNGPropertyList &propList); |
| 76 |
void addOpenUnorderedListLevel(const librevenge::RVNGPropertyList &propList); |
| 77 |
void addStartDocument(const librevenge::RVNGPropertyList &propList); |
| 78 |
bool empty() const |
| 79 |
{ |
| 80 |
return m_bodyElements.empty(); |
| 81 |
} |
| 82 |
private: |
| 83 |
ABWOutputElements(const ABWOutputElements &); |
| 84 |
ABWOutputElements &operator=(const ABWOutputElements &); |
| 85 |
OutputElements_t m_bodyElements; |
| 86 |
std::map<int, OutputElements_t > m_headerElements; |
| 87 |
std::map<int, OutputElements_t > m_footerElements; |
| 88 |
OutputElements_t *m_elements; |
| 89 |
}; |
| 90 |
|
| 91 |
|
| 92 |
} // namespace libabw |
| 93 |
|
| 94 |
#endif /* ABWOUTPUTELEMENTS_H */ |
| 95 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |