⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globalrec.h

📁 xls文件格式分析基础库
💻 H
字号:
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) Yeico S. A. de C. V. * xlsLib -- A multiplatform, C++ library for dynamic generation of Excel (TM)  * files. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *   * $Source: /cvsroot/xlslib/xlslib/src/xlslib/globalrec.h,v $ * $Revision: 1.1.1.1 $ * $Author: darioglz $ * $Date: 2004/08/27 16:31:49 $ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * File description: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */#ifndef GLOBALREC_H#define GLOBALREC_H#include <config.h>#include "common.h"#include "biffsection.h"#include "font.h"#include "format.h"#include "extformat.h"#include "recdef.h"#include "unit.h"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_WINDOW1,      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,                            unsigned16_t biffversion = VERSION_BIFF57);      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.1.1.1  2004/08/27 16:31:49  darioglz * Initial Import. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -