20 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8TABLEINFO_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_WW8TABLEINFO_HXX
27 #include <unordered_map>
49 typedef std::vector<sal_uInt32>
Widths;
70 typedef std::shared_ptr<WW8TableNodeInfoInner>
Pointer_t;
77 void setRow(sal_uInt32 nRow);
125 : m_aRect(aRectAndTableInfo.m_aRect),
126 m_pNodeInfo(aRectAndTableInfo.m_pNodeInfo),
127 m_nFormatFrameWidth(aRectAndTableInfo.m_nFormatFrameWidth)
149 m_nFormatFrameWidth = nFormatFrameWidth;
190 void setCell(sal_uInt32 nCell);
191 void setRow(sal_uInt32 nRow);
210 sal_uInt32
getRow()
const;
222 {
return reinterpret_cast<size_t>(pNode); }
228 {
return reinterpret_cast<size_t>(pTable); }
244 CellInfoMultiSet::const_iterator
begin()
const;
245 CellInfoMultiSet::const_iterator
end()
const;
248 void setWidths(WidthsPtr
const & pGridCols);
259 typedef std::map<tools::Long, WW8TableCellGridRow::Pointer_t>
Rows_t;
286 WidthsPtr
getWidthsOfRow(WW8TableNodeInfoInner
const * pNodeInfo);
292 friend class WW8TableNodeInfoInner;
293 typedef std::unordered_map<const SwNode *, WW8TableNodeInfo::Pointer_t, hashNode >
Map_t;
296 typedef std::unordered_map<const SwTable *, WW8TableCellGrid::Pointer_t, hashTable >
CellGridMap_t;
313 sal_uInt32 nDepth,
bool bEndOfLine,
331 SwRect const * pRect =
nullptr);
334 bool bCreate =
true);
351 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_WW8TABLEINFO_HXX
void setNext(WW8TableNodeInfo *pNext)
WW8TableNodeInfo::Pointer_t processTableBoxLines(const SwTableBox *pBox, const SwTable *pTable, const SwTableBox *pBoxToSet, sal_uInt32 nRow, sal_uInt32 nCell, sal_uInt32 nDepth)
void setTableBox(const SwTableBox *pTableBox)
const RowSpansPtr & getRowSpans() const
std::map< sal_uInt32, WW8TableNodeInfoInner *, std::greater< sal_uInt32 > > RowEndInners_t
void Right(const tools::Long nRight)
std::vector< const SwTableBox * > TableBoxVector
sal_uInt32 getDepth() const
void setEndOfLine(bool bEndOfLine)
const SwNode * getNode() const
WW8TableNodeInfo * connectCells(RowEndInners_t &rLastRowEnds)
void setRect(const SwRect &rRect)
void Left(const tools::Long nLeft)
void setEndOfCell(bool bEndOfCell)
bool operator<(const WW8TableNodeInfo &rInfo) const
sal_uInt32 getDepth() const
std::vector< sal_Int32 > RowSpans
tools::Long right() const
std::set< tools::Long > RowTops_t
void setCell(sal_uInt32 nCell)
std::unordered_map< const SwTable *, const SwNode *, hashTable > FirstInTableMap_t
void setRect(const SwRect &rRect)
tools::Long bottom() const
TableBoxVectorPtr getTableBoxesOfRow() const
SwTableLine is one table row in the document model.
TableBoxVectorPtr getTableBoxesOfRow(WW8TableNodeInfoInner const *pNodeInfo)
void setTable(const SwTable *pTable)
sal_uInt32 getCell() const
Of course Writer needs its own rectangles.
WW8TableNodeInfo(WW8TableInfo *pParent, const SwNode *pTextNode)
sal_uInt32 getShadowsAfter() const
std::unordered_map< const SwTable *, WW8TableCellGrid::Pointer_t, hashTable > CellGridMap_t
std::shared_ptr< Widths > WidthsPtr
std::map< tools::Long, WW8TableCellGridRow::Pointer_t > Rows_t
WW8TableNodeInfo::Pointer_t insertTableNodeInfo(const SwNode *pNode, const SwTable *pTable, const SwTableBox *pTableBox, sal_uInt32 nRow, sal_uInt32 nCell, sal_uInt32 nDepth, SwRect const *pRect=nullptr)
size_t operator()(const SwNode *pNode) const
const SwRect & getRect() const
const SwTableBox * mpTableBox
tools::Long width() const
void Width(tools::Long nNew)
const SwNode * getNextNode(const SwNode *pNode)
void setTableBoxVector(TableBoxVectorPtr const &pTableBoxVector)
WW8TableNodeInfo * processTableLine(const SwTable *pTable, const SwTableLine *pTableLine, sal_uInt32 nRow, sal_uInt32 nDepth, WW8TableNodeInfo *pPrev, RowEndInners_t &rLastRowEnds)
sal_uInt32 getShadowsBefore() const
void setShadowsAfter(sal_uInt32 nShadowsAfter)
CellInfo(const CellInfo &aRectAndTableInfo)
CellInfoMultiSet::const_iterator getCellsEnd(tools::Long nTop)
void setFirstInTable(bool bFirstInTable)
std::vector< sal_uInt32 > GridCols
tools::Long height() const
void setRow(sal_uInt32 nRow)
WW8TableNodeInfo * reorderByLayout(const SwTable *pTable, RowEndInners_t &rLastRowEnds)
void setWidths(WidthsPtr const &pGridCols)
const Inners_t & getInners() const
WW8TableNodeInfoInner(WW8TableNodeInfo *pParent)
void setRowSpans(RowSpansPtr const &pRowSpans)
const SwTableBox * getTableBox() const
std::shared_ptr< WW8TableInfo > Pointer_t
tools::ULong getFormatFrameWidth() const
WW8TableNodeInfo * processSwTableByLayout(const SwTable *pTable, RowEndInners_t &rLastRowEnds)
std::vector< sal_uInt32 > Widths
WW8TableInfo * getParent() const
const SwTableBox * getTableBox() const
WW8TableNodeInfoInner::Pointer_t getFirstInner() const
std::shared_ptr< TableBoxVector > TableBoxVectorPtr
void setEndOfCell(bool bEndOfCell)
const SwNode * getNode() const
size_t operator()(const SwTable *pTable) const
WW8TableNodeInfo * mpNext
CellInfoMultiSet::const_iterator begin() const
RowSpansPtr getRowSpansOfRow(WW8TableNodeInfoInner const *pNodeInfo)
WW8TableNodeInfo * getNext() const
std::multiset< CellInfo > CellInfoMultiSet
void setFirstInTable(bool bFirstInTable)
tools::ULong m_nFormatFrameWidth
std::shared_ptr< GridCols > GridColsPtr
void insert(const SwRect &rRect, WW8TableNodeInfo *pNodeInfo, tools::ULong const *pFormatFrameWidth=nullptr)
WW8TableNodeInfo * processTableBox(const SwTable *pTable, const SwTableBox *pTableBox, sal_uInt32 nRow, sal_uInt32 nCell, sal_uInt32 nDepth, bool bEndOfLine, WW8TableNodeInfo *pPrev, RowEndInners_t &rLastRowEnds)
void processSwTable(const SwTable *pTable)
WW8TableNodeInfoInner::Pointer_t getInnerForDepth(sal_uInt32 nDepth) const
const TableBoxVectorPtr & getTableBoxVector() const
const SwNode * mpNextNode
std::string toString() const
WW8TableNodeInfo * m_pNodeInfo
sal_uInt32 mnShadowsBefore
void setShadowsAfter(sal_uInt32 nShadowsAfter)
void setFinalEndOfLine(bool bEndOfLine)
void insert(const CellInfo &rCellInfo)
RowTops_t::const_iterator getRowTopsBegin() const
void setNextNode(const SwNode *pNode)
RowTops_t::const_iterator getRowTopsEnd() const
SwTable is one table in the document model, containing rows (which contain cells).
void setDepth(sal_uInt32 nDepth)
GridColsPtr getGridColsOfRow(AttributeOutputBase &rBase, bool calculateColumnsFromAllRows=false)
void setCell(sal_uInt32 nCell)
WidthsPtr getColumnWidthsBasedOnAllRows() const
CellInfoMultiSet::const_iterator end() const
void setDepth(sal_uInt32 nDepth)
void Bottom(const tools::Long nBottom)
RowSpansPtr getRowSpansOfRow() const
std::unordered_map< const SwNode *, WW8TableNodeInfo::Pointer_t, hashNode > Map_t
sal_uInt32 mnShadowsAfter
WidthsPtr getWidthsOfRow() const
WW8TableCellGridRow::Pointer_t getRow(tools::Long nTop, bool bCreate=true)
WW8TableNodeInfo * getTableNodeInfo() const
std::string toString() const
std::string toString() const
CellInfo(const SwRect &aRect, WW8TableNodeInfo *pNodeInfo)
void setVertMerge(bool bVertMerge)
WW8TableCellGrid::Pointer_t getCellGridForTable(const SwTable *pTable, bool bCreate=true)
CellInfoMultiSet::const_iterator getCellsBegin(tools::Long nTop)
std::shared_ptr< WW8TableCellGrid > Pointer_t
void setShadowsBefore(sal_uInt32 nShadowsBefore)
bool isFinalEndOfLine() const
void setRow(sal_uInt32 nRow)
WW8TableNodeInfo::Pointer_t getTableNodeInfo(const SwNode *pNode)
void setEndOfLine(bool bEndOfLine)
void Top(const tools::Long nTop)
SwTableBox is one table cell in the document model.
void setShadowsBefore(sal_uInt32 nShadowsBefore)
FirstInTableMap_t mFirstInTableMap
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
sal_uInt32 getRow() const
const SwTable * getTable() const
void setFormatFrameWidth(tools::ULong nFormatFrameWidth)
const WidthsPtr & getWidths() const
WW8TableNodeInfo * mpParent
std::shared_ptr< CellInfoMultiSet > m_pCellInfos
TableBoxVectorPtr m_pTableBoxVector
std::map< sal_uInt32, WW8TableNodeInfoInner::Pointer_t, std::greater< sal_uInt32 > > Inners_t
std::shared_ptr< WW8TableCellGridRow > Pointer_t
sal_uInt32 getCell() const
bool isFirstInTable() const
std::shared_ptr< RowSpans > RowSpansPtr
void setTableBox(const SwTableBox *pTableBox)
CellGridMap_t mCellGridMap
const SwRect & getRect() const
void Height(tools::Long nNew)
std::shared_ptr< WW8TableNodeInfo > Pointer_t
const SwNode * getNextNode() const
void setTable(const SwTable *pTable)
WidthsPtr getWidthsOfRow(WW8TableNodeInfoInner const *pNodeInfo)
sal_uInt32 getRow() const
void setVertMerge(bool bVertMerge)
bool operator<(const CellInfo &aCellInfo) const
const unsigned int MAXTABLECELLS
Base class of the Writer document model elements.