File indexing completed on 2025-02-16 13:49:57
0001 /* 0002 ** Header file for inclusion with words_xml2latex.c 0003 ** 0004 ** Copyright (C) 2002, 2003 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 #ifndef __CALLIGRA_SHEETS_LATEX_SPREADSHEET_H__ 0023 #define __CALLIGRA_SHEETS_LATEX_SPREADSHEET_H__ 0024 0025 #include <QList> 0026 #include <QTextStream> 0027 0028 #include "map.h" 0029 #include "config.h" 0030 0031 enum EGenerate { 0032 E_LATEX, 0033 E_WORDS, 0034 E_CONFIG 0035 }; 0036 0037 /***********************************************************************/ 0038 /* Class: Spreadsheet */ 0039 /***********************************************************************/ 0040 0041 /** 0042 * This class hold a whole document with its headers, footers, footnotes, endnotes, 0043 * content, ... It can generate a latex file. 0044 */ 0045 class Spreadsheet: public XmlParser, Config 0046 { 0047 0048 //Paper _paper; 0049 Map _map; 0050 //Locale _locale; 0051 //AreaName _areaname; 0052 0053 public: 0054 /** 0055 * Constructor 0056 * 0057 * Creates a new instance of Spreadsheet. 0058 */ 0059 Spreadsheet(); 0060 0061 /** 0062 * Destructor 0063 * 0064 * Remove the list of headers, footers and the body. 0065 */ 0066 ~Spreadsheet() override; 0067 0068 /** 0069 * Accessors 0070 */ 0071 0072 void analyze(const QDomNode); 0073 void analyze_attr(const QDomNode); 0074 0075 void generate(QTextStream&, bool); 0076 0077 private: 0078 /** 0079 * Generate the second part of the preamble 0080 */ 0081 void generatePreamble(QTextStream&); 0082 0083 /** 0084 * Generate the header 0085 */ 0086 void generateTypeHeader(QTextStream&); 0087 0088 /** 0089 * Generate the footer 0090 */ 0091 void generateTypeFooter(QTextStream&); 0092 }; 0093 0094 #endif /* __CALLIGRA_SHEETS_LATEX_SPREADSHEET_H__ */