VSDParagraphList.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 libvisio 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 __VSDPARAGRAPHLIST_H__
11#define __VSDPARAGRAPHLIST_H__
12
13#include <vector>
14#include <map>
15#include "VSDStyles.h"
16
17namespace libvisio
18{
19
20class VSDParagraphListElement;
21class VSDCollector;
22
24{
25public:
27 VSDParagraphList(const VSDParagraphList &paraList);
30 void addParaIX(unsigned id, unsigned level, unsigned charCount, const boost::optional<double> &indFirst,
31 const boost::optional<double> &indLeft, const boost::optional<double> &indRight, const boost::optional<double> &spLine,
32 const boost::optional<double> &spBefore, const boost::optional<double> &spAfter, const boost::optional<unsigned char> &align,
33 const boost::optional<unsigned char> &bullet, const boost::optional<VSDName> &bulletStr,
34 const boost::optional<VSDName> &bulletFont, const boost::optional<double> &bulletFontSize,
35 const boost::optional<double> &textPosAfterBullet, const boost::optional<unsigned> &flags);
36 void addParaIX(unsigned id, unsigned level, const VSDOptionalParaStyle &style);
37 unsigned getCharCount(unsigned id) const;
38 void setCharCount(unsigned id, unsigned charCount);
39 void resetCharCount();
40 unsigned getLevel() const;
41
42 void setElementsOrder(const std::vector<unsigned> &m_elementsOrder);
43 void handle(VSDCollector *collector) const;
44 void clear();
45 bool empty() const
46 {
47 return (m_elements.empty());
48 }
49private:
50 std::map<unsigned, VSDParagraphListElement *> m_elements;
51 std::vector<unsigned> m_elementsOrder;
52};
53
54} // namespace libvisio
55
56#endif // __VSDPARAGRAPHLIST_H__
57/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: VSDCollector.h:21
Definition: VSDParagraphList.h:24
std::vector< unsigned > m_elementsOrder
Definition: VSDParagraphList.h:51
unsigned getCharCount(unsigned id) const
Definition: VSDParagraphList.cpp:143
std::map< unsigned, VSDParagraphListElement * > m_elements
Definition: VSDParagraphList.h:50
void resetCharCount()
Definition: VSDParagraphList.cpp:159
VSDParagraphList & operator=(const VSDParagraphList &paraList)
Definition: VSDParagraphList.cpp:91
VSDParagraphList()
Definition: VSDParagraphList.cpp:76
void setElementsOrder(const std::vector< unsigned > &m_elementsOrder)
Definition: VSDParagraphList.cpp:172
void addParaIX(unsigned id, unsigned level, unsigned charCount, const boost::optional< double > &indFirst, const boost::optional< double > &indLeft, const boost::optional< double > &indRight, const boost::optional< double > &spLine, const boost::optional< double > &spBefore, const boost::optional< double > &spAfter, const boost::optional< unsigned char > &align, const boost::optional< unsigned char > &bullet, const boost::optional< VSDName > &bulletStr, const boost::optional< VSDName > &bulletFont, const boost::optional< double > &bulletFontSize, const boost::optional< double > &textPosAfterBullet, const boost::optional< unsigned > &flags)
Definition: VSDParagraphList.cpp:106
~VSDParagraphList()
Definition: VSDParagraphList.cpp:101
void setCharCount(unsigned id, unsigned charCount)
Definition: VSDParagraphList.cpp:152
void handle(VSDCollector *collector) const
Definition: VSDParagraphList.cpp:179
bool empty() const
Definition: VSDParagraphList.h:45
unsigned getLevel() const
Definition: VSDParagraphList.cpp:165
void clear()
Definition: VSDParagraphList.cpp:201
Definition: VisioDocument.h:30
Definition: VSDStyles.h:349

Generated for libvisio by doxygen 1.9.2