LibreOffice Module sw (master) 1
htmltbl.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SW_INC_HTMLTBL_HXX
21#define INCLUDED_SW_INC_HTMLTBL_HXX
22
23#include <memory>
24#include <vcl/timer.hxx>
25#include <editeng/svxenum.hxx>
26
27#include "swtypes.hxx"
28#include "node.hxx"
29
30class SwTableBox;
31class SwTable;
33class SwDoc;
34class SwFrameFormat;
35
36#define HTMLTABLE_RESIZE_NOW (ULONG_MAX)
37
39{
40 std::shared_ptr<SwHTMLTableLayoutCnts> m_xNext;
41
44 std::shared_ptr<SwHTMLTableLayout> m_xTable;
45
49
56
58
59public:
60
61 SwHTMLTableLayoutCnts(const SwStartNode* pSttNd, std::shared_ptr<SwHTMLTableLayout> aTab,
62 bool bNoBreakTag, std::shared_ptr<SwHTMLTableLayoutCnts> rNxt);
63
64 void SetTableBox( SwTableBox *pBx ) { m_pBox = pBx; }
65 SwTableBox *GetTableBox() const { return m_pBox; }
66
67 SwHTMLTableLayout *GetTable() const { return m_xTable.get(); }
68
69 const SwStartNode *GetStartNode() const;
70
72 const std::shared_ptr<SwHTMLTableLayoutCnts>& GetNext() const { return m_xNext; }
73
75 bool IsWidthSet( sal_uInt8 nRef ) const { return nRef==m_nWidthSet; }
76
78 bool IsPass1Done( sal_uInt8 nRef ) const { return nRef==m_nPass1Done; }
79
80 bool HasNoBreakTag() const { return m_bNoBreakTag; }
81};
82
84{
85 std::shared_ptr<SwHTMLTableLayoutCnts> m_xContents;
86
87 sal_uInt16 m_nRowSpan;
88 sal_uInt16 m_nColSpan;
89 sal_uInt16 m_nWidthOption;
90
92 bool m_bNoWrapOption : 1;
93
94public:
95
96 SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts> xCnts,
97 sal_uInt16 nRSpan, sal_uInt16 nCSpan,
98 sal_uInt16 nWidthOpt, bool bPercentWidthOpt,
99 bool bNWrapOpt );
100
102 void SetContents(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts) { m_xContents = rCnts; }
103 const std::shared_ptr<SwHTMLTableLayoutCnts>& GetContents() const { return m_xContents; }
104
105 inline void SetProtected();
106
108 void SetRowSpan( sal_uInt16 nRSpan ) { m_nRowSpan = nRSpan; }
109 sal_uInt16 GetRowSpan() const { return m_nRowSpan; }
110 sal_uInt16 GetColSpan() const { return m_nColSpan; }
111
112 sal_uInt16 GetWidthOption() const { return m_nWidthOption; }
114
115 bool HasNoWrapOption() const { return m_bNoWrapOption; }
116};
117
119{
120
123
126
128 sal_uInt16 m_nAbsColWidth;
129 sal_uInt16 m_nRelColWidth;
130
131 sal_uInt16 m_nWidthOption;
132
135
136public:
137
138 SwHTMLTableLayoutColumn( sal_uInt16 nColWidthOpt, bool bRelColWidthOpt,
139 bool bLBorder );
140
141 inline void MergeCellWidthOption( sal_uInt16 nWidth, bool bPercent );
142 inline void SetWidthOption( sal_uInt16 nWidth );
143
144 sal_uInt16 GetWidthOption() const { return m_nWidthOption; }
145 bool IsRelWidthOption() const { return m_bRelWidthOption; }
146
147 inline void MergeMinMaxNoAlign( sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin );
151 inline void ClearPass1Info( bool bWidthOpt );
152
153 inline void SetMinMax( sal_uLong nMin, sal_uLong nMax );
154 void SetMax( sal_uLong nVal ) { m_nMax = nVal; }
155 void AddToMin( sal_uLong nVal ) { m_nMin += nVal; }
156 void AddToMax( sal_uLong nVal ) { m_nMax += nVal; }
157 sal_uLong GetMin() const { return m_nMin; }
158 sal_uLong GetMax() const { return m_nMax; }
159
160 void SetAbsColWidth( sal_uInt16 nWidth ) { m_nAbsColWidth = nWidth; }
161 sal_uInt16 GetAbsColWidth() const { return m_nAbsColWidth; }
162
163 void SetRelColWidth( sal_uInt16 nWidth ) { m_nRelColWidth = nWidth; }
164 sal_uInt16 GetRelColWidth() const { return m_nRelColWidth; }
165
166 bool HasLeftBorder() const { return m_bLeftBorder; }
167};
168
170{
172
173 std::vector<std::unique_ptr<SwHTMLTableLayoutColumn>> m_aColumns;
174 std::vector<std::unique_ptr<SwHTMLTableLayoutCell>> m_aCells;
175
177
180
181 sal_uInt16 m_nRows;
182 sal_uInt16 m_nCols;
183
184 sal_uInt16 m_nLeftMargin;
185 sal_uInt16 m_nRightMargin;
186
189
190 sal_uInt16 m_nRelLeftFill;
191 sal_uInt16 m_nRelRightFill;
192
193 sal_uInt16 m_nRelTabWidth;
194
195 sal_uInt16 m_nWidthOption;
196 sal_uInt16 m_nCellPadding;
197 sal_uInt16 m_nCellSpacing;
198 sal_uInt16 m_nBorder;
206
209
212
214
215 bool m_bColsOption : 1;
216 bool m_bColTags : 1;
218 bool m_bUseRelWidth : 1;
219
220 bool m_bMustResize : 1;
221 bool m_bExportable : 1;
224
228
229 void AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax, sal_uLong& rAbsMin,
230 sal_uInt16 nCol, sal_uInt16 nColSpan,
231 bool bSwBorders=true ) const;
232 void SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
233
234 const SwStartNode *GetAnyBoxStartNode() const;
236 const SwDoc& GetDoc() const { return GetAnyBoxStartNode()->GetDoc(); }
237
238 void Resize_( sal_uInt16 nAbsAvail, bool bRecalc );
239
240 DECL_LINK( DelayedResize_Impl, Timer*, void );
241
242 static sal_uInt16 GetBrowseWidthByVisArea( const SwDoc& rDoc );
243public:
244
245 SwHTMLTableLayout( const SwTable *pSwTable,
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 );
251
253
254 sal_uInt16 GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
255 bool bSwBorders=true ) const;
256 sal_uInt16 GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
257 bool bSwBorders=true ) const;
258 inline sal_uInt16 GetInhCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
259
260 inline void SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight );
261
262 void GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16& rAbsAvail,
263 sal_uInt16& rRelAvail ) const;
264
265 void AutoLayoutPass1();
266 void AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail,
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 );
273
274 inline SwHTMLTableLayoutColumn *GetColumn( sal_uInt16 nCol ) const;
275 inline void SetColumn( std::unique_ptr<SwHTMLTableLayoutColumn> pCol, sal_uInt16 nCol );
276
277 inline SwHTMLTableLayoutCell *GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const;
278 inline void SetCell( std::unique_ptr<SwHTMLTableLayoutCell> pCell, sal_uInt16 nRow, sal_uInt16 nCol );
279
280 sal_uLong GetMin() const { return m_nMin; }
281 sal_uLong GetMax() const { return m_nMax; }
282
283 inline tools::Long GetBrowseWidthMin() const;
284
285 bool HasColsOption() const { return m_bColsOption; }
286 bool HasColTags() const { return m_bColTags; }
287
288 bool IsTopTable() const { return m_pSwTable != nullptr; }
289
290 void SetMustResize( bool bSet ) { m_bMustResize = bSet; }
291 void SetMustNotResize( bool bSet ) { m_bMustNotResize = bSet; }
292 void SetMustNotRecalc( bool bSet ) { m_bMustNotRecalc = bSet; }
293
304 bool Resize( sal_uInt16 nAbsAvail, bool bRecalc=false, bool bForce=false,
305 sal_uLong nDelay=0 );
306
307 void BordersChanged( sal_uInt16 nAbsAvail );
308
312 static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc );
313
315 sal_uInt16 GetBrowseWidthByTabFrame( const SwTabFrame& rTabFrame ) const;
316
319 sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const;
320
322 sal_uInt16 GetWidthOption() const { return m_nWidthOption; }
324
325 sal_uInt16 GetCellPadding() const { return m_nCellPadding; }
326 sal_uInt16 GetCellSpacing() const { return m_nCellSpacing; }
327 sal_uInt16 GetBorder() const { return m_nBorder; }
328
329 sal_uInt16 GetRowCount() const { return m_nRows; }
330 sal_uInt16 GetColCount() const { return m_nCols; }
331
332 void SetExportable( bool bSet ) { m_bExportable = bSet; }
333 bool IsExportable() const { return m_bExportable; }
334
335 bool HaveBordersChanged() const { return m_bBordersChanged; }
336
337 void SetMayBeInFlyFrame( bool bSet ) { m_bMayBeInFlyFrame = bSet; }
338 bool MayBeInFlyFrame() const { return m_bMayBeInFlyFrame; }
339};
340
342{
343 m_nRowSpan = 1;
344 m_nColSpan = 1;
345 m_xContents.reset();
346}
347
349 sal_uLong nCMax, sal_uLong nAbsMin )
350{
351 if( nCMin > m_nMinNoAlign )
352 m_nMinNoAlign = nCMin;
353 if( nCMax > m_nMaxNoAlign )
354 m_nMaxNoAlign = nCMax;
355 if( nAbsMin > m_nAbsMinNoAlign )
356 m_nAbsMinNoAlign = nAbsMin;
357}
358
359inline void SwHTMLTableLayoutColumn::ClearPass1Info( bool bWidthOpt )
360{
362 m_nMin = m_nMax = 0;
363 if( bWidthOpt )
364 {
365 m_nWidthOption = 0;
366 m_bRelWidthOption = false;
367 }
368}
369
371 sal_uInt16 nWidth, bool bRel )
372{
373 if( !m_nWidthOption ||
374 (bRel==m_bRelWidthOption && m_nWidthOption < nWidth) )
375 {
376 m_nWidthOption = nWidth;
377 m_bRelWidthOption = bRel;
378 }
379}
380
382{
383 m_nMin = nMn;
384 m_nMax = nMx;
385}
386
387inline sal_uInt16 SwHTMLTableLayout::GetInhCellSpace( sal_uInt16 nCol,
388 sal_uInt16 nColSpan ) const
389{
390 sal_uInt16 nSpace = 0;
391 if( nCol==0 )
392 nSpace = nSpace + m_nInhAbsLeftSpace;
393 if( nCol+nColSpan==m_nCols )
394 nSpace = nSpace + m_nInhAbsRightSpace;
395
396 return nSpace;
397}
398
400{
401 return m_aColumns[nCol].get();
402}
403
404inline void SwHTMLTableLayoutColumn::SetWidthOption( sal_uInt16 nWidth )
405{
406 m_nWidthOption = nWidth;
407 m_bRelWidthOption = true;
408}
409
410inline void SwHTMLTableLayout::SetColumn( std::unique_ptr<SwHTMLTableLayoutColumn> pCol, sal_uInt16 nCol )
411{
412 m_aColumns[nCol] = std::move(pCol);
413}
414
415inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const
416{
417 return m_aCells[static_cast<size_t>(nRow)*m_nCols+nCol].get();
418}
419
420inline void SwHTMLTableLayout::SetCell( std::unique_ptr<SwHTMLTableLayoutCell> pCell,
421 sal_uInt16 nRow, sal_uInt16 nCol )
422{
423 m_aCells[static_cast<size_t>(nRow)*m_nCols+nCol] = std::move(pCell);
424}
425
427{
429}
430
431void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight )
432{
433 m_nInhLeftBorderWidth = nLeft;
434 m_nInhRightBorderWidth = nRight;
435}
436
437#endif
438
439/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: doc.hxx:197
Style of a layout element.
Definition: frmfmt.hxx:72
bool m_bNoWrapOption
NOWRAP-option.
Definition: htmltbl.hxx:92
sal_uInt16 GetColSpan() const
Definition: htmltbl.hxx:110
sal_uInt16 m_nRowSpan
ROWSPAN of cell.
Definition: htmltbl.hxx:87
sal_uInt16 m_nWidthOption
Given width of cell in Twip or %.
Definition: htmltbl.hxx:89
bool m_bPercentWidthOption
nWidth is %-value.
Definition: htmltbl.hxx:91
sal_uInt16 m_nColSpan
COLSPAN of cell.
Definition: htmltbl.hxx:88
bool IsPercentWidthOption() const
Definition: htmltbl.hxx:113
bool HasNoWrapOption() const
Definition: htmltbl.hxx:115
void SetRowSpan(sal_uInt16 nRSpan)
Set or get ROWSPAN/COLSPAN of cell.
Definition: htmltbl.hxx:108
sal_uInt16 GetWidthOption() const
Definition: htmltbl.hxx:112
sal_uInt16 GetRowSpan() const
Definition: htmltbl.hxx:109
const std::shared_ptr< SwHTMLTableLayoutCnts > & GetContents() const
Definition: htmltbl.hxx:103
void SetContents(std::shared_ptr< SwHTMLTableLayoutCnts > const &rCnts)
Set or get content of a cell.
Definition: htmltbl.hxx:102
std::shared_ptr< SwHTMLTableLayoutCnts > m_xContents
Content of cell.
Definition: htmltbl.hxx:85
SwHTMLTableLayoutCell(std::shared_ptr< SwHTMLTableLayoutCnts > xCnts, sal_uInt16 nRSpan, sal_uInt16 nCSpan, sal_uInt16 nWidthOpt, bool bPercentWidthOpt, bool bNWrapOpt)
Definition: htmltbl.cxx:94
sal_uInt8 m_nPass1Done
The following counters indicate how often a pass has been done for this content.
Definition: htmltbl.hxx:54
bool IsWidthSet(sal_uInt8 nRef) const
Definition: htmltbl.hxx:75
const std::shared_ptr< SwHTMLTableLayoutCnts > & GetNext() const
Calculation of next node.
Definition: htmltbl.hxx:72
SwHTMLTableLayout * GetTable() const
Definition: htmltbl.hxx:67
std::shared_ptr< SwHTMLTableLayoutCnts > m_xNext
The next content.
Definition: htmltbl.hxx:40
void SetPass1Done(sal_uInt8 nRef)
Definition: htmltbl.hxx:77
void SetTableBox(SwTableBox *pBx)
Definition: htmltbl.hxx:64
const SwStartNode * m_pStartNode
During first run there are still no boxes.
Definition: htmltbl.hxx:48
const SwStartNode * GetStartNode() const
Definition: htmltbl.cxx:89
bool HasNoBreakTag() const
Definition: htmltbl.hxx:80
void SetWidthSet(sal_uInt8 nRef)
Definition: htmltbl.hxx:74
sal_uInt8 m_nWidthSet
How many times has the width been set?
Definition: htmltbl.hxx:55
SwHTMLTableLayoutCnts(const SwStartNode *pSttNd, std::shared_ptr< SwHTMLTableLayout > aTab, bool bNoBreakTag, std::shared_ptr< SwHTMLTableLayoutCnts > rNxt)
Definition: htmltbl.cxx:81
bool m_bNoBreakTag
<NOBR>-Tag over complete content.
Definition: htmltbl.hxx:57
std::shared_ptr< SwHTMLTableLayout > m_xTable
A "table within a table".
Definition: htmltbl.hxx:44
SwTableBox * GetTableBox() const
Definition: htmltbl.hxx:65
bool IsPass1Done(sal_uInt8 nRef) const
Definition: htmltbl.hxx:78
SwTableBox * m_pBox
Only one of the following two pointers may be set!
Definition: htmltbl.hxx:43
void AddToMin(sal_uLong nVal)
Definition: htmltbl.hxx:155
sal_uLong GetMinNoAlign() const
Definition: htmltbl.hxx:148
void ClearPass1Info(bool bWidthOpt)
Definition: htmltbl.hxx:359
void SetWidthOption(sal_uInt16 nWidth)
Definition: htmltbl.hxx:404
sal_uInt16 m_nWidthOption
Options of <COL> or /.
Definition: htmltbl.hxx:131
sal_uLong m_nAbsMinNoAlign
Definition: htmltbl.hxx:122
sal_uLong m_nMinNoAlign
Interim values of AutoLayoutPass1,.
Definition: htmltbl.hxx:122
sal_uInt16 m_nAbsColWidth
Results of Pass 2.
Definition: htmltbl.hxx:128
sal_uLong m_nMin
Results of AutoLayoutPass1.
Definition: htmltbl.hxx:125
sal_uLong GetMin() const
Definition: htmltbl.hxx:157
sal_uInt16 m_nRelColWidth
In Twips or relative to USHRT_MAX.
Definition: htmltbl.hxx:129
sal_uLong GetMaxNoAlign() const
Definition: htmltbl.hxx:149
void MergeCellWidthOption(sal_uInt16 nWidth, bool bPercent)
Definition: htmltbl.hxx:370
sal_uLong GetMax() const
Definition: htmltbl.hxx:158
SwHTMLTableLayoutColumn(sal_uInt16 nColWidthOpt, bool bRelColWidthOpt, bool bLBorder)
Definition: htmltbl.cxx:104
void SetMax(sal_uLong nVal)
Definition: htmltbl.hxx:154
sal_uInt16 GetWidthOption() const
Definition: htmltbl.hxx:144
void AddToMax(sal_uLong nVal)
Definition: htmltbl.hxx:156
void SetMinMax(sal_uLong nMin, sal_uLong nMax)
Definition: htmltbl.hxx:381
bool HasLeftBorder() const
Definition: htmltbl.hxx:166
void SetRelColWidth(sal_uInt16 nWidth)
Definition: htmltbl.hxx:163
void MergeMinMaxNoAlign(sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin)
Definition: htmltbl.hxx:348
sal_uInt16 GetRelColWidth() const
Definition: htmltbl.hxx:164
sal_uLong GetAbsMinNoAlign() const
Definition: htmltbl.hxx:150
void SetAbsColWidth(sal_uInt16 nWidth)
Definition: htmltbl.hxx:160
sal_uInt16 GetAbsColWidth() const
Definition: htmltbl.hxx:161
bool IsRelWidthOption() const
Definition: htmltbl.hxx:145
bool HasPercentWidthOption() const
Definition: htmltbl.hxx:323
sal_uLong GetMin() const
Definition: htmltbl.hxx:280
void SetMustNotRecalc(bool bSet)
Definition: htmltbl.hxx:292
SwFrameFormat * FindFlyFrameFormat() const
Definition: htmltbl.cxx:408
void SetCell(std::unique_ptr< SwHTMLTableLayoutCell > pCell, sal_uInt16 nRow, sal_uInt16 nCol)
Definition: htmltbl.hxx:420
sal_uInt16 m_nInhAbsLeftSpace
Space inherited from surrounding box.
Definition: htmltbl.hxx:187
sal_uInt16 GetInhCellSpace(sal_uInt16 nCol, sal_uInt16 nColSpan) const
Definition: htmltbl.hxx:387
sal_uInt8 m_nPass1Done
Reference-values for.
Definition: htmltbl.hxx:210
void SetMayBeInFlyFrame(bool bSet)
Definition: htmltbl.hxx:337
void AddBorderWidth(sal_uLong &rMin, sal_uLong &rMax, sal_uLong &rAbsMin, sal_uInt16 nCol, sal_uInt16 nColSpan, bool bSwBorders=true) const
Definition: htmltbl.cxx:274
sal_uLong GetMax() const
Definition: htmltbl.hxx:281
sal_uInt16 m_nCols
Column count.
Definition: htmltbl.hxx:182
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...
Definition: htmltbl.cxx:217
void AutoLayoutPass2(sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail, sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace, sal_uInt16 nParentInhSpace)
Definition: htmltbl.cxx:1059
sal_uInt16 m_nRelLeftFill
Width of boxes relative to alignment.
Definition: htmltbl.hxx:190
void SetMustNotResize(bool bSet)
Definition: htmltbl.hxx:291
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)
Definition: htmltbl.cxx:1557
SwHTMLTableLayoutColumn * GetColumn(sal_uInt16 nCol) const
Definition: htmltbl.hxx:399
bool m_bDelayedResizeRecalc
Param for delayed Resize.
Definition: htmltbl.hxx:225
bool m_bColsOption
Table has a COLS-option.
Definition: htmltbl.hxx:215
sal_uInt16 GetBrowseWidthByTabFrame(const SwTabFrame &rTabFrame) const
Calculates available width by table-frame.
Definition: htmltbl.cxx:343
sal_uInt16 m_nRightMargin
Space to left margin (from paragraph).
Definition: htmltbl.hxx:185
const SwDoc & GetDoc() const
Definition: htmltbl.hxx:236
bool IsTopTable() const
Definition: htmltbl.hxx:288
tools::Long GetBrowseWidthMin() const
Definition: htmltbl.hxx:426
bool m_bColTags
Table has COL/COLGRP tags.
Definition: htmltbl.hxx:216
sal_uInt16 m_nRelRightFill
of tables in tables.
Definition: htmltbl.hxx:191
sal_uInt16 m_nWidthOption
Width of table (in Twips or %).
Definition: htmltbl.hxx:195
sal_uInt16 m_nRows
Row count.
Definition: htmltbl.hxx:181
void Resize_(sal_uInt16 nAbsAvail, bool bRecalc)
Definition: htmltbl.cxx:1673
sal_uInt16 m_nRelTabWidth
Relative width of table.
Definition: htmltbl.hxx:193
bool m_bBordersChanged
Borders have been changed.
Definition: htmltbl.hxx:222
bool m_bUseRelWidth
SwTable gets relative width.
Definition: htmltbl.hxx:218
const SwTable * m_pSwTable
SwTable (Top-Table only).
Definition: htmltbl.hxx:176
sal_uInt16 m_nInhAbsRightSpace
that was added to boxes.
Definition: htmltbl.hxx:188
SwTwips m_nRightBorderWidth
Definition: htmltbl.hxx:202
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.
Definition: htmltbl.cxx:1697
void SetBoxWidth(SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan) const
Definition: htmltbl.cxx:287
sal_uInt16 GetRightCellSpace(sal_uInt16 nCol, sal_uInt16 nColSpan, bool bSwBorders=true) const
Definition: htmltbl.cxx:250
SwHTMLTableLayoutCell * GetCell(sal_uInt16 nRow, sal_uInt16 nCol) const
Definition: htmltbl.hxx:415
sal_uInt16 m_nBorder
Definition: htmltbl.hxx:198
bool HasColsOption() const
Definition: htmltbl.hxx:285
sal_uInt16 m_nDelayedResizeAbsAvail
Param for delayed Resize.
Definition: htmltbl.hxx:207
DECL_LINK(DelayedResize_Impl, Timer *, void)
sal_uInt16 GetColCount() const
Definition: htmltbl.hxx:330
bool HaveBordersChanged() const
Definition: htmltbl.hxx:335
sal_uInt16 m_nCellPadding
Space to contents (in Twips).
Definition: htmltbl.hxx:196
sal_uInt16 GetBrowseWidthByTable(const SwDoc &rDoc) const
Calculates available width by the table-frame or static GetBrowseWidth if no layout exists.
Definition: htmltbl.cxx:375
void SetExportable(bool bSet)
Definition: htmltbl.hxx:332
sal_uInt16 GetBorder() const
Definition: htmltbl.hxx:327
bool m_bMustNotRecalc
Table may not be adapted to its contents.
Definition: htmltbl.hxx:227
std::vector< std::unique_ptr< SwHTMLTableLayoutColumn > > m_aColumns
Definition: htmltbl.hxx:173
SvxAdjust m_eTableAdjust
Alignment of table.
Definition: htmltbl.hxx:213
sal_uInt16 GetRowCount() const
Definition: htmltbl.hxx:329
void GetAvail(sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16 &rAbsAvail, sal_uInt16 &rRelAvail) const
Definition: htmltbl.cxx:301
void SetMustResize(bool bSet)
Definition: htmltbl.hxx:290
SwTwips m_nLeftBorderWidth
Line strength of outer border, or rather the space needed for it as calculated by Netscape.
Definition: htmltbl.hxx:201
void SetInhBorderWidths(sal_uInt16 nLeft, sal_uInt16 nRight)
Definition: htmltbl.hxx:431
bool IsExportable() const
Definition: htmltbl.hxx:333
sal_uInt16 m_nLeftMargin
Space to left margin (from paragraph).
Definition: htmltbl.hxx:184
bool m_bPercentWidthOption
Width is given in percent.
Definition: htmltbl.hxx:217
static sal_uInt16 GetBrowseWidthByVisArea(const SwDoc &rDoc)
Definition: htmltbl.cxx:314
sal_uLong m_nMin
Minimal width of table (Twips).
Definition: htmltbl.hxx:178
void SetColumn(std::unique_ptr< SwHTMLTableLayoutColumn > pCol, sal_uInt16 nCol)
Definition: htmltbl.hxx:410
const SwStartNode * GetAnyBoxStartNode() const
Definition: htmltbl.cxx:391
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)
Definition: htmltbl.cxx:152
bool MayBeInFlyFrame() const
Definition: htmltbl.hxx:338
std::vector< std::unique_ptr< SwHTMLTableLayoutCell > > m_aCells
Definition: htmltbl.hxx:174
sal_uInt16 GetCellPadding() const
Definition: htmltbl.hxx:325
bool m_bMustResize
Table width must be defined.
Definition: htmltbl.hxx:220
sal_uLong m_nMax
Maximal width of table (Twips).
Definition: htmltbl.hxx:179
sal_uInt16 GetWidthOption() const
For Export.
Definition: htmltbl.hxx:322
bool HasColTags() const
Definition: htmltbl.hxx:286
void BordersChanged(sal_uInt16 nAbsAvail)
Definition: htmltbl.cxx:1767
bool m_bMayBeInFlyFrame
Table could be within frame.
Definition: htmltbl.hxx:223
sal_uInt16 GetCellSpacing() const
Definition: htmltbl.hxx:326
sal_uInt16 m_nLastResizeAbsAvail
Definition: htmltbl.hxx:208
void AutoLayoutPass1()
Definition: htmltbl.cxx:443
Timer m_aResizeTimer
Timer for DelayedResize.
Definition: htmltbl.hxx:171
static sal_uInt16 GetBrowseWidth(const SwDoc &rDoc)
Calculate available width.
Definition: htmltbl.cxx:325
bool m_bMustNotResize
Table may not be resized.
Definition: htmltbl.hxx:226
sal_uInt16 m_nCellSpacing
Cell spacing (in Twips).
Definition: htmltbl.hxx:197
sal_uInt16 m_nInhRightBorderWidth
Definition: htmltbl.hxx:204
bool m_bExportable
Layout may be used for export.
Definition: htmltbl.hxx:221
sal_uInt16 m_nInhLeftBorderWidth
Definition: htmltbl.hxx:203
sal_uInt8 m_nWidthSet
the runs through loop.
Definition: htmltbl.hxx:211
SwTwips m_nBorderWidth
Definition: htmltbl.hxx:205
SwDoc & GetDoc()
Definition: node.hxx:233
Starts a section of nodes in the document model.
Definition: node.hxx:348
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:49
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:443
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:113
sal_Int32 nRef
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
sal_uIntPtr sal_uLong
SvxAdjust
#define MINLAY
Definition: swtypes.hxx:62
tools::Long SwTwips
Definition: swtypes.hxx:51
unsigned char sal_uInt8