RVNGHTMLTextTableStyle.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 {
36 class RVNGHTMLTextTableStyleManager
37 {
38 public:
40 RVNGHTMLTextTableStyleManager() : m_cellContentNameMap(), m_rowContentNameMap(), m_columWitdhsStack()
41 {
42 }
44 ~RVNGHTMLTextTableStyleManager()
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
71 RVNGHTMLTextTableStyleManager(RVNGHTMLTextTableStyleManager const &orig);
72 RVNGHTMLTextTableStyleManager operator=(RVNGHTMLTextTableStyleManager const &orig);
73 };
74 }
75 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
librevenge::RVNGHTMLTextTableStyleManager::getCellContent
std::string getCellContent(RVNGPropertyList const &pList) const
convert a property list in a html content string
Definition: RVNGHTMLTextTableStyle.cpp:137
librevenge::RVNGHTMLTextTableStyleManager::RVNGHTMLTextTableStyleManager
RVNGHTMLTextTableStyleManager()
constructor
Definition: RVNGHTMLTextTableStyle.h:40
librevenge::RVNGHTMLTextTableStyleManager::m_cellContentNameMap
std::map< std::string, std::string > m_cellContentNameMap
a map cell content -> name
Definition: RVNGHTMLTextTableStyle.h:65
librevenge
Definition: RVNGBinaryData.cpp:38
librevenge::RVNGHTMLTextTableStyleManager
Small class to manage the tables style.
Definition: RVNGHTMLTextTableStyle.h:36
librevenge::RVNGHTMLTextTableStyleManager::getColumnsWidth
bool getColumnsWidth(int i, int numSpanned, double &w) const
try to return the col width
Definition: RVNGHTMLTextTableStyle.cpp:66
librevenge::RVNGHTMLTextTableStyleManager::getCellClass
std::string getCellClass(RVNGPropertyList const &pList)
returns the class name corresponding to a propertylist
Definition: RVNGHTMLTextTableStyle.cpp:97
librevenge::RVNGHTMLTextTableStyleManager::openTable
void openTable(RVNGPropertyListVector const &colList)
open a table
Definition: RVNGHTMLTextTableStyle.cpp:34
librevenge::RVNGHTMLTextTableStyleManager::~RVNGHTMLTextTableStyleManager
~RVNGHTMLTextTableStyleManager()
destructor
Definition: RVNGHTMLTextTableStyle.h:44
librevenge::RVNGHTMLTextTableStyleManager::getRowContent
std::string getRowContent(RVNGPropertyList const &pList) const
convert a property list in a html content string
Definition: RVNGHTMLTextTableStyle.cpp:186
librevenge::RVNGHTMLTextTableStyleManager::operator=
RVNGHTMLTextTableStyleManager operator=(RVNGHTMLTextTableStyleManager const &orig)
librevenge.h
librevenge::RVNGPropertyListVector
Definition: RVNGPropertyListVector.h:34
librevenge::RVNGHTMLTextTableStyleManager::getRowClass
std::string getRowClass(RVNGPropertyList const &pList)
returns the class name corresponding to a propertylist
Definition: RVNGHTMLTextTableStyle.cpp:109
librevenge::RVNGHTMLTextTableStyleManager::closeTable
void closeTable()
close a table
Definition: RVNGHTMLTextTableStyle.cpp:56
librevenge::RVNGHTMLTextTableStyleManager::m_columWitdhsStack
std::vector< std::vector< double > > m_columWitdhsStack
a stack of column width (in inches )
Definition: RVNGHTMLTextTableStyle.h:69
librevenge::RVNGPropertyList
Definition: RVNGPropertyList.h:38
librevenge::RVNGHTMLTextTableStyleManager::m_rowContentNameMap
std::map< std::string, std::string > m_rowContentNameMap
a map row content -> name
Definition: RVNGHTMLTextTableStyle.h:67
librevenge::RVNGHTMLTextTableStyleManager::send
void send(std::ostream &out)
send the data to the stream
Definition: RVNGHTMLTextTableStyle.cpp:121