DocFormatReader - same bugs fix

This commit is contained in:
ElenaSubbotina
2016-12-16 12:28:17 +03:00
parent 2ff5bd5910
commit 652fc292af
5 changed files with 134 additions and 170 deletions

View File

@ -318,9 +318,12 @@ namespace DocFileFormat
iter->Arguments[0] = (iter->Arguments[0] == 0 ? 2 : 0);
}
RELEASEOBJECT( jc );
jc = new XMLTools::XMLElement<wchar_t>( _T( "w:jc" ) );
XMLTools::XMLAttribute<wchar_t> jcVal( _T( "w:val" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ).c_str() );
jc->AppendAttribute( jcVal );
jc = new XMLTools::XMLElement<wchar_t>( L"w:jc" );
if ( jc )
{
XMLTools::XMLAttribute<wchar_t> jcVal( L"w:val", FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ).c_str() );
jc->AppendAttribute( jcVal );
}
}
break;
@ -485,8 +488,8 @@ namespace DocFileFormat
// appendValueElement(numPr, "ilvl", "0", true);
// }
//}
}
break;
}
break;
case sprmOldPChgTabs: //tabs
@ -663,28 +666,24 @@ namespace DocFileFormat
//append indent
if ( ind.GetAttributeCount() > 0 )
{
_pPr->AppendChild( ind );
}
{
_pPr->AppendChild( ind );
}
if ( spacing.GetAttributeCount() > 0 )//append spacing
{
_pPr->AppendChild( spacing );
}
{
_pPr->AppendChild( spacing );
}
if ( jc ) //append justification
{
_pPr->AppendChild( *jc );
RELEASEOBJECT( jc );
}
_pPr->AppendChild( *jc );
RELEASEOBJECT( jc );
}
if ( numPr.GetChildCount() > 0 )//append numPr
{
_pPr->AppendChild( numPr );
}
{
_pPr->AppendChild( numPr );
}
if ( pBdr.GetChildCount() > 0 ) //append borders