Files
core/ASCOfficeDocFile/DocDocxConverter/ListTable.cpp
Alexey.Musinov 9ea51f5678 выпиливание boost'a
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52920 954022d7-b5bf-4e40-9824-e11837661b57
2016-05-20 22:33:45 +03:00

40 lines
1.1 KiB
C++

#include "stdafx.h"
#include "ListTable.h"
namespace DocFileFormat
{
ListTable::~ListTable()
{
for_each( this->listData.begin(), this->listData.end(), DeleteDynamicObject() );
}
ListTable::ListTable( FileInformationBlock* fib, IStream* tableStream )
{
if ( fib->m_FibWord97.lcbPlfLst > 0 )
{
VirtualStreamReader reader( tableStream, fib->m_FibWord97.fcPlfLst );
//the ListTable is not a real plex:
//it starts with a count, followed by the array of LSTF structs,
//followed by the array of LVLF structs
//read count
short count = reader.ReadInt16();
//read the LSTF structs
for ( int i = 0; i < count; i++ )
{
listData.push_back( new ListData( &reader, ListData::VARIABLE_LENGTH ) );
}
//read the LVLF structs
for ( list<ListData*>::iterator iter = listData.begin(); iter != listData.end(); iter++ )
{
for ( unsigned int j = 0; j < (*iter)->rglvl->size(); j++ )
{
(*iter)->rglvl->operator []( j ) = new ListLevel( &reader, ListData::VARIABLE_LENGTH );
}
}
}
}
}