19#ifndef INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
20#define INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
38namespace editeng {
class SvxBorderLine; }
44#define COL_DFLT_WIDTH ((2*COLFUZZY)+1)
45#define ROW_DFLT_HEIGHT (2*ROWFUZZY)+1
68 : m_pBox( pB ), m_pBackground( pBGround ), m_nHeight( nHght ), m_nWidthOpt( 0 ),
69 m_nRow( nR ), m_nCol( nC ), m_nRowSpan( nRSpan ), m_nColSpan( nCSpan ),
70 m_bPercentWidthOpt( false )
75 sal_uInt16
GetRow()
const {
return m_nRow; }
76 sal_uInt16
GetCol()
const {
return m_nCol; }
82 sal_Int16 GetVertOri()
const;
88 m_nWidthOpt = nWidth; m_bPercentWidthOpt = bPercent;
121 sal_uInt16 nRow, sal_uInt16 nCol,
122 sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
204 bool operator()(std::unique_ptr<SwWriteTableCol>
const & lhs, std::unique_ptr<SwWriteTableCol>
const & rhs) {
205 return lhs->GetPos() < rhs->GetPos();
248 virtual bool ShouldExpandSub(
const SwTableBox *pBox,
249 bool bExpandedBefore, sal_uInt16 nDepth )
const;
251 void CollectTableRowsCols(
tools::Long nStartRPos, sal_uInt32 nStartCPos,
253 sal_uInt32 nParentLineWidth,
257 void FillTableRowsCols(
tools::Long nStartRPos, sal_uInt16 nStartRow,
258 sal_uInt32 nStartCPos, sal_uInt16 nStartCol,
260 sal_uInt32 nParentLineWidth,
264 sal_uInt16 nNumOfHeaderRows );
268 sal_uInt16 MergeBoxBorders(
const SwTableBox *pBox,
size_t nRow,
size_t nCol,
269 sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
270 sal_uInt16 &rTopBorder, sal_uInt16 &rBottomBorder );
277 static sal_uInt32 GetBoxWidth(
const SwTableBox *pBox );
279 sal_uInt32 GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan )
const;
280 sal_uInt16 GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan )
const;
281 sal_uInt16 GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan )
const;
282 sal_uInt16 GetPercentWidth( sal_uInt16 nCol, sal_uInt16 nColSpan )
const;
286 double GetAbsWidthRatio()
const {
return m_nTabWidth == m_nBaseWidth ? 1.0 : double(m_nTabWidth) / m_nBaseWidth; }
293 sal_uInt16 GetLeftSpace( sal_uInt16 nCol )
const;
294 sal_uInt16 GetRightSpace(
size_t nCol, sal_uInt16 nColSpan)
const;
298 bool bRel, sal_uInt16 nMaxDepth = USHRT_MAX,
299 sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0);
SwTableBox is one table cell in the document model.
SwTableLine is one table row in the document model.
SwTable is one table in the document model, containing rows (which contain cells).
tools::Long GetHeight() const
sal_uInt32 GetWidthOpt() const
sal_uInt16 GetRowSpan() const
SwWriteTableCell(const SwTableBox *pB, sal_uInt16 nR, sal_uInt16 nC, sal_uInt16 nRSpan, sal_uInt16 nCSpan, tools::Long nHght, const SvxBrushItem *pBGround)
bool HasPercentWidthOpt() const
const SwTableBox * GetBox() const
const SvxBrushItem * GetBackground() const
sal_uInt16 GetRow() const
sal_uInt16 GetCol() const
const SvxBrushItem * m_pBackground
sal_uInt16 GetColSpan() const
const SwTableBox * m_pBox
void SetWidthOpt(sal_uInt16 nWidth, bool bPercent)
bool operator<(const SwWriteTableCol &rCol) const
bool HasRelWidthOpt() const
bool operator==(const SwWriteTableCol &rCol) const
sal_uInt32 GetWidthOpt() const
SwWriteTableCol(sal_uInt32 nPosition)
bool HasLeftBorder() const
void SetWidthOpt(sal_uInt32 nWidth, bool bRel)
bool HasRightBorder() const
sal_uInt32 GetPos() const
sal_uInt16 m_nBottomBorder
const SvxBrushItem * m_pBackground
const SvxBrushItem * GetBackground() const
SwWriteTableRow & operator=(const SwWriteTableRow &)=delete
SwWriteTableCell * AddCell(const SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol, sal_uInt16 nRowSpan, sal_uInt16 nColSpan, tools::Long nHeight, const SvxBrushItem *pBackground)
bool HasBottomBorder() const
SwWriteTableCells m_Cells
all cells of the rows
bool operator<(const SwWriteTableRow &rRow2) const
const SwWriteTableCells & GetCells() const
SwWriteTableRow(const SwWriteTableRow &)
void SetBackground(const SvxBrushItem *pBGround)
bool operator==(const SwWriteTableRow &rRow) const
bool HasTopBorder() const
bool m_bCollectBorderWidth
bool HasRelWidths() const
const SwWriteTableRows & GetRows() const
const SwTable * GetTable() const
sal_uInt32 GetBaseWidth() const
sal_uInt16 m_nCellPadding
double GetAbsWidthRatio() const
sal_uInt16 m_nInnerBorder
sal_uInt16 m_nCellSpacing
bool m_bGetLineHeightCalled
bool operator()(std::unique_ptr< SwWriteTableCol > const &lhs, std::unique_ptr< SwWriteTableCol > const &rhs)
std::vector< std::unique_ptr< SwWriteTableCell > > SwWriteTableCells