diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /khtml/rendering/render_table.cpp | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/rendering/render_table.cpp')
-rw-r--r-- | khtml/rendering/render_table.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp index 2cf1bf1f9..8fc1d7246 100644 --- a/khtml/rendering/render_table.cpp +++ b/khtml/rendering/render_table.cpp @@ -99,12 +99,12 @@ void RenderTable::setStyle(RenderStyle *_style) if ( !tableLayout || style()->tableLayout() != oldTableLayout ) { delete tableLayout; - // According to the CSS2 spec, you only use fixed table layout if an - // explicit width is specified on the table. Auto width implies auto table layout. + // According to the CSS2 spec, you only use fixed table tqlayout if an + // explicit width is specified on the table. Auto width implies auto table tqlayout. if (style()->tableLayout() == TFIXED && !style()->width().isVariable()) { tableLayout = new FixedTableLayout(this); #ifdef DEBUG_LAYOUT - kdDebug( 6040 ) << "using fixed table layout" << endl; + kdDebug( 6040 ) << "using fixed table tqlayout" << endl; #endif } else tableLayout = new AutoTableLayout(this); @@ -113,7 +113,7 @@ void RenderTable::setStyle(RenderStyle *_style) short RenderTable::lineHeight(bool b) const { - // Inline tables are replaced elements. Otherwise, just pass off to + // Inline tables are tqreplaced elements. Otherwise, just pass off to // the base class. if (isReplaced()) return height()+marginTop()+marginBottom(); @@ -122,7 +122,7 @@ short RenderTable::lineHeight(bool b) const short RenderTable::baselinePosition(bool b) const { - // Inline tables are replaced elements. Otherwise, just pass off to + // Inline tables are tqreplaced elements. Otherwise, just pass off to // the base class. if (isReplaced()) return height()+marginTop()+marginBottom(); @@ -263,7 +263,7 @@ void RenderTable::calcWidth() calcHorizontalMargins(style()->marginLeft(),style()->marginRight(),availableWidth); } -void RenderTable::layout() +void RenderTable::tqlayout() { KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); @@ -271,13 +271,13 @@ void RenderTable::layout() if (posChildNeedsLayout() && !normalChildNeedsLayout() && !selfNeedsLayout()) { // All we have to is lay out our positioned objects. - layoutPositionedObjects(true); + tqlayoutPositionedObjects(true); setNeedsLayout(false); return; } if (markedForRepaint()) { - repaintDuringLayout(); + tqrepaintDuringLayout(); setMarkedForRepaint(false); } @@ -292,29 +292,29 @@ void RenderTable::layout() tCaption->setChildNeedsLayout(true); // the optimization below doesn't work since the internal table - // layout could have changed. we need to add a flag to the table - // layout that tells us if something has changed in the min max + // tqlayout could have changed. we need to add a flag to the table + // tqlayout that tells us if something has changed in the min max // calculations to do it correctly. // if ( oldWidth != m_width || columns.size() + 1 != columnPos.size() ) - tableLayout->layout(); + tableLayout->tqlayout(); #ifdef DEBUG_LAYOUT - kdDebug( 6040 ) << renderName() << "(Table)::layout1() width=" << width() << ", marginLeft=" << marginLeft() << " marginRight=" << marginRight() << endl; + kdDebug( 6040 ) << renderName() << "(Table)::tqlayout1() width=" << width() << ", marginLeft=" << marginLeft() << " marginRight=" << marginRight() << endl; #endif setCellWidths(); - // layout child objects + // tqlayout child objects int calculatedHeight = 0; RenderObject *child = firstChild(); while( child ) { // FIXME: What about a form that has a display value that makes it a table section? if ( child->needsLayout() && !(child->element() && child->element()->id() == ID_FORM) ) - child->layout(); + child->tqlayout(); if ( child->isTableSection() ) { static_cast<RenderTableSection *>(child)->calcRowHeight(); - calculatedHeight += static_cast<RenderTableSection *>(child)->layoutRows( 0 ); + calculatedHeight += static_cast<RenderTableSection *>(child)->tqlayoutRows( 0 ); } child = child->nextSibling(); } @@ -346,7 +346,7 @@ void RenderTable::layout() else if (h.isPercent()) th += calcPercentageHeight(h); - // layout rows + // tqlayout rows if ( th > calculatedHeight ) { // we have to redistribute that height to get the constraint correctly // just force the first body to the height needed @@ -354,7 +354,7 @@ void RenderTable::layout() // accordingly. For now this should be good enough if (firstBody) { firstBody->calcRowHeight(); - firstBody->layoutRows( th - calculatedHeight ); + firstBody->tqlayoutRows( th - calculatedHeight ); } else if (!style()->htmlHacks()) { // Completely empty tables (with no sections or anything) should at least honor specified height @@ -394,12 +394,12 @@ void RenderTable::layout() if (canvas()->pagedMode()) { RenderObject *child = firstChild(); - // relayout taking real position into account + // retqlayout taking real position into account while( child ) { if ( !(child->element() && child->element()->id() == ID_FORM) ) { child->setNeedsLayout(true); - child->layout(); - if (child->containsPageBreak()) setContainsPageBreak(true); + child->tqlayout(); + if (child->tqcontainsPageBreak()) setContainsPageBreak(true); if (child->needsPageClear()) setNeedsPageClear(true); } child = child->nextSibling(); @@ -410,7 +410,7 @@ void RenderTable::layout() // table can be containing block of positioned elements. // ### only pass true if width or height changed. - layoutPositionedObjects( true ); + tqlayoutPositionedObjects( true ); m_overflowHeight = m_height; @@ -1078,7 +1078,7 @@ void RenderTableSection::addCell( RenderTableCell *cell, RenderTableRow *row ) int nCols = columns.size(); // ### mozilla still seems to do the old HTML way, even for strict DTD - // (see the annotation on table cell layouting in the CSS specs and the testcase below: + // (see the annotation on table cell tqlayouting in the CSS specs and the testcase below: // <TABLE border> // <TR><TD>1 <TD rowspan="2">2 <TD>3 <TD>4 // <TR><TD colspan="2">5 @@ -1246,7 +1246,7 @@ void RenderTableSection::calcRowHeight() o->setChildNeedsLayout(true, false); } if (pagedMode) cell->setNeedsLayout(true); - cell->layoutIfNeeded(); + cell->tqlayoutIfNeeded(); } ch = cell->style()->height().width(0); @@ -1261,7 +1261,7 @@ void RenderTableSection::calcRowHeight() if ( pos > rowPos[r+1] ) rowPos[r+1] = pos; - // find out the baseline + // tqfind out the baseline EVerticalAlign va = cell->style()->verticalAlign(); if (va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SUPER || va == SUB) @@ -1294,7 +1294,7 @@ void RenderTableSection::calcRowHeight() } } -int RenderTableSection::layoutRows( int toAdd ) +int RenderTableSection::tqlayoutRows( int toAdd ) { int rHeight; int rindx; @@ -1306,14 +1306,14 @@ int RenderTableSection::layoutRows( int toAdd ) m_width = table()->contentWidth(); if (markedForRepaint()) { - repaintDuringLayout(); + tqrepaintDuringLayout(); setMarkedForRepaint(false); } if (toAdd && totalRows && (rowPos[totalRows] || !nextSibling())) { int totalHeight = rowPos[totalRows] + toAdd; -// qDebug("layoutRows: totalHeight = %d", totalHeight ); +// qDebug("tqlayoutRows: totalHeight = %d", totalHeight ); int dh = toAdd; int totalPercent = 0; @@ -1443,7 +1443,7 @@ int RenderTableSection::layoutRows( int toAdd ) cell->setCellPercentageHeight(kMax(0, rHeight - cell->borderTop() - cell->paddingTop() - cell->borderBottom() - cell->paddingBottom())); - cell->layoutIfNeeded(); + cell->tqlayoutIfNeeded(); } { @@ -1507,7 +1507,7 @@ bool RenderTableSection::flexCellChildren(RenderObject* p) const while (o) { if (!o->isText() && o->style()->height().isPercent()) { if (o->isWidget()) { - // cancel resizes from transitory relayouts + // cancel resizes from transitory retqlayouts static_cast<RenderWidget *>(o)->cancelPendingResize(); } o->setNeedsLayout(true, false); @@ -1608,7 +1608,7 @@ int RenderTableSection::highestPosition(bool includeOverflowInterior, bool inclu } // Search from first_row to last_row for the row containing y -static unsigned int findRow(unsigned int first_row, unsigned int last_row, +static unsigned int tqfindRow(unsigned int first_row, unsigned int last_row, const TQMemArray<int> &rowPos, int y) { unsigned int under = first_row; @@ -1628,7 +1628,7 @@ static unsigned int findRow(unsigned int first_row, unsigned int last_row, return under; } -static void findRowCover(unsigned int &startrow, unsigned int &endrow, +static void tqfindRowCover(unsigned int &startrow, unsigned int &endrow, const TQMemArray<int> &rowPos, int min_y, int max_y) { @@ -1656,9 +1656,9 @@ static void findRowCover(unsigned int &startrow, unsigned int &endrow, } // Binary search for startrow - startrow = findRow(startrow, endrow, rowPos, min_y); + startrow = tqfindRow(startrow, endrow, rowPos, min_y); // Binary search for endrow - endrow = findRow(startrow, endrow, rowPos, max_y) + 1; + endrow = tqfindRow(startrow, endrow, rowPos, max_y) + 1; if (endrow > totalRows) endrow = totalRows; } @@ -1682,7 +1682,7 @@ void RenderTableSection::paint( PaintInfo& pI, int tx, int ty ) int os = 2*maximalOutlineSize(pI.phase); unsigned int startrow = 0; unsigned int endrow = totalRows; - findRowCover(startrow, endrow, rowPos, y - os - ty - kMax(cbsw21, os), y + h + os - ty + kMax(cbsw2, os)); + tqfindRowCover(startrow, endrow, rowPos, y - os - ty - kMax(cbsw21, os), y + h + os - ty + kMax(cbsw2, os)); // A binary search is probably not worthwhile for coloumns unsigned int startcol = 0; @@ -1877,11 +1877,11 @@ static RenderTableCell *seekCell(RenderTableSection *section, int row, int col) * a renderer. * @return the element or @p base if no suitable element found. */ -static NodeImpl *findLastSelectableNode(NodeImpl *base) +static NodeImpl *tqfindLastSelectableNode(NodeImpl *base) { NodeImpl *last = base; // Look for last text/cdata node that has a renderer, - // or last childless replaced element + // or last childless tqreplaced element while ( last && !(last->renderer() && ((last->nodeType() == Node::TEXT_NODE || last->nodeType() == Node::CDATA_SECTION_NODE) || (last->renderer()->isReplaced() && !last->renderer()->lastChild())))) @@ -1920,7 +1920,7 @@ FindSelectionResult RenderTableSection::checkSelectionPoint( int _x, int _y, int // else if (_y >= _ty + height()) save_last = true; // Find the row containing the pointer - int row_idx = findRow(0, totalRows, rowPos, _y - _ty); + int row_idx = tqfindRow(0, totalRows, rowPos, _y - _ty); int col_idx; if ( style()->direction() == LTR ) { @@ -1967,7 +1967,7 @@ FindSelectionResult RenderTableSection::checkSelectionPoint( int _x, int _y, int NodeImpl *element = cell->element(); if (!element) return SelectionPointBefore; - element = findLastSelectableNode(element); + element = tqfindLastSelectableNode(element); state.m_lastNode = element; state.m_lastOffset = element->maxOffset(); @@ -2082,7 +2082,7 @@ void RenderTableRow::addChild(RenderObject *child, RenderObject *beforeChild) section()->setNeedCellRecalc(); } -void RenderTableRow::layout() +void RenderTableRow::tqlayout() { KHTMLAssert( needsLayout() ); KHTMLAssert( minMaxKnown() ); @@ -2095,18 +2095,18 @@ void RenderTableRow::layout() if (pagedMode) { cell->setNeedsLayout(true); int oldHeight = child->height(); - cell->layout(); - if (oldHeight > 0 && child->containsPageBreak() && child->height() != oldHeight) + cell->tqlayout(); + if (oldHeight > 0 && child->tqcontainsPageBreak() && child->height() != oldHeight) section()->addSpaceAt(child->yPos()+1, child->height() - oldHeight); } else if ( child->needsLayout() ) { if (markedForRepaint()) cell->setMarkedForRepaint( true ); cell->calcVerticalMargins(); - cell->layout(); + cell->tqlayout(); cell->setCellTopExtra(0); cell->setCellBottomExtra(0); - if (child->containsPageBreak()) setContainsPageBreak(true); + if (child->tqcontainsPageBreak()) setContainsPageBreak(true); } } child = child->nextSibling(); @@ -2298,9 +2298,9 @@ void RenderTableCell::setWidth( int width ) } } -void RenderTableCell::layout() +void RenderTableCell::tqlayout() { - layoutBlock( m_widthChanged ); + tqlayoutBlock( m_widthChanged ); m_widthChanged = false; } @@ -2319,9 +2319,9 @@ bool RenderTableCell::requiresLayer() const { return /* style()->opacity() < 1.0f || */ hasOverflowClip() || isRelPositioned(); } -void RenderTableCell::repaintRectangle(int x, int y, int w, int h, Priority p, bool f) +void RenderTableCell::tqrepaintRectangle(int x, int y, int w, int h, Priority p, bool f) { - RenderBlock::repaintRectangle(x, y, w, h + _topExtra + _bottomExtra, p, f); + RenderBlock::tqrepaintRectangle(x, y, w, h + _topExtra + _bottomExtra, p, f); } bool RenderTableCell::absolutePosition(int &xPos, int &yPos, bool f) const @@ -2800,7 +2800,7 @@ public: static void addBorderStyle(TQValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue) { - if (!borderValue.exists() || borderStyles.contains(borderValue)) + if (!borderValue.exists() || borderStyles.tqcontains(borderValue)) return; TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin(); |