2
/* BUGS : latex don't support alpha list with one command !!! the
3
* command generated doesn't exist :))))
7
** A program to convert the XML rendered by KWord into LATEX.
9
** Copyright (C) 2000 Robert JACOLIN
11
** This library is free software; you can redistribute it and/or
12
** modify it under the terms of the GNU Library General Public
13
** License as published by the Free Software Foundation; either
14
** version 2 of the License, or (at your option) any later version.
16
** This library is distributed in the hope that it will be useful,
17
** but WITHOUT ANY WARRANTY; without even the implied warranty of
18
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
** Library General Public License for more details.
21
** To receive a copy of the GNU Library General Public License, write to the
22
** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
** Boston, MA 02111-1307, USA.
27
#include <kdebug.h> /* for kdDebug() stream */
28
#include "listeformat.h"
32
/* PROTECTED METHODS */
39
FormatElt::~FormatElt()
41
kdDebug() << "Destruction d'un elementT" << endl;
48
void FormatElt::setFormat(Format* format)
53
void FormatElt::remFormat()
59
void FormatElt::setNext(FormatElt* next)
64
void FormatElt::remNext()
71
FormatElt& FormatElt::operator = (const FormatElt & elt)
73
_format = elt.getFormat();
74
_next = elt.getNext();
78
//////////////////////////////////////////////////////////
79
ListeFormat::ListeFormat()
81
kdDebug() << "Create format list" << endl;
87
ListeFormat::~ListeFormat()
89
kdDebug() << "Destruction of a list of format" << endl;
91
kdDebug() << "ok" << endl;
94
void ListeFormat::addLast(Format *elt)
97
FormatElt *new_last = new FormatElt;
99
new_last->setFormat(elt);
103
_end->setNext(new_last);
108
/* La liste est vide => _last = _first; */
115
void ListeFormat::addFirst(Format* elt)
117
FormatElt *new_first = new FormatElt;
119
new_first->setFormat(elt);
120
new_first->setNext(_first);
125
/* La liste est vide => _last = _first; */
131
void ListeFormat::remLast()
133
FormatElt *new_last = new FormatElt(_first);
135
for(int index = 1; index< _size - 1; new_last = new_last->getNext())
143
void ListeFormat::remFirst()
145
FormatElt *first_saved;
147
first_saved = _first->getNext();
150
_first = first_saved;
154
void ListeFormat::vider()