commit -- Re: rtf import cores in latest build


Subject: commit -- Re: rtf import cores in latest build
From: Paul Rohr (paul@abisource.com)
Date: Mon Jan 31 2000 - 13:56:10 CST


Another fix for backwards bang semantics in UT_Error switchover. Now can
import RTF again.

  M src/wp/impexp/xp/ie_imp_RTF.cpp

Sam, you got pretty close in your diagnostics. The cue you were missing was
that the document was entirely empty of all content. Given that cue, it was
pretty easy to figure out that the RTF importer was busted somehow.
Localizing the problem beyond that was easy.

For future reference, here's what's going on in the code you were looking at:

The only way to for _getStruxFromPosition() to fail is to fall through the
entire document, in which case it tries to return the last strux found
before the desired position in the document. In this case, the document
consisted of only a single PFT_EndOfDoc fragment, so there *were* no strux
in the document at all.

This is a totally invalid document. Even when we load empty documents, we
still make sure -- in PD_Document::newDocument() -- that there's at least a
single section and a single block inside it. Among other things, that keeps
the logic you were looking at from failing. ;-)

Paul



This archive was generated by hypermail 2b25 : Mon Jan 31 2000 - 13:50:47 CST