Re: msevior - r27745 - abiword/branches/lognpt/src/text/ptbl/xp

From: J.M. Maurer <uwog_at_uwog.net>
Date: Thu Aug 20 2009 - 11:05:03 CEST

On Wed, 2009-08-19 at 03:57 +0200, cvs@abisource.com wrote:
> Author: msevior
> Date: 2009-08-19 03:57:48 +0200 (Wed, 19 Aug 2009)
> New Revision: 27745
>
> Modified:
> abiword/branches/lognpt/src/text/ptbl/xp/pf_Fragments.cpp
> Log:
>
> Return the last frag in the document if the requested position is larger
> than the document size.
> AbiWord loads now!

One would think this should never happen, and thus it should at least
assert. Or is there valid usecase?

  Marc

>
>
>
> Modified: abiword/branches/lognpt/src/text/ptbl/xp/pf_Fragments.cpp
> ===================================================================
> --- abiword/branches/lognpt/src/text/ptbl/xp/pf_Fragments.cpp 2009-08-19 01:46:53 UTC (rev 27744)
> +++ abiword/branches/lognpt/src/text/ptbl/xp/pf_Fragments.cpp 2009-08-19 01:57:48 UTC (rev 27745)
> @@ -207,8 +207,7 @@
> pf_Frag * pf_Fragments::findFirstFragBeforePos(PT_DocPosition pos) const
> {
> if (pos >= sizeDocument())
> - return NULL;
> -
> + pos = sizeDocument()-1;
> Iterator it = find(pos);
> pf_Frag * pf = it.value();
> return pf;
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
Received on Thu Aug 20 11:06:15 2009

This archive was generated by hypermail 2.1.8 : Thu Aug 20 2009 - 11:06:15 CEST