abi_widget_render_page_to_image counts from page 1 now.

From: Martin Sevior <msevior_at_gmail.com>
Date: Sat Feb 28 2009 - 00:02:53 CET

Make abi_widget_render_page_to_image the first page "1" rather than 0.

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 Sat Feb 28 00:03:02 2009

This archive was generated by hypermail 2.1.8 : Sat Feb 28 2009 - 00:03:02 CET