1 /* TableStyle: Stores (and writes) table-based information that is
2 * needed at the head of an OO document.
4 * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
5 * Copyright (C) 2004 Fridrich Strba (fridrich.strba@bluewin.ch)
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * For further information visit http://libwpd.sourceforge.net
25 /* "This product is not manufactured, approved, or supported by
26 * Corel Corporation or Corel Corporation Limited."
31 #pragma warning( push, 1 )
33 #include <libwpd/libwpd.h>
35 #pragma warning( pop )
40 #include "WriterProperties.hxx"
42 class DocumentElement
;
43 class DocumentHandler
;
45 class TableCellStyle
: public Style
48 TableCellStyle(const WPXPropertyList
&xPropList
, const char *psName
);
49 virtual void write(DocumentHandler
*pHandler
) const;
51 WPXPropertyList mPropList
;
54 class TableRowStyle
: public Style
57 TableRowStyle(const WPXPropertyList
&propList
, const char *psName
);
58 virtual void write(DocumentHandler
*pHandler
) const;
60 WPXPropertyList mPropList
;
63 class TableStyle
: public Style
, public TopLevelElementStyle
66 TableStyle(const WPXPropertyList
&xPropList
, const WPXPropertyListVector
&columns
, const char *psName
);
68 virtual void write(DocumentHandler
*pHandler
) const;
69 int getNumColumns() const { return mColumns
.count(); }
70 void addTableCellStyle(TableCellStyle
*pTableCellStyle
) { mTableCellStyles
.push_back(pTableCellStyle
); }
71 int getNumTableCellStyles() { return mTableCellStyles
.size(); }
72 void addTableRowStyle(TableRowStyle
*pTableRowStyle
) { mTableRowStyles
.push_back(pTableRowStyle
); }
73 int getNumTableRowStyles() { return mTableRowStyles
.size(); }
75 WPXPropertyList mPropList
;
76 WPXPropertyListVector mColumns
;
77 std::vector
<TableCellStyle
*> mTableCellStyles
;
78 std::vector
<TableRowStyle
*> mTableRowStyles
;