Files
core/ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXTableRowReader.h
Elen.Subbotina c026e2b9a4 codepage utf8
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62097 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 23:57:32 +03:00

52 lines
1.4 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "OOXTableCellReader.h"
#include "OOXtrPrReader.h"
#include "../RtfDocument.h"
#include "../RtfTableRow.h"
class OOXTableRowReader
{
private:
OOX::Logic::CTr *m_ooxRowTable;
public:
OOXTableRowReader(OOX::Logic::CTr *ooxRowTable)
{
m_ooxRowTable = ooxRowTable;
}
bool Parse( ReaderParameter oParam ,RtfTableRow& oOutputRow, int nCurRow, int nRowCount)
{
if (m_ooxRowTable == NULL) return false;
CcnfStyle oConditionStyle;
//с начала применяем свойства
if( m_ooxRowTable->m_oTableRowProperties )
{
OOXtrPrReader otrPrReader(m_ooxRowTable->m_oTableRowProperties);
otrPrReader.Parse( oParam, oOutputRow.m_oProperty, oConditionStyle);// может поменяться на любой condition(first row)
}
int nCellCount = m_ooxRowTable->m_nCountCell;
for( int nCurCell = 0; nCurCell < nCellCount; nCurCell++)
{
RtfTableCellPtr oNewCell( new RtfTableCell() );
OOX::Logic::CTc *ooxCell = dynamic_cast<OOX::Logic::CTc *>(m_ooxRowTable->m_arrItems[nCurCell]);
if (ooxCell)
{
OOXTableCellReader oCellReader(ooxCell);
oCellReader.Parse( oParam, *oNewCell, oConditionStyle, nCurCell, nCurRow, nCellCount, nRowCount );
//добавляем cell
oOutputRow.AddItem(oNewCell);
//свойства cell в row
oOutputRow.m_oProperty.AddItem( oNewCell->m_oProperty );
}
}
return true;
}
};