Re: hub - r33076 - abiword/branches/ABI-3-0-0-STABLE/src/text/fmt/xp

joe joe <[email protected]> Fri, 24 May 2013 00:11:52 +0800
Newsgroups gmane.editors.abiword.devel
Message-ID <CAKBgNKq=5KaybrzsvR0hA9EYe4TK3wk-H+FAv9UPPOsxUjnxpg@mail.gmail.com>
Hi,

a simple question, why should we  "-1", just for interface?


> +               if (y >= getYBottom())
> +               {
> +                       y = getYBottom() - 1;
> +               }

> +               if (getFirstBrokenTable() && y >= getFirstBrokenTable()->getYBottom())
> +               {
> +                       y = getFirstBrokenTable()->getYBottom() - 1;
> +               }


thanks,
Joe

On Wed, May 22, 2013 at 8:37 AM,  <[email protected]> wrote:
>
> Author: hub
> Date: 2013-05-22 02:37:05 +0200 (Wed, 22 May 2013)
> New Revision: 33076
>
> Modified:
>    abiword/branches/ABI-3-0-0-STABLE/src/text/fmt/xp/fp_TableContainer.cpp
> Log:
> Fix bug: fp_TableContainer::mapXYToPosition should return a position in the cell above when the cursor is in the bottom margin area. Please backport.
>
> Cherry-pick from trunk@33072. From slaroche
>
> Modified: abiword/branches/ABI-3-0-0-STABLE/src/text/fmt/xp/fp_TableContainer.cpp
> ===================================================================
> --- abiword/branches/ABI-3-0-0-STABLE/src/text/fmt/xp/fp_TableContainer.cpp     2013-05-22 00:36:57 UTC (rev 33075)
> +++ abiword/branches/ABI-3-0-0-STABLE/src/text/fmt/xp/fp_TableContainer.cpp     2013-05-22 00:37:05 UTC (rev 33076)
> @@ -3698,24 +3698,24 @@
>                 y = 1;
>                 bAboveTable = true;
>         }
> -       if (isThisBroken() && y >= getYBottom())
> -       {
> -               y = getYBottom() - 1;
> -       }
> -       else if (!isThisBroken() && getFirstBrokenTable() && y >= getFirstBrokenTable()->getYBottom())
> -       {
> -               y = getFirstBrokenTable()->getYBottom() - 1;
> -       }
>
>         fp_TableContainer * pMaster = NULL;
>         if(isThisBroken())
>         {
> +               pMaster = getMasterTable();
>                 y = y + getYBreak();
> -               pMaster = getMasterTable();
> +               if (y >= getYBottom())
> +               {
> +                       y = getYBottom() - 1;
> +               }
>         }
>         else
>         {
>                 pMaster = this;
> +               if (getFirstBrokenTable() && y >= getFirstBrokenTable()->getYBottom())
> +               {
> +                       y = getFirstBrokenTable()->getYBottom() - 1;
> +               }
>         }
>
>         if(!pMaster->countCons())
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> [email protected] with the word
> unsubscribe in the message body.