Re: abi_widget_render_page_to_image counts from page 1 now.

From: Tomeu Vizoso <tomeu_at_sugarlabs.org>
Date: Sat Feb 28 2009 - 10:44:55 CET

On Sat, Feb 28, 2009 at 00:02, Martin Sevior <msevior@gmail.com> wrote:
>
> Make abi_widget_render_page_to_image the first page "1" rather than 0.

Updated Write.

Thanks!

Tomeu

> Martin
>
>
> author: msevior
> Date: 2009-02-28 00:00:16 +0100 (Sat, 28 Feb 2009)
> New Revision: 25768
>
> Modified:
>   abiword/trunk/src/wp/ap/gtk/abiwidget.cpp
> Log:
>
> Make abi_widget_render_page_to_image count from "1" rather than 0.
>
>
>
> Modified: abiword/trunk/src/wp/ap/gtk/abiwidget.cpp
> ===================================================================
> --- abiword/trunk/src/wp/ap/gtk/abiwidget.cpp   2009-02-27 22:36:03
> UTC (rev 25767)
> +++ abiword/trunk/src/wp/ap/gtk/abiwidget.cpp   2009-02-27 23:00:16
> UTC (rev 25768)
> @@ -1414,10 +1414,15 @@
>
>  /*!
>  * Caller owns the returned GdkPixmap and must free it after use.
> + * The first page is "1"
>  */
>  extern "C" GdkPixbuf *
>  abi_widget_render_page_to_image(AbiWidget *abi, int iPage)
>  {
> +       //
> +       // AbiWord counts from 0 but we let the caller count from 1.
> +       //
> +       iPage--;
>        AP_UnixFrame * pFrame = (AP_UnixFrame *) abi->priv->m_pFrame;
>        if(pFrame == NULL)
>                return FALSE;
>
Received on Mon Mar 2 16:22:39 2009

This archive was generated by hypermail 2.1.8 : Mon Mar 02 2009 - 16:22:39 CET