Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _HTMLTBL_HXX
30 : : #define _HTMLTBL_HXX
31 : :
32 : :
33 : : #include <vcl/timer.hxx>
34 : : #include <editeng/svxenum.hxx>
35 : :
36 : : #include "swtypes.hxx"
37 : : #include "node.hxx" // For SwStartNode
38 : :
39 : :
40 : : class SwTableBox;
41 : : class SwTable;
42 : : class SwHTMLTableLayout;
43 : : class SwDoc;
44 : : class SwFrmFmt;
45 : :
46 : : #define HTMLTABLE_RESIZE_NOW (ULONG_MAX)
47 : :
48 : : class SwHTMLTableLayoutCnts
49 : : {
50 : : SwHTMLTableLayoutCnts *pNext; // The next content.
51 : :
52 : : // Only one of the following two pointers may be set!
53 : : SwTableBox *pBox; // A Box.
54 : : SwHTMLTableLayout *pTable; // A "table within a table".
55 : :
56 : : // During first run there are still no boxes. In this case
57 : : // pStartNode is used instead of pBox.
58 : : const SwStartNode *pStartNode;
59 : :
60 : : // The following counters indicate how often a pass has been
61 : : // done for this content. Therefore they are compared against
62 : : // a reference value. If 255 is reached the continue with 0.
63 : : // This avoids reinitialization on every resize.
64 : : sal_uInt8 nPass1Done; // How many times has Pass 1 been called?
65 : : sal_uInt8 nWidthSet; // How many times has the width been set?
66 : :
67 : : sal_Bool bNoBreakTag; // <NOBR>-Tag over complete content.
68 : :
69 : : public:
70 : :
71 : : SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
72 : : sal_Bool bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
73 : :
74 : : ~SwHTMLTableLayoutCnts();
75 : :
76 : 0 : void SetTableBox( SwTableBox *pBx ) { pBox = pBx; }
77 : 0 : SwTableBox *GetTableBox() const { return pBox; }
78 : :
79 : 0 : SwHTMLTableLayout *GetTable() const { return pTable; }
80 : :
81 : : const SwStartNode *GetStartNode() const;
82 : :
83 : : // Calculation of next node.
84 : 0 : SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
85 : :
86 : 0 : void SetWidthSet( sal_uInt8 nRef ) { nWidthSet = nRef; }
87 : 0 : sal_Bool IsWidthSet( sal_uInt8 nRef ) const { return nRef==nWidthSet; }
88 : :
89 : 0 : void SetPass1Done( sal_uInt8 nRef ) { nPass1Done = nRef; }
90 : 0 : sal_Bool IsPass1Done( sal_uInt8 nRef ) const { return nRef==nPass1Done; }
91 : :
92 : 0 : sal_Bool HasNoBreakTag() const { return bNoBreakTag; }
93 : : };
94 : :
95 : : class SwHTMLTableLayoutCell
96 : : {
97 : : SwHTMLTableLayoutCnts *pContents; // Content of cell.
98 : :
99 : : sal_uInt16 nRowSpan; // ROWSPAN of cell.
100 : : sal_uInt16 nColSpan; // COLSPAN of cell.
101 : : sal_uInt16 nWidthOption;// Given width of cell in Twip or %.
102 : :
103 : : sal_Bool bPrcWidthOption : 1;// nWidth is %-value.
104 : : sal_Bool bNoWrapOption : 1; // NOWRAP-option.
105 : :
106 : : public:
107 : :
108 : : SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
109 : : sal_uInt16 nRSpan, sal_uInt16 nCSpan,
110 : : sal_uInt16 nWidthOpt, sal_Bool bPrcWdthOpt,
111 : : sal_Bool nNWrapOpt );
112 : :
113 : : ~SwHTMLTableLayoutCell();
114 : :
115 : : // Set or get content of a cell.
116 : 0 : void SetContents( SwHTMLTableLayoutCnts *pCnts ) { pContents = pCnts; }
117 : 0 : SwHTMLTableLayoutCnts *GetContents() const { return pContents; }
118 : :
119 : : inline void SetProtected();
120 : :
121 : : // Set or get ROWSPAN/COLSPAN of cell.
122 : 0 : void SetRowSpan( sal_uInt16 nRSpan ) { nRowSpan = nRSpan; }
123 : 0 : sal_uInt16 GetRowSpan() const { return nRowSpan; }
124 : 0 : sal_uInt16 GetColSpan() const { return nColSpan; }
125 : :
126 : 0 : sal_uInt16 GetWidthOption() const { return nWidthOption; }
127 : 0 : sal_Bool IsPrcWidthOption() const { return bPrcWidthOption; }
128 : :
129 : 0 : sal_Bool HasNoWrapOption() const { return bNoWrapOption; }
130 : : };
131 : :
132 : : class SwHTMLTableLayoutColumn
133 : : {
134 : :
135 : : // Interim values of AutoLayoutPass1,
136 : : sal_uLong nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
137 : :
138 : : // Results of AutoLayoutPass1
139 : : sal_uLong nMin, nMax;
140 : :
141 : : // Results of Pass 2.
142 : : sal_uInt16 nAbsColWidth; // In Twips.
143 : : sal_uInt16 nRelColWidth; // In Twips or relative to USHRT_MAX.
144 : :
145 : : sal_uInt16 nWidthOption; // Options of <COL> or <TD>/<TH>.
146 : :
147 : : sal_Bool bRelWidthOption : 1;
148 : : sal_Bool bLeftBorder : 1;
149 : :
150 : : public:
151 : :
152 : : SwHTMLTableLayoutColumn( sal_uInt16 nColWidthOpt, sal_Bool bRelColWidthOpt,
153 : : sal_Bool bLBorder );
154 : :
155 : 0 : ~SwHTMLTableLayoutColumn() {}
156 : :
157 : : inline void MergeCellWidthOption( sal_uInt16 nWidth, sal_Bool bPrc );
158 : : inline void SetWidthOption( sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest );
159 : :
160 : 0 : sal_uInt16 GetWidthOption() const { return nWidthOption; }
161 : 0 : sal_Bool IsRelWidthOption() const { return bRelWidthOption; }
162 : :
163 : : inline void MergeMinMaxNoAlign( sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin );
164 : 0 : sal_uLong GetMinNoAlign() const { return nMinNoAlign; }
165 : 0 : sal_uLong GetMaxNoAlign() const { return nMaxNoAlign; }
166 : 0 : sal_uLong GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
167 : : inline void ClearPass1Info( sal_Bool bWidthOpt );
168 : :
169 : : inline void SetMinMax( sal_uLong nMin, sal_uLong nMax );
170 : 0 : void SetMax( sal_uLong nVal ) { nMax = nVal; }
171 : 0 : void AddToMin( sal_uLong nVal ) { nMin += nVal; }
172 : 0 : void AddToMax( sal_uLong nVal ) { nMax += nVal; }
173 : 0 : sal_uLong GetMin() const { return nMin; }
174 : 0 : sal_uLong GetMax() const { return nMax; }
175 : :
176 : 0 : void SetAbsColWidth( sal_uInt16 nWidth ) { nAbsColWidth = nWidth; }
177 : 0 : sal_uInt16 GetAbsColWidth() const { return nAbsColWidth; }
178 : :
179 : 0 : void SetRelColWidth( sal_uInt16 nWidth ) { nRelColWidth = nWidth; }
180 : 0 : sal_uInt16 GetRelColWidth() const { return nRelColWidth; }
181 : :
182 : 0 : sal_Bool HasLeftBorder() const { return bLeftBorder; }
183 : : };
184 : :
185 : : class SwHTMLTableLayout
186 : : {
187 : : Timer aResizeTimer; // Timer for DelayedResize.
188 : :
189 : : SwHTMLTableLayoutColumn **aColumns;
190 : : SwHTMLTableLayoutCell **aCells;
191 : :
192 : : const SwTable *pSwTable; // SwTable (Top-Table only).
193 : : SwTableBox *pLeftFillerBox; // Left filler-box (table in table only).
194 : : SwTableBox *pRightFillerBox; // Right filler-box (table in Table only).
195 : :
196 : : sal_uLong nMin; // Minimal width of table (Twips).
197 : : sal_uLong nMax; // Maximal width of table (Twips).
198 : :
199 : : sal_uInt16 nRows; // Row count.
200 : : sal_uInt16 nCols; // Column count.
201 : :
202 : : sal_uInt16 nLeftMargin; // Space to left margin (from paragraph).
203 : : sal_uInt16 nRightMargin; // Space to left margin (from paragraph).
204 : :
205 : : sal_uInt16 nInhAbsLeftSpace; // Space inherited from surrounding box
206 : : sal_uInt16 nInhAbsRightSpace; // that was added to boxes.
207 : :
208 : : sal_uInt16 nRelLeftFill; // Width of boxes relative to alignment
209 : : sal_uInt16 nRelRightFill; // of tables in tables.
210 : :
211 : : sal_uInt16 nRelTabWidth; // Relative width of table.
212 : :
213 : : sal_uInt16 nWidthOption; // Width of table (in Twips oder %).
214 : : sal_uInt16 nCellPadding; // Space to contents (in Twips).
215 : : sal_uInt16 nCellSpacing; // Cell spacing (in Twips).
216 : : sal_uInt16 nBorder; // Line strength of outer border, or rather the
217 : : // space needed for it as calculated by Netscape.
218 : :
219 : : sal_uInt16 nLeftBorderWidth;
220 : : sal_uInt16 nRightBorderWidth;
221 : : sal_uInt16 nInhLeftBorderWidth;
222 : : sal_uInt16 nInhRightBorderWidth;
223 : : sal_uInt16 nBorderWidth;
224 : :
225 : : sal_uInt16 nDelayedResizeAbsAvail; // Param for delayed Resize.
226 : : sal_uInt16 nLastResizeAbsAvail;
227 : :
228 : : sal_uInt8 nPass1Done; // Reference-values for
229 : : sal_uInt8 nWidthSet; // the runs through loop.
230 : :
231 : : SvxAdjust eTableAdjust; // Alignment of table.
232 : :
233 : : sal_Bool bColsOption : 1; // Table has a COLS-option.
234 : : sal_Bool bColTags : 1; // Tabelle has COL/COLGRP-tags.
235 : : sal_Bool bPrcWidthOption : 1; // Width is given in percent.
236 : : sal_Bool bUseRelWidth : 1; // SwTable gets relative width.
237 : :
238 : : sal_Bool bMustResize : 1; // Table width must be defined.
239 : : sal_Bool bExportable : 1; // Layout may be used for export.
240 : : sal_Bool bBordersChanged : 1; // Borders have been changed.
241 : : sal_Bool bMayBeInFlyFrame : 1; // Table could be within frame.
242 : :
243 : : sal_Bool bDelayedResizeRecalc : 1; // Param for delayed Resize.
244 : : sal_Bool bMustNotResize : 1; // Table may not be resized.
245 : : sal_Bool bMustNotRecalc : 1; // Table may not be adapted to its contents.
246 : :
247 : : void AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax, sal_uLong& rAbsMin,
248 : : sal_uInt16 nCol, sal_uInt16 nColSpan,
249 : : sal_Bool bSwBorders=sal_True ) const;
250 : : void SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
251 : :
252 : : const SwStartNode *GetAnyBoxStartNode() const;
253 : : SwFrmFmt *FindFlyFrmFmt() const;
254 : 0 : const SwDoc *GetDoc() const { return GetAnyBoxStartNode()->GetDoc(); }
255 : :
256 : 0 : void ClearPass1Info() { nMin = nMax = 0; }
257 : :
258 : : void _Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
259 : :
260 : : DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
261 : :
262 : : static sal_uInt16 GetBrowseWidthByVisArea( const SwDoc& rDoc );
263 : : public:
264 : :
265 : : SwHTMLTableLayout( const SwTable *pSwTbl,
266 : : sal_uInt16 nRows, sal_uInt16 nCols, sal_Bool bColsOpt, sal_Bool ColTgs,
267 : : sal_uInt16 nWidth, sal_Bool bPrcWidth, sal_uInt16 nBorderOpt,
268 : : sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust,
269 : : sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth,
270 : : sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth,
271 : : sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth );
272 : :
273 : : ~SwHTMLTableLayout();
274 : :
275 : : sal_uInt16 GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
276 : : sal_Bool bSwBorders=sal_True ) const;
277 : : sal_uInt16 GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
278 : : sal_Bool bSwBorders=sal_True ) const;
279 : : inline sal_uInt16 GetInhCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
280 : :
281 : : inline void SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight );
282 : :
283 : :
284 : : void GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16& rAbsAvail,
285 : : sal_uInt16& rRelAvail ) const;
286 : :
287 : : void AutoLayoutPass1();
288 : : void AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail,
289 : : sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace,
290 : : sal_uInt16 nParentInhSpace );
291 : : void SetWidths( sal_Bool bCallPass2=sal_False, sal_uInt16 nAbsAvail=0,
292 : : sal_uInt16 nRelAvail=0, sal_uInt16 nAbsLeftSpace=0,
293 : : sal_uInt16 nAbsRightSpace=0,
294 : : sal_uInt16 nParentInhSpace=0 );
295 : :
296 : : inline SwHTMLTableLayoutColumn *GetColumn( sal_uInt16 nCol ) const;
297 : : inline void SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol );
298 : :
299 : : inline SwHTMLTableLayoutCell *GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const;
300 : : inline void SetCell( SwHTMLTableLayoutCell *pCell, sal_uInt16 nRow, sal_uInt16 nCol );
301 : :
302 : 0 : void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; }
303 : 0 : void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; }
304 : :
305 : 0 : sal_uLong GetMin() const { return nMin; }
306 : 0 : sal_uLong GetMax() const { return nMax; }
307 : 0 : sal_uInt16 GetRelLeftFill() const { return nRelLeftFill; }
308 : 0 : sal_uInt16 GetRelRightFill() const { return nRelRightFill; }
309 : :
310 : : inline long GetBrowseWidthMin() const;
311 : :
312 : 0 : sal_Bool HasColsOption() const { return bColsOption; }
313 : 0 : sal_Bool HasColTags() const { return bColTags; }
314 : :
315 : 0 : sal_Bool IsTopTable() const { return pSwTable != 0; }
316 : :
317 : 0 : void SetMustResize( sal_Bool bSet ) { bMustResize = bSet; }
318 : 0 : void SetMustNotResize( sal_Bool bSet ) { bMustNotResize = bSet; }
319 : 0 : void SetMustNotRecalc( sal_Bool bSet ) { bMustNotRecalc = bSet; }
320 : :
321 : : // Recalculation of table widths for available width that has been passed.
322 : : // - If bRecalc is set, contents of boxes are included into calculation.
323 : : // - If bForce is set, table will be recalculated even if this was
324 : : // disallowed by SetMustNotResize.
325 : : // - If nDelay > 0 the calculation is delayed accordingly. Resizing calls
326 : : // occuring during delay-time are ignored, but the delay may be counted
327 : : // under certain circumstances.
328 : : // - If nDelay == HTMLTABLE_RESIZE_NOW, resize immediately and do not
329 : : // consider any resize-calls that might possibly be in order.
330 : : // - The return value indicates whether the table has been changed.
331 : : sal_Bool Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False, sal_Bool bForce=sal_False,
332 : : sal_uLong nDelay=0 );
333 : :
334 : : void BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
335 : :
336 : : // Calculate available width. This works only if a layout or a
337 : : // ViewShell exists. Otherwise returns 0.
338 : : // This is needed by HTML-filter because it doesn't have access to the layout.)
339 : : static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc );
340 : :
341 : : // Calculates available width by table-frame.
342 : : sal_uInt16 GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
343 : :
344 : : // Calculates available width by the table-frame or
345 : : // static GetBrowseWidth if no layout exists.
346 : : sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const;
347 : :
348 : : // For Export.
349 : 0 : sal_uInt16 GetWidthOption() const { return nWidthOption; }
350 : 0 : sal_Bool HasPrcWidthOption() const { return bPrcWidthOption; }
351 : :
352 : 0 : sal_uInt16 GetCellPadding() const { return nCellPadding; }
353 : 0 : sal_uInt16 GetCellSpacing() const { return nCellSpacing; }
354 : 0 : sal_uInt16 GetBorder() const { return nBorder; }
355 : :
356 : 0 : sal_uInt16 GetRowCount() const { return nRows; }
357 : 0 : sal_uInt16 GetColCount() const { return nCols; }
358 : :
359 : 0 : void SetExportable( sal_Bool bSet ) { bExportable = bSet; }
360 : 0 : sal_Bool IsExportable() const { return bExportable; }
361 : :
362 : 0 : sal_Bool HaveBordersChanged() const { return bBordersChanged; }
363 : :
364 : 0 : void SetMayBeInFlyFrame( sal_Bool bSet ) { bMayBeInFlyFrame = bSet; }
365 : 0 : sal_Bool MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
366 : : };
367 : :
368 : 0 : inline void SwHTMLTableLayoutCell::SetProtected()
369 : : {
370 : 0 : nRowSpan = 1;
371 : 0 : nColSpan = 1;
372 : :
373 : 0 : pContents = 0;
374 : 0 : }
375 : :
376 : 0 : inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin,
377 : : sal_uLong nCMax, sal_uLong nAbsMin )
378 : : {
379 [ # # ]: 0 : if( nCMin > nMinNoAlign )
380 : 0 : nMinNoAlign = nCMin;
381 [ # # ]: 0 : if( nCMax > nMaxNoAlign )
382 : 0 : nMaxNoAlign = nCMax;
383 [ # # ]: 0 : if( nAbsMin > nAbsMinNoAlign )
384 : 0 : nAbsMinNoAlign = nAbsMin;
385 : 0 : }
386 : :
387 : 0 : inline void SwHTMLTableLayoutColumn::ClearPass1Info( sal_Bool bWidthOpt )
388 : : {
389 : 0 : nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY;
390 : 0 : nMin = nMax = 0;
391 [ # # ]: 0 : if( bWidthOpt )
392 : : {
393 : 0 : nWidthOption = 0;
394 : 0 : bRelWidthOption = sal_False;
395 : : }
396 : 0 : }
397 : :
398 : 0 : inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
399 : : sal_uInt16 nWidth, sal_Bool bRel )
400 : : {
401 [ # # ][ # # ]: 0 : if( !nWidthOption ||
[ # # ]
402 : : (bRel==bRelWidthOption && nWidthOption < nWidth) )
403 : : {
404 : 0 : nWidthOption = nWidth;
405 : 0 : bRelWidthOption = bRel;
406 : : }
407 : 0 : }
408 : :
409 : 0 : inline void SwHTMLTableLayoutColumn::SetMinMax( sal_uLong nMn, sal_uLong nMx )
410 : : {
411 : 0 : nMin = nMn;
412 : 0 : nMax = nMx;
413 : 0 : }
414 : :
415 : 0 : inline sal_uInt16 SwHTMLTableLayout::GetInhCellSpace( sal_uInt16 nCol,
416 : : sal_uInt16 nColSpan ) const
417 : : {
418 : 0 : sal_uInt16 nSpace = 0;
419 [ # # ]: 0 : if( nCol==0 )
420 : 0 : nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsLeftSpace);
421 [ # # ]: 0 : if( nCol+nColSpan==nCols )
422 : 0 : nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsRightSpace);
423 : :
424 : 0 : return nSpace;
425 : : }
426 : :
427 : 0 : inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( sal_uInt16 nCol ) const
428 : : {
429 : 0 : return aColumns[nCol];
430 : : }
431 : :
432 : 0 : inline void SwHTMLTableLayoutColumn::SetWidthOption(
433 : : sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest )
434 : : {
435 [ # # ][ # # ]: 0 : if( bTest && bRelWidthOption==bRelWidth )
436 : : {
437 [ # # ]: 0 : if( nWidth > nWidthOption )
438 : 0 : nWidthOption = nWidth;
439 : : }
440 : : else
441 : 0 : nWidthOption = nWidth;
442 : 0 : bRelWidthOption = bRelWidth;
443 : 0 : }
444 : :
445 : 0 : inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol )
446 : : {
447 : 0 : aColumns[nCol] = pCol;
448 : 0 : }
449 : :
450 : 0 : inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const
451 : : {
452 : 0 : return aCells[nRow*nCols+nCol];
453 : : }
454 : :
455 : 0 : inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell,
456 : : sal_uInt16 nRow, sal_uInt16 nCol )
457 : : {
458 : 0 : aCells[nRow*nCols+nCol] = pCell;
459 : 0 : }
460 : :
461 : 0 : inline long SwHTMLTableLayout::GetBrowseWidthMin() const
462 : : {
463 [ # # ][ # # ]: 0 : return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth );
464 : : }
465 : :
466 : 0 : void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight )
467 : : {
468 : 0 : nInhLeftBorderWidth = nLeft;
469 : 0 : nInhRightBorderWidth = nRight;
470 : 0 : }
471 : :
472 : :
473 : : #endif
474 : :
475 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|