class SwTableBox; class SwTable; class SwHTMLTableLayout; class SwDoc; class SwFrameFormat;
#define HTMLTABLE_RESIZE_NOW (ULONG_MAX)
class SwHTMLTableLayoutCnts
{
std::shared_ptr<SwHTMLTableLayoutCnts> m_xNext; ///< The next content.
/// Only one of the following two pointers may be set!
SwTableBox *m_pBox; ///< A Box.
std::shared_ptr<SwHTMLTableLayout> m_xTable; ///< A "table within a table".
/** During first run there are still no boxes. In this case
pStartNode is used instead of pBox. */ const SwStartNode *m_pStartNode;
/** The following counters indicate how often a pass has been doneforthiscontent.Thereforetheyarecomparedagainst areferencevalue.If255isreachedthecontinuewith0.
This avoids reinitialization on every resize. */
sal_uInt8 m_nPass1Done; ///< How many times has Pass 1 been called?
sal_uInt8 m_nWidthSet; ///< How many times has the width been set?
bool m_bNoBreakTag; ///< <NOBR>-Tag over complete content.
class SwHTMLTableLayoutCell
{
std::shared_ptr<SwHTMLTableLayoutCnts> m_xContents; ///< Content of cell.
sal_uInt16 m_nRowSpan; ///< ROWSPAN of cell.
sal_uInt16 m_nColSpan; ///< COLSPAN of cell.
sal_uInt16 m_nWidthOption; ///< Given width of cell in Twip or %.
/// Set or get content of a cell. void SetContents(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts) { m_xContents = rCnts; } const std::shared_ptr<SwHTMLTableLayoutCnts>& GetContents() const { return m_xContents; }
inlinevoid SetProtected();
/// Set or get ROWSPAN/COLSPAN of cell. void SetRowSpan( sal_uInt16 nRSpan ) { m_nRowSpan = nRSpan; }
sal_uInt16 GetRowSpan() const { return m_nRowSpan; }
sal_uInt16 GetColSpan() const { return m_nColSpan; }
sal_uInt16 m_nLeftMargin; ///< Space to left margin (from paragraph).
sal_uInt16 m_nRightMargin; ///< Space to left margin (from paragraph).
sal_uInt16 m_nInhAbsLeftSpace; ///< Space inherited from surrounding box
sal_uInt16 m_nInhAbsRightSpace; ///< that was added to boxes.
sal_uInt16 m_nRelLeftFill; ///< Width of boxes relative to alignment
sal_uInt16 m_nRelRightFill; ///< of tables in tables.
sal_uInt16 m_nRelTabWidth; ///< Relative width of table.
sal_uInt16 m_nWidthOption; ///< Width of table (in Twips or %).
sal_uInt16 m_nCellPadding; ///< Space to contents (in Twips).
sal_uInt16 m_nCellSpacing; ///< Cell spacing (in Twips).
sal_uInt16 m_nBorder; /** Line strength of outer border, or rather the
space needed for it as calculated by Netscape. */
sal_uInt16 m_nDelayedResizeAbsAvail; ///< Param for delayed Resize.
sal_uInt16 m_nLastResizeAbsAvail;
sal_uInt8 m_nPass1Done; ///< Reference-values for
sal_uInt8 m_nWidthSet; ///< the runs through loop.
SvxAdjust m_eTableAdjust; ///< Alignment of table.
bool m_bColsOption : 1; ///< Table has a COLS-option. bool m_bColTags : 1; ///< Table has COL/COLGRP tags. bool m_bPercentWidthOption : 1; ///< Width is given in percent. bool m_bUseRelWidth : 1; ///< SwTable gets relative width.
bool m_bMustResize : 1; ///< Table width must be defined. bool m_bExportable : 1; ///< Layout may be used for export. bool m_bBordersChanged : 1; ///< Borders have been changed. bool m_bMayBeInFlyFrame : 1; ///< Table could be within frame.
bool m_bDelayedResizeRecalc : 1; ///< Param for delayed Resize. bool m_bMustNotResize : 1; ///< Table may not be resized. bool m_bMustNotRecalc : 1; ///< Table may not be adapted to its contents.
/** Recalculation of table widths for available width that has been passed. -IfbRecalcisset,contentsofboxesareincludedintocalculation. -IfbForceisset,tablewillberecalculatedevenifthiswas disallowedbySetMustNotResize. -IfnDelay>0thecalculationisdelayedaccordingly.Resizingcalls occurringduringdelay-timeareignored,butthedelaymaybecounted undercertaincircumstances. -IfnDelay==HTMLTABLE_RESIZE_NOW,resizeimmediatelyanddonot consideranyresize-callsthatmightpossiblybeinorder.
- The return value indicates whether the table has been changed. */ bool Resize( sal_uInt16 nAbsAvail, bool bRecalc=false, bool bForce=false,
sal_uLong nDelay=0 );
void BordersChanged( sal_uInt16 nAbsAvail );
/** Calculate available width. This works only if a layout or a SwViewShellexists.Otherwisereturns0.
This is needed by HTML-filter because it doesn't have access to the layout.) */ static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc );
/// Calculates available width by table-frame.
sal_uInt16 GetBrowseWidthByTabFrame( const SwTabFrame& rTabFrame ) const;
/** Calculates available width by the table-frame or
static GetBrowseWidth if no layout exists. */
sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.