Subject: commit: RTF header export - first cut
From: Matti Picus (matti@picus.org)
Date: Wed Oct 10 2001 - 04:01:40 CDT
Here we go. Unfortunately, the exported RTF cannot be properly imported by
AbiWord, in spite of being perfectly valid.
The problem is in IE_Imp_RTF. The exported {\header ..} sequence appears
AFTER a {\pard ..} sequence, whereas the code expects the header definition
to be before. The problem is that the closing } in the \pard sequence
triggers IE_Imp_RTF::FlushStoredChars() which calls
ApplySectionAttributes() before the header is properly "registered" with
the section.
As linear-style document structure seems to be preferred, the
ApplySectionAttributes should only be called when a new section begins or
because of EndOfDocument. Alternatively, we could continue with the broken
RTF importer and force the exporter to write the header before any blocks.
Any ideas?
I cleaned up an UT_ASSERT along the way, which will now ignore unfound
header/footers instead of crashing.
Also, small updates to a MSVC6 file.
changed files:
abi/src/wp/impexp/ie_exp_RTP.cpp
abi/src/wp/impexp/ie_exp_listenerWriteDoc.cpp
abi/src/text/fmt/xp/fl_DocListener.cpp - change UT_ASSERT to UT_DEBUG()
abi/src/wp/impexp/ie_imp_RTF.cpp - remove comiler warnings, change debug
messages
MSVC6/AbiImpExp.dsp
This archive was generated by hypermail 2b25 : Wed Oct 10 2001 - 04:03:15 CDT