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

📄 extformat.h

📁 xls文件格式分析基础库
💻 H
📖 第 1 页 / 共 2 页
字号:
#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))  // TODO: the following might be defined as enums in the future#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  /*******************************CExtFormat class declaration*******************************/  typedef struct  {    unsigned16_t index;    font_t* font;    format_number_t format;    halign_option_t halign;    valign_option_t valign;    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 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, 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);      /* 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 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 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());        };    };  typedef std::set<xlslib_core::xf_t*, xfbysig XLSLIB_DFLT_ALLOCATOR> XF_Set_t;  typedef XF_Set_t::iterator XF_Set_Itor_t;  typedef std::list<xlslib_core::xf_t* XLSLIB_DFLT_ALLOCATOR> 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();      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.1.1.1  2004/08/27 16:31:46  darioglz * Initial Import. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

⌨️ 快捷键说明

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