Partially revert "Removed dead code"
This partially reverts commit 1e2c9be36ba9f94a27b3aa73c87ceb3d52e100dc, CellInfo::toString and WW8TableCellGrid::toString is still needed with dbglevel>1.
This commit is contained in:
parent
24b6225f93
commit
3de3f1eb15
2 changed files with 107 additions and 0 deletions
|
@ -1014,6 +1014,27 @@ bool CellInfo::operator < (const CellInfo & aCellInfo) const
|
|||
return aRet;
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
::std::string CellInfo::toString() const
|
||||
{
|
||||
static char sBuffer[256];
|
||||
|
||||
snprintf(sBuffer, sizeof(sBuffer),
|
||||
"<cellinfo left=\"%ld\""
|
||||
" right=\"%ld\""
|
||||
" top=\"%ld\""
|
||||
" bottom=\"%ld\""
|
||||
" node=\"%p\"/>",
|
||||
left(),
|
||||
right(),
|
||||
top(),
|
||||
bottom(),
|
||||
m_pNodeInfo);
|
||||
|
||||
return sBuffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
WW8TableNodeInfo * WW8TableInfo::reorderByLayout(const SwTable * pTable)
|
||||
{
|
||||
WW8TableNodeInfo * pPrev = NULL;
|
||||
|
@ -1280,6 +1301,88 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells()
|
|||
return pLastNodeInfo;
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
string WW8TableCellGrid::toString()
|
||||
{
|
||||
string sResult = "<WW8TableCellGrid>";
|
||||
|
||||
RowTops_t::const_iterator aTopsIt = getRowTopsBegin();
|
||||
static char sBuffer[1024];
|
||||
while (aTopsIt != getRowTopsEnd())
|
||||
{
|
||||
sprintf(sBuffer, "<row y=\"%ld\">", *aTopsIt);
|
||||
sResult += sBuffer;
|
||||
|
||||
CellInfoMultiSet::const_iterator aCellIt = getCellsBegin(*aTopsIt);
|
||||
CellInfoMultiSet::const_iterator aCellsEnd = getCellsEnd(*aTopsIt);
|
||||
|
||||
while (aCellIt != aCellsEnd)
|
||||
{
|
||||
snprintf(sBuffer, sizeof(sBuffer), "<cellInfo top=\"%ld\" bottom=\"%ld\" left=\"%ld\" right=\"%ld\">",
|
||||
aCellIt->top(), aCellIt->bottom(), aCellIt->left(), aCellIt->right());
|
||||
sResult += sBuffer;
|
||||
|
||||
WW8TableNodeInfo * pInfo = aCellIt->getTableNodeInfo();
|
||||
if (pInfo != NULL)
|
||||
sResult += pInfo->toString();
|
||||
else
|
||||
sResult += "<shadow/>\n";
|
||||
|
||||
sResult += "</cellInfo>\n";
|
||||
++aCellIt;
|
||||
}
|
||||
|
||||
WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
|
||||
WidthsPtr pWidths = pRow->getWidths();
|
||||
if (pWidths != NULL)
|
||||
{
|
||||
sResult += "<widths>";
|
||||
|
||||
Widths::const_iterator aItEnd = pWidths->end();
|
||||
for (Widths::const_iterator aIt = pWidths->begin();
|
||||
aIt != aItEnd;
|
||||
++aIt)
|
||||
{
|
||||
if (aIt != pWidths->begin())
|
||||
sResult += ", ";
|
||||
|
||||
snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIxUINT32 "", *aIt);
|
||||
sResult += sBuffer;
|
||||
}
|
||||
|
||||
sResult += "</widths>";
|
||||
}
|
||||
|
||||
RowSpansPtr pRowSpans = pRow->getRowSpans();
|
||||
if (pRowSpans.get() != NULL)
|
||||
{
|
||||
sResult += "<rowspans>";
|
||||
|
||||
RowSpans::const_iterator aItEnd = pRowSpans->end();
|
||||
for (RowSpans::const_iterator aIt = pRowSpans->begin();
|
||||
aIt != aItEnd;
|
||||
++aIt)
|
||||
{
|
||||
if (aIt != pRowSpans->begin())
|
||||
sResult += ", ";
|
||||
|
||||
snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIxUINT32 "", *aIt);
|
||||
sResult += sBuffer;
|
||||
}
|
||||
|
||||
sResult += "</rowspans>";
|
||||
}
|
||||
|
||||
sResult += "</row>\n";
|
||||
++aTopsIt;
|
||||
}
|
||||
|
||||
sResult += "</WW8TableCellGrid>\n";
|
||||
|
||||
return sResult;
|
||||
}
|
||||
#endif
|
||||
|
||||
TableBoxVectorPtr WW8TableCellGrid::getTableBoxesOfRow
|
||||
(WW8TableNodeInfoInner * pNodeInfoInner)
|
||||
{
|
||||
|
|
|
@ -246,7 +246,9 @@ public:
|
|||
void addShadowCells();
|
||||
WW8TableNodeInfo * connectCells();
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
string toString();
|
||||
#endif
|
||||
|
||||
TableBoxVectorPtr getTableBoxesOfRow(WW8TableNodeInfoInner * pNodeInfo);
|
||||
WidthsPtr getWidthsOfRow(WW8TableNodeInfoInner * pNodeInfo);
|
||||
|
@ -352,7 +354,9 @@ public:
|
|||
m_nFmtFrmWidth = nFmtFrmWidth;
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
::std::string toString() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue