Kaydet (Commit) 420e3e21 authored tarafından Michael Stahl's avatar Michael Stahl

fix debug code in previous 3 commits

üst c2258ab6
...@@ -831,8 +831,8 @@ HTMLTableRow::HTMLTableRow( sal_uInt16 nCells ): ...@@ -831,8 +831,8 @@ HTMLTableRow::HTMLTableRow( sal_uInt16 nCells ):
pCells->push_back( new HTMLTableCell ); pCells->push_back( new HTMLTableCell );
} }
OSL_ENSURE( nCells==pCells->Count(), OSL_ENSURE(nCells == pCells->size(),
"Zellenzahl in neuer HTML-Tabellenzeile stimmt nicht" ); "wrong Cell count in new HTML table row");
} }
HTMLTableRow::~HTMLTableRow() HTMLTableRow::~HTMLTableRow()
...@@ -871,16 +871,16 @@ void HTMLTableRow::Expand( sal_uInt16 nCells, sal_Bool bOneCell ) ...@@ -871,16 +871,16 @@ void HTMLTableRow::Expand( sal_uInt16 nCells, sal_Bool bOneCell )
nColSpan--; nColSpan--;
} }
OSL_ENSURE( nCells==pCells->Count(), OSL_ENSURE(nCells == pCells->size(),
"Zellenzahl in expandierter HTML-Tabellenzeile stimmt nicht" ); "wrong Cell count in expanded HTML table row");
} }
void HTMLTableRow::Shrink( sal_uInt16 nCells ) void HTMLTableRow::Shrink( sal_uInt16 nCells )
{ {
OSL_ENSURE( nCells < pCells->Count(), "Anzahl Zellen falsch" ); OSL_ENSURE(nCells < pCells->size(), "number of cells too large");
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
sal_uInt16 nEnd = pCells->Count(); sal_uInt16 nEnd = pCells->size();
#endif #endif
// The colspan of empty cells at the end has to be fixed to the new // The colspan of empty cells at the end has to be fixed to the new
// number of cells. // number of cells.
...@@ -902,7 +902,7 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells ) ...@@ -902,7 +902,7 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
for( i=nCells; i<nEnd; i++ ) for( i=nCells; i<nEnd; i++ )
{ {
HTMLTableCell *pCell = (*pCells)[i]; HTMLTableCell *pCell = &(*pCells)[i];
OSL_ENSURE( pCell->GetRowSpan() == 1, OSL_ENSURE( pCell->GetRowSpan() == 1,
"RowSpan von zu loesender Zelle ist falsch" ); "RowSpan von zu loesender Zelle ist falsch" );
OSL_ENSURE( pCell->GetColSpan() == nEnd - i, OSL_ENSURE( pCell->GetColSpan() == nEnd - i,
...@@ -2084,13 +2084,11 @@ sal_uInt16 HTMLTable::GetBorderWidth( const SvxBorderLine& rBLine, ...@@ -2084,13 +2084,11 @@ sal_uInt16 HTMLTable::GetBorderWidth( const SvxBorderLine& rBLine,
inline HTMLTableCell *HTMLTable::GetCell( sal_uInt16 nRow, inline HTMLTableCell *HTMLTable::GetCell( sal_uInt16 nRow,
sal_uInt16 nCell ) const sal_uInt16 nCell ) const
{ {
OSL_ENSURE( nRow<pRows->Count(), OSL_ENSURE(nRow < pRows->size(), "invalid row index in HTML table");
"ungueltiger Zeilen-Index in HTML-Tabelle" );
return (*pRows)[nRow].GetCell( nCell ); return (*pRows)[nRow].GetCell( nCell );
} }
SvxAdjust HTMLTable::GetInheritedAdjust() const SvxAdjust HTMLTable::GetInheritedAdjust() const
{ {
SvxAdjust eAdjust = (nCurCol<nCols ? ((*pColumns)[nCurCol]).GetAdjust() SvxAdjust eAdjust = (nCurCol<nCols ? ((*pColumns)[nCurCol]).GetAdjust()
...@@ -2141,8 +2139,8 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts, ...@@ -2141,8 +2139,8 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts,
for( i=0; i<nRows; i++ ) for( i=0; i<nRows; i++ )
(*pRows)[i].Expand( nColsReq, i<nCurRow ); (*pRows)[i].Expand( nColsReq, i<nCurRow );
nCols = nColsReq; nCols = nColsReq;
OSL_ENSURE( pColumns->Count()==nCols, OSL_ENSURE(pColumns->size() == nCols,
"Anzahl der Spalten nach Expandieren stimmt nicht" ); "wrong number of columns after expanding");
} }
if( nColsReq > nFilledCols ) if( nColsReq > nFilledCols )
nFilledCols = nColsReq; nFilledCols = nColsReq;
...@@ -2154,7 +2152,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts, ...@@ -2154,7 +2152,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts,
for( i=nRows; i<nRowsReq; i++ ) for( i=nRows; i<nRowsReq; i++ )
pRows->push_back( new HTMLTableRow(nCols) ); pRows->push_back( new HTMLTableRow(nCols) );
nRows = nRowsReq; nRows = nRowsReq;
OSL_ENSURE( nRows==pRows->Count(), "Zeilenzahl in Insert stimmt nicht" ); OSL_ENSURE(nRows == pRows->size(), "wrong number of rows in Insert");
} }
// Testen, ob eine Ueberschneidung vorliegt und diese // Testen, ob eine Ueberschneidung vorliegt und diese
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment