column.cpp
1/*
2** A program to convert the XML rendered by KSpread into LATEX.
3**
4** Copyright (C) 2002 Robert JACOLIN
5**
6** This library is free software; you can redistribute it and/or
7** modify it under the terms of the GNU Library General Public
8** License as published by the Free Software Foundation; either
9** version 2 of the License, or (at your option) any later version.
10**
11** This library is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14** Library General Public License for more details.
15**
16** To receive a copy of the GNU Library General Public License, write to the
17** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19**
20*/
21
22#include <kdebug.h> /* for kdDebug stream */
23
24#include "column.h"
25
26/*******************************************/
27/* Constructor */
28/*******************************************/
30{
31 setCol(0);
32}
33
34/*******************************************/
35/* Destructor */
36/*******************************************/
37Column::~Column()
38{
39}
40
41void Column::analyse(const TQDomNode balise)
42{
43 _col = getAttr(balise, "column").toLong();
44 _width = getAttr(balise, "width").toDouble();
45 Format::analyse(getChild(balise, "format"));
46}
47
48/*******************************************/
49/* generate */
50/*******************************************/
51void Column::generate(TQTextStream& out)
52{
53 //generateLeftBorder(out);
54 if(getBrushStyle() >= 1)
55 {
56 out << ">{\\columncolor";
57 generateColor(out);
58 out << "}";
59 }
60 //generateRightBorder(out);
61
62 out << "m{" << getWidth() << "pt}";
63
64}
65
66
void analyse(const TQDomNode)
Helpfull functions.
Definition column.cpp:41
void setCol(int c)
setters
Definition column.h:73
Column()
Constructors.
Definition column.cpp:29
This class describe a cell, row or column format.
void generateColor(TQTextStream &out)
Generate the color format for a column or a row.
virtual void analyse(const TQDomNode)
Helpfull functions.