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 | |
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
-rw-r--r-- | include/sax/fshelper.hxx | 6 | ||||
-rw-r--r-- | oox/source/export/vmlexport.cxx | 11 | ||||
-rw-r--r-- | sax/source/tools/fastserializer.cxx | 14 | ||||
-rw-r--r-- | sax/source/tools/fastserializer.hxx | 22 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 94 |
6 files changed, 96 insertions, 61 deletions
diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx index b86e9de5a190..52d53995b84b 100644 --- a/include/sax/fshelper.hxx +++ b/include/sax/fshelper.hxx @@ -137,9 +137,11 @@ public: static FastAttributeList *createAttrList(); - void mark( const ::com::sun::star::uno::Sequence< sal_Int32 >& aOrder = + void mark(sal_Int32 nTag, + const ::com::sun::star::uno::Sequence< sal_Int32 >& rOrder = ::com::sun::star::uno::Sequence< sal_Int32 >() ); - void mergeTopMarks( MergeMarksEnum eMergeType = MERGE_MARKS_APPEND ); + void mergeTopMarks(sal_Int32 nTag, + MergeMarksEnum eMergeType = MERGE_MARKS_APPEND ); /* Now create all the overloads in a typesafe way (i.e. without varargs) by creating a number of overloads 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 ) diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index 2d4a2e1ff5bc..66466e9b6b90 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -330,17 +330,17 @@ namespace sax_fastparser { } } - void FastSaxSerializer::mark( const Int32Sequence& aOrder ) + void FastSaxSerializer::mark(sal_Int32 const nTag, const Int32Sequence& rOrder) { - if ( aOrder.hasElements() ) + if (rOrder.hasElements()) { - boost::shared_ptr< ForMerge > pSort( new ForSort( aOrder ) ); + boost::shared_ptr< ForMerge > pSort( new ForSort(nTag, rOrder) ); maMarkStack.push( pSort ); maCachedOutputStream.setOutput( pSort ); } else { - boost::shared_ptr< ForMerge > pMerge( new ForMerge( ) ); + boost::shared_ptr< ForMerge > pMerge( new ForMerge(nTag) ); maMarkStack.push( pMerge ); maCachedOutputStream.setOutput( pMerge ); } @@ -401,12 +401,16 @@ namespace sax_fastparser { } #endif - void FastSaxSerializer::mergeTopMarks( sax_fastparser::MergeMarksEnum eMergeType ) + void FastSaxSerializer::mergeTopMarks( + sal_Int32 const nTag, sax_fastparser::MergeMarksEnum const eMergeType) { SAL_WARN_IF(mbMarkStackEmpty, "sax", "Empty mark stack - nothing to merge"); + assert(!mbMarkStackEmpty); // should never happen if ( mbMarkStackEmpty ) return; + assert(maMarkStack.top()->m_Tag == nTag && "mark/merge tag mismatch!"); + (void) nTag; #ifdef DBG_UTIL if (dynamic_cast<ForSort*>(maMarkStack.top().get())) { diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx index 4dc786b7a712..5fcbef51b6df 100644 --- a/sax/source/tools/fastserializer.hxx +++ b/sax/source/tools/fastserializer.hxx @@ -127,8 +127,10 @@ public: p, r, mark(), t, [text], /t, mark(), rPr, [something], /rPr, mergeTopMarks( MERGE_MARKS_PREPEND ), mergeTopMarks( MERGE_MARKS_APPEND ), /r, /p and you are done. + + @param nTag debugging aid to ensure mark and merge match in LIFO order */ - void mark( const Int32Sequence& aOrder = Int32Sequence() ); + void mark(sal_Int32 nTag, const Int32Sequence& rOrder = Int32Sequence()); /** Merge 2 topmost marks. @@ -143,9 +145,12 @@ public: When the MERGE_MARKS_POSTPONE is specified, the merge happens just before the next merge. + @param nTag debugging aid to ensure mark and merge match in LIFO order + @see mark() */ - void mergeTopMarks( sax_fastparser::MergeMarksEnum eMergeType = sax_fastparser::MERGE_MARKS_APPEND ); + void mergeTopMarks(sal_Int32 nTag, + sax_fastparser::MergeMarksEnum eMergeType = sax_fastparser::MERGE_MARKS_APPEND); private: /** Helper class to cache data and write in chunks to XOutputStream or ForMerge::append. @@ -161,6 +166,7 @@ private: Int8Sequence maPostponed; public: + sal_Int32 const m_Tag; #ifdef DBG_UTIL // pending close tags, followed by pending open tags ::std::deque<sal_Int32> m_DebugEndedElements; @@ -170,7 +176,7 @@ private: ::std::deque<sal_Int32> m_DebugPostponedStartedElements; #endif - ForMerge() : maData(), maPostponed() {} + ForMerge(sal_Int32 const nTag) : m_Tag(nTag) {} virtual ~ForMerge() {} virtual void setCurrentElement( ::sal_Int32 /*nToken*/ ) {} @@ -196,11 +202,11 @@ private: Int32Sequence maOrder; public: - ForSort( const Int32Sequence& aOrder ) : - ForMerge(), - maData(), - mnCurrentElement( 0 ), - maOrder( aOrder ) {} + ForSort(sal_Int32 const nTag, const Int32Sequence& rOrder) + : ForMerge(nTag) + , mnCurrentElement( 0 ) + , maOrder( rOrder ) + {} void setCurrentElement( ::sal_Int32 nToken ) SAL_OVERRIDE; diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 438aef75c48a..46d87644d471 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -153,14 +153,16 @@ FastSerializerHelper* FastSerializerHelper::writeId(sal_Int32 tokenId) return mpSerializer->getOutputStream(); } -void FastSerializerHelper::mark( const Sequence< sal_Int32 >& aOrder ) +void FastSerializerHelper::mark( + sal_Int32 const nTag, const Sequence<sal_Int32>& rOrder) { - mpSerializer->mark( aOrder ); + mpSerializer->mark(nTag, rOrder); } -void FastSerializerHelper::mergeTopMarks( MergeMarksEnum eMergeType ) +void FastSerializerHelper::mergeTopMarks( + sal_Int32 const nTag, MergeMarksEnum const eMergeType) { - mpSerializer->mergeTopMarks( eMergeType ); + mpSerializer->mergeTopMarks(nTag, eMergeType); } FastAttributeList * FastSerializerHelper::createAttrList() diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 710c862d75da..0771d0270f36 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -140,6 +140,24 @@ using namespace sw::util; using namespace ::com::sun::star; using namespace ::com::sun::star::drawing; +static const sal_Int32 Tag_StartParagraph_1 = 1; +static const sal_Int32 Tag_StartParagraph_2 = 2; +static const sal_Int32 Tag_WriteSdtBlock = 3; +static const sal_Int32 Tag_StartParagraphProperties = 4; +static const sal_Int32 Tag_InitCollectedParagraphProperties = 5; +static const sal_Int32 Tag_StartRun_1 = 6; +static const sal_Int32 Tag_StartRun_2 = 7; +static const sal_Int32 Tag_StartRun_3 = 8; +static const sal_Int32 Tag_EndRun_1 = 9; +static const sal_Int32 Tag_EndRun_2 = 10; +static const sal_Int32 Tag_StartRunProperties = 11; +static const sal_Int32 Tag_InitCollectedRunProperties = 12; +static const sal_Int32 Tag_Redline_1 = 13; +static const sal_Int32 Tag_Redline_2 = 14; +static const sal_Int32 Tag_TableDefinition = 15; +static const sal_Int32 Tag_OutputFlyFrame = 16; +static const sal_Int32 Tag_StartSection = 17; + class FFDataWriterHelper { ::sax_fastparser::FSHelperPtr m_pSerializer; @@ -303,13 +321,13 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText // this mark is used to be able to enclose the paragraph inside a sdr tag. // We will only know if we have to do that later. - m_pSerializer->mark(); + m_pSerializer->mark(Tag_StartParagraph_1); m_pSerializer->startElementNS( XML_w, XML_p, FSEND ); // postpone the output of the run (we get it before the paragraph // properties, but must write it after them) - m_pSerializer->mark(); + m_pSerializer->mark(Tag_StartParagraph_2); // no section break in this paragraph yet; can be set in SectionBreak() m_pSectionInfo.reset(); @@ -431,7 +449,7 @@ bool DocxAttributeOutput::TextBoxIsFramePr(const SwFrameFormat& rFrameFormat) void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) { // write the paragraph properties + the run, already in the correct order - m_pSerializer->mergeTopMarks(); + m_pSerializer->mergeTopMarks(Tag_StartParagraph_2); std::vector< boost::shared_ptr <sw::Frame> > aFramePrTextbox; // Write the anchored frame if any // Word can't handle nested text boxes, so write them on the same level. @@ -560,9 +578,9 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT m_rExport.SdrExporter().setParagraphHasDrawing( false ); m_bRunTextIsOn = false; if(aFramePrTextbox.empty()) - m_pSerializer->mergeTopMarks(); + m_pSerializer->mergeTopMarks(Tag_StartParagraph_1); else - m_pSerializer->mergeTopMarks(sax_fastparser::MERGE_MARKS_IGNORE ); + m_pSerializer->mergeTopMarks(Tag_StartParagraph_1, sax_fastparser::MERGE_MARKS_IGNORE); // Write framePr if(!aFramePrTextbox.empty()) @@ -596,7 +614,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken, if( nSdtPrToken > 0 || pSdtPrDataBindingAttrs ) { // sdt start mark - m_pSerializer->mark(); + m_pSerializer->mark(Tag_WriteSdtBlock); m_pSerializer->startElementNS( XML_w, XML_sdt, FSEND ); @@ -658,7 +676,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken, m_pSerializer->startElementNS( XML_w, XML_sdtContent, FSEND ); // prepend the tags since the sdt start mark before the paragraph - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); + m_pSerializer->mergeTopMarks(Tag_WriteSdtBlock, sax_fastparser::MERGE_MARKS_PREPEND); // write the ending tags after the paragraph if (bPara) @@ -797,7 +815,7 @@ void DocxAttributeOutput::SectionBreaks(const SwTextNode& rNode) void DocxAttributeOutput::StartParagraphProperties() { - m_pSerializer->mark( ); + m_pSerializer->mark(Tag_StartParagraphProperties); m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND ); @@ -863,7 +881,7 @@ void DocxAttributeOutput::InitCollectedParagraphProperties() for ( sal_Int32 i = 0; i < len; i++ ) aSeqOrder[i] = aOrder[i]; - m_pSerializer->mark( aSeqOrder ); + m_pSerializer->mark(Tag_InitCollectedParagraphProperties, aSeqOrder); } void DocxAttributeOutput::WriteCollectedParagraphProperties() @@ -940,7 +958,7 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar WriteCollectedParagraphProperties(); // Merge the marks for the ordered elements - m_pSerializer->mergeTopMarks( ); + m_pSerializer->mergeTopMarks(Tag_InitCollectedParagraphProperties); // Write 'Paragraph Mark' properties m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND ); @@ -978,7 +996,7 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar } // mergeTopMarks() after paragraph mark properties child elements. - m_pSerializer->mergeTopMarks(); + m_pSerializer->mergeTopMarks(Tag_InitCollectedRunProperties); m_pSerializer->endElementNS( XML_w, XML_rPr ); if (!m_bWritingHeaderFooter && m_pCurrentFrame) @@ -1005,7 +1023,7 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar // merge the properties _before_ the run (strictly speaking, just // after the start of the paragraph) - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); + m_pSerializer->mergeTopMarks(Tag_StartParagraphProperties, sax_fastparser::MERGE_MARKS_PREPEND); } void DocxAttributeOutput::SetStateOfFlyFrame( FlyProcessingState nStateOfFlyFrame ) @@ -1035,16 +1053,16 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool /*bS m_pRedlineData = pRedlineData; // this mark is used to be able to enclose the run inside a sdr tag. - m_pSerializer->mark(); + m_pSerializer->mark(Tag_StartRun_1); // postpone the output of the start of a run (there are elements that need // to be written before the start of the run, but we learn which they are // _inside_ of the run) - m_pSerializer->mark(); // let's call it "postponed run start" + m_pSerializer->mark(Tag_StartRun_2); // let's call it "postponed run start" // postpone the output of the text (we get it before the run properties, // but must write it after them) - m_pSerializer->mark(); // let's call it "postponed text" + m_pSerializer->mark(Tag_StartRun_3); // let's call it "postponed text" } void DocxAttributeOutput::EndRun() @@ -1084,11 +1102,11 @@ void DocxAttributeOutput::EndRun() } // write the run properties + the text, already in the correct order - m_pSerializer->mergeTopMarks(); // merges with "postponed text", see above + m_pSerializer->mergeTopMarks(Tag_StartRun_3); // merges with "postponed text", see above // level down, to be able to prepend the actual run start attribute (just // before "postponed run start") - m_pSerializer->mark(); // let's call it "actual run start" + m_pSerializer->mark(Tag_EndRun_1); // let's call it "actual run start" bool bCloseEarlierSDT = false; if (m_bEndCharSdt) @@ -1200,10 +1218,10 @@ void DocxAttributeOutput::EndRun() { RunText(OUString("\t")) ; } - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); // merges with "postponed run start", see above + m_pSerializer->mergeTopMarks(Tag_EndRun_1, sax_fastparser::MERGE_MARKS_PREPEND); // merges with "postponed run start", see above // write the run start + the run content - m_pSerializer->mergeTopMarks(); // merges the "actual run start" + m_pSerializer->mergeTopMarks(Tag_StartRun_2); // merges the "actual run start" // append the actual run end m_pSerializer->endElementNS( XML_w, XML_r ); @@ -1227,12 +1245,12 @@ void DocxAttributeOutput::EndRun() if (bCloseEarlierSDT) { - m_pSerializer->mark(); + m_pSerializer->mark(Tag_EndRun_2); EndSdtBlock(); - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); + m_pSerializer->mergeTopMarks(Tag_EndRun_2, sax_fastparser::MERGE_MARKS_PREPEND); } - m_pSerializer->mergeTopMarks(); + m_pSerializer->mergeTopMarks(Tag_StartRun_1); for (std::vector<const SwOLENode*>::iterator it = m_aPostponedMaths.begin(); it != m_aPostponedMaths.end(); ++it) WritePostponedMath(*it); @@ -1639,7 +1657,7 @@ void DocxAttributeOutput::StartRunProperties() { // postpone the output so that we can later [in EndRunProperties()] // prepend the properties before the text - m_pSerializer->mark(); + m_pSerializer->mark(Tag_StartRunProperties); m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND ); @@ -1735,7 +1753,7 @@ void DocxAttributeOutput::InitCollectedRunProperties() for ( sal_Int32 i = 0; i < len; i++ ) aSeqOrder[i] = aOrder[i]; - m_pSerializer->mark( aSeqOrder ); + m_pSerializer->mark(Tag_InitCollectedRunProperties, aSeqOrder); } namespace @@ -1954,7 +1972,7 @@ void DocxAttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData ) WriteCollectedRunProperties(); // Merge the marks for the ordered elements - m_pSerializer->mergeTopMarks(); + m_pSerializer->mergeTopMarks(Tag_InitCollectedRunProperties); m_pSerializer->endElementNS( XML_w, XML_rPr ); @@ -1975,7 +1993,7 @@ void DocxAttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData ) // merge the properties _before_ the run text (strictly speaking, just // after the start of the run) - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); + m_pSerializer->mergeTopMarks(Tag_StartRunProperties, sax_fastparser::MERGE_MARKS_PREPEND); } void DocxAttributeOutput::GetSdtEndBefore(const SdrObject* pSdrObj) @@ -2357,7 +2375,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) const SfxItemSet *pChangesSet = pFormattingChanges->GetItemSet(); if (pChangesSet) { - m_pSerializer->mark(); + m_pSerializer->mark(Tag_Redline_1); m_pSerializer->startElementNS( XML_w, XML_rPr, FSEND ); @@ -2383,7 +2401,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) m_pSerializer->endElementNS( XML_w, XML_rPr ); - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); + m_pSerializer->mergeTopMarks(Tag_Redline_1, sax_fastparser::MERGE_MARKS_PREPEND); } } } @@ -2410,7 +2428,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) const SfxItemSet *pChangesSet = pFormattingChanges->GetItemSet(); if (pChangesSet) { - m_pSerializer->mark(); + m_pSerializer->mark(Tag_Redline_2); m_pSerializer->startElementNS( XML_w, XML_pPr, FSEND ); @@ -2434,7 +2452,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData) m_pSerializer->endElementNS( XML_w, XML_pPr ); - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); + m_pSerializer->mergeTopMarks(Tag_Redline_2, sax_fastparser::MERGE_MARKS_PREPEND); } } } @@ -3145,7 +3163,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t for ( sal_Int32 i = 0; i < len; i++ ) aSeqOrder[i] = aOrder[i]; - m_pSerializer->mark( aSeqOrder ); + m_pSerializer->mark(Tag_TableDefinition, aSeqOrder); long nPageSize = 0; const char* widthType = "dxa"; @@ -3364,7 +3382,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t FSEND ); // Merge the marks for the ordered elements - m_pSerializer->mergeTopMarks( ); + m_pSerializer->mergeTopMarks(Tag_TableDefinition); m_pSerializer->endElementNS( XML_w, XML_tblPr ); @@ -4876,7 +4894,7 @@ void DocxAttributeOutput::WritePostponedDMLDrawing() void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Point& rNdTopLeft ) { - m_pSerializer->mark(); + m_pSerializer->mark(Tag_OutputFlyFrame); switch ( rFrame.GetWriterType() ) { @@ -5006,7 +5024,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po break; } - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_POSTPONE ); + m_pSerializer->mergeTopMarks(Tag_OutputFlyFrame, sax_fastparser::MERGE_MARKS_POSTPONE); } bool DocxAttributeOutput::IsDiagram( const SdrObject* sdrObject ) @@ -5324,7 +5342,7 @@ void DocxAttributeOutput::EndStyleProperties( bool bParProp ) WriteCollectedParagraphProperties(); // Merge the marks for the ordered elements - m_pSerializer->mergeTopMarks( ); + m_pSerializer->mergeTopMarks(Tag_InitCollectedParagraphProperties); m_pSerializer->endElementNS( XML_w, XML_pPr ); } @@ -5333,7 +5351,7 @@ void DocxAttributeOutput::EndStyleProperties( bool bParProp ) WriteCollectedRunProperties(); // Merge the marks for the ordered elements - m_pSerializer->mergeTopMarks(); + m_pSerializer->mergeTopMarks(Tag_InitCollectedRunProperties); m_pSerializer->endElementNS( XML_w, XML_rPr ); } @@ -5469,7 +5487,7 @@ void DocxAttributeOutput::StartSection() for ( sal_Int32 i = 0; i < len; i++ ) aSeqOrder[i] = aOrder[i]; - m_pSerializer->mark( aSeqOrder ); + m_pSerializer->mark(Tag_StartSection, aSeqOrder); m_bHadSectPr = true; } @@ -5484,7 +5502,7 @@ void DocxAttributeOutput::EndSection() } // Order the elements - m_pSerializer->mergeTopMarks( ); + m_pSerializer->mergeTopMarks(Tag_StartSection); m_pSerializer->endElementNS( XML_w, XML_sectPr ); m_bOpenedSectPr = false; |