Commit 652fc292 authored by ElenaSubbotina's avatar ElenaSubbotina

DocFormatReader - same bugs fix

parent 2ff5bd59
...@@ -318,10 +318,13 @@ namespace DocFileFormat ...@@ -318,10 +318,13 @@ namespace DocFileFormat
iter->Arguments[0] = (iter->Arguments[0] == 0 ? 2 : 0); iter->Arguments[0] = (iter->Arguments[0] == 0 ? 2 : 0);
} }
RELEASEOBJECT( jc ); RELEASEOBJECT( jc );
jc = new XMLTools::XMLElement<wchar_t>( _T( "w:jc" ) ); jc = new XMLTools::XMLElement<wchar_t>( L"w:jc" );
XMLTools::XMLAttribute<wchar_t> jcVal( _T( "w:val" ), FormatUtils::MapValueToWideString( iter->Arguments[0], &Global::JustificationCode[0][0], 10, 15 ).c_str() ); 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 ); jc->AppendAttribute( jcVal );
} }
}
break; break;
//borders //borders
...@@ -485,8 +488,8 @@ namespace DocFileFormat ...@@ -485,8 +488,8 @@ namespace DocFileFormat
} }
break; break;
//tabs
case sprmOldPChgTabs: case sprmOldPChgTabs: //tabs
case sprmPChgTabsPapx: case sprmPChgTabsPapx:
case sprmPChgTabs: case sprmPChgTabs:
{ {
...@@ -664,27 +667,23 @@ namespace DocFileFormat ...@@ -664,27 +667,23 @@ namespace DocFileFormat
_pPr->AppendChild( ind ); _pPr->AppendChild( ind );
} }
//append spacing if ( spacing.GetAttributeCount() > 0 )//append spacing
if ( spacing.GetAttributeCount() > 0 )
{ {
_pPr->AppendChild( spacing ); _pPr->AppendChild( spacing );
} }
//append justification if ( jc ) //append justification
if ( jc != NULL )
{ {
_pPr->AppendChild( *jc ); _pPr->AppendChild( *jc );
RELEASEOBJECT( jc ); RELEASEOBJECT( jc );
} }
//append numPr if ( numPr.GetChildCount() > 0 )//append numPr
if ( numPr.GetChildCount() > 0 )
{ {
_pPr->AppendChild( numPr ); _pPr->AppendChild( numPr );
} }
//append borders if ( pBdr.GetChildCount() > 0 ) //append borders
if ( pBdr.GetChildCount() > 0 )
{ {
_pPr->AppendChild( pBdr ); _pPr->AppendChild( pBdr );
} }
......
...@@ -46,8 +46,8 @@ namespace DocFileFormat ...@@ -46,8 +46,8 @@ namespace DocFileFormat
class ParagraphPropertiesMapping: public PropertiesMapping, public IMapping class ParagraphPropertiesMapping: public PropertiesMapping, public IMapping
{ {
public: public:
ParagraphPropertiesMapping( XMLTools::CStringXmlWriter* writer, ConversionContext* ctx, WordDocument* document, CharacterPropertyExceptions* paraEndChpx, bool isBidi, bool isParagraphStyleNeeded = true ); ParagraphPropertiesMapping ( XMLTools::CStringXmlWriter* writer, ConversionContext* ctx, WordDocument* document, CharacterPropertyExceptions* paraEndChpx, bool isBidi, bool isParagraphStyleNeeded = true );
ParagraphPropertiesMapping( XMLTools::CStringXmlWriter* writer, ConversionContext* ctx, WordDocument* document, CharacterPropertyExceptions* paraEndChpx, bool isBidi, SectionPropertyExceptions* sepx, int sectionNr, bool isParagraphStyleNeeded = true ); ParagraphPropertiesMapping ( XMLTools::CStringXmlWriter* writer, ConversionContext* ctx, WordDocument* document, CharacterPropertyExceptions* paraEndChpx, bool isBidi, SectionPropertyExceptions* sepx, int sectionNr, bool isParagraphStyleNeeded = true );
virtual ~ParagraphPropertiesMapping(); virtual ~ParagraphPropertiesMapping();
void Apply(IVisitable* visited); void Apply(IVisitable* visited);
...@@ -65,7 +65,6 @@ namespace DocFileFormat ...@@ -65,7 +65,6 @@ namespace DocFileFormat
bool _isParagraphStyleNeeded; bool _isParagraphStyleNeeded;
bool _isBidi; bool _isBidi;
int _isSectionPageBreak; int _isSectionPageBreak;
}; };
} }
...@@ -42,11 +42,11 @@ namespace DocFileFormat ...@@ -42,11 +42,11 @@ namespace DocFileFormat
SectionPropertyExceptions( unsigned char* bytes, int size, bool oldVersion ): SectionPropertyExceptions( unsigned char* bytes, int size, bool oldVersion ):
PropertyExceptions( bytes, size, oldVersion ), isBidi(false) PropertyExceptions( bytes, size, oldVersion ), isBidi(false)
{ {
for ( std::list<SinglePropertyModifier>::iterator iter = this->grpprl->begin(); iter != this->grpprl->end(); iter++ ) for ( std::list<SinglePropertyModifier>::iterator iter = grpprl->begin(); iter != grpprl->end(); iter++ )
{ {
SinglePropertyModifier sprm( *iter ); SinglePropertyModifier sprm( *iter );
if( sprm.OpCode == sprmSFBiDi ) if( sprm.OpCode == sprmSFBiDi && sprm.Arguments[0] != 0)
{ {
isBidi = true; isBidi = true;
} }
......
...@@ -1047,7 +1047,7 @@ namespace DocFileFormat ...@@ -1047,7 +1047,7 @@ namespace DocFileFormat
//ShapeType //ShapeType
if (NULL != pShape->GetShapeType() /* && !m_isInlineShape*/) //bullete only??? if (NULL != pShape->GetShapeType() /* && !m_isInlineShape*/) //bullete only???
{ {
VMLShapeTypeMapping oXmlMapper(m_pXmlWriter); VMLShapeTypeMapping oXmlMapper(m_pXmlWriter, m_isInlineShape);
pShape->GetShapeType()->Convert(&oXmlMapper); pShape->GetShapeType()->Convert(&oXmlMapper);
} }
} }
......
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