From b287b3d34c40716f39e5b61438d2b39205d2bede Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 28 Jun 2009 08:21:16 +0000 Subject: [PATCH] Testing usvn git-svn-id: svn://ultimatepp.org/upp/trunk@1342 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppdev/AccessKey/AccessKey.upp | 1 + uppdev/AccessKey/init | 4 + uppdev/ArrayCtrl/ArrayCtrl.upp | 32 +- uppdev/{Blending => Blending1}/Blending.upp | 0 uppdev/{Blending => Blending1}/main.cpp | 0 uppdev/{Blending => Blending1}/tst.tpp/all.i | 0 .../tst.tpp/xxx$en-us.tpp | 0 .../tst.tpp/yyyy$en-us.tpp | 0 uppdev/CreatePNGObject/CreatePNGObject.upp | 9 + uppdev/CreatePNGObject/main.cpp | 10 + uppdev/QTFHeight/QTFHeight.upp | 9 + uppdev/QTFHeight/main.cpp | 15 + uppdev/XLS/XLS.h | 9 + uppdev/XLS/XLS.upp | 40 + uppdev/XLS/biffsection.h | 68 + uppdev/XLS/binfile.cpp | 278 ++++ uppdev/XLS/blank.cpp | 104 ++ uppdev/XLS/blank.h | 92 ++ uppdev/XLS/cbridge.cpp | 228 +++ uppdev/XLS/cbridge.h | 33 + uppdev/XLS/cell.cpp | 557 +++++++ uppdev/XLS/cell.h | 174 +++ uppdev/XLS/colinfo.cpp | 74 + uppdev/XLS/colinfo.h | 87 ++ uppdev/XLS/colors.h | 143 ++ uppdev/XLS/common.h | 91 ++ uppdev/XLS/config.h | 98 ++ uppdev/XLS/continue.cpp | 68 + uppdev/XLS/continue.h | 72 + uppdev/XLS/crc.cpp | 254 +++ uppdev/XLS/crc.h | 104 ++ uppdev/XLS/data/data3.h | 314 ++++ uppdev/XLS/data/data4.h | 315 ++++ uppdev/XLS/datast.cpp | 89 ++ uppdev/XLS/datast.h | 84 + uppdev/XLS/docsumminfo.cpp | 85 + uppdev/XLS/docsumminfo.h | 78 + uppdev/XLS/extformat.cpp | 1363 +++++++++++++++++ uppdev/XLS/extformat.h | 696 +++++++++ uppdev/XLS/font.cpp | 667 ++++++++ uppdev/XLS/font.h | 441 ++++++ uppdev/XLS/format.cpp | 141 ++ uppdev/XLS/format.h | 202 +++ uppdev/XLS/formtags.h | 240 +++ uppdev/XLS/globalrec.cpp | 1046 +++++++++++++ uppdev/XLS/globalrec.h | 179 +++ uppdev/XLS/index.cpp | 158 ++ uppdev/XLS/index.h | 86 ++ uppdev/XLS/init | 4 + uppdev/XLS/label.cpp | 262 ++++ uppdev/XLS/label.h | 131 ++ uppdev/XLS/merged.cpp | 98 ++ uppdev/XLS/merged.h | 82 + uppdev/XLS/number.cpp | 121 ++ uppdev/XLS/number.h | 101 ++ uppdev/XLS/ole/binfile.h | 116 ++ uppdev/XLS/ole/oledoc.h | 172 +++ uppdev/XLS/ole/olefs.h | 104 ++ uppdev/XLS/ole/oleprop.h | 165 ++ uppdev/XLS/oledoc.cpp | 547 +++++++ uppdev/XLS/olefs.cpp | 523 +++++++ uppdev/XLS/oleprop.cpp | 412 +++++ uppdev/XLS/overnew.cpp | 93 ++ uppdev/XLS/overnew.h | 71 + uppdev/XLS/range.cpp | 257 ++++ uppdev/XLS/range.h | 112 ++ uppdev/XLS/recdef.cpp | 485 ++++++ uppdev/XLS/recdef.h | 325 ++++ uppdev/XLS/record.cpp | 150 ++ uppdev/XLS/record.h | 91 ++ uppdev/XLS/rectypes.h | 758 +++++++++ uppdev/XLS/reference/xlslibRefGuide.pdf | Bin 0 -> 138384 bytes uppdev/XLS/reference/xlslibRefManual.xls | Bin 0 -> 148992 bytes uppdev/XLS/row.cpp | 201 +++ uppdev/XLS/row.h | 179 +++ uppdev/XLS/sheetrec.cpp | 1176 ++++++++++++++ uppdev/XLS/sheetrec.h | 233 +++ uppdev/XLS/stringtok.h | 148 ++ uppdev/XLS/summinfo.cpp | 88 ++ uppdev/XLS/summinfo.h | 82 + uppdev/XLS/systype.h | 282 ++++ uppdev/XLS/timespan.h | 114 ++ uppdev/XLS/tostr.h | 171 +++ uppdev/XLS/unit.cpp | 662 ++++++++ uppdev/XLS/unit.h | 140 ++ uppdev/XLS/workbook.cpp | 560 +++++++ uppdev/XLS/workbook.h | 148 ++ uppdev/XLS/xlslib.h | 392 +++++ 88 files changed, 18578 insertions(+), 16 deletions(-) create mode 100644 uppdev/AccessKey/init rename uppdev/{Blending => Blending1}/Blending.upp (100%) rename uppdev/{Blending => Blending1}/main.cpp (100%) rename uppdev/{Blending => Blending1}/tst.tpp/all.i (100%) rename uppdev/{Blending => Blending1}/tst.tpp/xxx$en-us.tpp (100%) rename uppdev/{Blending => Blending1}/tst.tpp/yyyy$en-us.tpp (100%) create mode 100644 uppdev/CreatePNGObject/CreatePNGObject.upp create mode 100644 uppdev/CreatePNGObject/main.cpp create mode 100644 uppdev/QTFHeight/QTFHeight.upp create mode 100644 uppdev/QTFHeight/main.cpp create mode 100644 uppdev/XLS/XLS.h create mode 100644 uppdev/XLS/XLS.upp create mode 100644 uppdev/XLS/biffsection.h create mode 100644 uppdev/XLS/binfile.cpp create mode 100644 uppdev/XLS/blank.cpp create mode 100644 uppdev/XLS/blank.h create mode 100644 uppdev/XLS/cbridge.cpp create mode 100644 uppdev/XLS/cbridge.h create mode 100644 uppdev/XLS/cell.cpp create mode 100644 uppdev/XLS/cell.h create mode 100644 uppdev/XLS/colinfo.cpp create mode 100644 uppdev/XLS/colinfo.h create mode 100644 uppdev/XLS/colors.h create mode 100644 uppdev/XLS/common.h create mode 100644 uppdev/XLS/config.h create mode 100644 uppdev/XLS/continue.cpp create mode 100644 uppdev/XLS/continue.h create mode 100644 uppdev/XLS/crc.cpp create mode 100644 uppdev/XLS/crc.h create mode 100644 uppdev/XLS/data/data3.h create mode 100644 uppdev/XLS/data/data4.h create mode 100644 uppdev/XLS/datast.cpp create mode 100644 uppdev/XLS/datast.h create mode 100644 uppdev/XLS/docsumminfo.cpp create mode 100644 uppdev/XLS/docsumminfo.h create mode 100644 uppdev/XLS/extformat.cpp create mode 100644 uppdev/XLS/extformat.h create mode 100644 uppdev/XLS/font.cpp create mode 100644 uppdev/XLS/font.h create mode 100644 uppdev/XLS/format.cpp create mode 100644 uppdev/XLS/format.h create mode 100644 uppdev/XLS/formtags.h create mode 100644 uppdev/XLS/globalrec.cpp create mode 100644 uppdev/XLS/globalrec.h create mode 100644 uppdev/XLS/index.cpp create mode 100644 uppdev/XLS/index.h create mode 100644 uppdev/XLS/init create mode 100644 uppdev/XLS/label.cpp create mode 100644 uppdev/XLS/label.h create mode 100644 uppdev/XLS/merged.cpp create mode 100644 uppdev/XLS/merged.h create mode 100644 uppdev/XLS/number.cpp create mode 100644 uppdev/XLS/number.h create mode 100644 uppdev/XLS/ole/binfile.h create mode 100644 uppdev/XLS/ole/oledoc.h create mode 100644 uppdev/XLS/ole/olefs.h create mode 100644 uppdev/XLS/ole/oleprop.h create mode 100644 uppdev/XLS/oledoc.cpp create mode 100644 uppdev/XLS/olefs.cpp create mode 100644 uppdev/XLS/oleprop.cpp create mode 100644 uppdev/XLS/overnew.cpp create mode 100644 uppdev/XLS/overnew.h create mode 100644 uppdev/XLS/range.cpp create mode 100644 uppdev/XLS/range.h create mode 100644 uppdev/XLS/recdef.cpp create mode 100644 uppdev/XLS/recdef.h create mode 100644 uppdev/XLS/record.cpp create mode 100644 uppdev/XLS/record.h create mode 100644 uppdev/XLS/rectypes.h create mode 100644 uppdev/XLS/reference/xlslibRefGuide.pdf create mode 100644 uppdev/XLS/reference/xlslibRefManual.xls create mode 100644 uppdev/XLS/row.cpp create mode 100644 uppdev/XLS/row.h create mode 100644 uppdev/XLS/sheetrec.cpp create mode 100644 uppdev/XLS/sheetrec.h create mode 100644 uppdev/XLS/stringtok.h create mode 100644 uppdev/XLS/summinfo.cpp create mode 100644 uppdev/XLS/summinfo.h create mode 100644 uppdev/XLS/systype.h create mode 100644 uppdev/XLS/timespan.h create mode 100644 uppdev/XLS/tostr.h create mode 100644 uppdev/XLS/unit.cpp create mode 100644 uppdev/XLS/unit.h create mode 100644 uppdev/XLS/workbook.cpp create mode 100644 uppdev/XLS/workbook.h create mode 100644 uppdev/XLS/xlslib.h diff --git a/uppdev/AccessKey/AccessKey.upp b/uppdev/AccessKey/AccessKey.upp index 1adaae36b..c79da13f7 100644 --- a/uppdev/AccessKey/AccessKey.upp +++ b/uppdev/AccessKey/AccessKey.upp @@ -9,3 +9,4 @@ file mainconfig "" = "GUI ST"; + diff --git a/uppdev/AccessKey/init b/uppdev/AccessKey/init new file mode 100644 index 000000000..e24b891b9 --- /dev/null +++ b/uppdev/AccessKey/init @@ -0,0 +1,4 @@ +#ifndef _AccessKey_icpp_init_stub +#define _AccessKey_icpp_init_stub +#include "CtrlLib/init" +#endif diff --git a/uppdev/ArrayCtrl/ArrayCtrl.upp b/uppdev/ArrayCtrl/ArrayCtrl.upp index 2af767c87..fd10d1890 100644 --- a/uppdev/ArrayCtrl/ArrayCtrl.upp +++ b/uppdev/ArrayCtrl/ArrayCtrl.upp @@ -1,16 +1,16 @@ -description "\377B"; - -uses - CtrlLib, - Crypto; - -file - app.tpp, - ArrayCtrl.h include_path, - main.cpp optimize_speed, - src.tpp, - srcimp.tpp; - -mainconfig - "" = "GUI"; - +description "\377B"; + +uses + CtrlLib, + Crypto; + +file + app.tpp, + ArrayCtrl.h, + main.cpp optimize_speed, + src.tpp, + srcimp.tpp; + +mainconfig + "" = "GUI"; + diff --git a/uppdev/Blending/Blending.upp b/uppdev/Blending1/Blending.upp similarity index 100% rename from uppdev/Blending/Blending.upp rename to uppdev/Blending1/Blending.upp diff --git a/uppdev/Blending/main.cpp b/uppdev/Blending1/main.cpp similarity index 100% rename from uppdev/Blending/main.cpp rename to uppdev/Blending1/main.cpp diff --git a/uppdev/Blending/tst.tpp/all.i b/uppdev/Blending1/tst.tpp/all.i similarity index 100% rename from uppdev/Blending/tst.tpp/all.i rename to uppdev/Blending1/tst.tpp/all.i diff --git a/uppdev/Blending/tst.tpp/xxx$en-us.tpp b/uppdev/Blending1/tst.tpp/xxx$en-us.tpp similarity index 100% rename from uppdev/Blending/tst.tpp/xxx$en-us.tpp rename to uppdev/Blending1/tst.tpp/xxx$en-us.tpp diff --git a/uppdev/Blending/tst.tpp/yyyy$en-us.tpp b/uppdev/Blending1/tst.tpp/yyyy$en-us.tpp similarity index 100% rename from uppdev/Blending/tst.tpp/yyyy$en-us.tpp rename to uppdev/Blending1/tst.tpp/yyyy$en-us.tpp diff --git a/uppdev/CreatePNGObject/CreatePNGObject.upp b/uppdev/CreatePNGObject/CreatePNGObject.upp new file mode 100644 index 000000000..5872304d3 --- /dev/null +++ b/uppdev/CreatePNGObject/CreatePNGObject.upp @@ -0,0 +1,9 @@ +uses + CtrlLib; + +file + main.cpp; + +mainconfig + "" = "GUI"; + diff --git a/uppdev/CreatePNGObject/main.cpp b/uppdev/CreatePNGObject/main.cpp new file mode 100644 index 000000000..2c3df3bec --- /dev/null +++ b/uppdev/CreatePNGObject/main.cpp @@ -0,0 +1,10 @@ +#include + +using namespace Upp; + +GUI_APP_MAIN +{ + String chk0 = AsQTF(CreatePNGObject(CtrlImg::exclamation(), 400, 400)); + PromptOK(chk0); +} + diff --git a/uppdev/QTFHeight/QTFHeight.upp b/uppdev/QTFHeight/QTFHeight.upp new file mode 100644 index 000000000..5872304d3 --- /dev/null +++ b/uppdev/QTFHeight/QTFHeight.upp @@ -0,0 +1,9 @@ +uses + CtrlLib; + +file + main.cpp; + +mainconfig + "" = "GUI"; + diff --git a/uppdev/QTFHeight/main.cpp b/uppdev/QTFHeight/main.cpp new file mode 100644 index 000000000..4f6814d89 --- /dev/null +++ b/uppdev/QTFHeight/main.cpp @@ -0,0 +1,15 @@ +#include + +using namespace Upp; + +GUI_APP_MAIN +{ + TopWindow win; + RichTextCtrl rt; + String str = "[3A^test^ Graphical introduction]"; + rt = str; + rt.SetFrame(BlackFrame()); + rt.NoSb(); + win.Add(rt.LeftPos(10, rt.GetWidth() + 2).TopPos(rt.GetHeight(INT_MAX) + 2)); + win.Run(); +} \ No newline at end of file diff --git a/uppdev/XLS/XLS.h b/uppdev/XLS/XLS.h new file mode 100644 index 000000000..793300327 --- /dev/null +++ b/uppdev/XLS/XLS.h @@ -0,0 +1,9 @@ +#ifndef _XLS_XLS_h +#define _XLS_XLS_h + +#include +#include + +using namespace Upp; + +#endif diff --git a/uppdev/XLS/XLS.upp b/uppdev/XLS/XLS.upp new file mode 100644 index 000000000..993b78f24 --- /dev/null +++ b/uppdev/XLS/XLS.upp @@ -0,0 +1,40 @@ +description "U++ wrapper for XlsLib 1.2.0 (library for XLS spreadsheets, by David Hoerl)\377"; + +uses + Core; + +file + binfile.cpp, + blank.cpp, + cbridge.cpp, + cell.cpp, + colinfo.cpp, + continue.cpp, + crc.cpp, + datast.cpp, + docsumminfo.cpp, + extformat.cpp, + font.cpp, + format.cpp, + globalrec.cpp, + index.cpp, + label.cpp, + merged.cpp, + number.cpp, + oledoc.cpp, + olefs.cpp, + oleprop.cpp, + overnew.cpp, + range.cpp, + recdef.cpp, + record.cpp, + row.cpp, + sheetrec.cpp, + summinfo.cpp, + unit.cpp, + workbook.cpp, + XLS.h; + +mainconfig + "" = ""; + diff --git a/uppdev/XLS/biffsection.h b/uppdev/XLS/biffsection.h new file mode 100644 index 000000000..0ea5bc1d5 --- /dev/null +++ b/uppdev/XLS/biffsection.h @@ -0,0 +1,68 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/biffsection.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef BIFFSECTION_H +#define BIFFSECTION_H + +#include +#include + + +/* +****************************** +CBiffSection class declaration +****************************** +*/ + + +class CBiffSection +{ + protected: + + public: + CBiffSection() {}; + ~CBiffSection() {}; +}; + +#endif //BIFFSECTION_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: biffsection.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/uppdev/XLS/binfile.cpp b/uppdev/XLS/binfile.cpp new file mode 100644 index 000000000..2b5a4491e --- /dev/null +++ b/uppdev/XLS/binfile.cpp @@ -0,0 +1,278 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/binfile.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + +/* +****************************** +CBinFile class Implementation +****************************** +*/ + +CBinFile::CBinFile() +// : is_stroke(false) +{ + +} + +CBinFile::CBinFile(const string& name) +// : is_stroke(false) +{ + Open(name); + +} + +CBinFile::~CBinFile () +{ + Close(); + +} + +/* +****************************** +****************************** +*/ +int CBinFile::Open(const string& file_name) +{ + Close(); + m_File.open(file_name.c_str(),ios_base::binary|ios_base::out); + + return m_File.good()? NO_ERRORS: FILE_ERROR; +} + +/* +****************************** +****************************** +*/ +int CBinFile::Close ( ) +{ + if(m_File.is_open()) + m_File.close(); + + return NO_ERRORS; +} +/* +****************************** +****************************** +*/ + +unsigned32_t CBinFile::Position ( ) +{ + unsigned32_t pt = 0; + if(m_File.is_open()) { + pt = (unsigned32_t)m_File.tellp(); + } + + return pt; +} + +/* +****************************** +****************************** +*/ +int CBinFile::Write ( unsigned8_t * data, unsigned32_t size ) +{ + int errcode = NO_ERRORS; + + write_service((const char*)data, size); + return errcode; +} + + +/* +****************************** +****************************** +*/ +int CBinFile::Write ( CUnit& data_unit ) +{ + + int errcode = NO_ERRORS; + write_service((const char*)data_unit.GetBuffer(), data_unit.GetDataSize()); + return errcode; +} + +/* +****************************** +****************************** +*/ +int CBinFile::WriteByte(unsigned8_t byte) +{ + + int errcode = NO_ERRORS; + write_service((const char*)&byte, 1); + return errcode; +} + +/* +****************************** +****************************** +*/ +int CBinFile::WriteUnsigned16(unsigned16_t data) +{ + int errcode = NO_ERRORS; + + WriteByte(BYTE_0(data)); + WriteByte(BYTE_1(data)); + + return errcode; +} + +/* +****************************** +****************************** +*/ +int CBinFile::WriteUnsigned32(unsigned32_t data) +{ + int errcode = NO_ERRORS; + + WriteByte(BYTE_0(data)); + WriteByte(BYTE_1(data)); + WriteByte(BYTE_2(data)); + WriteByte(BYTE_3(data)); + + return errcode; +} + +/* +****************************** +****************************** +*/ +int CBinFile::WriteSigned16(signed16_t data) +{ + int errcode = NO_ERRORS; + + WriteByte(BYTE_0(data)); + WriteByte(BYTE_1(data)); + + return errcode; +} + +/* +****************************** +****************************** +*/ +int CBinFile::WriteSigned32(signed32_t data) +{ + int errcode = NO_ERRORS; + WriteByte(BYTE_0(data)); + WriteByte(BYTE_1(data)); + WriteByte(BYTE_2(data)); + WriteByte(BYTE_3(data)); + + return errcode; +} + +int CBinFile::WriteByteArray(const unsigned8_t *data, size_t size) +{ + int errcode = NO_ERRORS; + write_service((const char*)data, size); + return errcode; +} + +/* +****************************** +****************************** +*/ + +int CBinFile::SerializeFixedArray(const unsigned8_t data, unsigned32_t size) +{ + int errcode = NO_ERRORS; + + for (unsigned32_t i = 0; i 1) + m_File.write((const char*)buffer, size); + else if(size == 1) + m_File.put(*buffer); + } + } +#ifdef XLS_PHP + int sent = 0; + else { + if (write_fptr != NULL) + { + do + { + if(size >= STROKE_CHUNK_SIZE) + { + sent = write_fptr(buffer, STROKE_CHUNK_SIZE); + size -= sent; + buffer += sent; + } else { + sent = write_fptr(buffer, size); + size -= sent; + buffer += sent; + } + } while(size != 0); + } + } +#endif + return 0; +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: binfile.cpp,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/blank.cpp b/uppdev/XLS/blank.cpp new file mode 100644 index 000000000..e53df8efb --- /dev/null +++ b/uppdev/XLS/blank.cpp @@ -0,0 +1,104 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/blank.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include + +using namespace std; +using namespace xlslib_core; + +CBlank::CBlank(unsigned16_t row, + unsigned16_t col, + xf_t* pxfval) +{ + + SetRecordType(RECTYPE_BLANK); + AddValue16(row); + AddValue16(col); + + unsigned16_t xfindex; + pxfval != NULL? + xfindex = pxfval->GetIndex() + :xfindex = 0x000f; + AddValue16(xfindex); + SetRecordLength(GetDataSize()-4); + +} + +CBlank::CBlank(blank_t& blankdef) +{ + SetRecordType(RECTYPE_BLANK); // DFH - was RECTYPE_LABEL, typo ??? (just like the number class) + AddValue16(blankdef.GetRow()); + AddValue16(blankdef.GetCol()); + AddValue16(blankdef.GetXFIndex()); + + SetRecordLength(GetDataSize()-4); +} + +CBlank::~CBlank() +{ +} + +/* +********************************* +blank_t class implementation +********************************* +*/ +blank_t::blank_t(unsigned16_t rowval, + unsigned16_t colval, + xf_t* pxfval) +{ + row = rowval; + col = colval; + + if(pxfval != NULL) + pxfval->MarkUsed(); + pxf = pxfval; +} + +CUnit* blank_t::GetData() { + CUnit* datablank = + (CUnit*)( new CBlank(row,col,pxf)); + return datablank; // NOTE: this pointer HAS to be deleted elsewhere. +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: blank.cpp,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:54 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/blank.h b/uppdev/XLS/blank.h new file mode 100644 index 000000000..2307bc2e2 --- /dev/null +++ b/uppdev/XLS/blank.h @@ -0,0 +1,92 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/blank.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#ifndef BLANK_H +#define BLANK_H + +#include +#include + +#include +#include +#include + +namespace xlslib_core +{ + + class blank_t; + class CBlank: public CRecord + { + private: + + public: + CBlank(unsigned16_t row, + unsigned16_t col, + xf_t* pxfval = NULL); + + CBlank(blank_t& blankdef); + ~CBlank(); + }; + + + class blank_t: public cell_t + { + + private: + + public: + blank_t(unsigned16_t rowval, + unsigned16_t colval, + xf_t* pxfval = NULL); + + ~blank_t(){}; + unsigned16_t GetSize() {return 10;}; + CUnit* GetData(); + + }; + +} + +#endif //BLANK_H + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: blank.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/cbridge.cpp b/uppdev/XLS/cbridge.cpp new file mode 100644 index 000000000..1e1ecd129 --- /dev/null +++ b/uppdev/XLS/cbridge.cpp @@ -0,0 +1,228 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/cbridge.cpp,v $ + * $Revision: 1.1 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:44:32 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include + +#include + +using namespace std; +//using namespace xlslib_core; + +#if 0 +EXTERN_TYPE worksheet *newWorksheet(CGlobalRecords *pglobalrec); +EXTERN_TYPE void deleteWorksheet(worksheet *w); + worksheet *newWorksheet(CGlobalRecords *pglobalrec) { return new worksheet(pglobalrec); } + void deleteWorksheet(worksheet *w) { delete w; } +#endif + +extern "C" { + // Workbook + workbook *newWorkbook(void) { return new workbook; } + //workbook *newWorkbook_w_fptr(write_fptr_t w_fptr) { return new workbook(w_fptr); } + void deleteWorkbook(workbook *w) { delete w; } + worksheet *callWorkbookSheet(workbook *w, char *sheetname) { + std::string str = sheetname; + return w->sheet(str); + } +#if VERSION_BIFF == VERSION_BIFF8 + worksheet *callWorkbookSheetW(workbook *w, uchar_t *sheetname) { + std::ustring str = sheetname; + return w->sheet(str); + } +#endif + worksheet *callWorkbookGetSheet(workbook *w, unsigned16_t sheetnum) { return w->GetSheet(sheetnum); } + + font_t *callWorkbookFont(workbook *w, char *name) { + std::string str = name; + return w->font(str); + } + xf_t *callWorkbookxFormat(workbook *w) { return w->xformat(); } + xf_t *callWorkbookxFormatFont(workbook *w, font_t *font) { return w->xformat(font); } + int callWorkbookDump(workbook *w, char *filename) { + std::string str = filename; + return w->Dump(str); + } +#ifdef XLS_PHP + void callWorkbookDisposition(workbook *w, Stroke_Disposition_t disp) { return w->Disposition(disp); } + void callWorkbookStroke(workbook *w, char *filename) { + std::string str = filename; + return w->Stroke(str); + } +#endif + // Worksheet + cell_t *callWorksheetFindCell(worksheet *w, unsigned16_t row, unsigned16_t col) { return w->FindCell(row, col); } + // Cell operations + void callWorksheetMerge(worksheet *w, unsigned16_t first_row, unsigned16_t first_col, unsigned16_t last_row, unsigned16_t last_col) + { return w->merge(first_row, first_col, last_row, last_col); } + void callWorksheetColwidth(worksheet *w, unsigned16_t col, unsigned16_t width) + { return w->colwidth(col, width); } + void callWorksheetRowheight(worksheet *w, unsigned16_t row, unsigned16_t height) + { return w->rowheight(row, height); } + // Ranges + range *callWorksheetRangegroup(worksheet *w, unsigned16_t row1, unsigned16_t col1, unsigned16_t row2, unsigned16_t col2) + { return w->rangegroup(row1, col1, row2, col2); } + // Cells + cell_t *callWorksheetLabel(worksheet *w, unsigned16_t row, unsigned16_t col, char *strlabel, xf_t *pxformat) + { + std:string str = strlabel; + return w->label(row, col, strlabel, pxformat); + } +#if VERSION_BIFF == VERSION_BIFF8 + cell_t *callWorksheetLabelW(worksheet *w, unsigned16_t row, unsigned16_t col, uchar_t *strlabel, xf_t *pxformat) + { + std:ustring str = strlabel; + return w->label(row, col, strlabel, pxformat); + } +#endif + cell_t *callWorksheetBlank(worksheet *w, unsigned16_t row, unsigned16_t col, xf_t *pxformat) + { return w->blank(row, col, pxformat); } + + cell_t *callWorksheetNumber(worksheet *w, unsigned16_t row, unsigned16_t col, double numval, format_number_t fmtval, xf_t *pxformat) + { return w->number(row, col, numval, fmtval, pxformat); } + + // Cells + // xf_i interface + void callCellFont(cell_t *c, font_t *fontidx) { return c->font(fontidx); } + void callCellFormat(cell_t *c, format_number_t formatidx) { return c->format(formatidx); } + void callCellHalign(cell_t *c, halign_option_t ha_option) { return c->halign(ha_option); } + void callCellValign(cell_t *c, valign_option_t va_option) { return c->valign(va_option); } + void callCellOrientation(cell_t *c, txtori_option_t ori_option) { return c->orientation(ori_option); } + void callCellFillfgcolor(cell_t *c, color_name_t color) { return c->fillfgcolor(color); } + void callCellFillbgcolor(cell_t *c, color_name_t color) { return c->fillbgcolor(color); } + void callCellFillstyle(cell_t *c, fill_option_t fill) { return c->fillstyle(fill); } + void callCellLocked(cell_t *c, bool locked_opt) { return c->locked(locked_opt); } + void callCellHidden(cell_t *c, bool hidden_opt) { return c->hidden(hidden_opt); } + void callCellWrap(cell_t *c, bool wrap_opt) { return c->wrap(wrap_opt); } + void callCellBorderstyle(cell_t *c, border_side_t side, border_style_t style, color_name_t color) + { return c->borderstyle(side, style, color); } + //font_i interface + void callCellFontname(cell_t *c, char *fntname) { + std::string str = fntname; + return c->fontname(str); + } + void callCellFontheight(cell_t *c, unsigned16_t fntheight) { return c->fontheight(fntheight); } + void callCellFontbold(cell_t *c, boldness_option_t fntboldness) { return c->fontbold(fntboldness); } + void callCellFontunderline(cell_t *c, underline_option_t fntunderline) { return c->fontunderline(fntunderline); } + void callCellFontscript(cell_t *c, script_option_t fntscript) { return c->fontscript(fntscript); } + void callCellFontcolor(cell_t *c, color_name_t fntcolor) { return c->fontcolor(fntcolor); } + void callCellFontattr(cell_t *c, unsigned16_t attr) { return c->fontattr(attr); } + void callCellFontitalic(cell_t *c, bool italic) { return c->fontitalic(italic); } + void callCellFontstrikeout(cell_t *c, bool so) { return c->fontstrikeout(so); } + void callCellFontoutline(cell_t *c, bool ol) { return c->fontoutline(ol); } + void callCellFontshadow(cell_t *c, bool sh) { return c->fontshadow(sh); } + + unsigned16_t callCellGetRow(cell_t *c) { return c->GetRow(); } + unsigned16_t callCellGetCol(cell_t *c) { return c->GetCol(); } + unsigned16_t callCellGetXFIndex(cell_t *c) { return c->GetXFIndex(); } + void callCellSetXF(cell_t *c, xf_t *pxfval) { return c->SetXF(pxfval); } + + // range + void callRangeCellcolor(range *r, color_name_t color) { return r->cellcolor(color); } + + // xformat + void callXformatSetFont(xf_t *x, font_t* fontidx) { return x->SetFont(fontidx); } + unsigned16_t callXformatGetFontIndex(xf_t *x) { return x->GetFontIndex(); } + font_t* callXformatGetFont(xf_t *x) { return x->GetFont(); } + /* Format Index wrappers*/ + void callXformatSetFormat(xf_t *x, format_number_t formatidx) { return x->SetFormat(formatidx); } + unsigned16_t callXformatGetFormatIndex(xf_t *x) { return x->GetFormatIndex(); } + format_number_t callXformatGetFormat(xf_t *x) { return x->GetFormat(); } + /* Horizontal Align option wrappers*/ + void callXformatSetHAlign(xf_t *x, halign_option_t ha_option) { return x->SetHAlign(ha_option); } + unsigned8_t callXformatGetHAlign(xf_t *x) { return x->GetHAlign(); } + /* Vertical Align option wrappers*/ + void callXformatSetVAlign(xf_t *x, valign_option_t va_option) { return x->SetVAlign(va_option); } + unsigned8_t callXformatGetVAlign(xf_t *x) { return x->GetVAlign(); } + /* Text orientation option wrappers*/ + void callXformatSetTxtOrientation(xf_t *x, txtori_option_t ori_option) { return x->SetTxtOrientation(ori_option); } + unsigned8_t callXformatGetTxtOrientation(xf_t *x) { return x->GetTxtOrientation(); } + /* Fill Foreground color option wrappers*/ + void callXformatSetFillFGColor(xf_t *x, color_name_t color) { return x->SetFillFGColor(color); } + unsigned8_t callXformatGetFillFGColor(xf_t *x) { return x->GetFillFGColor(); } + /* Fill Background color option wrappers*/ + void callXformatSetFillBGColor(xf_t *x, color_name_t color) { return x->SetFillBGColor(color); } + unsigned8_t callXformatGetFillBGColor(xf_t *x) { return x->GetFillBGColor(); } + /* Fill Style option wrappers*/ + void callXformatSetFillStyle(xf_t *x, fill_option_t fill) { return x->SetFillStyle(fill); } + unsigned8_t callXformatGetFillStyle(xf_t *x) { return x->GetFillStyle(); } + /* Locked option wrappers*/ + void callXformatSetLocked(xf_t *x, bool locked_opt) { return x->SetLocked(locked_opt); } + bool callXformatIsLocked(xf_t *x) { return x->IsLocked(); } + /* Hidden option wrappers*/ + void callXformatSetHidden(xf_t *x, bool hidden_opt) { return x->SetHidden(hidden_opt); } + bool callXformatIsHidden(xf_t *x) { return x->IsHidden(); } + /* Wrap option wrappers*/ + void callXformatSetWrap(xf_t *x, bool wrap_opt) { return x->SetWrap(wrap_opt); } + bool callXformatIsWrap(xf_t *x) { return x->IsWrap(); } + /* Cell option wrappers*/ + void callXformatSetCellMode(xf_t *x, bool cellmode) { return x->SetCellMode(cellmode); } + bool callXformatIsCell(xf_t *x) { return x->IsCell(); } + /* Cell option wrappers*/ + void callXformatSetBorderStyle(xf_t *x, border_side_t side, border_style_t style, color_name_t color) + { return x->SetBorderStyle(side, style, color); } + unsigned8_t callXformatGetBorderStyle(xf_t *x, border_side_t side) { return x->GetBorderStyle(side); } + unsigned8_t callXformatGetBorderColor(xf_t *x, border_side_t side) { return x->GetBorderColor(side); } + unsigned32_t callXformatGetSignature(xf_t *x) { return x->GetSignature(); } + + // Font + void callFontSetName(font_t *f, char *fntname) { + std::string str = fntname; + f->SetName(str); + return; + } + char *callFontGetName(font_t *f, char *fntname) { return strcpy(fntname, (f->GetName()).c_str() ); } + /* FONT height wrappers*/ + void callFontSetHeight(font_t *f, unsigned16_t fntheight) { return f->SetHeight(fntheight); } + unsigned16_t callFontGetHeight(font_t *f) { return f->GetHeight(); } + /* FONT boldstyle wrappers*/ + void callFontSetBoldStyle(font_t *f, boldness_option_t fntboldness) { return f->SetBoldStyle(fntboldness); } + unsigned16_t callFontGetBoldStyle(font_t *f) { return f->GetBoldStyle(); } + /* FONT underline wrappers*/ + void callFontSetUnderlineStyle(font_t *f, underline_option_t fntunderline) { return f->SetUnderlineStyle(fntunderline); } + unsigned8_t callFontGetUnderlineStyle(font_t *f) { return f->GetUnderlineStyle(); } + /* FONT script wrappers*/ + void callFontSetScriptStyle(font_t *f, script_option_t fntscript) { return f->SetScriptStyle(fntscript); } + unsigned16_t callFontGetScriptStyle(font_t *f) { return f->GetScriptStyle(); } + /* FONT script wrappers*/ + void callFontSetColor(font_t *f, color_name_t fntcolor) { return f->SetColor(fntcolor); } + unsigned16_t callFontGetColor(font_t *f) { return f->GetColor(); } + void callFontSetItalic(font_t *f, bool italic) { return f->SetItalic(italic); } + void callFontSetStrikeout(font_t *f, bool so) { return f->SetStrikeout(so); } + /* FONT attributes wrappers */ + void callFontSetAttributes(font_t *f, unsigned16_t attr) { return f->SetAttributes(attr); } + unsigned16_t callFontGetAttributes(font_t *f) { return f->GetAttributes(); } + // Macintosh only + void callFontSetOutline(font_t *f, bool ol) { return f->SetOutline(ol); } + void callFontSetShadow(font_t *f, bool sh) { return f->SetShadow(sh); } +} diff --git a/uppdev/XLS/cbridge.h b/uppdev/XLS/cbridge.h new file mode 100644 index 000000000..79b555cd1 --- /dev/null +++ b/uppdev/XLS/cbridge.h @@ -0,0 +1,33 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/cbridge.h,v $ + * $Revision: 1.1 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:44:32 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/cell.cpp b/uppdev/XLS/cell.cpp new file mode 100644 index 000000000..61d0cde66 --- /dev/null +++ b/uppdev/XLS/cell.cpp @@ -0,0 +1,557 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/cell.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#include + +using namespace std; +using namespace xlslib_core; + +cell_t::cell_t() + :m_pGlobalRecs(NULL) +{ + +} + +cell_t::~cell_t() +{ + +} + +unsigned16_t cell_t::GetXFIndex() +{ + unsigned16_t xfindex; +#if 0 + pxf != NULL? + xfindex = pxf->GetIndex() + :xfindex = 0x000f; +#endif + if(pxf != NULL) + xfindex = pxf->GetIndex(); + else + xfindex = 0x000f; + + return xfindex; +} + + +bool cell_t::operator==(const cell_t& right) const +{ + return (row == right.row ? true : false); +} + +bool cell_t::operator!=(const cell_t& right) const +{ + return (row != right.row ? true : false); +} + +/* + bool cell_t::operator<(const cell_t& right) const + { + return (row < right.row); + } + + bool cell_t::operator>(const cell_t& right) const + { + return (row > right.row); + } + + + bool cell_t::operator%(const cell_t& right) const + { + return (row == right.row && col == right.col); + } +*/ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + Implementation of the XF record interface (xf_i pure virtual interface) + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#define SET_XF_CELL_FUNCTION(function,value) \ + { \ + xf_t* currentxf = pxf; \ + if(pxf == NULL) \ + currentxf = m_pGlobalRecs->GetDefaultXF(); \ + \ + xf_t* xfbackup = new xf_t; \ + (*xfbackup) = (*currentxf); \ + \ + if(currentxf->Usage() > 1) \ + { \ + xf_t* newxf = new xf_t(); \ + (*newxf) = (*currentxf); \ + newxf->function(value); \ + newxf = m_pGlobalRecs->AddXFormat(newxf); \ + pxf = newxf; \ + pxf->MarkUsed(); \ + \ + } \ + else \ + { \ + xf_t* xfnew = new xf_t; \ + (*xfnew) = (*currentxf); \ + xfnew->function(value); \ + xfnew->MarkUsed(); \ + xfnew = m_pGlobalRecs->ReplaceXFormat(xfbackup, xfnew); \ + pxf = xfnew; \ + pxf->MarkUsed(); \ + \ + } \ + delete xfbackup; \ + } + +void cell_t::borderstyle(border_side_t side, + border_style_t style, + color_name_t color) +{ + + xf_t* currentxf = pxf; + if(pxf == NULL) + currentxf = m_pGlobalRecs->GetDefaultXF(); + + xf_t* xfbackup = new xf_t; + (*xfbackup) = (*currentxf); + + if(currentxf->Usage() > 1) + { + xf_t* newxf = new xf_t(); + (*newxf) = (*currentxf); + newxf->SetBorderStyle(side, style, color); + newxf = m_pGlobalRecs->AddXFormat(newxf); + pxf = newxf; + pxf->MarkUsed(); + + } + else + { + xf_t* xfnew = new xf_t; + (*xfnew) = (*currentxf); + xfnew->SetBorderStyle(side, style, color); + xfnew->MarkUsed(); + xfnew = m_pGlobalRecs->ReplaceXFormat(xfbackup, xfnew); + pxf = xfnew; + pxf->MarkUsed(); + + + } + delete xfbackup; +} + +void cell_t::font(font_t* fontidx) +{ + + SET_XF_CELL_FUNCTION(SetFont, fontidx); +/* + xf_t* currentxf = pxf; + if(pxf == NULL) + currentxf = m_pGlobalRecs->GetDefaultXF(); + + xf_t* xfbackup = new xf_t; + (*xfbackup) = (*currentxf); + + if(currentxf->Usage() > 1) + { + xf_t* newxf = new xf_t(); + (*newxf) = (*currentxf); + newxf->SetFont(fontidx); + newxf = m_pGlobalRecs->AddXFormat(newxf); + pxf = newxf; + pxf->MarkUsed(); + + } + else + { + xf_t* xfnew = new xf_t; + (*xfnew) = (*currentxf); + xfnew->SetFont(fontidx); + xfnew->MarkUsed(); + xfnew = m_pGlobalRecs->ReplaceXFormat(xfbackup, xfnew); + pxf = xfnew; + } + + delete xfbackup; +*/ +} + +void cell_t::format(format_number_t formatidx) +{ + SET_XF_CELL_FUNCTION(SetFormat,formatidx); +} + +void cell_t::halign(halign_option_t ha_option) +{ + + SET_XF_CELL_FUNCTION(SetHAlign,ha_option); + +} + +void cell_t::valign(valign_option_t va_option) +{ + SET_XF_CELL_FUNCTION(SetVAlign,va_option); +} + +void cell_t::indent(indent_option_t indent_option) +{ + SET_XF_CELL_FUNCTION(SetIndent,indent_option); +} + +void cell_t::orientation(txtori_option_t ori_option) +{ + SET_XF_CELL_FUNCTION(SetTxtOrientation,ori_option); +} + +void cell_t::fillfgcolor(color_name_t color) +{ + SET_XF_CELL_FUNCTION(SetFillFGColor,color); +/* + xf_t* currentxf = pxf; + if(pxf == NULL) + currentxf = m_pGlobalRecs->GetDefaultXF(); + + xf_t* xfbackup = new xf_t; + (*xfbackup) = (*currentxf); + + if(currentxf->Usage() > 1) + { + xf_t* newxf = new xf_t(); + (*newxf) = (*currentxf); + newxf->SetFillFGColor(color); + newxf = m_pGlobalRecs->AddXFormat(newxf); + pxf = newxf; + pxf->MarkUsed(); + + } + else + { + xf_t* xfnew = new xf_t; + (*xfnew) = (*currentxf); + xfnew->SetFillFGColor(color); + xfnew->MarkUsed(); + xfnew = m_pGlobalRecs->ReplaceXFormat(xfbackup, xfnew); + pxf = xfnew; + pxf->MarkUsed(); + } + delete xfbackup; +*/ +} + +void cell_t::fillbgcolor(color_name_t color) +{ + SET_XF_CELL_FUNCTION(SetFillBGColor,color); +} + +void cell_t::fillstyle(fill_option_t fill) +{ + SET_XF_CELL_FUNCTION(SetFillStyle,fill); +/* + xf_t* currentxf = pxf; + if(pxf == NULL) + currentxf = m_pGlobalRecs->GetDefaultXF(); + + xf_t* xfbackup = new xf_t; + (*xfbackup) = (*currentxf); + + if(currentxf->Usage() > 1) + { + xf_t* newxf = new xf_t(); + (*newxf) = (*currentxf); + newxf->SetFillStyle(fill); + newxf = m_pGlobalRecs->AddXFormat(newxf); + pxf = newxf; + pxf->MarkUsed(); + + } + else + { + xf_t* xfnew = new xf_t; + (*xfnew) = (*currentxf); + xfnew->SetFillStyle(fill); + xfnew = m_pGlobalRecs->ReplaceXFormat(xfbackup, xfnew); + pxf = xfnew; + pxf->MarkUsed(); + + } + delete xfbackup; +*/ +} + +void cell_t::locked(bool locked_opt) +{ + SET_XF_CELL_FUNCTION(SetLocked,locked_opt); +} + +void cell_t::hidden(bool hidden_opt) +{ + SET_XF_CELL_FUNCTION(SetHidden,hidden_opt); +} + +void cell_t::wrap(bool wrap_opt) +{ + SET_XF_CELL_FUNCTION(SetWrap,wrap_opt); +} + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + Implementation of the FONT record interface (font_i pure virtual interface) + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#define SET_CELL_FONT_FUNCTION(function,value) \ + { \ + bool samexf = true; \ + \ + xf_t* currentxf = pxf; \ + if(pxf == NULL) \ + currentxf = m_pGlobalRecs->GetDefaultXF(); \ + \ + xf_t* xfbackup = new xf_t; \ + (*xfbackup) = (*currentxf); \ + \ + xf_t* newxf = currentxf; \ + if(currentxf->Usage() > 1) \ + samexf = false; \ + \ + newxf = new xf_t(); \ + (*newxf) = (*currentxf); \ + \ + font_t* currentfont = newxf->GetFont(); \ + if(currentfont == NULL) \ + currentfont = m_pGlobalRecs->GetDefaultFont(); \ + if(currentfont->Usage() > 1) \ + { \ + font_t* newfont = new font_t(); \ + (*newfont) = (*currentfont); \ + newfont->function(value); \ + newfont = m_pGlobalRecs->AddFont(newfont); \ + newxf->SetFont(newfont); \ + } \ + else \ + { \ + font_t* fntnew = new font_t; \ + (*fntnew) = (*currentfont); \ + fntnew->function(value); \ + fntnew = m_pGlobalRecs->ReplaceFont(currentfont, fntnew); \ + newxf->SetFont(fntnew) ; \ + } \ + if(samexf) \ + { \ + newxf = m_pGlobalRecs->ReplaceXFormat(xfbackup, newxf); \ + pxf = newxf; \ + pxf->MarkUsed(); \ + } \ + else \ + { \ + newxf = m_pGlobalRecs->AddXFormat(newxf); \ + pxf = newxf; \ + pxf->MarkUsed(); \ + } \ + delete xfbackup; \ + } + +void cell_t::fontname(string fntname) +{ + + + SET_CELL_FONT_FUNCTION(SetName, fntname); +/* + bool samexf = true; + + xf_t* currentxf = pxf; + if(pxf == NULL) + currentxf = m_pGlobalRecs->GetDefaultXF(); + + xf_t* xfbackup = new xf_t; + (*xfbackup) = (*currentxf); + + xf_t* newxf = currentxf; + if(currentxf->Usage() > 1) + samexf = false; + + newxf = new xf_t(); + (*newxf) = (*currentxf); + + font_t* currentfont = newxf->GetFont(); + if(currentfont == NULL) + currentfont = m_pGlobalRecs->GetDefaultFont(); + if(currentfont->Usage() > 1) + { + font_t* newfont = new font_t(); + (*newfont) = (*currentfont); + newfont->SetName(fntname); + newfont = m_pGlobalRecs->AddFont(newfont); + newxf->SetFont(newfont); + } + else + { + font_t* fntnew = new font_t; + (*fntnew) = (*currentfont); + fntnew->SetName(fntname); + fntnew = m_pGlobalRecs->ReplaceFont(currentfont, fntnew); + newxf->SetFont(fntnew) ; + } + if(samexf) + { + newxf = m_pGlobalRecs->ReplaceXFormat(xfbackup, newxf); + pxf = newxf; + pxf->MarkUsed(); + } + else + { + newxf = m_pGlobalRecs->AddXFormat(newxf); + pxf = newxf; + pxf->MarkUsed(); + } + delete xfbackup; +*/ +} + + + + +void cell_t::fontheight(unsigned16_t fntheight) +{ + SET_CELL_FONT_FUNCTION(SetHeight,fntheight); +} + +void cell_t::fontbold(boldness_option_t fntboldness) +{ +/* + bool samexf = true; + + xf_t* currentxf = pxf; + if(pxf == NULL) + currentxf = m_pGlobalRecs->GetDefaultXF(); + + xf_t* xfbackup = new xf_t; + (*xfbackup) = (*currentxf); + + + xf_t* newxf = currentxf; + if(currentxf->Usage() > 1) + samexf = false; + + newxf = new xf_t(); + (*newxf) = (*currentxf); + + font_t* currentfont = newxf->GetFont(); + if(currentfont == NULL) + currentfont = m_pGlobalRecs->GetDefaultFont(); + if(currentfont->Usage() > 1) + { + font_t* newfont = new font_t(); + (*newfont) = (*currentfont); + newfont->SetBoldStyle(fntboldness); + newfont = m_pGlobalRecs->AddFont(newfont); + newxf->SetFont(newfont); + + } + else + { + font_t* fntnew = new font_t; + (*fntnew) = (*currentfont); + fntnew->SetBoldStyle(fntboldness); + fntnew = m_pGlobalRecs->ReplaceFont(currentfont, fntnew); + newxf->SetFont(fntnew) ; + } + + if(samexf) + { + newxf = m_pGlobalRecs->ReplaceXFormat(xfbackup, newxf); + pxf = newxf; + } + else + { + newxf = m_pGlobalRecs->AddXFormat(newxf); + pxf = newxf; + pxf->MarkUsed(); + } + + + delete xfbackup; +*/ + SET_CELL_FONT_FUNCTION(SetBoldStyle,fntboldness); +} + +void cell_t::fontunderline(underline_option_t fntunderline) +{ + SET_CELL_FONT_FUNCTION(SetUnderlineStyle,fntunderline); +} + +void cell_t::fontscript(script_option_t fntscript) +{ + SET_CELL_FONT_FUNCTION(SetScriptStyle,fntscript); +} + +void cell_t::fontcolor(color_name_t fntcolor) +{ + SET_CELL_FONT_FUNCTION(SetColor,fntcolor); +} + +void cell_t::fontattr(unsigned16_t attr) +{ + SET_CELL_FONT_FUNCTION(SetAttributes,attr); +} + +void cell_t::fontitalic(bool italic) +{ + SET_CELL_FONT_FUNCTION(SetItalic,italic); +} + +void cell_t::fontstrikeout(bool so) +{ + SET_CELL_FONT_FUNCTION(SetStrikeout,so); +} + +void cell_t::fontoutline(bool ol) +{ + SET_CELL_FONT_FUNCTION(SetOutline,ol); +} + +void cell_t::fontshadow(bool sh) +{ + SET_CELL_FONT_FUNCTION(SetShadow,sh); +} + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: cell.cpp,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:54 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/cell.h b/uppdev/XLS/cell.h new file mode 100644 index 000000000..6c4b5707e --- /dev/null +++ b/uppdev/XLS/cell.h @@ -0,0 +1,174 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/cell.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#ifndef CELL_H +#define CELL_H + +#include +#include + +#include +#include +#include + +namespace xlslib_core +{ + + class cell_t + : public xf_i , public font_i + { + public: + cell_t(); + virtual ~cell_t(); + unsigned16_t GetXFIndex(void); + unsigned16_t GetRow(void){return row;}; + unsigned16_t GetCol(void){return col;}; + + void SetXF(xf_t* pxfval){pxf = pxfval;}; + xf_t* GetXF(void){return pxf;}; + + virtual unsigned16_t GetSize() = 0; + virtual CUnit* GetData() = 0; + /* + bool operator<(const cell_t& right) const; + bool operator>(const cell_t& right) const; + bool operator%(const cell_t& right) const; + */ + bool operator==(const cell_t& right) const; + bool operator!=(const cell_t& right) const; + + void SetGlobalRecs(CGlobalRecords* pglobalr) {m_pGlobalRecs = pglobalr;}; + private: + CGlobalRecords *m_pGlobalRecs; + + protected: + unsigned16_t row; + unsigned16_t col; + + xf_t* pxf; + public: // xf_i interface + void font(font_t* fontidx); + void format(format_number_t formatidx); + void halign(halign_option_t ha_option); + void valign(valign_option_t va_option); + void indent(indent_option_t indent_option); + void orientation(txtori_option_t ori_option); + void fillfgcolor(color_name_t color); + void fillbgcolor(color_name_t color); + void fillstyle(fill_option_t fill); + void locked(bool locked_opt); + void hidden(bool hidden_opt); + void wrap(bool wrap_opt); + void borderstyle(border_side_t side, + border_style_t style, + color_name_t color); + public: //font_i interface + void fontname(std::string fntname); + void fontheight(unsigned16_t fntheight); + void fontbold(boldness_option_t fntboldness); + void fontunderline(underline_option_t fntunderline); + void fontscript(script_option_t fntscript); + void fontcolor(color_name_t fntcolor); + void fontattr(unsigned16_t attr); + void fontitalic(bool italic); + void fontstrikeout(bool so); + void fontoutline(bool ol); + void fontshadow(bool sh); + }; + + // #ifdef WIN32 + // A bug in the compiler doesn't allow to use the functor direcly + // with the list::sort() function + // template<> + // struct std::greater : public binary_function + // { + // public: + // bool operator()(cell_t* &a, cell_t* &b) + // { + // return (a->GetRow() < b->GetRow()); + // }; + // }; + // + // + // + // struct rowsort: public greater + // { + // public: + // bool operator()(cell_t* &a, cell_t* &b) const + // { + // return (a->GetRow() < b->GetRow()); + // }; + // }; + // #endif + + struct rowsort + { + public: +bool operator()(cell_t* &a, cell_t* &b) const + { + return (a->GetRow() < b->GetRow() ? true : false); + }; + }; + + class insertsort + { + public: + bool operator()(cell_t* a, cell_t* b) const + { + unsigned32_t aval = 100000*(a->GetRow()) + a->GetCol(); + unsigned32_t bval = 100000*(b->GetRow()) + b->GetCol(); + + return (aval < bval ? true : false); + }; + }; + + + typedef std::set Cell_List_t; + typedef Cell_List_t::iterator Cell_List_Itor_t; + + +} + +#endif // CELL_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: cell.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:47 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + diff --git a/uppdev/XLS/colinfo.cpp b/uppdev/XLS/colinfo.cpp new file mode 100644 index 000000000..e78401cf1 --- /dev/null +++ b/uppdev/XLS/colinfo.cpp @@ -0,0 +1,74 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/colinfo.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include + +using namespace std; +using namespace xlslib_core; + + +CColInfo::CColInfo(colinfo_t* newci) +{ + SetRecordType(RECTYPE_COLINFO); + + AddValue16(newci->colfirst); + AddValue16(newci->collast); + AddValue16(newci->width); + + // TODO: Mark the XFormat as used + if(newci->xformat != NULL) + AddValue16(newci->xformat->GetIndex()); + else + AddValue16(0x0000); + + AddValue16(newci->flags); + + SetRecordLength(GetDataSize()-4); +} + +CColInfo::~CColInfo() +{ + +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: colinfo.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/colinfo.h b/uppdev/XLS/colinfo.h new file mode 100644 index 000000000..6979bc230 --- /dev/null +++ b/uppdev/XLS/colinfo.h @@ -0,0 +1,87 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/colinfo.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef COLINFO_H +#define COLINFO_H + +#include +#include +#include +#include + +namespace xlslib_core +{ + + typedef struct + { + unsigned16_t colfirst; + unsigned16_t collast; + unsigned16_t width; + xf_t* xformat; + unsigned16_t flags; + } colinfo_t; + + struct colinfosort + { + public: +bool operator()(colinfo_t* const &a, colinfo_t* const &b) const + { + return (a->colfirst < b->colfirst); + }; + }; + + + typedef std::set Colinfo_List_t; + typedef Colinfo_List_t::iterator Colinfo_List_Itor_t; + + class CColInfo: public CRecord + { + public: + CColInfo(colinfo_t* newci); + ~CColInfo(); + }; + +} + +#endif //COLINFO_H +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: colinfo.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/colors.h b/uppdev/XLS/colors.h new file mode 100644 index 000000000..c8d4af373 --- /dev/null +++ b/uppdev/XLS/colors.h @@ -0,0 +1,143 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/colors.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +#ifndef COLORS_H +#define COLORS_H + +namespace xlslib_core +{ + + +#define COLOR_CODE_BLACK (0x08) +#define COLOR_CODE_DARK_RED (0x10) +#define COLOR_CODE_RED (0x0a) +#define COLOR_CODE_FUCSIA (0x0e) +#define COLOR_CODE_COMBINED01 (0x2d) +#define COLOR_CODE_COMBINED02 (0x3c) +#define COLOR_CODE_COMBINED03 (0x35) +#define COLOR_CODE_COMBINED04 (0x34) +#define COLOR_CODE_COMBINED05 (0x33) +#define COLOR_CODE_COMBINED06 (0x2f) +#define COLOR_CODE_OLIVE (0x3b) +#define COLOR_CODE_DARK_YELLOW (0x13) +#define COLOR_CODE_COMBINED07 (0x32) +#define COLOR_CODE_YELLOW (0x0d) +#define COLOR_CODE_LIGHT_YELLOW (0x2b) +#define COLOR_CODE_DARK_GREEN (0x3a) +#define COLOR_CODE_GREEN (0x11) +#define COLOR_CODE_COMBINED08 (0x39) +#define COLOR_CODE_LIVING_GREEN (0x0b) +#define COLOR_CODE_LIGHT_GREEN (0x2a) +#define COLOR_CODE_COMBINED09 (0x38) +#define COLOR_CODE_BLUE_GREEN (0x15) +#define COLOR_CODE_AQUAMARINA (0x31) +#define COLOR_CODE_TURQOISE (0x0f) +#define COLOR_CODE_COMBINED10 (0x29) +#define COLOR_CODE_DARK_BLUE (0x12) +#define COLOR_CODE_BLUE (0x0c) +#define COLOR_CODE_LIGHT_BLUE (0x30) +#define COLOR_CODE_SKY_BLUE (0x28) +#define COLOR_CODE_COMBINED11 (0x2c) +#define COLOR_CODE_INDIGO (0x3e) +#define COLOR_CODE_BLUE_GRAY (0x36) +#define COLOR_CODE_VIOLET (0x14) +#define COLOR_CODE_PLUM (0x3d) +#define COLOR_CODE_LAVANDER (0x2e) +#define COLOR_CODE_COMBINED12 (0x3f) +#define COLOR_CODE_GRAY50 (0x17) +#define COLOR_CODE_GRAY40 (0x37) +#define COLOR_CODE_GRAY25 (0x16) +#define COLOR_CODE_WHITE (0x09) + + typedef enum + { + COLOR_BLACK, + COLOR_DARK_RED, + COLOR_RED, + COLOR_FUCSIA, + COLOR_COMBINED01, + COLOR_COMBINED02, + COLOR_COMBINED03, + COLOR_COMBINED04, + COLOR_COMBINED05, + COLOR_COMBINED06, + COLOR_OLIVE, + COLOR_DARK_YELLOW, + COLOR_COMBINED07, + COLOR_YELLOW, + COLOR_LIGHT_YELLOW, + COLOR_DARK_GREEN, + COLOR_GREEN, + COLOR_COMBINED08, + COLOR_LIVING_GREEN, + COLOR_LIGHT_GREEN, + COLOR_COMBINED09, + COLOR_BLUE_GREEN, + COLOR_AQUAMARINA, + COLOR_TURQOISE, + COLOR_COMBINED10, + COLOR_DARK_BLUE, + COLOR_BLUE, + COLOR_LIGHT_BLUE, + COLOR_SKY_BLUE, + COLOR_COMBINED11, + COLOR_INDIGO, + COLOR_BLUE_GRAY, + COLOR_VIOLET, + COLOR_PLUM, + COLOR_LAVANDER, + COLOR_COMBINED12, + COLOR_GRAY50, + COLOR_GRAY40, + COLOR_GRAY25, + COLOR_WHITE + }color_name_t; + +} + +#endif //COLORS_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: colors.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:44 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/common.h b/uppdev/XLS/common.h new file mode 100644 index 000000000..6601014b7 --- /dev/null +++ b/uppdev/XLS/common.h @@ -0,0 +1,91 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/common.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef COMMON_H +#define COMMON_H + +#include +#include +#include +#include + +#include + +#ifdef HAVE_ICONV +#include +#endif + +namespace xlslib_core +{ + + // Some typedefs used only by xlslib core + typedef struct + { + unsigned16_t first_row; + unsigned16_t last_row; + + unsigned16_t first_col; + unsigned16_t last_col; + + } range_t; + + +#if defined(_MSC_VER) && defined(WIN32) + typedef std::list Range_List_t; + typedef Range_List_t::iterator Range_List_Itor_t; + + class range; + typedef std::list RangeObj_List_t; + typedef RangeObj_List_t::iterator RangeObj_List_Itor_t; + +#else + typedef std::list Range_List_t; + typedef Range_List_t::iterator Range_List_Itor_t; + + class range; + typedef std::list RangeObj_List_t; + typedef RangeObj_List_t::iterator RangeObj_List_Itor_t; +#endif +} +#endif //COMMON_H +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: common.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:57 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/config.h b/uppdev/XLS/config.h new file mode 100644 index 000000000..1eeffacbc --- /dev/null +++ b/uppdev/XLS/config.h @@ -0,0 +1,98 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/common/config.h,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef CONFIG_H +#define CONFIG_H + +#ifdef HAVE_CONFIG_H +#include + +#define CFG_TRUE 1 +#define CFG_FALSE 0 + +#define ALLOCATOR_STL 0 +#define ALLOCATOR_BTI 1 + + +#if defined(USE_BTI_ALLOC) +# define ALLOCATOR_DFLT ALLOCATOR_BTI +#elif defined(ALLOC_BTI) +# define ALLOCATOR_DFLT ALLOCATOR_STL +#else +# define ALLOCATOR_DFLT ALLOCATOR_STL +#endif + + +#else // HAVE_CONFIG_H + +#if defined(_MSC_VER) && defined(WIN32) +// Fakes the inclusion of crtdbg.h to avoid duplicated symbols +// of (inlined) new() and delete() operators +#define _INC_CRTDBG +#else +#endif + +#define CFG_TRUE 1 +#define CFG_FALSE 0 + +#define ALLOCATOR_STL 0 +#define ALLOCATOR_BTI 1 + + +#if defined(ALLOC_STL) +# define ALLOCATOR_DFLT ALLOCATOR_STL +#elif defined(ALLOC_BTI) +# define ALLOCATOR_DFLT ALLOCATOR_BTI +#else +# define ALLOCATOR_DFLT ALLOCATOR_STL +#endif + + +#endif // HAVE_CONFIG_H + +#endif //CONFIG_H +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: config.h,v $ + * Revision 1.3 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:04 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:32:05 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/continue.cpp b/uppdev/XLS/continue.cpp new file mode 100644 index 000000000..164b9f266 --- /dev/null +++ b/uppdev/XLS/continue.cpp @@ -0,0 +1,68 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/continue.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +/* +****************************** +CContinue class implementation +****************************** +*/ + +using namespace std; +using namespace xlslib_core; + + +CContinue::CContinue(unsigned8_t* data, unsigned32_t size) +{ + SetRecordType(RECTYPE_CONTINUE ); + AddDataArray(data,size); + + SetRecordLength(GetDataSize()-4); +} + +CContinue::~CContinue() +{} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: continue.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:53 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/continue.h b/uppdev/XLS/continue.h new file mode 100644 index 000000000..f90bc7846 --- /dev/null +++ b/uppdev/XLS/continue.h @@ -0,0 +1,72 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/continue.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef CONTINUE_H +#define CONTINUE_H + +#include +#include +#include + +namespace xlslib_core +{ + + + class CContinue: public CRecord + { + protected: + + public: + + CContinue(unsigned8_t* data, unsigned32_t size); + ~CContinue(); + + + + }; +} + +#endif //CONTINUE_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: continue.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/crc.cpp b/uppdev/XLS/crc.cpp new file mode 100644 index 000000000..77a5c109c --- /dev/null +++ b/uppdev/XLS/crc.cpp @@ -0,0 +1,254 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/crc.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + + +#include + +using namespace std; +using namespace xlslib_core; + +/* + * Derive parameters from the standard-specific parameters in crc.h. + */ +#define WIDTH (8 * sizeof(crc32_t)) +#define TOPBIT (1 << (WIDTH - 1)) + +#if REFLECT_DATA == TRUE +#undef REFLECT_DATA +#define REFLECT_DATA(X) ((unsigned char) reflect((X), 8)) +#else +#undef REFLECT_DATA +#define REFLECT_DATA(X) (X) +#endif + +#if REFLECT_REMAINDER == TRUE +#undef REFLECT_REMAINDER +#define REFLECT_REMAINDER(X) ((crc32_t) reflect((X), WIDTH)) +#else +#undef REFLECT_REMAINDER +#define REFLECT_REMAINDER(X) (X) +#endif + +/* + const crc32_t crc::CRC_CCITT_TABLE[256] = + { + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, + 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, + 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, + 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, + 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, + 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, + 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, + 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, + 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, + 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, + 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, + 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, + 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, + 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0, + }; + + + const crc32_t crc::CRC_16_TABLE[256] = + { + 0x0000, 0x8005, 0x800f, 0x000a, 0x801b, 0x001e, 0x0014, 0x8011, 0x8033, 0x0036, 0x003c, 0x8039, 0x0028, 0x802d, 0x8027, 0x0022, + 0x8063, 0x0066, 0x006c, 0x8069, 0x0078, 0x807d, 0x8077, 0x0072, 0x0050, 0x8055, 0x805f, 0x005a, 0x804b, 0x004e, 0x0044, 0x8041, + 0x80c3, 0x00c6, 0x00cc, 0x80c9, 0x00d8, 0x80dd, 0x80d7, 0x00d2, 0x00f0, 0x80f5, 0x80ff, 0x00fa, 0x80eb, 0x00ee, 0x00e4, 0x80e1, + 0x00a0, 0x80a5, 0x80af, 0x00aa, 0x80bb, 0x00be, 0x00b4, 0x80b1, 0x8093, 0x0096, 0x009c, 0x8099, 0x0088, 0x808d, 0x8087, 0x0082, + 0x8183, 0x0186, 0x018c, 0x8189, 0x0198, 0x819d, 0x8197, 0x0192, 0x01b0, 0x81b5, 0x81bf, 0x01ba, 0x81ab, 0x01ae, 0x01a4, 0x81a1, + 0x01e0, 0x81e5, 0x81ef, 0x01ea, 0x81fb, 0x01fe, 0x01f4, 0x81f1, 0x81d3, 0x01d6, 0x01dc, 0x81d9, 0x01c8, 0x81cd, 0x81c7, 0x01c2, + 0x0140, 0x8145, 0x814f, 0x014a, 0x815b, 0x015e, 0x0154, 0x8151, 0x8173, 0x0176, 0x017c, 0x8179, 0x0168, 0x816d, 0x8167, 0x0162, + 0x8123, 0x0126, 0x012c, 0x8129, 0x0138, 0x813d, 0x8137, 0x0132, 0x0110, 0x8115, 0x811f, 0x011a, 0x810b, 0x010e, 0x0104, 0x8101, + 0x8303, 0x0306, 0x030c, 0x8309, 0x0318, 0x831d, 0x8317, 0x0312, 0x0330, 0x8335, 0x833f, 0x033a, 0x832b, 0x032e, 0x0324, 0x8321, + 0x0360, 0x8365, 0x836f, 0x036a, 0x837b, 0x037e, 0x0374, 0x8371, 0x8353, 0x0356, 0x035c, 0x8359, 0x0348, 0x834d, 0x8347, 0x0342, + 0x03c0, 0x83c5, 0x83cf, 0x03ca, 0x83db, 0x03de, 0x03d4, 0x83d1, 0x83f3, 0x03f6, 0x03fc, 0x83f9, 0x03e8, 0x83ed, 0x83e7, 0x03e2, + 0x83a3, 0x03a6, 0x03ac, 0x83a9, 0x03b8, 0x83bd, 0x83b7, 0x03b2, 0x0390, 0x8395, 0x839f, 0x039a, 0x838b, 0x038e, 0x0384, 0x8381, + 0x0280, 0x8285, 0x828f, 0x028a, 0x829b, 0x029e, 0x0294, 0x8291, 0x82b3, 0x02b6, 0x02bc, 0x82b9, 0x02a8, 0x82ad, 0x82a7, 0x02a2, + 0x82e3, 0x02e6, 0x02ec, 0x82e9, 0x02f8, 0x82fd, 0x82f7, 0x02f2, 0x02d0, 0x82d5, 0x82df, 0x02da, 0x82cb, 0x02ce, 0x02c4, 0x82c1, + 0x8243, 0x0246, 0x024c, 0x8249, 0x0258, 0x825d, 0x8257, 0x0252, 0x0270, 0x8275, 0x827f, 0x027a, 0x826b, 0x026e, 0x0264, 0x8261, + 0x0220, 0x8225, 0x822f, 0x022a, 0x823b, 0x023e, 0x0234, 0x8231, 0x8213, 0x0216, 0x021c, 0x8219, 0x0208, 0x820d, 0x8207, 0x0202, + }; +*/ + +const crc32_t crc::CRC_32_TABLE[256] = +{ + 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, + 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, + 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, + 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, + 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, + 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, + 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, + 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, + 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, + 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, + 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, + 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, + 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, + 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, + 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, + 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 +}; + + +crc::~crc() +{ + +} + +/********************************************************************* + * + * Function: reflect() + * + * Description: Reorder the bits of a binary sequence, by reflecting + * them about the middle position. + * + * Notes: No checking is done that nBits <= 32. + * + * Returns: The reflection of the original data. + * + *********************************************************************/ +unsigned32_t +crc::reflect(unsigned32_t data, unsigned char nBits) +{ + unsigned32_t reflection = 0x00000000; + unsigned char bit; + + /* + * Reflect the data about the center bit. + */ + for (bit = 0; bit < nBits; ++bit) + { + /* + * If the LSB bit is set, set the reflection of it. + */ + if (data & 0x01) + { + reflection |= (1 << ((nBits - 1) - bit)); + } + + data = (data >> 1); + } + + return (reflection); + +} /* reflect() */ + + + + + + + +/********************************************************************* + * + * Function: crcInit() + * + * Description: Populate the partial CRC lookup table. + * + * Notes: This function must be rerun any time the CRC standard + * is changed. If desired, it can be run "offline" and + * the table results stored in an embedded system's ROM. + * + * Returns: None defined. + * + *********************************************************************/ +crc::crc() +{ + +} /* crcInit() */ + + +/********************************************************************* + * + * Function: crcFast() + * + * Description: Compute the CRC of a given message. + * + * Notes: crcInit() must be called first. + * + * Returns: The CRC of the message. + * + *********************************************************************/ +crc32_t +crc::get(string& message) +{ + + unsigned char data; + size_t byte; + + crc32_t remainder = INITIAL_REMAINDER; + /* + * Divide the message by the polynomial, a byte at a time. + */ + size_t nBytes = message.size(); + for (byte = 0; byte < nBytes; ++byte) + { + data = (unsigned char)(REFLECT_DATA(message[byte]) ^ (remainder >> (WIDTH - 8))); + remainder = crc::CRC_32_TABLE[data] ^ (remainder << 8); + } + + /* + * The final remainder is the CRC. + */ + return (REFLECT_REMAINDER(remainder) ^ FINAL_XOR_VALUE); + +} /* crcFast() */ + + +crc32_t +crc::get() +{ + return get(m_data); +} + + +string& crc::getdata() +{ + return m_data; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: crc.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:53 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/crc.h b/uppdev/XLS/crc.h new file mode 100644 index 000000000..54840e2dd --- /dev/null +++ b/uppdev/XLS/crc.h @@ -0,0 +1,104 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/crc.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef _crc_h +#define _crc_h + +#include + +#include +#include +#include + +#define FALSE 0 +#define TRUE !FALSE + +/* + * Select the CRC standard from the list that follows. + */ +#define CRC32 + +#define CRC_NAME "CRC-32" + +#define POLYNOMIAL 0x04C11DB7 +#define INITIAL_REMAINDER 0xFFFFFFFF +#define FINAL_XOR_VALUE 0xFFFFFFFF +#define REFLECT_DATA TRUE +#define REFLECT_REMAINDER TRUE +#define CHECK_VALUE 0xCBF43926 + +namespace xlslib_core +{ + + typedef unsigned32_t crc32_t; + + class crc + { + public: + crc(); + ~crc(); + + crc32_t get(std::string& message); + crc32_t get(); + + void operator<<(std::string newstr) { m_data += newstr; } + void operator<<(unsigned32_t newdata) { m_data += str_stream(newdata); } + void operator<<(unsigned64_t newdata) { m_data += str_stream(newdata); } + void operator<<(unsigned char newdata) { m_data += str_stream(newdata); } + void operator<<(unsigned short newdata) { m_data += str_stream(newdata); } + void operator<<(bool newdata) { m_data += str_stream(newdata); } + void operator<<(double newdata) { m_data += str_stream(newdata); } + + std::string& getdata(); + private: + std::string m_data; + static const crc32_t CRC_32_TABLE[256]; + unsigned32_t reflect(unsigned32_t data, unsigned char nBits); + }; + +} + +#endif /* _crc_h */ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: crc.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/data/data3.h b/uppdev/XLS/data/data3.h new file mode 100644 index 000000000..f3e84f815 --- /dev/null +++ b/uppdev/XLS/data/data3.h @@ -0,0 +1,314 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/data/data3.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef DATA3_H +#define DATA3_H + +// 4096 of the first bytes + +const unsigned8_t xlslib_core::CSummaryInfo::summ_info_data[] = { + 0xfe, 0xff, 0x00, 0x00, 0x05, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x85, 0x9f, 0xf2, + 0xf9, 0x4f, 0x68, 0x10, 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9, 0x30, 0x00, 0x00, 0x00, + 0xfc, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, + 0x0d, 0x00, 0x00, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x58, 0x4c, 0x53, 0x4c, 0x49, 0x42, 0x20, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x00, 0x73, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x58, 0x4c, 0x53, 0x4c, 0x69, 0x62, 0x20, 0x76, + 0x58, 0x2e, 0x58, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x59, 0x65, 0x69, 0x63, + 0x6f, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0d, 0x0a, 0x77, 0x77, 0x77, 0x2e, + 0x79, 0x65, 0x69, 0x63, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x0d, 0x0a, 0x00, 0x1e, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x44, 0x61, 0x72, 0x69, 0x6f, 0x20, 0x47, 0x6f, 0x6e, 0x7a, 0x61, 0x6c, + 0x65, 0x7a, 0x00, 0x0a, 0x1e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x45, 0x78, 0x63, 0x65, 0x6c, 0x00, 0x40, 0x00, 0x00, 0x00, + 0x80, 0x7f, 0x5b, 0x0d, 0xb9, 0xa0, 0xc3, 0x01, 0x40, 0x00, 0x00, 0x00, 0x80, 0xd2, 0xc0, 0xa4, + 0xb9, 0xa0, 0xc3, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + // Master blocks + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +#endif //DATA3_H + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: data3.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:59 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/data/data4.h b/uppdev/XLS/data/data4.h new file mode 100644 index 000000000..65db5f181 --- /dev/null +++ b/uppdev/XLS/data/data4.h @@ -0,0 +1,315 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/data/data4.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef DATA4_H +#define DATA4_H + + +//////////////////////////////////////////////////////////////////////// + +const unsigned8_t xlslib_core::CDocSummaryInfo::doc_summ_info_data[] = { + 0xfe, 0xff, 0x00, 0x00, 0x05, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0xd5, 0xcd, 0xd5, + 0x9c, 0x2e, 0x1b, 0x10, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae, 0x30, 0x00, 0x00, 0x00, + 0x98, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe4, 0x04, 0x00, 0x00, + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x69, 0x63, 0x72, 0x0b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x10, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x48, 0x6f, 0x6a, 0x61, 0x31, 0x00, 0x0c, 0x10, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x48, 0x6f, + 0x6a, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x63, 0xe1, 0x6c, 0x63, 0x75, 0x6c, 0x6f, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + + +#endif //DATA4_H + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + * $Log: data4.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:59 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + diff --git a/uppdev/XLS/datast.cpp b/uppdev/XLS/datast.cpp new file mode 100644 index 000000000..c6d0f8592 --- /dev/null +++ b/uppdev/XLS/datast.cpp @@ -0,0 +1,89 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/datast.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include + +namespace xlslib_core +{ + +/* +*********************************** +CDataStorage class Implementation +*********************************** +*/ + + CDataStorage::CDataStorage() + :m_DataSize(0) + { + + } + + CDataStorage::~CDataStorage() + { + // Delete all the data. (Only if it exists) + if(!empty()) + { + do + { + delete front(); + pop_front(); + + }while(!empty()); + } + } + + + void CDataStorage::operator+=(CUnit* from) + { + push_back(from); + m_DataSize += from->GetDataSize(); + + } + + unsigned32_t CDataStorage::GetDataSize() + { + return m_DataSize; + } +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: datast.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/datast.h b/uppdev/XLS/datast.h new file mode 100644 index 000000000..3e7a4e883 --- /dev/null +++ b/uppdev/XLS/datast.h @@ -0,0 +1,84 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/datast.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + + +#ifndef DATAST_H +#define DATAST_H + +#include +#include +#include + +/* +****************************** +COleFile class declaration +****************************** +*/ + +namespace xlslib_core +{ + + typedef std::list DataList_t; + typedef DataList_t::iterator DataList_Itor_t; + + class CDataStorage: public DataList_t + { + private: + unsigned32_t m_DataSize; + + protected: + + + public: + CDataStorage ( ); + ~CDataStorage ( ); + + void operator+=(CUnit* from); + unsigned32_t GetDataSize(); + + }; +} +#endif //DATAST_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: datast.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:54 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/docsumminfo.cpp b/uppdev/XLS/docsumminfo.cpp new file mode 100644 index 000000000..542b3dbc2 --- /dev/null +++ b/uppdev/XLS/docsumminfo.cpp @@ -0,0 +1,85 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/docsumminfo.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include // Temporarilly used to add data for summary info + +using namespace std; +using namespace xlslib_core; + +/* +********************************************************************** +CDocSummaryInfo class implementation +********************************************************************** +*/ + +CDocSummaryInfo::CDocSummaryInfo() +{ + XTRACE("WRITE_DOC_SUMMARY"); + + CUnit* ptraildata = new CUnit; + ptraildata->AddDataArray(CDocSummaryInfo::doc_summ_info_data, sizeof(CDocSummaryInfo::doc_summ_info_data)); + (*this) += ptraildata; +} + +CDocSummaryInfo::~CDocSummaryInfo() +{ + + +} + + +/* +*********************************** +*********************************** +*/ + +CUnit* CDocSummaryInfo::DumpData(void) +{ + + XTRACE("CDocSummaryInfo::DumpData"); + return (CUnit*)this; +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: docsumminfo.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/docsumminfo.h b/uppdev/XLS/docsumminfo.h new file mode 100644 index 000000000..63ef32d03 --- /dev/null +++ b/uppdev/XLS/docsumminfo.h @@ -0,0 +1,78 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright (C) Yeico S. A. de C. V. + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/docsumminfo.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef DOCSUMMARYINFO_H +#define DOCSUMMARYINFO_H + +#include +#include +#include + + +namespace xlslib_core +{ + + /* +******************************** +CDocSummaryInfo class declaration +******************************** +*/ + + + class CDocSummaryInfo: public CDataStorage + { + private: + static const unsigned8_t doc_summ_info_data[]; + + protected: + + public: + CDocSummaryInfo(); + ~CDocSummaryInfo(); + + CUnit* DumpData(); + + }; + +} +#endif //DOCSUMMARYINFO_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: docsumminfo.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:54 darioglz + * Initial Import. + * + * Revision 1.6 2004/04/06 22:35:43 dgonzalez + * + Added namespace xlslib_core to isolate the core xlslib library names. + * + * Revision 1.5 2004/01/29 03:18:55 dgonzalez + * + Using the config.h file + * + * Revision 1.4 2003/12/05 00:30:06 dgonzalez + * + Common include files were placed in common.h (and this file was + * included instead. + * + * Revision 1.3 2003/11/26 16:49:26 dgonzalez + * + Indented and untabified + * + * Revision 1.2 2003/10/24 23:24:32 dgonzalez + * + Added CVS-Keyword substitution. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/uppdev/XLS/extformat.cpp b/uppdev/XLS/extformat.cpp new file mode 100644 index 000000000..a7be2f254 --- /dev/null +++ b/uppdev/XLS/extformat.cpp @@ -0,0 +1,1363 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/extformat.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include + +/* +********************************** +CExtFormat class implementation +********************************** +*/ + +using namespace std; +using namespace xlslib_core; + + +CExtFormat::CExtFormat(bool is_cell) +{ + SetRecordType(RECTYPE_XF); + InitDummy(is_cell); + SetRecordLength(GetDataSize()-4); +} + +CExtFormat::CExtFormat(xf_t* xfdef) +{ + SetRecordType(RECTYPE_XF); + InitDummy(xfdef->IsCell()); + SetRecordLength(GetDataSize()-4); + +// Here initialize the record with the values from the input structure + + SetFontIndex(xfdef->GetFontIndex()); + SetFormatIndex(xfdef->GetFormatIndex()); + SetHorizAlign(xfdef->GetHAlign()); + SetVertAlign(xfdef->GetVAlign()); + SetIndent(xfdef->GetIndent()); + SetTxtOrientation(xfdef->GetTxtOrientation()); + + SetFGColorIndex(xfdef->GetFillFGColor()); + SetBGColorIndex(xfdef->GetFillBGColor()); + SetFillPattern(xfdef->GetFillStyle()); + + if(xfdef->IsLocked()) SetLocked(); + if(xfdef->IsHidden()) SetHidden(); + if(xfdef->IsWrap()) SetWrap(); + + SetBorder(BORDER_BOTTOM, xfdef->GetBorderStyle(BORDER_BOTTOM), + xfdef->GetBorderColor(BORDER_BOTTOM)); + SetBorder(BORDER_TOP, xfdef->GetBorderStyle(BORDER_TOP), + xfdef->GetBorderColor(BORDER_TOP)); + SetBorder(BORDER_LEFT, xfdef->GetBorderStyle(BORDER_LEFT), + xfdef->GetBorderColor(BORDER_LEFT)); + SetBorder(BORDER_RIGHT, xfdef->GetBorderStyle(BORDER_RIGHT), + xfdef->GetBorderColor(BORDER_RIGHT)); +} + +CExtFormat::~CExtFormat() +{ +} + + +/* +********************************** +********************************** +*/ +void CExtFormat::InitDummy(bool is_cell) +{ + + // An style-XF record is set by default. + // Each field has to be modified individually before use it + + //The default style is a dummy. The flags that indicate what the style affects (byte 11) + // are disabled (set to 1). + unsigned8_t xfdefault[] = { + +#if VERSION_BIFF == VERSION_BIFF5 +/* + Open Office offsets + 0 2 4 6 8 10 12 14 16 18 20 + 0x00,0x00,0x00,0x00,0xf4,0xff,0x20,0xf0,0xc0,0x00,0x01,0x00,0x00,0x00,0x00,0x00 <- ORIGINAL +*/ + 0x00,0x00,0x00,0x00,0xf4,0xff,0x20,0xf0,0xc0,0x20,0x01,0x00,0x00,0x00,0x00,0x00, + // STYLE_XF | INDEX=0xFFF -> Style + // HALIGN -> General, VALIGN -> BOTTOM + // IGNORE TOP 4 bits (style issue) + // 0x40 Pattern Color, then lowest bit of 0x41 (next) + // 0x41 Pattern background color right shifted one bit + // Fill Pattern -> 1 Black (well, fully colored, not a pattern) + +#else + 0x00,0x00,0x00,0x00,0xf4,0xff,0x20,0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xc0,0x20 + // STYLE_XF | INDEX=0xFFF -> Style + // HALIGN -> General, VALIGN -> BOTTOM + // IGNORE TOP 4 bits (style issue) + // Fill Pattern -> 1 Black, left shifted 2 bits + // 0x40 Pattern Color, then lowest bit of 0x41 (next) + // 0x41 Pattern background color right shifted one bit +#endif + + }; + + AddDataArray(xfdefault, sizeof(xfdefault)); + + if(is_cell) + { + unsigned16_t value; + + // Get the field where options are set + GetValue16From((signed16_t*)&value, XF_OFFSET_PROP); + // Set the cell's style parent to Normal + value &= (~XF_PROP_XFPARENT); + // Set the style = cell. + value &= (~XF_PROP_STYLE); + + SetValueAt((signed16_t)value, XF_OFFSET_PROP); + + // The cell doesn't heritage anything from its parent style + GetValue16From((signed16_t*)&value, XF_OFFSET_ALIGN); + + value &= (~(XF_ALIGN_ATRFONT|XF_ALIGN_ATRALC|XF_ALIGN_ATRBDR|XF_ALIGN_ATRPAT|XF_ALIGN_ATRPROT)); + SetValueAt((signed16_t)value, XF_OFFSET_ALIGN); + } +} + +/* +********************************** +********************************** +*/ +bool CExtFormat::IsCell() +{ + unsigned16_t val; + GetValue16From((signed16_t*)&val, XF_OFFSET_PROP); + + + return(val&XF_PROP_STYLE?true:false); + +} + +/* +********************************** +********************************** +*/ +void CExtFormat::SetFlag(unsigned16_t flag) +{ + + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_ALIGN); + + if(IsCell()) + { + // Cells indicate that a characteristic is not equal + // from its parent with the flag set. + value |= flag; + } + else + { + // Styles indicate that a characteristic is + // being implemented with the flag cleared. + value &= (~flag); + } + SetValueAt((signed16_t)value, XF_OFFSET_ALIGN); + +} + +/* +********************************** +********************************** +*/ +void CExtFormat::ClearFlag(unsigned16_t flag) +{ + + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_ALIGN); + + if(!IsCell()) + { + // Cells indicate that a characteristic is not equal + // from its parent with the flag set. + value |= flag; + } + else + { + // Styles indicate that a characteristic is + // being implemented with the flag cleared. + value &= (~flag); + } + SetValueAt((signed16_t)value, XF_OFFSET_ALIGN); + +} +/* +********************************** +********************************** +*/ +int CExtFormat::SetFontIndex(unsigned16_t fontindex) +{ + // Set the index value + int errcode = SetValueAt((signed16_t)fontindex, XF_OFFSET_FONT); + + // Set the related flag. + SetFlag(XF_ALIGN_ATRFONT); + + return errcode; +} + +/* +********************************** +********************************** +*/ +unsigned16_t CExtFormat::GetFontIndex(void) +{ + unsigned16_t fontval; + GetValue16From((signed16_t*)&fontval, XF_OFFSET_FONT); + + return(fontval); +} + +/* +********************************** +********************************** +*/ +int CExtFormat::SetFormatIndex(unsigned16_t formatindex) +{ + // Set the index value + int errcode = SetValueAt((signed16_t)formatindex, XF_OFFSET_FORMAT); + + // Set the related flag. + SetFlag(XF_ALIGN_ATRNUM); + + return errcode; +} + +/* +********************************** +********************************** +*/ +unsigned16_t CExtFormat::GetFormatIndex(void) +{ + unsigned16_t formatval; + GetValue16From((signed16_t*)&formatval, XF_OFFSET_FORMAT); + + return(formatval); +} + +/* +********************************** +********************************** +*/ +void CExtFormat::SetLocked() +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_PROP); + + value |= XF_PROP_LOCKED; + + SetValueAt((signed16_t)value, XF_OFFSET_PROP); + + SetFlag(XF_ALIGN_ATRPROT); +} + +/* +********************************** +********************************** +*/ +void CExtFormat::SetHidden() +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_PROP); + + value |= XF_PROP_HIDDEN; + + SetValueAt((signed16_t)value, XF_OFFSET_PROP); + + SetFlag(XF_ALIGN_ATRPROT); +} + + +/* +********************************** +********************************** +*/ +void CExtFormat::SetHorizAlign(unsigned8_t alignval) +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_ALIGN); + value = (value&(~XF_ALIGN_HORIZONTAL))|(alignval & XF_ALIGN_HORIZONTAL); + SetValueAt((signed16_t)value, XF_OFFSET_ALIGN); + + SetFlag(XF_ALIGN_ATRALC); +} + +/* +********************************** +********************************** +*/ +void CExtFormat::SetWrap() +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_ALIGN); + + value |= XF_ALIGN_WRAP; + + SetValueAt((signed16_t)value, XF_OFFSET_ALIGN); + + SetFlag(XF_ALIGN_ATRALC); +} +#if VERSION_BIFF == VERSION_BIFF8 +/* +********************************** +********************************** +*/ + +void CExtFormat::SetIndent(unsigned8_t indentval) +{ + unsigned32_t value, mask; + + + if(indentval & XF_INDENT_LVL) { + mask = XF_INDENT_LVL; + } else + if(indentval & XF_INDENT_SHRINK2FIT) { + mask = XF_INDENT_SHRINK2FIT; + } else + if(indentval & (XF_INDENT_CONTEXT|XF_INDENT_L2R|XF_INDENT_R2L)) { + mask = XF_INDENT_DIR; + } else { + mask = XF_INDENT_LVL | XF_INDENT_SHRINK2FIT | XF_INDENT_DIR; + } + + mask <<= XF_INDENT_SHIFTPOS; + + GetValue32From((signed32_t*)&value, XF_OFFSET_ALIGN); + + unsigned32_t indentval32 = (unsigned32_t)indentval << XF_INDENT_SHIFTPOS; // Place the option at the right bit position + value = (value&(~mask))|(indentval32 & mask); + + SetValueAt((signed32_t)value, XF_OFFSET_ALIGN); +} +#endif +/* +********************************** +********************************** +*/ +void CExtFormat::SetVertAlign(unsigned8_t alignval) +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_ALIGN); + unsigned16_t alignval16 = alignval << XF_ALIGN_SHIFTPOS_VALIGN; // Place the option at the right bit position + value = (value&(~XF_ALIGN_VERTICAL))|(alignval16 & XF_ALIGN_VERTICAL); + SetValueAt((signed16_t)value, XF_OFFSET_ALIGN); + + SetFlag(XF_ALIGN_ATRALC); +} + +/* +********************************** +********************************** +*/ +void CExtFormat::SetTxtOrientation(unsigned8_t alignval) +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_ALIGN); + unsigned16_t alignval16 = alignval << XF_ORI_SHIFTPOS; // Place the option at the right bit position + + value = (value&(~XF_ALIGN_ORIENTATION))|(alignval16 & XF_ALIGN_ORIENTATION); + SetValueAt((signed16_t)value, XF_OFFSET_ALIGN); +} + + +/* +********************************** +********************************** +*/ +void CExtFormat::SetFGColorIndex(unsigned8_t color) +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_COLOR); + + + // value = (value&(~XF_COLOR_FOREGROUND))|(color & XF_COLOR_FOREGROUND); + // Clear the field for Foreground color + value &= (~XF_COLOR_FOREGROUND); + // Set the new color + value |= (color & XF_COLOR_FOREGROUND); + + SetValueAt((signed16_t)value, XF_OFFSET_COLOR); + + SetFlag(XF_ALIGN_ATRPAT); + +} + +/* +********************************** +********************************** +*/ +void CExtFormat::SetBGColorIndex(unsigned8_t color) +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_COLOR); + unsigned16_t color16 = color << XF_COLOR_SHIFTPOS_BG; + +// value = (value&(~XF_COLOR_FOREGROUND))|(color16 & XF_COLOR_FOREGROUND); + // Clear the field for Foreground color + value &= (~XF_COLOR_BACKGROUND); + // Set the new color + value |= (color16 & XF_COLOR_BACKGROUND); + + + SetValueAt((signed16_t)value, XF_OFFSET_COLOR); + + SetFlag(XF_ALIGN_ATRPAT); +} + +/* +********************************** +********************************** +*/ +void CExtFormat::SetFillPattern(unsigned8_t pattern) +{ +#if VERSION_BIFF == VERSION_BIFF5 + unsigned16_t value; + GetValue16From((signed16_t*)&value, XF_OFFSET_BORDER0); + + value = (value&(~XF_BORDER_FILLPATTERN))|(pattern & XF_BORDER_FILLPATTERN); + SetValueAt((signed16_t)value, XF_OFFSET_BORDER0); + + SetFlag(XF_ALIGN_ATRPAT); +#else + unsigned32_t value, pattern32 = pattern; + GetValue32From((signed32_t*)&value, XF_OFFSET_BORDERB); + + value &= ~XF_BORDER_FILLPATTERN; + + pattern32 <<= XF_SHIFTPOS_FILLPATTERN; + value |= (pattern32 & XF_BORDER_FILLPATTERN); + SetValueAt((signed16_t)value, XF_OFFSET_BORDERB); + + SetFlag(XF_ALIGN_ATRPAT); +#endif +} + + +/* +********************************** +********************************** +*/ +void CExtFormat::SetBorder(border_side_t border, unsigned16_t style, unsigned16_t color) +{ + + switch(border) + { + + case BORDER_BOTTOM: + { +#if VERSION_BIFF == VERSION_BIFF5 + unsigned16_t value, color16 = color; + + GetValue16From((signed16_t*)&value, XF_OFFSET_BORDER0); + value = (value&(~XF_BORDER_BOTTOMSTYLE))| + ((style<= sizeof(unsigned64_t)) { +// xfcrc<<(unsigned64_t)font; +// } else { + xfcrc<<(unsigned64_t)font; +// } + xfcrc<<(unsigned32_t)format; + xfcrc<MarkUsed(); + +} + +/* +********************************** +********************************** +*/ +bool xf_t::IsUsed(void) +{ + return(m_usage_counter != 0); +} + +/* +********************************** +********************************** +*/ +void xf_t::SetFont(font_t* fontidx) +{ + if(fontidx != NULL) + fontidx->MarkUsed(); + font = fontidx; + + m_sigchanged = true; + +} + +font_t* xf_t::GetFont(void) +{ + return font; +} + +unsigned16_t xf_t::GetFontIndex(void) +{ + if(font != NULL) + return font->GetIndex(); + else + return 0x0000; +} + +/* +********************************** +********************************** +*/ + +void xf_t::SetFormat(format_number_t formatidx){ + + format = formatidx; + m_sigchanged = true; +}; + +unsigned16_t xf_t::GetFormatIndex(void) +{ + return xf_t::FORMAT_NUM_OPTIONS_TABLE[format]; +}; + +format_number_t xf_t::GetFormat(void) +{ + return format; +} +/* +********************************** +********************************** +*/ + +/* Cell option wrappers*/ +void xf_t::SetBorderStyle(border_side_t side, + border_style_t style, + color_name_t color) +{ + switch (side) + { + case BORDER_BOTTOM: + bottom_border_style = BORDERSTYLE_OPTIONS_TABLE[style]; + bottom_border_color = COLOR_OPTIONS_TABLE[color]; + + break; + + case BORDER_TOP: + top_border_style = BORDERSTYLE_OPTIONS_TABLE[style]; + top_border_color = COLOR_OPTIONS_TABLE[color]; + + break; + + case BORDER_LEFT: + left_border_style = BORDERSTYLE_OPTIONS_TABLE[style]; + left_border_color = COLOR_OPTIONS_TABLE[color]; + + break; + + case BORDER_RIGHT: + right_border_style = BORDERSTYLE_OPTIONS_TABLE[style]; + right_border_color = COLOR_OPTIONS_TABLE[color]; + + break; + + default: + // It cannot get here + break; + + } + + m_sigchanged = true; + +} + +/* +********************************** +********************************** +*/ +unsigned8_t xf_t::GetBorderStyle(border_side_t side) +{ + unsigned8_t ret_style = XF_BRDOPTION_NONE; + + switch (side) + { + + case BORDER_BOTTOM: + ret_style = bottom_border_style; + break; + + case BORDER_TOP: + ret_style = top_border_style; + break; + + case BORDER_LEFT: + ret_style = left_border_style; + break; + + case BORDER_RIGHT: + ret_style = right_border_style; + break; + + default: + // It cannot get here + break; + + } + + return ret_style; +} + +/* +********************************** +********************************** +*/ +unsigned8_t xf_t::GetBorderColor(border_side_t side) +{ + unsigned8_t ret_color = XF_COLOR_CODE_BLACK; + + switch (side) + { + + case BORDER_BOTTOM: + ret_color = bottom_border_color; + break; + + case BORDER_TOP: + ret_color = top_border_color; + break; + + case BORDER_LEFT: + ret_color = left_border_color; + break; + + case BORDER_RIGHT: + ret_color = right_border_color; + break; + + default: + // It cannot get here + break; + + } + return ret_color; + +} + +void xf_t::operator=(xf_t& right) +{ + index = 0x0000; + font = right.font; + format = right.format; + halign = right.halign; + valign = right.valign; + indent = right.indent; + + txtorientation = right.txtorientation; + fill_fgcolor = right.fill_fgcolor; + fill_bgcolor = right.fill_bgcolor; + fillstyle = right.fillstyle; + + locked = right.locked; + hidden = right.hidden; + wrap = right.wrap; + is_cell = right.is_cell; + + top_border_style = right.top_border_style; + top_border_color = right.top_border_color; + + bottom_border_style = right.bottom_border_style; + bottom_border_color = right.bottom_border_color; + + left_border_style = right.left_border_style; + left_border_color = right.left_border_color; + + right_border_style = right.right_border_style; + right_border_color = right.right_border_color; + + m_sigchanged = true; + +} + +/* Horizontal Align option wrappers*/ +void xf_t::SetHAlign(halign_option_t ha_option) +{ + halign = xf_t::HALIGN_OPTIONS_TABLE[ha_option]; + m_sigchanged = true; +} + +unsigned8_t xf_t::GetHAlign(void) +{ + return halign; +} + +/* Vertical Align option wrappers*/ +void xf_t::SetVAlign(valign_option_t va_option) +{ + valign = xf_t::VALIGN_OPTIONS_TABLE[va_option]; + m_sigchanged = true; +} + +unsigned8_t xf_t::GetVAlign(void) +{ + return valign; +} + +void xf_t::SetIndent(indent_option_t indent_option) +{ + + indent = xf_t::INDENT_OPTIONS_TABLE[indent_option]; + + m_sigchanged = true; +} +unsigned8_t xf_t::GetIndent(void) +{ + return indent; +} + +/* Text orientation option wrappers*/ +void xf_t::SetTxtOrientation(txtori_option_t ori_option) +{ + txtorientation = xf_t::TXTORI_OPTIONS_TABLE[ori_option]; + m_sigchanged = true; +} + +unsigned8_t xf_t::GetTxtOrientation(void) +{ + return txtorientation; +} + +/* Fill Foreground color option wrappers*/ +void xf_t::SetFillFGColor(color_name_t color) +{ + fill_fgcolor = xf_t::COLOR_OPTIONS_TABLE[color]; + m_sigchanged = true; +} + +unsigned8_t xf_t::GetFillFGColor(void) +{ + return fill_fgcolor; +} + + +/* Fill Background color option wrappers*/ +void xf_t::SetFillBGColor(color_name_t color) +{ + fill_bgcolor = xf_t::COLOR_OPTIONS_TABLE[color]; + m_sigchanged = true; +} + +unsigned8_t xf_t::GetFillBGColor(void) +{ + return fill_bgcolor; +} + +/* Fill Style option wrappers*/ +void xf_t::SetFillStyle(fill_option_t fill) +{ + fillstyle = xf_t::FILL_OPTIONS_TABLE[fill]; + m_sigchanged = true; +} + +unsigned8_t xf_t::GetFillStyle(void) +{ + return fillstyle; +} + +/* Locked option wrappers*/ +void xf_t::SetLocked(bool locked_opt) +{ + locked = locked_opt; + m_sigchanged = true; +} + +bool xf_t::IsLocked(void) +{ + return locked; +} + +/* Hidden option wrappers*/ +void xf_t::SetHidden(bool hidden_opt) +{ + hidden = hidden_opt; + m_sigchanged = true; +} +bool xf_t::IsHidden(void) +{ + return hidden; +} + +/* Wrap option wrappers*/ +void xf_t::SetWrap(bool wrap_opt) +{ + wrap = wrap_opt; + m_sigchanged = true; +}; + +bool xf_t::IsWrap(void) +{ + return wrap; +}; + +/* Cell option wrappers*/ +void xf_t::SetCellMode(bool cellmode) +{ + is_cell = cellmode; + m_sigchanged = true; +} + +bool xf_t::IsCell(void) +{ + return is_cell; +} + + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: extformat.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:48 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/extformat.h b/uppdev/XLS/extformat.h new file mode 100644 index 000000000..854ab8237 --- /dev/null +++ b/uppdev/XLS/extformat.h @@ -0,0 +1,696 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/extformat.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef EXTFORMAT_H +#define EXTFORMAT_H + +#include +#include +#include +#include +#include +#include +#include + +namespace xlslib_core +{ + +// COMMON + + // The Cell Properties bit or-masks: +#define XF_PROP_SHIFTPOS_PARENT (4) + +#define XF_PROP_LOCKED ((unsigned16_t)0x0001) +#define XF_PROP_HIDDEN ((unsigned16_t)0x0002) +#define XF_PROP_STYLE ((unsigned16_t)0x0004) +#define XF_PROP_123PREFIX ((unsigned16_t)0x0008) +#define XF_PROP_XFPARENT ((unsigned16_t)0xFFF0) + + // The Alignment field bit or-masks: +#define XF_ALIGN_HORIZONTAL ((unsigned16_t)0x0007) +#define XF_ALIGN_WRAP ((unsigned16_t)0x0008) +#define XF_ALIGN_VERTICAL ((unsigned16_t)0x0070) +#define XF_ALIGN_JUSTLAST ((unsigned32_t)0x0080) /* BIFF8: Used only in far-east versions of excel */ +#define XF_ALIGN_ORIENTATION ((unsigned16_t)0x0300) + + // Geometric Align options +#define XF_ALIGN_SHIFTPOS_HALIGN (0) +#define XF_ALIGN_SHIFTPOS_VALIGN (4) + + // XF_USED_ATTRIB +#define XF_ALIGN_ATRNUM ((unsigned16_t)0x0400) +#define XF_ALIGN_ATRFONT ((unsigned16_t)0x0800) +#define XF_ALIGN_ATRALC ((unsigned16_t)0x1000) +#define XF_ALIGN_ATRBDR ((unsigned16_t)0x2000) +#define XF_ALIGN_ATRPAT ((unsigned16_t)0x4000) +#define XF_ALIGN_ATRPROT ((unsigned16_t)0x8000) + + // Style options +#define XF_FILL_NONE ((unsigned8_t)0x00) +#define XF_FILL_SOLID ((unsigned8_t)0x01) +#define XF_FILL_ATEN75 ((unsigned8_t)0x03) +#define XF_FILL_ATEN50 ((unsigned8_t)0x02) +#define XF_FILL_ATEN25 ((unsigned8_t)0x04) +#define XF_FILL_ATEN12 ((unsigned8_t)0x11) +#define XF_FILL_ATEN06 ((unsigned8_t)0x12) +#define XF_FILL_HORIZ_LIN ((unsigned8_t)0x05) +#define XF_FILL_VERTICAL_LIN ((unsigned8_t)0x06) +#define XF_FILL_DIAG ((unsigned8_t)0x07) +#define XF_FILL_INV_DIAG ((unsigned8_t)0x08) +#define XF_FILL_INTER_DIAG ((unsigned8_t)0x09) +#define XF_FILL_DIAG_THICK_INTER ((unsigned8_t)0x0a) +#define XF_FILL_HORIZ_LINES_THIN ((unsigned8_t)0x0b) +#define XF_FILL_VERTICAL_LINES_THIN ((unsigned8_t)0x0c) +#define XF_FILL_DIAG_THIN ((unsigned8_t)0x0d) +#define XF_FILL_INV_DIAG_THIN ((unsigned8_t)0x0e) +#define XF_FILL_HORIZ_INT_THIN ((unsigned8_t)0x0f) +#define XF_FILL_HORIZ_INTER_THICK ((unsigned8_t)0x10) + typedef enum + { + FILL_NONE = 0, + FILL_SOLID, + FILL_ATEN75, + FILL_ATEN50, + FILL_ATEN25, + FILL_ATEN12, + FILL_ATEN06, + FILL_HORIZ_LIN, + FILL_VERTICAL_LIN, + FILL_DIAG, + FILL_INV_DIAG, + FILL_INTER_DIAG, + FILL_DIAG_THICK_INTER, + FILL_HORIZ_LINES_THIN, + FILL_VERTICAL_LINES_THIN, + FILL_DIAG_THIN, + FILL_INV_DIAG_THIN, + FILL_HORIZ_INT_THIN, + FILL_HORIZ_INTER_THICK + } fill_option_t; + + // Border Options +#define XF_BRDOPTION_NONE ((unsigned8_t)0x00) +#define XF_BRDOPTION_THIN ((unsigned8_t)0x01) +#define XF_BRDOPTION_MEDIUM ((unsigned8_t)0x02) +#define XF_BRDOPTION_DASHED ((unsigned8_t)0x03) +#define XF_BRDOPTION_DOTTED ((unsigned8_t)0x04) +#define XF_BRDOPTION_THICK ((unsigned8_t)0x05) +#define XF_BRDOPTION_DOUBLE ((unsigned8_t)0x06) +#define XF_BRDOPTION_HAIR ((unsigned8_t)0x07) + typedef enum + { + BORDER_NONE = 0, + BORDER_THIN, + BORDER_MEDIUM, + BORDER_DASHED, + BORDER_DOTTED, + BORDER_THICK, + BORDER_DOUBLE, + BORDER_HAIR + } border_style_t; + + // Border options +#define XF_BORDER_BOTTOM ((unsigned8_t)0) +#define XF_BORDER_TOP ((unsigned8_t)1) +#define XF_BORDER_LEFT ((unsigned8_t)2) +#define XF_BORDER_RIGHT ((unsigned8_t)3) + typedef enum + { + BORDER_BOTTOM = 0, + BORDER_TOP, + BORDER_LEFT, + BORDER_RIGHT, + DIAGONALS // BIFF8 + } border_side_t; + + // Horizontal Align options +#define XF_HALIGN_GENERAL ((unsigned8_t)0) +#define XF_HALIGN_LEFT ((unsigned8_t)1) +#define XF_HALIGN_CENTER ((unsigned8_t)2) +#define XF_HALIGN_RIGHT ((unsigned8_t)3) +#define XF_HALIGN_FILL ((unsigned8_t)4) +#define XF_HALIGN_JUSTIFY ((unsigned8_t)5) +#define XF_HALIGN_CENTERACCROSS ((unsigned8_t)6) + typedef enum + { + HALIGN_GENERAL = 0, + HALIGN_LEFT, + HALIGN_CENTER, + HALIGN_RIGHT, + HALIGN_FILL, + HALIGN_JUSTIFY, + HALIGN_CENTERACCROSS + } halign_option_t; + + // Vertical Align options +#define XF_VALIGN_TOP ((unsigned8_t)0) +#define XF_VALIGN_CENTER ((unsigned8_t)1) +#define XF_VALIGN_BOTTOM ((unsigned8_t)2) +#define XF_VALIGN_JUSTIFY ((unsigned8_t)3) + typedef enum + { + VALIGN_TOP = 0, + VALIGN_CENTER, + VALIGN_BOTTOM, + VALIGN_JUSTIFY + } valign_option_t; + + +#define XF_COLOR_CODE_BLACK ((unsigned8_t)(COLOR_CODE_BLACK)) +#define XF_COLOR_CODE_DARK_RED ((unsigned8_t)(COLOR_CODE_DARK_RED)) +#define XF_COLOR_CODE_RED ((unsigned8_t)(COLOR_CODE_RED)) +#define XF_COLOR_CODE_FUCSIA ((unsigned8_t)(COLOR_CODE_FUCSIA)) +#define XF_COLOR_CODE_COMBINED01 ((unsigned8_t)(COLOR_CODE_COMBINED01)) +#define XF_COLOR_CODE_COMBINED02 ((unsigned8_t)(COLOR_CODE_COMBINED02)) +#define XF_COLOR_CODE_COMBINED03 ((unsigned8_t)(COLOR_CODE_COMBINED03)) +#define XF_COLOR_CODE_COMBINED04 ((unsigned8_t)(COLOR_CODE_COMBINED04)) +#define XF_COLOR_CODE_COMBINED05 ((unsigned8_t)(COLOR_CODE_COMBINED05)) +#define XF_COLOR_CODE_COMBINED06 ((unsigned8_t)(COLOR_CODE_COMBINED06)) +#define XF_COLOR_CODE_OLIVE ((unsigned8_t)(COLOR_CODE_OLIVE)) +#define XF_COLOR_CODE_DARK_YELLOW ((unsigned8_t)(COLOR_CODE_DARK_YELLOW)) +#define XF_COLOR_CODE_COMBINED07 ((unsigned8_t)(COLOR_CODE_COMBINED07)) +#define XF_COLOR_CODE_YELLOW ((unsigned8_t)(COLOR_CODE_YELLOW)) +#define XF_COLOR_CODE_LIGHT_YELLOW ((unsigned8_t)(COLOR_CODE_LIGHT_YELLOW)) +#define XF_COLOR_CODE_DARK_GREEN ((unsigned8_t)(COLOR_CODE_DARK_GREEN)) +#define XF_COLOR_CODE_GREEN ((unsigned8_t)(COLOR_CODE_GREEN)) +#define XF_COLOR_CODE_COMBINED08 ((unsigned8_t)(COLOR_CODE_COMBINED08)) +#define XF_COLOR_CODE_LIVING_GREEN ((unsigned8_t)(COLOR_CODE_LIVING_GREEN)) +#define XF_COLOR_CODE_LIGHT_GREEN ((unsigned8_t)(COLOR_CODE_LIGHT_GREEN)) +#define XF_COLOR_CODE_COMBINED09 ((unsigned8_t)(COLOR_CODE_COMBINED09)) +#define XF_COLOR_CODE_BLUE_GREEN ((unsigned8_t)(COLOR_CODE_BLUE_GREEN)) +#define XF_COLOR_CODE_AQUAMARINA ((unsigned8_t)(COLOR_CODE_AQUAMARINA)) +#define XF_COLOR_CODE_TURQOISE ((unsigned8_t)(COLOR_CODE_TURQOISE)) +#define XF_COLOR_CODE_COMBINED10 ((unsigned8_t)(COLOR_CODE_COMBINED10)) +#define XF_COLOR_CODE_DARK_BLUE ((unsigned8_t)(COLOR_CODE_DARK_BLUE)) +#define XF_COLOR_CODE_BLUE ((unsigned8_t)(COLOR_CODE_BLUE)) +#define XF_COLOR_CODE_LIGHT_BLUE ((unsigned8_t)(COLOR_CODE_LIGHT_BLUE)) +#define XF_COLOR_CODE_SKY_BLUE ((unsigned8_t)(COLOR_CODE_SKY_BLUE)) +#define XF_COLOR_CODE_COMBINED11 ((unsigned8_t)(COLOR_CODE_COMBINED11)) +#define XF_COLOR_CODE_INDIGO ((unsigned8_t)(COLOR_CODE_INDIGO)) +#define XF_COLOR_CODE_BLUE_GRAY ((unsigned8_t)(COLOR_CODE_BLUE_GRAY)) +#define XF_COLOR_CODE_VIOLET ((unsigned8_t)(COLOR_CODE_VIOLET)) +#define XF_COLOR_CODE_PLUM ((unsigned8_t)(COLOR_CODE_PLUM)) +#define XF_COLOR_CODE_LAVANDER ((unsigned8_t)(COLOR_CODE_LAVANDER)) +#define XF_COLOR_CODE_COMBINED12 ((unsigned8_t)(COLOR_CODE_COMBINED12)) +#define XF_COLOR_CODE_GRAY50 ((unsigned8_t)(COLOR_CODE_GRAY50)) +#define XF_COLOR_CODE_GRAY40 ((unsigned8_t)(COLOR_CODE_GRAY40)) +#define XF_COLOR_CODE_GRAY25 ((unsigned8_t)(COLOR_CODE_GRAY25)) +#define XF_COLOR_CODE_WHITE ((unsigned8_t)(COLOR_CODE_WHITE)) + +#define XF_LOCKED true +#define XF_NO_LOCKED false + +#define XF_HIDDEN true +#define XF_NO_HIDDEN false + +#define XF_WRAPPED true +#define XF_NO_WRAPPED false + +#define XF_IS_CELL true +#define XF_IS_STYLE false + + + + + + + + // The XF-record field offsets: +#if VERSION_BIFF == VERSION_BIFF5 + +#define XF_OFFSET_FONT ((unsigned32_t) 4) +#define XF_OFFSET_FORMAT ((unsigned32_t) 6) +#define XF_OFFSET_PROP ((unsigned32_t) 8) +#define XF_OFFSET_ALIGN ((unsigned32_t)10) // 2 bytes +#define XF_OFFSET_COLOR ((unsigned32_t)12) +#define XF_OFFSET_BORDER0 ((unsigned32_t)14) +#define XF_OFFSET_BORDER1 ((unsigned32_t)16) +#define XF_OFFSET_BORDER2 ((unsigned32_t)18) + + // Text Orientation Options +#define XF_ORI_SHIFTPOS (8) +#define XF_ORI_NONE ((unsigned8_t)0) +#define XF_ORI_TOPBOTTOMTXT ((unsigned8_t)1) +#define XF_ORI_90NOCLOCKTXT ((unsigned8_t)2) +#define XF_ORI_90CLOCKTXT ((unsigned8_t)3) + typedef enum + { + ORI_NONE = 0, + ORI_TOPBOTTOMTXT, + ORI_90NOCLOCKTXT, + ORI_90CLOCKTXT + } txtori_option_t; + + // XF_USED_ATTRIB +#define XF_ATTRIB_SHIFTPOS (0) + + // The Color field bit or-masks: +#define XF_COLOR_FOREGROUND ((unsigned16_t)0x007f) +#define XF_COLOR_BACKGROUND ((unsigned16_t)0x1f80) + +#define XF_COLOR_SHIFTPOS_FG (0) +#define XF_COLOR_SHIFTPOS_BG (7) + + // The Border0 field bit or-masks: + +#define XF_STYLE_SHIFTPOS_BOTTOM (6) +#define XF_COLOR_SHIFTPOS_BOTTOM (9) + +#define XF_BORDER_FILLPATTERN ((unsigned16_t)0x003f) +#define XF_BORDER_BOTTOMSTYLE ((unsigned16_t)0x01c0) +#define XF_BORDER_BOTTOMCOLOR ((unsigned16_t)0xfe00) + + // The Border1 field bit or-masks: +#define XF_STYLE_SHIFTPOS_TOP (0) +#define XF_STYLE_SHIFTPOS_LEFT (3) +#define XF_STYLE_SHIFTPOS_RIGHT (6) +#define XF_COLOR_SHIFTPOS_TOP (9) + +#define XF_BORDER_TOPSTYLE ((unsigned16_t)0x0007) +#define XF_BORDER_LEFTSTYLE ((unsigned16_t)0x0038) +#define XF_BORDER_RIGHTSTYLE ((unsigned16_t)0x01c0) +#define XF_BORDER_TOPCOLOR ((unsigned16_t)0xfe00) + + // The Border2 field bit or-masks: +#define XF_COLOR_SHIFTPOS_LEFT (0) +#define XF_COLOR_SHIFTPOS_RIGHT (7) + +#define XF_BORDER_LEFTCOLOR ((unsigned16_t)0x007f) +#define XF_BORDER_RIGHTCOLOR ((unsigned16_t)0x3f80) +//#define XF_BORDER2_RESERVED ((unsigned16_t)0xc000) + + + + +#else // VERSION_BIFF == VERSION_BIFF8 + + + + +#define XF_OFFSET_FONT ((unsigned32_t) 4) +#define XF_OFFSET_FORMAT ((unsigned32_t) 6) +#define XF_OFFSET_PROP ((unsigned32_t) 8) +#define XF_OFFSET_ALIGN ((unsigned32_t)10) // 4 bytes +#define XF_OFFSET_BORDERA ((unsigned32_t)14) // 4 bytes +#define XF_OFFSET_BORDERB ((unsigned32_t)18) // 4 bytes +#define XF_OFFSET_COLOR ((unsigned32_t)22) + + // Text Orientation Options +#define XF_ORI_SHIFTPOS (8) +#define XF_ORI_NONE ((unsigned8_t)0) +#define XF_ORI_90NOCLOCKTXT ((unsigned8_t)90) +#define XF_ORI_90CLOCKTXT ((unsigned8_t)180) +#define XF_ORI_TOPBOTTOMTXT ((unsigned8_t)255) + typedef enum + { + ORI_NONE = 0, + ORI_TOPBOTTOMTXT, + ORI_90NOCLOCKTXT, + ORI_90CLOCKTXT + } txtori_option_t; + + // Indent field +#define XF_INDENT_SHIFTPOS (16) +#define XF_INDENT_LVL ((unsigned8_t)0x0F) +#define XF_INDENT_NONE ((unsigned8_t)0x00) +#define XF_INDENT_1 ((unsigned8_t)0x01) +#define XF_INDENT_2 ((unsigned8_t)0x02) +#define XF_INDENT_3 ((unsigned8_t)0x03) +#define XF_INDENT_4 ((unsigned8_t)0x04) +#define XF_INDENT_SHRINK2FIT ((unsigned8_t)0x10) +#define XF_INDENT_DIR ((unsigned8_t)0xC0) +#define XF_INDENT_CONTEXT ((unsigned8_t)0x00) +#define XF_INDENT_L2R ((unsigned8_t)0x40) +#define XF_INDENT_R2L ((unsigned8_t)0x80) + typedef enum + { + INDENT_NONE = 0, + INDENT_1, + INDENT_2, + INDENT_3, + INDENT_4, + INDENT_SHRINK2FIT, + INDENT_L2R, + INDENT_R2L + } indent_option_t; + + // XF_USED_ATTRIB +#define XF_ATTRIB_SHIFTPOS (16) // bits shifted by 8 already + + // The Border A field bit or-masks: + +#define XF_STYLE_SHIFTPOS_LEFT (0) +#define XF_STYLE_SHIFTPOS_RIGHT (4) +#define XF_STYLE_SHIFTPOS_TOP (8) +#define XF_STYLE_SHIFTPOS_BOTTOM (12) + + // The BorderA field bit or-masks: +#define XF_COLOR_SHIFTPOS_LEFT (16) +#define XF_COLOR_SHIFTPOS_RIGHT (23) + +#define XF_BORDER_LEFTSTYLE ((unsigned32_t)0x0000000F) +#define XF_BORDER_RIGHTSTYLE ((unsigned32_t)0x000000F0) +#define XF_BORDER_TOPSTYLE ((unsigned32_t)0x00000F00) +#define XF_BORDER_BOTTOMSTYLE ((unsigned32_t)0x0000F000) + +#define XF_BORDER_LEFTCOLOR ((unsigned32_t)0x007f0000) +#define XF_BORDER_RIGHTCOLOR ((unsigned32_t)0x3f800000) +#define XF_DIAG_TL2BR ((unsigned32_t)0x40000000) +#define XF_DIAG_BL2TR ((unsigned32_t)0x80000000) + + // BORDER B + +#define XF_COLOR_SHIFTPOS_TOP (0) +#define XF_COLOR_SHIFTPOS_BOTTOM (7) +#define XF_COLOR_SHIFTPOS_DIAG (14) +#define XF_STYLE_SHIFTPOS_DIAG (21) +#define XF_SHIFTPOS_FILLPATTERN (26) + +#define XF_BORDER_TOPCOLOR ((unsigned16_t)0x0000007f) +#define XF_BORDER_BOTTOMCOLOR ((unsigned16_t)0x00003f80) +#define XF_BORDER_DIAGCOLOR ((unsigned16_t)0x001fc000) +#define XF_BORDER_DIAGSTYLE ((unsigned16_t)0x01e00000) +#define XF_BORDER_FILLPATTERN ((unsigned32_t)0xFC000000) + +//#define XF_STYLE_SHIFTPOS_LEFT (3) +//#define XF_STYLE_SHIFTPOS_RIGHT (6) +//#define XF_COLOR_SHIFTPOS_TOP (9) +//#define XF_BORDER1_TOPSTYLE ((unsigned16_t)0x0007) +//#define XF_BORDER1_LEFTSTYLE ((unsigned16_t)0x0038) +//#define XF_BORDER1_RIGHTSTYLE ((unsigned16_t)0x01c0) + + // The Color field bit or-masks: +#define XF_COLOR_SHIFTPOS_FG (0) +#define XF_COLOR_SHIFTPOS_BG (7) +#define XF_COLOR_FOREGROUND ((unsigned16_t)0x007f) +#define XF_COLOR_BACKGROUND ((unsigned16_t)0x3f80) +#define XF_COLOR_DIAG ((unsigned16_t)0xc000) + + +#endif + /* +****************************** +CExtFormat class declaration +****************************** +*/ + + typedef struct + { + unsigned16_t index; + + font_t* font; + format_number_t format; + + halign_option_t halign; + valign_option_t valign; + indent_option_t indent; + txtori_option_t txtorientation; + + color_name_t fill_fgcolor; + color_name_t fill_bgcolor; + fill_option_t fillstyle; + + bool locked; + bool hidden; + bool wrap; + bool is_cell; + + border_style_t top_border_style; + color_name_t top_border_color; + + border_style_t bottom_border_style; + color_name_t bottom_border_color; + + border_style_t left_border_style; + color_name_t left_border_color; + + border_style_t right_border_style; + color_name_t right_border_color; + + } xf_init_t; + + struct xf_i + { + virtual void font(font_t* fontidx) = 0; + virtual void format(format_number_t format) = 0; + virtual void halign(halign_option_t ha_option) = 0; + virtual void valign(valign_option_t va_option) = 0; + virtual void indent(indent_option_t indent_opt) = 0; + virtual void orientation(txtori_option_t ori_option) = 0; + virtual void fillfgcolor(color_name_t color) = 0; + virtual void fillbgcolor(color_name_t color) = 0; + virtual void fillstyle(fill_option_t fill) = 0; + virtual void locked(bool locked_opt) = 0; + virtual void hidden(bool hidden_opt) = 0; + virtual void wrap(bool wrap_opt) = 0; + virtual void borderstyle(border_side_t side, + border_style_t style, + color_name_t color) = 0; + }; + + + class xf_t + { + + public: + xf_t(); + xf_t(const xf_init_t& xfinit); + xf_t(unsigned16_t index, font_t* font, format_number_t format, halign_option_t halign, + valign_option_t valign, indent_option_t indent, txtori_option_t txtorientation, color_name_t fill_fgcolor, + color_name_t fill_bgcolor, fill_option_t fillstyle, bool locked, bool hidden, + bool wrap, bool is_cell, border_style_t top_border_style, color_name_t top_border_color, + border_style_t bottom_border_style, color_name_t bottom_border_color, border_style_t left_border_style, + color_name_t left_border_color, border_style_t right_border_style, color_name_t right_border_color); + virtual ~xf_t(); + + void MarkUsed(void); + bool IsUsed(void); + unsigned16_t Usage(){return m_usage_counter;}; + + + /* XF Index wrappers*/ + void SetIndex(unsigned16_t xfidx){index = xfidx;}; + unsigned16_t GetIndex(void){return index;}; + + /* Font Index wrappers*/ + void SetFont(font_t* fontidx); + unsigned16_t GetFontIndex(void); + font_t* GetFont(void); + + /* Format Index wrappers*/ + void SetFormat(format_number_t formatidx); + unsigned16_t GetFormatIndex(void); + format_number_t GetFormat(void); + + + /* Horizontal Align option wrappers*/ + void SetHAlign(halign_option_t ha_option); + unsigned8_t GetHAlign(void); + + /* Vertical Align option wrappers*/ + void SetVAlign(valign_option_t va_option); + unsigned8_t GetVAlign(void); + + /* Vertical Align option wrappers*/ + void SetIndent(indent_option_t indent_option); + unsigned8_t GetIndent(void); + + /* Text orientation option wrappers*/ + void SetTxtOrientation(txtori_option_t ori_option); + unsigned8_t GetTxtOrientation(void); + + + /* Fill Foreground color option wrappers*/ + void SetFillFGColor(color_name_t color); + unsigned8_t GetFillFGColor(void); + + + /* Fill Background color option wrappers*/ + void SetFillBGColor(color_name_t color); + unsigned8_t GetFillBGColor(void); + + + /* Fill Style option wrappers*/ + void SetFillStyle(fill_option_t fill); + unsigned8_t GetFillStyle(void); + + /* Locked option wrappers*/ + void SetLocked(bool locked_opt); + bool IsLocked(void); + + + /* Hidden option wrappers*/ + void SetHidden(bool hidden_opt); + bool IsHidden(void); + + /* Wrap option wrappers*/ + void SetWrap(bool wrap_opt); + bool IsWrap(void); + + + /* Cell option wrappers*/ + void SetCellMode(bool cellmode); + bool IsCell(void); + + /* Cell option wrappers*/ + void SetBorderStyle(border_side_t side, + border_style_t style, + color_name_t color); + unsigned8_t GetBorderStyle(border_side_t side); + unsigned8_t GetBorderColor(border_side_t side); + unsigned32_t GetSignature(); + + void operator=(xf_t& right) ; + + private: + // Lookup tables for options + static const unsigned8_t HALIGN_OPTIONS_TABLE[]; + static const unsigned8_t VALIGN_OPTIONS_TABLE[]; + static const unsigned8_t INDENT_OPTIONS_TABLE[]; + static const unsigned8_t TXTORI_OPTIONS_TABLE[]; + static const unsigned8_t COLOR_OPTIONS_TABLE[]; + static const unsigned8_t FILL_OPTIONS_TABLE[]; + static const unsigned8_t BORDERSTYLE_OPTIONS_TABLE[]; + static const unsigned16_t FORMAT_NUM_OPTIONS_TABLE[]; + void UpdateSignature(); + private: + unsigned16_t m_usage_counter; + + unsigned16_t index; + + font_t* font; + format_number_t format; + + unsigned8_t halign; + unsigned8_t valign; + unsigned8_t indent; + unsigned8_t txtorientation; + + unsigned8_t fill_fgcolor; + unsigned8_t fill_bgcolor; + unsigned8_t fillstyle; + + bool locked; + bool hidden; + bool wrap; + bool is_cell; + + unsigned8_t top_border_style; + unsigned8_t top_border_color; + + unsigned8_t bottom_border_style; + unsigned8_t bottom_border_color; + + unsigned8_t left_border_style; + unsigned8_t left_border_color; + + unsigned8_t right_border_style; + unsigned8_t right_border_color; + + unsigned32_t m_signature; + bool m_sigchanged; + + }; + + class xfbysig + { + public: + bool operator()(xf_t* a, xf_t* b) const + { + return (a->GetSignature() < b->GetSignature() ? true : false ); // DFH + }; + }; + + typedef std::set XF_Set_t; + typedef XF_Set_t::iterator XF_Set_Itor_t; + + typedef std::list XF_List_t; + typedef XF_List_t::iterator XF_List_Itor_t; + + + + class CExtFormat: public CRecord + { + private: + + void SetFlag(unsigned16_t flag); + void ClearFlag(unsigned16_t flag); + + void InitDummy(bool is_cell); + + public: + + CExtFormat(bool is_cell = false); + CExtFormat(xf_t* xfdef); + ~CExtFormat(); + + bool IsCell(); + + int SetFontIndex(unsigned16_t fontindex); + unsigned16_t GetFontIndex(void); + + int SetFormatIndex(unsigned16_t formatindex); + unsigned16_t GetFormatIndex(void); + + void SetLocked(); + void SetHidden(); + void SetHorizAlign(unsigned8_t alignval); + void SetWrap(); +#if VERSION_BIFF == VERSION_BIFF8 + void SetIndent(unsigned8_t indentval); +#endif + void SetVertAlign(unsigned8_t alignval); + void SetTxtOrientation(unsigned8_t alignval); + void SetFGColorIndex(unsigned8_t color); + void SetBGColorIndex(unsigned8_t color); + void SetFillPattern(unsigned8_t color); + void SetBorder(border_side_t border, unsigned16_t style, unsigned16_t color); + void SetXFParent(unsigned16_t parent); + }; + +} +#endif //EXTFORMAT_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: extformat.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + diff --git a/uppdev/XLS/font.cpp b/uppdev/XLS/font.cpp new file mode 100644 index 000000000..4247f4388 --- /dev/null +++ b/uppdev/XLS/font.cpp @@ -0,0 +1,667 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/font.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + + +#include +#include + +using namespace std; +using namespace xlslib_core; + + +/* +********************************** +CFont class implementation +********************************** +*/ +CFont::CFont(string name, + unsigned16_t height, + unsigned16_t boldstyle, + unsigned8_t underline, + unsigned16_t script, + unsigned16_t color, + unsigned16_t attributes, + unsigned8_t family, + unsigned8_t charset) +{ + SetRecordType(RECTYPE_FONT); + + AddValue16(height); + AddValue16(attributes); + AddValue16(color); + AddValue16(boldstyle); + AddValue16(script); + AddValue8(underline); + AddValue8(family); + AddValue8(charset); + AddValue8(FONT_RESERVED); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue8((unsigned8_t)name.size()); + AddDataArray((const unsigned8_t*)name.c_str(), name.size()); +#else + AddUnicodeStrlen((unsigned8_t)name.size()); + AddUnicodeString((const unsigned8_t*)name.c_str(), name.size()); +#endif + + SetRecordLength(GetDataSize()-4); +} + +CFont::CFont(font_t* fontdef) +{ + SetRecordType(RECTYPE_FONT); + + AddValue16(fontdef->GetHeight()); + AddValue16(fontdef->GetAttributes()); + AddValue16(fontdef->GetColor()); + AddValue16(fontdef->GetBoldStyle()); + AddValue16(fontdef->GetScriptStyle()); + AddValue8(fontdef->GetUnderlineStyle()); + AddValue8(fontdef->GetFamily()); + AddValue8(fontdef->GetCharset()); + AddValue8(FONT_RESERVED); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue8((unsigned8_t)((fontdef->GetName()).size())); + AddDataArray((const unsigned8_t*)((fontdef->GetName()).c_str()), + (fontdef->GetName()).size()); +#else + AddUnicodeStrlen((unsigned8_t)((fontdef->GetName()).size())); + AddUnicodeString((const unsigned8_t*)((fontdef->GetName()).c_str()), + (fontdef->GetName()).size()); +#endif + + SetRecordLength(GetDataSize()-4); +} + +CFont::~CFont() +{ +} + +/* +********************************** +********************************** +*/ + + +int CFont::SetName(string& name) +{ + int errcode = NO_ERRORS; + + name = name; + /* + NOTE: Unimplemented. + Temporarilly this function won't set the name + */ + + return errcode; +} + +/* +********************************** +********************************** +*/ +int CFont::GetName(string& name) +{ + int errcode = NO_ERRORS; + + signed16_t namesize; + GetValue16From(&namesize, FONT_OFFSET_NAMELENGTH); + + name = ""; + for(int i=0; i. + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/font.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef FONT_H +#define FONT_H + +#include +#include +#include +#include +#include + +namespace xlslib_core +{ + // Bold style most used values + // (it can be a number of some range. See Documentation for details): +#define FONT_BOLDNESS_BOLD ((unsigned16_t)0x02bc) +#define FONT_BOLDNESS_HALF ((unsigned16_t)0x0226) +#define FONT_BOLDNESS_NORMAL ((unsigned16_t)0x0190) +#define FONT_BOLDNESS_DOUBLE ((unsigned16_t)0x0320) + + typedef enum + { + BOLDNESS_BOLD = 0, + BOLDNESS_HALF, + BOLDNESS_NORMAL, + BOLDNESS_DOUBLE + } boldness_option_t; + + + // Super/subscript field option values +#define FONT_SCRIPT_NONE ((unsigned16_t)0x0000) +#define FONT_SCRIPT_SUPER ((unsigned16_t)0x0001) +#define FONT_SCRIPT_SUB ((unsigned16_t)0x0002) + + typedef enum + { + SCRIPT_NONE = 0, + SCRIPT_SUPER, + SCRIPT_SUB + } script_option_t; + + // Underline field option values: +#define FONT_UNDERLINE_NONE ((unsigned8_t)0x00) +#define FONT_UNDERLINE_SINGLE ((unsigned8_t)0x01) +#define FONT_UNDERLINE_DOUBLE ((unsigned8_t)0x02) +#define FONT_UNDERLINE_SINGLEACC ((unsigned8_t)0x21) +#define FONT_UNDERLINE_DOUBLEACC ((unsigned8_t)0x22) + + typedef enum + { + UNDERLINE_NONE = 0, + UNDERLINE_SINGLE, + UNDERLINE_DOUBLE, + UNDERLINE_SINGLEACC, + UNDERLINE_DOUBLEACC + } underline_option_t; + + + + // The following are default values used when the font's + // constructor is called without args: +#define FONT_DFLT_FAMILY ((unsigned8_t)0x00) +#define FONT_DFLT_CHARSET ((unsigned8_t)0x00) +#define FONT_DFLT_HEIGHT ((unsigned16_t)0x00c8) +#define FONT_DFLT_ATTRIBUTES ((unsigned16_t)0x0000) +#define FONT_DFLT_PALETTE ((unsigned16_t)0x7fff) +#define FONT_DFLT_FONTNAME ((std::string)"Arial") + +#define FONT_RESERVED ((unsigned8_t)0x00) + + // The font-record field offsets: +#define FONT_OFFSET_HEIGHT ((unsigned32_t) 4) +#define FONT_OFFSET_ATTRIBUTES ((unsigned32_t) 6) +#define FONT_OFFSET_PALETTE ((unsigned32_t) 8) +#define FONT_OFFSET_BOLDSTYLE ((unsigned32_t)10) +#define FONT_OFFSET_SCRIPT ((unsigned32_t)12) +#define FONT_OFFSET_UNDERLINE ((unsigned32_t)14) +#define FONT_OFFSET_FAMILY ((unsigned32_t)15) +#define FONT_OFFSET_CHARSET ((unsigned32_t)16) +#define FONT_OFFSET_NAMELENGTH ((unsigned32_t)18) +#define FONT_OFFSET_NAME ((unsigned32_t)19) + + + // The attribute bit or-masks: +#define FONT_ATTR_RESERVED0 ((unsigned16_t)0x0001) +#define FONT_ATTR_ITALIC ((unsigned16_t)0x0002) +#define FONT_ATTR_RESERVED1 ((unsigned16_t)0x0004) +#define FONT_ATTR_STRIKEOUT ((unsigned16_t)0x0008) +#define FONT_ATTR_OUTLINEMACH ((unsigned16_t)0x0010) +#define FONT_ATTR_SHADOWMACH ((unsigned16_t)0x0020) +#define FONT_ATTR_RESERVED2 ((unsigned16_t)0x00c0) +#define FONT_ATTR_UNUSED ((unsigned16_t)0xff00) + + // Font colors +#define FONT_COLOR_CODE_BLACK ((unsigned16_t)(COLOR_CODE_BLACK)) +#define FONT_COLOR_CODE_DARK_RED ((unsigned16_t)(COLOR_CODE_DARK_RED)) +#define FONT_COLOR_CODE_RED ((unsigned16_t)(COLOR_CODE_RED)) +#define FONT_COLOR_CODE_FUCSIA ((unsigned16_t)(COLOR_CODE_FUCSIA)) +#define FONT_COLOR_CODE_COMBINED01 ((unsigned16_t)(COLOR_CODE_COMBINED01)) +#define FONT_COLOR_CODE_COMBINED02 ((unsigned16_t)(COLOR_CODE_COMBINED02)) +#define FONT_COLOR_CODE_COMBINED03 ((unsigned16_t)(COLOR_CODE_COMBINED03)) +#define FONT_COLOR_CODE_COMBINED04 ((unsigned16_t)(COLOR_CODE_COMBINED04)) +#define FONT_COLOR_CODE_COMBINED05 ((unsigned16_t)(COLOR_CODE_COMBINED05)) +#define FONT_COLOR_CODE_COMBINED06 ((unsigned16_t)(COLOR_CODE_COMBINED06)) +#define FONT_COLOR_CODE_OLIVE ((unsigned16_t)(COLOR_CODE_OLIVE)) +#define FONT_COLOR_CODE_DARK_YELLOW ((unsigned16_t)(COLOR_CODE_DARK_YELLOW)) +#define FONT_COLOR_CODE_COMBINED07 ((unsigned16_t)(COLOR_CODE_COMBINED07)) +#define FONT_COLOR_CODE_YELLOW ((unsigned16_t)(COLOR_CODE_YELLOW)) +#define FONT_COLOR_CODE_LIGHT_YELLOW ((unsigned16_t)(COLOR_CODE_LIGHT_YELLOW)) +#define FONT_COLOR_CODE_DARK_GREEN ((unsigned16_t)(COLOR_CODE_DARK_GREEN)) +#define FONT_COLOR_CODE_GREEN ((unsigned16_t)(COLOR_CODE_GREEN)) +#define FONT_COLOR_CODE_COMBINED08 ((unsigned16_t)(COLOR_CODE_COMBINED08)) +#define FONT_COLOR_CODE_LIVING_GREEN ((unsigned16_t)(COLOR_CODE_LIVING_GREEN)) +#define FONT_COLOR_CODE_LIGHT_GREEN ((unsigned16_t)(COLOR_CODE_LIGHT_GREEN)) +#define FONT_COLOR_CODE_COMBINED09 ((unsigned16_t)(COLOR_CODE_COMBINED09)) +#define FONT_COLOR_CODE_BLUE_GREEN ((unsigned16_t)(COLOR_CODE_BLUE_GREEN)) +#define FONT_COLOR_CODE_AQUAMARINA ((unsigned16_t)(COLOR_CODE_AQUAMARINA)) +#define FONT_COLOR_CODE_TURQOISE ((unsigned16_t)(COLOR_CODE_TURQOISE)) +#define FONT_COLOR_CODE_COMBINED10 ((unsigned16_t)(COLOR_CODE_COMBINED10)) +#define FONT_COLOR_CODE_DARK_BLUE ((unsigned16_t)(COLOR_CODE_DARK_BLUE)) +#define FONT_COLOR_CODE_BLUE ((unsigned16_t)(COLOR_CODE_BLUE)) +#define FONT_COLOR_CODE_LIGHT_BLUE ((unsigned16_t)(COLOR_CODE_LIGHT_BLUE)) +#define FONT_COLOR_CODE_SKY_BLUE ((unsigned16_t)(COLOR_CODE_SKY_BLUE)) +#define FONT_COLOR_CODE_COMBINED11 ((unsigned16_t)(COLOR_CODE_COMBINED11)) +#define FONT_COLOR_CODE_INDIGO ((unsigned16_t)(COLOR_CODE_INDIGO)) +#define FONT_COLOR_CODE_BLUE_GRAY ((unsigned16_t)(COLOR_CODE_BLUE_GRAY)) +#define FONT_COLOR_CODE_VIOLET ((unsigned16_t)(COLOR_CODE_VIOLET)) +#define FONT_COLOR_CODE_PLUM ((unsigned16_t)(COLOR_CODE_PLUM)) +#define FONT_COLOR_CODE_LAVANDER ((unsigned16_t)(COLOR_CODE_LAVANDER)) +#define FONT_COLOR_CODE_COMBINED12 ((unsigned16_t)(COLOR_CODE_COMBINED12)) +#define FONT_COLOR_CODE_GRAY50 ((unsigned16_t)(COLOR_CODE_GRAY50)) +#define FONT_COLOR_CODE_GRAY40 ((unsigned16_t)(COLOR_CODE_GRAY40)) +#define FONT_COLOR_CODE_GRAY25 ((unsigned16_t)(COLOR_CODE_GRAY25)) +#define FONT_COLOR_CODE_WHITE ((unsigned16_t)(COLOR_CODE_WHITE)) + + /* +****************************** +CFont class declaration +****************************** +*/ + + typedef struct + { + unsigned16_t index; + std::string name; + unsigned16_t height; + boldness_option_t boldstyle; + underline_option_t underline; + script_option_t script; + color_name_t color; + unsigned16_t attributes; + unsigned8_t family; + unsigned8_t charset; + + } font_init_t; + + struct font_i + { + virtual void fontname(std::string fntname) = 0; + virtual void fontheight(unsigned16_t fntheight) = 0; + virtual void fontbold(boldness_option_t fntboldness) = 0; + virtual void fontunderline(underline_option_t fntunderline) = 0; + virtual void fontscript(script_option_t fntscript) = 0; + virtual void fontcolor(color_name_t fntcolor) = 0; + virtual void fontattr(unsigned16_t attr) = 0; + virtual void fontitalic(bool italic) = 0; + virtual void fontstrikeout(bool so) = 0; + virtual void fontoutline(bool ol) = 0; + virtual void fontshadow(bool sh) = 0; + }; + + + class font_t + { + public: + font_t(); + font_t(unsigned16_t index, std::string name, + unsigned16_t height, boldness_option_t boldstyle, + underline_option_t underline, script_option_t script, + color_name_t color, unsigned16_t attributes, + unsigned8_t family, unsigned8_t charset); + font_t(const font_init_t& fontinit); + + virtual ~font_t() {}; + + + void MarkUsed(); + bool IsUsed(); + unsigned16_t Usage(){return m_usage_counter;}; + + + /* FONT Index wrappers*/ + void SetIndex(unsigned16_t fntidx); + unsigned16_t GetIndex(void); + + + /* FONT Index wrappers*/ + void SetName(std::string fntname); + std::string GetName(void); + + /* FONT height wrappers*/ + void SetHeight(unsigned16_t fntheight); + unsigned16_t GetHeight(void); + + /* FONT boldstyle wrappers*/ + void SetBoldStyle(boldness_option_t fntboldness); + unsigned16_t GetBoldStyle(void); + + /* FONT underline wrappers*/ + void SetUnderlineStyle(underline_option_t fntunderline); + unsigned8_t GetUnderlineStyle(void); + + /* FONT script wrappers*/ + void SetScriptStyle(script_option_t fntscript); + unsigned16_t GetScriptStyle(void); + + /* FONT script wrappers*/ + void SetColor(color_name_t fntcolor); + unsigned16_t GetColor(void); + + + void SetItalic(bool italic); + void SetStrikeout(bool so); + + + /* FONT attributes wrappers */ + void SetAttributes(unsigned16_t attr); + unsigned16_t GetAttributes(void); + + + // OSX only + void SetOutline(bool ol); + void SetShadow(bool sh); + + + // Miscellaneous; + void SetFamily(unsigned8_t fam); + unsigned8_t GetFamily(void); + + void SetCharset(unsigned8_t chrset); + unsigned8_t GetCharset(void); + unsigned32_t GetSignature(); + + void operator=(font_t& right); + + private: + unsigned16_t index; + std::string name; + unsigned16_t height; + unsigned16_t boldstyle; + unsigned8_t underline; + unsigned16_t script; + unsigned16_t color; + unsigned16_t attributes; + unsigned8_t family; + unsigned8_t charset; + + unsigned16_t m_usage_counter; + void UpdateSignature(); + unsigned32_t m_signature; + bool m_sigchanged; + + static const unsigned16_t BOLD_OPTION_TABLE[]; + static const unsigned16_t SCRIPT_OPTION_TABLE[]; + static const unsigned8_t UNDERLINE_OPTION_TABLE[]; + static const unsigned16_t COLOR_OPTION_TABLE[]; + + }; + + class fontbysig + { + public: + bool operator()(font_t* a, font_t* b) const + { + return (a->GetSignature() < b->GetSignature() ? true : false ); + }; + }; + + typedef std::set Font_Set_t; + typedef Font_Set_t::iterator Font_Set_Itor_t; + + typedef std::list Font_List_t; + typedef Font_List_t::iterator Font_List_Itor_t; + + + class CFont: public CRecord + { + protected: + + public: + + CFont(std::string name = FONT_DFLT_FONTNAME, + unsigned16_t height = FONT_DFLT_HEIGHT, + unsigned16_t boldstyle = FONT_BOLDNESS_NORMAL, + unsigned8_t underline = FONT_UNDERLINE_NONE, + unsigned16_t script = FONT_SCRIPT_NONE, + unsigned16_t color = FONT_DFLT_PALETTE, + unsigned16_t attributes = FONT_DFLT_ATTRIBUTES, + unsigned8_t family = FONT_DFLT_FAMILY, + unsigned8_t charset = FONT_DFLT_CHARSET ); + + CFont(font_t* fontdef); + ~CFont(); + + + int SetName(std::string& name); + int GetName(std::string& name); + + int SetBoldValue(unsigned16_t boldstyle); + unsigned16_t GetBoldValue(void); + + int SetUnderlineStyle(unsigned8_t ul); + unsigned8_t GetUnderlineStyle(void); + + int SetScriptStyle(unsigned16_t script); + unsigned16_t GetScriptStyle(void); + + int SetColorIndex(unsigned16_t color); + unsigned16_t GetColorIndex(void); + + int SetAttributes(unsigned16_t attr); + unsigned16_t GetAttributes(void); + + int SetFamily(unsigned8_t family); + unsigned8_t GetFamily(void); + + int SetCharSet(unsigned8_t charset); + unsigned8_t GetCharSet(void); + + }; + +} + +#endif //FONT_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: font.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * Revision 1.17 2004/04/06 22:35:43 dgonzalez + * + Added namespace xlslib_core to isolate the core xlslib library names. + * + * Revision 1.16 2004/04/06 15:10:24 dgonzalez + * + Added keys to generate distributable headers + * + * Revision 1.15 2004/01/29 03:18:55 dgonzalez + * + Using the config.h file + * + * Revision 1.14 2004/01/15 17:17:31 dgonzalez + * + The memory allocator used by STL-containers is defined #conditionally. + * + * Revision 1.13 2003/12/09 19:04:21 dgonzalez + * + Not a real difference + * + * Revision 1.12 2003/12/05 01:18:27 dgonzalez + * + Common include files were placed in common.h (and this file was + * included instead. + * + The font_interface was redefined to something lighter. Due name + * clashing with xf_i when these interfaces were defined as parent of + * cell_t. + * + Signature was implemented to font_t. Any interface function that modi + * fies any data member of the class set a flag for later signature + * update. The signature is CRC based and is used to uniquify font_t + * instances inside an stl-set-container. + * + The fontbysig functor was added for being used in the set container + * as a sorting criteria. It is based on the signature. + * + The stl-set-container of pointers to font_t* typedef was defined here. + * + * Revision 1.11 2003/11/29 17:53:49 dgonzalez + * + The larger functions were uninlined. + * + The virtual pure interface font_i was defined + * + * Revision 1.10 2003/11/28 01:31:30 dgonzalez + * + The MarkUsed functionality was added (similar to xf_t) + * + * Revision 1.9 2003/11/26 16:49:26 dgonzalez + * + Indented and untabified + * + * Revision 1.8 2003/11/04 17:07:58 dgonzalez + * + Changed the initialization of CGlobalRecord's defaults for compatibility with + * MSVC++. The original code was left commented out for future use. + * + * Revision 1.7 2003/11/04 01:04:42 dgonzalez + * + All the list containers changed to manage pointers. + * + Valgrind utility reports 960 posible memory leaks. TODO: Verify it + * + * Revision 1.6 2003/11/03 16:58:56 dgonzalez + * + The following typedefed enums were added to improve typechecking in the font + * definition: + * - boldness_option_t + * - script_option_t + * - underline_option_t + * + Font colors were defined based in the color codes defined in the module colors.h. + * + font_t is now implemented as a class. A full set of wrapper functions were implemented + * inline for Get/Set font properties. + * + font_init_t struct was added for storing initialization values of default font of a + * document. + * + The following lookup tables were added to retrieve the field's options used for setting + * the font's values. + * + * Revision 1.5 2003/10/24 23:24:32 dgonzalez + * + Added CVS-Keyword substitution. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/format.cpp b/uppdev/XLS/format.cpp new file mode 100644 index 000000000..262bbaf6b --- /dev/null +++ b/uppdev/XLS/format.cpp @@ -0,0 +1,141 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/format.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + +/* +********************************** +CFormat class implementation +********************************** +*/ +CFormat::CFormat(string& formatstr, + unsigned16_t index) +{ + SetRecordType(RECTYPE_FORMAT); + + AddValue16(index); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue8((unsigned8_t)formatstr.size()); + AddDataArray((unsigned8_t*)formatstr.c_str(), formatstr.size()); +#else + AddUnicodeStrlen((unsigned16_t)formatstr.size()); + AddUnicodeString((unsigned8_t*)formatstr.c_str(), formatstr.size()); +#endif + + SetRecordLength(GetDataSize()-4); +} + +CFormat::CFormat(format_t* formatdef) +{ + SetRecordType(RECTYPE_FORMAT); + + AddValue16(formatdef->GetIndex()); +#if VERSION_BIFF == VERSION_BIFF5 + AddValue8((unsigned8_t)((formatdef->GetFormatStr()).size())); + AddDataArray((unsigned8_t*)((formatdef->GetFormatStr()).c_str()), + (formatdef->GetFormatStr()).size()); +#else + AddUnicodeStrlen((unsigned16_t)((formatdef->GetFormatStr()).size())); + AddUnicodeString((unsigned8_t*)((formatdef->GetFormatStr()).c_str()), + (formatdef->GetFormatStr()).size()); +#endif + + SetRecordLength(GetDataSize()-4); +} + + +CFormat::~CFormat() +{ +} + +/* +********************************** +********************************** +*/ + +/* +********************************** +********************************** +*/ +int CFormat::GetFormatStr(string& formatstr) +{ + int errcode = NO_ERRORS; + + signed16_t formatsize; + GetValue16From(&formatsize, FORMAT_OFFSET_NAMELENGTH); + + formatstr = ""; + for(int i=0; i. + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/format.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef FORMAT_H +#define FORMAT_H + +#include +#include +#include +#include + +namespace xlslib_core +{ + + // The font-record field offsets: +#define FORMAT_OFFSET_INDEX ((unsigned32_t) 4) +#define FORMAT_OFFSET_NAMELENGTH ((unsigned32_t) 6) +#define FORMAT_OFFSET_NAME ((unsigned32_t) 7) + +#define FMTCODE_GENERAL ((unsigned16_t)0x0000) +#define FMTCODE_NUMBER1 ((unsigned16_t)0x0001) +#define FMTCODE_NUMBER2 ((unsigned16_t)0x0002) +#define FMTCODE_NUMBER3 ((unsigned16_t)0x0003) +#define FMTCODE_NUMBER4 ((unsigned16_t)0x0004) +#define FMTCODE_CURRENCY1 ((unsigned16_t)0x0005) +#define FMTCODE_CURRENCY2 ((unsigned16_t)0x0006) +#define FMTCODE_CURRENCY3 ((unsigned16_t)0x0007) +#define FMTCODE_CURRENCY4 ((unsigned16_t)0x0008) +#define FMTCODE_PERCENT1 ((unsigned16_t)0x0009) +#define FMTCODE_PERCENT2 ((unsigned16_t)0x000a) +#define FMTCODE_SCIENTIFIC1 ((unsigned16_t)0x000b) +#define FMTCODE_FRACTION1 ((unsigned16_t)0x000c) +#define FMTCODE_FRACTION2 ((unsigned16_t)0x000d) +#define FMTCODE_DATE1 ((unsigned16_t)0x000e) +#define FMTCODE_DATE2 ((unsigned16_t)0x000f) +#define FMTCODE_DATE3 ((unsigned16_t)0x0010) +#define FMTCODE_DATE4 ((unsigned16_t)0x0011) +#define FMTCODE_HOUR1 ((unsigned16_t)0x0012) +#define FMTCODE_HOUR2 ((unsigned16_t)0x0013) +#define FMTCODE_HOUR3 ((unsigned16_t)0x0014) +#define FMTCODE_HOUR4 ((unsigned16_t)0x0015) +#define FMTCODE_HOURDATE ((unsigned16_t)0x0016) +#define FMTCODE_NUMBER5 ((unsigned16_t)0x0025) +#define FMTCODE_NUMBER6 ((unsigned16_t)0x0026) +#define FMTCODE_NUMBER7 ((unsigned16_t)0x0027) +#define FMTCODE_NUMBER8 ((unsigned16_t)0x0028) +#define FMTCODE_ACCOUNTING1 ((unsigned16_t)0x0029) +#define FMTCODE_ACCOUNTING2 ((unsigned16_t)0x002a) +#define FMTCODE_ACCOUNTING3 ((unsigned16_t)0x002b) +#define FMTCODE_ACCOUNTING4 ((unsigned16_t)0x002c) +#define FMTCODE_HOUR5 ((unsigned16_t)0x002d) +#define FMTCODE_HOUR6 ((unsigned16_t)0x002e) +#define FMTCODE_HOUR7 ((unsigned16_t)0x002f) +#define FMTCODE_SCIENTIFIC2 ((unsigned16_t)0x0030) +#define FMTCODE_TEXT ((unsigned16_t)0x0031) + + typedef enum + { + FMT_GENERAL = 0, + FMT_NUMBER1, + FMT_NUMBER2, + FMT_NUMBER3, + FMT_NUMBER4, + FMT_CURRENCY1, + FMT_CURRENCY2, + FMT_CURRENCY3, + FMT_CURRENCY4, + FMT_PERCENT1, + FMT_PERCENT2, + FMT_SCIENTIFIC1, + FMT_FRACTION1, + FMT_FRACTION2, + FMT_DATE1, + FMT_DATE2, + FMT_DATE3, + FMT_DATE4, + FMT_HOUR1, + FMT_HOUR2, + FMT_HOUR3, + FMT_HOUR4, + FMT_HOURDATE, + FMT_NUMBER5, + FMT_NUMBER6, + FMT_NUMBER7, + FMT_NUMBER8, + FMT_ACCOUNTING1, + FMT_ACCOUNTING2, + FMT_ACCOUNTING3, + FMT_ACCOUNTING4, + FMT_HOUR5, + FMT_HOUR6, + FMT_HOUR7, + FMT_SCIENTIFIC2, + FMT_TEXT + } format_number_t; + + /* +****************************** +CFormat class declaration +****************************** +*/ + + class format_t + { + public: + format_t(unsigned16_t idx, std::string fmtstr) + : index(idx), formatstr(fmtstr), m_usage_counter(0) + {}; + ~format_t(){}; + + unsigned16_t GetIndex(){return index;}; + void SetIndex(unsigned16_t idx){index = idx;}; + + std::string& GetFormatStr(void) {return formatstr;}; + void SetFormatStr(std::string& fmtstr) {formatstr = fmtstr;}; + + void MarkUsed() {m_usage_counter++;}; + bool IsUsed() {return(m_usage_counter != 0);}; + + private: + + + unsigned16_t index; + std::string formatstr; + + unsigned16_t m_usage_counter; + }; + typedef std::list Format_List_t; + typedef Format_List_t::iterator Format_List_Itor_t; + + + + + class CFormat: public CRecord + { + protected: + + public: + + CFormat(std::string& formatstr, unsigned16_t index); + CFormat(format_t* formatdef); + ~CFormat(); + + + int SetFormatStr(std::string& formatstr); + int GetFormatStr(std::string& formatstr); + + int SetIndex(unsigned16_t index); + unsigned16_t GetIndex(void); + + // int SetName(std::string& formatstr); + + }; + +} + +#endif //FORMAT_H + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: format.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:57 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + diff --git a/uppdev/XLS/formtags.h b/uppdev/XLS/formtags.h new file mode 100644 index 000000000..6d74e2d8e --- /dev/null +++ b/uppdev/XLS/formtags.h @@ -0,0 +1,240 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/formtags.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +/* + sed -e 's/^\([A-Za-z0-9]*\)$/#define FT_\1 \\/' biff_formula_tags_norm.txt | sed -e 's/^ \([A-F0-9]*\)\h$/ ((unsigned char)0x\1)/' | sed -e "s/^ \([oc].*\)//" > formtags.h +*/ + +#define FT_ptgExp \ + ((unsigned char)0x01) +#define FT_ptgTbl \ + ((unsigned char)0x02) +#define FT_ptgAdd \ + ((unsigned char)0x03) +#define FT_ptgSub \ + ((unsigned char)0x04) +#define FT_ptgMul \ + ((unsigned char)0x05) +#define FT_ptgDiv \ + ((unsigned char)0x06) +#define FT_ptgPower \ + ((unsigned char)0x07) +#define FT_ptgConcat \ + ((unsigned char)0x08) +#define FT_ptgLT \ + ((unsigned char)0x09) +#define FT_ptgLE \ + ((unsigned char)0x0A) +#define FT_ptgEQ \ + ((unsigned char)0x0B) +#define FT_ptgGE \ + ((unsigned char)0x0C) +#define FT_ptgGT \ + ((unsigned char)0x0D) +#define FT_ptgNE \ + ((unsigned char)0x0E) +#define FT_ptgIsect \ + ((unsigned char)0x0F) +#define FT_ptgUnion \ + ((unsigned char)0x10) +#define FT_ptgRange \ + ((unsigned char)0x11) +#define FT_ptgUplus \ + ((unsigned char)0x12) +#define FT_ptgUminus \ + ((unsigned char)0x13) +#define FT_ptgPercent \ + ((unsigned char)0x14) +#define FT_ptgParen \ + ((unsigned char)0x15) +#define FT_ptgMissArg \ + ((unsigned char)0x16) +#define FT_ptgStr \ + ((unsigned char)0x17) +#define FT_ptgAttr \ + ((unsigned char)0x19) +#define FT_ptgSheet \ + ((unsigned char)0x1A) +#define FT_ptgEndSheet \ + ((unsigned char)0x1B) +#define FT_ptgErr \ + ((unsigned char)0x1C) +#define FT_ptgBool \ + ((unsigned char)0x1D) +#define FT_ptgInt \ + ((unsigned char)0x1E) +#define FT_ptgNum \ + ((unsigned char)0x1F) +#define FT_ptgArray \ + ((unsigned char)0x20) +#define FT_ptgFunc \ + ((unsigned char)0x21) +#define FT_ptgFuncVar \ + ((unsigned char)0x22) +#define FT_ptgName \ + ((unsigned char)0x23) +#define FT_ptgRef \ + ((unsigned char)0x24) +#define FT_ptgArea \ + ((unsigned char)0x25) +#define FT_ptgMemArea \ + ((unsigned char)0x26) +#define FT_ptgMemErr \ + ((unsigned char)0x27) +#define FT_ptgMemNoMem \ + ((unsigned char)0x28) +#define FT_ptgMemFunc \ + ((unsigned char)0x29) +#define FT_ptgRefErr \ + ((unsigned char)0x2A) +#define FT_ptgAreaErr \ + ((unsigned char)0x2B) +#define FT_ptgRefN \ + ((unsigned char)0x2C) +#define FT_ptgAreaN \ + ((unsigned char)0x2D) +#define FT_ptgMemAreaN \ + ((unsigned char)0x2E) +#define FT_ptgMemNoMemN \ + ((unsigned char)0x2F) +#define FT_ptgNameX \ + ((unsigned char)0x39) +#define FT_ptgRef3d \ + ((unsigned char)0x3A) +#define FT_ptgArea3d \ + ((unsigned char)0x3B) +#define FT_ptgRefErr3d \ + ((unsigned char)0x3C) +#define FT_ptgAreaErr3d \ + ((unsigned char)0x3D) +#define FT_ptgArrayV \ + ((unsigned char)0x40) +#define FT_ptgFuncV \ + ((unsigned char)0x41) +#define FT_ptgFuncVarV \ + ((unsigned char)0x42) +#define FT_ptgNameV \ + ((unsigned char)0x43) +#define FT_ptgRefV \ + ((unsigned char)0x44) +#define FT_ptgAreaV \ + ((unsigned char)0x45) +#define FT_ptgMemAreaV \ + ((unsigned char)0x46) +#define FT_ptgMemErrV \ + ((unsigned char)0x47) +#define FT_ptgMemNoMemV \ + ((unsigned char)0x48) +#define FT_ptgMemFuncV \ + ((unsigned char)0x49) +#define FT_ptgRefErrV \ + ((unsigned char)0x4A) +#define FT_ptgAreaErrV \ + ((unsigned char)0x4B) +#define FT_ptgRefNV \ + ((unsigned char)0x4C) +#define FT_ptgAreaNV \ + ((unsigned char)0x4D) +#define FT_ptgMemAreaNV \ + ((unsigned char)0x4E) +#define FT_ptgMemNoMemNV \ + ((unsigned char)0x4F) +#define FT_ptgFuncCEV \ + ((unsigned char)0x58) +#define FT_ptgNameXV \ + ((unsigned char)0x59) +#define FT_ptgRef3dV \ + ((unsigned char)0x5A) +#define FT_ptgArea3dV \ + ((unsigned char)0x5B) +#define FT_ptgRefErr3dV \ + ((unsigned char)0x5C) +#define FT_ptgAreaErr3dV \ + ((unsigned char)0x5D) +#define FT_ptgArrayA \ + ((unsigned char)0x60) +#define FT_ptgFuncA \ + ((unsigned char)0x61) +#define FT_ptgFuncVarA \ + ((unsigned char)0x62) +#define FT_ptgNameA \ + ((unsigned char)0x63) +#define FT_ptgRefA \ + ((unsigned char)0x64) +#define FT_ptgAreaA \ + ((unsigned char)0x65) +#define FT_ptgMemAreaA \ + ((unsigned char)0x66) +#define FT_ptgMemErrA \ + ((unsigned char)0x67) +#define FT_ptgMemNoMemA \ + ((unsigned char)0x68) +#define FT_ptgMemFuncA \ + ((unsigned char)0x69) +#define FT_ptgRefErrA \ + ((unsigned char)0x6A) +#define FT_ptgAreaErrA \ + ((unsigned char)0x6B) +#define FT_ptgRefNA \ + ((unsigned char)0x6C) +#define FT_ptgAreaNA \ + ((unsigned char)0x6D) +#define FT_ptgMemAreaNA \ + ((unsigned char)0x6E) +#define FT_ptgMemNoMemNA \ + ((unsigned char)0x6F) +#define FT_ptgFuncCEA \ + ((unsigned char)0x78) +#define FT_ptgNameXA \ + ((unsigned char)0x79) +#define FT_ptgRef3dA \ + ((unsigned char)0x7A) +#define FT_ptgArea3dA \ + ((unsigned char)0x7B) +#define FT_ptgRefErr3dA \ + ((unsigned char)0x7C) +#define FT_ptgAreaErr3dA \ + ((unsigned char)0x7D) + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: formtags.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/globalrec.cpp b/uppdev/XLS/globalrec.cpp new file mode 100644 index 000000000..de35b40b2 --- /dev/null +++ b/uppdev/XLS/globalrec.cpp @@ -0,0 +1,1046 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/globalrec.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + + +/* +********************************************************************** +CGlobalRecords class implementation +********************************************************************** +*/ + +/* + +const font_init_t CGlobalRecords::m_Default_Fonts [GLOBAL_NUM_DEFAULT_FONT ] = +{ +{0x0000, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET}, +{0x0001, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET}, +{0x0002, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET}, +{0x0003, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET}, +{0x0005, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_ATTR_RESERVED0, 0x02, FONT_DFLT_CHARSET} +}; + +const format_t CGlobalRecords::m_Default_Formats[GLOBAL_NUM_DEFAULT_FORMATS ] = +{ + { 0x05, "\"$\"#,##0;\\-\"$\"#,##0" }, + { 0x06, "\"$\"#,##0;[Red]\\-\"$\"#,##0" }, + { 0x07, "\"$\"#,##0.00;\\-\"$\"#,##0.00" }, + { 0x08, "\"$\"#,##0.00;[Red]\\-\"$\"#,##0.00" }, + { 0x2a, "_-\"$\"* #,##0_-;\\-\"$\"* #,##0_-;_-\"$\"* \"-\"_-;_-@_-" }, + { 0x29, "_-* #,##0_-;\\-* #,##0_-;_-* \"-\"_-;_-@_-" }, + { 0x2c, "_-\"$\"* #,##0.00_-;\\-\"$\"* #,##0.00_-;_-\"$\"* \"-\"??_-;_-@_-" }, + { 0x2b, "_-* #,##0.00_-;\\-* #,##0.00_-;_-* \"-\"??_-;_-@_-" } +}; + +const xf_init_t CGlobalRecords::m_Default_XFs[GLOBAL_NUM_DEFAULT_XFS] = +{ + {0x0000, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0001, 0x0001, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0002, 0x0001, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0003, 0x0002, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0004, 0x0002, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0005, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0006, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0007, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0008, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x0009, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x000a, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x000b, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x000c, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x000d, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x000e, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK}, + {0x000f, 0x0000, 0x0000, HALIGN_GENERAL, VALIGN_BOTTOM, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_CELL , BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK} +}; +const style_t CGlobalRecords::m_Default_Styles [GLOBAL_NUM_DEFAULT_STYLES ] = +{ + {0x0010, 0x03 }, + {0x0011, 0x06 }, + {0x0012, 0x00 }, + {0x0013, 0x07 }, + {0x0000, 0x04 }, + {0x0014, 0x05 } +}; + +*/ + +/* +**************************************** +**************************************** +*/ + +CGlobalRecords::CGlobalRecords() + : m_DumpState(GLOBAL_INIT), + m_pCurrentData(NULL) +{ + + + // Initialize default fonts + font_t* newfont; + + newfont = new font_t(0x0000, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET); + newfont->MarkUsed(); + newfont->MarkUsed(); + m_DefaultFonts.push_back(newfont); + + newfont = new font_t(0x0001, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET); + newfont->MarkUsed(); + newfont->MarkUsed(); + m_DefaultFonts.push_back(newfont); + + newfont = new font_t(0x0002, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET); + newfont->MarkUsed(); + newfont->MarkUsed(); + m_DefaultFonts.push_back(newfont); + + newfont = new font_t(0x0003, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_DFLT_ATTRIBUTES, FONT_DFLT_FAMILY, FONT_DFLT_CHARSET); + newfont->MarkUsed(); + newfont->MarkUsed(); + m_DefaultFonts.push_back(newfont); + + newfont = new font_t(0x0004, "Arial", 0x00c8, BOLDNESS_NORMAL, UNDERLINE_NONE, SCRIPT_NONE, COLOR_BLACK, FONT_ATTR_RESERVED0, 0x02, FONT_DFLT_CHARSET); + newfont->MarkUsed(); + newfont->MarkUsed(); + m_DefaultFonts.push_back(newfont); + + // Initialize default formats +/* + format_t* newformat; + newformat = new format_t(0x05,"\"$\"#,##0;\\-\"$\"#,##0"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + + newformat = new format_t(0x06,"\"$\"#,##0;[Red]\\-\"$\"#,##0"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + + newformat = new format_t(0x07,"\"$\"#,##0.00;\\-\"$\"#,##0.00"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + + newformat = new format_t(0x08,"\"$\"#,##0.00;[Red]\\-\"$\"#,##0.00"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + + newformat = new format_t(0x27,"_-\"$\"* #,##0_-;\\-\"$\"* #,##0_-;_-\"$\"* \"-\"_-;_-@_-"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + + newformat = new format_t(0x29,"_-* #,##0_-;\\-* #,##0_-;_-* \"-\"_-;_-@_-"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + + newformat = new format_t(0x2c,"_-\"$\"* #,##0.00_-;\\-\"$\"* #,##0.00_-;_-\"$\"* \"-\"??_-;_-@_-"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + + newformat = new format_t(0x2b,"_-* #,##0.00_-;\\-* #,##0.00_-;_-* \"-\"??_-;_-@_-"); + newformat->MarkUsed(); + m_Formats.push_back(newformat); + +*/ + + // Initialize default XF records + xf_t* newxf; + newxf = new xf_t(0x0000, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0001, NULL/*0x0001*/, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0002, NULL/*0x0001*/, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0003, NULL/*0x0002*/, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0004, NULL/*0x0002*/, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0005, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0006, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0007, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0008, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x0009, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x000a, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x000b, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x000c, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x000d, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x000e, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_STYLE, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + newxf = new xf_t(0x000f, NULL, FMT_GENERAL, HALIGN_GENERAL, VALIGN_BOTTOM, INDENT_NONE, ORI_NONE, COLOR_BLACK, COLOR_WHITE, FILL_NONE, XF_LOCKED, XF_NO_HIDDEN, XF_NO_WRAPPED, XF_IS_CELL , BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK, BORDER_NONE, COLOR_BLACK); + newxf->MarkUsed(); + newxf->MarkUsed(); + m_DefaultXFs.push_back(newxf); + + + style_t* newstyle; + newstyle = new style_t; + newstyle->xfindex = 0x0010; + newstyle->builtintype = 0x03; + m_Styles.push_back(newstyle); + + newstyle = new style_t; + newstyle->xfindex = 0x0011; + newstyle->builtintype = 0x06; + m_Styles.push_back(newstyle); + + newstyle = new style_t; + newstyle->xfindex = 0x0012; + newstyle->builtintype = 0x00; + m_Styles.push_back(newstyle); + + newstyle = new style_t; + newstyle->xfindex = 0x0013; + newstyle->builtintype = 0x07; + m_Styles.push_back(newstyle); + + newstyle = new style_t; + newstyle->xfindex = 0x0000; + newstyle->builtintype = 0x04; + m_Styles.push_back(newstyle); + + newstyle = new style_t; + newstyle->xfindex = 0x0014; + newstyle->builtintype = 0x05; + m_Styles.push_back(newstyle); + + + +/* +// Initialize lists with de default values: +int i; + +for(i = 0; iSetIndex(next_fontindex); + next_fontindex++; + m_pCurrentData = (CUnit*)(new CFont(*font_dflt)); + + if(font_dflt != (--m_DefaultFonts.end())) + {// if it was'nt the last font from the list, increment to get the next one + font_dflt++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = GLOBAL_FONTS; + font_dflt = m_DefaultFonts.begin(); + } + + break; + } + case GLOBAL_FONTS:// ********** STATE 3B ************* + XTRACE("\tFONTS"); + { + + repeat = false; + + if(!m_Fonts.empty()) + {// First check if the list of fonts is not empty... + + + if((*font)->IsUsed()) + { + // According documentation, for backwards + // compatibility, there is no index 4. + if(next_fontindex==4) next_fontindex++; + (*font)->SetIndex(next_fontindex); + next_fontindex++; + m_pCurrentData = (CUnit*)(new CFont(*font)); + } + else + { + repeat = true; + } + + + if(font != (--m_Fonts.end())) + {// if it was'nt the last font from the list, increment to get the next one + font++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = GLOBAL_FORMATS; + font = m_Fonts.begin(); + } + } + else + {// if the list is empty, change the dump state. + m_DumpState = GLOBAL_FORMATS; + //font = m_Fonts.begin(); + repeat = true; + } + + break; + } + + case GLOBAL_FORMATS: // ********** STATE 4 ************* + { + + repeat = false; + + XTRACE("\tFORMATS"); + if(!m_Formats.empty()) + {// First check if the list of fonts is not empty... + + + if(/*(*format)->IsUsed()*/true) + { + if((*format)->GetIndex()!=0) + next_formatindex = (*format)->GetIndex(); + + (*format)->SetIndex(next_formatindex); + next_formatindex++; + m_pCurrentData = (CUnit*)(new CFormat(*format)); + } + else + { + repeat = true; + } + + if(format != (--m_Formats.end())) + {// if it was'nt the last font from the list, increment to get the next one + format++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = GLOBAL_DEFAULTXFS; + format = m_Formats.begin(); + } + } + else + {// if the list is empty, change the dump state. + m_DumpState = GLOBAL_DEFAULTXFS; + // format = m_Formats.begin(); + repeat = true; + } + + break; + } + + case GLOBAL_DEFAULTXFS: // ********** STATE 5a ************* + { + + repeat = false; + + XTRACE("\tXDEFAULTFS"); + + (*xf_dflt)->SetIndex(next_xfindex); + next_xfindex++; + + m_pCurrentData = (CUnit*)(new CExtFormat(*xf_dflt)); + + + if(xf_dflt != (--m_DefaultXFs.end())) + {// if it was'nt the last font from the list, increment to get the next one + xf_dflt++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = GLOBAL_XFS; + xf_dflt = m_DefaultXFs.begin(); + } + + break; + } + + case GLOBAL_XFS: // ********** STATE 5b ************* + { + + repeat = false; + + XTRACE("\tXFS"); + if(!m_XFs.empty()) + {// First check if the list of fonts is not empty... + + if((*xf)->IsUsed()) + { + (*xf)->SetIndex(next_xfindex); + next_xfindex++; + + m_pCurrentData = (CUnit*)(new CExtFormat(*xf)); + } + else + { + repeat = true; + } + + if(xf != (--m_XFs.end())) + {// if it was'nt the last font from the list, increment to get the next one + xf++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = GLOBAL_STYLES; + xf = m_XFs.begin(); + } + } + else + {// if the list is empty, change the dump state. + m_DumpState = GLOBAL_STYLES; + //xf = m_XFs.begin(); + repeat = true; + } + + break; + } + + case GLOBAL_STYLES: // ********** STATE 6 ************* + { + XTRACE("\tSTYLES"); + repeat = false; + + if(!m_Styles.empty()) + {// First check if the list of fonts is not empty... + + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = (CUnit*)(new CStyle(*style)); + + if(style != (--m_Styles.end())) + {// if it was'nt the last font from the list, increment to get the next one + style++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = GLOBAL_BOUNDSHEETS; + style = m_Styles.begin(); + } + } + else + {// if the list is empty, change the dump state. + m_DumpState = GLOBAL_BOUNDSHEETS; + //style = m_Styles.begin(); + repeat = true; + } + + break; + } + + + case GLOBAL_BOUNDSHEETS: // ********** STATE 7 ************* + { + repeat = false; + + XTRACE("\tBOUNDSHEETS"); + if(!m_BoundSheets.empty()) + {// First check if the list of fonts is not empty... + + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = (CUnit*)(new CBSheet(*bsheet)); + + if(bsheet != (--m_BoundSheets.end())) + {// if it was'nt the last font from the list, increment to get the next one + bsheet++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = GLOBAL_EOF; + bsheet = m_BoundSheets.begin(); + } + } + else + {// if the list is empty, change the dump state. + + m_DumpState = GLOBAL_EOF; + bsheet = m_BoundSheets.begin(); + repeat = true; + } + + break; + } + + case GLOBAL_EOF:// ********** STATE 8 ************* + XTRACE("\tEOF"); + + repeat = false; + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = (CUnit*)(new CEof()); + m_DumpState = GLOBAL_FINISH; + + break; + + case GLOBAL_FINISH: // ********** STATE 9 ************* + + XTRACE("\tFINISH"); + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = NULL; + m_DumpState = GLOBAL_INIT; + + break; + + default: + /* It shouldn't get here */ + XTRACE("\tDEFAULT"); + break; + + + } + } while(repeat); + + return m_pCurrentData; + +} + + +/* +**************************************** +**************************************** +*/ +void CGlobalRecords::AddBoundingSheet(unsigned32_t streampos, + unsigned16_t attributes, + string& sheetname) +{ + + boundsheet_t* bsheetdef = new boundsheet_t; + + bsheetdef->worksheet = (bool)((attributes & BSHEET_ATTR_WORKSHEET ) == BSHEET_ATTR_WORKSHEET ); + bsheetdef->ex4macro = (bool)((attributes & BSHEET_ATTR_EX4MACRO ) == BSHEET_ATTR_EX4MACRO ); + bsheetdef->chart = (bool)((attributes & BSHEET_ATTR_CHART ) == BSHEET_ATTR_CHART ); + bsheetdef->vbmodule = (bool)((attributes & BSHEET_ATTR_VBMODULE ) == BSHEET_ATTR_VBMODULE ); + bsheetdef->visible = (bool)((attributes & BSHEET_ATTR_VISIBLE ) == BSHEET_ATTR_VISIBLE ); + bsheetdef->hidden = (bool)((attributes & BSHEET_ATTR_HIDDEN ) == BSHEET_ATTR_HIDDEN ); + bsheetdef->veryhidden = (bool)((attributes & BSHEET_ATTR_VERYHIDDEN ) == BSHEET_ATTR_VERYHIDDEN); + + bsheetdef->asheetname = sheetname; + bsheetdef->streampos = streampos; + + m_BoundSheets.push_back(bsheetdef); + +} +#if VERSION_BIFF == VERSION_BIFF8 +void CGlobalRecords::AddBoundingSheet(unsigned32_t streampos, + unsigned16_t attributes, + ustring& sheetname +#ifdef HAVE_ICONV + , string& iconv_code +#endif + ) +{ + boundsheet_t* bsheetdef = new boundsheet_t; + + bsheetdef->worksheet = (bool)((attributes & BSHEET_ATTR_WORKSHEET ) == BSHEET_ATTR_WORKSHEET ); + bsheetdef->ex4macro = (bool)((attributes & BSHEET_ATTR_EX4MACRO ) == BSHEET_ATTR_EX4MACRO ); + bsheetdef->chart = (bool)((attributes & BSHEET_ATTR_CHART ) == BSHEET_ATTR_CHART ); + bsheetdef->vbmodule = (bool)((attributes & BSHEET_ATTR_VBMODULE ) == BSHEET_ATTR_VBMODULE ); + bsheetdef->visible = (bool)((attributes & BSHEET_ATTR_VISIBLE ) == BSHEET_ATTR_VISIBLE ); + bsheetdef->hidden = (bool)((attributes & BSHEET_ATTR_HIDDEN ) == BSHEET_ATTR_HIDDEN ); + bsheetdef->veryhidden = (bool)((attributes & BSHEET_ATTR_VERYHIDDEN ) == BSHEET_ATTR_VERYHIDDEN); + + bsheetdef->usheetname = sheetname; +#ifdef HAVE_ICONV + bsheetdef->iconv_code = iconv_code; +#endif + bsheetdef->streampos = streampos; + + m_BoundSheets.push_back(bsheetdef); + +} +#endif + +/* +**************************************** +**************************************** +*/ +void CGlobalRecords::AddBoundingSheet(boundsheet_t* bsheetdef) +{ + m_BoundSheets.push_back(bsheetdef); +} + + +/* +**************************************** +It returns pointers to BoundingSheets one by one until +all are spanned, in which case the returned pointer is NULL +**************************************** +*/ +void CGlobalRecords::GetBoundingSheets(Boundsheet_List_Itor_t& bs) +{ + if(bs != m_BoundSheets.end()) + bs++; + else + bs = m_BoundSheets.begin(); +} + + +Boundsheet_List_Itor_t CGlobalRecords::GetFirstBoundSheet() +{ + return m_BoundSheets.begin(); +} + +Boundsheet_List_Itor_t CGlobalRecords::GetEndBoundSheet() +{ + return m_BoundSheets.end(); +} + +/* +**************************************** +**************************************** +*/ + +font_t* CGlobalRecords::AddFont(font_t* newfont ) +{ + + newfont->SetIndex(0x0000); + pair itorpair = m_Fonts.insert(newfont); + + if(newfont != *itorpair.first) + delete newfont; + + return(*itorpair.first); + +} + +/* +**************************************** +**************************************** +*/ + +format_t* CGlobalRecords::AddFormat(format_t* newformat ) +{ + + newformat->SetIndex(0x0000); + m_Formats.push_back(newformat); + return(m_Formats.back()); + +} + + +/* +**************************************** +**************************************** +*/ + +xf_t* CGlobalRecords::AddXFormat(xf_t* xf) +{ + xf->SetIndex(0x0000); + pair itorpair = m_XFs.insert(xf); + + if(xf != *itorpair.first) + delete xf; + + return(*itorpair.first); +} + +xf_t* CGlobalRecords::ReplaceXFormat(xf_t* xf, xf_t* xfnew) +{ + XF_Set_Itor_t existing_xf; + existing_xf = m_XFs.find(xf); + + xf_t* inserted = NULL; + if(existing_xf != m_XFs.end()) + { + xf_t* todiexf = *existing_xf; + m_XFs.erase(existing_xf); + delete todiexf; + pair itorpair = m_XFs.insert(xfnew); + + inserted = *itorpair.first; + if(inserted != xfnew) + delete xfnew; + } + else + { + // This should never happen + // since the previous pointer is taken + // from the container itself... but anyway + pair itorpair = m_XFs.insert(xfnew); + + inserted = *itorpair.first; + if(inserted != xfnew) + delete xfnew; + } + return inserted; +} + +font_t* CGlobalRecords::ReplaceFont(font_t* fnt, font_t* fntnew) +{ + Font_Set_Itor_t existing_font; + existing_font = m_Fonts.find(fnt); + + font_t *inserted = NULL; + if(existing_font != m_Fonts.end()) + { + font_t* todiefont = *existing_font; + m_Fonts.erase(existing_font); + delete todiefont; + + pair itorpair = m_Fonts.insert(fntnew); + + inserted = *itorpair.first; + if(inserted != fntnew) + delete fntnew; + + } + else + { + // This should never happen + // since the previous pointer is taken + // from the container itself... but anyway + pair itorpair = m_Fonts.insert(fntnew); + + inserted = *itorpair.first; + if(inserted != fntnew) + delete fntnew; + + } + return inserted; + +} + + +font_t* CGlobalRecords::GetDefaultFont(void) +{ + return *m_DefaultFonts.begin(); + +} + +xf_t* CGlobalRecords::GetDefaultXF(void) +{ + return m_DefaultXFs.back(); + +} + +/* +**************************************** +Maybe the implementation of this procedure +can be optimized. +**************************************** +*/ + +unsigned32_t CGlobalRecords::GetSize(void) +{ + + CUnit* pdata = NULL; + unsigned32_t total_datasize = 0; + bool keep = true; + do + { + + pdata = DumpData(); + if(pdata != NULL) + { + total_datasize += pdata->GetDataSize(); + delete pdata; + } + else + { + keep = false; + } + + }while(keep); + + return total_datasize; + + +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: globalrec.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:56 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/globalrec.h b/uppdev/XLS/globalrec.h new file mode 100644 index 000000000..78a9fb258 --- /dev/null +++ b/uppdev/XLS/globalrec.h @@ -0,0 +1,179 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/globalrec.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef GLOBALREC_H +#define GLOBALREC_H + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace xlslib_core +{ + + /* +*********************************** +CGlobalRecords class declaration +*********************************** +*/ + + +#define GLOBAL_NUM_DEFAULT_FONT (5) +#define GLOBAL_NUM_DEFAULT_FORMATS (8) +#define GLOBAL_NUM_DEFAULT_XFS (16) +#define GLOBAL_NUM_DEFAULT_STYLES (6) + + + + typedef enum + { + GLOBAL_INIT, + GLOBAL_BOF, + GLOBAL_CODEPAGE, + GLOBAL_WINDOW1, + GLOBAL_DATEMODE, + GLOBAL_DEFAULTFONTS, + GLOBAL_FONTS, + GLOBAL_FORMATS, + GLOBAL_DEFAULTXFS, + GLOBAL_XFS, + GLOBAL_STYLES, + GLOBAL_BOUNDSHEETS, + GLOBAL_EOF, + GLOBAL_FINISH + } GlobalRecordDumpState_t; + + + + class CGlobalRecords: public CBiffSection + { + private: + Font_Set_t m_Fonts; + Font_List_t m_DefaultFonts; + Format_List_t m_Formats; + XF_Set_t m_XFs; + XF_List_t m_DefaultXFs; + Style_List_t m_Styles; + Boundsheet_List_t m_BoundSheets; + + /* + static const font_init_t m_Default_Fonts [GLOBAL_NUM_DEFAULT_FONT ]; + static const format_t m_Default_Formats[GLOBAL_NUM_DEFAULT_FORMATS ]; + static const xf_init_t m_Default_XFs [GLOBAL_NUM_DEFAULT_XFS ]; + static const style_t m_Default_Styles [GLOBAL_NUM_DEFAULT_STYLES ]; + */ + + // State Machine variables + + GlobalRecordDumpState_t m_DumpState; + CUnit* m_pCurrentData; + + public: + CGlobalRecords(); + ~CGlobalRecords(); + + void AddBoundingSheet(unsigned32_t streampos, + unsigned16_t attributes, + std::string& sheetname); +#if VERSION_BIFF == VERSION_BIFF8 + void AddBoundingSheet(unsigned32_t streampos, + unsigned16_t attributes, + std::ustring& sheetname +#ifdef HAVE_ICONV + , std::string& iconv_code +#endif + ); +#endif + void AddBoundingSheet(boundsheet_t* bsheetdef); + + + // TODO: Check if the font already exists (using CRC or raw comparison) + font_t* AddFont(font_t* newfont ); + format_t* AddFormat(format_t*); + + xf_t* AddXFormat(xf_t* xf); + xf_t* ReplaceXFormat(xf_t* xf, xf_t* xfnew); + font_t* ReplaceFont(font_t* fnt, font_t* fntnew); + + void GetBoundingSheets(Boundsheet_List_Itor_t &bs); + + // A Kind of state machine that will return + // a non-null pointer to the data unit until all data has been retrieved. + CUnit* DumpData(bool reset = false); + + Boundsheet_List_Itor_t GetFirstBoundSheet(); + Boundsheet_List_Itor_t GetEndBoundSheet(); + unsigned32_t GetSize(void); + font_t* GetDefaultFont(void); + xf_t* GetDefaultXF(void); + + private: + // Former static variiables + // ======================== + + // From DumpData + Font_Set_Itor_t font; + Font_List_Itor_t font_dflt; + Format_List_Itor_t format; + + XF_Set_Itor_t xf; + XF_List_Itor_t xf_dflt; + + unsigned16_t next_fontindex; + unsigned16_t next_xfindex; + unsigned16_t next_formatindex; + Style_List_Itor_t style; + Boundsheet_List_Itor_t bsheet; + }; + +} +#endif // GLOBALREC_H + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: globalrec.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/index.cpp b/uppdev/XLS/index.cpp new file mode 100644 index 000000000..951b55428 --- /dev/null +++ b/uppdev/XLS/index.cpp @@ -0,0 +1,158 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/index.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + + +/* +****************************** +CIndex class implementation +****************************** +*/ +CIndex::CIndex(unsigned32_t firstrow, + unsigned32_t lastrow) +{ + SetRecordType((signed32_t)RECTYPE_INDEX); + + AddValue32(INDEX_DFLT_RESERVED); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue16(firstrow); + AddValue16(lastrow+1); +#else + AddValue32(firstrow); + AddValue32(lastrow+1); +#endif + + AddValue32(INDEX_DFLT_RESERVED); +// NOTE: This record is created with an empty array. It should work if the rest +// of the record is not completed later, since the record's size reflects the +// lack of such array + SetRecordLength(GetDataSize()-4); +} + +CIndex::~CIndex() +{ +} + + +/* +********************************** +********************************** +*/ +void CIndex::AddDBCellOffset(unsigned32_t dboffset) +{ + AddValue32(dboffset); + + SetRecordLength(GetDataSize()-4); // Update record's length +} + +/* +********************************** +********************************** +*/ +void CIndex::SetRows(unsigned32_t firstrow, + unsigned32_t lastrow) +{ + +#if VERSION_BIFF == VERSION_BIFF5 + SetValueAt((signed16_t)firstrow, INDEX_OFFSET_B7FIRSTROW); + SetValueAt((signed16_t)lastrow, INDEX_OFFSET_B7LASTROW); +#else + SetValueAt((signed32_t)firstrow, INDEX_OFFSET_B7FIRSTROW); + SetValueAt((signed32_t)lastrow, INDEX_OFFSET_B7LASTROW); +#endif + +} + +/* +********************************** +********************************** +*/ + +unsigned32_t CIndex::GetFirstRow(void) +{ + + unsigned32_t retval; + +#if VERSION_BIFF == VERSION_BIFF5 + signed16_t firstrow; + GetValue16From(&firstrow, INDEX_OFFSET_B7FIRSTROW); + retval = firstrow; +#else + signed32_t firstrow; + GetValue32From(&firstrow, INDEX_OFFSET_B7FIRSTROW); + retval = firstrow; +#endif + + return retval; +} + +/* +********************************** +********************************** +*/ + +unsigned32_t CIndex::GetLastRow(void) +{ + + unsigned32_t retval; + +#if VERSION_BIFF == VERSION_BIFF5 + signed16_t lastrow; + GetValue16From(&lastrow, INDEX_OFFSET_B7LASTROW); + retval = lastrow; +#else + signed32_t lastrow; + GetValue32From(&lastrow, INDEX_OFFSET_B7LASTROW); + retval = lastrow; +#endif + + return retval; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: index.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:53 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/index.h b/uppdev/XLS/index.h new file mode 100644 index 000000000..b4c228f61 --- /dev/null +++ b/uppdev/XLS/index.h @@ -0,0 +1,86 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/index.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef INDEX_H +#define INDEX_H + +#include +#include +#include + +namespace xlslib_core +{ + + /* +****************************** +CIndex class declaration +****************************** +*/ +#define INDEX_DFLT_RESERVED ((unsigned32_t)0x00000000) + +#define INDEX_OFFSET_B7FIRSTROW ((unsigned32_t)8) +#define INDEX_OFFSET_B7LASTROW ((unsigned32_t)10) +#define INDEX_OFFSET_B8FIRSTROW ((unsigned32_t)8) +#define INDEX_OFFSET_B8LASTROW ((unsigned32_t)12) + + class CIndex: public CRecord + { + private: + + public: + + CIndex(unsigned32_t firstrow, + unsigned32_t lastrow); + ~CIndex(); + void AddDBCellOffset(unsigned32_t dbcoffset); + void SetRows(unsigned32_t firstrow, unsigned32_t lastrow); + unsigned32_t GetFirstRow(void); + unsigned32_t GetLastRow(void); + + }; + +} +#endif //INDEX_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: index.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/init b/uppdev/XLS/init new file mode 100644 index 000000000..91bcbc0e2 --- /dev/null +++ b/uppdev/XLS/init @@ -0,0 +1,4 @@ +#ifndef _XLS_icpp_init_stub +#define _XLS_icpp_init_stub +#include "Core/init" +#endif diff --git a/uppdev/XLS/label.cpp b/uppdev/XLS/label.cpp new file mode 100644 index 000000000..cc08791ff --- /dev/null +++ b/uppdev/XLS/label.cpp @@ -0,0 +1,262 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/label.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + +/* +****************************** +CLabel class implementation +****************************** +*/ +CLabel::CLabel(unsigned16_t row, + unsigned16_t col, + string& strlabel, + xf_t* pxfval) +{ + SetRecordType(RECTYPE_LABEL); + AddValue16(row); + AddValue16(col); + + unsigned16_t xfindex; + if(pxfval != NULL) + xfindex = pxfval->GetIndex(); + else + xfindex = 0x000f; + + + AddValue16(xfindex); + + signed16_t labelsize = strlabel.size(); +#if VERSION_BIFF == VERSION_BIFF5 + AddValue16((unsigned16_t)labelsize); + AddDataArray((unsigned8_t*)strlabel.c_str(), strlabel.size()); +#else + AddUnicodeStrlen((unsigned16_t)labelsize); + AddUnicodeString((unsigned8_t*)strlabel.c_str(), strlabel.size()); +#endif + + SetRecordLength(GetDataSize()-4); +} + +#if VERSION_BIFF == VERSION_BIFF8 + +CLabel::CLabel(unsigned16_t row, + unsigned16_t col, + ustring& ustrlabel +#ifdef HAVE_ICONV + , string& iconv_code +#endif + , xf_t* pxfval) +{ + unsigned16_t xfindex; + + SetRecordType(RECTYPE_LABEL); + AddValue16(row); + AddValue16(col); + + if(pxfval != NULL) + xfindex = pxfval->GetIndex(); + else + xfindex = 0x000f; + + AddValue16(xfindex); + +#ifdef HAVE_ICONV + u16string u16sheetname; + + Conv32to16(iconv_code, ustrlabel, u16sheetname); +// size_t outSize, resultSize; +// size_t iconv (iconv_t cd, char **restrict inbuf, size_t *restrict inbytesleft, char **restrict outbuf, size_t *restrict outbytesleft); + AddUnicodeStrlen((unsigned16_t)u16sheetname.size()); + AddUnicodeString((unsigned16_t* )u16sheetname.c_str(), u16sheetname.size()); +#else + AddUnicodeStrlen((unsigned16_t)ustrlabel.size()); + AddUnicodeString((unsigned16_t*)ustrlabel.c_str(), ustrlabel.size()); +#endif + + SetRecordLength(GetDataSize()-4); +} +#endif + +CLabel::CLabel(label_t& labeldef) + +{ + SetRecordType(RECTYPE_LABEL); + AddValue16(labeldef.GetRow()); + AddValue16(labeldef.GetCol()); + AddValue16(labeldef.GetXFIndex()); + + signed16_t labelsize = labeldef.GetStrLabelSize() ; + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue16((unsigned16_t)labelsize); + AddDataArray(labeldef.GetStrLabelBuffer(), labelsize); +#else + if(labeldef.GetStrLabelSize()) { + AddUnicodeStrlen((unsigned16_t)labelsize); + AddUnicodeString(labeldef.GetStrLabelBuffer(), labelsize); + } else { +#ifdef HAVE_ICONV + u16string u16sheetname; + string iconvStr; + ustring label; + + iconvStr = *labeldef.GetIconvCode(); + label = *labeldef.GetUstrLabel(); + + Conv32to16(iconvStr, label, u16sheetname); + // size_t outSize, resultSize; + // size_t iconv (iconv_t cd, char **restrict inbuf, size_t *restrict inbytesleft, char **restrict outbuf, size_t *restrict outbytesleft); + AddUnicodeStrlen((unsigned16_t)u16sheetname.size()); + AddUnicodeString((unsigned16_t* )u16sheetname.c_str(), u16sheetname.size()); +#else + labelsize = labeldef.GetWStrLabelSize() ; + AddUnicodeStrlen((unsigned16_t)labelsize); + AddUnicodeString((unsigned16_t*)labeldef.GetWStrLabelBuffer(), labelsize); +#endif + } +#endif + + SetRecordLength(GetDataSize()-4); +} + +CLabel::~CLabel() +{ +} + +/* +****************************** +label_t class implementation +****************************** +*/ +xlslib_core::label_t::label_t(unsigned16_t rowval, unsigned16_t colval, + string& labelstrval, xf_t* pxfval) +{ + row = rowval; + col = colval; + if(pxfval != NULL) + pxfval->MarkUsed(); + pxf = pxfval; + +#if VERSION_BIFF == VERSION_BIFF5 + if(labelstrval.size() > 255) + { + + labelstrval.resize(255); + labelstrval[252] = '.'; + labelstrval[253] = '.'; + labelstrval[254] = '.'; + + } +#endif + + aStrlabel = labelstrval; +} + +#if VERSION_BIFF == VERSION_BIFF8 +xlslib_core::label_t::label_t(unsigned16_t rowval, unsigned16_t colval, + ustring& labelstrval +#ifdef HAVE_ICONV + , string& code +#endif + , xf_t* pxfval) +{ + row = rowval; + col = colval; + if(pxfval != NULL) + pxfval->MarkUsed(); + pxf = pxfval; + + uStrlabel = labelstrval; +#ifdef HAVE_ICONV + iconv_code = code; +#endif +} +#endif + +/* +****************************** +****************************** +*/ + +unsigned16_t xlslib_core::label_t::GetSize() +{ + unsigned16_t size = 0; + + size += 12; // Minimal label's size + size += aStrlabel.size(); + + + return size; +} +/* +****************************** +****************************** +*/ + +CUnit* xlslib_core::label_t::GetData() +{ + CUnit* datalabel; + +#if VERSION_BIFF == VERSION_BIFF5 + datalabel = (CUnit*)( new CLabel(row,col,aStrlabel,pxf)); +#else + if(aStrlabel.length() > 0) { + datalabel = (CUnit*)( new CLabel(row,col,aStrlabel,pxf)); + } else { +#ifdef HAVE_ICONV + datalabel = (CUnit*)( new CLabel(row,col,uStrlabel,iconv_code, pxf)); +#else + datalabel = (CUnit*)( new CLabel(row,col,uStrlabel, pxf)); +#endif + } +#endif + + return datalabel; // NOTE: this pointer HAS to be deleted elsewhere. +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: label.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:53 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/label.h b/uppdev/XLS/label.h new file mode 100644 index 000000000..deba781d9 --- /dev/null +++ b/uppdev/XLS/label.h @@ -0,0 +1,131 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/label.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef LABEL_H +#define LABEL_H + +#include +#include +#include +#include +#include +#include + +namespace xlslib_core +{ + +#define LABEL_DFLT_XFINDEX ((unsigned16_t)0x000f) +#define LABEL_OFFSET_FIRSTCOL ((unsigned8_t)6) +#define LABEL_OFFSET_LASTCOL ((unsigned8_t)8) + + class label_t; + class CLabel: public CRecord + { + private: + + public: + CLabel(unsigned16_t row, + unsigned16_t col, + std::string& strlabel, + xf_t* pxfval = NULL); +#if VERSION_BIFF == VERSION_BIFF8 + CLabel(unsigned16_t row, + unsigned16_t col, + std::ustring& strlabel +#ifdef HAVE_ICONV + , std::string& iconv_code +#endif + , xf_t* pxfval = NULL); +#endif + CLabel(label_t& labeldef); + ~CLabel(); + }; + + class label_t: public cell_t + { + + private: + std::string aStrlabel; +#if VERSION_BIFF == VERSION_BIFF8 + std::ustring uStrlabel; +#ifdef HAVE_ICONV + std::string iconv_code; +#endif +#endif + public: + label_t(unsigned16_t rowval, + unsigned16_t colval, + std::string& labelstrval, + xf_t* pxfval = NULL); + +#if VERSION_BIFF == VERSION_BIFF8 + label_t(unsigned16_t rowval, + unsigned16_t colval, + std::ustring& labelstrval +#ifdef HAVE_ICONV + , std::string& code +#endif + , xf_t* pxfval = NULL); +#endif + ~label_t(){}; + + unsigned16_t GetStrLabelSize() {return aStrlabel.size();}; + const unsigned8_t* GetStrLabelBuffer(){return (unsigned8_t*)aStrlabel.c_str();}; +#if VERSION_BIFF == VERSION_BIFF8 + unsigned16_t GetWStrLabelSize() {return uStrlabel.size();}; + const uchar_t *GetWStrLabelBuffer(){return (uchar_t*)uStrlabel.c_str();}; + std::ustring *GetUstrLabel() { return &uStrlabel; }; +#ifdef HAVE_ICONV + std::string *GetIconvCode() { return &iconv_code; }; +#endif +#endif + unsigned16_t GetSize(); + CUnit* GetData(); + + }; + +} +#endif //LABEL_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: label.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/merged.cpp b/uppdev/XLS/merged.cpp new file mode 100644 index 000000000..33a1270d1 --- /dev/null +++ b/uppdev/XLS/merged.cpp @@ -0,0 +1,98 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/merged.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + +/* +****************************** +CMergedCells class implementation +****************************** +*/ +CMergedCells::CMergedCells() +{ + SetRecordType(RECTYPE_MERGEDCELLS); + + // By default the record is empty + AddValue16(0x00); + + SetRecordLength(GetDataSize()-4); +} + +CMergedCells::~CMergedCells() +{ +} + +/* +****************************** +****************************** +*/ + +void CMergedCells::AddRange(range_t* rng) +{ + AddValue16(rng->first_row); + AddValue16(rng->last_row); + AddValue16(rng->first_col); + AddValue16(rng->last_col); + + SetRecordLength(GetDataSize()-4); +} + +/* +****************************** +****************************** +*/ +void CMergedCells::SetNumRanges(unsigned16_t numranges) +{ + + SetValueAt((signed16_t)numranges, 0x04); + +} + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: merged.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:51 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + diff --git a/uppdev/XLS/merged.h b/uppdev/XLS/merged.h new file mode 100644 index 000000000..c49e86282 --- /dev/null +++ b/uppdev/XLS/merged.h @@ -0,0 +1,82 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/merged.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + + + + +#ifndef MERGED_H +#define MERGED_H + +#include +#include +#include +#include + +namespace xlslib_core +{ + + /* +****************************** +CMergedCells class declaration +****************************** +*/ + class CMergedCells: public CRecord + { + protected: + + public: + + CMergedCells(); + ~CMergedCells(); + + void AddRange(range_t* rng); + void SetNumRanges(unsigned16_t numranges); + + + }; +} + +#endif //MERGED_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: merged.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:44 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/number.cpp b/uppdev/XLS/number.cpp new file mode 100644 index 000000000..dcf4474da --- /dev/null +++ b/uppdev/XLS/number.cpp @@ -0,0 +1,121 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/number.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include + +using namespace std; +using namespace xlslib_core; + +CNumber::CNumber(unsigned16_t row, + unsigned16_t col, + double num, + xf_t* pxfval) +{ + + SetRecordType(RECTYPE_NUMBER); + AddValue16(row); + AddValue16(col); + + unsigned16_t xfindex; + pxfval != NULL? + xfindex = pxfval->GetIndex() + :xfindex = 0x000f; + AddValue16(xfindex); + + void* pnumieee = (void*) # + unsigned64_t numieee = *((unsigned64_t*)(pnumieee)); + AddValue64(numieee); + + SetRecordLength(GetDataSize()-4); + +} + +CNumber::CNumber(number_t& numdef) +{ + SetRecordType(RECTYPE_NUMBER); // DFH was RECTYPE_LABEL, must have been a type ???? + AddValue16(numdef.GetRow()); + AddValue16(numdef.GetCol()); + AddValue16(numdef.GetXFIndex()); + + double num = numdef.GetNumber(); + void* pnumieee = (void*) # + unsigned64_t numieee = *((unsigned64_t*)(pnumieee)); + + AddValue64(numieee); + + SetRecordLength(GetDataSize()-4); +} + +CNumber::~CNumber() +{ +} + +/* +********************************* +number_t class implementation +********************************* +*/ +number_t::number_t(unsigned16_t rowval, + unsigned16_t colval, + double numval, + xf_t* pxfval) +{ + row = rowval; + col = colval; + number = numval; + + if(pxfval != NULL) + pxfval->MarkUsed(); + pxf = pxfval; + +} + +CUnit* number_t::GetData() { + CUnit* datanum = + (CUnit*)( new CNumber(row,col,number, pxf)); + return datanum; // NOTE: this pointer HAS to be deleted elsewhere. +} + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: number.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:55 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/number.h b/uppdev/XLS/number.h new file mode 100644 index 000000000..50dff7f1f --- /dev/null +++ b/uppdev/XLS/number.h @@ -0,0 +1,101 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/number.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef NUMBER_H +#define NUMBER_H + +#include +#include +#include +#include +#include + + +namespace xlslib_core +{ + + class number_t; + class CNumber: public CRecord + { + private: + + + public: + CNumber(unsigned16_t row, + unsigned16_t col, + double num, + xf_t* pxfval = NULL); + + CNumber(number_t& blankdef); + ~CNumber(); + + + }; + + + class number_t: public cell_t + { + + private: + double number; + public: + number_t(unsigned16_t rowval, + unsigned16_t colval, + double numval, + xf_t* pxfval = NULL); + + ~number_t(){}; + + unsigned16_t GetSize(){return 18;}; + double GetNumber() {return number;}; + CUnit* GetData(); + + }; + + +} + +#endif //NUMBER_H + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: number.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/ole/binfile.h b/uppdev/XLS/ole/binfile.h new file mode 100644 index 000000000..095e6b531 --- /dev/null +++ b/uppdev/XLS/ole/binfile.h @@ -0,0 +1,116 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/binfile.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef BINFILE_H +#define BINFILE_H + +#include +#include + +#include +#include +#include + +namespace xlslib_core +{ + + /* +****************************** +CBinFile class declaration +****************************** +*/ + +#ifdef XLS_PHP + typedef int (*write_fptr_t)(const char *str, unsigned int str_length); +#endif + + class CBinFile + { + private: + int write_service(const char *buffer, size_t size); + static const int STROKE_CHUNK_SIZE; + public: + CBinFile(); + CBinFile(const std::string& name); + ~CBinFile(); + + + int Open(const std::string& name); + int Close(void); + int Write ( unsigned8_t * data, unsigned32_t size ); + int Write (CUnit& data_unit ); + + int WriteByte(unsigned8_t byte); + int WriteUnsigned16(unsigned16_t data); + int WriteUnsigned32(unsigned32_t data); + int WriteSigned16(signed16_t data); + int WriteSigned32(signed32_t data); + int WriteByteArray(const unsigned8_t *data, size_t size); + int SerializeFixedArray(const unsigned8_t data, unsigned32_t size); + + unsigned32_t Position(); // debugging, position of stream + +#ifdef XLS_PHP + void SetStroke(){ + is_stroke= true; + } + void UnSetStroke(){ + is_stroke= false; + } +#endif + + protected: + std::ofstream m_File; +#ifdef XLS_PHP + write_fptr_t write_fptr; + bool is_stroke; +#endif + + }; + +} + +#endif //BINFILE_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: binfile.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/ole/oledoc.h b/uppdev/XLS/ole/oledoc.h new file mode 100644 index 000000000..289bb44cd --- /dev/null +++ b/uppdev/XLS/ole/oledoc.h @@ -0,0 +1,172 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/oledoc.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef OLEDOC_H +#define OLEDOC_H + +#include +#include + +#include +#include +#include + +namespace xlslib_core +{ + +#define HEADPOS_ID ((unsigned16_t)(0x00)) +#define HEADPOS_UK1 ((unsigned16_t)(0x08)) +#define HEADPOS_UK2 ((unsigned16_t)(0x0c)) +#define HEADPOS_UK2b ((unsigned16_t)(0x10)) /* According to the Excel sample... but undocummented */ +#define HEADPOS_UK3 ((unsigned16_t)(0x14)) +#define HEADPOS_UK4 ((unsigned16_t)(0x18)) +#define HEADPOS_UK5 ((unsigned16_t)(0x1a)) +#define HEADPOS_UK6 ((unsigned16_t)(0x1c)) +#define HEADPOS_LOG2_BIGBLOCK ((unsigned16_t)(0x1e)) +#define HEADPOS_LOG2_SMALLBLOCK ((unsigned16_t)(0x20)) +#define HEADPOS_UK7 ((unsigned16_t)(0x24)) +#define HEADPOS_UK8 ((unsigned16_t)(0x28)) +#define HEADPOS_BAT_COUNT ((unsigned16_t)(0x2c)) +#define HEADPOS_PROPERTIES_SB ((unsigned16_t)(0x30)) +#define HEADPOS_UK9 ((unsigned16_t)(0x34)) +#define HEADPOS_UK10 ((unsigned16_t)(0x38)) +#define HEADPOS_SBAT_COUNT ((unsigned16_t)(0x40)) +#define HEADPOS_SBAT_START ((unsigned16_t)(0x3c)) +#define HEADPOS_XBAT_START ((unsigned16_t)(0x44)) +#define HEADPOS_XBAT_COUNT ((unsigned16_t)(0x48)) +#define HEADPOS_BAT_ARRAY ((unsigned16_t)(0x4c)) + + +#define HEADVAL_DFLT_NOTUSED ((unsigned8_t) (0xff) ) +#define HEADVAL_DFLT_UK1 ((signed32_t) (0x00) ) +#define HEADVAL_DFLT_UK2 ((signed32_t) (0x00) ) +#define HEADVAL_DFLT_UK2b ((signed32_t) (0x00) )/* According to the Excel sample... but undocummented */ +#define HEADVAL_DFLT_UK3 ((signed32_t) (0x00) ) +#define HEADVAL_DFLT_UK4 ((signed16_t) (0x3e) )/*POIFS documentations says 0x3b... let's stick with the Excel sample ...*/ +#define HEADVAL_DFLT_UK5 ((signed16_t) (0x03) ) +#define HEADVAL_DFLT_UK6 ((signed16_t) (-2) ) +#define HEADVAL_DFLT_UK7 ((signed32_t) (0x00) ) +#define HEADVAL_DFLT_UK8 ((signed32_t) (0x00) ) +#define HEADVAL_DFLT_UK9 ((signed32_t) (0x00) ) +#define HEADVAL_DFLT_UK10 ((signed32_t) (0x1000)) + + +#define HEADVAL_DFLT_LOG2_BIGBLOCK ((signed16_t)(9)) +#define HEADVAL_DFLT_LOG2_SMALLBLOCK ((signed32_t)(6)) +#define HEADVAL_DFLT_BATCOUNT ((signed32_t)(0) ) +#define HEADVAL_DFLT_PROPERTIES_SB ((signed32_t)(-2) ) +#define HEADVAL_DFLT_SBAT_START ((signed32_t)(-2) ) +#define HEADVAL_DFLT_SBAT_COUNT ((signed32_t)(0) ) //POIFS says it should be 1 ... let's stick to M$ +#define HEADVAL_DFLT_XBAT_START ((signed32_t)(-2) ) +#define HEADVAL_DFLT_XBAT_COUNT ((signed32_t)(0) ) +// #define HEADVAL_DFLT_BAT_ARRAY /* Cannot have a default value */ + +#define HEAD_SIZE BIG_BLOCK_SIZE +#define HEAD_ID_SZ (0x08) + +#define BAT_NOT_USED_BYTE ((unsigned8_t)(0xff)) // could be char is not signed +#define BAT_NOT_USED ((signed32_t)(-1)) +#define BAT_END_CHAIN ((signed32_t)(-2)) +#define BAT_SELF_PLACE ((signed32_t)(-3)) +#define BAT_MSAT_PLACE ((signed32_t)(-4)) + +#define BAT_ENTRIES_PER_BLOCK (BIG_BLOCK_SIZE/4) // BAT blocks are filled - no pointers +#define BAT_BLOCKS_PER_MSAT_BLOCK (BAT_ENTRIES_PER_BLOCK - 1) // pointer to next, or final terminator +#define HEADER_SAT_SIZE 109 + + /* +****************************** +COleFile class declaration +****************************** +*/ + // Block allocation strategy. Within the OLE header are 109 slots for BAT Sectors. + // But, when the file gets big, you run out (127 sectors in each BAT Sector). So, + // the 110th BAT has to go into a special block dedicated to hold these. One additional + // block gets you 127 more BAT entries, and so forth. + // + typedef struct { + unsigned32_t bat_entries; // total number of entries + unsigned32_t _bat_entries; // debug - count'm + unsigned32_t bat_count; // total number of sectors used for real data + unsigned32_t _bat_count; // debug - count'm + unsigned32_t msat_count; // total number of additional Master Sector Allocations Blocks (each hold 127) + unsigned32_t header_bat_count; // first 109 used + unsigned32_t extra_bat_count; // in addition to first 109 + unsigned32_t header_fill; // padding in main header only! + unsigned32_t extra_fill; // padding in last MSAT! + } blocks, *blocksP; + + class COleDoc: public CBinFile, public COleFileSystem + { + private: + int DumpHeader(blocks bks, unsigned32_t total_data_size); + int DumpData(void); + int DumpDepots(blocks bks); + int DumpFileSystem(void); + + signed16_t GetUnicodeName(const char* name, char** ppname_unicode); + int DumpNode(COleProp& node); + + blocks GetBATCount(); + + + static const unsigned8_t OLE_FILETYPE[]; + + + protected: + + + + public: + COleDoc(); + //COleDoc(const string& file_name); + ~COleDoc(); + + int DumpOleFile(); + }; + +} + +#endif //OLEDOC_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: oledoc.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/ole/olefs.h b/uppdev/XLS/ole/olefs.h new file mode 100644 index 000000000..09646776e --- /dev/null +++ b/uppdev/XLS/ole/olefs.h @@ -0,0 +1,104 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/olefs.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef OLEFS_H +#define OLEFS_H + +#include +#include + +#include +#include + +namespace xlslib_core +{ + +#define FS_NO_ERRORS ((int)0) +#define FS_INVALID_PATH ((int)-1) +#define FS_NODE_ALREADY_EXISTS ((int)-2) +#define FS_NODE_NOT_A_DIRECTORY ((int)-3) + + + /* +*********************************** +COleFileSystem class declaration +*********************************** +*/ + class COleFileSystem + { + private: + + public: + COleProp m_RootEntry; /// temporally public (for debugging) + + int GetNode(std::string const &path, Tree_Level_Itor_t& node); + + int AddDirectory(std::string const &dir_path); + int AddFile(std::string const &dir_path, CDataStorage* pdata); + + int AddNode(COleProp* base_node, StringList_t& path_list); + int SearchNode(COleProp* base_node, StringList_t& path_list, Tree_Level_Itor_t& node_level); + + + void GetAllNodesList(NodeList_t& node_list, COleProp* base_node); + void GetAllNodes(NodeList_t& node_list); + void SortList(NodeList_t& node_list); + + + signed32_t m_nProperty_Count; + + COleProp& GetRootEntry(); + unsigned32_t GetTotalDataSize(); + unsigned32_t GetNumDataFiles(); + + public: + COleFileSystem(); + ~COleFileSystem(); + + }; + +} +#endif //OLEFS_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: olefs.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/ole/oleprop.h b/uppdev/XLS/ole/oleprop.h new file mode 100644 index 000000000..53ae6519a --- /dev/null +++ b/uppdev/XLS/ole/oleprop.h @@ -0,0 +1,165 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/oleprop.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef OLEPROP_H +#define OLEPROP_H + +#include +#include + +#include +#include +#include + +namespace xlslib_core +{ + + class COleProp; + + typedef std::list Tree_Level_List_t; + typedef Tree_Level_List_t::iterator Tree_Level_Itor_t; + + + typedef std::list NodeList_t; + typedef NodeList_t::iterator NodeList_Itor_t; + + + /* +****************************** +COleProp class declaration +****************************** +*/ + class COleProp + { + protected: + std::string m_sName; + unsigned16_t m_nNameSize; + unsigned8_t m_nPropType; + unsigned8_t m_nNodeColor; + + signed32_t m_nPrevPropIndex; + signed32_t m_nNextPropIndex; + signed32_t m_nChildPropIndex; + + signed32_t m_nTSCreatedSeconds; + signed32_t m_nTSCreatedDays; + signed32_t m_nTSModifiedSeconds; + signed32_t m_nTSModifiedDays; + + signed32_t m_nStartBlock; + signed32_t m_nSize; + + // The following set of attributes are not part of the definition of + // an OleDoc's property: + + CDataStorage* m_pData; + signed32_t m_nIndex; + + public: + Tree_Level_List_t m_Child_List; + + COleProp(); + COleProp(signed32_t node_index, + std::string name, + CDataStorage* data = NULL); + ~COleProp(); + + + + + int Init(signed32_t node_index, + std::string name, + CDataStorage* data = NULL); + + + int SetName(std::string name); + std::string GetName(void); + + int SetIndex(signed32_t newindex); + signed32_t GetIndex(void); + + int SetSize(signed32_t size); + signed32_t GetSize(void); + + int SetType(unsigned8_t newtype); + unsigned8_t GetType(void); + + int SetColor(unsigned8_t newcolor); + unsigned8_t GetColor(void); + + int SetPreviousIndex(signed32_t prev); + signed32_t GetPreviousIndex(void); + + int SetNextIndex(signed32_t next); + signed32_t GetNextIndex(void); + + int SetChildIndex(signed32_t child); + signed32_t GetChildIndex(void); + + int SetStartBlock(signed32_t sb); + signed32_t GetStartBlock(void); + + + void SetDataPointer(CDataStorage* pdata); + CDataStorage* GetDataPointer(void); + + + void SetCreatedSecs(signed32_t sec1); + signed32_t GetCreatedSecs(void); + void SetCreatedDays(signed32_t day1); + signed32_t GetCreatedDays(void); + + void SetModifiedSecs(signed32_t sec2); + signed32_t GetModifiedSecs(void); + void SetModifiedDays(signed32_t day2); + signed32_t GetModifiedDays(void); + + + }; + +} + + +#endif //OLEPROP_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: oleprop.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/oledoc.cpp b/uppdev/XLS/oledoc.cpp new file mode 100644 index 000000000..8f31e0dd2 --- /dev/null +++ b/uppdev/XLS/oledoc.cpp @@ -0,0 +1,547 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/oledoc.cpp,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include + +using namespace std; +using namespace xlslib_core; + +/* +*********************************** +COleDoc class implementation +*********************************** +*/ +const unsigned8_t COleDoc::OLE_FILETYPE[] = +{ 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1}; + + +COleDoc::COleDoc() +{ + +} +/* + COleDoc::COleDoc(const string& file_name) + { + Open(file_name); + + } +*/ + +COleDoc::~COleDoc() +{ + +} + +/* +*********************************** +*********************************** +*/ + +int COleDoc::DumpHeader(blocks bks, unsigned32_t total_data_size) +{ + unsigned32_t i, total_data_blocks, sectorID, msatID; + int errcode = NO_ERRORS; + + total_data_blocks = total_data_size/BIG_BLOCK_SIZE; + +#if OLE_DEBUG + fprintf(stderr, "dataBlocks=%u\n", total_data_blocks), fflush(stderr); +#endif + // [00]FILETYPE + WriteByteArray(COleDoc::OLE_FILETYPE, /*(unsigned32_t)*/sizeof(COleDoc::OLE_FILETYPE)); + // [08]UK1 + WriteSigned32(HEADVAL_DFLT_UK1); + // [0c]UK2 + WriteSigned32(HEADVAL_DFLT_UK2); + // [10]UK2b + WriteSigned32(HEADVAL_DFLT_UK2b); + // [14]UK3 + WriteSigned32(HEADVAL_DFLT_UK3); + // [18]UK4 + WriteSigned16(HEADVAL_DFLT_UK4); + // [1a]UK5 + WriteSigned16(HEADVAL_DFLT_UK5); + // [1c]UK6 + WriteSigned16(HEADVAL_DFLT_UK6); + // [1e]LOG_2_BIG_BLOCK + WriteSigned16(HEADVAL_DFLT_LOG2_BIGBLOCK); + // [20]LOG_2_SMALL_BLOCK + WriteSigned32(HEADVAL_DFLT_LOG2_SMALLBLOCK); + // [24]UK7 + WriteSigned32(HEADVAL_DFLT_UK7); + // [28]UK8 + WriteSigned32(HEADVAL_DFLT_UK8); + + // [2c] BAT_COUNT (BBDEPOT NUM BLOCKS) + WriteUnsigned32(bks.bat_count); + + //[30] PROPERTIES_START_BLOCK + // Since the big block depot will go immediately after the data, I need + // to know the size of the data and the size of the BAT in blocks (prev) + WriteUnsigned32(bks.msat_count+total_data_blocks+bks.bat_count); +#if OLE_DEBUG + fprintf(stderr, "HEADER says directory at %d\n", bks.msat_count+total_data_blocks+bks.bat_count); +#endif + // [34] UK9 + WriteSigned32(HEADVAL_DFLT_UK9); + // [38] UK10 + WriteSigned32(HEADVAL_DFLT_UK10); + + // [3c] SBAT_START + // No small blocks will be used, so this is set to the default empty value + WriteSigned32(HEADVAL_DFLT_SBAT_START); + + // [40] SBAT_BLOCKCOUNT_NUMBER + // Use the default value + WriteSigned32(HEADVAL_DFLT_SBAT_COUNT); + + // [44] XBAT_START + // we will use first and possibly additional blocks for large files + WriteSigned32(bks.msat_count ? 0 : HEADVAL_DFLT_XBAT_START); +#if OLE_DEBUG + fprintf(stderr, "xbatStart=%d\n", bks.msat_count ? 0 : HEADVAL_DFLT_XBAT_START), fflush(stderr); +#endif + + // [48] XBAT_COUNT + WriteUnsigned32(bks.msat_count); // was HEADVAL_DFLT_XBAT_COUNT (0) +#if OLE_DEBUG + fprintf(stderr, "msat_count=%d\n", bks.msat_count), fflush(stderr); +#endif + + // [4C] BAT_ARRAY + // The BAT_ARRAY shall be calculated from the number of BAT blocks and their position + + // The additional blocks, if needed, are directly below the header block, so we can write + // them out contiguously. The special conditions are: + // * for each MSAT block, the last entry needs to be a pointer to the next block + // * the fill is -1 for all unused entries + // * if there are MSAT blocks, the very last entry in the last block is a special marker + // first sector ID + sectorID = bks.msat_count + total_data_blocks; + for(i=0; iGetType() == PTYPE_FILE) + { + for(DataList_Itor_t j = (*i)->GetDataPointer()->begin(); + j != (*i)->GetDataPointer()->end(); j++) + { + WriteByteArray((*j)->GetBuffer(), (*j)->GetDataSize()); + } + } + } + + return errcode; +} + +/* +*********************************** +*********************************** +*/ +int COleDoc::DumpDepots(blocks bks) +{ + int errcode = NO_ERRORS; + + NodeList_t node_list; + GetAllNodes(node_list); + unsigned32_t bat_index; + + bat_index = 0; + + // tells Excel that these are used by the MSAT + for(unsigned32_t i=0; iSetStartBlock(bat_index); + // Write the chain for this node element + data_size = (*node)->GetDataPointer()->GetDataSize(); + chain_len = data_size/BIG_BLOCK_SIZE - 1; +#if OLE_DEBUG + fprintf(stderr, "NODE[%d]: start_block=%d data=%d Sectors= %d\n", foo, bat_index, chain_len + 1 /* directory_terminator */); +#endif + for(unsigned32_t i = 0; i < chain_len; i++) + { + WriteSigned32(++bat_index); + ++bks._bat_entries; + } + + // Set the terminator number + WriteSigned32(BAT_END_CHAIN); + ++bat_index; + ++bks._bat_entries; + } + +#if OLE_DEBUG + fprintf(stderr, "BAT_SELF_PLACE=%d -> %d TOTAL=%d\n", bat_index+1, bat_index+1+bks.bat_count+1, bks.bat_count); +#endif + // Write the -3 number for every index in the BAT that references to some BAT block (uh!?) + for(unsigned32_t i=0; i bat_block_capacity || bat_num_blocks != bat_blocks_needed) { + bat_num_blocks = bat_blocks_needed; + if(bat_num_blocks > HEADER_SAT_SIZE) { + msat_bats = bat_num_blocks - HEADER_SAT_SIZE; + msat_blocks = msat_bats/BAT_BLOCKS_PER_MSAT_BLOCK; + if(msat_bats % BAT_BLOCKS_PER_MSAT_BLOCK) ++msat_blocks; + } + + bat_num_entries = msat_blocks + data_bat_entries + bat_num_blocks + dir_bat_entries; // bat_bat_entries + + // based on what we know now, this is what we need + bat_blocks_needed = bat_num_entries/BAT_ENTRIES_PER_BLOCK; + if(bat_num_entries % BAT_ENTRIES_PER_BLOCK) ++bat_blocks_needed; + + // number of slots available + bat_block_capacity = HEADER_SAT_SIZE + BAT_BLOCKS_PER_MSAT_BLOCK*msat_blocks; +#if OLE_DEBUG + fprintf(stderr, "bat_blocks=%d capacity=%d needed=%d\n", bat_num_blocks, bat_block_capacity, bat_blocks_needed); +#endif + } + + if(bat_num_blocks > HEADER_SAT_SIZE) { + extra_bats = bat_num_blocks - HEADER_SAT_SIZE; + + bks.msat_count = msat_blocks; + bks.header_bat_count = HEADER_SAT_SIZE; + bks.extra_bat_count = extra_bats; + + last_block_extras = extra_bats % BAT_BLOCKS_PER_MSAT_BLOCK; + if(last_block_extras) { + bks.extra_fill = BAT_BLOCKS_PER_MSAT_BLOCK - last_block_extras; + } + } else { + bks.header_bat_count = bat_num_blocks; + bks.header_fill = HEADER_SAT_SIZE - bat_num_blocks; + } + bks.bat_entries = bat_num_entries; + bks.bat_count = bat_num_blocks; + +#if OLE_DEBUG + fprintf(stderr, "entries=%u bats=%d msats=%d headerBats=%d extraBats=%d headFill=%d extraFill=%d\n", bks.bat_entries, + bks.bat_count, bks.msat_count, bks.header_bat_count, bks.extra_bat_count, bks.header_fill, bks.extra_fill); +#endif + + return bks; +} + + +/* +*********************************** +*********************************** +*/ +// NOTE: name_unicode has to be deleted after this function finishes. +// Ideally, this function should be implemented as part of a std::string +// derived class, so the array would be deleted automatically + + +signed16_t COleDoc::GetUnicodeName(const char* name, char** ppname_unicode) +{ + unsigned16_t name_size = strlen(name); + if(name_size > PROPERTY_MAX_NAME_LENGTH) + name_size = PROPERTY_MAX_NAME_LENGTH; + + unsigned8_t size_unicode = (name_size+1)*2; + + if(*ppname_unicode != NULL) delete[] *ppname_unicode; + *ppname_unicode = (char*)new unsigned8_t[size_unicode]; + memset(*ppname_unicode, 0x00, size_unicode); + + for(int i=0; i<(size_unicode/2-1); i++) + (*ppname_unicode)[2*i] = name[i]; + + return size_unicode; +} + + + +/* +*********************************** +*********************************** +*/ +int COleDoc::DumpNode(COleProp& node) +{ + + int errcode = NO_ERRORS; + char* name_unicode = NULL; + + // Get the unicode name and its size + signed16_t size_name = GetUnicodeName(node.GetName().c_str(), &name_unicode); + + // [00] PROPERTY_NAME + WriteByteArray((const unsigned8_t*)name_unicode, size_name); + + // Fill the rest of the name field with 0x00 + SerializeFixedArray(PROPERTY_DFLT_NOTUSED, PPTPOS_NAMELENGTH - size_name); + + // [40] NAME_SIZE + WriteSigned16(size_name); + + // [42] PROPERTY_TYPE + WriteByte(node.GetType()); + + // [43] NODE_COLOR + WriteByte(node.GetColor()); + + // [44] PREVIOUS_PROP + WriteSigned32(node.GetPreviousIndex()); + // [48] NEXT_PROP + WriteSigned32(node.GetNextIndex()); + // [4c] CHILD_PROP + WriteSigned32(node.GetChildIndex()); + + // Fill empty block + SerializeFixedArray(PROPERTY_DFLT_NOTUSED, (PPTPOS_SECS1 - PPTPOS_UNUSED_EMPTY0)); + + //[64]...[70] + // SECONDS_1, DAYS_2, SECONDS_2, DAYS_2 + WriteSigned32(node.GetCreatedSecs()); + WriteSigned32(node.GetCreatedDays()); + WriteSigned32(node.GetModifiedDays()); + WriteSigned32(node.GetModifiedSecs()); + + // [74] START_BLOCK +#if OLE_DEBUG + fprintf(stderr, "START_BLOCK_1=%d\n", node.GetStartBlock() ); +#endif + WriteSigned32(node.GetStartBlock()); + + // [78] SIZE + if(node.GetType() == PTYPE_FILE) + WriteSigned32(node.GetSize()); + else + WriteSigned32(0); + + // A unused space: + WriteSigned32(PROPERTY_DFLT_NOTUSED); + + delete[] name_unicode; + name_unicode = NULL; + + return errcode; + +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: oledoc.cpp,v $ + * Revision 1.3 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:04 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/olefs.cpp b/uppdev/XLS/olefs.cpp new file mode 100644 index 000000000..1594c96aa --- /dev/null +++ b/uppdev/XLS/olefs.cpp @@ -0,0 +1,523 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/olefs.cpp,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include +#include +#include + +using namespace std; +using namespace xlslib_core; + +/* +*********************************** +COleFileSystem class Implementation +*********************************** +*/ + + + +COleFileSystem::COleFileSystem() + :m_RootEntry((signed32_t)0,string("Root Entry")), + m_nProperty_Count(0) +{ + + m_RootEntry.SetType(PTYPE_ROOT); + m_RootEntry.SetSize(0); + m_RootEntry.SetPreviousIndex( PLINK_EMPTY); + m_RootEntry.SetNextIndex( PLINK_EMPTY); + m_RootEntry.SetChildIndex( PLINK_EMPTY); + m_RootEntry.SetStartBlock( PBLOCK_END); + m_RootEntry.SetColor(PROPERTY_COLOR_NODE_BLACK); + m_RootEntry.SetDataPointer(NULL); + + + m_RootEntry.SetCreatedSecs(PPT_DFLT_SECS1); + m_RootEntry.SetCreatedDays(PPT_DFLT_DAYS1); + m_RootEntry.SetModifiedSecs(PPT_DFLT_SECS2); + m_RootEntry.SetModifiedDays(PPT_DFLT_DAYS2); + + + +} + +COleFileSystem::~COleFileSystem() +{ + +} + +/* +*********************************** +*********************************** +*/ + +int COleFileSystem::GetNode(string const &path, Tree_Level_Itor_t& node) +{ + + StringList_t path_list; + stringtok(path_list, path, "/"); + + int retval = SearchNode(&m_RootEntry, path_list, node); + + // Delete dinamically created strings of path_list + // anyway the list is deleted iside SearchNode... + for (StringListItor_t pl = path_list.begin(); pl != path_list.end(); pl++) + delete *pl; + + return retval; +} + +/* +*********************************** +*********************************** +*/ + +int COleFileSystem::SearchNode(COleProp* base_node, StringList_t& path_list, Tree_Level_Itor_t& node_level) +{ + int errcode = FS_INVALID_PATH; + + if(!((base_node->m_Child_List).empty())) + { + for (StringListItor_t node_name = path_list.begin(); node_name != path_list.end(); ++node_name) + for(node_level = (base_node->m_Child_List).begin(); node_level != (base_node->m_Child_List).end(); node_level++) + { + if (**node_name == (*node_level)->GetName()) + { + + delete path_list.front(); + path_list.pop_front(); // Remove the found element from path + if(path_list.empty()) // If it was the last element return it + { + + return FS_NO_ERRORS; + } + else + { // Recursively continue the search + return SearchNode(*node_level, path_list, node_level); + } + } + } + } + + return errcode; + + + +} + + +/* +*********************************** +*********************************** +*/ + +int COleFileSystem::AddDirectory(string const &dir_path) +{ + int errcode = NO_ERRORS; + StringList_t path_list; + + stringtok(path_list, dir_path, "/"); + errcode = AddNode(&m_RootEntry, path_list); + + // Delete dinamically created strings of path_list + for (StringListItor_t pl = path_list.begin(); pl != path_list.end(); pl++) + delete *pl; + + if(errcode == FS_NO_ERRORS) + { + Tree_Level_Itor_t newnode; + GetNode(dir_path, newnode); + (*newnode)->SetChildIndex(PLINK_EMPTY); + (*newnode)->SetType(PTYPE_DIRECTORY); + (*newnode)->SetSize(0); + (*newnode)->SetColor(PROPERTY_COLOR_NODE_BLACK); + (*newnode)->SetDataPointer(NULL); + + (*newnode)->SetCreatedSecs(PPT_DFLT_SECS1); + (*newnode)->SetCreatedDays(PPT_DFLT_DAYS1); + (*newnode)->SetModifiedSecs(PPT_DFLT_SECS2); + (*newnode)->SetModifiedDays(PPT_DFLT_DAYS2); + + } + + + + return errcode; +} + + +/* +*********************************** +*********************************** +*/ +#define MIN_DATA_SIZE (0x1000) + +// TODO: Change the DataStorage pass-argument + +int COleFileSystem::AddFile(string const &dir_path, CDataStorage* pdata) +{ + int errcode = NO_ERRORS; + StringList_t path_list; + + + // NOTE: Token analysis can be done inside of AddNode: + stringtok(path_list, dir_path, "/"); + errcode = AddNode(&m_RootEntry, path_list); + + // Delete dinamically created strings of path_list + for (StringListItor_t pl = path_list.begin(); pl != path_list.end(); pl++) + delete *pl; + + + if(errcode == FS_NO_ERRORS) + { + Tree_Level_Itor_t newnode; + GetNode(dir_path, newnode); + (*newnode)->SetType(PTYPE_FILE); + (*newnode)->SetChildIndex(PLINK_EMPTY); + + + // Calculate the trail data size needed to complete a BIG_BLOCK + unsigned32_t trail_size = (pdata->GetDataSize() % BIG_BLOCK_SIZE)? + (BIG_BLOCK_SIZE - (pdata->GetDataSize() % BIG_BLOCK_SIZE)):0; + + // This library won't use Small Blocks, so all data elements shall be >0x1000 + if ((trail_size + pdata->GetDataSize()) < MIN_DATA_SIZE) + { + trail_size = MIN_DATA_SIZE - pdata->GetDataSize(); + (*newnode)->SetSize(MIN_DATA_SIZE); + } + else + { + // The size stored in the node is the actual size of the data (not the filled-to-bigblock one) + (*newnode)->SetSize(pdata->GetDataSize() + trail_size); + } + + // create the trail data unit. + CUnit* ptraildata = new CUnit; + ptraildata->AddFixedDataArray(0x00, trail_size); + (*pdata) += ptraildata; + + (*newnode)->SetDataPointer(pdata); + + (*newnode)->SetColor(PROPERTY_COLOR_NODE_BLACK); + (*newnode)->SetCreatedSecs(PPT_DFLT_SECS1); + (*newnode)->SetCreatedDays(PPT_DFLT_DAYS1); + (*newnode)->SetModifiedSecs(PPT_DFLT_SECS2); + (*newnode)->SetModifiedDays(PPT_DFLT_DAYS2); + + + } + + + + return errcode; +} + +/* +*********************************** +*********************************** +*/ + +/* + +Some special adding-node cases: + +- The path to reach the node doesn't exist +- The the node already exists + +*/ + +int COleFileSystem::AddNode(COleProp* base_node, StringList_t& path_list) +{ + + int errcode; + + if(!(base_node->m_Child_List).empty()) + { + for(Tree_Level_Itor_t node_child = (base_node->m_Child_List).begin(); + node_child != (base_node->m_Child_List).end(); node_child++) + { + if((*node_child)->GetName() == **path_list.begin()) + { + delete path_list.front(); + path_list.pop_front(); // Remove the found element from path + return AddNode(*node_child, path_list); + } + } + } + //if the path element wasn't found, the program gets here + //... and we have two possible reasons: + // 1. The path isn't correct, so no node is created and an error msg have to be returned + // (one of the intermediate nodes is empty or doesn't exist: there are more than one path elements left) + // 2. The node is the new one we want to create. + + + // if the size of the path is 0, the node already existed + if(path_list.size() != 1) + { + if (path_list.size() == 0) + errcode = FS_NODE_ALREADY_EXISTS; + else + errcode = FS_INVALID_PATH; + } + else + { + unsigned8_t base_node_type = base_node->GetType(); + if(base_node_type == PTYPE_DIRECTORY || base_node_type == PTYPE_ROOT) + { + +#if 0 + COleProp newnode(++m_nProperty_Count, *path_list.begin()); + + bool was_firstborn = false; + + if((base_node->m_Child_List).empty()) //if this is the first child of the node... + { + base_node->SetChildIndex(m_nProperty_Count); // the new one is the child + newnode.SetPreviousIndex(PLINK_EMPTY); // there is no previous + was_firstborn = true;// mark for later + } + + // The next-index of the new node shall to point to nowhere + newnode.SetNextIndex(PLINK_EMPTY); + (base_node->m_Child_List).push_back(newnode); + + // Get the just added node + Tree_Level_Itor_t nodeadded = (base_node->m_Child_List).end(); + nodeadded--; + + // Get the previous to the just added node + Tree_Level_Itor_t prev_to_nodeadded = (base_node->m_Child_List).end(); + prev_to_nodeadded--;prev_to_nodeadded--; + + + if(!was_firstborn) + nodeadded->SetPreviousIndex(prev_to_nodeadded->GetIndex()); + + // Set the next-index of the previous node to point to the newone + prev_to_nodeadded->SetNextIndex(nodeadded->GetIndex()); + +#else +//////////// + COleProp* newnode = new COleProp(++m_nProperty_Count, **path_list.begin()); + size_t childnum = (base_node->m_Child_List).size(); + + if(!(base_node->m_Child_List).empty()) //if this is the first child of the node... + { + Tree_Level_Itor_t lastnode = (base_node->m_Child_List).end(); + lastnode--; + + if(1 == childnum) + { + base_node->SetChildIndex(newnode->GetIndex()); // The 2nd child is the entry always + newnode->SetPreviousIndex((*lastnode)->GetIndex()); // The previous is the only element of the list + } + else + { + (*lastnode)->SetNextIndex(newnode->GetIndex()); + newnode->SetPreviousIndex(PLINK_EMPTY); // there is no previous + } + newnode->SetNextIndex(PLINK_EMPTY); // there is no next + newnode->SetChildIndex(PLINK_EMPTY); // there is no child + + } + else + { + base_node->SetChildIndex(m_nProperty_Count); // the new one is the child + newnode->SetPreviousIndex(PLINK_EMPTY); // there is no previous + newnode->SetNextIndex(PLINK_EMPTY); // there is no next + newnode->SetChildIndex(PLINK_EMPTY); // there is no child + } + + + (base_node->m_Child_List).push_back(newnode); + +#endif + errcode = FS_NO_ERRORS; + } + else + { + errcode = FS_NODE_NOT_A_DIRECTORY; + } + } + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ + +void COleFileSystem::GetAllNodes(NodeList_t& node_list) +{ + + GetAllNodesList(node_list, &m_RootEntry); + SortList(node_list); + +} +/* +*********************************** +*********************************** +*/ + + +void COleFileSystem::GetAllNodesList(NodeList_t& node_list, COleProp* base_node) +{ + + if(!(base_node->m_Child_List).empty()) + { + for(Tree_Level_Itor_t child_node = (base_node->m_Child_List).begin(); + child_node != (base_node->m_Child_List).end(); child_node++ ) + { + GetAllNodesList(node_list, (*child_node)); + node_list.push_back((*child_node)); + } + + } + else + { + return; + } +} + + +/* +*********************************** +An horribly inefficient sorting routine.... +... until I find the way of using the list::sort() function so +I can specify the sorting criteria (for this case, a member variable +of the elements of the list. +*********************************** +*/ + +void COleFileSystem::SortList(NodeList_t& node_list) +{ + NodeList_t node_list_shadow = node_list; + + node_list.erase(node_list.begin(), node_list.end()); + + NodeList_Itor_t i; + int index = 1; + + + do{ + for(i = node_list_shadow.begin(); i != node_list_shadow.end(); i++) + { + if((*i)->GetIndex() == index) + { + node_list.push_back(*i); + node_list_shadow.erase(i); + index++; + break; + } + } + + }while(!node_list_shadow.empty()); +} + + +/* +*********************************** +*********************************** +*/ + +unsigned32_t COleFileSystem::GetTotalDataSize() +{ + + NodeList_t node_list; + GetAllNodes(node_list); + unsigned32_t total_size = 0; + + for(NodeList_Itor_t i = node_list.begin(); i != node_list.end(); i++) + { + if((*i)->GetType() == PTYPE_FILE) + total_size += (*i)->GetDataPointer()->GetDataSize(); + + } + + return total_size; + +} + + +/* +*********************************** +*********************************** +*/ + +unsigned32_t COleFileSystem::GetNumDataFiles() +{ + NodeList_t node_list; + GetAllNodes(node_list); + unsigned32_t total_files = 0; + + for(NodeList_Itor_t i = node_list.begin(); i != node_list.end(); i++) + { + if((*i)->GetType() == PTYPE_FILE) + total_files ++; + + } + + return total_files; + + + +} + +/* +*********************************** +*********************************** +*/ + +COleProp& COleFileSystem::GetRootEntry() +{ + return m_RootEntry; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: olefs.cpp,v $ + * Revision 1.3 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:04 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/oleprop.cpp b/uppdev/XLS/oleprop.cpp new file mode 100644 index 000000000..c4d882738 --- /dev/null +++ b/uppdev/XLS/oleprop.cpp @@ -0,0 +1,412 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/oledoc/oleprop.cpp,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include + +/* +*********************************** +COleProp class Implementation +*********************************** +*/ + +using namespace std; +using namespace xlslib_core; + + + +COleProp::COleProp() + : m_pData(NULL) +{ + +} + +/* +*********************************** +*********************************** +*/ + +COleProp::COleProp(signed32_t node_index, + string name, + CDataStorage* data) + : m_sName(name), m_pData(data), m_nIndex(node_index) +{ + +} + +COleProp::~COleProp() +{ + + for(Tree_Level_Itor_t chld = m_Child_List.begin(); chld != m_Child_List.end(); chld++) + delete *chld; + + +} + + + +/* +*********************************** +*********************************** +*/ + +int COleProp::Init(signed32_t node_index, + string name, + CDataStorage* data) +{ + int errcode = NO_ERRORS; + + SetName(name); + m_pData = data; + m_nIndex = node_index; + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ + +int COleProp::SetName(string name) +{ + int errcode = NO_ERRORS; + + m_nNameSize = name.size() + 1; + m_sName = name; + + return errcode; +} + +/* +*********************************** +*********************************** +*/ + +string COleProp::GetName(void) +{ + return m_sName; +} + +/* +*********************************** +*********************************** +*/ +int COleProp::SetIndex(signed32_t newindex) +{ + int errcode = NO_ERRORS; + + m_nIndex = newindex; + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ + +signed32_t COleProp::GetIndex(void) +{ + return m_nIndex; +} + +/* +*********************************** +*********************************** +*/ +int COleProp::SetType(unsigned8_t newtype) +{ + int errcode = NO_ERRORS; + + m_nPropType = newtype; + + return errcode; +} + +/* +*********************************** +*********************************** +*/ +unsigned8_t COleProp::GetType(void) +{ + return m_nPropType; +} + +/* +*********************************** +*********************************** +*/ +int COleProp::SetColor(unsigned8_t newcolor) +{ + int errcode = NO_ERRORS; + + m_nNodeColor = newcolor; + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ +unsigned8_t COleProp::GetColor(void) +{ + return m_nNodeColor; +} + +/* +*********************************** +*********************************** +*/ +int COleProp::SetPreviousIndex(signed32_t prev) +{ + int errcode = NO_ERRORS; + + m_nPrevPropIndex = prev; + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ +signed32_t COleProp::GetPreviousIndex(void) +{ + return m_nPrevPropIndex; +} + +/* +*********************************** +*********************************** +*/ +int COleProp::SetNextIndex(signed32_t next) +{ + int errcode = NO_ERRORS; + + m_nNextPropIndex = next; + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ +signed32_t COleProp::GetNextIndex(void) +{ + return m_nNextPropIndex; +} + +/* +*********************************** +*********************************** +*/ +int COleProp::SetChildIndex(signed32_t child) +{ + int errcode = NO_ERRORS; + + m_nChildPropIndex = child; + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ +signed32_t COleProp::GetChildIndex(void) +{ + return m_nChildPropIndex; +} + +int COleProp::SetStartBlock(signed32_t sb) +{ + int errcode = NO_ERRORS; + + m_nStartBlock = sb; + + return errcode; + +} +signed32_t COleProp::GetStartBlock(void) +{ + return m_nStartBlock; +} + +/* +*********************************** +*********************************** +*/ +int COleProp::SetSize(signed32_t size) +{ + int errcode = NO_ERRORS; + + m_nSize = size; + + return errcode; + +} + +/* +*********************************** +*********************************** +*/ + +signed32_t COleProp::GetSize(void) +{ + return m_nSize; +} + +/* +*********************************** +*********************************** +*/ + + +void COleProp::SetDataPointer(CDataStorage* pdata) +{ + + m_pData = pdata; +} + +/* +*********************************** +*********************************** +*/ + +CDataStorage* COleProp::GetDataPointer(void) +{ + return m_pData; +} + + + + +/* +*********************************** +*********************************** +*/ +void COleProp::SetCreatedSecs(signed32_t secs1) +{ + m_nTSCreatedSeconds = secs1; +} +/* +*********************************** +*********************************** +*/ +signed32_t COleProp::GetCreatedSecs(void) +{ + return m_nTSCreatedSeconds; +} + + +/* +*********************************** +*********************************** +*/ +void COleProp::SetCreatedDays(signed32_t days1) +{ + m_nTSCreatedDays = days1; +} + +/* +*********************************** +*********************************** +*/ +signed32_t COleProp::GetCreatedDays(void) +{ + return m_nTSCreatedDays; +} + + +/* +*********************************** +*********************************** +*/ +void COleProp::SetModifiedSecs(signed32_t secs2) +{ + m_nTSModifiedSeconds = secs2; +} + +/* +*********************************** +*********************************** +*/ +signed32_t COleProp::GetModifiedSecs(void) +{ + return m_nTSModifiedSeconds; +} + +/* +*********************************** +*********************************** +*/ + +void COleProp::SetModifiedDays(signed32_t days2) +{ + m_nTSModifiedDays = days2; +} + +/* +*********************************** +*********************************** +*/ +signed32_t COleProp::GetModifiedDays(void) +{ + + return m_nTSModifiedDays; +} + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: oleprop.cpp,v $ + * Revision 1.3 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:04 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:31:43 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/overnew.cpp b/uppdev/XLS/overnew.cpp new file mode 100644 index 000000000..2b4baa584 --- /dev/null +++ b/uppdev/XLS/overnew.cpp @@ -0,0 +1,93 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/common/overnew.cpp,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include + +/******************************************************************** + The new() operator is overloaded only for the PHP_EXTENSION version +********************************************************************/ +#if 0 + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#ifdef __cplusplus +} +#endif + +void* operator new(size_t sz) throw (std::bad_alloc) +{ + void* m = emalloc(sz); + if(!m) throw std::bad_alloc(); + return m; +} + +void operator delete(void* m) +{ + efree(m); +} + +void* operator new[](size_t sz) throw (std::bad_alloc) +{ + void* m = emalloc(sz); + if(!m) throw std::bad_alloc(); + return m; +} + +void operator delete[](void* m) +{ + efree(m); +} + +#endif + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: overnew.cpp,v $ + * Revision 1.3 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:04 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:32:05 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/overnew.h b/uppdev/XLS/overnew.h new file mode 100644 index 000000000..051584084 --- /dev/null +++ b/uppdev/XLS/overnew.h @@ -0,0 +1,71 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/common/overnew.h,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef OVERNEW_H +#define OVERNEW_H + +#include +#include + +/******************************************************************** + The new() operator is overloaded only for the PHP_EXTENSION version +********************************************************************/ +#if 0 + +#include +#include + +using namespace std; +void* operator new(size_t sz) throw (std::bad_alloc); +void operator delete(void* m); +void* operator new[](size_t sz) throw (std::bad_alloc); +void operator delete[](void* m); + + +#endif +#endif //OVERNEW_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: overnew.h,v $ + * Revision 1.3 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:04 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:32:05 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/range.cpp b/uppdev/XLS/range.cpp new file mode 100644 index 000000000..1aa3c536d --- /dev/null +++ b/uppdev/XLS/range.cpp @@ -0,0 +1,257 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/range.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + + +range::range(unsigned16_t row1, + unsigned16_t col1, + unsigned16_t row2, + unsigned16_t col2, + worksheet* pws, + bool atomic) + : m_Atomic(atomic), m_pWorkSheet(pws) +{ + first_row = row1; + last_row = row2; + first_col = col1; + last_col = col2; +} + + +range::~range() +{ +} + +void range::cellcolor(color_name_t color) +{ + unsigned16_t r,c; + for(r = first_row; r <= last_row; r++) + for(c = first_col; c <= last_col; c++) + { + cell_t* cell = m_pWorkSheet->FindCell(r,c); + cell->fillfgcolor(color); + cell->fillstyle(FILL_SOLID); + + } +} +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + xf_i interface implementation for range class + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#define SET_RANGE_FUNCTION(function, value) \ + { \ + uint16_t r,c; \ + for(r = first_row; r <= last_row; r++) \ + for(c = first_col; c <= last_col; c++) \ + { \ + cell_t* cell = m_pWorkSheet->FindCell(r,c); \ + cell->function(value); \ + } \ + } + +void range::font(font_t* fontidx) +{ + SET_RANGE_FUNCTION(font, fontidx); +/* + int r,c; + for(r = first_row; r <= last_row; r++) + for(c = first_col; c <= last_col; c++) + { + cell_t* cell = m_pWorkSheet->FindCell(r,c); + cell->font(fontidx); + } +*/ +} + +void range::borderstyle(border_side_t side, + border_style_t style, + color_name_t color) +{ + unsigned16_t r,c; + for(r = first_row; r <= last_row; r++) + for(c = first_col; c <= last_col; c++) + { + cell_t* cell = m_pWorkSheet->FindCell(r,c); + cell->borderstyle(side, style, color); + } + +} + +void range::format(format_number_t formatidx) +{ + SET_RANGE_FUNCTION(format,formatidx); +} + +void range::halign(halign_option_t ha_option) +{ + SET_RANGE_FUNCTION(halign,ha_option); +} + +void range::valign(valign_option_t va_option) +{ + SET_RANGE_FUNCTION(valign,va_option); +} +void range::indent(indent_option_t indent_option) +{ + SET_RANGE_FUNCTION(indent,indent_option); +} +void range::orientation(txtori_option_t ori_option) +{ + SET_RANGE_FUNCTION(orientation,ori_option); +} + +void range::fillfgcolor(color_name_t color) +{ + SET_RANGE_FUNCTION(fillfgcolor,color); +} + +void range::fillbgcolor(color_name_t color) +{ + SET_RANGE_FUNCTION(fillbgcolor,color); +} + +void range::fillstyle(fill_option_t fill) +{ + SET_RANGE_FUNCTION(fillstyle,fill); +} + +void range::locked(bool locked_opt) +{ + SET_RANGE_FUNCTION(locked,locked_opt); +} + +void range::hidden(bool hidden_opt) +{ + SET_RANGE_FUNCTION(hidden,hidden_opt); +} + +void range::wrap(bool wrap_opt) +{ + SET_RANGE_FUNCTION(wrap,wrap_opt); +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + font_i interface implementation for range class + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +void range::fontname(string fntname) +{ + SET_RANGE_FUNCTION(fontname,fntname); +} + +void range::fontheight(unsigned16_t fntheight) +{ + SET_RANGE_FUNCTION(fontheight,fntheight); +} + +void range::fontbold(boldness_option_t fntboldness) +{ +/* + int r,c; + for(r = first_row; r <= last_row; r++) + for(c = first_col; c <= last_col; c++) + { + cell_t* cell = m_pWorkSheet->FindCell(r,c); + cell->fontbold(fntboldness); + } +*/ + SET_RANGE_FUNCTION(fontbold,fntboldness); +} + +void range::fontunderline(underline_option_t fntunderline) +{ + SET_RANGE_FUNCTION(fontunderline,fntunderline); +} + +void range::fontscript(script_option_t fntscript) +{ + SET_RANGE_FUNCTION(fontscript,fntscript); +} + +void range::fontcolor(color_name_t fntcolor) +{ + SET_RANGE_FUNCTION(fontcolor,fntcolor); +} + +void range::fontattr(unsigned16_t attr) +{ + SET_RANGE_FUNCTION(fontattr,attr); +} + +void range::fontitalic(bool italic) +{ + SET_RANGE_FUNCTION(fontitalic,italic); +} + +void range::fontstrikeout(bool so) +{ + SET_RANGE_FUNCTION(fontstrikeout,so); +} + +void range::fontoutline(bool ol) +{ + SET_RANGE_FUNCTION(fontoutline,ol); +} + +void range::fontshadow(bool sh) +{ + SET_RANGE_FUNCTION(fontshadow,sh); +/* + { + int r,c; + for(r = first_row; r <= last_row; r++) + for(c = first_col; c <= last_col; c++) + { + cell_t* cell = m_pWorkSheet->FindCell(r,c); + cell->fontshadow(sh); + } + } +*/ +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: range.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:56 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/range.h b/uppdev/XLS/range.h new file mode 100644 index 000000000..fcd0def60 --- /dev/null +++ b/uppdev/XLS/range.h @@ -0,0 +1,112 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/range.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef RANGE_H +#define RANGE_H + +#include +#include + +#include +#include +#include +#include + +namespace xlslib_core +{ + class worksheet; + class range + : public xf_i, + public font_i, + private range_t + + { + public: + range(unsigned16_t row1, unsigned16_t col1, + unsigned16_t row2, unsigned16_t col2, + worksheet* pws, + bool atomic = false); + virtual ~range(); + + void cellcolor(color_name_t color); + + private: + bool m_Atomic; + worksheet* m_pWorkSheet; + + public: // xf_i interface declaration + void font(font_t* fontidx); + void format(format_number_t formatidx); + void halign(halign_option_t ha_option); + void valign(valign_option_t va_option); + void indent(indent_option_t indent_option); + void orientation(txtori_option_t ori_option); + void fillfgcolor(color_name_t color); + void fillbgcolor(color_name_t color); + void fillstyle(fill_option_t fill); + void locked(bool locked_opt); + void hidden(bool hidden_opt); + void wrap(bool wrap_opt); + void borderstyle(border_side_t side, + border_style_t style, + color_name_t color); + + public: // font_i interface declaration + void fontname(std::string fntname); + void fontheight(unsigned16_t fntheight); + void fontbold(boldness_option_t fntboldness); + void fontunderline(underline_option_t fntunderline); + void fontscript(script_option_t fntscript); + void fontcolor(color_name_t fntcolor); + void fontattr(unsigned16_t attr); + void fontitalic(bool italic); + void fontstrikeout(bool so); + void fontoutline(bool ol); + void fontshadow(bool sh); + }; +} + +#endif //RANGE_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: range.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + \ No newline at end of file diff --git a/uppdev/XLS/recdef.cpp b/uppdev/XLS/recdef.cpp new file mode 100644 index 000000000..81a9f74ab --- /dev/null +++ b/uppdev/XLS/recdef.cpp @@ -0,0 +1,485 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/recdef.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + +/* +****************************** +CBof class implementation +****************************** +*/ + +CBof::CBof(unsigned16_t boftype) +{ + SetRecordType(RECTYPE_BOF ); + + AddValue16(VERSION_BIFF); + AddValue16(boftype); + AddValue16(BOF_BUILD_DFLT); + AddValue16(BOF_YEAR_DFLT); + +#if VERSION_BIFF == VERSION_BIFF8 + AddValue32(0); //The file hystory flags are all set to zero + AddValue32(VERSION_BIFF); // The lowest BIFF version +#endif + + SetRecordLength(GetDataSize()-4); +} + +CBof::~CBof() +{} + +/* +****************************** +CEof class implementation +****************************** +*/ +CEof::CEof() +{ + SetRecordType(RECTYPE_EOF ); + SetRecordLength(GetDataSize()-4); +} + +CEof::~CEof() +{ +} + +/* +********************************** +CCodePage class implementation +********************************** +*/ + +CCodePage::CCodePage(unsigned16_t boftype) +{ + SetRecordType(RECTYPE_CODENAME); + + AddValue16(boftype); + + SetRecordLength(GetDataSize()-4); +} + +CCodePage::~CCodePage() +{} + +/* +********************************** +CWindow1 class implementation +********************************** +*/ +CWindow1::CWindow1() +{ + SetRecordType(RECTYPE_WINDOW1); + + // The data of this record is hardcoded, since for file creation + // this value takes a default (window dimensions and position). + + // NOTE: Doublecheck the previous statement!! + unsigned8_t recwin1[] = {0x40,0x02,0xfc,0x00,0xe0,0x37,0xe0,0x25, + 0x38,0x00,0x00,0x00,0x00,0x00,0x01,0x00, 0x58,0x02}; + + AddDataArray(recwin1, sizeof(recwin1)); + + SetRecordLength(GetDataSize()-4); +} + +CWindow1::~CWindow1() +{ +} + +/* +********************************** +CDateMode class implementation +********************************** +*/ + +CDateMode::CDateMode() +{ + SetRecordType(RECTYPE_R1904); + +#ifdef __APPLE__ + AddValue16(1); // 1904 +#else + AddValue16(0); // 1900 +#endif + SetRecordLength(GetDataSize()-4); +} + +CDateMode::~CDateMode() +{} + +/* +********************************** +CWindow2 class implementation +********************************** +*/ +CWindow2::CWindow2() +{ + SetRecordType(RECTYPE_WINDOW2); + + AddValue16(W2_DFLT_GRBIT); + AddValue16(W2_DFLT_TOPROW); + AddValue16(W2_DFLT_LEFTCOL); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue32(W2_DFLT_COLOR); +#else + AddValue16(0); // 0 == BLACK + AddValue16(0); + AddValue16(0); // zoom, default == 0 (W2_DFLT_ZOOMPBPREV ???) + AddValue16(0); // xoom, default == 0 (W2_DFLT_ZOOMNORMAL ???) + AddValue32(W2_DFLT_RESERVED); +#endif + + SetRecordLength(GetDataSize()-4); +} + +CWindow2::~CWindow2() +{ +} + +/* +********************************** +CDimension class implementation +********************************** +*/ +CDimension::CDimension(unsigned32_t minRow, unsigned32_t maxRow, unsigned32_t minCol, unsigned32_t maxCol) +{ + SetRecordType(RECTYPE_DIMENSIONS); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue16((unsigned26_t)minRow); + AddValue16((unsigned26_t)(maxRow+1)); +#else + AddValue32(minRow); + AddValue32(maxRow+1); +#endif + AddValue16(minCol); + AddValue16(maxCol+1); // zoom, default == 0 (W2_DFLT_ZOOMPBPREV ???) + AddValue16(W2_DFLT_RESERVED); + + SetRecordLength(GetDataSize()-4); +} + +CDimension::~CDimension() +{ +} + +/* +********************************** +********************************** +*/ +void CWindow2::SetSelected() +{ + unsigned16_t grbitval; + GetValue16From((signed16_t*)&grbitval, W2_OFFSET_GRBIT); + + grbitval |= W2_GRBITMASK_SELECTED; + + SetValueAt((signed16_t)grbitval, W2_OFFSET_GRBIT); + +} + +/* +********************************** +********************************** +*/ +void CWindow2::SetPaged() +{ + unsigned16_t grbitval; + GetValue16From((signed16_t*)&grbitval, W2_OFFSET_GRBIT); + + grbitval |= W2_GRBITMASK_PAGED; + + SetValueAt((signed16_t)grbitval, W2_OFFSET_GRBIT); + +} + +/* +********************************** +********************************** +*/ +void CWindow2::ClearSelected() +{ + unsigned16_t grbitval; + GetValue16From((signed16_t*)&grbitval, W2_OFFSET_GRBIT); + + grbitval &= (~W2_GRBITMASK_SELECTED); + + SetValueAt((signed16_t)grbitval, W2_OFFSET_GRBIT); + +} + +/* +********************************** +********************************** +*/ +void CWindow2::ClearPaged() +{ + unsigned16_t grbitval; + GetValue16From((signed16_t*)&grbitval, W2_OFFSET_GRBIT); + + grbitval &= (~W2_GRBITMASK_PAGED); + + SetValueAt((signed16_t)grbitval, W2_OFFSET_GRBIT); + +} + + +/* +********************************** +CPalette class implementation +********************************** +*/ +/* + CPalette::CPalette() + { + SetRecordType(RECTYPE_PALETTE); + + // The data of this record is hardcoded, since for file creation + // this value takes a default (Documentation says that if the BIFF + // file doesn't have a PALETTE record, it uses a default palette, but + // somehow if this record is removed Excel displays an error). + unsigned8_t palette[] = + { + 0x38,0x00,0x00,0x00, 0x00,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0x00, + 0x00,0xff,0x00,0x00,0x00,0x00,0xff,0x00, 0xff,0xff,0x00,0x00,0xff,0x00,0xff,0x00, + 0x00,0xff,0xff,0x00,0x80,0x00,0x00,0x00, 0x00,0x80,0x00,0x00,0x00,0x00,0x80,0x00, + 0x80,0x80,0x00,0x00,0x80,0x00,0x80,0x00, 0x00,0x80,0x80,0x00,0xc0,0xc0,0xc0,0x00, + 0x80,0x80,0x80,0x00,0x99,0x99,0xff,0x00, 0x99,0x33,0x66,0x00,0xff,0xff,0xcc,0x00, + 0xcc,0xff,0xff,0x00,0x66,0x00,0x66,0x00, 0xff,0x80,0x80,0x00,0x00,0x66,0xcc,0x00, + 0xcc,0xcc,0xff,0x00,0x00,0x00,0x80,0x00, 0xff,0x00,0xff,0x00,0xff,0xff,0x00,0x00, + 0x00,0xff,0xff,0x00,0x80,0x00,0x80,0x00, 0x80,0x00,0x00,0x00,0x00,0x80,0x80,0x00, + 0x00,0x00,0xff,0x00,0x00,0xcc,0xff,0x00, 0xcc,0xff,0xff,0x00,0xcc,0xff,0xcc,0x00, + 0xff,0xff,0x99,0x00,0x99,0xcc,0xff,0x00, 0xff,0x99,0xcc,0x00,0xcc,0x99,0xff,0x00, + 0xe3,0xe3,0xe3,0x00,0x33,0x66,0xff,0x00, 0x33,0xcc,0xcc,0x00,0x99,0xcc,0x00,0x00, + 0xff,0xcc,0x00,0x00,0xff,0x99,0x00,0x00, 0xff,0x66,0x00,0x00,0x66,0x66,0x99,0x00, + 0x96,0x96,0x96,0x00,0x00,0x33,0x66,0x00, 0x33,0x99,0x66,0x00,0x00,0x33,0x00,0x00, + 0x33,0x33,0x00,0x00,0x99,0x33,0x00,0x00, 0x99,0x33,0x66,0x00,0x33,0x33,0x99,0x00, + 0x33,0x33,0x33,0x00 + }; + + + AddDataArray(palette, sizeof(palette)); + + SetRecordLength(GetDataSize()-4); + } + + CPalette::~CPalette() + { + } + +*/ +/* +****************************** +CStyle class implementation +****************************** +*/ +#define STYLE_BUILTIN_NORMAL ((unsigned8_t)0x00) +#define STYLE_BUILTIN_ROWLEVELN ((unsigned8_t)0x01) +#define STYLE_BUILTIN_COLLEVELN ((unsigned8_t)0x02) +#define STYLE_BUILTIN_COMMA ((unsigned8_t)0x03) +#define STYLE_BUILTIN_CURRENCY ((unsigned8_t)0x04) +#define STYLE_BUILTIN_PERCENT ((unsigned8_t)0x05) +#define STYLE_BUILTIN_COMMAT ((unsigned8_t)0x06) +#define STYLE_BUILTIN_CURRENCYT ((unsigned8_t)0x07) + +#define STYLE_BUILTIN_BIT ((unsigned16_t)0x8000) + + + +#define STYLE_LEVEL_DUMMY ((unsigned8_t)0x00) + +CStyle::CStyle(style_t* styledef) +{ + + // TODO: Implement user-defined styles. So far only built-in are used. + SetRecordType(RECTYPE_STYLE); + + AddValue16(styledef->xfindex|STYLE_BUILTIN_BIT); + AddValue8(styledef->builtintype); + AddValue8(STYLE_LEVEL_DUMMY); + + + SetRecordLength(GetDataSize()-4); +} + +CStyle::CStyle(unsigned16_t xfindex, unsigned8_t builtintype) +{ + // TODO: Implement user-defined styles. So far only built-in are used. + SetRecordType(RECTYPE_STYLE); + + AddValue16(xfindex|STYLE_BUILTIN_BIT); + AddValue8(builtintype); + AddValue8(STYLE_LEVEL_DUMMY); + + + SetRecordLength(GetDataSize()-4); + + +} + + +CStyle::~CStyle() +{ +} + + + +/* +****************************** +CBSheet class implementation +****************************** +*/ +CBSheet::CBSheet(unsigned32_t streampos, + unsigned16_t attributes, + string& sheetname) +{ + SetRecordType(RECTYPE_BOUNDSHEET); + AddValue32(streampos); + AddValue16(attributes); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue8((unsigned8_t)sheetname.size()); + AddDataArray((unsigned8_t*)sheetname.c_str(), sheetname.size()); +#endif +#if VERSION_BIFF == VERSION_BIFF8 + AddUnicodeStrlen((unsigned8_t)sheetname.size()); + AddUnicodeString((unsigned8_t* )sheetname.c_str(), sheetname.size()); +#endif + + SetRecordLength(GetDataSize()-4); +} +#if VERSION_BIFF == VERSION_BIFF8 +CBSheet::CBSheet(unsigned32_t streampos, + unsigned16_t attributes, + ustring& sheetname +#ifdef HAVE_ICONV + , string& iconv_code +#endif +) { + + SetRecordType(RECTYPE_BOUNDSHEET); + AddValue32(streampos); + AddValue16(attributes); + +#ifdef HAVE_ICONV + u16string u16sheetname; + + Conv32to16(iconv_code, sheetname, u16sheetname); +// size_t outSize, resultSize; +// size_t iconv (iconv_t cd, char **restrict inbuf, size_t *restrict inbytesleft, char **restrict outbuf, size_t *restrict outbytesleft); + AddUnicodeStrlen((unsigned8_t)u16sheetname.size()); + AddUnicodeString((unsigned16_t* )u16sheetname.c_str(), u16sheetname.size()); +#else + AddUnicodeStrlen((unsigned8_t)sheetname.size()); + AddUnicodeString((unsigned16_t* )sheetname.c_str(), sheetname.size()); +#endif + + SetRecordLength(GetDataSize()-4); +} +#endif + +CBSheet::CBSheet(boundsheet_t* bsheetdef) +{ + SetRecordType(RECTYPE_BOUNDSHEET); + AddValue32(bsheetdef->streampos); + + // Set the flags in the attribute variables + unsigned16_t attrflags = 0; + attrflags |= bsheetdef->worksheet? BSHEET_ATTR_WORKSHEET:0; + attrflags |= bsheetdef->ex4macro? BSHEET_ATTR_EX4MACRO:0; + attrflags |= bsheetdef->chart? BSHEET_ATTR_CHART:0; + attrflags |= bsheetdef->vbmodule? BSHEET_ATTR_VBMODULE:0; + attrflags |= bsheetdef->visible? BSHEET_ATTR_VISIBLE:0; + attrflags |= bsheetdef->hidden? BSHEET_ATTR_HIDDEN:0; + attrflags |= bsheetdef->veryhidden? BSHEET_ATTR_VERYHIDDEN:0; + + AddValue16(attrflags); + +#if VERSION_BIFF == VERSION_BIFF5 + AddValue8((unsigned8_t)bsheetdef->sheetname.size()); + AddDataArray((unsigned8_t*)((bsheetdef->sheetname).c_str()), (bsheetdef->sheetname).size()); +#endif +#if VERSION_BIFF == VERSION_BIFF8 + if(bsheetdef->asheetname.size()) { + AddUnicodeStrlen((unsigned8_t)bsheetdef->asheetname.size()); + AddUnicodeString((unsigned8_t*)((bsheetdef->asheetname).c_str()), (bsheetdef->asheetname).size()); + } else { +#ifdef HAVE_ICONV + u16string u16sheetname; + + Conv32to16(bsheetdef->iconv_code, bsheetdef->usheetname, u16sheetname); + + AddUnicodeStrlen((unsigned8_t)u16sheetname.size()); + AddUnicodeString((unsigned16_t* )u16sheetname.c_str(), u16sheetname.size()); +#else + AddUnicodeStrlen((unsigned8_t)bsheetdef->usheetname.size()); + AddUnicodeString((unsigned16_t*)(bsheetdef->usheetname.c_str()), (bsheetdef->usheetname).size()); +#endif + } +#endif + + SetRecordLength(GetDataSize()-4); +} + +CBSheet::~CBSheet() +{ +} + +/* +********************************** +********************************** +*/ + +void CBSheet::SetStreamPosition(unsigned32_t pos) +{ + SetValueAt((signed32_t)pos, BSHEET_OFFSET_POSITION); +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: recdef.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:48 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/recdef.h b/uppdev/XLS/recdef.h new file mode 100644 index 000000000..ddc568ab6 --- /dev/null +++ b/uppdev/XLS/recdef.h @@ -0,0 +1,325 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/recdef.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef RECDEF_H +#define RECDEF_H + +#include +#include +#include +#include + +namespace xlslib_core +{ + +/* +****************************** +CBof class declaration +****************************** +*/ +#define BOF_TYPE_WBGLOBALS ((unsigned16_t)0x0005) +#define BOF_TYPE_VBMODULE ((unsigned16_t)0x0006) +#define BOF_TYPE_WORKSHEET ((unsigned16_t)0x0010) +#define BOF_TYPE_CHART ((unsigned16_t)0x0020) +#define BOF_TYPE_EXCEL4_MACROSH ((unsigned16_t)0x0040) +#define BOF_TYPE_WSFILE ((unsigned16_t)0x0100) + +#define BOF_BUILD_DFLT ((unsigned16_t)0x1d5f) +#define BOF_YEAR_DFLT ((unsigned16_t)0x07cd) + +#define CODEPAGE_IBMPC ((unsigned16_t)0x01b5) +#define CODEPAGE_APPLE ((unsigned16_t)0x8000) +#define CODEPAGE_ANSI ((unsigned16_t)0x04e4) + +#define BOF_RECORD_SIZE (12) + + class CBof: public CRecord + { + protected: + + public: + + CBof(unsigned16_t boftype); + ~CBof(); + }; + +/* +****************************** +CEof class declaration +****************************** +*/ + class CEof: public CRecord + { + protected: + + public: + + CEof(); + ~CEof(); + }; + +/* +****************************** +CCodePage class declaration +****************************** +*/ + class CCodePage: public CRecord + { + protected: + + public: + + CCodePage(unsigned16_t boftype); + ~CCodePage(); + }; + + /* +****************************** +CWindow1 class declaration +****************************** +*/ + + class CWindow1: public CRecord + { + protected: + + public: + + CWindow1(); + ~CWindow1(); + }; + +/* +****************************** +CDateMode class declaration +****************************** +*/ + class CDateMode: public CRecord + { + protected: + + public: + + CDateMode(); + ~CDateMode(); + }; + + + +/* +****************************** +CWindow2 class declaration +****************************** +*/ + +#define W2_OFFSET_GRBIT ((unsigned32_t)4) +#define W2_OFFSET_TOPROW ((unsigned32_t)6) +#define W2_OFFSET_LEFTCOL ((unsigned32_t)8) +#define W2_OFFSET_COLOR ((unsigned32_t)10) +#define W2_OFFSET_ZOOMPREVIEW ((unsigned32_t)14) +#define W2_OFFSET_ZOOMNORMAL ((unsigned32_t)16) +#define W2_OFFSET_RESERVED ((unsigned32_t)18) + + +#define W2_DFLT_TOPROW ((unsigned16_t)0x0000) +#define W2_DFLT_LEFTCOL ((unsigned16_t)0x0000) +#define W2_DFLT_COLOR ((unsigned32_t)0x00000000) + // NOTE: Check a BIFF8 example to verify the units of the two following values +#define W2_DFLT_ZOOMPBPREV ((unsigned16_t)0x0100) +#define W2_DFLT_ZOOMNORMAL ((unsigned16_t)0x0100) +#define W2_DFLT_RESERVED ((unsigned32_t)0x00000000) + + // GRBIT mask-flags: +#define W2_GRBITMASK_FMLA ((unsigned16_t)0x0001) +#define W2_GRBITMASK_GRIDS ((unsigned16_t)0x0002) +#define W2_GRBITMASK_HROWCOL ((unsigned16_t)0x0004) +#define W2_GRBITMASK_FROZEN ((unsigned16_t)0x0008) +#define W2_GRBITMASK_ZEROS ((unsigned16_t)0x0010) +#define W2_GRBITMASK_DFLTHDRCOLOR ((unsigned16_t)0x0020) +#define W2_GRBITMASK_ARABIC ((unsigned16_t)0x0040) +#define W2_GRBITMASK_GUTS ((unsigned16_t)0x0080) +#define W2_GRBITMASK_FRZNOSPLIT ((unsigned16_t)0x0100) +#define W2_GRBITMASK_SELECTED ((unsigned16_t)0x0200) +#define W2_GRBITMASK_PAGED ((unsigned16_t)0x0400) +#define W2_GRBITMASK_SLV ((unsigned16_t)0x0800) +#define W2_GRBITMASK_RESERVED ((unsigned16_t)0xf000) + + // NOTE: Hardcoded from an excel example +#define W2_DFLT_GRBIT ((unsigned16_t)0x06b6) + /* + #define W2_DFLT_GRBIT ((unsigned16_t) \ + (W2_GRBITMASK_GRIDS|W2_GRBITMASK_HROWCOL|W2_GRBITMASK_DFLTHDRCOLOR)) + */ + class CWindow2: public CRecord + { + private: + + public: + + // TODO: Create a constructor that gets user-defined arguments that specify the appearence + // The following constructor stablishes default values. + CWindow2(); + ~CWindow2(); + + void SetSelected(); + void SetPaged(); + void ClearSelected(); + void ClearPaged(); + }; + +/* +****************************** +CDimension class declaration +****************************** +*/ + class CDimension: public CRecord + { + protected: + + public: + + CDimension(unsigned32_t minRow, unsigned32_t maxRow, unsigned32_t minCol, unsigned32_t maxCol); + ~CDimension(); + }; + + /* +****************************** +CStyle class declaration +****************************** +*/ + + typedef struct + { + unsigned16_t xfindex; + unsigned8_t builtintype; + + } style_t; + typedef std::list Style_List_t; + typedef Style_List_t::iterator Style_List_Itor_t; + + class CStyle: public CRecord + { + protected: + + public: + + CStyle(unsigned16_t xfindex, unsigned8_t builtintype); + CStyle(style_t* styledef); + ~CStyle(); + }; + + + /* +****************************** +CBSheet class declaration +****************************** +*/ + +#define BSHEET_OFFSET_POSITION ((unsigned32_t)4) +#define BSHEET_OFFSET_FLAGS ((unsigned32_t)8) +#define BSHEET_OFFSET_NAMELENGHT ((unsigned32_t)10) +#define BSHEET_OFFSET_B7NAME ((unsigned32_t)11) +#define BSHEET_OFFSET_B8NAME ((unsigned32_t)12) + +#define BSHEET_ATTR_WORKSHEET ((unsigned16_t)0x0000) +#define BSHEET_ATTR_EX4MACRO ((unsigned16_t)0x0001) +#define BSHEET_ATTR_CHART ((unsigned16_t)0x0002) +#define BSHEET_ATTR_VBMODULE ((unsigned16_t)0x0006) + +#define BSHEET_ATTR_VISIBLE ((unsigned16_t)0x0000) +#define BSHEET_ATTR_HIDDEN ((unsigned16_t)0x0100) +#define BSHEET_ATTR_VERYHIDDEN ((unsigned16_t)0x0200) + +// TODO - DFH - are strings leaked???? + typedef struct + { + unsigned32_t streampos; + std::string asheetname; +#if VERSION_BIFF == VERSION_BIFF8 + std::ustring usheetname; +#ifdef HAVE_ICONV + std::string iconv_code; +#endif +#endif + bool _free :1; + bool worksheet:1; + bool ex4macro:1; + bool chart:1; + bool vbmodule:1; + bool visible:1; + bool hidden:1; + bool veryhidden:1; + } boundsheet_t; + typedef std::list Boundsheet_List_t; + typedef Boundsheet_List_t::iterator Boundsheet_List_Itor_t; + + class CBSheet: public CRecord + { + private: + + public: + + CBSheet(unsigned32_t streampos, + unsigned16_t attributes, + std::string& sheetname); +#if VERSION_BIFF == VERSION_BIFF8 + CBSheet(unsigned32_t streampos, + unsigned16_t attributes, + std::ustring& sheetname +#ifdef HAVE_ICONV + , std::string& iconv_code +#endif + ); +#endif + CBSheet(boundsheet_t* bsheetdef); + + ~CBSheet(); + + void SetStreamPosition(unsigned32_t pos); + }; +} +#endif //RECDEF_H + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: recdef.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:57 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/record.cpp b/uppdev/XLS/record.cpp new file mode 100644 index 000000000..ab52538a8 --- /dev/null +++ b/uppdev/XLS/record.cpp @@ -0,0 +1,150 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/record.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + +/* +****************************** +CRecord class implementation +****************************** +*/ + + +CRecord::CRecord() + :m_Num(RECTYPE_NULL) + +{ + + // Initialize (and create) the space for record type + // and record length + const unsigned8_t array[] = {0,0,0,0} ; + AddDataArray(array, 4); + + + +} + +CRecord::~CRecord() +{ +} + +/* +****************************** +****************************** +*/ +void CRecord::SetRecordType(unsigned16_t rtype) +{ + SetValueAt((signed16_t)rtype, 0); + +} + + +/* +****************************** +****************************** +*/ + +unsigned16_t CRecord::GetRecordType() +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, 0); + + return value; +} + +/* +****************************** +****************************** +*/ +void CRecord::SetRecordLength(unsigned16_t rlength) +{ + SetValueAt((signed16_t)rlength, 2); + +} + + +/* +****************************** +****************************** +*/ + +unsigned16_t CRecord::GetRecordLength() +{ + unsigned16_t value; + GetValue16From((signed16_t*)&value, 2); + + return value; +} + + +/* +****************************** +****************************** +*/ + +unsigned8_t* CRecord::GetRecordDataBuffer() +{ + return GetBuffer() + 4; + +} + + +/* +****************************** +****************************** +*/ +unsigned32_t CRecord::GetRecordDataSize() +{ + return GetDataSize() - 4; +} + +/* +****************************** +****************************** +*/ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: record.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/record.h b/uppdev/XLS/record.h new file mode 100644 index 000000000..fd83e70dd --- /dev/null +++ b/uppdev/XLS/record.h @@ -0,0 +1,91 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/record.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef RECORD_H +#define RECORD_H + +#include +#include +#include +#include + +namespace xlslib_core +{ + +#define VERSION_BIFF5 0x0500 +#define VERSION_BIFF8 0x0600 +#define VERSION_BIFF VERSION_BIFF8 + + /* +****************************** +CRecord class declaration +****************************** +*/ + class CRecord: public CUnit + { + protected: + + unsigned16_t m_Num; + + public: + + CRecord(); + ~CRecord(); + + void SetRecordType(unsigned16_t rtype); + unsigned16_t GetRecordType(); + + void SetRecordLength(unsigned16_t); + unsigned16_t GetRecordLength(); + + unsigned8_t* GetRecordDataBuffer(); + unsigned32_t GetRecordDataSize(); + + + + }; +} +#endif //RECORD_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: record.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:54 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/rectypes.h b/uppdev/XLS/rectypes.h new file mode 100644 index 000000000..9e11fea28 --- /dev/null +++ b/uppdev/XLS/rectypes.h @@ -0,0 +1,758 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/rectypes.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef RECTYPES_H +#define RECTYPES_H + +/* + sed -e 's/\(^\([A-Z0-9]*\)\:.*$\)/\/\* \1 \*\/\n#define RECTYPE_\2 \\/' biff_records_alpha.txt | sed -e 's/^ \([A-F0-9]*\)\h$/ ((unsigned16_t)0x\1)/' >recordtypes.h +*/ + +#include +#include + +//#define MAX_RECORD_SIZE_BIFF57 (2000) +#define MAX_RECORD_SIZE_BIFF8 (8000) +#define MAX_RECORD_SIZE MAX_RECORD_SIZE_BIFF8 + +/* 1904: 1904 Date System */ +#define RECTYPE_NULL \ + ((unsigned16_t)0x00) + +/* 1904: 1904 Date System */ +#define RECTYPE_R1904 \ + ((unsigned16_t)0x22) + +/* ADDIN: Workbook Is an Add-in Macro */ +#define RECTYPE_ADDIN \ + ((unsigned16_t)0x87) + +/* ADDMENU: Menu Addition */ +#define RECTYPE_ADDMENU \ + ((unsigned16_t)0xC2) + +/* ARRAY: Array-Entered Formula */ +#define RECTYPE_ARRAY \ + ((unsigned16_t)0x221) + +/* AUTOFILTER: AutoFilter Data */ +#define RECTYPE_AUTOFILTER \ + ((unsigned16_t)0x9E) + +/* AUTOFILTERINFO: Drop-Down Arrow Count */ +#define RECTYPE_AUTOFILTERINFO \ + ((unsigned16_t)0x9D) + +/* BACKUP: Save Backup Version of the File */ +#define RECTYPE_BACKUP \ + ((unsigned16_t)0x40) + +/* BLANK: Cell Value, Blank Cell */ +#define RECTYPE_BLANK \ + ((unsigned16_t)0x201) + +/* BOF: Beginning of File */ +#define RECTYPE_BOF \ + ((unsigned16_t)0x809) + +/* BOOKBOOL: Workbook Option Flag */ +#define RECTYPE_BOOKBOOL \ + ((unsigned16_t)0xDA) + +/* BOOLERR: Cell Value, Boolean or Error */ +#define RECTYPE_BOOLERR \ + ((unsigned16_t)0x205) + +/* BOTTOMMARGIN: Bottom Margin Measurement */ +#define RECTYPE_BOTTOMMARGIN \ + ((unsigned16_t)0x29) + +/* BOUNDSHEET: Sheet Information */ +#define RECTYPE_BOUNDSHEET \ + ((unsigned16_t)0x85) + +/* CALCCOUNT: Iteration Count */ +#define RECTYPE_CALCCOUNT \ + ((unsigned16_t)0x0C) + +/* CALCMODE: Calculation Mode */ +#define RECTYPE_CALCMODE \ + ((unsigned16_t)0x0D) + +/* CF + : Conditional Formatting Conditions */ +#define RECTYPE_CF \ + ((unsigned16_t)0x1B1) + +/* CONDFMT: Conditional Formatting Range Information */ +#define RECTYPE_CONDFMT \ + ((unsigned16_t)0x1B0) + +/* CODENAME: VBE Object Name */ +#define RECTYPE_CODENAME \ + ((unsigned16_t)0x42) + +/* CODEPAGE: Default Code Page */ +#define RECTYPE_CODEPAGE \ + ((unsigned16_t)0x42) + +/* COLINFO: Column Formatting Information */ +#define RECTYPE_COLINFO \ + ((unsigned16_t)0x7D) + +/* CONTINUE: Continues Long Records */ +#define RECTYPE_CONTINUE \ + ((unsigned16_t)0x3C) + +/* COORDLIST: Polygon Object Vertex Coordinates */ +#define RECTYPE_COORDLIST \ + ((unsigned16_t)0xA9) + +/* COUNTRY: Default Country and WIN.INI Country */ +#define RECTYPE_COUNTRY \ + ((unsigned16_t)0x8C) + +/* CRN: Nonresident Operands */ +#define RECTYPE_CRN \ + ((unsigned16_t)0x5A) + +/* DBCELL: Stream Offsets */ +#define RECTYPE_DBCELL \ + ((unsigned16_t)0xD7) + +/* DCON: Data Consolidation Information */ +#define RECTYPE_DCON \ + ((unsigned16_t)0x50) + +/* DCONBIN: Data Consolidation Information */ +#define RECTYPE_DCONBIN \ + ((unsigned16_t)0x1B5) + +/* DCONNAME: Data Consolidation Named References */ +#define RECTYPE_DCONNAME \ + ((unsigned16_t)0x52) + +/* DCONREF: Data Consolidation References */ +#define RECTYPE_DCONREF \ + ((unsigned16_t)0x51) + +/* DEFAULTROWHEIGHT: Default Row Height */ +#define RECTYPE_DEFAULTROWHEIGHT \ + ((unsigned16_t)0x225) + +/* DEFCOLWIDTH: Default Width for Columns */ +#define RECTYPE_DEFCOLWIDTH \ + ((unsigned16_t)0x55) + +/* DELMENU: Menu Deletion */ +#define RECTYPE_DELMENU \ + ((unsigned16_t)0xC3) + +/* DELTA: Iteration Increment */ +#define RECTYPE_DELTA \ + ((unsigned16_t)0x10) + +/* DIMENSIONS: Cell Table Size */ +#define RECTYPE_DIMENSIONS \ + ((unsigned16_t)0x200) + +/* DOCROUTE: Routing Slip Information */ +#define RECTYPE_DOCROUTE \ + ((unsigned16_t)0xB8) + +/* DSF: Double Stream File */ +#define RECTYPE_DSF \ + ((unsigned16_t)0x161) + +/* DV: Data Validation Criteria */ +#define RECTYPE_DV \ + ((unsigned16_t)0x1BE) + +/* DVAL: Data Validation Information */ +#define RECTYPE_DVAL \ + ((unsigned16_t)0x1B2) + +/* EDG: Edition Globals */ +#define RECTYPE_EDG \ + ((unsigned16_t)0x88) + +/* EOF: End of File */ +#define RECTYPE_EOF \ + ((unsigned16_t)0x0A) + +/* EXTERNCOUNT: Number of External References */ +#define RECTYPE_EXTERNCOUNT \ + ((unsigned16_t)0x16) + +/* EXTERNNAME: Externally Referenced Name */ +#define RECTYPE_EXTERNNAME \ + ((unsigned16_t)0x223) + +/* EXTERNSHEET: External Reference */ +#define RECTYPE_EXTERNSHEET \ + ((unsigned16_t)0x17) + +/* EXTSST: Extended Shared String Table */ +#define RECTYPE_EXTSST \ + ((unsigned16_t)0xFF) + +/* FILEPASS: File Is Password-Protected */ +#define RECTYPE_FILEPASS \ + ((unsigned16_t)0x2F) + +/* FILESHARING: File-Sharing Information */ +#define RECTYPE_FILESHARING \ + ((unsigned16_t)0x5B) + +/* FILESHARING2: File-Sharing Information for Shared Lists */ +#define RECTYPE_FILESHARING2 \ + ((unsigned16_t)0x1A5) + +/* FILTERMODE: Sheet Contains Filtered List */ +#define RECTYPE_FILTERMODE \ + ((unsigned16_t)0x9B) + +/* FNGROUPCOUNT: Built-in Function Group Count */ +#define RECTYPE_FNGROUPCOUNT \ + ((unsigned16_t)0x9C) + +/* FNGROUPNAME: Function Group Name */ +#define RECTYPE_FNGROUPNAME \ + ((unsigned16_t)0x9A) + +/* FONT: Font Description */ +// NOTE: Changed temporarilly to 31h (the manual says is 231h) +#define RECTYPE_FONT \ + ((unsigned16_t)0x31) + +/* FOOTER: Print Footer on Each Page */ +#define RECTYPE_FOOTER \ + ((unsigned16_t)0x15) + +/* FORMAT: Number Format */ +#define RECTYPE_FORMAT \ + ((unsigned16_t)0x41E) + +/* FORMULA: Cell Formula */ +#define RECTYPE_FORMULA \ + ((unsigned16_t)0x406) + +/* GCW: Global Column-Width Flags */ +#define RECTYPE_GCW \ + ((unsigned16_t)0xAB) + +/* GRIDSET: State Change of Gridlines Option */ +#define RECTYPE_GRIDSET \ + ((unsigned16_t)0x82) + +/* GUTS: Size of Row and Column Gutters */ +#define RECTYPE_GUTS \ + ((unsigned16_t)0x80) + +/* HCENTER: Center Between Horizontal Margins */ +#define RECTYPE_HCENTER \ + ((unsigned16_t)0x83) + +/* HEADER: Print Header on Each Page */ +#define RECTYPE_HEADER \ + ((unsigned16_t)0x14) + +/* HIDEOBJ: Object Display Options */ +#define RECTYPE_HIDEOBJ \ + ((unsigned16_t)0x8D) + +/* HLINK: Hyperlink */ +#define RECTYPE_HLINK \ + ((unsigned16_t)0x1B8) + +/* HORIZONTALPAGEBREAKS: Explicit Row Page Breaks */ +#define RECTYPE_HORIZONTALPAGEBREAKS \ + ((unsigned16_t)0x1B) + +/* IMDATA: Image Data */ +#define RECTYPE_IMDATA \ + ((unsigned16_t)0x7F) + +/* INDEX: Index Record */ +#define RECTYPE_INDEX \ + ((unsigned16_t)0x20B) + +/* INTERFACEEND: End of User Interface Records */ +#define RECTYPE_INTERFACEEND \ + ((unsigned16_t)0xE2) + +/* INTERFACEHDR: Beginning of User Interface Records */ +#define RECTYPE_INTERFACEHDR \ + ((unsigned16_t)0xE1) + +/* ITERATION: Iteration Mode */ +#define RECTYPE_ITERATION \ + ((unsigned16_t)0x11) + +/* LABEL: Cell Value, String Constant */ +#define RECTYPE_LABEL \ + ((unsigned16_t)0x204) + +/* LABELSST: Cell Value, String Constant/SST */ +#define RECTYPE_LABELSST \ + ((unsigned16_t)0xFD) + +/* LEFTMARGIN: Left Margin Measurement */ +#define RECTYPE_LEFTMARGIN \ + ((unsigned16_t)0x26) + +/* LHNGRAPH: Named Graph Information */ +#define RECTYPE_LHNGRAPH \ + ((unsigned16_t)0x95) + +/* LHRECORD: .WK? File Conversion Information */ +#define RECTYPE_LHRECORD \ + ((unsigned16_t)0x94) + +/* LPR: Sheet Was Printed Using LINE.PRINT( */ +#define RECTYPE_LPR \ + ((unsigned16_t)0x98) + +/* MMS: ADDMENU/DELMENU Record Group Count */ +#define RECTYPE_MMS \ + ((unsigned16_t)0xC1) + +/* MSODRAWING: Microsoft Office Drawing */ +#define RECTYPE_MSODRAWING \ + ((unsigned16_t)0xEC) + +/* MSODRAWINGGROUP: Microsoft Office Drawing Group */ +#define RECTYPE_MSODRAWINGGROUP \ + ((unsigned16_t)0xEB) + +/* MSODRAWINGSELECTION: Microsoft Office Drawing Selection */ +#define RECTYPE_MSODRAWINGSELECTION \ + ((unsigned16_t)0xED) + +/* MULBLANK: Multiple Blank Cells */ +#define RECTYPE_MULBLANK \ + ((unsigned16_t)0xBE) + +/* MULRK: Multiple RK Cells */ +#define RECTYPE_MULRK \ + ((unsigned16_t)0xBD) + +/* NAME: Defined Name */ +#define RECTYPE_NAME \ + ((unsigned16_t)0x218) + +/* NOTE: Comment Associated with a Cell */ +#define RECTYPE_NOTE \ + ((unsigned16_t)0x1C) + +/* NUMBER: Cell Value, Floating-Point Number */ +#define RECTYPE_NUMBER \ + ((unsigned16_t)0x203) + +/* OBJ: Describes a Graphic Object */ +#define RECTYPE_OBJ \ + ((unsigned16_t)0x5D) + +/* OBJPROTECT: Objects Are Protected */ +#define RECTYPE_OBJPROTECT \ + ((unsigned16_t)0x63) + +/* OBPROJ: Visual Basic Project */ +#define RECTYPE_OBPROJ \ + ((unsigned16_t)0xD3) + +/* OLESIZE: Size of OLE Object */ +#define RECTYPE_OLESIZE \ + ((unsigned16_t)0xDE) + +/* PALETTE: Color Palette Definition */ +#define RECTYPE_PALETTE \ + ((unsigned16_t)0x92) + +/* PANE: Number of Panes and Their Position */ +#define RECTYPE_PANE \ + ((unsigned16_t)0x41) + +/* PARAMQRY: Query Parameters */ +#define RECTYPE_PARAMQRY \ + ((unsigned16_t)0xDC) + +/* PASSWORD: Protection Password */ +#define RECTYPE_PASSWORD \ + ((unsigned16_t)0x13) + +/* PLS: Environment-Specific Print Record */ +#define RECTYPE_PLS \ + ((unsigned16_t)0x4D) + +/* PRECISION: Precision */ +#define RECTYPE_PRECISION \ + ((unsigned16_t)0x0E) + +/* PRINTGRIDLINES: Print Gridlines Flag */ +#define RECTYPE_PRINTGRIDLINES \ + ((unsigned16_t)0x2B) + +/* PRINTHEADERS: Print Row/Column Labels */ +#define RECTYPE_PRINTHEADERS \ + ((unsigned16_t)0x2A) + +/* PROTECT: Protection Flag */ +#define RECTYPE_PROTECT \ + ((unsigned16_t)0x12) + +/* PROT4REV: Shared Workbook Protection Flag */ +#define RECTYPE_PROT4REV \ + ((unsigned16_t)0x1AF) + +/* QSI: External Data Range */ +#define RECTYPE_QSI \ + ((unsigned16_t)0x1AD) + +/* RECIPNAME: Recipient Name */ +#define RECTYPE_RECIPNAME \ + ((unsigned16_t)0xB9) + +/* REFMODE: Reference Mode */ +#define RECTYPE_REFMODE \ + ((unsigned16_t)0x0F) + +/* REFRESHALL: Refresh Flag */ +#define RECTYPE_REFRESHALL \ + ((unsigned16_t)0x1B7) + +/* RIGHTMARGIN: Right Margin Measurement */ +#define RECTYPE_RIGHTMARGIN \ + ((unsigned16_t)0x27) + +/* RK: Cell Value, RK Number */ +#define RECTYPE_RK \ + ((unsigned16_t)0x7E) + +/* ROW: Describes a Row */ +#define RECTYPE_ROW \ + ((unsigned16_t)0x208) + +/* RSTRING: Cell with Character Formatting */ +#define RECTYPE_RSTRING \ + ((unsigned16_t)0xD6) + +/* SAVERECALC: Recalculate Before Save */ +#define RECTYPE_SAVERECALC \ + ((unsigned16_t)0x5F) + +/* SCENARIO: Scenario Data */ +#define RECTYPE_SCENARIO \ + ((unsigned16_t)0xAF) + +/* SCENMAN: Scenario Output Data */ +#define RECTYPE_SCENMAN \ + ((unsigned16_t)0xAE) + +/* SCENPROTECT: Scenario Protection */ +#define RECTYPE_SCENPROTECT \ + ((unsigned16_t)0xDD) + +/* SCL: Window Zoom Magnification */ +#define RECTYPE_SCL \ + ((unsigned16_t)0xA0) + +/* SELECTION: Current Selection */ +#define RECTYPE_SELECTION \ + ((unsigned16_t)0x1D) + +/* SETUP: Page Setup */ +#define RECTYPE_SETUP \ + ((unsigned16_t)0xA1) + +/* SHRFMLA: Shared Formula */ +#define RECTYPE_SHRFMLA \ + ((unsigned16_t)0xBC) + +/* SORT: Sorting Options */ +#define RECTYPE_SORT \ + ((unsigned16_t)0x90) + +/* SOUND: Sound Note */ +#define RECTYPE_SOUND \ + ((unsigned16_t)0x96) + +/* SST: Shared String Table */ +#define RECTYPE_SST \ + ((unsigned16_t)0xFC) + +/* STANDARDWIDTH: Standard Column Width */ +#define RECTYPE_STANDARDWIDTH \ + ((unsigned16_t)0x99) + +/* STRING: String Value of a Formula */ +#define RECTYPE_STRING \ + ((unsigned16_t)0x207) + +/* STYLE: Style Information */ +#define RECTYPE_STYLE \ + ((unsigned16_t)0x293) + +/* SUB: Subscriber */ +#define RECTYPE_SUB \ + ((unsigned16_t)0x91) + +/* SUPBOOK: Supporting Workbook */ +#define RECTYPE_SUPBOOK \ + ((unsigned16_t)0x1AE) + +/* SXDB: PivotTable Cache Data */ +#define RECTYPE_SXDB \ + ((unsigned16_t)0xC6) + +/* SXDBEX: PivotTable Cache Data */ +#define RECTYPE_SXDBEX \ + ((unsigned16_t)0x122) + +/* SXDI: Data Item */ +#define RECTYPE_SXDI \ + ((unsigned16_t)0xC5) + +/* SXEX: PivotTable View Extended Information */ +#define RECTYPE_SXEX \ + ((unsigned16_t)0xF1) + +/* SXEXT: External Source Information */ +#define RECTYPE_SXEXT \ + ((unsigned16_t)0xDC) + +/* SXFDBTYPE: SQL Datatype Identifier */ +#define RECTYPE_SXFDBTYPE \ + ((unsigned16_t)0x1BB) + +/* SXFILT: PivotTable Rule Filter */ +#define RECTYPE_SXFILT \ + ((unsigned16_t)0xF2) + +/* SXFORMAT: PivotTable Format Record */ +#define RECTYPE_SXFORMAT \ + ((unsigned16_t)0xFB) + +/* SXFORMULA: PivotTable Formula Record */ +#define RECTYPE_SXFORMULA \ + ((unsigned16_t)0x103) + +/* SXFMLA: PivotTable Parsed Expression */ +#define RECTYPE_SXFMLA \ + ((unsigned16_t)0xF9) + +/* SXIDSTM: Stream ID */ +#define RECTYPE_SXIDSTM \ + ((unsigned16_t)0xD5) + +/* SXIVD: Row/Column Field IDs */ +#define RECTYPE_SXIVD \ + ((unsigned16_t)0xB4) + +/* SXLI: Line Item Array */ +#define RECTYPE_SXLI \ + ((unsigned16_t)0xB5) + +/* SXNAME: PivotTable Name */ +#define RECTYPE_SXNAME \ + ((unsigned16_t)0xF6) + +/* SXPAIR: PivotTable Name Pair */ +#define RECTYPE_SXPAIR \ + ((unsigned16_t)0xF8) + +/* SXPI: Page Item */ +#define RECTYPE_SXPI \ + ((unsigned16_t)0xB6) + +/* SXRULE: PivotTable Rule Data */ +#define RECTYPE_SXRULE \ + ((unsigned16_t)0xF0) + +/* SXSTRING: String */ +#define RECTYPE_SXSTRING \ + ((unsigned16_t)0xCD) + +/* SXSELECT: PivotTable Selection Information */ +#define RECTYPE_SXSELECT \ + ((unsigned16_t)0xF7) + +/* SXTBL: Multiple Consolidation Source Info */ +#define RECTYPE_SXTBL \ + ((unsigned16_t)0xD0) + +/* SXTBPG: Page Item Indexes */ +#define RECTYPE_SXTBPG \ + ((unsigned16_t)0xD2) + +/* SXTBRGIITM: Page Item Name Count */ +#define RECTYPE_SXTBRGIITM \ + ((unsigned16_t)0xD1) + +/* SXVD: View Fields */ +#define RECTYPE_SXVD \ + ((unsigned16_t)0xB1) + +/* SXVDEX: Extended PivotTable View Fields */ +#define RECTYPE_SXVDEX \ + ((unsigned16_t)0x100) + +/* SXVI: View Item */ +#define RECTYPE_SXVI \ + ((unsigned16_t)0xB2) + +/* SXVIEW: View Definition */ +#define RECTYPE_SXVIEW \ + ((unsigned16_t)0xB0) + +/* SXVS: View Source */ +#define RECTYPE_SXVS \ + ((unsigned16_t)0xE3) + +/* TABID: Sheet Tab Index Array */ +#define RECTYPE_TABID \ + ((unsigned16_t)0x13D) + +/* TABIDCONF: Sheet Tab ID of Conflict History */ +#define RECTYPE_TABIDCONF \ + ((unsigned16_t)0xEA) + +/* TABLE: Data Table */ +#define RECTYPE_TABLE \ + ((unsigned16_t)0x236) + +/* TEMPLATE: Workbook Is a Template */ +#define RECTYPE_TEMPLATE \ + ((unsigned16_t)0x60) + +/* TOPMARGIN: Top Margin Measurement */ +#define RECTYPE_TOPMARGIN \ + ((unsigned16_t)0x28) + +/* TXO: Text Object */ +#define RECTYPE_TXO \ + ((unsigned16_t)0x1B6) + +/* UDDESC: Description String for Chart Autoformat */ +#define RECTYPE_UDDESC \ + ((unsigned16_t)0xDF) + +/* UNCALCED: Recalculation Status */ +#define RECTYPE_UNCALCED \ + ((unsigned16_t)0x5E) + +/* USERBVIEW: Workbook Custom View Settings */ +#define RECTYPE_USERBVIEW \ + ((unsigned16_t)0x1A9) + +/* USERSVIEWBEGIN: Custom View Settings */ +#define RECTYPE_USERSVIEWBEGIN \ + ((unsigned16_t)0x1AA) + +/* USERSVIEWEND: End of Custom View Records */ +#define RECTYPE_USERSVIEWEND \ + ((unsigned16_t)0x1AB) + +/* USESELFS: Natural Language Formulas Flag */ +#define RECTYPE_USESELFS \ + ((unsigned16_t)0x160) + +/* VCENTER: Center Between Vertical Margins */ +#define RECTYPE_VCENTER \ + ((unsigned16_t)0x84) + +/* VERTICALPAGEBREAKS: Explicit Column Page Breaks */ +#define RECTYPE_VERTICALPAGEBREAKS \ + ((unsigned16_t)0x1A) + +/* WINDOW1: Window Information */ +#define RECTYPE_WINDOW1 \ + ((unsigned16_t)0x3D) + +/* WINDOW2: Sheet Window Information */ +#define RECTYPE_WINDOW2 \ + ((unsigned16_t)0x23E) + +/* WINDOWPROTECT: Windows Are Protected */ +#define RECTYPE_WINDOWPROTECT \ + ((unsigned16_t)0x19) + +/* WRITEACCESS: Write Access User Name */ +#define RECTYPE_WRITEACCESS \ + ((unsigned16_t)0x5C) + +/* WRITEPROT: Workbook Is Write-Protected */ +#define RECTYPE_WRITEPROT \ + ((unsigned16_t)0x86) + +/* WSBOOL: Additional Workspace Information */ +#define RECTYPE_WSBOOL \ + ((unsigned16_t)0x81) + +/* XCT: CRN Record Count */ +#define RECTYPE_XCT \ + ((unsigned16_t)0x59) + +/* XF: Extended Format */ +#define RECTYPE_XF \ + ((unsigned16_t)0xE0) + +/* XL5MODIFY: Flag for DSF */ +#define RECTYPE_XL5MODIFY \ + ((unsigned16_t)0x162) + +/* TOOLBARHDR: Not documented */ +#define RECTYPE_TOOLBARHDR \ + ((unsigned16_t)0xbf) + +/* TOOLBAREND: Not documented */ +#define RECTYPE_TOOLBAREND \ + ((unsigned16_t)0xc0) + +/* TOOLBAREND: Not documented */ +#define RECTYPE_MERGEDCELLS \ + ((unsigned16_t)0xe5) + +#endif //RECTYPES_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: rectypes.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:51 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/reference/xlslibRefGuide.pdf b/uppdev/XLS/reference/xlslibRefGuide.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7f74c5b4981c0d6b2b5392d32d2100591087a94a GIT binary patch literal 138384 zcma%iQgariCP;tn+Tg2 z*%_Pg@->}5Z$FK$f2c(vx! z%R>WcX}iT6=%XuWj#f7+g6c=fyaw?_?A-AciuK5?kTn*saDw?}_2~@&erbD4JC79> zlOa$_(>(8;T}G?{~NwJ=}F$4tlk?YjgUYoaP6@6$X8iUH6^pRSmWMn@pkucYE!d6TCuGkmC znOq&tc`fB`80+KL5lnvzzYRrN1kuB?&CQr6FgwoHMLuU2)h;$s>5r(MUp}&Sb9fUq z^TN~A!Hx>Nyu~tKg20`xqgJhWNfQtWxSpP6yGd^ILMVH4C?81WGNLup{%H80qzOLB zj+`wQ^ndH@<4LBqUw+F_@I|LAjxoDO1iExop|3)WcSwnNvqO;Pfwb;eh=x(_1Bg%eK5cw_C`B0X#LZ5Hhhf{-28c2mPyx|5dyH z8d;gyA^#`D!1^B*&cOEHl=wB4RUCHf_2*CIJA6J@h}!b!d_L&bh|OXfOrq{3oUDH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QLQ(NX z!TeTM6zox`8YQIq78PX_OaRwDieh0ZU1bV^X;>>OR9I2*td$iiq9~Ys6ooucFshP8 zW&Wr*V$)DoR>%cS4|!3KqR?!Df>|pow1A;t%E}5wm8_e`pp1r!hVqh9nIgOZzmLKA zf`YSdzA43p$ zK)|lT$dNRJ`g|zjT(KQ3rYbTWDNe_W4f+0^ggBDg6sq}?QDkXU{^K{rkm2Y5XAW?H zLyJROpeZCF{y8u(KwS}PK2U>!nh0zq)C{1MpW&3g^E>>U{v7z{0P3D9aakWij^A|0 zpZ?acd;C4U#p1mApMJa?uwn$TJusYlhHN|A;n;Te!?EqW4UTQ+GjJTFzY53p^CLL6 zp5QK*`B~S~nCi^fG&Ut$yHjbPIko#+6YZi3 z@eV${fA^Sc`Xlo9^;e#8|D9h^zrSp>b8E-|*Sx=_3%~S&?)t>53%ZO`Z&e~LW8(z?nL~0N*+1{R( zEoNQJX-VwQIMwaRU7Z~X;Ip07YUp}NK7$t*<$S(A=4|fi*n#YO0?5A&G2MQgoybC3 zj0KSGjO~G0WeH`8(voFl#Yul67zsJ2awKqILyDiH@~>FWg+W#ulU!9?. + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/row.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + +/* +****************************** +CRow class implementation +****************************** +*/ + + + +CRow::CRow(unsigned16_t rownum, + unsigned16_t firstcol, + unsigned16_t lastcol, + unsigned16_t rowheight) +{ + SetRecordType(RECTYPE_ROW); + AddValue16(rownum); + AddValue16(firstcol); + AddValue16((lastcol+1)); + AddValue16(rowheight); + + // A field used by MS for "optimizing" (?) the loading of a file. + // Doc says it shall be set to 0 if I'm creating a BIFF... + AddValue16(0); + // A reserved value: + AddValue16(0); + + // TODO: The following flag-word can be used for outline cells. Later. + // As a defaule the GhostDirty flag is is set, so the row has a default + // format (set by the index of byte 18). + if(rowheight == ROW_DFLT_HEIGHT) + { + AddValue16((unsigned16_t)(ROW_DFLT_GRBIT)); + } + else + { + AddValue16((unsigned16_t)(ROW_DFLT_GRBIT|ROW_GRBIT_UNSYNC)); + } + AddValue16((unsigned16_t)ROW_DFLT_IXFE); + + + SetRecordLength(GetDataSize()-4); +} + +// NOTE: row_t has not a height field +CRow::CRow(row_t& rowdef) +{ + SetRecordType(RECTYPE_ROW); + AddValue16(rowdef.rownum); + AddValue16(rowdef.firstcol); + AddValue16((rowdef.lastcol+1)); + AddValue16(ROW_DFLT_HEIGHT); + + // A field used by MS for "optimizing" (?) the loading of a file. + // Doc says it shall be set to 0 if I'm creating a BIFF... + AddValue16((unsigned16_t)0); + // A reserved value: + AddValue16((unsigned16_t)0); + + // TODO: The following flag-word can be used for outline cells. Later. + // As a defaule the GhostDirty flag is is set, so the row has a default + // format (set by the index of byte 18). + AddValue16((unsigned16_t)(ROW_DFLT_GRBIT|ROW_GRBIT_UNSYNC)); + AddValue16((unsigned16_t)ROW_DFLT_IXFE); + + + SetRecordLength(GetDataSize()-4); +} + + +CRow::~CRow() +{ +} + + +/* +****************************** +****************************** +*/ +void CRow::SetFirstCol(unsigned16_t firstcol) +{ + SetValueAt((signed16_t)firstcol, ROW_OFFSET_FIRSTCOL); +} + +/* +****************************** +****************************** +*/ +void CRow::SetLastCol(unsigned16_t lastcol) +{ + SetValueAt((signed16_t)lastcol, ROW_OFFSET_LASTCOL); +} + +/* +****************************** +****************************** +*/ +unsigned16_t CRow::GetFirstCol(void) +{ + + signed16_t firstcol; + GetValue16From(&firstcol,ROW_OFFSET_FIRSTCOL); + return (unsigned16_t)firstcol; + +} + +/* +****************************** +****************************** +*/ +unsigned16_t CRow::GetLastCol(void) +{ + signed16_t lastcol; + GetValue16From(&lastcol,ROW_OFFSET_LASTCOL); + return (unsigned16_t)lastcol; +} + + + + + +/* +****************************** +CDBCell class implementation +****************************** +*/ + +CDBCell::CDBCell(unsigned32_t startblock) +{ + + // The new initializated DBCell record points to nowhere and has no + // extra rows (the array of stream offsets is empty); + SetRecordType(RECTYPE_DBCELL); + AddValue32((unsigned32_t) startblock); + + + + SetRecordLength(GetDataSize()-4); +} + +CDBCell::~CDBCell() +{ +} + + +void CDBCell::AddRowOffset(unsigned16_t rowoffset) +{ + + AddValue16((unsigned16_t) rowoffset); + SetRecordLength(GetDataSize()-4); + +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: row.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:53 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/row.h b/uppdev/XLS/row.h new file mode 100644 index 000000000..cfddc3671 --- /dev/null +++ b/uppdev/XLS/row.h @@ -0,0 +1,179 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/row.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef ROW_H +#define ROW_H + +#include +#include +#include + +/* +****************************** +CRow class declaration +****************************** +*/ + +namespace xlslib_core +{ + +#define ROW_DFLT_HEIGHT ((unsigned16_t)0x0108) +#define ROW_DFLT_GRBIT ((unsigned16_t)0x0080) +#define ROW_GRBIT_UNSYNC ((unsigned16_t)0x0040) +#define ROW_DFLT_IXFE ((unsigned16_t)0x000f) +#define ROW_OFFSET_FIRSTCOL ((unsigned32_t)6) +#define ROW_OFFSET_LASTCOL ((unsigned32_t)8) +#define ROW_MASK_STDHEIGHT ((unsigned16_t)0x0108) +#define ROW_RECORD_SIZE (20) + + class rowheight_t + { + public: + rowheight_t() {}; + rowheight_t(unsigned16_t rownum, unsigned16_t rowheight) + : num(rownum), height(rowheight) {} + ~rowheight_t() {}; + + unsigned16_t GetRowNum() {return num;}; + void SetRowNum(unsigned16_t rownum) {num = rownum;}; + + unsigned16_t GetRowHeight() {return height;}; + void SetRowHeight(unsigned16_t rowheight) {height = rowheight;}; + + bool operator<(const rowheight_t& right) const{ + return (num < right.num); + }; + + bool operator>(const rowheight_t& right) const{ + return (num > right.num); + }; + + bool operator==(const rowheight_t& right) const{ + return (num == right.num); + }; + + bool operator!=(const rowheight_t& right) const{ + return (num != right.num); + }; + + + private: + unsigned16_t num; + unsigned16_t height; + }; + + struct rowheightsort + { + public: +bool operator()(rowheight_t* const &a, rowheight_t* const &b) const + { + return (a->GetRowNum() < b->GetRowNum()); + }; + }; + + typedef std::set RowHeight_List_t; + typedef RowHeight_List_t::iterator RowHeight_List_Itor_t; + + + + // NOTE: row_t has not a height field + typedef struct + { + unsigned16_t rownum; + unsigned16_t firstcol; + unsigned16_t lastcol; + }row_t; + typedef std::list Row_List_t; + typedef Row_List_t::iterator Row_List_Itor_t; + + + class CRow: public CRecord + { + private: + + public: + CRow(unsigned16_t rownum, + unsigned16_t firstcol, + unsigned16_t lastcol, + unsigned16_t rowheight = ROW_DFLT_HEIGHT); + CRow(row_t& rowdef); + + ~CRow(); + + void SetFirstCol(unsigned16_t firstrow); + void SetLastCol(unsigned16_t lastrow); + unsigned16_t GetFirstCol(void); + unsigned16_t GetLastCol(void); + + + + }; + + + /* +****************************** +CDBCell class declaration +****************************** +*/ + +#define DBC_DFLT_STARTBLOCK ((unsigned32_t)(0x00000000)) + + class CDBCell: public CRecord + { + private: + + public: + CDBCell(unsigned32_t startblock = DBC_DFLT_STARTBLOCK); + ~CDBCell(); + + void AddRowOffset(unsigned16_t rowoffset ); + + }; + + +} + +#endif //ROW_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: row.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/sheetrec.cpp b/uppdev/XLS/sheetrec.cpp new file mode 100644 index 000000000..26b39ec6a --- /dev/null +++ b/uppdev/XLS/sheetrec.cpp @@ -0,0 +1,1176 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/sheetrec.cpp,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +using namespace std; +using namespace xlslib_core; + + +/* + * LOCAL MODULE MACROS + */ + + +#if STORAGE_CELL==LIST_CONTAINER + +#define MARK_CELLS_UNSORTED() { \ + m_CellsSorted = false; \ + m_SizesCalculated = false; \ + m_RBSizes.clear(); \ +} + + +#elif STORAGE_CELL==SET_CONTAINER + +#define MARK_CELLS_UNSORTED() { \ + m_CellsSorted = false; \ + m_SizesCalculated = false; \ + m_RBSizes.clear(); \ +} + + +#endif + +#define MAX_ROWBLOCK_SIZE (32) + +#define RB_DBCELL_MINSIZE (unsigned8_t(8)) +#define RB_DBCELL_CELLSIZEOFFSET (unsigned8_t(2)) + + +using namespace std; + +/* +********************************************************************** +worksheet class implementation +********************************************************************** +*/ + + +worksheet::worksheet(CGlobalRecords* pglobalrec) + : m_DumpState(SHEET_INIT), m_pCurrentData(NULL), + m_Size(0), + m_CellsSorted(false), + m_SizesCalculated(false), + m_DumpRBState(RB_INIT), + m_DBCellOffset(0), + m_CurrentRowBlock(0) +{ + m_pGlobalRecords = pglobalrec; + + minRow = minCol = 0xFFFF; // UINT16_MAX + maxRow = maxCol = 0; +} +#ifdef HAVE_ICONV +worksheet::worksheet(CGlobalRecords* pglobalrec, string& code) + : m_DumpState(SHEET_INIT), m_pCurrentData(NULL), + m_Size(0), + m_CellsSorted(false), + m_SizesCalculated(false), + m_DumpRBState(RB_INIT), + m_DBCellOffset(0), + m_CurrentRowBlock(0) +{ + m_pGlobalRecords = pglobalrec; + + minRow = minCol = 0xFFFF; // UINT16_MAX + maxRow = maxCol = 0; + iconv_code = code; +} +#endif + + +worksheet::~worksheet() +{ + if(!m_RBSizes.empty()) + for(RBSize_List_Itor_t rbs = m_RBSizes.begin(); rbs != m_RBSizes.end(); rbs++) + delete *rbs; + + // Delete the dinamically created cell objects (pointers) + + if(!m_Cells.empty()) + { +// cout<<"worksheet::~worksheet(), this = "<AddDBCellOffset(dbcelloffset); + + // Update the offset for the next DBCELL's offset + rb_size_acc += dbcell_size; + } + + m_DumpState = SHEET_DIMENSION; // Change to the next state + + break; + } + + case SHEET_DIMENSION: + XTRACE("\tDIMENSION"); + + repeat = false; + + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = (CUnit*)(new CDimension(minRow, maxRow, minCol, maxCol)); + m_DumpState = SHEET_ROWBLOCKS; + break; + + case SHEET_ROWBLOCKS: + XTRACE("\tROWBLOCKS"); + if(GetNumRowBlocks()) + {// First check if the list of RBs is not empty... + + m_pCurrentData = RowBlocksDump(); + + if(m_pCurrentData == NULL) + { + + repeat = true; + m_DumpState = SHEET_MERGED; + + } + + } + else + {// if the list is empty, change the dump state. + repeat = true; + m_DumpState = SHEET_MERGED; + + } + + break; + case SHEET_MERGED: + + repeat = false; + XTRACE("\tMERGED"); + + if(!m_MergedRanges.empty()) + { + m_pCurrentData = (CUnit*)(new CMergedCells()); + ((CMergedCells*)m_pCurrentData)->SetNumRanges(m_MergedRanges.size()); + for(Range_List_Itor_t mr = m_MergedRanges.begin(); mr != m_MergedRanges.end(); mr++) + { + ((CMergedCells*)m_pCurrentData)->AddRange(*mr); + } + + } + else + { + repeat = true; + } + + m_DumpState = SHEET_COLINFO; + break; + + case SHEET_COLINFO: + repeat = false; + XTRACE("\tCOLINFO"); + + if(!m_Colinfos.empty()) + {// First check if the list of fonts is not empty... + + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = (CUnit*)(new CColInfo(*m_Current_Colinfo)); + + if(m_Current_Colinfo != (--m_Colinfos.end())) + {// if it was'nt the last font from the list, increment to get the next one + m_Current_Colinfo++; + } + else + {// if it was the last from the list, change the DumpState + m_DumpState = SHEET_WINDOW2; + m_Current_Colinfo = m_Colinfos.begin(); + } + } + else + {// if the list is empty, change the dump state. + m_DumpState = SHEET_WINDOW2; + //font = m_Fonts.begin(); + repeat = true; + } + break; + + case SHEET_WINDOW2: + XTRACE("\tWINDOW2"); + repeat = false; + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = (CUnit*)(new CWindow2()); + m_DumpState = SHEET_EOF; + + break; + + case SHEET_EOF: + XTRACE("\tEOF"); + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = (CUnit*)(new CEof()); + m_DumpState = SHEET_FINISH; + break; + + case SHEET_FINISH: + XTRACE("\tFINISH"); + //Delete_Pointer(m_pCurrentData); + m_pCurrentData = NULL; + m_DumpState = SHEET_INIT; + + break; + + + + } + + }while(repeat); + + return m_pCurrentData; +} + + +CUnit* worksheet::RowBlocksDump() +{ + bool repeat = false; + CUnit* rb_record = NULL; + + do + { + switch(m_DumpRBState) + { + case RB_INIT: + m_DumpRBState = RB_ROWS; + m_CurrentRowBlock = 0; + m_RowCounter = 0; + m_CurrentCell = m_Cells.begin(); + + // Initialize the row widths + + m_Current_RowHeight = m_RowHeights.begin(); + m_DumpRBState = RB_FIRST_ROW; + repeat = true; + + break; + case RB_FIRST_ROW: + repeat = true; + + if( m_Cells.empty() || m_CurrentCell != m_Cells.end()) + { + m_Starting_RBCell = m_CurrentCell; + m_CellCounter = 0; + m_DBCellOffset = 0; + m_CellOffsets.clear(); + + m_DumpRBState = RB_ROWS; + + } + else + { + m_DumpRBState = RB_FINISH; + + } + break; + + case RB_ROWS: + { + repeat = false; + + // Initialize first/last cols to impossible values + // that are appropriate for the following detection algorithm + unsigned16_t first_col = (unsigned16_t)(-1); + unsigned16_t last_col = 0; + unsigned16_t row_num = 0; + + // Get the row number for the current row + row_num = (*m_CurrentCell)->GetRow(); + + Cell_List_Itor_t this_cell, next_cell; + do + { + + // Determine the first/last column of the current row + if((*m_CurrentCell)->GetCol() > last_col) + last_col = (*m_CurrentCell)->GetCol(); + + if((*m_CurrentCell)->GetCol() < first_col) + first_col = (*m_CurrentCell)->GetCol(); + + + // To avoid dereference an empty iterator check if this is the only one cell + // in m_Cells list. + if(m_Cells.size() > 1) + { + m_CellCounter++; + + this_cell = m_CurrentCell; + next_cell = ++m_CurrentCell; + + // Break the while if there are no more cells + if(next_cell == m_Cells.end()) + break; + } + else + { + // Break the loop if this was the only cell. + + + if(!m_Cells.empty()) + + { + + m_CellCounter++; + + ++m_CurrentCell; + + } + + break; + } + + + + // The order in the following and-statement is important + }while( m_CurrentCell != (m_Cells.end()) && *(*this_cell) == *(*next_cell )); + + // Check if the current row is in the list of height-set + // rows. + if(m_Current_RowHeight != m_RowHeights.end()) + { + + if((*m_Current_RowHeight)->GetRowNum() == row_num) + { + + rb_record = (CUnit*) (new CRow(row_num, first_col, + last_col, + (*m_Current_RowHeight)->GetRowHeight()) ); + + m_Current_RowHeight++; + } + else + { + rb_record = (CUnit*) (new CRow(row_num, first_col, last_col) ); + } + } + else + { + rb_record = (CUnit*) (new CRow(row_num, first_col, last_col) ); + } + + + + m_DBCellOffset += ROW_RECORD_SIZE; + + // If the current row-block is full OR there are no more cells + if(++m_RowCounter >= MAX_ROWBLOCK_SIZE || m_CurrentCell == m_Cells.end()) + { + if (m_CurrentCell == (--m_Cells.end())) + m_CellCounter++; + m_RowCounter = 0; + m_DumpRBState = RB_FIRSTCELL; + } + + + break; + } + + case RB_FIRSTCELL: + rb_record = (*m_Starting_RBCell)->GetData(); + + // Update the offset to be used in the DBCell Record + m_DBCellOffset += rb_record->GetDataSize(); + + // The first cell of the rowblock has an offset that includes (among others) + // the rows size (without counting the first row) + m_CellOffsets.push_back(m_DBCellOffset -ROW_RECORD_SIZE); + + // Update the pointer (iterator) to the next cell + if(--m_CellCounter == 0) + {// The RowBlock's cells are done + m_DumpRBState = RB_DBCELL; + } + else + { + + m_Starting_RBCell++; + m_DumpRBState = RB_CELLS; + } + + + break; + + case RB_CELLS: + repeat = false; + + if(m_CellCounter == 0) + {// The RowBlock's cells are done + + + + m_DumpRBState = RB_DBCELL; + + repeat = true; + } + else + { + + + rb_record = (*m_Starting_RBCell)->GetData(); + + m_DBCellOffset += rb_record->GetDataSize(); + + m_CellOffsets.push_back(rb_record->GetDataSize()); + + + + m_CellCounter--; + + + + m_Starting_RBCell++; + } + + + + break; + + case RB_DBCELL: + { + + repeat = false; + + + rb_record = (CUnit*)(new CDBCell(m_DBCellOffset)); + + CellOffsets_List_Itor_t celloffset; + for(celloffset = m_CellOffsets.begin(); celloffset != m_CellOffsets.end(); celloffset++) + ((CDBCell*)rb_record)->AddRowOffset(*celloffset); + + if(m_CurrentCell == (--m_Cells.end()) ) + m_DumpRBState = RB_FINISH; + else + m_DumpRBState = RB_FIRST_ROW; + + break; + } + case RB_FINISH: + repeat = false; + rb_record = NULL; + m_DumpRBState = RB_INIT; + + + break; + + default: + break; + + } + + + }while(repeat); + + return rb_record; + +} +/* +*********************************** +*********************************** +*/ + +cell_t* worksheet::label(unsigned16_t row, unsigned16_t col, + string strlabel, xf_t* pxformat) +{ + label_t* label = new label_t(row, col, strlabel, pxformat); + AddCell((cell_t*)label); + + return (cell_t*)label; + + +} + +#if VERSION_BIFF == VERSION_BIFF8 +cell_t* worksheet::label(unsigned16_t row, unsigned16_t col, + ustring strlabel, xf_t* pxformat) +{ + label_t* label = new label_t(row, col, strlabel +#ifdef HAVE_ICONV + , iconv_code +#endif + , pxformat); + AddCell((cell_t*)label); + + return (cell_t*)label; + +} +#endif + + +cell_t* worksheet::number(unsigned16_t row, unsigned16_t col, + double numval, format_number_t fmtval, + xf_t* pxformat) +{ + number_t* number = new number_t(row, col, numval, pxformat); + AddCell((cell_t*)number); + number->format(fmtval); + return (cell_t*)number; + +} + +/* +*********************************** +*********************************** +*/ + +cell_t* worksheet::blank(unsigned16_t row, unsigned16_t col, xf_t* pxformat) +{ + blank_t* blank = new blank_t(row, col, pxformat); + AddCell((cell_t*)blank); + + return (cell_t*)blank; +} + + + +/* +*********************************** +*********************************** +*/ + +void worksheet::AddCell(cell_t* pcell) +{ + + Cell_List_Itor_t existing_cell; + + unsigned32_t row, col; + + row = pcell->GetRow(); + col = pcell->GetCol(); + + if(row < minRow) minRow = row; + if(row > maxRow) maxRow = row; + if(col < minCol) minCol = col; + if(col > maxCol) maxCol = col; + + // Pass a pointer to m_GlobalRecords, so the global records + // can be modified from the cell as needed + pcell->SetGlobalRecs(m_pGlobalRecords); + + SortCells(); + // lookup the cell + existing_cell = m_Cells.find(pcell); + + if(existing_cell != m_Cells.end()) + { + //Always overwrite + delete (*existing_cell); + m_Cells.erase(existing_cell); + m_Cells.insert(pcell); + MARK_CELLS_UNSORTED(); + } + else + { + m_Cells.insert(pcell); + MARK_CELLS_UNSORTED(); + } + +} + +cell_t* worksheet::FindCell(unsigned16_t row, unsigned16_t col) +{ + Cell_List_Itor_t existing_cell; + + cell_t* cell = new blank_t(row, col); + existing_cell = m_Cells.find(cell); + delete cell; + + // The find operation returns the end() itor + // if the cell wasn't found + if(existing_cell != m_Cells.end()) + return *existing_cell; + else + { + + return blank(row,col); + } +} +/* + void worksheet::AddCell(cell_t* pcell, bool overwrite) + { + + #if STORAGE_CELL == LIST_CONTAINER + m_Cells.push_back(pcell); + + #elif STORAGE_CELL == SET_CONTAINER + m_Cells.insert(pcell); + #endif + MARK_CELLS_UNSORTED(); + } +*/ +/* +*********************************** +*********************************** +*/ + + +unsigned32_t worksheet::GetSize() +{ + m_CurrentSizeCell = m_Cells.begin(); + unsigned32_t numrb = GetNumRowBlocks(); + unsigned16_t merged_size; + unsigned16_t colinfo_size; + + + // The size of the merged cells record (if any) has to be taken in count + if(!m_MergedRanges.empty()) + { + // [HEADER] + [NUMRANGESFIELD] + [RANGES] + merged_size = 4 + 2 + m_MergedRanges.size()*8; + } + else + { + merged_size = 0; + } + + // The size of the Colinfo records (if any) has to be taken in count + if(!m_Colinfos.empty()) + { + colinfo_size = m_Colinfos.size()*14; + } + else + { + colinfo_size = 0; + } + + + unsigned32_t size = BOF_SIZE + + RB_INDEX_MINSIZE + + 4*numrb + + merged_size + + colinfo_size + + WINDOW2_SIZE + + EOF_SIZE; + + for(unsigned32_t rb = 0; rb < numrb; rb++) + { + // Get sizes of next RowBlock + unsigned32_t rowandcell_size, dbcell_size; + GetRowBlockSizes( &rowandcell_size, &dbcell_size); + + // Update the offset accumulator and cerate the next DBCELL's offset + size += rowandcell_size; + size += dbcell_size; + } + + m_CurrentSizeCell = m_Cells.begin(); + + return size; +} + +/* +*********************************** +*********************************** +*/ + +bool worksheet::GetRowBlockSizes(unsigned32_t* rowandcell_size, + unsigned32_t* dbcell_size, + unsigned32_t* num_rows) +{ + + SortCells(); + + unsigned32_t row_counter = 0; + unsigned32_t cell_counter = 0; + + Cell_List_Itor_t beginning_cell = m_CurrentSizeCell; + + // Initialize the size values (since they work as accumulators) + *rowandcell_size = 0; + *dbcell_size = 0; + + + if(!m_SizesCalculated) + { + + // Check if there are no cells + if(!m_Cells.empty()) + { + // The first cell is inside a row that has to be counted + // row_counter = 1; + + do + { + cell_counter++; // There's at least one cell on each loop.. that's for sure! + + // Since the list of cells is sorted by rows, continuouslly equal cells (compared by row) + // conform one row... if the next one is different, increment the row counter + Cell_List_Itor_t this_cell = m_CurrentSizeCell; + Cell_List_Itor_t next_cell = ++ m_CurrentSizeCell; + + // To avoid dereferencing an empty iterator check if this is the only + // one cell in m_Cells list. + if( m_Cells.size()>1) + { + if( *(*this_cell) != *(*(next_cell)) ) + row_counter++; + } + else + { + // Break the loop if this was the only one cell in the list + // .. also set the only one row + cell_counter--; + m_CurrentSizeCell = (--m_Cells.end()); + break; + + } + + }while(row_counter < MAX_ROWBLOCK_SIZE && + m_CurrentSizeCell != (--m_Cells.end())); // Check also if the currentcell isn't the last one + + // If the cells run out before the row counter changes, the last row (and last cell) isn't counted + // in the previous control structre. + if(m_CurrentSizeCell == (--m_Cells.end())) + { + row_counter++; + cell_counter++; + } + + + if(num_rows != NULL) + *num_rows += row_counter; + // Get the size of the rows + *rowandcell_size += ROW_RECORD_SIZE*row_counter; + + // Get the size of the cells using the saved iterator pointing to the beginning of this block + for(unsigned32_t count_blockcells = 0; count_blockcells GetSize(); + beginning_cell++; + } + + // Now get the size of the DBCELL + *dbcell_size += RB_DBCELL_MINSIZE; + *dbcell_size += RB_DBCELL_CELLSIZEOFFSET*cell_counter; + + + // Check the size of the data int the DBCELL record (without the header) + // to take in count the overhead of the CONTINUE record (4bytes/CONTrec) + if((*dbcell_size-4) > MAX_RECORD_SIZE) + { + unsigned32_t cont_overhead = (*dbcell_size / MAX_RECORD_SIZE); + if(*dbcell_size % MAX_RECORD_SIZE) + cont_overhead++; + + *dbcell_size += (cont_overhead-1)*4; + + } + + + rowblocksize_t* rbsize = new rowblocksize_t; + + rbsize->rowandcell_size = *rowandcell_size; + rbsize->dbcell_size = *dbcell_size; + rbsize->rows_sofar = row_counter; + m_RBSizes.push_back(rbsize); + + // If it was the last block, reset the current-label pointer + if(m_CurrentSizeCell == (--m_Cells.end())) + { + m_CurrentSizeCell = m_Cells.begin(); + m_Current_RBSize = m_RBSizes.begin(); + m_SizesCalculated = true; + + return false; + } + + + } + + // If there are no cells in the sheet, return sizes = 0. + if(m_Cells.empty()) + return false; + + else + + return true; + + } + else + { + *rowandcell_size = (*m_Current_RBSize)->rowandcell_size; + *dbcell_size = (*m_Current_RBSize)->dbcell_size; + if(num_rows != NULL) + *num_rows += (*m_Current_RBSize)->rows_sofar; + + m_Current_RBSize++; + + // Resett the current RBSize + if(m_Current_RBSize == m_RBSizes.end()) + { + m_Current_RBSize = m_RBSizes.begin(); + return false; + } + } + return true; +} + + +/* +*********************************** +*********************************** +*/ + +void worksheet::GetFirstLastRows(unsigned32_t* first_row, unsigned32_t* last_row) +{ + + // First check that the m_Cells list is not empty, so we won't dereference + // empty anr iterator. + if(!m_Cells.empty()) + { + SortCells(); + + cell_t* pcell; + pcell = *(m_Cells.begin()); + *first_row = pcell->GetRow(); + + pcell = *(--m_Cells.end()); + *last_row = pcell->GetRow(); + + + } + else + { + // If there is no cells in the list the first/last rows + // are defaulted to zero. + *first_row = 0; + *last_row = 0; + } + +} + +/* +*********************************** +*********************************** +*/ + + +unsigned32_t worksheet::GetNumRowBlocks() +{ + + unsigned32_t numrb; + + // First check that the m_Cells list is not empty, so we won't dereference + // empty anr iterator. + + bool cont = false; + unsigned32_t num_rows = 0; + do + { + unsigned32_t dummy1, dummy2; + cont = GetRowBlockSizes(&dummy1, &dummy2, &num_rows); + }while(cont); +/* + Cell_List_t temp_cell_list = m_Cells; + temp_cell_list.sort(); + temp_cell_list.unique(); +*/ + + if(!m_Cells.empty()) + { + + numrb = num_rows/MAX_ROWBLOCK_SIZE; + if(num_rows%MAX_ROWBLOCK_SIZE) + numrb++; + } + else + { + // If the m_Cell list is empty, there are no rowblocks in the sheet. + numrb = 0; + } + + return numrb; +} + +/* +*********************************** +*********************************** +*/ + +void worksheet::merge(unsigned16_t first_row, unsigned16_t first_col, + unsigned16_t last_row, unsigned16_t last_col) +{ + range_t* newrange = new range_t; + + newrange->first_row = first_row; + newrange->last_row = last_row; + newrange->first_col = first_col; + newrange->last_col = last_col; + + m_MergedRanges.push_back(newrange); + + +} + +/* +*********************************** +*********************************** +*/ + +void worksheet::colwidth(unsigned16_t col, unsigned16_t width) +{ + colinfo_t* newci = new colinfo_t; + Colinfo_List_Itor_t existing_ci; + + newci->colfirst = col; + newci->collast = col; + newci->flags = 0x00; + newci->xformat = NULL; + newci->width = width*256; //sets column widths to 1/256 x width of "0" + + // m_Colinfos.push_back(newci); + existing_ci = m_Colinfos.find(newci); + + if(existing_ci != m_Colinfos.end()) + { + //Always overwrite + delete (*existing_ci); + m_Colinfos.erase(existing_ci); + m_Colinfos.insert(newci); + } + else + { + m_Colinfos.insert(newci); + } +} + + +/* +*********************************** +*********************************** +*/ + +void worksheet::rowheight(unsigned16_t row, unsigned16_t height) +{ + rowheight_t* newrh = new rowheight_t(row,height*20); + RowHeight_List_Itor_t existing_rh; + + //m_RowHeights.insert(newrh); + + existing_rh = m_RowHeights.find(newrh); + + if(existing_rh != m_RowHeights.end()) + { + //Always overwrite + delete (*existing_rh); + m_RowHeights.erase(existing_rh); + m_RowHeights.insert(newrh); + } + else + { + m_RowHeights.insert(newrh); + } + + + +} + + +range* worksheet::rangegroup(unsigned16_t row1, unsigned16_t col1, + unsigned16_t row2, unsigned16_t col2) +{ + + range* newrange = new range(row1, col1, row2, col2, this); + m_Ranges.push_back(newrange); + + return newrange; + +} + + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: sheetrec.cpp,v $ + * Revision 1.3 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:04 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:31:51 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/sheetrec.h b/uppdev/XLS/sheetrec.h new file mode 100644 index 000000000..c4cca6ab7 --- /dev/null +++ b/uppdev/XLS/sheetrec.h @@ -0,0 +1,233 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/sheetrec.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifndef SHEETREC_H +#define SHEETREC_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace xlslib_core +{ + + /* +*********************************** +worksheet class declaration +*********************************** +*/ + + typedef enum + { + SHEET_INIT, + SHEET_BOF, + SHEET_INDEX, + SHEET_DIMENSION, + SHEET_ROWBLOCKS, + SHEET_MERGED, + SHEET_COLINFO, + SHEET_WINDOW2, + SHEET_EOF, + SHEET_FINISH + } SheetRecordDumpState_t; + + +#define BOF_SIZE ((unsigned8_t)12) +#define EOF_SIZE ((unsigned8_t)4) +#define WINDOW2_SIZE ((unsigned8_t)14) + + typedef struct + { + unsigned32_t rowandcell_size; + unsigned32_t dbcell_size; + unsigned32_t rows_sofar; + + } rowblocksize_t; + + typedef std::list RBSize_List_t; + typedef RBSize_List_t::iterator RBSize_List_Itor_t; + + typedef enum + { + RB_INIT, + RB_FIRST_ROW, + RB_ROWS, + RB_FIRSTCELL, + RB_CELLS, + RB_DBCELL, + RB_FINISH + + } DumpRowBlocksState_t; + + typedef std::list CellOffsets_List_t; + typedef CellOffsets_List_t::iterator CellOffsets_List_Itor_t; + + //class range; + class worksheet + + : public CBiffSection + + { + + private: + CGlobalRecords* m_pGlobalRecords; +#ifdef HAVE_ICONV + std::string iconv_code; +#endif + SheetRecordDumpState_t m_DumpState; + CUnit* m_pCurrentData; + // std::string m_Name; 10-1-08 not sure why here + + bool m_SizeCalculated; + size_t m_Size; + + Range_List_t m_MergedRanges; + + Colinfo_List_t m_Colinfos; + Colinfo_List_Itor_t m_Current_Colinfo; + + RowHeight_List_t m_RowHeights; + RowHeight_List_Itor_t m_Current_RowHeight; + + unsigned16_t minRow, minCol, maxRow, maxCol; + // Label related additions + + /* void AddLabel(unsigned16_t row, unsigned16_t col, + std::string& strlabel, unsigned16_t& xformat); + */ + + private: + Cell_List_t m_Cells; + Cell_List_Itor_t m_CurrentCell; // Init this one in the INIT state + Cell_List_Itor_t m_CurrentSizeCell; // Init this one in the INIT state + bool m_CellsSorted; + + RangeObj_List_t m_Ranges; + + RBSize_List_t m_RBSizes; + RBSize_List_Itor_t m_Current_RBSize; + bool m_SizesCalculated; + + DumpRowBlocksState_t m_DumpRBState; + unsigned8_t m_RowCounter; + unsigned32_t m_CellCounter; + unsigned32_t m_DBCellOffset; + CellOffsets_List_t m_CellOffsets; + + unsigned32_t m_CurrentRowBlock; + Cell_List_Itor_t m_Starting_RBCell; + + void GetFirstLastRows(unsigned32_t* first_row, unsigned32_t* last_row); + unsigned32_t GetNumRowBlocks(); + bool GetRowBlockSizes(unsigned32_t* rowandcell_size, + unsigned32_t* dbcell_size, + unsigned32_t* num_rows = NULL); + CUnit* RowBlocksDump(); + + void AddCell(cell_t* pcell); + + void SortCells(); + + public: + + worksheet(CGlobalRecords* pglobalrec); +#if HAVE_ICONV + worksheet(CGlobalRecords* pglobalrec, std::string& code); +#endif + ~worksheet(); + + // The offset defines the amount + // of data form the beginning of the BIFF records to the first + + CUnit* DumpData(unsigned32_t offset); + unsigned32_t GetSize(); + cell_t* FindCell(unsigned16_t row, unsigned16_t col); + + // Cell operations + void merge(unsigned16_t first_row, unsigned16_t first_col, + unsigned16_t last_row, unsigned16_t last_col); + void colwidth(unsigned16_t col, unsigned16_t width); + void rowheight(unsigned16_t row, unsigned16_t height); + // Ranges + range* rangegroup(unsigned16_t row1, unsigned16_t col1, + unsigned16_t row2, unsigned16_t col2); + + // Cells + cell_t* label(unsigned16_t row, unsigned16_t col, + std::string strlabel, xf_t* pxformat = NULL); + +#if VERSION_BIFF == VERSION_BIFF8 + cell_t* label(unsigned16_t row, unsigned16_t col, + std::ustring strlabel, xf_t* pxformat = NULL); +#endif + cell_t* blank(unsigned16_t row, unsigned16_t col, + xf_t* pxformat = NULL); + + cell_t* number(unsigned16_t row, unsigned16_t col, + double numval, format_number_t fmtval, + xf_t* pxformat = NULL); + }; + + typedef std::vector Sheets_Vector_t; + typedef Sheets_Vector_t::iterator Sheets_Vector_Itor_t; + +} + +#endif // SHEETREC_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: sheetrec.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:44 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + + diff --git a/uppdev/XLS/stringtok.h b/uppdev/XLS/stringtok.h new file mode 100644 index 000000000..b94ec7217 --- /dev/null +++ b/uppdev/XLS/stringtok.h @@ -0,0 +1,148 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/common/stringtok.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * stringtok.h -- Breaks a string into tokens. This is an example for lib3. + * + * Template function looks like this: + * + * template + * void stringtok (Container &l, + * string const &s, + * char const * const ws = " \t\n"); + * + * A nondestructive version of strtok() that handles its own memory and can + * be broken up by any character(s). Does all the work at once rather than + * in an invocation loop like strtok() requires. + * + * Container is any type that supports push_back(a_string), although using + * list and deque are indicated due to their O(1) push_back. + * (I prefer deque<> because op[]/at() is available as well.) The first + * parameter references an existing Container. + * + * s is the string to be tokenized. From the parameter declaration, it can + * be seen that s is not affected. Since references-to-const may refer to + * temporaries, you could use stringtok(some_container, readline("")) when + * using the GNU readline library. + * + * The final parameter is an array of characters that serve as whitespace. + * Whitespace characters default to one or more of tab, space, and newline, + * in any combination. + * + * 'l' need not be empty on entry. On return, 'l' will have the token + * strings appended. + * + * + * [Example: + * list ls; + * stringtok (ls, " this \t is\t\n a test "); + * for (list::const_iterator i = ls.begin(); + * i != ls.end(); ++i) + * { + * cerr << ':' << (*i) << ":\n"; + * } + * + * would print + * :this: + * :is: + * :a: + * :test: + * -end example] + * + * pedwards@jaj.com May 1999 + */ + +#include +#include // for strchr + +#include +#include + +/***************************************************************** + * This is the only part of the implementation that I don't like. + * It can probably be improved upon by the reader... + */ +namespace { + inline bool + isws (char c, char const * const wstr) + { + return (strchr(wstr,c) != NULL); + } +} + +/***************************************************************** + * Simplistic and quite Standard, but a bit slow. This should be + * templatized on basic_string instead, or on a more generic StringT + * that just happens to support ::size_type, .substr(), and so on. + * I had hoped that "whitespace" would be a trait, but it isn't, so + * the user must supply it. Enh, this lets them break up strings on + * different things easier than traits would anyhow. + */ +template +void +stringtok (Container &l, std::string const &s, char const * const ws = " \t\n") +{ + const std::string::size_type S = s.size(); + std::string::size_type i = 0; + + while (i < S) { + // eat leading whitespace + while ((i < S) && (isws(s[i],ws))) ++i; + if (i == S) return; // nothing left but WS + + // find end of word + std::string::size_type j = i+1; + while ((j < S) && (!isws(s[j],ws))) ++j; + + // add word + std::string* substr = new std::string; + *substr = s.substr(i,j-i); + l.push_back(substr); + + // set up for next loop + i = j+1; + } +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: stringtok.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:32:05 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/summinfo.cpp b/uppdev/XLS/summinfo.cpp new file mode 100644 index 000000000..086a56a00 --- /dev/null +++ b/uppdev/XLS/summinfo.cpp @@ -0,0 +1,88 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/summinfo.cpp,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#include + +#include // Temporarilly used to add data for summary info + +using namespace std; +using namespace xlslib_core; + +/* +********************************************************************** +CSummaryInfo class implementation +********************************************************************** +*/ + + +CSummaryInfo::CSummaryInfo() +{ + XTRACE("WRITE_SUMMARY"); + + CUnit* ptraildata = new CUnit; + ptraildata->AddDataArray(CSummaryInfo::summ_info_data, sizeof(CSummaryInfo::summ_info_data)); + (*this) += ptraildata; +} + +CSummaryInfo::~CSummaryInfo() +{ + + +} + + +/* +*********************************** +*********************************** +*/ + +CUnit* CSummaryInfo::DumpData(void) +{ + XTRACE("\tCSummaryInfo::DumpData"); + return (CUnit*)this; + +} + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: summinfo.cpp,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:57 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/summinfo.h b/uppdev/XLS/summinfo.h new file mode 100644 index 000000000..29027650f --- /dev/null +++ b/uppdev/XLS/summinfo.h @@ -0,0 +1,82 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/summinfo.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + + +#ifndef SUMMARYINFO_H +#define SUMMARYINFO_H + +#include +#include +#include + + +namespace xlslib_core +{ + + /* +******************************** +CSummaryInfo class declaration +******************************** +*/ + + + class CSummaryInfo: public CDataStorage + { + private: + static const unsigned8_t summ_info_data[]; + + protected: + + public: + CSummaryInfo(); + ~CSummaryInfo(); + + CUnit* DumpData(); + + }; + +} +#endif //SUMMARYINFO_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: summinfo.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/systype.h b/uppdev/XLS/systype.h new file mode 100644 index 000000000..9ece447a6 --- /dev/null +++ b/uppdev/XLS/systype.h @@ -0,0 +1,282 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/common/systype.h,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef SYSTYPE_H +#define SYSTYPE_H + +#if defined(_MSC_VER) && defined(WIN32) +#pragma warning(disable: 4786) // Long debug information related to STL +#pragma warning(disable: 4290) // C++ Exception Specification ignored +#endif + +//# define PHPEXT_TSRMLS_C tsrm_ls +//# define PHPEXT_TSRMLS_D void ***tsrm_ls + +// Global includes +#include +#include +#include +#include +#include // DFH 10-2-08 +#include +#include +#include +#include + +#define INLINE inline + +//#define NULL ((void*)(0)) + +#define NO_ERRORS 0 +#define FILE_ERROR -1 +#define GENERAL_ERROR ((signed8_t)-100) + +#define PTYPE_DIRECTORY ((unsigned8_t)(0x01)) +#define PTYPE_FILE ((unsigned8_t)(0x02)) +#define PTYPE_ROOT ((unsigned8_t)(0x05)) + +#define PCOLOR_BLACK ((unsigned8_t)(0x01)) +#define PCOLOR_RED ((unsigned8_t)(0x00)) + +#define PLINK_EMPTY ((signed32_t)(-1)) +#define PBLOCK_END ((signed32_t)(-2)) + + +#if USE_ALLOCATOR==ALLOCATOR_STL +#define XLSLIB_DFLT_ALLOCATOR + +#elif USE_ALLOCATOR==ALLOCATOR_BTI +#include "bti_thread_alloc.h" +#define XLSLIB_DFLT_ALLOCATOR ,bti::thr_alloc + +#else +# error ERROR: Invalid allocator option +#endif + +#ifdef uint32_t // if we have this one we will have all the others too + +typedef unsigned char unsigned8_t; +typedef unsigned short int unsigned16_t; +typedef unsigned int unsigned32_t; + +typedef char signed8_t; +typedef short int signed16_t; +typedef int signed32_t; + +#else + +typedef uint8_t unsigned8_t; +typedef uint16_t unsigned16_t; +typedef uint32_t unsigned32_t; + +typedef int8_t signed8_t; +typedef int16_t signed16_t; +typedef int32_t signed32_t; + +#endif + +#if defined(_MSC_VER) && defined(WIN32) + +typedef wchar_t uchar_t; +#define ustring wstring +//typedef wstring ustring; + +#elif defined(__FRAMEWORK__) // For Mac-OSX + +#undef HAVE_ICONV + +#if ! defined(unichar) +typedef uint16_t unichar; +#endif + +typedef unichar uchar_t; +//typedef std::basic_string ustring; +#define ustring basic_string + + +#else + +typedef wchar_t uchar_t; +#define ustring wstring +typedef std::basic_string u16string; + +#endif + + +#if defined(_MSC_VER) && defined(WIN32) + +typedef __int64 unsigned64_t; + +#else // not windows + +#ifdef _UINT64_T + +typedef uint64_t unsigned64_t; + +#else + +typedef unsigned long long unsigned64_t; + +#endif + +#endif + +typedef std::list StringList_t; +typedef StringList_t::const_iterator StringListItor_t; + +// Macros +# define MASK_BYTE0 0x00000000000000ff +# define MASK_BYTE1 0x000000000000ff00 +# define MASK_BYTE2 0x0000000000ff0000 +# define MASK_BYTE3 0x00000000ff000000 + +#if defined(_MSC_VER) && defined(WIN32) + +# define MASK_BYTE4 0x000000ff00000000 +# define MASK_BYTE5 0x0000ff0000000000 +# define MASK_BYTE6 0x00ff000000000000 +# define MASK_BYTE7 0xff00000000000000 + +#else + +# define MASK_BYTE4 (unsigned64_t)0x000000ff00000000LL +# define MASK_BYTE5 (unsigned64_t)0x0000ff0000000000LL +# define MASK_BYTE6 (unsigned64_t)0x00ff000000000000LL +# define MASK_BYTE7 (unsigned64_t)0xff00000000000000LL + +#endif + +#define BYTE_0(num) (unsigned8_t) (num & MASK_BYTE0) +#define BYTE_1(num) (unsigned8_t)((num & MASK_BYTE1)>>0x08) +#define BYTE_2(num) (unsigned8_t)((num & MASK_BYTE2)>>0x10) +#define BYTE_3(num) (unsigned8_t)((num & MASK_BYTE3)>>0x18) + +#define BYTE_4(num) (unsigned8_t)((num & MASK_BYTE4)>>0x20) +#define BYTE_5(num) (unsigned8_t)((num & MASK_BYTE5)>>0x28) +#define BYTE_6(num) (unsigned8_t)((num & MASK_BYTE6)>>0x30) +#define BYTE_7(num) (unsigned8_t)((num & MASK_BYTE7)>>0x38) + + + +#define PROPERTY_DFLT_NOTUSED ((unsigned8_t)(0x00)) +#define PROPERTY_MAX_NAME_LENGTH ((unsigned8_t)(32)) + +#define PROPERTY_TYPE_DIR ((unsigned8_t)(0x01)) +#define PROPERTY_TYPE_FILE ((unsigned8_t)(0x02)) +#define PROPERTY_TYPE_ROOT ((unsigned8_t)(0x05)) + +#define PROPERTY_COLOR_NODE_RED ((unsigned8_t)(0x00)) +#define PROPERTY_COLOR_NODE_BLACK ((unsigned8_t)(0x01)) +#define PROPERTY_LINK_EMPTY ((signed32_t)(-1)) + +#define PPTPOS_NAME ((unsigned8_t)(0x00)) +#define PPTPOS_NAMELENGTH ((unsigned8_t)(0x40)) +#define PPTPOS_TYPE ((unsigned8_t)(0x42)) +#define PPTPOS_NODECOLOR ((unsigned8_t)(0x43)) +#define PPTPOS_PREVIOUS ((unsigned8_t)(0x44)) +#define PPTPOS_NEXT ((unsigned8_t)(0x48)) +#define PPTPOS_CHILD ((unsigned8_t)(0x4C)) +#define PPTPOS_UNUSED_EMPTY0 ((unsigned8_t)(0x50)) + + +#define PPTPOS_SECS1 ((unsigned32_t)(0x64)) +#define PPTPOS_SECS2 ((unsigned32_t)(0x68)) +#define PPTPOS_DAYS1 ((unsigned32_t)(0x6c)) +#define PPTPOS_DAYS2 ((unsigned32_t)(0x70)) + +#define PPTPOS_STARTBLOCK ((unsigned8_t)(0x74)) +#define PPTPOS_SIZE ((unsigned8_t)(0x78)) + + +#define PPT_DFLT_SECS1 ((signed32_t)(0)) +#define PPT_DFLT_SECS2 ((signed32_t)(0)) +#define PPT_DFLT_DAYS1 ((signed32_t)(0)) +#define PPT_DFLT_DAYS2 ((signed32_t)(0)) + + +// More macros + +/* +**************************************** +**************************************** +*/ +#define Delete_Pointer(pt) { \ + if(pt != NULL) \ + { \ + delete pt; \ + pt = NULL; \ + } \ +} + + +/* +**************************************** +**************************************** +*/ +#ifdef __DEBUG__ +#define XTRACE(str) { \ + cout<<"DEBUG: "<. + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/common/timespan.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:53 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef TIMESPAN_H +#define TIMESPAN_H + +#include +#include + +#include +#include + +class CCpuClockTimespan +{ + enum + { INVALID_VALUE = -1, }; + + public: + CCpuClockTimespan() + : m_clockStart( INVALID_VALUE), + m_nUsedClockTicks( INVALID_VALUE) + {} + ~CCpuClockTimespan() + {} + + void StartClock() + { + // the clock is already started !!! + // stop it first !!! + assert( m_clockStart == (clock_t)INVALID_VALUE); + m_nUsedClockTicks = (clock_t)INVALID_VALUE; + m_clockStart = clock(); + } + + void StopClock() + { + const clock_t clockStop = clock(); + + // start the clock first !!! + assert( m_clockStart != (clock_t)INVALID_VALUE); + m_nUsedClockTicks = clockStop - m_clockStart; + + // after this, we can start it again !!! + m_clockStart = INVALID_VALUE; + } + + unsigned long GetUsedMilliseconds() const + { + const int MILLISECONDS_PER_SECOND = 1000; + + // the clock was never started, + // or it's started, but it has not been stopped yet + assert( m_nUsedClockTicks != (clock_t)INVALID_VALUE); + + double nSeconds = ( ( double)m_nUsedClockTicks) / CLOCKS_PER_SEC; + + const unsigned long nMilliseconds = (unsigned long)(nSeconds * MILLISECONDS_PER_SECOND); + + return nMilliseconds; + } + + private: + + // when did we Start to measure + // clock time? + clock_t m_clockStart; + + // the used clock ticks, from Start to Stop + clock_t m_nUsedClockTicks; +}; + +#endif //TIMESPAN_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: timespan.h,v $ + * Revision 1.2 2008/10/25 18:39:53 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:32:05 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/tostr.h b/uppdev/XLS/tostr.h new file mode 100644 index 000000000..af52967bd --- /dev/null +++ b/uppdev/XLS/tostr.h @@ -0,0 +1,171 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/tostr.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 19:08:52 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +#ifndef TOSTR_H +#define TOSTR_H + +#include +#include +#include + +#include + +// forward declaration +struct str_stream; + +// ... helper - allow explicit conversion to string +class as_string {}; +inline std::ostream & operator<< ( std::ostream & streamOut, const as_string &) +{ + return streamOut; +} + +namespace Private +{ + // what should we return when calling write_to_stream ? + template< class type> + struct return_from_write_to_stream + { + typedef const str_stream & return_type; + }; + + template<> + struct return_from_write_to_stream< as_string> + { + typedef std::string return_type; + }; + + // forward declaration + template< class type> + inline typename return_from_write_to_stream< type>::return_type + write_to_stream ( const str_stream & streamOut, const type & value); +} + + +// forward declaration +template< class type> +inline typename Private::return_from_write_to_stream< type>::return_type operator<< ( const str_stream & streamOut, const type & value); + +// str_stream - allow stream usage, and then conversion to string +struct str_stream +{ + // default construction + str_stream(){} + + // allow to_string like usage + template< class type> + str_stream( const type & value) + { + *this << value; + } + + std::stringstream & underlying_stream() const + { return m_streamOut; } + + operator std::string() const + { + return m_streamOut.str(); + } + + private: + mutable std::stringstream m_streamOut; + +#ifndef NDEBUG + public: + void recalculate_string() const + { m_string = m_streamOut.str(); } + private: + mutable std::string m_string; +#endif + +}; + +namespace Private +{ + template< class type> + inline typename return_from_write_to_stream< type>::return_type + write_to_stream ( const str_stream & streamOut, const type & value) + { + streamOut.underlying_stream() << value; +#ifndef NDEBUG + streamOut.recalculate_string(); +#endif + return streamOut; + } +} + +template< class type> +inline typename Private::return_from_write_to_stream< type>::return_type operator<< ( const str_stream & streamOut, const type & value) +{ + return Private::write_to_stream( streamOut, value) ; +} + + +// allow function IO manipulators +inline const str_stream & operator<< ( const str_stream & streamOut, std::ios_base & (*func)( std::ios_base&) ) +{ + func( streamOut.underlying_stream()); + return streamOut; +} + +inline const str_stream & operator<< ( const str_stream & streamOut, std::basic_ios< char> & (*func)( std::basic_ios< char> &) ) +{ + func( streamOut.underlying_stream()); + return streamOut; +} + +inline const str_stream & operator<< ( const str_stream & streamOut, std::ostream & (*func)( std::ostream &) ) +{ + func( streamOut.underlying_stream()); + return streamOut; +} + + + +#endif //TOSTR_H +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: tostr.h,v $ + * Revision 1.2 2008/10/25 19:08:52 dhoerl + * Updated header + * + * Revision 1.1.1.1 2004/08/27 16:31:54 darioglz + * Initial Import. + * + * Revision 1.2 2004/01/29 03:18:55 dgonzalez + * + Using the config.h file + * + * Revision 1.1 2003/12/02 18:15:06 dgonzalez + * + Initial version. Added to handle signatures of objects + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/unit.cpp b/uppdev/XLS/unit.cpp new file mode 100644 index 000000000..6b73777f7 --- /dev/null +++ b/uppdev/XLS/unit.cpp @@ -0,0 +1,662 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/unit.cpp,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include + +using namespace std; +using namespace xlslib_core; + +/* +********************************************************************************* +********************************************************************************* +CUnit class implementation +********************************************************************************* +********************************************************************************* +*/ + +// Default constructor +CUnit::CUnit() : m_nSize(0), m_pData(0), m_nDataSize(0) + //, m_ShadowUnit(false) +{ + +} + +// Default destructor +CUnit::~CUnit ( ) +{ + if(m_pData /*&& !m_ShadowUnit*/) + { + delete[] m_pData; + } + +} +/************************************************ + ************************************************/ + +const unsigned8_t CUnit::DefaultInflateSize = 10; + +/************************************************ + ************************************************/ + +signed8_t CUnit::SetAt(unsigned8_t newval, unsigned32_t index) +{ + signed8_t errcode = NO_ERRORS; + + if(m_pData != NULL) + { + if (index < m_nDataSize) + m_pData[index] = newval; + else + errcode = ERR_INVALID_INDEX; + } else { + errcode = ERR_DATASTORAGE_EMPTY; + } + + return errcode; +} + +/************************************************ + ************************************************/ + +signed8_t CUnit::AddValue16(unsigned16_t newval) +{ + signed8_t errcode = NO_ERRORS; + + if(AddValue8(BYTE_0(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_1(newval))) errcode = GENERAL_ERROR; + + return errcode; + +} + +/************************************************ + ************************************************/ + +signed8_t CUnit::AddValue32(unsigned32_t newval) +{ + signed8_t errcode = NO_ERRORS; + + if(AddValue8(BYTE_0(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_1(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_2(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_3(newval))) errcode = GENERAL_ERROR; + + return errcode; + +} + +/************************************************ + ************************************************/ + +signed8_t CUnit::AddValue64(unsigned64_t newval) +{ + signed8_t errcode = NO_ERRORS; + + if(AddValue8(BYTE_0(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_1(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_2(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_3(newval))) errcode = GENERAL_ERROR; + + if(AddValue8(BYTE_4(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_5(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_6(newval))) errcode = GENERAL_ERROR; + if(AddValue8(BYTE_7(newval))) errcode = GENERAL_ERROR; + + return errcode; + +} + + +/************************************************ + ************************************************/ + +signed8_t CUnit::SetValueAt(signed16_t newval, unsigned32_t index) +{ + signed8_t errcode = NO_ERRORS; + + if(SetAt(BYTE_0(newval), index )) errcode = GENERAL_ERROR; + if(SetAt(BYTE_1(newval), index+1)) errcode = GENERAL_ERROR; + + return errcode; +} + +/************************************************ + ************************************************/ + +signed8_t CUnit::SetValueAt(signed32_t newval, unsigned32_t index) +{ + signed8_t errcode = NO_ERRORS; + + if(SetAt(BYTE_0(newval), index )) errcode = GENERAL_ERROR; + if(SetAt(BYTE_1(newval), index+1)) errcode = GENERAL_ERROR; + if(SetAt(BYTE_2(newval), index+2)) errcode = GENERAL_ERROR; + if(SetAt(BYTE_3(newval), index+3)) errcode = GENERAL_ERROR; + + return errcode; +} + + +/************************************************ + ************************************************/ + +signed8_t CUnit::GetValue16From(signed16_t* val, unsigned32_t index) +{ + signed8_t errcode = NO_ERRORS; + + *val = (signed16_t)(operator[](index) + + operator[](index+1)*0x0100); + + return errcode; +} + +/************************************************ + ************************************************/ + +signed8_t CUnit::GetValue32From(signed32_t* val, unsigned32_t index) +{ + signed8_t errcode = NO_ERRORS; + + *val = (signed16_t)(operator[](index) *0x0000001 + + operator[](index+1)*0x0000100 + + operator[](index+2)*0x0010000 + + operator[](index+2)*0x1000000 ); + return errcode; +} + +/************************************************ + ************************************************/ + +signed8_t CUnit::GetAt(signed8_t* data, unsigned32_t index) +{ + signed8_t errcode = NO_ERRORS; + + if(m_pData != NULL) + { + if (index < m_nDataSize) + { + *data = m_pData[index]; + } else { + errcode = ERR_INVALID_INDEX; + } + } else { + errcode = ERR_DATASTORAGE_EMPTY; + } + + return errcode; + +} +/************************************************ + ************************************************/ +/* + signed8_t CUnit::GetData(unsigned8_t** ppdata, unsigned32_t from, unsigned32_t to ) + { + signed8_t errcode = NO_ERRORS; + + // Simply make the external pointer point to the local storage data + *ppdata = m_pData; + + return errcode; + } +*/ +/************************************************ + ************************************************/ +signed8_t CUnit::AddDataArray (const unsigned8_t* newdata, size_t size) +{ + + signed8_t errcode = NO_ERRORS; + size_t spaceleft = m_nSize - m_nDataSize; + + if(spaceleft < size) // allocate more space if new tobeadded array won't fit + { + Inflate(size-spaceleft+1); + } + + if(newdata != NULL) + { + for(unsigned32_t i=0; i m_nDataSize) m_nDataSize = index+1; + else if(index==m_nDataSize) m_nDataSize++; + m_pData[index++] = newdata[i]; + */ + // The following code truncates the array if it exceeds DataSize + if(index==m_nDataSize) break; + + m_pData[index++] = newdata[i]; + } + } else { + //No data to add. Do nothing + } + + return errcode; +} + +/************************************************ + ************************************************/ + +signed8_t CUnit::AddValue8(unsigned8_t newdata) +{ + + if(m_nDataSize >= m_nSize) + { + Inflate(); + } + + m_pData[m_nDataSize++] = newdata; + + return NO_ERRORS; + +} + +#if VERSION_BIFF == VERSION_BIFF8 +#ifdef HAVE_ICONV +void CUnit::Conv32to16(string& iconv_code, ustring& str1, u16string& str2) +{ + size_t resultSize, inbytesleft, outbytesleft; + const wchar_t *inbuf; + iconv_t cd; + unsigned16_t *outbuf, *origOutbuf; + static unsigned16_t convFail[] = { 'i', 'c', 'o', 'n', 'v', ' ', 'f', 'a', 'i', 'l', 'e', 'd', '!' }; + + cd = iconv_open("UCS-2-INTERNAL", "wchar_t"); + // no need to test return code as we ALREADY did this when setting iconv_code in workbook + + inbytesleft = str1.size() * sizeof(uchar_t); + outbytesleft = inbytesleft * 4 * sizeof(unsigned16_t); // Unicode expansion 4 to 2 ??? + + inbuf = str1.c_str(); + origOutbuf = (unsigned16_t *)calloc(outbytesleft, 1); + outbuf = origOutbuf; + + resultSize = iconv(cd, (char **)&inbuf, &inbytesleft, (char **)&outbuf, &outbytesleft); + iconv_close(cd); + + if(resultSize == (size_t)-1) { + str2 = convFail; + } else { + str2.assign(origOutbuf, outbuf - origOutbuf); + } + return; +} +#endif + +// for cases where we save a single byte +signed8_t CUnit::AddUnicodeStrlen(unsigned8_t newdata) +{ + return AddValue8(newdata); +} +// for cases where we save a single byte +signed8_t CUnit::AddUnicodeStrlen(unsigned16_t newdata) +{ + return AddValue16(newdata); +} +signed8_t CUnit::AddUnicodeString (const unsigned8_t* newdata, unsigned16_t size) +{ + unsigned16_t strSize = 1 + size; + + signed8_t errcode = NO_ERRORS; + size_t spaceleft = m_nSize - m_nDataSize; + + if(spaceleft < strSize) // allocate more space if new tobeadded array won't fit + { + Inflate((size_t)(strSize-spaceleft+1)); + } + + m_pData[m_nDataSize++] = 0x00; // character compression + + if(newdata != NULL) + { + for(unsigned16_t i=0; i> 8) & 0xFF; + } + } else { + //No data to add. Do nothing + } + + return errcode; +} +#endif + +/************************************************ + ************************************************/ + +signed8_t CUnit::Inflate(size_t increase) +{ + signed8_t errcode = NO_ERRORS; + + if (increase == 0) + increase = CUnit::DefaultInflateSize; + + // Create the new storage with increased size + // and initialize it to 0. + unsigned8_t* temp_storage = new unsigned8_t[m_nSize + increase]; + + if(temp_storage != NULL) + { + + memset(temp_storage, 0, (m_nSize+increase)*(sizeof(unsigned8_t))); + // Copy data to the new storage + memcpy(temp_storage, m_pData, m_nSize*sizeof(unsigned8_t)); + + // Update the size + m_nSize += increase; + + if (m_pData != NULL) + delete []m_pData; + + m_pData = temp_storage; + + errcode = ERR_UNNABLE_TOALLOCATE_MEMORY; + } else { + // No errors... errcode already clean + } + + return errcode; +} + +/************************************************ + ************************************************/ + +unsigned8_t& CUnit::operator[] ( const unsigned32_t index ) +{ + if(index >= m_nDataSize) + return m_pData[m_nDataSize]; + return m_pData[index]; + +} +/************************************************ + ************************************************/ + +CUnit& CUnit::operator= (CUnit& newvalue ) +{ + if(&newvalue != this) + Init(newvalue.GetBuffer(), newvalue.GetSize(), newvalue.GetDataSize()); + + return *this; + +} + +/************************************************ + ************************************************/ + +CUnit& CUnit::operator+= ( CUnit& from ) +{ + + if(&from != this) + Append(from); + else + { + CUnit shadow; + shadow = from; + Append(shadow); + } + return *this; +} + +/************************************************ + ************************************************/ + +CUnit& CUnit::operator+= ( unsigned8_t from ) +{ + + AddValue8(from); + + return *this; +} + + +/************************************************ + ************************************************/ + +signed8_t CUnit::Init (unsigned8_t* data, const size_t size, const unsigned32_t datasz) +{ + + m_nSize = size; + m_nDataSize = datasz; + + m_pData = new unsigned8_t[m_nSize]; + + if(data) + { + memset(m_pData, 0, m_nSize*sizeof(unsigned8_t)); + // Copy data to the new storage + memcpy(m_pData, data, m_nSize*sizeof(unsigned8_t)); + } + + return NO_ERRORS; +} + + +/************************************************ + ************************************************/ + +signed8_t CUnit::Append (CUnit& newunit) +{ + + if(AddDataArray(newunit.GetBuffer(), newunit.GetDataSize()) == NO_ERRORS) + return NO_ERRORS; + else + return GENERAL_ERROR; +} + +/************************************************ + ************************************************/ +signed8_t CUnit::InitFill (unsigned8_t data, unsigned32_t size) +{ + if(m_pData) + delete[] m_pData; + + m_pData = new unsigned8_t[size]; + + if(m_pData) + { + memset(m_pData, data, size*sizeof(unsigned8_t)); + m_nSize = m_nDataSize = size; + + return NO_ERRORS; + } else { + return GENERAL_ERROR; + } + +} + +/************************************************ + ************************************************/ + +size_t CUnit::GetSize (void) +{ + return m_nSize; +} + +/************************************************ + ************************************************/ + +unsigned32_t CUnit::GetDataSize (void) +{ + return m_nDataSize; +} + +/************************************************ + ************************************************/ + +unsigned8_t* CUnit::GetBuffer (void) +{ + return m_pData; +} + + +/************************************************ + ************************************************/ +/* + void CUnit::SetShadow(bool shadowval) + { + m_ShadowUnit = shadowval; + + + } +*/ + +/************************************************ + ************************************************/ +/* + void CUnit::CopyShadowUnit(unsigned8_t* data, unsigned32_t size) + { + m_Size = m_DataSize = size; + m_pData = data; + + SetShadow(true); + + + + } +*/ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: unit.cpp,v $ + * Revision 1.3 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:21 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:31:53 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/unit.h b/uppdev/XLS/unit.h new file mode 100644 index 000000000..7a67b2d52 --- /dev/null +++ b/uppdev/XLS/unit.h @@ -0,0 +1,140 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/unit.h,v $ + * $Revision: 1.2 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef UNIT_H +#define UNIT_H + +#include +#include + +namespace xlslib_core +{ + + +#define UNIT_MAX_SIZE (0xFFFF) + + // Error codes +#define ERR_DATASTORAGE_EMPTY (-2) +#define ERR_INVALID_INDEX (-3) +#define ERR_UNNABLE_TOALLOCATE_MEMORY (-3) + + //Block definitions +#define BIG_BLOCK_SIZE (0x200) +#define SMALL_BLOCK_SIZE (0x040) +#define PROP_BLOCK_SIZE (0x080) + + class CUnit { + // Attributes + protected: + size_t m_nSize; // Size of data stored + unsigned8_t* m_pData; // Data storage + unsigned32_t m_nDataSize; // Next empty space + // bool m_ShadowUnit; + + // Static attributes + static const unsigned8_t DefaultInflateSize; + + // Operations + public: + CUnit(); + virtual ~CUnit(); + + virtual unsigned8_t& operator[](const unsigned32_t index); + virtual CUnit& operator=(CUnit& newvalue); + virtual CUnit& operator+=(CUnit& from); + virtual CUnit& operator+= ( unsigned8_t from ); + + virtual size_t GetSize (void); + virtual unsigned32_t GetDataSize (void); + unsigned8_t* GetBuffer (void); + signed8_t Init (unsigned8_t* data, + const size_t size, + const unsigned32_t datasz); + + signed8_t AddDataArray (const unsigned8_t* newdata, size_t size); + signed8_t AddFixedDataArray (const unsigned8_t value, size_t size); + +#if VERSION_BIFF == VERSION_BIFF8 +#ifdef HAVE_ICONV + void Conv32to16(std::string& iconv_code, std::ustring& str1, u16string& str2); +#endif + // DFH - to convert ascii string to unicode strings for BIFF8 + signed8_t AddUnicodeStrlen(unsigned8_t newdata); + signed8_t AddUnicodeStrlen(unsigned16_t newdata); + signed8_t AddUnicodeString (const unsigned8_t* newdata, unsigned16_t size); + signed8_t AddUnicodeString (const unsigned16_t* newdata, unsigned16_t size); +#endif + /* + void SetShadow(bool shadowval); + void CopyShadowUnit(unsigned8_t* data, unsigned32_t size); + */ + protected: + + signed8_t Append (CUnit& newunit); + signed8_t SetAt(unsigned8_t newval, unsigned32_t index);// Modify specific position + + signed8_t AddValue16(unsigned16_t newval); + signed8_t AddValue32(unsigned32_t newval); + signed8_t AddValue64(unsigned64_t newval); + + signed8_t SetValueAt(signed16_t newval, unsigned32_t index); + signed8_t SetValueAt(signed32_t newval, unsigned32_t index); + + signed8_t GetValue16From(signed16_t* val, unsigned32_t index); + signed8_t GetValue32From(signed32_t* val, unsigned32_t index); + + signed8_t SetArrayAt (const unsigned8_t* newdata, size_t size, unsigned32_t index); + signed8_t GetAt(signed8_t* data, unsigned32_t index);// Get specific data from storage + // signed8_t GetData(unsigned8_t** data, unsigned32_t from, unsigned32_t to ); + + signed8_t RemoveTrailData (unsigned32_t remove_size); + signed8_t AddValue8(unsigned8_t newdata); + signed8_t InitFill (unsigned8_t data, unsigned32_t size); + signed8_t Inflate(size_t increase = 0); + + }; + +} +#endif // UNIT_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: unit.h,v $ + * Revision 1.2 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.1.1.1 2004/08/27 16:31:46 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + diff --git a/uppdev/XLS/workbook.cpp b/uppdev/XLS/workbook.cpp new file mode 100644 index 000000000..dfa41fbb0 --- /dev/null +++ b/uppdev/XLS/workbook.cpp @@ -0,0 +1,560 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2004 Yeico S. A. de C. V. + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/workbook.cpp,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include + +#ifdef HAVE_ICONV +#include +#endif + +using namespace std; +using namespace xlslib_core; + +#define CHANGE_DUMPSTATE(state) { \ + m_PreviousDumpState = m_DumpState; \ + m_DumpState = state; \ +} + +/* +********************************************************************** +workbook class implementation +********************************************************************** +*/ + +workbook::workbook() + : m_DumpState(WB_INIT), + m_PreviousDumpState(WB_FINISH), + m_pCurrentData(NULL), + m_pContinueRecord(NULL), + dump_not_started(true), + globalrec_size(0), + current_sheet(0), + offset(0) +{ +#ifdef XLS_PHP + write_fptr = NULL; + m_Disposition = STK_ATTACHMENT; +#endif +#ifdef HAVE_ICONV + iconv_code = "wchar_t"; +#endif +} + +#ifdef XLS_PHP +workbook::workbook(write_fptr_t w_fptr) + : m_DumpState(WB_INIT), + m_PreviousDumpState(WB_FINISH), + m_pCurrentData(NULL), + m_pContinueRecord(NULL), + dump_not_started(true), + globalrec_size(0), + current_sheet(0), + offset(0) +{ + write_fptr = w_fptr; + m_Disposition = STK_ATTACHMENT; +} +#endif + +workbook::~workbook() +{ + if(!m_Sheets.empty()) + { + for(unsigned32_t i = 0; iSetName(name); + + return(m_GlobalRecords.AddFont(newfont)); +} + +/* +*********************************** +*********************************** +*/ +format_t* workbook::format(string formatstr) +{ + format_t* newformat = new format_t(0x0000, formatstr); + + return(m_GlobalRecords.AddFormat(newformat)); +} + +xf_t* workbook::xformat(void) +{ + xf_t* newxf = new xf_t; + newxf->MarkUsed(); + + return(m_GlobalRecords.AddXFormat(newxf)); +} + +xf_t* workbook::xformat(font_t* font) +{ + xf_t* newxf = new xf_t; + newxf->MarkUsed(); + newxf->SetFont(font); + + return(m_GlobalRecords.AddXFormat(newxf)); +} + +/* +*********************************** +*********************************** +*/ +#define SETWORKBOOK5() \ + CDataStorage biffdata; \ + CUnit* precorddata; \ + bool keep = true; \ + do { \ + precorddata = DumpData(); \ + \ + if(precorddata != NULL) \ + biffdata += precorddata; \ + else \ + keep = false; \ + }while(keep); \ + \ + AddFile("/Book",&biffdata); \ + string name; \ + name = (char)0x05; \ + name += "SummaryInformation"; \ + AddFile(name, &m_SummaryInfo); \ + name = (char)0x05; \ + name += "DocumentSummaryInformation"; \ + AddFile(name, &m_DocSummaryInfo); + +#define SETWORKBOOK8() \ + CDataStorage biffdata; \ + CUnit* precorddata; \ + bool keep = true; \ + do { \ + precorddata = DumpData(); \ + \ + if(precorddata != NULL) \ + biffdata += precorddata; \ + else \ + keep = false; \ + } while(keep); \ + \ + AddFile("/Workbook",&biffdata); \ + string name; \ + name = (char)0x05; \ + name += "SummaryInformation"; \ + AddFile(name, &m_SummaryInfo); \ + name = (char)0x05; \ + name += "DocumentSummaryInformation"; \ + AddFile(name, &m_DocSummaryInfo); + +#ifdef XLS_PHP +/****************************** + * This function has to be called before any output to the php-string + * (this includes any non-php-script text in the source file or + * zend_printf call) because it makes use of headers() php-function, + * which has to be called before any of those kind of output. + * If this restraint isn't followed, the html-header won't be modified + * and the binary data will be displayed in the browser (in the best of + * cases). + * This can also be avoided using buffering in the PHP environment + * See chapter LXXVIII. "Output Control Functions" of the PHP manual. + ******************************/ +void workbook::Stroke(string filename) +{ + SetStroke(); + +#if VERSION_BIFF == VERSION_BIFF5 + SETWORKBOOK5(); +#else // VERSION_BIFF8 + SETWORKBOOK8(); +#endif + DumpOleFile(); +} + +void workbook::Disposition(Stroke_Disposition_t disp) +{ + m_Disposition = disp; +} +#endif + + +int workbook::Dump(string filename) +{ + int errors; + + if(m_Sheets.empty()) { + return GENERAL_ERROR; + } + +#ifdef XLS_PHP + UnSetStroke(); +#endif + + errors = Open(filename); + if(errors == NO_ERRORS) { +#if VERSION_BIFF == VERSION_BIFF5 + SETWORKBOOK5(); +#else // VERSION_BIFF8 + SETWORKBOOK8(); +#endif + errors = DumpOleFile(); + Close(); + } + return errors; +} + +/* +*********************************** +*********************************** +*/ + +CUnit* workbook::DumpData(void) +{ + + bool repeat = false; + XTRACE("\nworkbook::DumpData"); + + do + { + switch(m_DumpState) + { + case WB_INIT: + + dump_not_started = true; + globalrec_size = 0; + current_sheet = 0; + offset = 0; + + CHANGE_DUMPSTATE(WB_GLOBALRECORDS); + + repeat = true; + break; + + case WB_GLOBALRECORDS: + + XTRACE("\tGLOBALRECORDS"); + + repeat = false; + + if(dump_not_started) + { // the following code is executed only if this is the first pas to the first dump-state + // Basically, streampositions of BoundingSheet records are initialized. + dump_not_started = false; + + globalrec_size = m_GlobalRecords.GetSize(); + offset = globalrec_size; + + unsigned32_t offset_from_globalrecs = 0; + + if(!m_Sheets.empty()) + { + + Boundsheet_List_Itor_t bs = m_GlobalRecords.GetFirstBoundSheet(); + + for(unsigned16_t i = 0; i < m_Sheets.size(); i++) + { + + (*bs) -> streampos = globalrec_size + offset_from_globalrecs; + m_GlobalRecords.GetBoundingSheets(bs); + offset_from_globalrecs += m_Sheets[i]->GetSize(); + } + } + else + { + //Nothing else to do. + } + + + //TODO: Add other EOF/BOF blocks here + } + + m_pCurrentData = m_GlobalRecords.DumpData(); + if(m_pCurrentData == NULL) + { + if(!m_Sheets.empty()) + { + // get in advance the first record of the first sheet + //m_pCurrentData = m_Sheets[0].DumpData(globalrec_size); + repeat = true; + CHANGE_DUMPSTATE(WB_SHEETS); + } + else + { + // Nothing else to do. Branch to the FINISH state + m_pCurrentData = NULL; + + CHANGE_DUMPSTATE(WB_FINISH); + } + } + else + { + // Do nothing. Continue in this state. + } + + break; + + case WB_SHEETS: + { + + XTRACE("\tSHEETS"); + + repeat = false; + // If I got here, there's at least one sheet which has already + // sent the first record block of data. + //m_GlobalRecords.GetSize(); + + m_pCurrentData = m_Sheets[current_sheet]->DumpData(offset); + + if(m_pCurrentData == NULL) + { + if((unsigned16_t)(current_sheet+1) < m_Sheets.size()) + { + // Update the offset for the next sheet + offset += m_Sheets[current_sheet]->GetSize(); + current_sheet++; + + // ... and get the first record of the next sheet. + // m_pCurrentData = m_Sheets[current_sheet].DumpData(offset); + repeat = true; + } + else + { + // I'm done with all the sheets + // Nothing else to do. Branch to the FINISH state + CHANGE_DUMPSTATE(WB_FINISH); + + repeat = true; + } + } + + + break; + } + case WB_FINISH: + XTRACE("\tFINISH"); + + repeat = false; + m_pCurrentData = NULL; + + CHANGE_DUMPSTATE(WB_INIT); + + break; + + case WB_CONTINUE_REC: + XTRACE("\tCONTINUE-REC"); + + repeat = false; + + if(m_ContinueIndex == 0) + { + //Create a new data unit containing the max data size + m_pContinueRecord = (CUnit*)(new CRecord()); + + // The real size of the record is the size of the buffer minus the + // size of the header record + + ((CUnit*)(m_pContinueRecord))->AddDataArray(((CRecord*)m_pCurrentData)->GetRecordDataBuffer(),MAX_RECORD_SIZE); + ((CRecord*)(m_pContinueRecord))->SetRecordType(((CRecord*)m_pCurrentData)->GetRecordType()); + ((CRecord*)(m_pContinueRecord))->SetRecordLength(MAX_RECORD_SIZE); + +// m_pContinueRecord->SetValueAt(MAX_RECORD_SIZE-4,2); + m_ContinueIndex++; + + return m_pContinueRecord; + } + else + { + //Delete_Pointer(m_pContinueRecord); + + // Get a pointer to the next chunk of data + unsigned8_t* pdata = (((CRecord*)m_pCurrentData)->GetRecordDataBuffer()) + m_ContinueIndex*MAX_RECORD_SIZE; + + // Get the size of the chunk of data (that is the MAX_REC_SIZE except by the last one) + unsigned32_t csize = 0; + if(( ((CRecord*)m_pCurrentData)->GetRecordDataSize()/MAX_RECORD_SIZE) > (m_ContinueIndex)) + { + csize = MAX_RECORD_SIZE; + m_ContinueIndex++; + + m_pContinueRecord =(CUnit*) ( new CContinue(pdata, csize)); + + return m_pContinueRecord; + } + else + { + unsigned32_t data_size = ((CRecord*)m_pCurrentData)->GetRecordDataSize(); + + csize = (data_size - (m_ContinueIndex) * MAX_RECORD_SIZE); + + // Restore the previous state (*Don't use the macro*) + m_DumpState = m_PreviousDumpState; + m_PreviousDumpState = WB_CONTINUE_REC; + + m_ContinueIndex = 0; + + if(csize) + { + m_pContinueRecord = (CUnit*) new CContinue(pdata, csize); + Delete_Pointer(m_pCurrentData); + return m_pContinueRecord; + } + else + { + Delete_Pointer(m_pCurrentData); + repeat = true; + } + } + } + + break; + + default: + XTRACE("\tDEFAULT"); + break; + } + + if(m_pCurrentData != NULL) + if(((CRecord*)m_pCurrentData)->GetRecordDataSize() >= MAX_RECORD_SIZE && m_DumpState != WB_CONTINUE_REC) + { + + // Save the current dump satate and change to the CONTINUE Record state + CHANGE_DUMPSTATE(WB_CONTINUE_REC); + + m_ContinueIndex = 0; + + repeat = true; + } + } while(repeat); + + return m_pCurrentData; +} + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: workbook.cpp,v $ + * Revision 1.3 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:21 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:31:49 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/uppdev/XLS/workbook.h b/uppdev/XLS/workbook.h new file mode 100644 index 000000000..510ceb355 --- /dev/null +++ b/uppdev/XLS/workbook.h @@ -0,0 +1,148 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * $Source: /cvsroot/xlslib/xlslib/src/xlslib/workbook.h,v $ + * $Revision: 1.3 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:39:54 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef WORKBOOK_H +#define WORKBOOK_H + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace xlslib_core +{ + + typedef enum + { + WB_INIT, + WB_GLOBALRECORDS, + WB_SHEETS, + WB_CONTINUE_REC, + WB_FINISH + } WorkbookDumpState_t; + + +#ifdef XLS_PHP + typedef enum + { + STK_INLINE=0, + STK_ATTACHMENT + } Stroke_Disposition_t; +#endif + class workbook + :public COleDoc + { + + private: + CSummaryInfo m_SummaryInfo; + CDocSummaryInfo m_DocSummaryInfo; + + CGlobalRecords m_GlobalRecords; + Sheets_Vector_t m_Sheets; + WorkbookDumpState_t m_DumpState; + WorkbookDumpState_t m_PreviousDumpState; + + CUnit* m_pCurrentData; + + // Continue record variables: + CUnit* m_pContinueRecord; + unsigned16_t m_ContinueIndex; + +#ifdef HAVE_ICONV + std::string iconv_code; +#endif + protected: + + public: + workbook(); +#ifdef XLS_PHP + workbook(write_fptr_t w_fptr); +#endif + ~workbook(); + + worksheet* sheet(std::string sheetname); +#if VERSION_BIFF == VERSION_BIFF8 + worksheet* sheet(std::ustring sheetname); +#endif + worksheet* GetSheet(unsigned16_t sheetnum); + + font_t* font(std::string name); + format_t* format(std::string formatstr); + + xf_t* xformat(void); + xf_t* xformat(font_t* font); + +#ifdef HAVE_ICONV + int iconvInType(const char *inType); +#endif + + CUnit* DumpData(void); // oledoc use + + int Dump(std::string filename); + +#ifdef XLS_PHP + void Disposition(Stroke_Disposition_t disp); + void Stroke(std::string filename); + Stroke_Disposition_t m_Disposition; +#endif + + private: + bool dump_not_started; + unsigned32_t globalrec_size; + unsigned16_t current_sheet; + unsigned32_t offset; + }; + +} +#endif //WORKBOOK_H + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * $Log: workbook.h,v $ + * Revision 1.3 2008/10/25 18:39:54 dhoerl + * 2008 + * + * Revision 1.2 2004/09/01 00:47:21 darioglz + * + Modified to gain independence of target + * + * Revision 1.1.1.1 2004/08/27 16:31:44 darioglz + * Initial Import. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + diff --git a/uppdev/XLS/xlslib.h b/uppdev/XLS/xlslib.h new file mode 100644 index 000000000..95c112059 --- /dev/null +++ b/uppdev/XLS/xlslib.h @@ -0,0 +1,392 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * This file is part of xlslib -- A multiplatform, C/C++ library + * for dynamic generation of Excel(TM) files. + * + * xlslib is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * xlslib is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with xlslib. If not, see . + * + * Copyright 2008 David Hoerl + * + * $Source: /cvsroot/xlslib/xlslib/src/common/xlslib.h,v $ + * $Revision: 1.1 $ + * $Author: dhoerl $ + * $Date: 2008/10/25 18:44:32 $ + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * File description: + * + * all include file for users + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + +#ifdef __cplusplus + +#include + +#define EXTERN_TYPE extern "C" + +using namespace xlslib_core; + +#else // "C" + +#define EXTERN_TYPE extern + + +typedef uintptr_t write_fptr_t; + +typedef unsigned char unsigned8_t; +typedef unsigned short int unsigned16_t; +typedef unsigned uint32_t unsigned32_t; + +#if defined(_MSC_VER) && defined(WIN32) +typedef __int64 unsigned64_t; +#else +//typedef long long unsigned int unsigned64_t; +typedef uint64_t unsigned64_t; +#endif +typedef char signed8_t; +typedef short int signed16_t; +typedef int32_t signed32_t; + +typedef enum +{ + FMT_GENERAL = 0, + FMT_NUMBER1, + FMT_NUMBER2, + FMT_NUMBER3, + FMT_NUMBER4, + FMT_CURRENCY1, + FMT_CURRENCY2, + FMT_CURRENCY3, + FMT_CURRENCY4, + FMT_PERCENT1, + FMT_PERCENT2, + FMT_SCIENTIFIC1, + FMT_FRACTION1, + FMT_FRACTION2, + FMT_DATE1, + FMT_DATE2, + FMT_DATE3, + FMT_DATE4, + FMT_HOUR1, + FMT_HOUR2, + FMT_HOUR3, + FMT_HOUR4, + FMT_HOURDATE, + FMT_NUMBER5, + FMT_NUMBER6, + FMT_NUMBER7, + FMT_NUMBER8, + FMT_ACCOUNTING1, + FMT_ACCOUNTING2, + FMT_ACCOUNTING3, + FMT_ACCOUNTING4, + FMT_HOUR5, + FMT_HOUR6, + FMT_HOUR7, + FMT_SCIENTIFIC2, + FMT_TEXT +} format_number_t; + +typedef enum +{ + HALIGN_GENERAL = 0, + HALIGN_LEFT, + HALIGN_CENTER, + HALIGN_RIGHT, + HALIGN_FILL, + HALIGN_JUSTIFY, + HALIGN_CENTERACCROSS +} halign_option_t; + +typedef enum +{ + VALIGN_TOP = 0, + VALIGN_CENTER, + VALIGN_BOTTOM, + VALIGN_JUSTIFY +} valign_option_t; + +typedef enum +{ + ORI_NONE = 0, + ORI_TOPBOTTOMTXT, + ORI_90NOCLOCKTXT, + ORI_90CLOCKTXT +} txtori_option_t; + +typedef enum +{ + COLOR_BLACK, + COLOR_DARK_RED, + COLOR_RED, + COLOR_FUCSIA, + COLOR_COMBINED01, + COLOR_COMBINED02, + COLOR_COMBINED03, + COLOR_COMBINED04, + COLOR_COMBINED05, + COLOR_COMBINED06, + COLOR_OLIVE, + COLOR_DARK_YELLOW, + COLOR_COMBINED07, + COLOR_YELLOW, + COLOR_LIGHT_YELLOW, + COLOR_DARK_GREEN, + COLOR_GREEN, + COLOR_COMBINED08, + COLOR_LIVING_GREEN, + COLOR_LIGHT_GREEN, + COLOR_COMBINED09, + COLOR_BLUE_GREEN, + COLOR_AQUAMARINA, + COLOR_TURQOISE, + COLOR_COMBINED10, + COLOR_DARK_BLUE, + COLOR_BLUE, + COLOR_LIGHT_BLUE, + COLOR_SKY_BLUE, + COLOR_COMBINED11, + COLOR_INDIGO, + COLOR_BLUE_GRAY, + COLOR_VIOLET, + COLOR_PLUM, + COLOR_LAVANDER, + COLOR_COMBINED12, + COLOR_GRAY50, + COLOR_GRAY40, + COLOR_GRAY25, + COLOR_WHITE +} color_name_t; + +typedef enum +{ + FILL_NONE = 0, + FILL_SOLID, + FILL_ATEN75, + FILL_ATEN50, + FILL_ATEN25, + FILL_ATEN12, + FILL_ATEN06, + FILL_HORIZ_LIN, + FILL_VERTICAL_LIN, + FILL_DIAG, + FILL_INV_DIAG, + FILL_INTER_DIAG, + FILL_DIAG_THICK_INTER, + FILL_HORIZ_LINES_THIN, + FILL_VERTICAL_LINES_THIN, + FILL_DIAG_THIN, + FILL_INV_DIAG_THIN, + FILL_HORIZ_INT_THIN, + FILL_HORIZ_INTER_THICK +} fill_option_t; + +typedef enum +{ + BORDER_NONE = 0, + BORDER_THIN, + BORDER_MEDIUM, + BORDER_DASHED, + BORDER_DOTTED, + BORDER_THICK, + BORDER_DOUBLE, + BORDER_HAIR +} border_style_t; + +typedef enum +{ + BORDER_BOTTOM = 0, + BORDER_TOP, + BORDER_LEFT, + BORDER_RIGHT +} border_side_t; + +typedef enum +{ + BOLDNESS_BOLD = 0, + BOLDNESS_HALF, + BOLDNESS_NORMAL, + BOLDNESS_DOUBLE +} boldness_option_t; + +typedef enum +{ + SCRIPT_NONE = 0, + SCRIPT_SUPER, + SCRIPT_SUB + +} script_option_t; + +typedef enum +{ + + UNDERLINE_NONE = 0, + UNDERLINE_SINGLE, + UNDERLINE_DOUBLE, + UNDERLINE_SINGLEACC, + UNDERLINE_DOUBLEACC + +} underline_option_t; + +typedef enum +{ + BOLDNESS_BOLD = 0, + BOLDNESS_HALF, + BOLDNESS_NORMAL, + BOLDNESS_DOUBLE +} boldness_option_t; +typedef enum +{ + SCRIPT_NONE = 0, + SCRIPT_SUPER, + SCRIPT_SUB +} script_option_t; +typedef enum +{ + UNDERLINE_NONE = 0, + UNDERLINE_SINGLE, + UNDERLINE_DOUBLE, + UNDERLINE_SINGLEACC, + UNDERLINE_DOUBLEACC +} underline_option_t; + +typedef struct _workbook workbook; +typedef struct _worksheet worksheet; +typedef struct _font_t font_t; +typedef struct _format_t format_t; +typedef struct _cell_t cell_t; +typedef struct _xf_t xf_t; +typedef struct _range range; + +#ifndef bool +typedef int bool; +#endif + +#endif + +// Workbook +EXTERN_TYPE workbook *newWorkbook(void); +#ifdef XLS_PHP +EXTERN_TYPE workbook *newWorkbook_w_fptr(write_fptr_t w_fptr); +#endif +EXTERN_TYPE void deleteWorkbook(workbook *w); +EXTERN_TYPE worksheet *callWorkbookSheet(workbook *w, char *sheetname); +#if VERSION_BIFF == VERSION_BIFF8 +EXTERN_TYPE worksheet *callWorkbookSheetW(workbook *w, uchar_t *sheetname); +#endif +EXTERN_TYPE worksheet *callWorkbookGetSheet(workbook *w, unsigned16_t sheetnum); +EXTERN_TYPE font_t *callWorkbookFont(workbook *w, char *name); +EXTERN_TYPE xf_t *callWorkbookxFormat(workbook *w); +EXTERN_TYPE xf_t *callWorkbookxFormatFont(workbook *w, font_t *font); +EXTERN_TYPE int callWorkbookDump(workbook *w, char *filename); +#ifdef XLS_PHP +EXTERN_TYPE void callWorkbookDisposition(workbook *w, Stroke_Disposition_t disp); +EXTERN_TYPE void callWorkbookStroke(workbook *w, char *filename); +#endif +// Worksheet +EXTERN_TYPE cell_t *callWorksheetFindCell(worksheet *w, unsigned16_t row, unsigned16_t col); +EXTERN_TYPE void callWorksheetMerge(worksheet *w, unsigned16_t first_row, unsigned16_t first_col, unsigned16_t last_row, unsigned16_t last_col); +EXTERN_TYPE void callWorksheetColwidth(worksheet *w, unsigned16_t col, unsigned16_t width); +EXTERN_TYPE void callWorksheetRowheight(worksheet *w, unsigned16_t row, unsigned16_t height); +EXTERN_TYPE range *callWorksheetRangegroup(worksheet *w, unsigned16_t row1, unsigned16_t col1, unsigned16_t row2, unsigned16_t col2); +EXTERN_TYPE cell_t *callWorksheetLabel(worksheet *w, unsigned16_t row, unsigned16_t col, char *strlabel, xf_t *pxformat); +#if VERSION_BIFF == VERSION_BIFF8 +EXTERN_TYPE cell_t *callWorksheetLabelW(worksheet *w, unsigned16_t row, unsigned16_t col, uchar_t *strlabel, xf_t *pxformat); +#endif +EXTERN_TYPE cell_t *callWorksheetBlank(worksheet *w, unsigned16_t row, unsigned16_t col, xf_t *pxformat); +EXTERN_TYPE cell_t *callWorksheetNumber(worksheet *w, unsigned16_t row, unsigned16_t col, double numval, format_number_t fmtval, xf_t *pxformat); +// cell: xfi +EXTERN_TYPE void callCellFont(cell_t *c, font_t *fontidx); +EXTERN_TYPE void callCellFormat(cell_t *c, format_number_t formatidx); +EXTERN_TYPE void callCellHalign(cell_t *c, halign_option_t ha_option); +EXTERN_TYPE void callCellValign(cell_t *c, valign_option_t va_option); +EXTERN_TYPE void callCellOrientation(cell_t *c, txtori_option_t ori_option); +EXTERN_TYPE void callCellFillfgcolor(cell_t *c, color_name_t color); +EXTERN_TYPE void callCellFillbgcolor(cell_t *c, color_name_t color); +EXTERN_TYPE void callCellFillstyle(cell_t *c, fill_option_t fill); +EXTERN_TYPE void callCellLocked(cell_t *c, bool locked_opt); +EXTERN_TYPE void callCellHidden(cell_t *c, bool hidden_opt); +EXTERN_TYPE void callCellWrap(cell_t *c, bool wrap_opt); +EXTERN_TYPE void callCellBorderstyle(cell_t *c, border_side_t side, border_style_t style, color_name_t color); +EXTERN_TYPE void callCellFontname(cell_t *c, char *fntname); +// cell: font +EXTERN_TYPE void callCellFontheight(cell_t *c, unsigned16_t fntheight); +EXTERN_TYPE void callCellFontbold(cell_t *c, boldness_option_t fntboldness); +EXTERN_TYPE void callCellFontunderline(cell_t *c, underline_option_t fntunderline); +EXTERN_TYPE void callCellFontscript(cell_t *c, script_option_t fntscript); +EXTERN_TYPE void callCellFontcolor(cell_t *c, color_name_t fntcolor); +EXTERN_TYPE void callCellFontattr(cell_t *c, unsigned16_t attr); +EXTERN_TYPE void callCellFontitalic(cell_t *c, bool italic); +EXTERN_TYPE void callCellFontstrikeout(cell_t *c, bool so); +EXTERN_TYPE void callCellFontoutline(cell_t *c, bool ol); +EXTERN_TYPE void callCellFontshadow(cell_t *c, bool sh); +EXTERN_TYPE unsigned16_t callCellGetRow(cell_t *c); +EXTERN_TYPE unsigned16_t callCellGetCol(cell_t *c); +EXTERN_TYPE unsigned16_t callCellGetXFIndex(cell_t *c); +EXTERN_TYPE void callCellSetXF(cell_t *c, xf_t *pxfval); +// range +EXTERN_TYPE void callRangeCellcolor(range *r, color_name_t color); +// xformat +EXTERN_TYPE void callXformatSetFont(xf_t *x, font_t* fontidx); +EXTERN_TYPE unsigned16_t callXformatGetFontIndex(xf_t *x); +EXTERN_TYPE font_t* callXformatGetFont(xf_t *x); +EXTERN_TYPE void callXformatSetFormat(xf_t *x, format_number_t formatidx); +EXTERN_TYPE unsigned16_t callXformatGetFormatIndex(xf_t *x); +EXTERN_TYPE format_number_t callXformatGetFormat(xf_t *x); +EXTERN_TYPE void callXformatSetHAlign(xf_t *x, halign_option_t ha_option); +EXTERN_TYPE unsigned8_t callXformatGetHAlign(xf_t *x); +EXTERN_TYPE void callXformatSetVAlign(xf_t *x, valign_option_t va_option); +EXTERN_TYPE unsigned8_t callXformatGetVAlign(xf_t *x); +EXTERN_TYPE void callXformatSetTxtOrientation(xf_t *x, txtori_option_t ori_option); +EXTERN_TYPE unsigned8_t callXformatGetTxtOrientation(xf_t *x); +EXTERN_TYPE void callXformatSetFillFGColor(xf_t *x, color_name_t color); +EXTERN_TYPE unsigned8_t callXformatGetFillFGColor(xf_t *x); +EXTERN_TYPE void callXformatSetFillBGColor(xf_t *x, color_name_t color); +EXTERN_TYPE unsigned8_t callXformatGetFillBGColor(xf_t *x); +EXTERN_TYPE void callXformatSetFillStyle(xf_t *x, fill_option_t fill); +EXTERN_TYPE unsigned8_t callXformatGetFillStyle(xf_t *x); +EXTERN_TYPE void callXformatSetLocked(xf_t *x, bool locked_opt); +EXTERN_TYPE bool callXformatIsLocked(xf_t *x); +EXTERN_TYPE void callXformatSetHidden(xf_t *x, bool hidden_opt); +EXTERN_TYPE bool callXformatIsHidden(xf_t *x); +EXTERN_TYPE void callXformatSetWrap(xf_t *x, bool wrap_opt); +EXTERN_TYPE bool callXformatIsWrap(xf_t *x); +EXTERN_TYPE void callXformatSetCellMode(xf_t *x, bool cellmode); +EXTERN_TYPE bool callXformatIsCell(xf_t *x); +EXTERN_TYPE void callXformatSetBorderStyle(xf_t *x, border_side_t side, border_style_t style, color_name_t color); +EXTERN_TYPE unsigned8_t callXformatGetBorderStyle(xf_t *x, border_side_t side); +EXTERN_TYPE unsigned8_t callXformatGetBorderColor(xf_t *x, border_side_t side); +EXTERN_TYPE unsigned32_t callXformatGetSignature(xf_t *x); +// Font +EXTERN_TYPE void callFontSetName(font_t *f, char *name); +EXTERN_TYPE char *callFontGetName(font_t *f, char *name); +EXTERN_TYPE void callFontSetHeight(font_t *f, unsigned16_t fntheight); +EXTERN_TYPE unsigned16_t callFontGetHeight(font_t *f); +EXTERN_TYPE void callFontSetBoldStyle(font_t *f, boldness_option_t fntboldness); +EXTERN_TYPE unsigned16_t callFontGetBoldStyle(font_t *f); +EXTERN_TYPE void callFontSetUnderlineStyle(font_t *f, underline_option_t fntunderline); +EXTERN_TYPE unsigned8_t callFontGetUnderlineStyle(font_t *f); +EXTERN_TYPE void callFontSetScriptStyle(font_t *f, script_option_t fntscript); +EXTERN_TYPE unsigned16_t callFontGetScriptStyle(font_t *f); +EXTERN_TYPE void callFontSetColor(font_t *f, color_name_t fntcolor); +EXTERN_TYPE unsigned16_t callFontGetColor(font_t *f); +EXTERN_TYPE void callFontSetItalic(font_t *f, bool italic); +EXTERN_TYPE void callFontSetStrikeout(font_t *f, bool so); +EXTERN_TYPE void callFontSetAttributes(font_t *f, unsigned16_t attr); +EXTERN_TYPE unsigned16_t callFontGetAttributes(font_t *f); +EXTERN_TYPE void callFontSetOutline(font_t *f, bool ol); +EXTERN_TYPE void callFontSetShadow(font_t *f, bool sh);