From ffaca765ed010aa6f367f417a97eaa99902870a1 Mon Sep 17 00:00:00 2001 From: Stef Date: Sun, 11 Jul 2004 22:07:43 +0000 Subject: Fixed grouping issues Consolidate footnotes to end Proper ref format Fixed 'removeDuplicate' bugs --- src/xmlcomposer.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/xmlcomposer.cpp') diff --git a/src/xmlcomposer.cpp b/src/xmlcomposer.cpp index 4091adb..5c29e65 100644 --- a/src/xmlcomposer.cpp +++ b/src/xmlcomposer.cpp @@ -104,6 +104,7 @@ void RtfParser::endDocument() // Cleanup the tree RtfFixups::removeDuplicates(m_document); + RtfFixups::consolidateEndTags(m_document); RtfFixups::breakTables(m_document); RtfFixups::breakTags(m_document, kElTable, kElRow); RtfFixups::breakTags(m_document, kElRow, kElCell); @@ -504,7 +505,8 @@ bool RtfParser::ParseAnalyser::processTextAutoContent(const string& cw, int flag int ac = m_parser->getAutoCount(AUTOCOUNT_FOOTNOTE); AN_ELEMENT(kElRef); - AN_ATTRIBUTE(kAtFootNote, ac); + AN_ATTRIBUTE(kAtType, kValFootNote); + AN_ATTRIBUTE(kAtTo, ac); dest->charData(formatInt(ac)); AN_POP_ELEMENT(); return true; @@ -953,18 +955,7 @@ ON_DONE(FootNote) m_parser->incrementAutoCount(AUTOCOUNT_FOOTNOTE); } -// TODO: Remove these (for debugging) -ON_GROUPSTART(FootNote) -{ - int ac = m_parser->getAutoCount(AUTOCOUNT_FOOTNOTE); - fprintf(stderr, "%d start\n", ac); -} -ON_GROUPEND(FootNote) -{ - int ac = m_parser->getAutoCount(AUTOCOUNT_FOOTNOTE); - fprintf(stderr, "%d end\n", ac); -} ON_CHARDATA(Raw) -- cgit v1.2.3