19 #ifndef INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
20 #define INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
38 namespace editeng {
class SvxBorderLine; }
44 #define COL_DFLT_WIDTH ((2*COLFUZZY)+1)
45 #define ROW_DFLT_HEIGHT (2*ROWFUZZY)+1
68 : pBox( pB ), pBackground( pBGround ), nHeight( nHght ), nWidthOpt( 0 ),
69 nRow( nR ), nCol( nC ), nRowSpan( nRSpan ), nColSpan( nCSpan ),
70 bPercentWidthOpt( false )
75 sal_uInt16
GetRow()
const {
return nRow; }
76 sal_uInt16
GetCol()
const {
return nCol; }
82 sal_Int16 GetVertOri()
const;
88 nWidthOpt = nWidth; bPercentWidthOpt = bPercent;
121 sal_uInt16 nRow, sal_uInt16 nCol,
122 sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
128 pBackground = pBGround;
204 bool operator()(std::unique_ptr<SwWriteTableCol>
const & lhs, std::unique_ptr<SwWriteTableCol>
const & rhs) {
205 return lhs->GetPos() < rhs->GetPos();
238 bool m_bRelWidths : 1;
239 bool m_bUseLayoutHeights : 1;
241 bool m_bGetLineHeightCalled : 1;
245 bool m_bLayoutExport : 1;
246 bool m_bCollectBorderWidth : 1;
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);
bool HasPercentWidthOpt() const
bool HasRelWidthOpt() const
const SvxBrushItem * pBackground
bool HasRightBorder() const
sal_uInt16 GetRowSpan() const
void SetWidthOpt(sal_uInt16 nWidth, bool bPercent)
sal_uInt16 m_nInnerBorder
const SwTable * GetTable() const
SwTableLine is one table row in the document model.
sal_uInt32 GetWidthOpt() const
const SvxBrushItem * pBackground
const SwTableBox * GetBox() const
sal_uInt32 GetBaseWidth() const
bool HasTopBorder() const
const SvxBrushItem * GetBackground() const
const SwWriteTableCells & GetCells() const
sal_uInt32 GetWidthOpt() const
void SetWidthOpt(sal_uInt32 nWidth, bool bRel)
tools::Long GetHeight() const
bool HasLeftBorder() const
sal_uInt16 m_nCellSpacing
SwWriteTableCells m_Cells
all cells of the rows
SwWriteTableCell * AddCell(const SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol, sal_uInt16 nRowSpan, sal_uInt16 nColSpan, tools::Long nHeight, const SvxBrushItem *pBackground)
bool operator==(const SwWriteTableCol &rCol) const
bool operator<(const SwWriteTableRow &rRow2) const
sal_uInt16 m_nCellPadding
SwWriteTableRow & operator=(const SwWriteTableRow &)=delete
bool HasRelWidths() const
SwWriteTableCell(const SwTableBox *pB, sal_uInt16 nR, sal_uInt16 nC, sal_uInt16 nRSpan, sal_uInt16 nCSpan, tools::Long nHght, const SvxBrushItem *pBGround)
bool operator()(std::unique_ptr< SwWriteTableCol > const &lhs, std::unique_ptr< SwWriteTableCol > const &rhs)
const SvxBrushItem * GetBackground() const
sal_uInt16 GetCol() const
bool operator<(const SwWriteTableCol &rCol) const
bool operator==(const SwWriteTableRow &rRow) const
sal_uInt16 GetRow() const
void SetBackground(const SvxBrushItem *pBGround)
SwTable is one table in the document model, containing rows (which contain cells).
std::vector< std::unique_ptr< SwWriteTableCell > > SwWriteTableCells
SwWriteTableRow(const SwWriteTableRow &)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
SwWriteTableCol(sal_uInt32 nPosition)
sal_uInt16 GetColSpan() const
bool HasBottomBorder() const
SwTableBox is one table cell in the document model.
const SwWriteTableRows & GetRows() const
sal_uInt32 GetPos() const
double GetAbsWidthRatio() const