On Fri, 15 Sep 2000, sam th wrote:

> 
> It did indeed fail on windows.  I believe that the attached patch will fix
> the problem, but would appreciate it if someone could check that for me.
> It does still compile on Unix.  (This doesn't break your code, does it
> Martin?)
> 

I didn't expect that to fail. I'm still a bit clueless about constness. If
that works on Unix go for it. This piece of code was to fix a bug that
occurs if you cut all text from a paragraph. The Line class ends up with
o entries in its vector of runs and tried to retrun the last run.

Cheers

Martin


 > Index: src/text/fmt/xp/fp_Line.cpp
> ===================================================================
> RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Line.cpp,v
> retrieving revision 1.74
> diff -u -r1.74 fp_Line.cpp
> --- src/text/fmt/xp/fp_Line.cpp 2000/09/15 06:51:59     1.74
> +++ src/text/fmt/xp/fp_Line.cpp 2000/09/15 13:54:59
> @@ -822,11 +822,11 @@
>         if( i <= 0 )
>         {
>                 fp_Run * pRun = getBlock()->getFirstRun();
> -               return (const) pRun;
> +               return pRun;
>         }
>         else
>         {
> -                return ((const fp_Run*) m_vecRuns.getLastItem());
> +                return ((fp_Run*) m_vecRuns.getLastItem());
>         }
>  }
> 
> 
>                               sam th
>                               [EMAIL PROTECTED]
>                               http://www.abisource.com/~sam
> 
> 
> 




Reply via email to