Commit 48bf4091 authored by ElenaSubbotina's avatar ElenaSubbotina

fix...

parent fd53a987
...@@ -582,7 +582,7 @@ namespace DocFileFormat ...@@ -582,7 +582,7 @@ namespace DocFileFormat
// The style id is used for a reverse reference. // The style id is used for a reverse reference.
// It can happen that the reference points to the wrong style. // It can happen that the reference points to the wrong style.
if (styleIndex != ListData::ISTD_NIL) if (styleIndex != ListData::ISTD_NIL && styleIndex < m_document->Styles->Styles->size())
{ {
m_pXmlWriter->WriteNodeBegin( L"w:pStyle", TRUE ); m_pXmlWriter->WriteNodeBegin( L"w:pStyle", TRUE );
m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex)))); m_pXmlWriter->WriteAttribute( L"w:val", FormatUtils::XmlEncode(StyleSheetMapping::MakeStyleId(m_document->Styles->Styles->at(styleIndex))));
......
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