This commit is contained in:
ElenaSubbotina
2019-08-24 18:15:26 +03:00
parent 864c3bfdc7
commit f69180dcf6
18 changed files with 330 additions and 218 deletions

View File

@ -82,6 +82,7 @@ namespace DocFileFormat
int cp = m_document->FIB->m_RgLw97.ccpText + m_document->FIB->m_RgLw97.ccpFtn + m_document->FIB->m_RgLw97.ccpHdr;
size_t count = m_document->AnnotationsReferencePlex->Elements.size();
for (size_t index = 0; index < count; ++index)
{
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index]);
@ -92,14 +93,15 @@ namespace DocFileFormat
}
m_pXmlWriter->WriteNodeBegin( L"w:comment", TRUE );
if (atrdPre10->m_BookmarkId < 0)//-1 - easy ref (not start/end comment ref)
{
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::SizeTToWideString( index + 1 + count + 1024 ));
}
else
{
//if (atrdPre10->m_BookmarkId < 0)//-1 - easy ref (not start/end comment ref)
//{
// m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::SizeTToWideString( index + 1 + count + 1024 ));
//}
//else
//{
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::SizeTToWideString( index + 1 ));
}
//}
if (atrdPost10)
{
m_pXmlWriter->WriteAttribute( L"w:date", atrdPost10->m_nDTTM.getString());

View File

@ -1057,8 +1057,8 @@ namespace DocFileFormat
AnnotationReferenceDescriptor* atrdPre10 = static_cast<AnnotationReferenceDescriptor*>(m_document->AnnotationsReferencePlex->Elements[index - 1]);
if (atrdPre10->m_BookmarkId < 0)
index += m_document->AnnotationsReferencePlex->Elements.size() + 1024;
//if (atrdPre10->m_BookmarkId < 0)
// index += m_document->AnnotationsReferencePlex->Elements.size() + 1024;
m_pXmlWriter->WriteAttribute( L"w:id", FormatUtils::IntToWideString(index));
m_pXmlWriter->WriteNodeEnd( L"", true );