EPUBParagraphStyleManager.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 libepubgen 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 INCLUDED_EPUBPARAGRAPHSTYLEMANAGER_H
11 #define INCLUDED_EPUBPARAGRAPHSTYLEMANAGER_H
12 
13 #include <string>
14 #include <map>
15 
16 #include <boost/unordered_map.hpp>
17 
18 #include <librevenge/librevenge.h>
19 
20 #include "EPUBCSSProperties.h"
21 
22 namespace libepubgen
23 {
24 
25 class EPUBCSSSink;
26 
29 {
30  typedef boost::unordered_map<EPUBCSSProperties, std::string> ContentNameMap_t;
31 
32 public:
35  {
36  }
39  {
40  }
42  void defineParagraph(librevenge::RVNGPropertyList const &pList);
44  std::string getClass(librevenge::RVNGPropertyList const &pList);
46  void send(EPUBCSSSink &out);
47 protected:
49  void extractProperties(librevenge::RVNGPropertyList const &pList, bool isList, EPUBCSSProperties &cssProps) const;
51  ContentNameMap_t m_contentNameMap;
53  std::map<int, std::string> m_idNameMap;
55  void extractBorders(librevenge::RVNGPropertyList const &pList, EPUBCSSProperties &cssProps) const;
56 private:
59 };
60 
61 }
62 
63 #endif
64 
65 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
void defineParagraph(librevenge::RVNGPropertyList const &pList)
define a paragraph style
Definition: EPUBParagraphStyleManager.cpp:44
Definition: EPUBCSSSink.h:23
Definition: EPUBBinarySink.cpp:12
boost::unordered_map< EPUBCSSProperties, std::string > ContentNameMap_t
Definition: EPUBParagraphStyleManager.h:30
Small class to manage the paragraph style.
Definition: EPUBParagraphStyleManager.h:28
ContentNameMap_t m_contentNameMap
a map content -> name
Definition: EPUBParagraphStyleManager.h:51
virtual ~EPUBParagraphStyleManager()
destructor
Definition: EPUBParagraphStyleManager.h:38
void extractBorders(librevenge::RVNGPropertyList const &pList, EPUBCSSProperties &cssProps) const
add data corresponding to the border
Definition: EPUBParagraphStyleManager.cpp:138
EPUBParagraphStyleManager operator=(EPUBParagraphStyleManager const &orig)
std::map< std::string, std::string > EPUBCSSProperties
Definition: EPUBCSSProperties.h:21
std::map< int, std::string > m_idNameMap
a map id -> name
Definition: EPUBParagraphStyleManager.h:53
std::string getClass(librevenge::RVNGPropertyList const &pList)
returns the class name corresponding to a propertylist
Definition: EPUBParagraphStyleManager.cpp:25
void extractProperties(librevenge::RVNGPropertyList const &pList, bool isList, EPUBCSSProperties &cssProps) const
convert a property list into a CSS property map
Definition: EPUBParagraphStyleManager.cpp:67
EPUBParagraphStyleManager()
constructor
Definition: EPUBParagraphStyleManager.h:34
void send(EPUBCSSSink &out)
send the data to the sink
Definition: EPUBParagraphStyleManager.cpp:57

Generated for libepubgen by doxygen 1.8.11