[gnumeric] Fix tooltip position for scale or RTL sheets. [#725941]



commit 8754a0232e09a46a2ff40de7fb5d648cf0a088a2
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Mar 14 18:15:37 2014 +0100

    Fix tooltip position for scale or RTL sheets. [#725941]

 ChangeLog      |    4 ++++
 NEWS           |   30 ++----------------------------
 src/gui-util.c |   14 +++++++++-----
 3 files changed, 15 insertions(+), 33 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 28ca08c..4a18146 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-14  Jean Brefort  <jean brefort normalesup org>
+
+       * src/gui-util.c (gnm_canvas_get_position): fix tooltip position. [#725941]
+
 2014-03-13  Morten Welinder  <terra gnome org>
 
        * src/style-conditions.c (gnm_style_cond_eval): New function
diff --git a/NEWS b/NEWS
index 6de48ff..12ec5eb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,26 +1,8 @@
 Gnumeric 1.12.13
 
-Andreas:
-       * Fix export of comboboxes to ODF.
-       * Fix export of help messages to ODF.
-       * Import invisible alignment characters in number formats from ODF.
-         [part of #725852]
-       * Fix fill-alignment export/import to and from ODF. [part of #726035]
-       * Fix distributed-alignment export to ODF. [part of #726035]
-       * Fix ODF roundtrip of "center accross selection". [#726010]
-       * Fix ODF roundtrip of conditional formats. [#726201]
-
-Morten:
-       * Support volatile functions.  [#305798]
-       * Improve testing.
-       * Import/Export super/subscript fonts to xlsx.  [Part of #726035]
-       * Import xlsx auto-filters.  [#725460]
-       * Update Gnumeric schema.
-       * Fix rich text problem.  [#726086]
-       * Improve xls export of conditional formats.
-       * Fix case sensitivity for conditional formats.  [#726246]
+Jean:
+       * Fix tooltip position for scale or RTL sheets. [#725941]
 
---------------------------------------------------------------------------
 Gnumeric 1.12.12
 
 Andreas:
@@ -35,9 +17,6 @@ Andreas:
        * Export row and column visibility to ODF. [#725115]
        * Export frozen panes info to and import from ODF. [#725228]
        * Export and import more sheet properties to/from ODF. [#725258]
-       * Fix validation import from ODF. [#725321]
-       * Fix autofilter condition export to ODF. [#725458]
-       * Provide Undo for sheet reordering via tab dragging. [#725540]
 
 Jean:
        * Fix persistence of hyperlinks tips. [see #724108]
@@ -72,11 +51,6 @@ Morten:
        * Improve the xls macro-roundtrip situation.  [#725220]
        * Improve ssdiff for sheet attributes.
        * Fix split pane problem.  [#725375]
-       * Don't generate value format during xls read.  [#725453]
-       * Fix name criticals.
-       * Fix sheet duplication issue.  [#725504]
-       * Fix named expressions crasher.  [Part of #725459]
-       * Fix GUI sheet re-ordering mess.  [Part of #725459]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.11
diff --git a/src/gui-util.c b/src/gui-util.c
index 66d600c..ab34f96 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -1250,15 +1250,19 @@ gnm_canvas_get_position (GocCanvas *canvas, int *x, int *y, gint64 px, gint64 py
        GtkWidget *cw = GTK_WIDGET (canvas);
        GdkWindow *cbw = gtk_layout_get_bin_window (GTK_LAYOUT (cw));
        int wx, wy;
-       int ox = 0, oy = 0;
 
        gdk_window_get_origin (cbw, &wx, &wy);
 
-       px = (px - canvas->scroll_x1) / canvas->pixels_per_unit;
-       py = (py - canvas->scroll_y1) / canvas->pixels_per_unit;
+       /* we don't need to multiply px and py by the canvas pixels_per_unit
+        * field since all the callers already do that */
+       px -= canvas->scroll_x1 * canvas->pixels_per_unit;
+       py -= canvas->scroll_y1 * canvas->pixels_per_unit;
+       /* let's take care of RTL sheets */
+       if (canvas->direction == GOC_DIRECTION_RTL)
+               px = goc_canvas_get_width (canvas) - px;
 
-       *x = px + wx - ox;
-       *y = py + wy - oy;
+       *x = px + wx;
+       *y = py + wy;
 }
 
 /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]