RVNGHTMLTextTableStyle.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* librevenge
3  * Version: MPL 2.0 / LGPLv2.1+
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  * Major Contributor(s):
10  * Copyright (C) 2002-2004 William Lachance (wrlach@gmail.com)
11  * Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
12  * Copyright (C) 2004 Fridrich Strba (fridrich.strba@bluewin.ch)
13  * Copyright (C) 2005 Net Integration Technologies (http://www.net-itech.com)
14  *
15  * For minor contributions see the git repository.
16  *
17  * Alternatively, the contents of this file may be used under the terms
18  * of the GNU Lesser General Public License Version 2.1 or later
19  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
20  * applicable instead of those above.
21  */
22 
23 #ifndef RVNGHTMLTEXT_TABLESTYLE_H
24 #define RVNGHTMLTEXT_TABLESTYLE_H
25 
26 #include <librevenge/librevenge.h>
27 
28 #include <ostream>
29 #include <string>
30 #include <map>
31 #include <vector>
32 
33 namespace librevenge
34 {
37 {
38 public:
41  {
42  }
45  {
46  }
48  void openTable(RVNGPropertyListVector const &colList);
50  void closeTable();
52  std::string getCellClass(RVNGPropertyList const &pList);
54  std::string getRowClass(RVNGPropertyList const &pList);
56  void send(std::ostream &out);
57 private:
59  std::string getCellContent(RVNGPropertyList const &pList) const;
61  std::string getRowContent(RVNGPropertyList const &pList) const;
63  bool getColumnsWidth(int i, int numSpanned, double &w) const;
65  std::map<std::string, std::string> m_cellContentNameMap;
67  std::map<std::string, std::string> m_rowContentNameMap;
69  std::vector<std::vector<double> > m_columWitdhsStack;
70 
73 };
74 }
75 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
std::string getCellContent(RVNGPropertyList const &pList) const
convert a property list in a html content string
Definition: RVNGHTMLTextTableStyle.cpp:137
RVNGHTMLTextTableStyleManager()
constructor
Definition: RVNGHTMLTextTableStyle.h:40
std::map< std::string, std::string > m_cellContentNameMap
a map cell content -> name
Definition: RVNGHTMLTextTableStyle.h:65
Definition: RVNGBinaryData.cpp:38
Small class to manage the tables style.
Definition: RVNGHTMLTextTableStyle.h:36
bool getColumnsWidth(int i, int numSpanned, double &w) const
try to return the col width
Definition: RVNGHTMLTextTableStyle.cpp:66
std::string getCellClass(RVNGPropertyList const &pList)
returns the class name corresponding to a propertylist
Definition: RVNGHTMLTextTableStyle.cpp:97
void openTable(RVNGPropertyListVector const &colList)
open a table
Definition: RVNGHTMLTextTableStyle.cpp:34
~RVNGHTMLTextTableStyleManager()
destructor
Definition: RVNGHTMLTextTableStyle.h:44
std::string getRowContent(RVNGPropertyList const &pList) const
convert a property list in a html content string
Definition: RVNGHTMLTextTableStyle.cpp:186
RVNGHTMLTextTableStyleManager operator=(RVNGHTMLTextTableStyleManager const &orig)
Definition: RVNGPropertyListVector.h:34
std::string getRowClass(RVNGPropertyList const &pList)
returns the class name corresponding to a propertylist
Definition: RVNGHTMLTextTableStyle.cpp:109
void closeTable()
close a table
Definition: RVNGHTMLTextTableStyle.cpp:56
std::vector< std::vector< double > > m_columWitdhsStack
a stack of column width (in inches )
Definition: RVNGHTMLTextTableStyle.h:69
Definition: RVNGPropertyList.h:38
std::map< std::string, std::string > m_rowContentNameMap
a map row content -> name
Definition: RVNGHTMLTextTableStyle.h:67
void send(std::ostream &out)
send the data to the stream
Definition: RVNGHTMLTextTableStyle.cpp:121

Generated for librevenge by doxygen 1.8.10