File indexing completed on 2025-02-16 13:49:57
0001 /* 0002 ** A program to convert the XML rendered by Words into LATEX. 0003 ** 0004 ** Copyright (C) 2000, 2001, 2002 Robert JACOLIN 0005 ** 0006 ** This library is free software; you can redistribute it and/or 0007 ** modify it under the terms of the GNU Library General Public 0008 ** License as published by the Free Software Foundation; either 0009 ** version 2 of the License, or (at your option) any later version. 0010 ** 0011 ** This library is distributed in the hope that it will be useful, 0012 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 ** Library General Public License for more details. 0015 ** 0016 ** To receive a copy of the GNU Library General Public License, write to the 0017 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 ** 0020 */ 0021 0022 #include "map.h" 0023 0024 #include "LatexDebug.h" 0025 0026 #include <stdlib.h> /* for atoi function */ 0027 0028 #include <QTextStream> 0029 0030 /*******************************************/ 0031 /* Constructor */ 0032 /*******************************************/ 0033 Map::Map() 0034 { 0035 } 0036 0037 /*******************************************/ 0038 /* Destructor */ 0039 /*******************************************/ 0040 Map::~Map() 0041 { 0042 debugLatex << "Destruction of a map."; 0043 } 0044 0045 /*******************************************/ 0046 /* Analyze */ 0047 /*******************************************/ 0048 void Map::analyze(const QDomNode node) 0049 { 0050 /* Analysis of the parameters */ 0051 debugLatex << "ANALYZE A MAP"; 0052 0053 /* Analysis of the child markups */ 0054 for (int index = 0; index < getNbChild(node); index++) { 0055 // Only tables 0056 Table* table = new Table(); 0057 table->analyze(getChild(node, index)); 0058 _tables.append(table); 0059 } 0060 debugLatex << "END OF MAP"; 0061 } 0062 0063 /*******************************************/ 0064 /* Generate */ 0065 /*******************************************/ 0066 /* Generate each text zone with the parag. */ 0067 /* markup. */ 0068 /*******************************************/ 0069 void Map::generate(QTextStream &out) 0070 { 0071 debugLatex << " MAP GENERATION"; 0072 foreach(Table* table, _tables) { 0073 table->generate(out); 0074 } 0075 0076 debugLatex << "MAP GENERATED"; 0077 } 0078