DocFormat - fix файла с отсутствующим стилем

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@68191 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
Elen.Subbotina
2016-02-12 16:29:15 +00:00
committed by Alexander Trofimov
parent 3143829dd8
commit 049984b587

View File

@ -101,9 +101,12 @@ namespace DocFileFormat
if (_isRunStyleNeeded)
{
_currentIstd = FormatUtils::BytesToUInt16( iter->Arguments, 0, iter->argumentsSize );
appendValueElement( parent, _T( "rStyle" ), StyleSheetMapping::MakeStyleId( this->_doc->Styles->Styles->at( _currentIstd ) ).c_str(), true );
if (_currentIstd < this->_doc->Styles->Styles->size())
{
appendValueElement( parent, _T( "rStyle" ), StyleSheetMapping::MakeStyleId( this->_doc->Styles->Styles->at( _currentIstd ) ).c_str(), true );
haveStyle = TRUE;
haveStyle = TRUE;
}
}
}
break;