diff options
Diffstat (limited to 'sw/source/filter/ww8/WW8TableInfo.cxx')
-rw-r--r-- | sw/source/filter/ww8/WW8TableInfo.cxx | 288 |
1 files changed, 144 insertions, 144 deletions
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 0400babd7380..ca8205dce3be 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,9 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <iostream> +#include <iostream> #include <set> -#include <stdio.h> +#include <stdio.h> #include "WW8TableInfo.hxx" #include "fmtfsize.hxx" #include "attributeoutputbase.hxx" @@ -41,7 +41,7 @@ #include "ndtxt.hxx" #include "dbgoutsw.hxx" -namespace ww8 +namespace ww8 { // WW8TableNodeInfoInner @@ -92,7 +92,7 @@ void WW8TableNodeInfoInner::setShadowsAfter(sal_uInt32 nShadowsAfter) void WW8TableNodeInfoInner::setEndOfLine(bool bEndOfLine) { - mbEndOfLine = bEndOfLine; + mbEndOfLine = bEndOfLine; } void WW8TableNodeInfoInner::setEndOfCell(bool bEndOfCell) @@ -169,10 +169,10 @@ bool WW8TableNodeInfoInner::isFirstInTable() const const SwNode * WW8TableNodeInfoInner::getNode() const { const SwNode * pResult = NULL; - + if (mpParent != NULL) pResult = mpParent->getNode(); - + return pResult; } @@ -180,14 +180,14 @@ TableBoxVectorPtr WW8TableNodeInfoInner::getTableBoxesOfRow() { TableBoxVectorPtr pResult(new TableBoxVector); - WW8TableCellGrid::Pointer_t pCellGrid = + WW8TableCellGrid::Pointer_t pCellGrid = mpParent->getParent()->getCellGridForTable(getTable(), false); if (pCellGrid.get() == NULL) { const SwTableLine * pTabLine = getTableBox()->GetUpper(); const SwTableBoxes & rTblBoxes = pTabLine->GetTabBoxes(); - + sal_uInt8 nBoxes = rTblBoxes.Count(); for ( sal_uInt8 n = 0; n < nBoxes; n++ ) { @@ -209,27 +209,27 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase) OSL_ENSURE(pFmt,"Impossible"); if (!pFmt) return pResult; - + const SwFmtFrmSize &rSize = pFmt->GetFrmSize(); unsigned long nTblSz = static_cast<unsigned long>(rSize.GetWidth()); - + sal_uInt32 nPageSize = 0; bool bRelBoxSize = false; - + rBase.GetTablePageSize ( this, nPageSize, bRelBoxSize ); - + SwTwips nSz = 0; - Widths::const_iterator aWidthsEnd = pWidths->end(); - for ( Widths::const_iterator aIt = pWidths->begin(); - aIt != aWidthsEnd; + Widths::const_iterator aWidthsEnd = pWidths->end(); + for ( Widths::const_iterator aIt = pWidths->begin(); + aIt != aWidthsEnd; aIt++) { nSz += *aIt; SwTwips nCalc = nSz; if ( bRelBoxSize ) nCalc = ( nCalc * nPageSize ) / nTblSz; - + pResult->push_back( nCalc ); } @@ -240,11 +240,11 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow() { WidthsPtr pWidths; - WW8TableCellGrid::Pointer_t pCellGrid = + WW8TableCellGrid::Pointer_t pCellGrid = mpParent->getParent()->getCellGridForTable(getTable(), false); if (pCellGrid.get() == NULL) - { + { const SwTableBox * pTabBox = getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes(); @@ -254,7 +254,7 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow() sal_uInt32 nBoxes = rTabBoxes.Count(); if ( nBoxes > 32 ) nBoxes = 32; - + for (sal_uInt32 n = 0; n < nBoxes; n++) { const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt(); @@ -273,9 +273,9 @@ RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow() { RowSpansPtr pResult(new RowSpans); - WW8TableCellGrid::Pointer_t pCellGrid = + WW8TableCellGrid::Pointer_t pCellGrid = mpParent->getParent()->getCellGridForTable(getTable(), false); - + if (pCellGrid.get() == NULL) { const SwTableBox * pTabBox = getTableBox(); @@ -285,7 +285,7 @@ RowSpansPtr WW8TableNodeInfoInner::getRowSpansOfRow() sal_uInt32 nBoxes = rTabBoxes.Count(); if (nBoxes > 32) nBoxes = 32; - + for (sal_uInt32 n = 0; n < nBoxes; ++n) { pResult->push_back(rTabBoxes[n]->getRowSpan()); @@ -315,7 +315,7 @@ const SwRect & WW8TableNodeInfoInner::getRect() const string WW8TableNodeInfoInner::toString() const { static char buffer[256]; - snprintf(buffer, sizeof(buffer), + snprintf(buffer, sizeof(buffer), "<tableinner depth=\"%" SAL_PRIuUINT32 "\"" " cell=\"%" SAL_PRIuUINT32 "\"" " row=\"%" SAL_PRIuUINT32 "\"" @@ -330,15 +330,15 @@ string WW8TableNodeInfoInner::toString() const mnShadowsBefore, mnShadowsAfter, mbVertMerge ? "yes" : "no"); - + return string(buffer); } // WW8TableTextNodeInfo -WW8TableNodeInfo::WW8TableNodeInfo(WW8TableInfo * pParent, +WW8TableNodeInfo::WW8TableNodeInfo(WW8TableInfo * pParent, const SwNode * pNode) : mpParent(pParent), - mnDepth(0), + mnDepth(0), mpNode(pNode), mpNext(NULL), mpNextNode(NULL) @@ -352,38 +352,38 @@ WW8TableNodeInfo::~WW8TableNodeInfo() ::std::string WW8TableNodeInfo::toString() const { static char buffer[1024]; - snprintf(buffer, sizeof(buffer), + snprintf(buffer, sizeof(buffer), "<tableNodeInfo p=\"%p\" depth=\"%" SAL_PRIuUINT32 "\">" ,this, getDepth()); ::std::string sResult(buffer); - + Inners_t::const_iterator aIt(mInners.begin()); Inners_t::const_iterator aEnd(mInners.end()); - + while (aIt != aEnd) { WW8TableNodeInfoInner::Pointer_t pInner = aIt->second; sResult += pInner->toString(); - + aIt++; } -#ifdef DEBUG +#ifdef DEBUG sResult += dbg_out(*mpNode); #endif sResult += "</tableNodeInfo>"; - + return sResult; } void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth) { mnDepth = nDepth; - + Inners_t::iterator aIt = mInners.find(mnDepth); if (aIt == mInners.end()) mInners[mnDepth] = WW8TableNodeInfoInner::Pointer_t(new WW8TableNodeInfoInner(this)); - + mInners[mnDepth]->setDepth(mnDepth); } @@ -393,7 +393,7 @@ void WW8TableNodeInfo::setEndOfLine(bool bEndOfLine) pInner->setEndOfLine(bEndOfLine); #ifdef DEBUG - ::std::clog << "<endOfLine depth=\"" << mnDepth << "\">" + ::std::clog << "<endOfLine depth=\"" << mnDepth << "\">" << toString() << "</endOfLine>" << ::std::endl; #endif } @@ -402,9 +402,9 @@ void WW8TableNodeInfo::setEndOfCell(bool bEndOfCell) { WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth); pInner->setEndOfCell(bEndOfCell); - + #ifdef DEBUG - ::std::clog << "<endOfCell depth=\"" << mnDepth << "\">" + ::std::clog << "<endOfCell depth=\"" << mnDepth << "\">" << toString() << "</endOfCell>" << ::std::endl; #endif } @@ -416,9 +416,9 @@ void WW8TableNodeInfo::setFirstInTable(bool bFirstInTable) pInner->setFirstInTable(bFirstInTable); #ifdef DEBUG - ::std::clog << "<firstInTable depth=\"" << mnDepth << "\">" + ::std::clog << "<firstInTable depth=\"" << mnDepth << "\">" << toString() << "</firstInTable>" << ::std::endl; -#endif +#endif } void WW8TableNodeInfo::setVertMerge(bool bVertMerge) @@ -426,10 +426,10 @@ void WW8TableNodeInfo::setVertMerge(bool bVertMerge) WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth); pInner->setVertMerge(bVertMerge); - + #ifdef DEBUG - ::std::clog << "<vertMerge depth=\"" << mnDepth << "\">" + ::std::clog << "<vertMerge depth=\"" << mnDepth << "\">" << toString() << "</vertMerge>" << ::std::endl; #endif } @@ -449,8 +449,8 @@ void WW8TableNodeInfo::setNext(WW8TableNodeInfo * pNext) mpNext = pNext; #ifdef DEBUG - ::std::clog << "<setnext><from>" << toString() << "</from><to>" - << pNext->toString() << "</to></setnext>" + ::std::clog << "<setnext><from>" << toString() << "</from><to>" + << pNext->toString() << "</to></setnext>" << ::std::endl; #endif } @@ -494,7 +494,7 @@ sal_uInt32 WW8TableNodeInfo::getDepth() const { if (mInners.size() > 0) return mInners.begin()->second->getDepth(); - + return mnDepth; } @@ -542,7 +542,7 @@ sal_uInt32 WW8TableNodeInfo::getCell() const { return getInnerForDepth(mnDepth)->getCell(); } - + sal_uInt32 WW8TableNodeInfo::getRow() const { return getInnerForDepth(mnDepth)->getRow(); @@ -556,26 +556,26 @@ const ww8::WW8TableNodeInfo::Inners_t & WW8TableNodeInfo::getInners() const const WW8TableNodeInfoInner::Pointer_t WW8TableNodeInfo::getFirstInner() const { WW8TableNodeInfoInner::Pointer_t pResult; - + if (mInners.size() > 0) pResult = mInners.begin()->second; - + return pResult; } const WW8TableNodeInfoInner::Pointer_t WW8TableNodeInfo::getInnerForDepth(sal_uInt32 nDepth) const { WW8TableNodeInfoInner::Pointer_t pResult; - + Inners_t::const_iterator aIt = mInners.find(nDepth); if (aIt != mInners.end()) { pResult = aIt->second; } - + return pResult; } - + // WW8TableInfo WW8TableInfo::WW8TableInfo() @@ -597,37 +597,37 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable) SwRect aRect = aTableCellInfo.getRect(); #ifdef DEBUG - static char sBuffer[1024]; + static char sBuffer[1024]; ::std::clog << "<CellFrm>" << ::std::endl; - snprintf(sBuffer, sizeof(sBuffer), + snprintf(sBuffer, sizeof(sBuffer), "<rect top=\"%ld\" bottom=\"%ld\" left=\"%ld\" right=\"%ld\"/>", aRect.Top(), aRect.Bottom(), aRect.Left(), aRect.Right()); ::std::clog << sBuffer << ::std::endl; #endif const SwTableBox * pTableBox = aTableCellInfo.getTableBox(); const SwStartNode * pSttNd = pTableBox->GetSttNd(); - + if (pSttNd != NULL) { SwPaM aPam(*pSttNd, 0); - + bool bDone = false; do { SwNode & rNode = aPam.GetPoint()->nNode.GetNode(); insertTableNodeInfo(&rNode, pTable, pTableBox, 0, 0, 1, & aRect); - + if (rNode.IsEndNode()) { SwEndNode * pEndNode = rNode.GetEndNode(); SwStartNode * pTmpSttNd = pEndNode->StartOfSectionNode(); - + if (pTmpSttNd == pSttNd) - bDone = true; + bDone = true; } - + aPam.GetPoint()->nNode++; } while (!bDone); @@ -645,12 +645,12 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable) void WW8TableInfo::processSwTable(const SwTable * pTable) { -#ifdef DEBUG +#ifdef DEBUG ::std::clog << "<processSwTable>" << ::std::endl; #endif WW8TableNodeInfo * pPrev = NULL; - + SwFrmFmt * pFrmFmt = pTable->GetFrmFmt(); if (pFrmFmt != NULL && pTable->IsTblComplex()) { @@ -664,21 +664,21 @@ void WW8TableInfo::processSwTable(const SwTable * pTable) else { const SwTableLines & rLines = pTable->GetTabLines(); - + for (USHORT n = 0; n < rLines.Count(); n++) { const SwTableLine * pLine = rLines[n]; - + pPrev = processTableLine(pTable, pLine, n, 1, pPrev); } - + } if (pPrev != NULL) { SwTableNode * pTableNode = pTable->GetTableNode(); SwEndNode * pEndNode = pTableNode->EndOfSectionNode(); - + pPrev->setNextNode(pEndNode); } #ifdef DEBUG @@ -686,28 +686,28 @@ void WW8TableInfo::processSwTable(const SwTable * pTable) #endif } -WW8TableNodeInfo * -WW8TableInfo::processTableLine(const SwTable * pTable, - const SwTableLine * pTableLine, +WW8TableNodeInfo * +WW8TableInfo::processTableLine(const SwTable * pTable, + const SwTableLine * pTableLine, sal_uInt32 nRow, sal_uInt32 nDepth, WW8TableNodeInfo * pPrev) { #ifdef DEBUG - ::std::clog << "<processTableLine row=\"" << nRow << "\" depth=\"" + ::std::clog << "<processTableLine row=\"" << nRow << "\" depth=\"" << nDepth << "\">" << ::std::endl; #endif const SwTableBoxes & rBoxes = pTableLine->GetTabBoxes(); - + WW8TableNodeInfo::Pointer_t pTextNodeInfo; - + for (USHORT n = 0; n < rBoxes.Count(); n++) { const SwTableBox * pBox = rBoxes[n]; - + pPrev = processTableBox(pTable, pBox, nRow, n, nDepth, n == rBoxes.Count() - 1, pPrev); - } - + } + #ifdef DEBUG ::std::clog << "</processTableLine>" << ::std::endl; #endif @@ -724,22 +724,22 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, sal_uInt32 nDepth) { #ifdef DEBUG - ::std::clog << "<processTableBoxLines depth=\"" << nDepth + ::std::clog << "<processTableBoxLines depth=\"" << nDepth << "\" row=\"" << nRow << "\" cell=\"" << nCell << "\">" << ::std::endl; #endif const SwTableLines & rLines = pBox->GetTabLines(); WW8TableNodeInfo::Pointer_t pNodeInfo; - + if (rLines.Count() > 0) { for (sal_uInt32 n = 0; n < rLines.Count(); n++) { const SwTableLine * pLine = rLines[n]; const SwTableBoxes & rBoxes = pLine->GetTabBoxes(); - + for (USHORT nBox = 0; nBox < rBoxes.Count(); nBox++) - pNodeInfo = processTableBoxLines(rBoxes[nBox], pTable, pBoxToSet, nRow, nCell, nDepth); + pNodeInfo = processTableBoxLines(rBoxes[nBox], pTable, pBoxToSet, nRow, nCell, nDepth); } } else @@ -748,21 +748,21 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, const SwEndNode * pEndNd = pSttNd->EndOfSectionNode(); SwPaM aPaM(*pSttNd, 0); SwPaM aEndPaM(*pEndNd, 0); - + bool bDone = false; - while (!bDone) + while (!bDone) { SwNode & rNode = aPaM.GetPoint()->nNode.GetNode(); - - pNodeInfo = insertTableNodeInfo(&rNode, pTable, pBoxToSet, nRow, nCell, nDepth); - + + pNodeInfo = insertTableNodeInfo(&rNode, pTable, pBoxToSet, nRow, nCell, nDepth); + if (aPaM.GetPoint()->nNode == aEndPaM.GetPoint()->nNode) bDone = true; else aPaM.GetPoint()->nNode++; } } - + #ifdef DEBUG ::std::clog << "</processTableBoxLines>" << ::std::endl; #endif @@ -771,8 +771,8 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, } WW8TableNodeInfo * -WW8TableInfo::processTableBox(const SwTable * pTable, - const SwTableBox * pBox, +WW8TableInfo::processTableBox(const SwTable * pTable, + const SwTableBox * pBox, sal_uInt32 nRow, sal_uInt32 nCell, sal_uInt32 nDepth, @@ -790,30 +790,30 @@ WW8TableInfo::processTableBox(const SwTable * pTable, WW8TableNodeInfo::Pointer_t pEndOfCellInfo; if (rLines.Count() > 0) - { + { pNodeInfo = processTableBoxLines(pBox, pTable, pBox, nRow, nCell, nDepth); pNodeInfo->setEndOfCell(true); if (bEndOfLine) pNodeInfo->setEndOfLine(true); - + for (sal_uInt32 n = 0; n < rLines.Count(); n++) { const SwTableLine * pLine = rLines[n]; - + pPrev = processTableLine(pTable, pLine, n, 1, pPrev); } } else - { + { SwPaM aPaM(*pSttNd, 0); - + bool bDone = false; sal_uInt32 nDepthInsideCell = 0; - + do { SwNode & rNode = aPaM.GetPoint()->nNode.GetNode(); - + if (rNode.IsStartNode()) { if (nDepthInsideCell > 0) @@ -821,24 +821,24 @@ WW8TableInfo::processTableBox(const SwTable * pTable, nDepthInsideCell++; } - + pNodeInfo = insertTableNodeInfo(&rNode, pTable, pBox, nRow, nCell, nDepth); - + if (pPrev != NULL) pPrev->setNext(pNodeInfo.get()); - + pPrev = pNodeInfo.get(); - + if (nDepthInsideCell == 1 && rNode.IsTxtNode()) pEndOfCellInfo = pNodeInfo; - + if (rNode.IsEndNode()) { nDepthInsideCell--; if (nDepthInsideCell == 0 && pEndOfCellInfo.get() == NULL) pEndOfCellInfo = pNodeInfo; - + SwEndNode * pEndNode = rNode.GetEndNode( ); SwStartNode * pTmpSttNd = pEndNode->StartOfSectionNode(); if (pTmpSttNd == pSttNd) @@ -851,12 +851,12 @@ WW8TableInfo::processTableBox(const SwTable * pTable, if (pEndOfCellInfo.get() != NULL) { - pEndOfCellInfo->setEndOfCell(true); - + pEndOfCellInfo->setEndOfCell(true); + if (bEndOfLine) pEndOfCellInfo->setEndOfLine(true); } - } + } #ifdef DEBUG ::std::clog << "</processTableBox>" << ::std::endl; @@ -866,8 +866,8 @@ WW8TableInfo::processTableBox(const SwTable * pTable, } WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo -(const SwNode * pNode, - const SwTable * pTable, +(const SwNode * pNode, + const SwTable * pTable, const SwTableBox * pTableBox, sal_uInt32 nRow, sal_uInt32 nCell, @@ -875,10 +875,10 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo SwRect * pRect) { WW8TableNodeInfo::Pointer_t pNodeInfo = getTableNodeInfo(pNode); - + if (pNodeInfo.get() == NULL) { - pNodeInfo = + pNodeInfo = WW8TableNodeInfo::Pointer_t(new WW8TableNodeInfo(this, pNode)); mMap.insert(Map_t::value_type(pNode, pNodeInfo)); } @@ -904,7 +904,7 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo if (pRect) { WW8TableCellGrid::Pointer_t pCellGrid = getCellGridForTable(pTable); - + pCellGrid->insert(*pRect, pNodeInfo.get()); pNodeInfo->setRect(*pRect); } @@ -941,26 +941,26 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::getTableNodeInfo { WW8TableNodeInfo::Pointer_t pResult; Map_t::iterator aIt = mMap.find(pNode); - + if (aIt != mMap.end()) pResult = (*aIt).second; - + return pResult; } const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode) { const SwNode * pResult = NULL; - + WW8TableNodeInfo::Pointer_t pNodeInfo = getTableNodeInfo(pNode); - + if (pNodeInfo.get() != NULL) { WW8TableNodeInfo * pNextInfo = pNodeInfo->getNext(); - + if (pNextInfo != NULL) pResult = pNextInfo->getNode(); - else + else { const SwNode * pNextNode = pNodeInfo->getNextNode(); @@ -968,7 +968,7 @@ const SwNode * WW8TableInfo::getNextNode(const SwNode * pNode) pResult = pNextNode; } } - + return pResult; } @@ -1032,8 +1032,8 @@ bool CellInfo::operator < (const CellInfo & aCellInfo) const ::std::string CellInfo::toString() const { static char sBuffer[256]; - - snprintf(sBuffer, sizeof(sBuffer), + + snprintf(sBuffer, sizeof(sBuffer), "<cellinfo left=\"%ld\"" " right=\"%ld\"" " top=\"%ld\"" @@ -1044,7 +1044,7 @@ bool CellInfo::operator < (const CellInfo & aCellInfo) const top(), bottom(), m_pNodeInfo); - + return sBuffer; } @@ -1087,7 +1087,7 @@ WW8TableCellGridRow::Pointer_t WW8TableCellGrid::getRow(long nTop, bool bCreate) } } else - pResult = m_aRows[nTop]; + pResult = m_aRows[nTop]; return pResult; } @@ -1112,7 +1112,7 @@ CellInfoMultiSet::const_iterator WW8TableCellGrid::getCellsEnd(long nTop) return getRow(nTop)->end(); } -void WW8TableCellGrid::insert(const SwRect & rRect, +void WW8TableCellGrid::insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo, unsigned long * pFmtFrmWidth) { @@ -1149,15 +1149,15 @@ void WW8TableCellGrid::addShadowCells() SwRect aRect = aCellIt->getRect(); long nRowSpan = 1; while (aCellIt != aCellEndIt) - { + { WW8TableNodeInfo * pNodeInfo = aCellIt->getTableNodeInfo(); if (bBeginningOfCell) { RowTops_t::const_iterator aRowSpanIt(aTopsIt); - aRowSpanIt++; - - if (aRowSpanIt != getRowTopsEnd() && + aRowSpanIt++; + + if (aRowSpanIt != getRowTopsEnd() && *aRowSpanIt < aCellIt->bottom()) { aRect.Top(*aRowSpanIt); @@ -1170,30 +1170,30 @@ void WW8TableCellGrid::addShadowCells() bVertMerge = false; nRowSpan = 1; - while (aRowSpanIt != getRowTopsEnd() && + while (aRowSpanIt != getRowTopsEnd() && *aRowSpanIt < aCellIt->bottom()) { aRowSpanIt++; nRowSpan++; } - + if (pNodeInfo != NULL) pRowSpans->push_back(nRowSpan); else pRowSpans->push_back(-nRowSpan); } - + if (pNodeInfo != NULL) { pNodeInfo->setVertMerge(bVertMerge); } aCellIt++; - + bBeginningOfCell = (aRect.Left() != aCellIt->left()); aRect = aCellIt->getRect(); } - + WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt); if (pRow.get() != NULL) pRow->setRowSpans(pRowSpans); @@ -1217,7 +1217,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells() CellInfoMultiSet::const_iterator aCellEndIt = getCellsEnd(*aTopsIt); GridColsPtr pWidths(new Widths); TableBoxVectorPtr pTableBoxes(new TableBoxVector); - + sal_uInt32 nShadows = 0; sal_uInt32 nCell = 0; bool bBeginningOfCell = true; @@ -1267,7 +1267,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells() if (bBeginningOfCell) { pWidths->push_back(aCellIt->getFmtFrmWidth()); - + if (pNodeInfo != NULL) pTableBoxes->push_back(pNodeInfo->getTableBox()); else @@ -1292,7 +1292,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells() } pLastNodeInfo->setShadowsAfter(nShadows); - + if (pEndOfCellInfo == NULL) { pEndOfCellInfo = pLastNodeInfo; @@ -1300,7 +1300,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells() pEndOfCellInfo->setEndOfCell(true); pLastNodeInfo->setEndOfLine(true); - + WW8TableCellGridRow::Pointer_t pRow(getRow(*aTopsIt)); pRow->setTableBoxVector(pTableBoxes); pRow->setWidths(pWidths); @@ -1390,7 +1390,7 @@ string WW8TableCellGrid::toString() } sResult += "</WW8TableCellGrid>\n"; - + return sResult; } @@ -1398,7 +1398,7 @@ TableBoxVectorPtr WW8TableCellGrid::getTableBoxesOfRow (WW8TableNodeInfoInner * pNodeInfoInner) { TableBoxVectorPtr pResult; - WW8TableCellGridRow::Pointer_t pRow = + WW8TableCellGridRow::Pointer_t pRow = getRow(pNodeInfoInner->getRect().Top(), false); if (pRow.get() != NULL) @@ -1414,7 +1414,7 @@ WidthsPtr WW8TableCellGrid::getWidthsOfRow { GridColsPtr pResult; - WW8TableCellGridRow::Pointer_t pRow = + WW8TableCellGridRow::Pointer_t pRow = getRow(pNodeInfoInner->getRect().Top(), false); if (pRow.get() != NULL) @@ -1423,27 +1423,27 @@ WidthsPtr WW8TableCellGrid::getWidthsOfRow } return pResult; -} +} RowSpansPtr WW8TableCellGrid::getRowSpansOfRow (WW8TableNodeInfoInner * pNodeInfoInner) { RowSpansPtr pResult; - - WW8TableCellGridRow::Pointer_t pRow = + + WW8TableCellGridRow::Pointer_t pRow = getRow(pNodeInfoInner->getRect().Top(), false); if (pRow.get() != NULL) { pResult = pRow->getRowSpans(); } - + return pResult; } WW8TableCellGridRow::WW8TableCellGridRow() : m_pCellInfos(new CellInfoMultiSet) -{ +{ } WW8TableCellGridRow::~WW8TableCellGridRow() @@ -1455,8 +1455,8 @@ void WW8TableCellGridRow::insert(const CellInfo & rCellInfo) m_pCellInfos->insert(rCellInfo); #ifdef DEBUG - ::std::clog << "<gridRowInsert>" - << rCellInfo.toString() + ::std::clog << "<gridRowInsert>" + << rCellInfo.toString() << "</gridRowInsert>" << ::std::endl; #endif @@ -1479,9 +1479,9 @@ void WW8TableCellGridRow::setTableBoxVector(TableBoxVectorPtr pTableBoxVector) void WW8TableCellGridRow::setWidths(WidthsPtr pWidths) { - m_pWidths = pWidths; + m_pWidths = pWidths; } - + void WW8TableCellGridRow::setRowSpans(RowSpansPtr pRowSpans) { m_pRowSpans = pRowSpans; |