This commit is contained in:
Elena.Subbotina
2023-07-20 17:02:02 +03:00
parent c0ffc1dd0f
commit 57cc43371c
32 changed files with 165 additions and 164 deletions

View File

@ -37,7 +37,7 @@ namespace DocFileFormat
ParagraphPropertyExceptions::ParagraphPropertyExceptions() : PropertyExceptions(), istd(0)
{
}
ParagraphPropertyExceptions::ParagraphPropertyExceptions( const std::list<SinglePropertyModifier>& grpprl ):
ParagraphPropertyExceptions::ParagraphPropertyExceptions( const std::vector<SinglePropertyModifier>& grpprl ):
PropertyExceptions( grpprl ), istd(0)
{
}
@ -238,13 +238,11 @@ namespace DocFileFormat
//There is a SPRM that points to an offset in the data stream,
//where a list of SPRM is saved.
for ( std::list<SinglePropertyModifier>::iterator iter = grpprl->begin(); iter != grpprl->end(); iter++ )
for ( std::vector<SinglePropertyModifier>::iterator iter = grpprl->begin(); iter != grpprl->end(); iter++ )
{
SinglePropertyModifier sprm( *iter );
if( ( sprm.OpCode == sprmPHugePapx ) || ( (int)sprm.OpCode == 0x6646 ) )
if( (iter->OpCode == sprmPHugePapx ) || ( (int)iter->OpCode == 0x6646 ) )
{
unsigned int fc = FormatUtils::BytesToUInt32( sprm.Arguments, 0, sprm.argumentsSize );
unsigned int fc = FormatUtils::BytesToUInt32(iter->Arguments, 0, iter->argumentsSize );
reader = new VirtualStreamReader( dataStream, (int)fc, nWordVersion);
//parse the size of the external grpprl
@ -261,14 +259,20 @@ namespace DocFileFormat
//assign the external grpprl
RELEASEOBJECT( grpprl );
grpprl = new std::list<SinglePropertyModifier>( *(externalPx.grpprl) );
grpprl = new std::vector<SinglePropertyModifier>( *(externalPx.grpprl) );
RELEASEARRAYOBJECTS(grpprlBytes);
RELEASEOBJECT(reader)
//remove the sprmPHugePapx
grpprl->remove( sprm );
RELEASEARRAYOBJECTS( grpprlBytes );
RELEASEOBJECT( reader )
for (std::vector<SinglePropertyModifier>::iterator iter2 = grpprl->begin(); iter2 != grpprl->end(); iter2++)
{
if ((iter2->OpCode == sprmPHugePapx) || ((int)iter2->OpCode == 0x6646))
{
grpprl->erase(iter2);
break;
}
}
break;
}
}