[gnumeric] compilation: use doubles, not floats in a lot of places.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] compilation: use doubles, not floats in a lot of places.
- Date: Wed, 18 Nov 2009 21:15:39 +0000 (UTC)
commit 499faa6f82ec19304b0d8bd4f7936f105e63bf6a
Author: Morten Welinder <terra gnome org>
Date: Wed Nov 18 16:15:14 2009 -0500
compilation: use doubles, not floats in a lot of places.
configure.in | 2 +-
plugins/excel/ms-chart.c | 8 ++++----
src/command-context-stderr.c | 2 +-
src/io-context-gtk.c | 2 +-
src/sheet-filter.c | 2 +-
src/sheet-filter.h | 4 ++--
src/sheet-object.c | 3 +--
src/style-border.c | 24 ++++++++++++------------
src/style-border.h | 5 +++--
src/wbc-gtk.c | 2 +-
10 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/configure.in b/configure.in
index 07c8dda..bb96368 100644
--- a/configure.in
+++ b/configure.in
@@ -143,7 +143,7 @@ PKG_PROG_PKG_CONFIG(0.18)
dnl *****************************
libspreadsheet_reqs="
- libgoffice-${GOFFICE_API_VER} >= 0.7.15
+ libgoffice-${GOFFICE_API_VER} >= 0.7.16
libgsf-1 >= 1.14.15
libxml-2.0 >= 2.4.12
"
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index 4d15719..27165b5 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -1123,7 +1123,7 @@ BC_R(gelframe) (XLChartHandler const *handle,
s->style->fill.pattern.back = ms_chart_map_color (s,
fill_back_color, fill_back_alpha);
} else {
- float brightness;
+ double brightness;
unsigned frac = (fill_back_color >> 16) & 0xff;
/**
@@ -4062,7 +4062,7 @@ chart_write_MARKERFORMAT (XLChartWriteState *s, GOStyle const *style,
ms_biff_put_commit (s->bp);
}
static void
-chart_write_PIEFORMAT (XLChartWriteState *s, float separation)
+chart_write_PIEFORMAT (XLChartWriteState *s, double separation)
{
gint tmp = separation * 100;
if (tmp < 0)
@@ -4356,7 +4356,7 @@ style_is_completely_auto (GOStyle const *style)
static void
chart_write_style (XLChartWriteState *s, GOStyle const *style,
- guint16 indx, unsigned n, unsigned v, float separation,
+ guint16 indx, unsigned n, unsigned v, double separation,
GOLineInterpolation interpolation)
{
chart_write_DATAFORMAT (s, indx, n, v);
@@ -4731,7 +4731,7 @@ chart_write_series (XLChartWriteState *s, GogSeries const *series, unsigned n)
}
static void
-chart_write_dummy_style (XLChartWriteState *s, float default_separation,
+chart_write_dummy_style (XLChartWriteState *s, double default_separation,
gboolean clear_marks, gboolean clear_lines,
GOLineInterpolation interpolation)
{
diff --git a/src/command-context-stderr.c b/src/command-context-stderr.c
index aedf45a..6dcfc8d 100644
--- a/src/command-context-stderr.c
+++ b/src/command-context-stderr.c
@@ -78,7 +78,7 @@ ccs_set_sensitive (G_GNUC_UNUSED GOCmdContext *cc,
}
static void
-ccs_progress_set (GOCmdContext *cc, gfloat val)
+ccs_progress_set (GOCmdContext *cc, double val)
{
}
diff --git a/src/io-context-gtk.c b/src/io-context-gtk.c
index 151e60e..a7b5415 100644
--- a/src/io-context-gtk.c
+++ b/src/io-context-gtk.c
@@ -223,7 +223,7 @@ icg_get_password (GOCmdContext *cc, char const *filename)
}
static void
-icg_progress_set (GOCmdContext *cc, gfloat val)
+icg_progress_set (GOCmdContext *cc, double val)
{
IOContextGtk *icg = IO_CONTEXT_GTK (cc);
diff --git a/src/sheet-filter.c b/src/sheet-filter.c
index 9514794..05678d2 100644
--- a/src/sheet-filter.c
+++ b/src/sheet-filter.c
@@ -84,7 +84,7 @@ gnm_filter_condition_new_double (GnmFilterOp op0, GnmValue *v0,
}
GnmFilterCondition *
-gnm_filter_condition_new_bucket (gboolean top, gboolean absolute, float n)
+gnm_filter_condition_new_bucket (gboolean top, gboolean absolute, double n)
{
GnmFilterCondition *res = g_new0 (GnmFilterCondition, 1);
res->op[0] = GNM_FILTER_OP_TOP_N | (top ? 0 : 1) | (absolute ? 0 : 2);
diff --git a/src/sheet-filter.h b/src/sheet-filter.h
index 74bc537..a0ac9b4 100644
--- a/src/sheet-filter.h
+++ b/src/sheet-filter.h
@@ -49,7 +49,7 @@ struct _GnmFilterCondition {
GnmFilterOp op[2];
GnmValue *value[2];
gboolean is_and;
- float count;
+ double count;
};
struct _GnmFilter {
@@ -67,7 +67,7 @@ GnmFilterCondition *gnm_filter_condition_new_double (GnmFilterOp op1, GnmValue *
GnmFilterOp op2, GnmValue *v2);
GnmFilterCondition *gnm_filter_condition_new_bucket (gboolean top,
gboolean absolute,
- float n);
+ double n);
GnmFilter *gnm_filter_new (Sheet *sheet, GnmRange const *r);
GnmFilter *gnm_filter_dup (GnmFilter const *src,
diff --git a/src/sheet-object.c b/src/sheet-object.c
index 01676a3..c397b9e 100644
--- a/src/sheet-object.c
+++ b/src/sheet-object.c
@@ -678,8 +678,7 @@ sheet_object_anchor_dup (SheetObjectAnchor const *src)
}
static double
-cell_offset_calc_pt (Sheet const *sheet, int i, gboolean is_col,
- float offset)
+cell_offset_calc_pt (Sheet const *sheet, int i, gboolean is_col, double offset)
{
ColRowInfo const *cri = sheet_colrow_get_info (sheet, i, is_col);
return offset * cri->size_pts;
diff --git a/src/style-border.c b/src/style-border.c
index 5d0b577..58a1e06 100644
--- a/src/style-border.c
+++ b/src/style-border.c
@@ -569,7 +569,7 @@ style_border_set_gtk (GnmBorder const * const border,
static inline void
print_hline_gtk (cairo_t *context,
- float x1, float x2, float y, int width)
+ double x1, double x2, double y, int width)
{
if (width == 0 || width % 2)
y += .5;
@@ -582,7 +582,7 @@ print_hline_gtk (cairo_t *context,
static inline void
print_vline_gtk (cairo_t *context,
- float x, float y1, float y2, int width, int dir)
+ double x, double y1, double y2, int width, int dir)
{
if (width == 0 || width % 2)
x += .5*dir;
@@ -622,7 +622,7 @@ gnm_style_borders_row_draw (GnmBorder const * const * prev_vert,
border = sr->top [col];
if (style_border_set_gtk (border, cr)) {
- float y = y1;
+ double y = y1;
if (style_border_hmargins (prev_vert, sr, col, o, dir)) {
print_hline_gtk (cr, x + o[1][0],
next_x + o[1][1] + dir, y1-1.,
@@ -641,7 +641,7 @@ gnm_style_borders_row_draw (GnmBorder const * const * prev_vert,
border = sr->vertical [col];
if (style_border_set_gtk (border, cr)) {
- float x1 = x;
+ double x1 = x;
if (style_border_vmargins (prev_vert, sr, col, o)) {
print_vline_gtk (cr, x-dir, y1 + o[1][0],
y2 + o[1][1] + 1., border->width, dir);
@@ -655,7 +655,7 @@ gnm_style_borders_row_draw (GnmBorder const * const * prev_vert,
if (draw_vertical) {
border = sr->vertical [col];
if (style_border_set_gtk (border, cr)) {
- float x1 = x;
+ double x1 = x;
if (style_border_vmargins (prev_vert, sr, col, o)) {
print_vline_gtk (cr, x-dir, y1 + o[1][0] + 1.,
y2 + o[1][1], border->width, dir);
@@ -718,12 +718,12 @@ void
gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
GnmStyleRow const *sr,
cairo_t *context,
- float x, float y1, float y2,
+ double x, double y1, double y2,
Sheet const *sheet,
gboolean draw_vertical, int dir)
{
int o[2][2], col;
- float next_x = x;
+ double next_x = x;
GnmBorder const *border;
cairo_save (context);
@@ -740,7 +740,7 @@ gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
border = sr->top [col];
if (style_border_set_gtk (border, context)) {
- float y = y1;
+ double y = y1;
if (style_border_hmargins (prev_vert, sr, col, o, dir)) {
print_hline_gtk (context, x + o[1][0],
next_x + o[1][1] + dir, y1-1.,
@@ -758,7 +758,7 @@ gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
border = sr->vertical [col];
if (style_border_set_gtk (border, context)) {
- float x1 = x;
+ double x1 = x;
if (style_border_vmargins (prev_vert, sr, col, o)) {
print_vline_gtk (context, x-dir, y1 + o[1][0],
y2 + o[1][1] + 1., border->width, dir);
@@ -771,7 +771,7 @@ gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
if (draw_vertical) {
border = sr->vertical [col];
if (style_border_set_gtk (border, context)) {
- float x1 = x;
+ double x1 = x;
if (style_border_vmargins (prev_vert, sr, col, o)) {
print_vline_gtk (context, x-dir, y1 + o[1][0] + 1.,
y2 + o[1][1], border->width, dir);
@@ -788,8 +788,8 @@ gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
void
gnm_style_border_print_diag_gtk (GnmStyle const *style,
- cairo_t *context,
- float x1, float y1, float x2, float y2)
+ cairo_t *context,
+ double x1, double y1, double x2, double y2)
{
GnmBorder const *diag;
diff --git a/src/style-border.h b/src/style-border.h
index 9b79924..bc51dcb 100644
--- a/src/style-border.h
+++ b/src/style-border.h
@@ -96,12 +96,13 @@ void gnm_style_border_draw_diag (GnmStyle const *style,
void gnm_style_borders_row_print_gtk (GnmBorder const * const * prev_vert,
GnmStyleRow const *sr,
cairo_t *context,
- float x, float y1, float y2,
+ double x, double y1, double y2,
Sheet const *sheet,
gboolean draw_vertical, int dir);
void gnm_style_border_print_diag_gtk (GnmStyle const *style,
cairo_t *context,
- float x1, float y1, float x2, float y2);
+ double x1, double y1,
+ double x2, double y2);
G_END_DECLS
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 98f1b29..aa9e0e1 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -4872,7 +4872,7 @@ wbcg_error_error_info (GOCmdContext *cc, GOErrorInfo *error)
wbcg_toplevel (WBC_GTK (cc)), error);
}
static void
-wbcg_progress_set (GOCmdContext *cc, gfloat val)
+wbcg_progress_set (GOCmdContext *cc, double val)
{
WBCGtk *wbcg = WBC_GTK (cc);
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (wbcg->progress_bar), val);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]