#pragma once #include "Paragraph.h" #include "Picture.h" #include "Footnote.h" #include "Endnote.h" #include "SectionBreak.h" #include "CSSAOperand.h" #include "TableBordersOperand.h" #include "TableBordersOperand80.h" #include "TDefTableOperand.h" #include "TableCellWidthOperand.h" #include "TableBrcOperand.h" #include "TableBrc80Operand.h" #include "TLP.h" namespace ASCDocFileFormat { class TableCell { friend class TableRow; struct TableCellItemWithOffset { TextItemPtr tableCellItem; unsigned int tableCellItemOffset; TableCellItemWithOffset(): tableCellItem(), tableCellItemOffset(0) { } TableCellItemWithOffset( const TextItemPtr& _tableCellItem, unsigned int _tableCellItemOffset ): tableCellItem(_tableCellItem), tableCellItemOffset(_tableCellItemOffset) { } }; private: list textItems; list properties; unsigned int depth; unsigned int tableCellItemsOffset; protected: void SetDepth( unsigned int _depth ); unsigned int GetDepth() const; public: TableCell(); explicit TableCell( unsigned int _depth ); ~TableCell(); TableCell( const TableCell& tableCell ); void AddTextItem( const ITextItem& _textItem ); wstring GetAllText() const; operator wstring() const; vector GetAllParagraphsCopy() const; vector GetAllParagraphs(); void AddProperty( short sprm, void* operand ); void AddProperties( const vector& prls ); void RemoveProperty( short sprm, void* operand ); void RemoveAllProperties(); PapxInFkp GetAllProperties() const; unsigned int GetAllPropertiesCount() const; vector GetAllParagraphsProperties( vector* allParagraphsOffsets ) const; vector GetAllRunProperties( vector* allRunsOffsets ) const; vector GetAllRunsCopy( vector* allRunsOffsets ) const; vector GetAllParagraphItemsCopy( vector* allParagraphItemsOffsets ) const; }; }