20#ifndef INCLUDED_SW_INC_HTMLTBL_HXX
21#define INCLUDED_SW_INC_HTMLTBL_HXX
36#define HTMLTABLE_RESIZE_NOW (ULONG_MAX)
40 std::shared_ptr<SwHTMLTableLayoutCnts>
m_xNext;
62 bool bNoBreakTag, std::shared_ptr<SwHTMLTableLayoutCnts> rNxt);
72 const std::shared_ptr<SwHTMLTableLayoutCnts>&
GetNext()
const {
return m_xNext; }
97 sal_uInt16 nRSpan, sal_uInt16 nCSpan,
98 sal_uInt16 nWidthOpt,
bool bPercentWidthOpt,
173 std::vector<std::unique_ptr<SwHTMLTableLayoutColumn>>
m_aColumns;
174 std::vector<std::unique_ptr<SwHTMLTableLayoutCell>>
m_aCells;
230 sal_uInt16 nCol, sal_uInt16 nColSpan,
231 bool bSwBorders=
true )
const;
238 void Resize_( sal_uInt16 nAbsAvail,
bool bRecalc );
246 sal_uInt16 nRows, sal_uInt16 nCols,
bool bColsOpt,
bool ColTgs,
247 sal_uInt16 nWidth,
bool bPercentWidth, sal_uInt16 nBorderOpt,
248 sal_uInt16 nCellPad, sal_uInt16 nCellSp,
SvxAdjust eAdjust,
249 sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth,
250 sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth );
255 bool bSwBorders=
true )
const;
257 bool bSwBorders=
true )
const;
258 inline sal_uInt16
GetInhCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan )
const;
262 void GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16& rAbsAvail,
263 sal_uInt16& rRelAvail )
const;
267 sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace,
268 sal_uInt16 nParentInhSpace );
269 void SetWidths(
bool bCallPass2=
false, sal_uInt16 nAbsAvail=0,
270 sal_uInt16 nRelAvail=0, sal_uInt16 nAbsLeftSpace=0,
271 sal_uInt16 nAbsRightSpace=0,
272 sal_uInt16 nParentInhSpace=0 );
275 inline void SetColumn( std::unique_ptr<SwHTMLTableLayoutColumn> pCol, sal_uInt16 nCol );
278 inline void SetCell( std::unique_ptr<SwHTMLTableLayoutCell> pCell, sal_uInt16 nRow, sal_uInt16 nCol );
304 bool Resize( sal_uInt16 nAbsAvail,
bool bRecalc=
false,
bool bForce=
false,
371 sal_uInt16 nWidth,
bool bRel )
388 sal_uInt16 nColSpan )
const
390 sal_uInt16 nSpace = 0;
421 sal_uInt16 nRow, sal_uInt16 nCol )
bool m_bNoWrapOption
NOWRAP-option.
sal_uInt16 GetColSpan() const
sal_uInt16 m_nRowSpan
ROWSPAN of cell.
sal_uInt16 m_nWidthOption
Given width of cell in Twip or %.
bool m_bPercentWidthOption
nWidth is %-value.
sal_uInt16 m_nColSpan
COLSPAN of cell.
bool IsPercentWidthOption() const
bool HasNoWrapOption() const
void SetRowSpan(sal_uInt16 nRSpan)
Set or get ROWSPAN/COLSPAN of cell.
sal_uInt16 GetWidthOption() const
sal_uInt16 GetRowSpan() const
const std::shared_ptr< SwHTMLTableLayoutCnts > & GetContents() const
void SetContents(std::shared_ptr< SwHTMLTableLayoutCnts > const &rCnts)
Set or get content of a cell.
std::shared_ptr< SwHTMLTableLayoutCnts > m_xContents
Content of cell.
SwHTMLTableLayoutCell(std::shared_ptr< SwHTMLTableLayoutCnts > xCnts, sal_uInt16 nRSpan, sal_uInt16 nCSpan, sal_uInt16 nWidthOpt, bool bPercentWidthOpt, bool bNWrapOpt)
sal_uInt8 m_nPass1Done
The following counters indicate how often a pass has been done for this content.
bool IsWidthSet(sal_uInt8 nRef) const
const std::shared_ptr< SwHTMLTableLayoutCnts > & GetNext() const
Calculation of next node.
SwHTMLTableLayout * GetTable() const
std::shared_ptr< SwHTMLTableLayoutCnts > m_xNext
The next content.
void SetPass1Done(sal_uInt8 nRef)
void SetTableBox(SwTableBox *pBx)
const SwStartNode * m_pStartNode
During first run there are still no boxes.
const SwStartNode * GetStartNode() const
bool HasNoBreakTag() const
void SetWidthSet(sal_uInt8 nRef)
sal_uInt8 m_nWidthSet
How many times has the width been set?
SwHTMLTableLayoutCnts(const SwStartNode *pSttNd, std::shared_ptr< SwHTMLTableLayout > aTab, bool bNoBreakTag, std::shared_ptr< SwHTMLTableLayoutCnts > rNxt)
bool m_bNoBreakTag
<NOBR>-Tag over complete content.
std::shared_ptr< SwHTMLTableLayout > m_xTable
A "table within a table".
SwTableBox * GetTableBox() const
bool IsPass1Done(sal_uInt8 nRef) const
SwTableBox * m_pBox
Only one of the following two pointers may be set!
void AddToMin(sal_uLong nVal)
sal_uLong GetMinNoAlign() const
void ClearPass1Info(bool bWidthOpt)
void SetWidthOption(sal_uInt16 nWidth)
sal_uInt16 m_nWidthOption
Options of <COL> or /.
sal_uLong m_nAbsMinNoAlign
sal_uLong m_nMinNoAlign
Interim values of AutoLayoutPass1,.
sal_uInt16 m_nAbsColWidth
Results of Pass 2.
sal_uLong m_nMin
Results of AutoLayoutPass1.
sal_uInt16 m_nRelColWidth
In Twips or relative to USHRT_MAX.
sal_uLong GetMaxNoAlign() const
void MergeCellWidthOption(sal_uInt16 nWidth, bool bPercent)
SwHTMLTableLayoutColumn(sal_uInt16 nColWidthOpt, bool bRelColWidthOpt, bool bLBorder)
void SetMax(sal_uLong nVal)
sal_uInt16 GetWidthOption() const
void AddToMax(sal_uLong nVal)
void SetMinMax(sal_uLong nMin, sal_uLong nMax)
bool HasLeftBorder() const
void SetRelColWidth(sal_uInt16 nWidth)
void MergeMinMaxNoAlign(sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin)
sal_uInt16 GetRelColWidth() const
sal_uLong GetAbsMinNoAlign() const
void SetAbsColWidth(sal_uInt16 nWidth)
sal_uInt16 GetAbsColWidth() const
bool IsRelWidthOption() const
bool HasPercentWidthOption() const
void SetMustNotRecalc(bool bSet)
SwFrameFormat * FindFlyFrameFormat() const
void SetCell(std::unique_ptr< SwHTMLTableLayoutCell > pCell, sal_uInt16 nRow, sal_uInt16 nCol)
sal_uInt16 m_nInhAbsLeftSpace
Space inherited from surrounding box.
sal_uInt16 GetInhCellSpace(sal_uInt16 nCol, sal_uInt16 nColSpan) const
sal_uInt8 m_nPass1Done
Reference-values for.
void SetMayBeInFlyFrame(bool bSet)
void AddBorderWidth(sal_uLong &rMin, sal_uLong &rMax, sal_uLong &rAbsMin, sal_uInt16 nCol, sal_uInt16 nColSpan, bool bSwBorders=true) const
sal_uInt16 m_nCols
Column count.
sal_uInt16 GetLeftCellSpace(sal_uInt16 nCol, sal_uInt16 nColSpan, bool bSwBorders=true) const
The border widths are calculated like in Netscape: Outer border: BORDER + CELLSPACING + CELLPADDING I...
void AutoLayoutPass2(sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail, sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace, sal_uInt16 nParentInhSpace)
sal_uInt16 m_nRelLeftFill
Width of boxes relative to alignment.
void SetMustNotResize(bool bSet)
void SetWidths(bool bCallPass2=false, sal_uInt16 nAbsAvail=0, sal_uInt16 nRelAvail=0, sal_uInt16 nAbsLeftSpace=0, sal_uInt16 nAbsRightSpace=0, sal_uInt16 nParentInhSpace=0)
SwHTMLTableLayoutColumn * GetColumn(sal_uInt16 nCol) const
bool m_bDelayedResizeRecalc
Param for delayed Resize.
bool m_bColsOption
Table has a COLS-option.
sal_uInt16 GetBrowseWidthByTabFrame(const SwTabFrame &rTabFrame) const
Calculates available width by table-frame.
sal_uInt16 m_nRightMargin
Space to left margin (from paragraph).
const SwDoc & GetDoc() const
tools::Long GetBrowseWidthMin() const
bool m_bColTags
Table has COL/COLGRP tags.
sal_uInt16 m_nRelRightFill
of tables in tables.
sal_uInt16 m_nWidthOption
Width of table (in Twips or %).
sal_uInt16 m_nRows
Row count.
void Resize_(sal_uInt16 nAbsAvail, bool bRecalc)
sal_uInt16 m_nRelTabWidth
Relative width of table.
bool m_bBordersChanged
Borders have been changed.
bool m_bUseRelWidth
SwTable gets relative width.
const SwTable * m_pSwTable
SwTable (Top-Table only).
sal_uInt16 m_nInhAbsRightSpace
that was added to boxes.
SwTwips m_nRightBorderWidth
bool Resize(sal_uInt16 nAbsAvail, bool bRecalc=false, bool bForce=false, sal_uLong nDelay=0)
Recalculation of table widths for available width that has been passed.
void SetBoxWidth(SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan) const
sal_uInt16 GetRightCellSpace(sal_uInt16 nCol, sal_uInt16 nColSpan, bool bSwBorders=true) const
SwHTMLTableLayoutCell * GetCell(sal_uInt16 nRow, sal_uInt16 nCol) const
bool HasColsOption() const
sal_uInt16 m_nDelayedResizeAbsAvail
Param for delayed Resize.
DECL_LINK(DelayedResize_Impl, Timer *, void)
sal_uInt16 GetColCount() const
bool HaveBordersChanged() const
sal_uInt16 m_nCellPadding
Space to contents (in Twips).
sal_uInt16 GetBrowseWidthByTable(const SwDoc &rDoc) const
Calculates available width by the table-frame or static GetBrowseWidth if no layout exists.
void SetExportable(bool bSet)
sal_uInt16 GetBorder() const
bool m_bMustNotRecalc
Table may not be adapted to its contents.
std::vector< std::unique_ptr< SwHTMLTableLayoutColumn > > m_aColumns
SvxAdjust m_eTableAdjust
Alignment of table.
sal_uInt16 GetRowCount() const
void GetAvail(sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16 &rAbsAvail, sal_uInt16 &rRelAvail) const
void SetMustResize(bool bSet)
SwTwips m_nLeftBorderWidth
Line strength of outer border, or rather the space needed for it as calculated by Netscape.
void SetInhBorderWidths(sal_uInt16 nLeft, sal_uInt16 nRight)
bool IsExportable() const
sal_uInt16 m_nLeftMargin
Space to left margin (from paragraph).
bool m_bPercentWidthOption
Width is given in percent.
static sal_uInt16 GetBrowseWidthByVisArea(const SwDoc &rDoc)
sal_uLong m_nMin
Minimal width of table (Twips).
void SetColumn(std::unique_ptr< SwHTMLTableLayoutColumn > pCol, sal_uInt16 nCol)
const SwStartNode * GetAnyBoxStartNode() const
SwHTMLTableLayout(const SwTable *pSwTable, sal_uInt16 nRows, sal_uInt16 nCols, bool bColsOpt, bool ColTgs, sal_uInt16 nWidth, bool bPercentWidth, sal_uInt16 nBorderOpt, sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust, sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth, sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth)
bool MayBeInFlyFrame() const
std::vector< std::unique_ptr< SwHTMLTableLayoutCell > > m_aCells
sal_uInt16 GetCellPadding() const
bool m_bMustResize
Table width must be defined.
sal_uLong m_nMax
Maximal width of table (Twips).
sal_uInt16 GetWidthOption() const
For Export.
void BordersChanged(sal_uInt16 nAbsAvail)
bool m_bMayBeInFlyFrame
Table could be within frame.
sal_uInt16 GetCellSpacing() const
sal_uInt16 m_nLastResizeAbsAvail
Timer m_aResizeTimer
Timer for DelayedResize.
static sal_uInt16 GetBrowseWidth(const SwDoc &rDoc)
Calculate available width.
bool m_bMustNotResize
Table may not be resized.
sal_uInt16 m_nCellSpacing
Cell spacing (in Twips).
sal_uInt16 m_nInhRightBorderWidth
bool m_bExportable
Layout may be used for export.
sal_uInt16 m_nInhLeftBorderWidth
sal_uInt8 m_nWidthSet
the runs through loop.
Starts a section of nodes in the document model.
SwTabFrame is one table in the document layout, containing rows (which contain cells).
SwTableBox is one table cell in the document model.
SwTable is one table in the document model, containing rows (which contain cells).
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)