[gnumeric] Use goc_canvas_invalidate_region() for ants walking.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Use goc_canvas_invalidate_region() for ants walking.
- Date: Mon, 27 Oct 2014 15:33:33 +0000 (UTC)
commit dad44da8ec3d89cb46d93ec6356dc58f681951e6
Author: Jean Brefort <jean brefort normalesup org>
Date: Mon Oct 27 16:29:51 2014 +0100
Use goc_canvas_invalidate_region() for ants walking.
ChangeLog | 6 +
plugins/excel/ChangeLog | 5 +
plugins/excel/ms-biff.c | 2 +-
plugins/excel/ms-chart.c | 4 +-
plugins/excel/ms-excel-read.c | 2 +-
plugins/excel/xlsx-read-drawing.c | 24 ++++-
plugins/excel/xlsx-read.c | 20 ++--
plugins/excel/xlsx-utils.c | 52 +++++-----
plugins/excel/xlsx-write-drawing.c | 9 ++-
plugins/excel/xlsx-write.c | 22 ++--
plugins/html/html.c | 2 +-
plugins/html/latex.c | 6 +-
plugins/openoffice/openoffice-read.c | 114 +++++++++++-----------
plugins/openoffice/openoffice-write.c | 65 +++++++------
src/application.c | 2 +-
src/cmd-edit.c | 2 +-
src/dependent.c | 2 +-
src/dialogs/dialog-cell-format-cond.c | 8 +-
src/dialogs/dialog-cell-format.c | 8 +-
src/expr.c | 2 +-
src/gnm-so-path.c | 8 +-
src/graph.c | 4 +-
src/item-bar.c | 4 +-
src/item-cursor.c | 58 +++++------
src/item-grid.c | 4 +-
src/sf-trig.c | 2 +-
src/sheet-control-gui.c | 14 ++--
src/sheet-control-priv.h | 2 +-
src/sheet-control.h | 2 +-
src/sheet-object-image.c | 2 +-
src/sheet-object-widget.c | 14 ++--
src/style-conditions.c | 2 +-
src/wbc-gtk-actions.c | 2 +-
src/wbc-gtk.c | 6 +-
src/widgets/gnm-cell-combo-view.c | 4 +-
src/widgets/gnm-filter-combo-view.c | 2 +-
src/widgets/gnm-fontbutton.c | 172 ++++++++++++++++----------------
src/widgets/gnm-notebook.c | 6 +-
src/widgets/gnumeric-text-view.c | 2 +-
tools/process-burkardt.c | 2 +-
40 files changed, 352 insertions(+), 317 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 509013e..b1c54f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-27 Jean Brefort <jean brefort normalesup org>
+
+ * src/item-cursor.c (cb_item_cursor_animation): use
+ goc_canvas_invalidate_region() for ants walking. Avoid drawing outside of a
+ draw event.
+
2014-10-26 Morten Welinder <terra gnome org>
* src/value.h (VALUE_IS_CELLRANGE, VALUE_IS_ARRAY): New macros.
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 7a5065c..3750443 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-27 Jean Brefort <jean brefort normalesup org>
+
+ * xlsx-read-drawing.c (xlsx_axis_format): add some support for axis format.
+ * xlsx-write-drawing.c (xlsx_write_one_plot): ditto.
+
2014-10-24 Morten Welinder <terra gnome org>
* ms-excel-read.c (excel_get_chars): Plug leak.
diff --git a/plugins/excel/ms-biff.c b/plugins/excel/ms-biff.c
index b528358..470ea85 100644
--- a/plugins/excel/ms-biff.c
+++ b/plugins/excel/ms-biff.c
@@ -508,7 +508,7 @@ ms_biff_query_next (BiffQuery *q)
* I am guessing that we should always handle BIFF_CONTINUE here,
* except for the few record types exempt from encryption. For
* now, however, do the bare minimum.
- */
+ */
switch (q->opcode) {
case BIFF_BG_PIC:
case BIFF_BOUNDSHEET:
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index bf67598..2017fa6 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -2117,10 +2117,10 @@ BC_R(shtprops)(XLChartHandler const *handle,
d (1, {
g_printerr ("%sesize chart with window.\n",
dont_size_with_window ? "Don't r": "R");
-
+
if (has_pos_record && !ignore_pos_record)
g_printerr ("There should be a POS record around here soon\n");
-
+
if (manual_format)
g_printerr ("Manually formated\n");
if (only_plot_visible_cells)
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index 998a274..eccc305 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -5294,7 +5294,7 @@ excel_read_CF (BiffQuery *q, ExcelReadSheet *esheet, GnmStyleConditions *sc,
}
data += 64;
-
+
if (0xFFFFFFFF != (size = GSF_LE_GET_GUINT32 (data)))
gnm_style_set_font_size (overlay, size / 20.);
if (0xFFFFFFFF != (colour = GSF_LE_GET_GUINT32 (data + 16)))
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index e287efc..1ea9812 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -591,6 +591,22 @@ xlsx_axis_orientation (GsfXMLIn *xin, xmlChar const **attrs)
g_object_set (G_OBJECT (state->axis.obj),
"invert-axis", orient, NULL);
}
+
+static void
+xlsx_axis_format (GsfXMLIn *xin, xmlChar const **attrs)
+{
+ XLSXReadState *state = (XLSXReadState *)xin->user_state;
+ gboolean shared = TRUE;
+ char const *fmt = NULL;
+ for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
+ if (0 == strcmp (attrs[0], "sourceLinked"))
+ attr_bool (xin, attrs, "sourceLinked", &shared);
+ else if (0 == strcmp (attrs[0], "formatCode"))
+ fmt = attrs[1];
+ if (fmt && !shared)
+ g_object_set (G_OBJECT (state->axis.obj),
+ "assigned-format-string-XL", fmt, NULL);
+}
static void
xlsx_chart_logbase (GsfXMLIn *xin, xmlChar const **attrs)
{
@@ -815,11 +831,11 @@ xlsx_scatter_style (GsfXMLIn *xin, xmlChar const **attrs)
}
}
-static void
+static void
xlsx_chart_bubble (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
{ xlsx_chart_add_plot (xin, "GogBubblePlot"); }
-static void
+static void
xlsx_chart_radar (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
{ xlsx_chart_add_plot (xin, "GogRadarPlot"); }
@@ -1666,7 +1682,7 @@ GSF_XML_IN_NODE_FULL (START, CHART_SPACE, XL_NS_CHART, "chartSpace", GSF_XML_NO_
GSF_XML_IN_NODE (CAT_AXIS, AXIS_AXID, XL_NS_CHART, "axId", GSF_XML_NO_CONTENT, &xlsx_axis_id, NULL),
GSF_XML_IN_NODE (CAT_AXIS, AXIS_DELETE, XL_NS_CHART, "delete", GSF_XML_NO_CONTENT,
&xlsx_axis_delete, NULL),
GSF_XML_IN_NODE (CAT_AXIS, SHAPE_PR, XL_NS_CHART, "spPr", GSF_XML_NO_CONTENT, NULL, NULL),
/* 2nd Def */
- GSF_XML_IN_NODE (CAT_AXIS, AXIS_NUMFMT, XL_NS_CHART, "numFmt", GSF_XML_NO_CONTENT, NULL, NULL),
+ GSF_XML_IN_NODE (CAT_AXIS, AXIS_NUMFMT, XL_NS_CHART, "numFmt", GSF_XML_NO_CONTENT,
&xlsx_axis_format, NULL),
GSF_XML_IN_NODE (CAT_AXIS, AXIS_DELETE, XL_NS_CHART, "delete", GSF_XML_NO_CONTENT, NULL, NULL),
GSF_XML_IN_NODE_FULL (CAT_AXIS, AXIS_MAJORTICKMARK, XL_NS_CHART, "majorTickMark",
GSF_XML_NO_CONTENT, FALSE, TRUE, &xlsx_axis_mark, NULL, 1),
GSF_XML_IN_NODE_FULL (CAT_AXIS, AXIS_MINORTICKMARK, XL_NS_CHART, "minorTickMark",
GSF_XML_NO_CONTENT, FALSE, TRUE, &xlsx_axis_mark, NULL, 0),
@@ -2142,7 +2158,7 @@ xlsx_read_chart (GsfXMLIn *xin, xmlChar const **attrs)
if (ds)
dat = gog_dataset_get_dim (ds, -1);
if (dat)
- gog_dataset_set_dim (GOG_DATASET (title), 0,
+ gog_dataset_set_dim (GOG_DATASET (title), 0,
GO_DATA (g_object_ref (dat)),
&err);
if (err)
g_error_free (err);
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 6af671d..d321e75 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -1676,7 +1676,7 @@ xlsx_sheet_page_setup (G_GNUC_UNUSED GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (attr_bool (xin, attrs, "fitToPage", &tmp))
- pi->scaling.type = tmp ? PRINT_SCALE_FIT_PAGES : PRINT_SCALE_PERCENTAGE;
+ pi->scaling.type = tmp ? PRINT_SCALE_FIT_PAGES : PRINT_SCALE_PERCENTAGE;
}
static void
@@ -1707,7 +1707,7 @@ xlsx_paper_size (gdouble width, gdouble height, GtkUnit unit, int code)
if (code == 0) {
name = g_strdup_printf ("xlsx_%ix%i", (int)width, (int)height);
- display_name = g_strdup_printf (_("Paper from XLSX file: %ipt\xE2\xA8\x89%ipt"),
+ display_name = g_strdup_printf (_("Paper from XLSX file: %ipt\xE2\xA8\x89%ipt"),
(int)width, (int)height);
} else {
name = g_strdup_printf ("xlsx_%i", code);
@@ -1859,7 +1859,7 @@ xlsx_set_paper_from_code (PrintInformation *pi, int code)
if (ps != NULL) {
gtk_page_setup_set_paper_size (pi->page_setup, ps);
return TRUE;
- }
+ }
}
return FALSE;
@@ -1897,7 +1897,7 @@ xlsx_CT_PageSetup (GsfXMLIn *xin, xmlChar const **attrs)
{ "downThenOver", 0 },
{ NULL, 0 }
};
-
+
if (pi->page_setup == NULL)
print_info_load_defaults (pi);
@@ -1938,7 +1938,7 @@ xlsx_CT_PageSetup (GsfXMLIn *xin, xmlChar const **attrs)
pi->start_page = -1;
if (!xlsx_set_paper_from_code (pi, paper_code) && width > 0.0 && height > 0.0)
- gtk_page_setup_set_paper_size (pi->page_setup,
+ gtk_page_setup_set_paper_size (pi->page_setup,
xlsx_paper_size (width, height, GTK_UNIT_POINTS, 0));
if (orient_set)
print_info_set_paper_orientation (pi, orient);
@@ -3680,7 +3680,7 @@ xlsx_read_external_book (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/"
"externalLink");
if (rel == NULL)
- rel = gsf_open_pkg_lookup_rel_by_type
+ rel = gsf_open_pkg_lookup_rel_by_type
(gsf_xml_in_get_input (xin),
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/"
"externalLinkPath");
@@ -3703,9 +3703,9 @@ xlsx_read_external_sheetname (GsfXMLIn *xin, xmlChar const **attrs)
if (state->external_ref)
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (0 == strcmp (attrs[0], "val"))
- workbook_sheet_attach
+ workbook_sheet_attach
(state->external_ref,
- state->external_ref_sheet =
+ state->external_ref_sheet =
sheet_new (state->external_ref, attrs[1], 256, 65536));
}
static void
@@ -4035,7 +4035,7 @@ xlsx_numfmt_common (GsfXMLIn *xin, xmlChar const **attrs, gboolean apply)
}
static void
-xlsx_style_numfmt (GsfXMLIn *xin, xmlChar const **attrs)
+xlsx_style_numfmt (GsfXMLIn *xin, xmlChar const **attrs)
{
xlsx_numfmt_common (xin, attrs, FALSE);
}
@@ -4605,7 +4605,7 @@ xlsx_dxf_end (GsfXMLIn *xin, GsfXMLBlob *blob)
}
static void
-xlsx_dxf_numfmt (GsfXMLIn *xin, xmlChar const **attrs)
+xlsx_dxf_numfmt (GsfXMLIn *xin, xmlChar const **attrs)
{
xlsx_numfmt_common (xin, attrs, TRUE);
}
diff --git a/plugins/excel/xlsx-utils.c b/plugins/excel/xlsx-utils.c
index 76834e8..c289151 100644
--- a/plugins/excel/xlsx-utils.c
+++ b/plugins/excel/xlsx-utils.c
@@ -131,16 +131,16 @@ xlsx_conventions_add_extern_ref (GnmConventions *convs, char const *path)
}
static GnmExpr const *
-xlsx_func_map_in (GnmConventions const *convs,
+xlsx_func_map_in (GnmConventions const *convs,
G_GNUC_UNUSED Workbook *scope,
char const *name, GnmExprList *args)
{
XLSXExprConventions const *xconv = (XLSXExprConventions const *)convs;
- GnmExpr const * (*handler) (GnmConventions const *convs, Workbook *scope,
+ GnmExpr const * (*handler) (GnmConventions const *convs, Workbook *scope,
GnmExprList *args);
GnmFunc *f;
char const *new_name;
-
+
if (0 == g_ascii_strncasecmp (name, "_xlfn.", 6)) {
if (NULL != xconv->xlfn_map &&
NULL != (new_name = g_hash_table_lookup (xconv->xlfn_map, name + 6)))
@@ -163,7 +163,7 @@ xlsx_func_map_in (GnmConventions const *convs,
f = gnm_func_lookup_or_add_placeholder (name);
- return gnm_expr_new_funcall (f, args);
+ return gnm_expr_new_funcall (f, args);
}
static void
@@ -182,7 +182,7 @@ xlsx_func_map_out (GnmConventionsOut *out, GnmExprFunction const *func)
if (new_name == NULL) {
char *new_u_name;
new_u_name = g_ascii_strup (name, -1);
- if (func->func->impl_status ==
+ if (func->func->impl_status ==
GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC)
g_string_append (target, "_xlfngnumeric.");
/* LO & friends use _xlfnodf */
@@ -206,7 +206,7 @@ xlsx_func_binominv_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UN
{
GnmFunc *f = gnm_func_lookup_or_add_placeholder ("r.qbinom");
GnmExprList *arg;
-
+
arg = g_slist_nth (args, 2);
args = g_slist_remove_link (args, arg);
args = g_slist_concat (arg, args);
@@ -234,15 +234,15 @@ xlsx_func_dist_handler (GnmExprList *args, guint n_args, char const *name, char
gnm_expr_list_free (arg_cum);
constant = gnm_expr_get_constant (cum);
-
+
if (constant == NULL || !VALUE_IS_NUMBER (constant)) {
args_c = gnm_expr_list_copy (args);
-
- return gnm_expr_new_funcall3
+
+ return gnm_expr_new_funcall3
(f_if, cum,
gnm_expr_new_funcall (f_p, args),
gnm_expr_new_funcall (f_d, args_c));
-
+
} else if (value_is_zero (constant)) {
gnm_expr_free (cum);
return gnm_expr_new_funcall (f_d, args);
@@ -254,35 +254,35 @@ xlsx_func_dist_handler (GnmExprList *args, guint n_args, char const *name, char
}
static GnmExpr const *
-xlsx_func_chisqdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
+xlsx_func_chisqdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
GnmExprList *args)
{
return xlsx_func_dist_handler (args, 3, "chisq.dist", "r.pchisq", "r.dchisq");
}
static GnmExpr const *
-xlsx_func_fdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
+xlsx_func_fdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
GnmExprList *args)
{
return xlsx_func_dist_handler (args, 4, "f.dist", "r.pf", "r.df");
}
static GnmExpr const *
-xlsx_func_lognormdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
+xlsx_func_lognormdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
GnmExprList *args)
{
return xlsx_func_dist_handler (args, 4, "lognorm.dist", "r.plnorm", "r.dlnorm");
}
static GnmExpr const *
-xlsx_func_negbinomdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
+xlsx_func_negbinomdist_handler (G_GNUC_UNUSED GnmConventions const *convs, G_GNUC_UNUSED Workbook *scope,
GnmExprList *args)
{
return xlsx_func_dist_handler (args, 4, "negbinom.dist", "r.pnbinom", "r.dnbinom");
}
static void
-xlsx_write_r_q_func (GnmConventionsOut *out, char const *name, char const *name_rt,
+xlsx_write_r_q_func (GnmConventionsOut *out, char const *name, char const *name_rt,
GnmExprConstPtr const *ptr, int n, int n_p,
gboolean use_lower_tail, gboolean use_log)
{
@@ -295,9 +295,9 @@ xlsx_write_r_q_func (GnmConventionsOut *out, char const *name, char const *name_
g_string_append (target, name_rt);
} else
g_string_append (target, name);
-
+
g_string_append_c (target, '(');
-
+
for (i = 1; i<=n_p; i++) {
gnm_expr_as_gstring (ptr[i], out);
g_string_append_c (target, ',');
@@ -327,22 +327,22 @@ xlsx_write_r_q_func (GnmConventionsOut *out, char const *name, char const *name_
* xlsx_func_r_q_output_handler:
*
* @out: #GnmConventionsOut
- * @func: #GnmExprFunction
+ * @func: #GnmExprFunction
* @n: last index used for a parameter
- * @n_p: index of the probability argument, usually 0
+ * @n_p: index of the probability argument, usually 0
* @name:
*
* Print the appropriate simple function call
*/
static gboolean
-xlsx_func_r_q_output_handler (GnmConventionsOut *out, GnmExprFunction const *func, int n, int n_p,
+xlsx_func_r_q_output_handler (GnmConventionsOut *out, GnmExprFunction const *func, int n, int n_p,
char const *name, char const *name_rt)
{
GnmExprConstPtr const *ptr = func->argv;
GString *target = out->accum;
int use_lower_tail; /* 0: never; 1: always; 2: sometimes */
int use_log; /* 0: never; 1: always; 2: sometimes */
-
+
if (func->argc <= n || func->argc > (n+3))
return FALSE;
@@ -358,13 +358,13 @@ xlsx_func_r_q_output_handler (GnmConventionsOut *out, GnmExprFunction const *fun
GnmValue const *constant = gnm_expr_get_constant (ptr[n+2]);
if (constant == NULL || !VALUE_IS_NUMBER (constant))
use_log = 2;
- else
+ else
use_log = value_is_zero (constant) ? 0 : 1;
} else
use_log = 0;
if (use_lower_tail < 2 && use_log == 0) {
- /* R.Qx(a,b,c) --> name(a,b,c) */
+ /* R.Qx(a,b,c) --> name(a,b,c) */
/* R.Qx(a,b,c) --> name(1-a,b,c) */
xlsx_write_r_q_func (out, name, name_rt, ptr, n, n_p, use_lower_tail, 0);
return TRUE;
@@ -510,7 +510,7 @@ xlsx_string_parser (char const *in, GString *target,
g_string_append_c (target, quote);
in += 2;
} else
- return in + 1;
+ return in + 1;
} else
g_string_append_c (target, *in++);
}
@@ -565,7 +565,7 @@ xlsx_conventions_new (gboolean output)
{"FLOOR", xlsx_func_floor_output_handler},
{NULL, NULL}
};
-
+
static struct {
char const *xlsx_name;
char const *gnm_name;
@@ -608,7 +608,7 @@ xlsx_conventions_new (gboolean output)
{ "WEIBULL.DIST", "WEIBULL" },
{ "Z.TEST", "ZTEST" },
{ NULL, NULL }
- };
+ };
GnmConventions *convs = gnm_conventions_new_full (
sizeof (XLSXExprConventions));
XLSXExprConventions *xconv = (XLSXExprConventions *)convs;
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index 3c77bd8..bb24bea 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -341,6 +341,7 @@ xlsx_write_one_plot (XLSXWriteState *state, GsfXMLOut *xml, GogObject const *cha
GogAxis *crossed = gog_axis_base_get_crossed_axis (GOG_AXIS_BASE (ptr->data));
GogAxisPosition pos;
GogGridLine *grid;
+ GOFormat *format;
if (gog_axis_is_discrete (ptr->data))
gsf_xml_out_start_element (xml, "c:catAx");
else
@@ -386,6 +387,12 @@ xlsx_write_one_plot (XLSXWriteState *state, GsfXMLOut *xml, GogObject const *cha
xlsx_write_go_style (xml, go_styled_object_get_style
(GO_STYLED_OBJECT (grid)));
gsf_xml_out_end_element (xml);
}
+ gsf_xml_out_start_element (xml, "c:numFmt");
+ format = gog_axis_get_format (GOG_AXIS (ptr->data));
+ gsf_xml_out_add_bool (xml, "sourceLinked", format == NULL ||
go_format_is_general (format));
+ format = gog_axis_get_effective_format (GOG_AXIS (ptr->data));
+ gsf_xml_out_add_cstr (xml, "formatCode", (format)? go_format_as_XL (format):
"General");
+ gsf_xml_out_end_element (xml);
/* finished with axis */
gsf_xml_out_end_element (xml);
@@ -474,7 +481,7 @@ xlsx_write_object_anchor (GsfXMLOut *xml, GnmCellPos const *pos, char const *ele
/* FIXME: scaling horizontally just like in xlsx_CT_Col */
gsf_xml_out_start_element (xml, element);
gsf_xml_out_simple_int_element (xml, "xdr:col", pos->col);
- gsf_xml_out_simple_int_element (xml, "xdr:colOff",
+ gsf_xml_out_simple_int_element (xml, "xdr:colOff",
xlsx_pts_to_emu (col_off_pts * 1.16191275167785));
gsf_xml_out_simple_int_element (xml, "xdr:row", pos->row);
gsf_xml_out_simple_int_element (xml, "xdr:rowOff",
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index 1995b95..c3d4a9c 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -208,7 +208,7 @@ static char const * const pats[] = {
"lightGrid", /* 17 */
"lightTrellis", /* 18 */
/* Not in Excel */
- "lightVertical", /* 19 */
+ "lightVertical", /* 19 */
"darkHorizontal", /* 20 */
"lightGray", /* 21 */
"lightGray", /* 22 */
@@ -2438,14 +2438,14 @@ xlsx_find_paper_code (GtkPaperSize *psize)
return 5;
width_mm = (int) gtk_paper_size_get_width (psize, GTK_UNIT_MM);
-
+
for (paper_defs = paper; paper_defs->code > 0; paper_defs++) {
if (width_mm < paper_defs->width_mm)
return 0;
if (width_mm == paper_defs->width_mm) {
gdouble width = gtk_paper_size_get_width (psize, paper_defs->unit);
gdouble height = gtk_paper_size_get_height (psize, paper_defs->unit);
-
+
if (width == paper_defs->width && height == paper_defs->height)
return paper_defs->code;
}
@@ -2553,10 +2553,10 @@ xlsx_write_print_info (XLSXWriteState *state, GsfXMLOut *xml)
} else
gsf_xml_out_add_cstr_unchecked (xml, "orientation", "default");
- gsf_xml_out_add_cstr_unchecked
- (xml, "pageOrder",
+ gsf_xml_out_add_cstr_unchecked
+ (xml, "pageOrder",
pi->print_across_then_down ? "overThenDown" : "downThenOver");
-
+
if (pi->page_setup) {
GtkPaperSize *psize;
int paper_code;
@@ -2569,14 +2569,14 @@ xlsx_write_print_info (XLSXWriteState *state, GsfXMLOut *xml)
else {
gdouble width = gtk_paper_size_get_width (psize, GTK_UNIT_POINTS);
gdouble height = gtk_paper_size_get_height (psize, GTK_UNIT_POINTS);
-
+
xlsx_add_pt (xml, "paperHeight", height);
xlsx_add_pt (xml, "paperWidth", width);
}
}
- if (pi->scaling.percentage.x > 0)
- gsf_xml_out_add_int (xml, "scale",
+ if (pi->scaling.percentage.x > 0)
+ gsf_xml_out_add_int (xml, "scale",
(int)CLAMP (pi->scaling.percentage.x, 10, 400));
xlsx_add_bool (xml, "useFirstPageNumber", (pi->start_page >= 0));
/* usePrinterDefaults skipped */
@@ -2712,7 +2712,7 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *dir, GsfOutfile *wb_part, u
/* element sheetPr { CT_SheetPr }?, */
gsf_xml_out_start_element (xml, "sheetPr");
-
+
pi = state->sheet->print_info;
if (pi != NULL) {
gsf_xml_out_start_element (xml, "pageSetUpPr");
@@ -2726,7 +2726,7 @@ xlsx_write_sheet (XLSXWriteState *state, GsfOutfile *dir, GsfOutfile *wb_part, u
gsf_xml_out_end_element (xml); /* </tabColor> */
}
gsf_xml_out_end_element (xml); /* </sheetPr> */
-
+
/* element dimension { CT_SheetDimension }?, */
gsf_xml_out_start_element (xml, "dimension");
xlsx_add_range (xml, "ref", &extent);
diff --git a/plugins/html/html.c b/plugins/html/html.c
index 5a07597..7ae9c53 100644
--- a/plugins/html/html.c
+++ b/plugins/html/html.c
@@ -476,7 +476,7 @@ html_write_border_style_40 (GsfOutput *output, GnmStyle const *style)
}
static void
-html_write_border_style_40_for_merged_cell (GsfOutput *output, GnmStyle const *style,
+html_write_border_style_40_for_merged_cell (GsfOutput *output, GnmStyle const *style,
Sheet *sheet, gint row, gint col)
{
GnmBorder *border;
diff --git a/plugins/html/latex.c b/plugins/html/latex.c
index e733df2..6743108 100644
--- a/plugins/html/latex.c
+++ b/plugins/html/latex.c
@@ -758,7 +758,7 @@ latex2e_find_vline (int col, int row, Sheet *sheet, GnmStyleElement which_border
if (result == GNM_STYLE_BORDER_NONE)
return GNM_STYLE_BORDER_NONE;
-
+
pos.col = col;
pos.row = row;
range = gnm_sheet_merge_contains_pos (sheet, &pos);
@@ -768,7 +768,7 @@ latex2e_find_vline (int col, int row, Sheet *sheet, GnmStyleElement which_border
|| (which_border == MSTYLE_BORDER_RIGHT&& col == range->end.col))
return result;
else
- return GNM_STYLE_BORDER_NONE;
+ return GNM_STYLE_BORDER_NONE;
}
return result;
}
@@ -1194,7 +1194,7 @@ latex2e_find_hhlines (GnmStyleBorderType *clines, G_GNUC_UNUSED int length, int
return FALSE;
}
}
-
+
return TRUE;
}
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index cc7bb5f..c548eaa 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -286,13 +286,13 @@ typedef struct {
gint z_index;
/* Plot Area */
- gnm_float plot_area_x;
+ gnm_float plot_area_x;
gnm_float plot_area_y;
- gnm_float plot_area_width;
+ gnm_float plot_area_width;
gnm_float plot_area_height;
/* Legend */
- gnm_float legend_x;
+ gnm_float legend_x;
gnm_float legend_y;
GogObjectPosition legend_flag;
@@ -1183,13 +1183,13 @@ oo_parse_spec_distance (char const *str, gnm_float *pts)
} else if (0 == strncmp (end, "in", 2)) {
num = GO_IN_TO_PT (num);
end += 2;
- } else
+ } else
return GINT_TO_POINTER(1);
} else return NULL;
*pts = num;
return end;
-
+
}
/* returns pts */
@@ -2511,7 +2511,7 @@ odf_validation_new_single_expr (GsfXMLIn *xin, odf_validation_t *val,
odf_init_pp (&pp, xin, val->base_cell_address);
flag = (pp.sheet == NULL || state->pos.sheet == pp.sheet)
- ? GNM_EXPR_PARSE_DEFAULT
+ ? GNM_EXPR_PARSE_DEFAULT
: GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES;
texpr = oo_expr_parse_str (xin, start, &pp, flag, val->f_type);
@@ -2552,7 +2552,7 @@ odf_validation_new_pair_expr (GsfXMLIn *xin, odf_validation_t *val,
odf_init_pp (&pp, xin, val->base_cell_address);
flag = (pp.sheet == NULL || state->pos.sheet == pp.sheet)
- ? GNM_EXPR_PARSE_DEFAULT
+ ? GNM_EXPR_PARSE_DEFAULT
: GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES;
while (1) {
@@ -2716,7 +2716,7 @@ odf_validation_get_input_message (GsfXMLIn *xin, char const *name)
{
OOParseState *state = (OOParseState *)xin->user_state;
odf_validation_t *val = g_hash_table_lookup (state->validations, name);
-
+
if (val == NULL)
return NULL;
@@ -2764,7 +2764,7 @@ odf_validations_translate (GsfXMLIn *xin, char const *name)
oo_warning (xin, _("Unsupported validation condition "
"encountered: \"%s\" with base address: \"%s\""),
val->condition, val->base_cell_address);
-
+
return NULL;
}
@@ -3809,7 +3809,7 @@ oo_cell_start (GsfXMLIn *xin, xmlChar const **attrs)
texpr = oo_expr_parse_str
(xin, expr_string,
&state->pos, GNM_EXPR_PARSE_DEFAULT, f_type);
- if (possible_error_constant && texpr != NULL &&
+ if (possible_error_constant && texpr != NULL &&
GNM_EXPR_GET_OPER (texpr->expr) == GNM_EXPR_OP_CONSTANT) {
GnmValue const *eval = gnm_expr_get_constant (texpr->expr);
if (VALUE_IS_ERROR (eval)) {
@@ -3901,7 +3901,7 @@ oo_cell_start (GsfXMLIn *xin, xmlChar const **attrs)
"content-validation-name"))
validation_name = attrs[1];
}
-
+
if (columns_spanned_fake)
merge_cols = 1;
@@ -4690,8 +4690,8 @@ oo_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
switch (state->cur_style.type) {
case OO_STYLE_CELL :
if (state->cur_style.cells != NULL) {
- odf_style_set_align_h (state->cur_style.cells->style,
- state->h_align_is_valid,
+ odf_style_set_align_h (state->cur_style.cells->style,
+ state->h_align_is_valid,
state->repeat_content,
state->text_align, state->gnm_halign);
odf_oo_cell_style_unref (state->cur_style.cells);
@@ -5088,7 +5088,7 @@ oo_date_text_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
if (xin->content->len > state->cur_format.offset)
oo_date_text_append (state, xin->content->str + state->cur_format.offset,
xin->content->len - state->cur_format.offset);
-
+
if (state->cur_format.string_opened) {
g_string_append_c (state->cur_format.accum, '"');
state->cur_format.string_opened = FALSE;
@@ -5308,10 +5308,10 @@ odf_number (GsfXMLIn *xin, xmlChar const **attrs)
*zero = '?';
min_i_chars--;
}
- } else
+ } else
go_format_generate_number_str (state->cur_format.accum, min_i_digits, decimal_places,
grouping, FALSE, FALSE, NULL, NULL);
-
+
} else
g_string_append (state->cur_format.accum, go_format_as_XL (go_format_general ()));
}
@@ -5415,16 +5415,16 @@ odf_format_invisible_text (GsfXMLIn *xin, xmlChar const **attrs)
if (cnt_len == 1) {
state->cur_format.offset += 1;
-
+
} else if (cnt_len > 1) {
oo_date_text_append (state, cnt, cnt_len - 1);
state->cur_format.offset += cnt_len;
}
-
+
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT, "char"))
text = CXML2C (attrs[1]);
-
+
if (text != NULL) {
if (state->cur_format.string_opened) {
g_string_append_c (state->cur_format.accum, '"');
@@ -5846,7 +5846,7 @@ odf_page_layout (GsfXMLIn *xin, xmlChar const **attrs)
name = "Missing page layout identifier";
}
state->print.cur_pi = print_information_new (TRUE);
- g_hash_table_insert (state->styles.page_layouts, g_strdup (name),
+ g_hash_table_insert (state->styles.page_layouts, g_strdup (name),
state->print.cur_pi);
}
@@ -5908,7 +5908,7 @@ odf_master_page (GsfXMLIn *xin, xmlChar const **attrs)
print_hf_free (state->print.cur_pi->footer);
state->print.cur_pi->header = print_hf_new (NULL, NULL, NULL);
state->print.cur_pi->footer = print_hf_new (NULL, NULL, NULL);
-
+
g_hash_table_insert (state->styles.master_pages, g_strdup (name), state->print.cur_pi);
}
@@ -6014,7 +6014,7 @@ odf_hf_item_start (GsfXMLIn *xin)
oo_text_p_t *ptr = state->text_p_stack->data;
odf_text_p_add_text (state, xin->content->str + ptr->offset);
ptr->offset = strlen (xin->content->str);
- }
+ }
}
static void
@@ -6200,8 +6200,8 @@ oo_set_gnm_border (G_GNUC_UNUSED GsfXMLIn *xin, GnmStyle *style,
old_border = gnm_style_get_border (style, location);
new_border = gnm_style_border_fetch (border_style,
- old_border ?
- style_color_ref(old_border->color)
+ old_border ?
+ style_color_ref(old_border->color)
: style_color_black (),
gnm_style_border_get_orientation (loc));
gnm_style_set_border (style, location, new_border);
@@ -6251,7 +6251,7 @@ oo_parse_border (GsfXMLIn *xin, GnmStyle *style,
border_style = GNM_STYLE_BORDER_DOTTED;
else
border_style = GNM_STYLE_BORDER_DOUBLE;
-
+
border = gnm_style_border_fetch (border_style, color,
gnm_style_border_get_orientation (loc));
border->width = pts;
@@ -6472,14 +6472,14 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
gnm_style_set_font_script (style, GO_FONT_SCRIPT_SUPER);
else if (g_str_has_prefix (attrs[1], "sub"))
gnm_style_set_font_script (style, GO_FONT_SCRIPT_SUB);
- else
+ else
gnm_style_set_font_script (style, GO_FONT_SCRIPT_STANDARD);
} else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_FO, "margin-left")) {
tmp_f = 0.;
oo_parse_distance (xin, attrs[1], "margin-left", &tmp_f);
gnm_style_set_indent (style, tmp_f);
}
-
+
if (strike_through_style != -1 || strike_through_type != -1)
gnm_style_set_font_strike (style, strike_through_style > 0 ||
(strike_through_type > 0 && strike_through_style == -1));
@@ -6497,7 +6497,7 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
underline = UNDERLINE_DOUBLE_LOW;
} else {
underline = UNDERLINE_DOUBLE;
- }
+ }
break;
case 1:
default:
@@ -6511,7 +6511,7 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
}
gnm_style_set_font_uline (style, underline);
}
-
+
if (gnm_pattern > 0)
gnm_style_set_pattern (style, gnm_pattern);
if (gnm_b_color)
@@ -6590,12 +6590,12 @@ oo_style_prop_table (GsfXMLIn *xin, xmlChar const **attrs)
if (oo_attr_bool (xin, attrs, OO_NS_TABLE, "display", &tmp_b)) {
if (!tmp_b)
style->visibility = GNM_SHEET_VISIBILITY_HIDDEN;
- } else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "display-formulas",
+ } else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "display-formulas",
&style->display_formulas)) {
- } else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "display-col-header",
+ } else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "display-col-header",
&tmp_b)) {
style->hide_col_header = !tmp_b;
- } else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "display-row-header",
+ } else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "display-row-header",
&tmp_b)) {
style->hide_row_header = !tmp_b;
} else if (oo_attr_enum (xin, attrs, OO_NS_STYLE, "writing-mode", modes, &tmp_i))
@@ -7535,7 +7535,7 @@ oo_db_range_start (GsfXMLIn *xin, xmlChar const **attrs)
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_TABLE, "target-range-address"))
- target = CXML2C (attrs[1]);
+ target = CXML2C (attrs[1]);
else if (oo_attr_bool (xin, attrs, OO_NS_TABLE, "display-filter-buttons", &buttons))
/* ignore this */;
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_TABLE, "name"))
@@ -8085,7 +8085,7 @@ od_draw_object (GsfXMLIn *xin, xmlChar const **attrs)
if (state->chart.width != go_nan)
g_object_set (state->chart.graph, "width-pts", state->chart.width, NULL);
if (state->chart.height != go_nan)
- g_object_set (state->chart.graph, "height-pts", state->chart.height, NULL);
+ g_object_set (state->chart.graph, "height-pts", state->chart.height, NULL);
pop_hash (&state->chart.saved_graph_styles, &state->chart.graph_styles);
pop_hash (&state->chart.saved_hatches, &state->chart.hatches);
@@ -8304,7 +8304,7 @@ oo_chart_title_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
g_object_set (label,
"is-position-manual", state->chart.title_manual_pos,
NULL);
-
+
if (state->chart.title_manual_pos) {
if (go_finite (state->chart.width) && go_finite (state->chart.height)) {
GogViewAllocation alloc;
@@ -8613,17 +8613,17 @@ oo_legend_set_position (OOParseState *state)
if (legend == NULL)
return;
-
- if (go_finite (state->chart.legend_x) && go_finite (state->chart.legend_y) &&
+
+ if (go_finite (state->chart.legend_x) && go_finite (state->chart.legend_y) &&
go_finite (state->chart.width) && go_finite (state->chart.height)) {
GogViewAllocation alloc;
alloc.x = (state->chart.legend_x - state->chart.plot_area_x) / state->chart.plot_area_width;
alloc.w = 0;
alloc.y = (state->chart.legend_y - state->chart.plot_area_y) / state->chart.plot_area_height;
alloc.h = 0;
-
+
gog_object_set_position_flags (legend, GOG_POSITION_MANUAL, GOG_POSITION_ANY_MANUAL);
- gog_object_set_manual_position (legend, &alloc);
+ gog_object_set_manual_position (legend, &alloc);
} else
gog_object_set_position_flags (legend, state->chart.legend_flag,
GOG_POSITION_COMPASS | GOG_POSITION_ALIGNMENT);
@@ -8777,7 +8777,7 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
if (state->chart.i_plot_styles[OO_CHART_STYLE_PLOTAREA] != NULL)
oo_prop_list_apply (state->chart.i_plot_styles[OO_CHART_STYLE_PLOTAREA]->
- plot_props, G_OBJECT (state->chart.plot));
+ plot_props, G_OBJECT (state->chart.plot));
if (go_finite (x) && go_finite (y) &&
go_finite (width) && go_finite (height) &&
@@ -8787,7 +8787,7 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
alloc.w = width / state->chart.width;
alloc.y = y / state->chart.height;
alloc.h = height / state->chart.height;
-
+
gog_object_set_position_flags (GOG_OBJECT (state->chart.chart),
GOG_POSITION_MANUAL, GOG_POSITION_ANY_MANUAL);
gog_object_set_manual_position (GOG_OBJECT (state->chart.chart), &alloc);
@@ -9370,7 +9370,7 @@ oo_chart (GsfXMLIn *xin, xmlChar const **attrs)
go_style->line.width = pts;
go_style->line.dash_type = GO_LINE_SOLID;
go_styled_object_style_changed (GO_STYLED_OBJECT
(state->chart.chart));
- }
+ }
}
}
}
@@ -9432,7 +9432,7 @@ oo_legend (GsfXMLIn *xin, xmlChar const **attrs)
if (chart_style)
odf_apply_style_props (xin, chart_style->style_props, style);
else
- oo_warning (xin, _("Chart style with name '%s' is missing."),
+ oo_warning (xin, _("Chart style with name '%s' is missing."),
style_name);
g_object_unref (style);
}
@@ -9474,7 +9474,7 @@ oo_chart_grid (GsfXMLIn *xin, xmlChar const **attrs)
if (chart_style)
odf_apply_style_props (xin, chart_style->style_props, style);
else
- oo_warning (xin, _("Chart style with name '%s' is missing."),
+ oo_warning (xin, _("Chart style with name '%s' is missing."),
style_name);
g_object_unref (style);
}
@@ -9504,7 +9504,7 @@ oo_chart_wall (GsfXMLIn *xin, xmlChar const **attrs)
if (chart_style)
odf_apply_style_props (xin, chart_style->style_props, style);
else
- oo_warning (xin, _("Chart style with name '%s' is missing."),
+ oo_warning (xin, _("Chart style with name '%s' is missing."),
style_name);
g_object_unref (style);
}
@@ -9949,7 +9949,7 @@ odf_custom_shape_end (GsfXMLIn *xin, GsfXMLBlob *blob)
}
paths = g_ptr_array_new_with_free_func ((GDestroyNotify) go_path_free);
-
+
if (state->chart.cs_enhanced_path != NULL) {
strs = g_strsplit (state->chart.cs_enhanced_path, " N", 0);
for (cur = strs; *cur != NULL; cur++) {
@@ -9960,7 +9960,7 @@ odf_custom_shape_end (GsfXMLIn *xin, GsfXMLBlob *blob)
}
g_strfreev (strs);
}
-
+
if (vals)
g_hash_table_unref (vals);
@@ -10789,7 +10789,7 @@ odf_apply_ooo_table_config (char const *key, GValue *val, OOParseState *state)
pos.row = vsp;
sv_freeze_panes (sv, &fpos, &pos);
}
-
+
item = g_hash_table_lookup (hash, "PositionRight");
} else {
item = g_hash_table_lookup (hash, "PositionLeft");
@@ -10801,7 +10801,7 @@ odf_apply_ooo_table_config (char const *key, GValue *val, OOParseState *state)
if (item != NULL && G_VALUE_HOLDS(item, G_TYPE_INT))
pos_bottom = g_value_get_int (item);
- sv_set_initial_top_left (sv, pos_left, pos_bottom);
+ sv_set_initial_top_left (sv, pos_left, pos_bottom);
}
}
}
@@ -11024,7 +11024,7 @@ odf_preparse_cell_start (GsfXMLIn *xin, xmlChar const **attrs)
state->col_inc = 1;
- for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
+ for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (oo_attr_int_range (xin, attrs, OO_NS_TABLE, "number-columns-repeated",
&state->col_inc, 0, INT_MAX));
@@ -11041,7 +11041,7 @@ odf_preparse_covered_cell_start (GsfXMLIn *xin, xmlChar const **attrs)
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (oo_attr_int_range (xin, attrs, OO_NS_TABLE, "number-columns-repeated",
&state->col_inc, 0, INT_MAX));
- state->pos.eval.col += state->col_inc;
+ state->pos.eval.col += state->col_inc;
}
@@ -11111,7 +11111,7 @@ GSF_XML_IN_NODE (NUMBER_STYLE_NUMBER, NUMBER_EMBEDDED_TEXT, OO_NS_NUMBER, "embed
GSF_XML_IN_NODE (NUMBER_STYLE, NUMBER_TEXT_PROP, OO_NS_STYLE, "text-properties",
GSF_XML_NO_CONTENT, &odf_number_color, NULL),
GSF_XML_IN_NODE (NUMBER_STYLE, FORMAT_TEXT_INVISIBLE, OO_GNUM_NS_EXT, "invisible", GSF_XML_NO_CONTENT,
NULL, NULL), /* 2nd */
GSF_XML_IN_NODE (NUMBER_STYLE, NUMBER_FILL_CHARACTER, OO_NS_NUMBER, "fill-character",
GSF_XML_NO_CONTENT, NULL, NULL),
-
+
GSF_XML_IN_NODE (OFFICE_STYLES, DATE_STYLE, OO_NS_NUMBER, "date-style", GSF_XML_NO_CONTENT,
&oo_date_style, &oo_date_style_end),
GSF_XML_IN_NODE (DATE_STYLE, DATE_DAY, OO_NS_NUMBER, "day", GSF_XML_NO_CONTENT,
&oo_date_day, NULL),
GSF_XML_IN_NODE (DATE_STYLE, DATE_MONTH, OO_NS_NUMBER, "month", GSF_XML_NO_CONTENT,
&oo_date_month, NULL),
@@ -12777,7 +12777,7 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
oconv->state->openformula_namemap = namemap;
} else
namemap = oconv->state->openformula_namemap;
-
+
if (NULL == oconv->state->openformula_handlermap) {
guint i;
handlermap = g_hash_table_new (go_ascii_strcase_hash,
@@ -13098,7 +13098,7 @@ openoffice_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *io_cont
content_malformed = !gsf_xml_in_doc_parse (doc, contents, &state);
gsf_xml_in_doc_free (doc);
odf_clear_conventions (&state);
-
+
odf_fix_expr_names (&state);
}
@@ -13125,7 +13125,7 @@ openoffice_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *io_cont
if (state.settings.stack != NULL) {
go_cmd_context_error_import (GO_CMD_CONTEXT (io_context),
_("settings.xml stream is malformed!"));
- g_slist_free_full (state.settings.stack,
+ g_slist_free_full (state.settings.stack,
(GDestroyNotify) g_hash_table_unref);
state.settings.stack = NULL;
}
@@ -13213,8 +13213,8 @@ openoffice_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *io_cont
g_object_unref (zip);
- if (content_malformed)
- go_io_error_string (io_context, _("XML document not well formed!"));
+ if (content_malformed)
+ go_io_error_string (io_context, _("XML document not well formed!"));
i = workbook_sheet_count (state.pos.wb);
while (i-- > 0)
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 3378b0e..ad8ddde 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -939,7 +939,7 @@ odf_write_gog_position_pts (GnmOOExport *state, GogObject const *title)
g_object_get (G_OBJECT (title),
"is-position-manual", &is_position_manual,
NULL);
-
+
if (is_position_manual) {
GogView *view = gog_view_find_child_view (state->root_view, title);
odf_add_pt (state->xml, SVG "x", view->allocation.x);
@@ -955,7 +955,7 @@ odf_write_gog_position (GnmOOExport *state, GogObject const *obj)
if (!state->with_extension)
return;
-
+
(void)gnm_object_has_readable_prop (obj, "compass",
G_TYPE_NONE, &compass);
g_object_get (G_OBJECT (obj),
@@ -1555,7 +1555,7 @@ odf_save_style_map (GnmOOExport *state, GnmStyleCond const *cond, GnmRange *r)
default:
break;
}
-
+
switch (op) {
case GNM_STYLE_COND_BETWEEN:
odf_determine_base (state, r, &pp);
@@ -2642,7 +2642,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
oconv->state->openformula_namemap = namemap;
} else
namemap = oconv->state->openformula_namemap;
-
+
if (NULL == oconv->state->openformula_handlermap) {
guint i;
handlermap = g_hash_table_new (go_ascii_strcase_hash,
@@ -2969,7 +2969,7 @@ odf_write_custom_shape (GnmOOExport *state, SheetObject *so)
char *path_string = NULL;
char *view_box = NULL;
- g_object_get (G_OBJECT (so), "text", &text, "markup", &markup, "path", &path,
+ g_object_get (G_OBJECT (so), "text", &text, "markup", &markup, "path", &path,
"paths", &paths, "viewbox", &view_box, NULL);
gsf_xml_out_start_element (state->xml, DRAW "custom-shape");
@@ -3495,7 +3495,7 @@ write_col_style (GnmOOExport *state, GnmStyle *col_style, ColRowInfo const *ci,
gsf_xml_out_add_cstr (state->xml, TABLE "style-name", name);
if (ci != NULL && !ci->visible)
- gsf_xml_out_add_cstr (state->xml, TABLE "visibility", ci->in_filter ? "filter" : "collapse");
+ gsf_xml_out_add_cstr (state->xml, TABLE "visibility", ci->in_filter ? "filter" : "collapse");
}
static void
@@ -3707,7 +3707,7 @@ odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to
if (rf) {
int col;
-
+
for (col = 0; col < row_length; col++) {
GnmCell *current_cell;
GnmRange const *merge_range;
@@ -3715,7 +3715,7 @@ odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to
GnmStyle const *this_style = row_styles
? row_styles[col]
: col_styles[col];
-
+
current_cell = g_ptr_array_index (all_cells, cno);
if (current_cell &&
current_cell->pos.row == row &&
@@ -3764,7 +3764,7 @@ odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to
odf_write_cell (state, current_cell, merge_range, this_style, objects);
g_slist_free (objects);
-
+
}
} else
null_cell = row_length;
@@ -4018,7 +4018,7 @@ odf_write_sheet_control_list (GnmOOExport *state, SheetObject *so,
as_index ? "selection-indices" : "selection");
if (is_listbox)
gsf_xml_out_add_int (state->xml, FORM "bound-column", 1);
- gsf_xml_out_end_element (state->xml);
+ gsf_xml_out_end_element (state->xml);
}
static void
@@ -4534,7 +4534,7 @@ odf_print_spreadsheet_content_validations (GnmOOExport *state)
if (msg) {
char const * msg_content = gnm_input_msg_get_msg (msg);
char const * msg_title = gnm_input_msg_get_title (msg);
-
+
if (msg_content != NULL || msg_title != NULL) {
gsf_xml_out_start_element (state->xml,
TABLE "help-message");
@@ -4548,18 +4548,18 @@ odf_print_spreadsheet_content_validations (GnmOOExport *state)
g_object_get (G_OBJECT (state->xml), "pretty-print", &pp,
NULL);
g_object_set (G_OBJECT (state->xml), "pretty-print", FALSE,
NULL);
gsf_xml_out_start_element (state->xml, TEXT "p");
- odf_add_chars (state, msg_content, strlen (msg_content),
+ odf_add_chars (state, msg_content, strlen (msg_content),
&white_written);
gsf_xml_out_end_element (state->xml); /* p */
g_object_set (G_OBJECT (state->xml), "pretty-print", pp,
NULL);
}
-
+
gsf_xml_out_end_element (state->xml);
/* help message written */
}
}
- if (val) {
+ if (val) {
/* writing error message */
gsf_xml_out_start_element (state->xml,
TABLE "error-message");
@@ -4580,7 +4580,7 @@ odf_print_spreadsheet_content_validations (GnmOOExport *state)
gsf_xml_out_add_cstr_unchecked (state->xml, TABLE "message-type",
message_type);
if (val->title != NULL)
gsf_xml_out_add_cstr (state->xml, TABLE "title", val->title->str);
-
+
if (val->msg != NULL && go_string_get_len (val->msg) > 0) {
gboolean white_written = TRUE;
gboolean pp = TRUE;
@@ -4591,7 +4591,7 @@ odf_print_spreadsheet_content_validations (GnmOOExport *state)
gsf_xml_out_end_element (state->xml); /* p */
g_object_set (G_OBJECT (state->xml), "pretty-print", pp, NULL);
}
-
+
gsf_xml_out_end_element (state->xml);
/* error message written */
}
@@ -4935,7 +4935,7 @@ odf_render_date (GnmOOExport *state, char const *args)
{
const char *style_name = NULL;
- if (args != NULL)
+ if (args != NULL)
style_name = xl_find_format_xl (state, args);
gsf_xml_out_start_element (state->xml, TEXT "date");
@@ -5924,7 +5924,7 @@ odf_write_ooo_settings (GnmOOExport *state)
gsf_xml_out_start_element (state->xml, CONFIG "config-item");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "HasColumnRowHeaders");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "boolean");
- odf_add_bool (state->xml, NULL,
+ odf_add_bool (state->xml, NULL,
(!sheet->hide_col_header) || !sheet->hide_row_header);
gsf_xml_out_end_element (state->xml); /* </config:config-item> */
@@ -5954,7 +5954,7 @@ odf_write_ooo_settings (GnmOOExport *state)
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "VerticalSplitPosition");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
gsf_xml_out_add_int (state->xml, NULL, sv->unfrozen_top_left.row);
- gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+ gsf_xml_out_end_element (state->xml); /* </config:config-item> */
gsf_xml_out_start_element (state->xml, CONFIG "config-item");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionLeft");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
@@ -5986,7 +5986,7 @@ odf_write_ooo_settings (GnmOOExport *state)
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "name", "PositionBottom");
gsf_xml_out_add_cstr_unchecked (state->xml, CONFIG "type", "int");
gsf_xml_out_add_int (state->xml, NULL, sv->initial_top_left.row);
- gsf_xml_out_end_element (state->xml); /* </config:config-item> */
+ gsf_xml_out_end_element (state->xml); /* </config:config-item> */
gsf_xml_out_end_element (state->xml); /* </config:config-item-map-entry> */
}
@@ -6198,7 +6198,7 @@ odf_write_data_element_range (GnmOOExport *state, GnmParsePos *pp, GnmExprTop c
char *str;
switch (GNM_EXPR_GET_OPER (texpr->expr)) {
- case GNM_EXPR_OP_CONSTANT:
+ case GNM_EXPR_OP_CONSTANT:
if (VALUE_IS_CELLRANGE (texpr->expr->constant.value)) {
str = gnm_expr_top_as_string (texpr, pp, state->conv);
gsf_xml_out_add_cstr (state->xml, attribute,
@@ -6214,8 +6214,13 @@ odf_write_data_element_range (GnmOOExport *state, GnmParsePos *pp, GnmExprTop c
GString *gstr = g_string_new (NULL);
for (i = 0; i < expr->set.argc; i++) {
GnmExpr const *expr_arg = expr->set.argv[i];
+<<<<<<< HEAD
if (GNM_EXPR_GET_OPER (expr_arg) == GNM_EXPR_OP_CONSTANT &&
VALUE_IS_CELLRANGE (expr_arg->constant.value)) {
+=======
+ if (GNM_EXPR_GET_OPER (expr_arg) == GNM_EXPR_OP_CONSTANT &&
+ expr_arg->constant.value->type == VALUE_CELLRANGE) {
+>>>>>>> Use goc_canvas_invalidate_region() for ants walking.
char *str = gnm_expr_as_string (expr_arg, pp, state->conv);
if (gstr->len > 0)
g_string_append_c (gstr, ' ');
@@ -6235,7 +6240,7 @@ odf_write_data_element_range (GnmOOExport *state, GnmParsePos *pp, GnmExprTop c
default:
break;
}
-
+
/* ODF does not support anything else but we write it anyways */
str = gnm_expr_top_as_string (texpr, pp, state->conv);
gsf_xml_out_add_cstr (state->xml, attribute, str);
@@ -6602,7 +6607,7 @@ odf_write_interpolation_attribute (GnmOOExport *state,
gchar *interpolation = NULL;
g_object_get (G_OBJECT (series),
- "interpolation", &interpolation,
+ "interpolation", &interpolation,
NULL);
if (interpolation != NULL) {
@@ -7162,7 +7167,7 @@ odf_write_gog_style_graphic (GnmOOExport *state, GOStyle const *style, gboolean
{
char const *image_types[] =
{"stretch", "repeat", "no-repeat"};
-
+
if (!style)
return;
@@ -7285,7 +7290,7 @@ odf_write_gog_style_graphic (GnmOOExport *state, GOStyle const *style, gboolean
gsf_xml_out_add_cstr (state->xml, SVG "stroke-color", s);
g_free (s);
} else if (state->with_extension)
- odf_add_bool (state->xml, GNMSTYLE "auto-color", TRUE);
+ odf_add_bool (state->xml, GNMSTYLE "auto-color", TRUE);
} else {
gsf_xml_out_add_cstr (state->xml, DRAW "stroke", "none");
}
@@ -7848,14 +7853,14 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *graph,
g_object_get (G_OBJECT (legend),
"is-position-manual", &is_position_manual,
NULL);
- if (is_position_manual)
+ if (is_position_manual)
odf_write_gog_position_pts (state, legend);
else {
flags = gog_object_get_position_flags
(legend, GOG_POSITION_COMPASS);
if (flags) {
GString *compass = g_string_new (NULL);
-
+
if (flags & GOG_POSITION_N)
g_string_append (compass, "top");
if (flags & GOG_POSITION_S)
@@ -7867,11 +7872,11 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *graph,
g_string_append (compass, "end");
if (flags & GOG_POSITION_W)
g_string_append (compass, "start");
-
+
gsf_xml_out_add_cstr (state->xml,
CHART "legend-position",
compass->str);
-
+
g_string_free (compass, TRUE);
}
}
@@ -8542,7 +8547,7 @@ openoffice_file_save_real (G_GNUC_UNUSED GOFileSaver const *fs, GOIOContext *io
if (state.openformula_namemap)
g_hash_table_destroy (state.openformula_namemap);
if (state.openformula_handlermap)
- g_hash_table_destroy (state.openformula_handlermap);
+ g_hash_table_destroy (state.openformula_handlermap);
go_io_value_progress_update (state.ioc, PROGRESS_STEPS);
go_io_progress_unset (state.ioc);
diff --git a/src/application.c b/src/application.c
index bd6185d..4a61ef3 100644
--- a/src/application.c
+++ b/src/application.c
@@ -169,7 +169,7 @@ gnm_app_sanity_check (void)
if (err)
g_error ("Sanity check failed\n");
}
-
+
/**
diff --git a/src/cmd-edit.c b/src/cmd-edit.c
index d3e186d..8376545 100644
--- a/src/cmd-edit.c
+++ b/src/cmd-edit.c
@@ -302,7 +302,7 @@ cmd_paste (WorkbookControl *wbc, GnmPasteTarget const *pt)
dst = pt->range;
/* Check for locks */
- if (cmd_cell_range_is_locked_effective (pt->sheet, &dst, wbc,
+ if (cmd_cell_range_is_locked_effective (pt->sheet, &dst, wbc,
_("Paste")))
return ;
diff --git a/src/dependent.c b/src/dependent.c
index 6f582f2..a49ee2f 100644
--- a/src/dependent.c
+++ b/src/dependent.c
@@ -2818,7 +2818,7 @@ void
workbook_queue_volatile_recalc (Workbook *wb)
{
WORKBOOK_FOREACH_DEPENDENT (wb, dep, {
- if (dependent_is_volatile (dep))
+ if (dependent_is_volatile (dep))
dependent_flag_recalc (dep);
});
}
diff --git a/src/dialogs/dialog-cell-format-cond.c b/src/dialogs/dialog-cell-format-cond.c
index eedbd9f..fadf6be 100644
--- a/src/dialogs/dialog-cell-format-cond.c
+++ b/src/dialogs/dialog-cell-format-cond.c
@@ -118,7 +118,7 @@ cb_c_fmt_dialog_dialog_buttons (G_GNUC_UNUSED GtkWidget *btn, CFormatState *stat
/* users may accidentally click on 'close' before adding the formatting style see #733352 */
if (!gtk_widget_get_sensitive (GTK_WIDGET (state->editor.add_button)) ||
gtk_widget_get_sensitive (GTK_WIDGET (state->clear)) ||
- go_gtk_query_yes_no (GTK_WINDOW (state->dialog), FALSE,
+ go_gtk_query_yes_no (GTK_WINDOW (state->dialog), FALSE,
_("You did not add the defined conditional format."
" Do you really want to close the conditional formatting dialog?")))
gtk_widget_destroy (GTK_WIDGET (state->dialog));
@@ -279,13 +279,13 @@ c_fmt_dialog_select_style (CFormatState *state, int pages)
{
if (state->editor.dialog)
gtk_widget_destroy (GTK_WIDGET (state->editor.dialog));
- state->editor.dialog = dialog_cell_format_select_style
+ state->editor.dialog = dialog_cell_format_select_style
(state->wbcg, pages,
GTK_WINDOW (state->dialog),
state->editor.style, state);
if (state->editor.dialog)
- g_signal_connect
- (G_OBJECT (state->editor.dialog),
+ g_signal_connect
+ (G_OBJECT (state->editor.dialog),
"destroy", G_CALLBACK (editor_destroy_cb), state);
}
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index fdf704a..f475611 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -238,14 +238,14 @@ fmt_dialog_changed (FormatState *state)
GOFormatSel *gfs;
GOFormat const *fmt;
gboolean ok;
-
+
if (!state->enable_edit)
return;
-
+
gfs = GO_FORMAT_SEL (state->format_sel);
fmt = go_format_sel_get_fmt (gfs);
ok = !go_format_is_invalid (fmt);
-
+
gtk_widget_set_sensitive (state->apply_button, ok);
gtk_widget_set_sensitive (state->ok_button, ok);
}
@@ -2622,7 +2622,7 @@ dialog_cell_format (WBCGtk *wbcg, FormatDialogPosition_t pageno, gint pages)
if (pages == 0) {
int i;
for (i = FD_NUMBER; i <= FD_PROTECTION; i++)
- pages |= (1 << i);
+ pages |= (1 << i);
}
fmt_dialog_impl (state, pageno, pages);
diff --git a/src/expr.c b/src/expr.c
index 5130eab..729aa58 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3196,7 +3196,7 @@ GnmValue const *
gnm_expr_top_get_constant (GnmExprTop const *texpr)
{
g_return_val_if_fail (IS_GNM_EXPR_TOP (texpr), NULL);
-
+
return gnm_expr_get_constant (texpr->expr);
}
diff --git a/src/gnm-so-path.c b/src/gnm-so-path.c
index 543aca3..38adb67 100644
--- a/src/gnm-so-path.c
+++ b/src/gnm-so-path.c
@@ -607,11 +607,11 @@ gnm_so_path_get_property (GObject *obj, guint param_id,
g_value_set_boxed (value, sop->markup);
break;
case SOP_PROP_VIEWBOX :
- g_value_take_string
- (value,
- g_strdup_printf ("%0.0f %0.0f %0.0f %0.0f", sop->x_offset, sop->y_offset,
+ g_value_take_string
+ (value,
+ g_strdup_printf ("%0.0f %0.0f %0.0f %0.0f", sop->x_offset, sop->y_offset,
sop->width + sop->x_offset, sop->height + sop->y_offset));
- break;
+ break;
default :
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
break;
diff --git a/src/graph.c b/src/graph.c
index 775c194..9d7d743 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -739,7 +739,7 @@ gnm_go_data_vector_load_values (GODataVector *dat)
while (len-- > 0) {
if (x == 0) {
x = vec->val->v_array.x;
- y--;
+ y--;
}
x--;
v = vec->val->v_array.vals [x][y];
@@ -899,7 +899,7 @@ gnm_go_data_vector_get_str (GODataVector *dat, unsigned i)
while (len-- > 0) {
if (x == 0) {
x = vec->val->v_array.x;
- y--;
+ y--;
}
x--;
v = vec->val->v_array.vals [x][y];
diff --git a/src/item-bar.c b/src/item-bar.c
index 95f9b5c..1354235 100644
--- a/src/item-bar.c
+++ b/src/item-bar.c
@@ -58,7 +58,7 @@ struct _GnmItemBar {
/* [ColRowSelectionType] */
GdkRGBA selection_colors[3];
PangoFont *selection_fonts[3];
- int selection_font_ascents[3];
+ int selection_font_ascents[3];
PangoRectangle selection_logical_sizes[3];
GdkRGBA grouping_color;
@@ -285,7 +285,7 @@ item_bar_realize (GocItem *item)
ib->normal_cursor =
gdk_cursor_new_for_display (display, GDK_LEFT_PTR);
ib->change_cursor =
- gdk_cursor_new_for_display (display,
+ gdk_cursor_new_for_display (display,
ib->is_col_header
? GDK_SB_H_DOUBLE_ARROW
: GDK_SB_V_DOUBLE_ARROW);
diff --git a/src/item-cursor.c b/src/item-cursor.c
index aeeb04f..b20fe63 100644
--- a/src/item-cursor.c
+++ b/src/item-cursor.c
@@ -149,38 +149,34 @@ static int
cb_item_cursor_animation (GnmItemCursor *ic)
{
GocItem *item = GOC_ITEM (ic);
- static int use_fallback = -1;
-
- ic->ant_state++;
-
- if (use_fallback != 1) {
- GdkWindow *w = gtk_widget_get_window (GTK_WIDGET (item->canvas));
- cairo_t *cr = gdk_cairo_create (w);
-
- if (use_fallback == -1) {
- /*
- * Under some themes we get a (0,0,0,0) clip and
- * our drawing does nothing. Detect this and
- * fall back to full invalidation.
- */
- double cx0, cy0, cx1, cy1;
- cairo_clip_extents (cr, &cx0, &cy0, &cx1, &cy1);
- use_fallback = (cx0 == 0 && cy0 == 0 && cx1 == 0 && cy1 == 0);
- if (use_fallback == 1 && gnm_debug_flag ("ant"))
- g_printerr ("Using ant-ing fallback\n");
- }
-
- if (use_fallback == 0)
- goc_item_draw (item, cr);
-
- cairo_destroy (cr);
- }
+ cairo_region_t *region;
+ cairo_rectangle_int_t rect;
+ int x0, x1, y0, y1;
+ double scale = item->canvas->pixels_per_unit;
- if (use_fallback == 1) {
- if (ic->ant_state % 2 == 1)
- goc_item_invalidate (item);
+ /* we need to use canvas coordinates in goc_canvas_c2w, hence the divisions by scale. */
+ if (goc_canvas_get_direction (item->canvas) == GOC_DIRECTION_RTL) {
+ goc_canvas_c2w (item->canvas, ic->outline.x2 / scale, ic->outline.y2 / scale, &x0, &y1);
+ goc_canvas_c2w (item->canvas, ic->outline.x1 / scale, ic->outline.y1 / scale, &x1, &y0);
+ x0--; /* because of the +.5, things are not symetric */
+ x1--;
+ } else {
+ goc_canvas_c2w (item->canvas, ic->outline.x1 / scale, ic->outline.y1 / scale, &x0, &y0);
+ goc_canvas_c2w (item->canvas, ic->outline.x2 / scale, ic->outline.y2 / scale, &x1, &y1);
}
-
+ ic->ant_state++;
+ rect.x = x0 - 1;
+ rect.y = y0 - 1;
+ rect.width = x1 - x0 + 3;
+ rect.height = y1 - y0 + 3;
+ region = cairo_region_create_rectangle (&rect);
+ rect.x += 3;
+ rect.y += 3;
+ rect.width -= 6;
+ rect.height -= 6;
+ cairo_region_xor_rectangle (region, &rect);
+ goc_canvas_invalidate_region (item->canvas, item, region);
+ cairo_region_destroy (region);
return TRUE;
}
@@ -1486,7 +1482,7 @@ gnm_item_cursor_class_init (GObjectClass *gobject_klass)
g_param_spec_uint ("color",
P_("Color"),
P_("Name of the cursor's color"),
- 0, 0xffffffff,
+ 0, 0xffffffff,
GO_COLOR_BLACK,
GSF_PARAM_STATIC | G_PARAM_WRITABLE));
diff --git a/src/item-grid.c b/src/item-grid.c
index 8ee1efc..f81e144 100644
--- a/src/item-grid.c
+++ b/src/item-grid.c
@@ -980,7 +980,7 @@ item_grid_button_pressed (GocItem *item, int button, double x_, double y_)
/* Button == 1 is used to trigger hyperlinks (and possibly similar */
/* special cases. Otherwise button == 2 should behave exactly like */
/* button == 1. See bug #700792 */
-
+
/* buttons 1 and 2 will always change the selection, the other buttons will
* only effect things if the target is not already selected. */
already_selected = sv_is_pos_selected (sv, pos.col, pos.row);
@@ -988,7 +988,7 @@ item_grid_button_pressed (GocItem *item, int button, double x_, double y_)
if (!(event->button.state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)))
sv_selection_reset (sv);
- if ((event->button.button != 1 && event->button.button != 2)
+ if ((event->button.button != 1 && event->button.button != 2)
|| !(event->button.state & GDK_SHIFT_MASK) ||
sv->selections == NULL) {
sv_selection_add_pos (sv, pos.col, pos.row,
diff --git a/src/sf-trig.c b/src/sf-trig.c
index 3ad232a..8660506 100644
--- a/src/sf-trig.c
+++ b/src/sf-trig.c
@@ -70,7 +70,7 @@ gnm_coth (gnm_float x)
*/
gnm_float
gnm_acoth (gnm_float x)
-{
+{
return (gnm_abs (x) > 2)
? gnm_log1p (2 / (x - 1)) / 2
: gnm_log ((x - 1) / (x + 1)) / -2;
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index e9cf8f9..8c54d5f 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -1770,7 +1770,7 @@ scg_im_destroy (SheetControlGUI *scg) {
if (scg->im.item) {
gtk_widget_destroy (scg->im.item);
scg->im.item = NULL;
- }
+ }
}
static void
@@ -3113,7 +3113,7 @@ scg_comment_display (SheetControlGUI *scg, GnmComment *cc,
label = gtk_label_new (comment_text);
if (comment_markup) {
gboolean font_colour_set = FALSE;
- pango_attr_list_filter
+ pango_attr_list_filter
(comment_markup,
(PangoAttrFilterFunc) scg_comment_display_filter_cb,
&font_colour_set);
@@ -3754,7 +3754,7 @@ scg_show_im_tooltip (SheetControl *sc, GnmInputMsg *im, GnmCellPos *pos)
GtkAllocation allocation;
Sheet *sheet = scg_sheet (scg);
gboolean rtl = sheet->text_is_rtl;
-
+
text = gnm_input_msg_get_msg (im);
title = gnm_input_msg_get_title (im);
len_text = (text == NULL) ? 0 : strlen (text);
@@ -3789,13 +3789,13 @@ scg_show_im_tooltip (SheetControl *sc, GnmInputMsg *im, GnmCellPos *pos)
gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
if (len_title > 0)
gtk_box_set_spacing (GTK_BOX (box), 10);
- }
+ }
gnumeric_convert_to_tooltip (GTK_WIDGET (scg->grid), box);
scg->im.item = gtk_widget_get_toplevel (box);
x = sheet_col_get_distance_pixels
(sheet, pane->first.col, pos->col + (rtl ? 1 : 0));
-
+
y = sheet_row_get_distance_pixels
(sheet, pane->first.row, pos->row + 1);
@@ -3805,8 +3805,8 @@ scg_show_im_tooltip (SheetControl *sc, GnmInputMsg *im, GnmCellPos *pos)
x += allocation.x;
y += allocation.y;
- gdk_window_get_position
- (gtk_widget_get_parent_window (GTK_WIDGET (pane)),
+ gdk_window_get_position
+ (gtk_widget_get_parent_window (GTK_WIDGET (pane)),
&x_origin, &y_origin);
x += x_origin;
y += y_origin;
diff --git a/src/sheet-control-priv.h b/src/sheet-control-priv.h
index a48b1b6..a127fba 100644
--- a/src/sheet-control-priv.h
+++ b/src/sheet-control-priv.h
@@ -35,7 +35,7 @@ typedef struct {
void (*set_panes) (SheetControl *sc);
void (*object_create_view) (SheetControl *sc, SheetObject *so);
void (*scale_changed) (SheetControl *sc);
- void (*show_im_tooltip) (SheetControl *sc,
+ void (*show_im_tooltip) (SheetControl *sc,
GnmInputMsg *im, GnmCellPos *pos);
} SheetControlClass;
diff --git a/src/sheet-control.h b/src/sheet-control.h
index 0d8e736..ed9e9c0 100644
--- a/src/sheet-control.h
+++ b/src/sheet-control.h
@@ -46,7 +46,7 @@ void sc_set_panes (SheetControl *sc);
void sc_object_create_view (SheetControl *sc, SheetObject *so);
void sc_scale_changed (SheetControl *sc);
-void sc_show_im_tooltip (SheetControl *sc,
+void sc_show_im_tooltip (SheetControl *sc,
GnmInputMsg *im, GnmCellPos *pos);
G_END_DECLS
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index 7534983..fc213b5 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -281,7 +281,7 @@ gnm_soi_get_target_list (SheetObject const *so)
}
static void
-gnm_soi_write_image (SheetObject const *so, char const *format,
+gnm_soi_write_image (SheetObject const *so, char const *format,
G_GNUC_UNUSED double resolution,
GsfOutput *output, GError **err)
{
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 8b8b8a8..c50fdb7 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -241,7 +241,7 @@ sheet_widget_draw_cairo (SheetObject const *so, cairo_t *cr,
if (NULL != gdk_screen_get_default ()) {
GtkWidget *win = gtk_offscreen_window_new ();
GtkWidget *w = sow_create_widget (GNM_SOW (so));
-
+
gtk_container_add (GTK_CONTAINER (win), w);
gtk_widget_set_size_request (w, width, height);
gtk_widget_show_all (win);
@@ -603,7 +603,7 @@ get_font (void)
gtk_style_context_set_path (style, path);
gtk_widget_path_unref (path);
-
+
gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL,
GTK_STYLE_PROPERTY_FONT, &desc, NULL);
g_object_unref (style);
@@ -643,7 +643,7 @@ get_font (void)
g_free (s);
}
}
- }
+ }
if ((mask & PANGO_FONT_MASK_FAMILY) == 0 || size == 0) {
pango_font_description_free (desc);
@@ -712,12 +712,12 @@ draw_cairo_text (cairo_t *cr, char const *text, int *pwidth, int *pheight,
cairo_fill (cr);
}
pango_layout_iter_free (pliter);
- cairo_set_source_rgb(cr, 0, 0, 0);
+ cairo_set_source_rgb(cr, 0, 0, 0);
}
pango_cairo_show_layout (cr, layout);
pango_font_description_free (desc);
g_object_unref (layout);
-
+
if (pwidth)
*pwidth = width * scale_h;
if (pheight)
@@ -1253,7 +1253,7 @@ sheet_widget_button_draw_cairo (SheetObject const *so, cairo_t *cr,
radius = width / 3.;
if (radius < 1)
radius = 1;
- half_line = radius * 0.15;
+ half_line = radius * 0.15;
cairo_save (cr);
cairo_set_line_width (cr, 2 * half_line);
@@ -3927,7 +3927,7 @@ sheet_widget_list_draw_cairo (SheetObject const *so, cairo_t *cr,
GString*str = g_string_new (NULL);
int twidth = width, theight = height;
-
+
cairo_new_path (cr);
cairo_rectangle (cr, 2, 1, width - 2 - 12, height - 2);
cairo_clip (cr);
diff --git a/src/style-conditions.c b/src/style-conditions.c
index d44d819..0cf272e 100644
--- a/src/style-conditions.c
+++ b/src/style-conditions.c
@@ -588,7 +588,7 @@ gnm_style_cond_eval (GnmStyleCond const *cond, GnmValue const *cv,
case GNM_STYLE_COND_GT:
res = value_compare (cv, val0, FALSE) == IS_GREATER;
break;
-
+
case GNM_STYLE_COND_GTE:
negate = TRUE; /* ...and fall through */
case GNM_STYLE_COND_LT:
diff --git a/src/wbc-gtk-actions.c b/src/wbc-gtk-actions.c
index cf895f8..19cee3b 100644
--- a/src/wbc-gtk-actions.c
+++ b/src/wbc-gtk-actions.c
@@ -953,7 +953,7 @@ static GNM_ACTION_DEF (cb_data_import_other) { gui_file_open
static GNM_ACTION_DEF (cb_auto_filter) { cmd_autofilter_add_remove (WORKBOOK_CONTROL (wbcg)); }
static GNM_ACTION_DEF (cb_show_all) { filter_show_all (WORKBOOK_CONTROL (wbcg)); }
static GNM_ACTION_DEF (cb_data_filter) { dialog_advanced_filter (wbcg); }
-static GNM_ACTION_DEF (cb_data_validate) { dialog_cell_format (wbcg, FD_VALIDATION,
+static GNM_ACTION_DEF (cb_data_validate) { dialog_cell_format (wbcg, FD_VALIDATION,
(1 << FD_VALIDATION) | (1 <<
FD_INPUT_MSG)); }
static GNM_ACTION_DEF (cb_data_text_to_columns) { stf_text_to_columns (WORKBOOK_CONTROL (wbcg),
GO_CMD_CONTEXT (wbcg)); }
static GNM_ACTION_DEF (cb_data_consolidate) { dialog_consolidate (wbcg); }
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 6b221bd..5dfa663 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -1379,7 +1379,7 @@ cb_adjust_foreground_attributes (PangoAttribute *attribute,
do { \
double val = fore.channel * (1 - f) + ref->channel * f; \
pfore->channel = CLAMP (val, 0, 1) * 65535; \
-} while (0)
+} while (0)
DO_CHANNEL(red);
DO_CHANNEL(green);
DO_CHANNEL(blue);
@@ -2379,7 +2379,7 @@ cb_css_parse_error (GtkCssProvider *css, GtkCssSection *section, GError *err)
{
if (g_error_matches (err, GTK_CSS_PROVIDER_ERROR,
GTK_CSS_PROVIDER_ERROR_DEPRECATED) &&
- !gnm_debug_flag ("css"))
+ !gnm_debug_flag ("css"))
return;
g_warning ("Theme parsing error: %s", err->message);
@@ -2414,7 +2414,7 @@ cb_screen_changed (GtkWidget *widget)
const char *app_key = "css-provider";
struct css_provider_data *data;
- data = g_object_get_data (app, app_key);
+ data = g_object_get_data (app, app_key);
if (!data) {
const char *resource = "gnm:gnumeric.css";
const char *csstext = go_rsm_lookup (resource, NULL);
diff --git a/src/widgets/gnm-cell-combo-view.c b/src/widgets/gnm-cell-combo-view.c
index 02788b7..3db5c9a 100644
--- a/src/widgets/gnm-cell-combo-view.c
+++ b/src/widgets/gnm-cell-combo-view.c
@@ -385,10 +385,10 @@ gnm_cell_combo_view_popdown (SheetObjectView *sov, guint32 activate_time)
so->anchor.cell_bound.start.col);
merge = gnm_sheet_merge_is_corner (sheet, &(so->anchor.cell_bound.start));
gtk_window_move (GTK_WINDOW (popup), root_x,
- root_y + scg_colrow_distance_get
+ root_y + scg_colrow_distance_get
(scg, FALSE,
pane->first.row,
- so->anchor.cell_bound.start.row +
+ so->anchor.cell_bound.start.row +
((merge == NULL) ? 1 : range_height (merge))));
gtk_container_add (GTK_CONTAINER (popup), frame);
diff --git a/src/widgets/gnm-filter-combo-view.c b/src/widgets/gnm-filter-combo-view.c
index 5a17997..335073f 100644
--- a/src/widgets/gnm-filter-combo-view.c
+++ b/src/widgets/gnm-filter-combo-view.c
@@ -304,7 +304,7 @@ fcombo_arrow_format (GnmFilterCombo *fcombo, GtkWidget *arrow)
GTK_SHADOW_IN);
if (fcombo->cond)
gtk_widget_set_state_flags (arrow, GTK_STATE_FLAG_ACTIVE, FALSE);
- else
+ else
gtk_widget_unset_state_flags (arrow, GTK_STATE_FLAG_ACTIVE);
}
diff --git a/src/widgets/gnm-fontbutton.c b/src/widgets/gnm-fontbutton.c
index f3b212f..866dfb0 100644
--- a/src/widgets/gnm-fontbutton.c
+++ b/src/widgets/gnm-fontbutton.c
@@ -29,7 +29,7 @@ _gtk_font_chooser_install_properties (GObjectClass *klass)
"show-preview-entry");
}
-/*
+/*
* GTK - The GIMP Toolkit
* Copyright (C) 1998 David Abilleira Freijeiro <odaf nexo es>
* All rights reserved.
@@ -53,7 +53,7 @@ _gtk_font_chooser_install_properties (GObjectClass *klass)
* Modified by the GTK+ Team and others 2003. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include <string.h>
@@ -72,18 +72,18 @@ _gtk_font_chooser_install_properties (GObjectClass *klass)
*/
-struct _GnmFontButtonPrivate
+struct _GnmFontButtonPrivate
{
gchar *title;
gchar *fontname;
-
+
guint use_font : 1;
guint use_size : 1;
guint show_style : 1;
guint show_size : 1;
guint show_preview_entry : 1;
-
+
GtkWidget *font_dialog;
GtkWidget *inside;
GtkWidget *font_label;
@@ -102,13 +102,13 @@ struct _GnmFontButtonPrivate
};
/* Signals */
-enum
+enum
{
FONT_SET,
LAST_SIGNAL
};
-enum
+enum
{
PROP_0,
PROP_TITLE,
@@ -373,7 +373,7 @@ gnm_font_button_take_font_desc (GnmFontButton *font_button,
if (pango_font_description_get_size_is_absolute (priv->font_desc))
priv->font_size = pango_font_description_get_size (priv->font_desc);
- else
+ else
priv->font_size = pango_font_description_get_size (priv->font_desc) / PANGO_SCALE;
gnm_font_button_update_font_data (font_button);
@@ -427,16 +427,16 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
GtkButtonClass *button_class;
gnm_font_button_parent_class = g_type_class_peek_parent (klass);
-
+
gobject_class = (GObjectClass *) klass;
button_class = (GtkButtonClass *) klass;
gobject_class->finalize = gnm_font_button_finalize;
gobject_class->set_property = gnm_font_button_set_property;
gobject_class->get_property = gnm_font_button_get_property;
-
+
button_class->clicked = gnm_font_button_clicked;
-
+
klass->font_set = NULL;
_gtk_font_chooser_install_properties (gobject_class);
@@ -453,7 +453,7 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
/**
* GnmFontButton:title:
- *
+ *
* The title of the font chooser dialog.
*
* Since: 2.4
@@ -469,7 +469,7 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
/**
* GnmFontButton:font-name:
- *
+ *
* The name of the currently selected font.
*
* Since: 2.4
@@ -485,8 +485,8 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
/**
* GnmFontButton:use-font:
- *
- * If this property is set to %TRUE, the label will be drawn
+ *
+ * If this property is set to %TRUE, the label will be drawn
* in the selected font.
*
* Since: 2.4
@@ -501,8 +501,8 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
/**
* GnmFontButton:use-size:
- *
- * If this property is set to %TRUE, the label will be drawn
+ *
+ * If this property is set to %TRUE, the label will be drawn
* with the selected font size.
*
* Since: 2.4
@@ -517,10 +517,10 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
/**
* GnmFontButton:show-style:
- *
- * If this property is set to %TRUE, the name of the selected font style
- * will be shown in the label. For a more WYSIWYG way to show the selected
- * style, see the ::use-font property.
+ *
+ * If this property is set to %TRUE, the name of the selected font style
+ * will be shown in the label. For a more WYSIWYG way to show the selected
+ * style, see the ::use-font property.
*
* Since: 2.4
*/
@@ -533,10 +533,10 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
G_PARAM_READWRITE));
/**
* GnmFontButton:show-size:
- *
- * If this property is set to %TRUE, the selected font size will be shown
- * in the label. For a more WYSIWYG way to show the selected size, see the
- * ::use-size property.
+ *
+ * If this property is set to %TRUE, the selected font size will be shown
+ * in the label. For a more WYSIWYG way to show the selected size, see the
+ * ::use-size property.
*
* Since: 2.4
*/
@@ -551,9 +551,9 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
/**
* GnmFontButton::font-set:
* @widget: the object which received the signal.
- *
- * The ::font-set signal is emitted when the user selects a font.
- * When handling this signal, use gnm_font_button_get_font_name()
+ *
+ * The ::font-set signal is emitted when the user selects a font.
+ * When handling this signal, use gnm_font_button_get_font_name()
* to find out which font was just selected.
*
* Note that this signal is only emitted when the <emphasis>user</emphasis>
@@ -569,7 +569,7 @@ gnm_font_button_class_init (GnmFontButtonClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
g_type_class_add_private (gobject_class, sizeof (GnmFontButtonPrivate));
}
@@ -604,7 +604,7 @@ gnm_font_button_finalize (GObject *object)
{
GnmFontButton *font_button = GNM_FONT_BUTTON (object);
- if (font_button->priv->font_dialog != NULL)
+ if (font_button->priv->font_dialog != NULL)
gtk_widget_destroy (font_button->priv->font_dialog);
font_button->priv->font_dialog = NULL;
@@ -628,7 +628,7 @@ gnm_font_button_set_property (GObject *object,
{
GnmFontButton *font_button = GNM_FONT_BUTTON (object);
- switch (param_id)
+ switch (param_id)
{
case GTK_FONT_CHOOSER_PROP_PREVIEW_TEXT:
gnm_font_button_set_preview_text (font_button, g_value_get_string (value));
@@ -674,8 +674,8 @@ gnm_font_button_get_property (GObject *object,
GParamSpec *pspec)
{
GnmFontButton *font_button = GNM_FONT_BUTTON (object);
-
- switch (param_id)
+
+ switch (param_id)
{
case GTK_FONT_CHOOSER_PROP_PREVIEW_TEXT:
g_value_set_string (value, gnm_font_button_get_preview_text (font_button));
@@ -712,7 +712,7 @@ gnm_font_button_get_property (GObject *object,
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
}
-}
+}
/**
@@ -728,7 +728,7 @@ GtkWidget *
gnm_font_button_new (void)
{
return g_object_new (GTK_TYPE_FONT_BUTTON, NULL);
-}
+}
/**
* gnm_font_button_new_with_font:
@@ -744,34 +744,34 @@ GtkWidget *
gnm_font_button_new_with_font (const gchar *fontname)
{
return g_object_new (GTK_TYPE_FONT_BUTTON, "font-name", fontname, NULL);
-}
+}
/**
* gnm_font_button_set_title:
* @font_button: a #GnmFontButton
* @title: a string containing the font chooser dialog title
*
- * Sets the title for the font chooser dialog.
+ * Sets the title for the font chooser dialog.
*
* Since: 2.4
*/
void
-gnm_font_button_set_title (GnmFontButton *font_button,
+gnm_font_button_set_title (GnmFontButton *font_button,
const gchar *title)
{
gchar *old_title;
g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
-
+
old_title = font_button->priv->title;
font_button->priv->title = g_strdup (title);
g_free (old_title);
-
+
if (font_button->priv->font_dialog)
gtk_window_set_title (GTK_WINDOW (font_button->priv->font_dialog),
font_button->priv->title);
g_object_notify (G_OBJECT (font_button), "title");
-}
+}
/**
* gnm_font_button_get_title:
@@ -789,7 +789,7 @@ gnm_font_button_get_title (GnmFontButton *font_button)
g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), NULL);
return font_button->priv->title;
-}
+}
/**
* gnm_font_button_get_use_font:
@@ -807,34 +807,34 @@ gnm_font_button_get_use_font (GnmFontButton *font_button)
g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
return font_button->priv->use_font;
-}
+}
/**
* gnm_font_button_set_use_font:
* @font_button: a #GnmFontButton
* @use_font: If %TRUE, font name will be written using font chosen.
*
- * If @use_font is %TRUE, the font name will be written using the selected font.
+ * If @use_font is %TRUE, the font name will be written using the selected font.
*
* Since: 2.4
*/
-void
+void
gnm_font_button_set_use_font (GnmFontButton *font_button,
gboolean use_font)
{
g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
-
+
use_font = (use_font != FALSE);
-
- if (font_button->priv->use_font != use_font)
+
+ if (font_button->priv->use_font != use_font)
{
font_button->priv->use_font = use_font;
gnm_font_button_label_use_font (font_button);
-
+
g_object_notify (G_OBJECT (font_button), "use-font");
}
-}
+}
/**
@@ -853,7 +853,7 @@ gnm_font_button_get_use_size (GnmFontButton *font_button)
g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
return font_button->priv->use_size;
-}
+}
/**
* gnm_font_button_set_use_size:
@@ -864,14 +864,14 @@ gnm_font_button_get_use_size (GnmFontButton *font_button)
*
* Since: 2.4
*/
-void
+void
gnm_font_button_set_use_size (GnmFontButton *font_button,
gboolean use_size)
{
g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
-
+
use_size = (use_size != FALSE);
- if (font_button->priv->use_size != use_size)
+ if (font_button->priv->use_size != use_size)
{
font_button->priv->use_size = use_size;
@@ -879,19 +879,19 @@ gnm_font_button_set_use_size (GnmFontButton *font_button,
g_object_notify (G_OBJECT (font_button), "use-size");
}
-}
+}
/**
* gnm_font_button_get_show_style:
* @font_button: a #GnmFontButton
- *
+ *
* Returns whether the name of the font style will be shown in the label.
- *
+ *
* Return value: whether the font style will be shown in the label.
*
* Since: 2.4
**/
-gboolean
+gboolean
gnm_font_button_get_show_style (GnmFontButton *font_button)
{
g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
@@ -913,30 +913,30 @@ gnm_font_button_set_show_style (GnmFontButton *font_button,
gboolean show_style)
{
g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
-
+
show_style = (show_style != FALSE);
- if (font_button->priv->show_style != show_style)
+ if (font_button->priv->show_style != show_style)
{
font_button->priv->show_style = show_style;
-
+
gnm_font_button_update_font_info (font_button);
-
+
g_object_notify (G_OBJECT (font_button), "show-style");
}
-}
+}
/**
* gnm_font_button_get_show_size:
* @font_button: a #GnmFontButton
- *
+ *
* Returns whether the font size will be shown in the label.
- *
+ *
* Return value: whether the font size will be shown in the label.
*
* Since: 2.4
**/
-gboolean
+gboolean
gnm_font_button_get_show_size (GnmFontButton *font_button)
{
g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
@@ -958,22 +958,22 @@ gnm_font_button_set_show_size (GnmFontButton *font_button,
gboolean show_size)
{
g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
-
+
show_size = (show_size != FALSE);
- if (font_button->priv->show_size != show_size)
+ if (font_button->priv->show_size != show_size)
{
font_button->priv->show_size = show_size;
gtk_container_remove (GTK_CONTAINER (font_button), font_button->priv->inside);
font_button->priv->inside = gnm_font_button_create_inside (font_button);
gtk_container_add (GTK_CONTAINER (font_button), font_button->priv->inside);
-
+
gnm_font_button_update_font_info (font_button);
g_object_notify (G_OBJECT (font_button), "show-size");
}
-}
+}
/**
@@ -1010,7 +1010,7 @@ gnm_font_button_get_font_name (GnmFontButton *font_button)
*
* Since: 2.4
*/
-gboolean
+gboolean
gnm_font_button_set_font_name (GnmFontButton *font_button,
const gchar *fontname)
{
@@ -1031,11 +1031,11 @@ gnm_font_button_clicked (GtkButton *button)
GtkFontChooser *font_dialog;
GnmFontButton *font_button = GNM_FONT_BUTTON (button);
GnmFontButtonPrivate *priv = font_button->priv;
-
- if (!font_button->priv->font_dialog)
+
+ if (!font_button->priv->font_dialog)
{
GtkWidget *parent;
-
+
parent = gtk_widget_get_toplevel (GTK_WIDGET (font_button));
priv->font_dialog = g_object_new (priv->dialog_type, NULL);
@@ -1079,12 +1079,12 @@ gnm_font_button_clicked (GtkButton *button)
g_signal_connect (font_dialog, "destroy",
G_CALLBACK (dialog_destroy), font_button);
}
-
+
if (!gtk_widget_get_visible (font_button->priv->font_dialog))
{
font_dialog = GTK_FONT_CHOOSER (font_button->priv->font_dialog);
gtk_font_chooser_set_font_desc (font_dialog, font_button->priv->font_desc);
- }
+ }
gtk_window_present (GTK_WINDOW (font_button->priv->font_dialog));
}
@@ -1141,26 +1141,26 @@ dialog_destroy (GtkWidget *widget,
gpointer data)
{
GnmFontButton *font_button = GNM_FONT_BUTTON (data);
-
+
/* Dialog will get destroyed so reference is not valid now */
font_button->priv->font_dialog = NULL;
-}
+}
static GtkWidget *
gnm_font_button_create_inside (GnmFontButton *font_button)
{
GtkWidget *widget;
-
+
gtk_widget_push_composite_child ();
widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
font_button->priv->font_label = gtk_label_new (_("Font"));
-
+
gtk_label_set_justify (GTK_LABEL (font_button->priv->font_label), GTK_JUSTIFY_LEFT);
gtk_box_pack_start (GTK_BOX (widget), font_button->priv->font_label, TRUE, TRUE, 5);
- if (font_button->priv->show_size)
+ if (font_button->priv->show_size)
{
gtk_box_pack_start (GTK_BOX (widget), gtk_separator_new (GTK_ORIENTATION_VERTICAL), FALSE, FALSE, 0);
font_button->priv->size_label = gtk_label_new ("14");
@@ -1172,7 +1172,7 @@ gnm_font_button_create_inside (GnmFontButton *font_button)
gtk_widget_pop_composite_child ();
return widget;
-}
+}
static void
gnm_font_button_label_use_font (GnmFontButton *font_button)
@@ -1217,17 +1217,17 @@ gnm_font_button_update_font_info (GnmFontButton *font_button)
gtk_label_set_text (GTK_LABEL (font_button->priv->font_label), family_style);
g_free (family_style);
- if (font_button->priv->show_size)
+ if (font_button->priv->show_size)
{
/* mirror Pango, which doesn't translate this either */
gchar *size = g_strdup_printf ("%g%s",
pango_font_description_get_size (priv->font_desc) / (double)PANGO_SCALE,
pango_font_description_get_size_is_absolute (priv->font_desc) ? "px" :
"");
-
+
gtk_label_set_text (GTK_LABEL (font_button->priv->size_label), size);
-
+
g_free (size);
}
gnm_font_button_label_use_font (font_button);
-}
+}
diff --git a/src/widgets/gnm-notebook.c b/src/widgets/gnm-notebook.c
index f71770f..0994dc4 100644
--- a/src/widgets/gnm-notebook.c
+++ b/src/widgets/gnm-notebook.c
@@ -129,7 +129,7 @@ gnm_notebook_button_ensure_layout (GnmNotebookButton *nbb)
attr->start_index = 0;
attr->end_index = -1;
pango_attr_list_insert (attrs, attr);
- }
+ }
attrs_active = pango_attr_list_copy (attrs);
/* Normal */
@@ -194,9 +194,9 @@ gnm_notebook_button_draw (GtkWidget *widget, cairo_t *cr)
return FALSE;
}
-static GtkSizeRequestMode
+static GtkSizeRequestMode
gnm_notebook_button_get_request_mode (GtkWidget *widget)
-{
+{
return GTK_SIZE_REQUEST_CONSTANT_SIZE;
}
diff --git a/src/widgets/gnumeric-text-view.c b/src/widgets/gnumeric-text-view.c
index ac2a39c..0d84d5c 100644
--- a/src/widgets/gnumeric-text-view.c
+++ b/src/widgets/gnumeric-text-view.c
@@ -452,7 +452,7 @@ gtv_init (GnmTextView *gtv)
static void
gtv_grab_focus (GtkWidget *widget)
{
- GnmTextView *gtv = GNM_TEXT_VIEW (widget);
+ GnmTextView *gtv = GNM_TEXT_VIEW (widget);
gtk_widget_grab_focus (GTK_WIDGET (gtv->view));
}
diff --git a/tools/process-burkardt.c b/tools/process-burkardt.c
index 4cdd3a6..bf56c9d 100644
--- a/tools/process-burkardt.c
+++ b/tools/process-burkardt.c
@@ -359,7 +359,7 @@ main (int argc, char **argv)
// van_der_corput_values ( int *n_data, int *base, int *seed, double *value )
// viscosity_values ( int *n_data, double *tc, double *p, double *eta )
// von_mises_cdf_values ( int *n_data, double *a, double *b, double *x,
-
+
// Differences in year interpretation.
if (0) test_func ("weekday", weekday_values, GT_III_I, "date(%1,%2,%3)");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]