[gnumeric] fix wrong precedence
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] fix wrong precedence
- Date: Sun, 10 May 2015 01:55:06 +0000 (UTC)
commit eff6a5539fe941daa3b0b00fcce9543debd11a17
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Sat May 9 19:51:27 2015 -0600
fix wrong precedence
2015-05-09 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-write.c (odf_write_multi_chart_frame_size): add parentheses
plugins/openoffice/ChangeLog | 4 ++++
plugins/openoffice/openoffice-write.c | 12 ++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index af41473..9dc89c6 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-09 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-write.c (odf_write_multi_chart_frame_size): add parentheses
+
2015-04-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (openoffice_file_open): initialize state.chart.name
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 58c0103..e9e7adf 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -2886,12 +2886,12 @@ odf_write_multi_chart_frame_size (GnmOOExport *state, SheetObject *so, GogObject
sheet_object_anchor_to_pts (anchor, sheet, abs_pts);
sheet_object_anchor_to_offset_pts (anchor, sheet, off_pts);
- res_pts[0] = off_pts[0] + (tc == 0) ? 0 : (xpos * (abs_pts[2]-abs_pts[0])/tc);
- res_pts[1] = off_pts[1] + (tr == 0) ? 0 : (ypos * (abs_pts[3]-abs_pts[1])/tr);
- res_pts[2] = off_pts[0] + (tc == 0) ? (abs_pts[2]-abs_pts[0]) :
- ((xpos + columns) * (abs_pts[2]-abs_pts[0])/tc);
- res_pts[3] = off_pts[1] + (tr == 0) ? (abs_pts[3]-abs_pts[1]) :
- ((ypos + rows) * (abs_pts[3]-abs_pts[1])/tr);
+ res_pts[0] = off_pts[0] + ((tc == 0) ? 0 : (xpos * (abs_pts[2]-abs_pts[0])/tc));
+ res_pts[1] = off_pts[1] + ((tr == 0) ? 0 : (ypos * (abs_pts[3]-abs_pts[1])/tr));
+ res_pts[2] = off_pts[0] + ((tc == 0) ? (abs_pts[2]-abs_pts[0]) :
+ ((xpos + columns) * (abs_pts[2]-abs_pts[0])/tc));
+ res_pts[3] = off_pts[1] + ((tr == 0) ? (abs_pts[3]-abs_pts[1]) :
+ ((ypos + rows) * (abs_pts[3]-abs_pts[1])/tr));
width = res_pts[2] - res_pts[0];
height = res_pts[3] - res_pts[1];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]