Kaydet (Commit) c353979a authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert SV_DECL_PTRARR_DEL(SwWriteTableCells) to boost::ptr_vector

üst 1940d00e
......@@ -523,11 +523,11 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt,
// die gleiche Ausrichtung besitzen, das VALIGN an der Zeile statt der
// Zelle ausgeben
sal_Int16 eRowVertOri = text::VertOrientation::NONE;
if( rCells.Count() > 1 )
if( rCells.size() > 1 )
{
for( sal_uInt16 nCell = 0; nCell<rCells.Count(); nCell++ )
for( sal_uInt16 nCell = 0; nCell<rCells.size(); nCell++ )
{
sal_Int16 eCellVertOri = rCells[nCell]->GetVertOri();
sal_Int16 eCellVertOri = rCells[nCell].GetVertOri();
if( 0==nCell )
{
eRowVertOri = eCellVertOri;
......@@ -565,8 +565,8 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt,
rWrt.IncIndentLevel(); // Inhalt von <TR>...</TR> einruecken
for( sal_uInt16 nCell = 0; nCell<rCells.Count(); nCell++ )
OutTableCell( rWrt, rCells[nCell], text::VertOrientation::NONE==eRowVertOri );
for( sal_uInt16 nCell = 0; nCell<rCells.size(); nCell++ )
OutTableCell( rWrt, &rCells[nCell], text::VertOrientation::NONE==eRowVertOri );
rWrt.DecIndentLevel(); // Inhalt von <TR>...</TR> einruecken
......
......@@ -31,6 +31,7 @@
#include <tools/solar.h>
#include <tools/color.hxx>
#include <svl/svarray.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <swdllapi.h>
......@@ -105,8 +106,7 @@ public:
sal_Bool HasPrcWidthOpt() const { return bPrcWidthOpt; }
};
typedef SwWriteTableCell *SwWriteTableCellPtr;
SV_DECL_PTRARR_DEL( SwWriteTableCells, SwWriteTableCellPtr, 5 )
typedef boost::ptr_vector<SwWriteTableCell> SwWriteTableCells;
//-----------------------------------------------------------------------
......
......@@ -41,7 +41,6 @@
using ::editeng::SvxBorderLine;
using namespace ::com::sun::star;
SV_IMPL_PTRARR( SwWriteTableCells, SwWriteTableCellPtr )
SV_IMPL_OP_PTRARR_SORT( SwWriteTableRows, SwWriteTableRowPtr )
SV_IMPL_OP_PTRARR_SORT( SwWriteTableCols, SwWriteTableColPtr )
......@@ -84,7 +83,7 @@ SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
SwWriteTableCell *pCell =
new SwWriteTableCell( pBox, nRow, nCol, nRowSpan, nColSpan,
nHeight, pBackgroundBrush );
aCells.Insert( pCell, aCells.Count() );
aCells.push_back( pCell );
return pCell;
}
......
......@@ -1535,7 +1535,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
// Horizontal spans
const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwWriteTableCell *pCell = &pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
sal_uInt16 nColSpan = pCell->GetColSpan();
if ( nColSpan > 1 )
......@@ -1905,7 +1905,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer
const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwWriteTableCell *pCell = &pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
switch( pCell->GetVertOri())
{
case text::VertOrientation::TOP:
......
......@@ -622,10 +622,10 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
SwTwips nTblSz = pFmt->GetFrmSize().GetWidth();
// Not using m_nTableDepth, which is not yet incremented here.
sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth();
m_aCells[nCurrentDepth] = pRow->GetCells().Count();
m_aCells[nCurrentDepth] = pRow->GetCells().size();
for( sal_uInt16 i = 0; i < m_aCells[nCurrentDepth]; i++ )
{
SwWriteTableCell *pCell = pRow->GetCells( )[ i ];
const SwWriteTableCell *pCell = &pRow->GetCells( )[ i ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
pTableTextNodeInfoInner->setCell( i );
......@@ -658,7 +658,7 @@ void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
const SvxBoxItem& rDefault = pFmt->GetBox( );
const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwWriteTableCell *pCell = &pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
if (pCellFmt->GetAttrSet().HasItem(RES_BOX, &pItem))
......@@ -704,7 +704,7 @@ void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwWriteTableCell *pCell = &pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
if (pCellFmt->GetAttrSet().HasItem(RES_BACKGROUND, &pItem))
......@@ -779,7 +779,7 @@ void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
const SwWriteTableRows& aRows = m_pTableWrt->GetRows( );
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwWriteTableCell *pCell = &pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
......
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