diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-17 23:27:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-18 22:51:47 +0200 |
commit | 2842c5cfb99d41b36dba52db01ca6cd37d2ef4b0 (patch) | |
tree | c74e2e8a37f57d6610684d9abbbf21386bd24194 /oox | |
parent | 7352a7c17875e5adcc4226c45f4a03e11c44ff49 (diff) |
sax, sw: try to make that maMarkStack easier to understand
In DocxAttributeOutput it's not at all obvious which mark() is supposed
to be ended by which mergeTopMarks(), so add an extra parameter to the
FastSaxSerializer functions and verify with an assertion that a LIFO
order is maintained.
Change-Id: I5a421e2fb11f15343147417fe0b9b23642c70721
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/vmlexport.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 9b42d2cfe30f..84b3737a3b6b 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -45,6 +45,9 @@ using namespace sax_fastparser; using namespace oox::vml; using namespace com::sun::star; +static const sal_Int32 Tag_Container = 44444; +static const sal_Int32 Tag_Commit = 44445; + VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr pSerializer, VMLTextExport* pTextExport ) : EscherEx( EscherExGlobalRef(new EscherExGlobal(0)), 0, /*bOOXML=*/true ) , m_pSerializer( pSerializer ) @@ -98,7 +101,7 @@ void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) // postpone the output so that we are able to write even the elements // that we learn inside Commit() - m_pSerializer->mark(); + m_pSerializer->mark(Tag_Container); } } @@ -109,7 +112,7 @@ void VMLExport::CloseContainer() // write the shape now when we have all the info sal_Int32 nShapeElement = StartShape(); - m_pSerializer->mergeTopMarks(); + m_pSerializer->mergeTopMarks(Tag_Container); EndShape( nShapeElement ); @@ -357,7 +360,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect // postpone the output of the embedded elements so that they are written // inside the shapes - m_pSerializer->mark(); + m_pSerializer->mark(Tag_Commit); // dimensions if ( m_nShapeType == ESCHER_ShpInst_Line ) @@ -860,7 +863,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect } } - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_POSTPONE ); + m_pSerializer->mergeTopMarks(Tag_Commit, sax_fastparser::MERGE_MARKS_POSTPONE ); } OString VMLExport::ShapeIdString( sal_uInt32 nId ) |