I hate to reply to myself, but my initial assert happens whenever I try to 
load a doc containing headers/footers and is  < 2 pages. Docs >= 2 pages 
don't trigger this first assert.

Dom


>From: "Dom Lachowicz" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: Re: A warning before a major change.
>Date: Wed, 14 Feb 2001 00:25:30 -0500
>
>Martin,
>
>I get a crash when I try to print these documents, but I can insert and 
>edit
>text in the footers just fine, and save (& reload) these documents without
>problems. Screenshots and sample docs available upon request. I get an
>assert on loading:
>
>( 0 > _findShadow(pPage) at fl_SectionLayout.cpp:1689 **** )
>
>When I segv, I get a fault right here:
>
>#4  0x82859aa in FV_View::getPoint (this=0x0) at fv_View.h:108
>#5  0x8111b06 in fl_ShadowListener::populateStrux (this=0x84dba78,
>    sdh=0x85275c8, pcr=0x85210f8, psfh=0xbfffe984) at
>fl_SectionLayout.cpp:2389
>
>Maybe this will help? I can take a look at the code too, tomorrow.
>
>Dom
>
>>From: Martin Sevior <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: A warning before a major change.
>>Date: Wed, 14 Feb 2001 16:12:46 +1100 (EST)
>>
>>HI everyone,
>>          We have a problem with Abiword with page numbers. Right now
>>page numbers are contained in a section placed at the end of the document.
>>However the size of the document includes the page number sections. This
>>means that it is quite possible to to place the cursor at the end of the
>>text press "right arrow" and enter the page section. The cursor jumps into
>>the fister header/footer and then any text entered will crash Abiword.
>>
>>Now eventually this will be a cool feature (Entering text directly into
>>Abi headers/footers) but it will take some major reworking and in any case
>>you should not enter the header/footer sections unless you mean to.
>>
>>The best way to fix this is to have the code that calculates the size of
>>the document not include the the header/footer sections. I've made the
>>changes needed in fv_View to do this and have written a new method
>>in fv_View called
>>
>>// TODO find clever way to cache the size of the
>>// header/footer region so we can just subtract it off.
>>//
>>bool    FV_View::getEditableBounds(bool isEnd, PT_DocPosition &posEOD)
>>
>>
>>Now this code gets called on every cursor motion in abi so it is important
>>to realize that this code should be fast. Right now it adds a bit of extra
>>overhead to abi but I think I can come up with code to speed this up via
>>caching.  Anyway the full code is:
>>
>>
>>//
>>// This method keeps the insertion point out of the header/footer end of
>>// of the document.
>>// TODO find clever way to cache the size of the
>>// header/footer region so we can just subtract it off.
>>//
>>bool    FV_View::getEditableBounds(bool isEnd, PT_DocPosition &posEOD)
>>{
>>      bool res;
>>      if(!isEnd)
>>      {
>>             res = m_pDoc->getBounds(isEnd,posEOD);
>>             return res;
>>      }
>>      else
>>      {
>>             fl_DocSectionLayout * pSL =  m_pLayout->getFirstSection();
>>             UT_DEBUGMSG(("SEVIOR: Header = %x, Footer = %x
>>\n",pSL->getHeader(),pSL->getFooter()));
>>             while(pSL != NULL && pSL->getHeader()== NULL  &&
>>pSL->getFooter()== NULL )
>>             {
>>                    UT_DEBUGMSG(("SEVIOR: Header = %x, Footer = %x
>>\n",pSL->getHeader(),pSL->getFooter()));
>>
>>                    pSL  = pSL->getNextDocSection();
>>             }
>>             fl_BlockLayout * pBL;
>>             if( pSL == NULL || ( pSL->getHeader()== NULL  &&
>>pSL->getFooter()== NULL ))
>>             {
>>                    UT_DEBUGMSG(("SEVIOR: NO Header/Footer in doc!
>>\n"));
>>                    res = m_pDoc->getBounds(isEnd,posEOD);
>>                    return res;
>>             }
>>             if(pSL->getHeader() != NULL)
>>             {
>>                    pBL = pSL->getHeader()->getFirstBlock();
>>             }
>>             else
>>             {
>>                    pBL = pSL->getFooter()->getFirstBlock();
>>             }
>>             UT_DEBUGMSG(("SEVIOR: Header/Footer Exists \n"));
>>             UT_DEBUGMSG(("SEVIOR: Block Section Type
>>\n",pBL->getSectionLayout()->getType()));
>>             posEOD = pBL->getPosition( true);
>>             pBL = _findBlockAtPosition(posEOD);
>>             while(pBL->getSectionLayout()->getType() == FL_SECTION_HDRFTR)
>>             {
>>                    posEOD--;
>>                    pBL = _findBlockAtPosition(posEOD);
>>             UT_DEBUGMSG(("SEVIOR: Block Section Type
>>\n",pBL->getSectionLayout()->getType()));
>>             }
>>             posEOD--;
>>             return res;
>>      }
>>}
>>
>>Cheers
>>
>>Martin
>>
>>
>>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


Reply via email to