[gnumeric] White-space policing.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] White-space policing.
- Date: Sat, 5 Sep 2009 22:54:50 +0000 (UTC)
commit 17053d265e2b2749576931e86427ace8a3106720
Author: Morten Welinder <terra gnome org>
Date: Sat Sep 5 18:54:29 2009 -0400
White-space policing.
component/gnumeric.c | 6 +-
plugins/excel/crypt-md4.h | 8 +-
plugins/excel/excel-xml-read.c | 2 +-
plugins/excel/ms-chart.c | 8 +-
plugins/excel/ms-excel-read.c | 2 +-
plugins/excel/ms-excel-write.c | 8 +-
plugins/excel/xls-write-pivot.c | 2 +-
plugins/excel/xlsx-read.c | 30 +-
plugins/excel/xlsx-write-pivot.c | 2 +-
plugins/fn-complex/functions.c | 2 +-
plugins/fn-database/functions.c | 26 +-
plugins/fn-date/functions.c | 2 +-
plugins/fn-derivatives/options.c | 60 ++--
plugins/fn-financial/functions.c | 112 +++---
plugins/fn-financial/sc-fin.h | 4 +-
plugins/fn-info/functions.c | 4 +-
plugins/fn-lookup/functions.c | 28 +-
plugins/fn-math/functions.c | 38 +-
plugins/fn-numtheory/numtheory.c | 2 +-
plugins/fn-r/functions.c | 90 ++--
plugins/fn-random/functions.c | 2 +-
plugins/fn-stat/functions.c | 186 ++++----
plugins/fn-string/functions.c | 54 ++--
plugins/fn-tsa/functions.c | 14 +-
plugins/gda/plugin-gda.c | 4 +-
plugins/html/html.c | 16 +-
plugins/html/html.h | 10 +-
plugins/html/html_read.c | 2 +-
plugins/openoffice/openoffice-read.c | 268 ++++++------
plugins/openoffice/openoffice-write.c | 394 +++++++++---------
plugins/psiconv/psiconv-read.c | 8 +-
src/application.c | 4 +-
src/cell.c | 2 +-
src/dialogs/dao-gui-utils.h | 2 +-
src/dialogs/dialog-about.c | 2 +-
src/dialogs/dialog-analysis-tool-chi-squared.c | 4 +-
src/dialogs/dialog-analysis-tool-frequency.c | 10 +-
src/dialogs/dialog-analysis-tool-kaplan-meier.c | 68 ++--
src/dialogs/dialog-analysis-tools.c | 118 +++---
src/dialogs/dialog-autofilter.c | 2 +-
src/dialogs/dialog-autoformat.c | 2 +-
src/dialogs/dialog-cell-comment.c | 24 +-
src/dialogs/dialog-cell-format.c | 110 +++---
src/dialogs/dialog-cell-sort.c | 2 +-
src/dialogs/dialog-col-width.c | 2 +-
src/dialogs/dialog-consolidate.c | 74 ++--
src/dialogs/dialog-define-names.c | 20 +-
src/dialogs/dialog-delete-cells.c | 10 +-
src/dialogs/dialog-doc-metadata.c | 148 ++++----
src/dialogs/dialog-fill-series.c | 38 +-
src/dialogs/dialog-formula-guru.c | 10 +-
src/dialogs/dialog-function-select.c | 36 +-
src/dialogs/dialog-goal-seek.c | 10 +-
src/dialogs/dialog-hyperlink.c | 14 +-
src/dialogs/dialog-insert-cells.c | 8 +-
src/dialogs/dialog-merge.c | 4 +-
src/dialogs/dialog-paste-special.c | 4 +-
src/dialogs/dialog-plugin-manager.c | 2 +-
src/dialogs/dialog-preferences.c | 80 ++--
src/dialogs/dialog-printer-setup.c | 276 ++++++------
src/dialogs/dialog-quit.c | 4 +-
src/dialogs/dialog-row-height.c | 2 +-
src/dialogs/dialog-scenarios.c | 2 +-
src/dialogs/dialog-sheet-order.c | 126 +++---
src/dialogs/dialog-so-list.c | 8 +-
src/dialogs/dialog-so-styled.c | 6 +-
src/dialogs/dialog-solver.c | 4 +-
src/dialogs/dialog-stf-csv-page.c | 2 +-
src/dialogs/dialog-stf-export.c | 68 ++--
src/dialogs/dialog-stf-format-page.c | 104 +++---
src/dialogs/dialog-stf-main-page.c | 4 +-
src/dialogs/dialog-stf.c | 14 +-
src/dialogs/dialog-stf.h | 6 +-
src/dialogs/dialog-tabulate.c | 2 +-
src/dialogs/dialog-view.c | 8 +-
src/dialogs/tool-dialogs.h | 8 +-
src/func-builtin.c | 6 +-
src/func.c | 10 +-
src/func.h | 2 +-
src/gnm-datetime.c | 2 +-
src/gnm-so-filled.c | 2 +-
src/go-data-cache.h | 2 +-
src/graph.c | 2 +-
src/gui-util.c | 10 +-
src/gui-util.h | 2 +-
src/item-edit.c | 2 +-
src/parse-util.c | 2 +-
src/preview-grid.c | 2 +-
src/print-info.c | 10 +-
src/print.c | 26 +-
src/ranges.c | 4 +-
src/sheet-object-graph.c | 2 +-
src/sheet-object-widget.c | 2 +-
src/sheet-object.c | 2 +-
src/stf-export.c | 2 +-
src/tools/analysis-anova.c | 176 ++++----
src/tools/analysis-chi-squared.c | 36 +-
src/tools/analysis-exp-smoothing.c | 350 ++++++++--------
src/tools/analysis-exp-smoothing.h | 4 +-
src/tools/analysis-frequency.c | 32 +-
src/tools/analysis-frequency.h | 2 +-
src/tools/analysis-histogram.c | 90 ++--
src/tools/analysis-histogram.h | 4 +-
src/tools/analysis-kaplan-meier.c | 212 +++++-----
src/tools/analysis-kaplan-meier.h | 4 +-
src/tools/analysis-tools.c | 372 ++++++++--------
src/tools/analysis-tools.h | 4 +-
src/tools/auto-correct.c | 10 +-
src/tools/dao.c | 26 +-
src/tools/dao.h | 16 +-
src/tools/fill-series.c | 82 ++--
src/tools/fill-series.h | 4 +-
src/tools/filter.c | 2 +-
src/tools/goal-seek.c | 6 +-
src/tools/random-generator.c | 80 ++--
src/tools/random-generator.h | 4 +-
src/tools/scenarios.c | 50 ++--
src/tools/solver/api.c | 16 +-
src/tools/solver/api.h | 2 +-
src/tools/solver/glpk/source/glplpx4.c | 2 +-
src/tools/solver/lp_solve/lp_solve.c | 232 +++++-----
src/tools/solver/reports-write.c | 8 +-
src/tools/solver/reports-write.h | 2 +-
src/tools/solver/reports.c | 4 +-
src/tools/solver/solver.c | 10 +-
src/tools/tabulate.c | 6 +-
src/tools/tabulate.h | 2 +-
src/tools/tools.h | 2 +-
src/wbc-gtk-actions.c | 16 +-
src/wbc-gtk.c | 16 +-
src/widgets/gnm-notebook.c | 510 +++++++++++-----------
src/widgets/gnumeric-cell-renderer-text.c | 2 +-
src/widgets/gnumeric-text-view.c | 94 ++--
src/widgets/gnumeric-text-view.h | 8 +-
src/workbook-control.c | 2 +-
src/xml-io.c | 2 +-
src/xml-sax-read.c | 6 +-
137 files changed, 2724 insertions(+), 2724 deletions(-)
---
diff --git a/component/gnumeric.c b/component/gnumeric.c
index b088023..cd4a4dd 100644
--- a/component/gnumeric.c
+++ b/component/gnumeric.c
@@ -1,5 +1,5 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* Gnumeric GOffice component
* gnumeric.c
*
@@ -7,8 +7,8 @@
*
* Developed by Jean Bréfort <jean brefort normalesup org>
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
diff --git a/plugins/excel/crypt-md4.h b/plugins/excel/crypt-md4.h
index c7340a5..1f450e0 100644
--- a/plugins/excel/crypt-md4.h
+++ b/plugins/excel/crypt-md4.h
@@ -1,21 +1,21 @@
/* vim: set sw=8 ts=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
Unix SMB/CIFS implementation.
a implementation of MD4 designed for use in the SMB authentication protocol
Copyright (C) Andrew Tridgell 1997-1998.
$Id$
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/plugins/excel/excel-xml-read.c b/plugins/excel/excel-xml-read.c
index 14a4b54..adc9cb0 100644
--- a/plugins/excel/excel-xml-read.c
+++ b/plugins/excel/excel-xml-read.c
@@ -1,7 +1,7 @@
/* vim: set sw=8: */
/*
- * excel-xml-read.c : Read MS Excel 2003 SpreadsheetML
+ * excel-xml-read.c : Read MS Excel 2003 SpreadsheetML
*
* Copyright (C) 2003-2008 Jody Goldberg (jody gnome org)
*
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index b4b0aa7..5a0c28b 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -308,7 +308,7 @@ BC_R(ai)(XLChartHandler const *handle,
if (texpr != NULL) {
Sheet *sheet = ms_container_sheet (s->container.parent);
- XL_CHECK_CONDITION_VAL (sheet &&
+ XL_CHECK_CONDITION_VAL (sheet &&
s->currentSeries &&
purpose < G_N_ELEMENTS (s->currentSeries->reg_dims) &&
s->currentSeries->reg_dims[purpose] == NULL,
@@ -2224,7 +2224,7 @@ BC_R(tick)(XLChartHandler const *handle,
s->style->text_layout.angle = -90.;
break;
}
-
+
d (1, {
switch (major) {
case 0: g_printerr ("no major tick;\n"); break;
@@ -2800,7 +2800,7 @@ not_a_matrix:
}
g_slist_free (l);
}
-
+
}
return TRUE;
}
@@ -5816,7 +5816,7 @@ ms_excel_chart_write (ExcelWriteState *ewb, SheetObject *so)
scur = sval->v_range.cell.a.col;
}
} else {
- sval = gnm_expr_top_get_constant (stexpr);
+ sval = gnm_expr_top_get_constant (stexpr);
s_as_col = sval->v_array.y > sval->v_array.x;
}
}
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index 29e5e3d..fa93aa9 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -3285,7 +3285,7 @@ excel_parse_name (GnmXLImporter *importer, Sheet *sheet, char *name,
if (0 == strcmp (name, "Print_Area")) {
GnmValue *val = gnm_expr_get_range (texpr->expr);
if (val != NULL && val->type == VALUE_CELLRANGE) {
- GnmEvalPos ep;
+ GnmEvalPos ep;
int height, width;
eval_pos_init_sheet (&ep, sheet);
height = value_area_get_height (val, &ep);
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index d277228..429f949 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -1313,7 +1313,7 @@ excel_write_HLINKs (BiffPut *bp, ExcelWriteSheet *esheet)
0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b,
};
ms_biff_put_var_write (bp, magic, sizeof magic);
- excel_write_string (bp,
+ excel_write_string (bp,
STR_FOUR_BYTE_LENGTH | STR_SUPPRESS_HEADER | STR_TRAILING_NULL | STR_LEN_IN_BYTES,
target);
} else if (t == gnm_hlink_external_get_type ()) {
@@ -1321,11 +1321,11 @@ excel_write_HLINKs (BiffPut *bp, ExcelWriteSheet *esheet)
0 == strncmp (target, "\\\\", 2)) {
GSF_LE_SET_GUINT32 (data, 0x117);
ms_biff_put_var_write (bp, data, 4);
- excel_write_string (bp,
+ excel_write_string (bp,
STR_FOUR_BYTE_LENGTH | STR_SUPPRESS_HEADER | STR_TRAILING_NULL,
target);
/* Yes twice */
- excel_write_string (bp,
+ excel_write_string (bp,
STR_FOUR_BYTE_LENGTH | STR_SUPPRESS_HEADER | STR_TRAILING_NULL,
target);
} else {
@@ -1357,7 +1357,7 @@ excel_write_HLINKs (BiffPut *bp, ExcelWriteSheet *esheet)
GSF_LE_SET_GUINT32 (data+4, len*2);
GSF_LE_SET_GUINT16 (data+8, 3);
ms_biff_put_var_write (bp, data, 10);
- excel_write_string (bp,
+ excel_write_string (bp,
STR_NO_LENGTH | STR_SUPPRESS_HEADER,
target);
}
diff --git a/plugins/excel/xls-write-pivot.c b/plugins/excel/xls-write-pivot.c
index 59b8ad1..8dcbfa8 100644
--- a/plugins/excel/xls-write-pivot.c
+++ b/plugins/excel/xls-write-pivot.c
@@ -148,7 +148,7 @@ xls_write_pivot_cache_value (ExcelWriteState *ewb, GOVal const *v)
}
static void
-xls_write_pivot_cache_group (ExcelWriteState *ewb,
+xls_write_pivot_cache_group (ExcelWriteState *ewb,
GOValArray const *grouped_items,
GOValBucketer *bucketer)
{
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index c522fc8..2b0b8ab 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -2361,17 +2361,17 @@ GSF_XML_IN_NODE_END
/***********************************************************************/
-/* RGBMAX, HLSMAX must each fit in a byte. */
-/* HLSMAX BEST IF DIVISIBLE BY 6 */
-#define HLSMAX 240 /* H,L, and S vary over 0-HLSMAX */
-#define RGBMAX 255 /* R,G, and B vary over 0-RGBMAX */
-
-/* Hue is undefined if Saturation is 0 (grey-scale) */
-/* This value determines where the Hue scrollbar is */
-/* initially set for achromatic colors */
+/* RGBMAX, HLSMAX must each fit in a byte. */
+/* HLSMAX BEST IF DIVISIBLE BY 6 */
+#define HLSMAX 240 /* H,L, and S vary over 0-HLSMAX */
+#define RGBMAX 255 /* R,G, and B vary over 0-RGBMAX */
+
+/* Hue is undefined if Saturation is 0 (grey-scale) */
+/* This value determines where the Hue scrollbar is */
+/* initially set for achromatic colors */
#define UNDEFINED (HLSMAX*2/3)
-/* utility routine for HLStoRGB */
+/* utility routine for HLStoRGB */
static int
hue_to_color (int m1, int m2, int h)
{
@@ -2380,7 +2380,7 @@ hue_to_color (int m1, int m2, int h)
if (h > HLSMAX)
h -= HLSMAX;
- /* return r,g, or b value from this tridrant */
+ /* return r,g, or b value from this tridrant */
if (h < (HLSMAX/6))
return m1 + (((m2 - m1)*h + (HLSMAX/12))/(HLSMAX/6));
if (h < (HLSMAX/2))
@@ -2436,7 +2436,7 @@ apply_tint (GOColor orig, float tint)
else
l = l * (1. - tint) + (HLSMAX - HLSMAX * (1.0 - tint));
- if (s == 0) { /* achromatic case */
+ if (s == 0) { /* achromatic case */
r = (l * RGBMAX) / HLSMAX;
return GO_COLOR_FROM_RGBA (r, r, r, a);
}
@@ -2453,7 +2453,7 @@ apply_tint (GOColor orig, float tint)
return GO_COLOR_FROM_RGBA (r,g,b,a);
}
-
+
static GnmColor *
elem_color (GsfXMLIn *xin, xmlChar const **attrs)
{
@@ -4156,7 +4156,7 @@ xlsx_read_external_book (GsfXMLIn *xin, xmlChar const **attrs)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
GsfOpenPkgRel const *rel = gsf_open_pkg_lookup_rel_by_type (
- gsf_xml_in_get_input (xin),
+ gsf_xml_in_get_input (xin),
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath");
if (NULL != rel && gsf_open_pkg_rel_is_extern (rel))
state->external_ref = xlsx_conventions_add_extern_ref (
@@ -4579,7 +4579,7 @@ xlsx_pattern_fg_bg (GsfXMLIn *xin, xmlChar const **attrs)
/* MAGIC :
* Looks like pattern background and forground colours are inverted for
* dxfs with solid fills for no apparent reason. */
- gboolean const invert = state->style_accum_partial
+ gboolean const invert = state->style_accum_partial
&& gnm_style_is_element_set (state->style_accum, MSTYLE_PATTERN)
&& (1 == gnm_style_get_pattern (state->style_accum));
GnmColor *color = elem_color (xin, attrs);
@@ -4642,7 +4642,7 @@ xlsx_border_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
XLSXReadState *state = (XLSXReadState *)xin->user_state;
GnmBorder *border;
GnmStyleBorderLocation const loc = xin->node->user_data.v_int;
-
+
if (NULL == state->border_color)
state->border_color = style_color_black ();
border = gnm_style_border_fetch (state->border_style,
diff --git a/plugins/excel/xlsx-write-pivot.c b/plugins/excel/xlsx-write-pivot.c
index b74e6f0..1b69643 100644
--- a/plugins/excel/xlsx-write-pivot.c
+++ b/plugins/excel/xlsx-write-pivot.c
@@ -110,7 +110,7 @@ xlsx_write_pivot_cache_records (XLSXWriteState *state, GODataCache const *cache,
case GO_DATA_CACHE_FIELD_TYPE_INDEXED_I16 : /* fallthrough */
case GO_DATA_CACHE_FIELD_TYPE_INDEXED_I32 : /* fallthrough */
gsf_xml_out_start_element (xml, "x");
- gsf_xml_out_add_int (xml, "v",
+ gsf_xml_out_add_int (xml, "v",
go_data_cache_get_index (cache, field, j));
gsf_xml_out_end_element (xml);
break;
diff --git a/plugins/fn-complex/functions.c b/plugins/fn-complex/functions.c
index 76e3370..5057a3e 100644
--- a/plugins/fn-complex/functions.c
+++ b/plugins/fn-complex/functions.c
@@ -80,7 +80,7 @@ static GnmFuncHelp const help_complex[] = {
{ GNM_FUNC_HELP_ARG, F_("x:real part") },
{ GNM_FUNC_HELP_ARG, F_("y:imaginary part") },
{ GNM_FUNC_HELP_ARG, F_("i:the suffix for the complex number, either \"i\" or \"j\"; defaults to \"i\".") },
- { GNM_FUNC_HELP_NOTE, F_("If @{i} is neither \"i\" nor \"j\", COMPLEX returns #VALUE!") },
+ { GNM_FUNC_HELP_NOTE, F_("If @{i} is neither \"i\" nor \"j\", COMPLEX returns #VALUE!") },
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=COMPLEX(1,-1)" },
{ GNM_FUNC_HELP_END}
diff --git a/plugins/fn-database/functions.c b/plugins/fn-database/functions.c
index e548aa0..2ce664d 100644
--- a/plugins/fn-database/functions.c
+++ b/plugins/fn-database/functions.c
@@ -766,45 +766,45 @@ gnumeric_getpivotdata (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
/***************************************************************************/
const GnmFuncDescriptor database_functions[] = {
- { "daverage", "rSr",
+ { "daverage", "rSr",
help_daverage, gnumeric_daverage, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dcount", "rSr",
+ { "dcount", "rSr",
help_dcount, gnumeric_dcount, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dcounta", "rSr",
+ { "dcounta", "rSr",
help_dcounta, gnumeric_dcounta, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dget", "rSr",
+ { "dget", "rSr",
help_dget, gnumeric_dget, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dmax", "rSr",
+ { "dmax", "rSr",
help_dmax, gnumeric_dmax, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dmin", "rSr",
+ { "dmin", "rSr",
help_dmin, gnumeric_dmin, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dproduct", "rSr",
+ { "dproduct", "rSr",
help_dproduct, gnumeric_dproduct, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dstdev", "rSr",
+ { "dstdev", "rSr",
help_dstdev, gnumeric_dstdev, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dstdevp", "rSr",
+ { "dstdevp", "rSr",
help_dstdevp, gnumeric_dstdevp, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dsum", "rSr",
+ { "dsum", "rSr",
help_dsum, gnumeric_dsum, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dvar", "rSr",
+ { "dvar", "rSr",
help_dvar, gnumeric_dvar, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dvarp", "rSr",
+ { "dvarp", "rSr",
help_dvarp, gnumeric_dvarp, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
/* XL stores in lookup */
- { "getpivotdata", "rs",
+ { "getpivotdata", "rs",
help_getpivotdata, gnumeric_getpivotdata, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_SUBSET, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
diff --git a/plugins/fn-date/functions.c b/plugins/fn-date/functions.c
index 64cf398..3bb1a4a 100644
--- a/plugins/fn-date/functions.c
+++ b/plugins/fn-date/functions.c
@@ -1170,7 +1170,7 @@ GnmFuncDescriptor const datetime_functions[] = {
gnumeric_month, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_UNITLESS,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "networkdays", "ff|?",
+ { "networkdays", "ff|?",
help_networkdays, gnumeric_networkdays, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_UNITLESS,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/plugins/fn-derivatives/options.c b/plugins/fn-derivatives/options.c
index 5dece45..b8289c1 100644
--- a/plugins/fn-derivatives/options.c
+++ b/plugins/fn-derivatives/options.c
@@ -249,7 +249,7 @@ static GnmFuncHelp const help_opt_bs[] = {
DEF_ARG_TIME_MATURITY_Y,
DEF_ARG_RATE_RISKFREE,
DEF_ARG_VOLATILITY,
- DEF_ARG_CC_OPT,
+ DEF_ARG_CC_OPT,
{ GNM_FUNC_HELP_DESCRIPTION, F_("OPT_BS uses the Black-Scholes model to calculate "
"the price of a European option struck at @{strike} "
"on an asset with spot price @{spot}.")},
@@ -1968,148 +1968,148 @@ static GnmFuncHelp const help_opt_binomial[] = {
GnmFuncDescriptor const derivatives_functions [] = {
{ "opt_bs",
- "sfffff|f",
+ "sfffff|f",
help_opt_bs, opt_bs, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_bs_delta",
- "sfffff|f",
+ "sfffff|f",
help_opt_bs_delta, opt_bs_delta, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_bs_rho",
- "sfffff|f",
+ "sfffff|f",
help_opt_bs_rho, opt_bs_rho, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_bs_theta",
- "sfffff|f",
+ "sfffff|f",
help_opt_bs_theta, opt_bs_theta, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_bs_gamma",
- "fffff|f",
+ "fffff|f",
help_opt_bs_gamma, opt_bs_gamma, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_bs_vega",
- "fffff|f",
+ "fffff|f",
help_opt_bs_vega, opt_bs_vega, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_bs_carrycost",
- "sfffff|f",
+ "sfffff|f",
help_opt_bs_carrycost, opt_bs_carrycost, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "cum_biv_norm_dist",
- "fff",
+ "fff",
help_cum_biv_norm_dist, cum_biv_norm_dist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
{ "opt_garman_kohlhagen",
- "sffffff",
+ "sffffff",
help_opt_garman_kohlhagen, opt_garman_kohlhagen, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_french",
- "sfffffff",
+ "sfffffff",
help_opt_french, opt_french, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_jump_diff",
- "sfffffff",
+ "sfffffff",
help_opt_jump_diff, opt_jump_diff, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_exec",
- "sfffffff",
+ "sfffffff",
help_opt_exec, opt_exec, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_bjer_stens",
- "sffffff",
+ "sffffff",
help_opt_bjer_stens, opt_bjer_stens, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_miltersen_schwartz",
- "sfffffffffffff",
+ "sfffffffffffff",
help_opt_miltersen_schwartz, opt_miltersen_schwartz, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_baw_amer",
- "sffffff",
+ "sffffff",
help_opt_baw_amer, opt_baw_amer, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_rgw",
- "fffffff",
+ "fffffff",
help_opt_rgw, opt_rgw, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_forward_start",
- "sfffffff",
+ "sfffffff",
help_opt_forward_start, opt_forward_start, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_time_switch",
- "sfffffffff",
+ "sfffffffff",
help_opt_time_switch, opt_time_switch, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_simple_chooser",
- "fffffff",
+ "fffffff",
help_opt_simple_chooser, opt_simple_chooser, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_complex_chooser",
- "fffffffff",
+ "fffffffff",
help_opt_complex_chooser, opt_complex_chooser, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_on_options",
- "sffffffff",
+ "sffffffff",
help_opt_on_options, opt_on_options, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_extendible_writer",
- "sffffffff",
+ "sffffffff",
help_opt_extendible_writer, opt_extendible_writer, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_2_asset_correlation",
- "sfffffffffff",
+ "sfffffffffff",
help_opt_2_asset_correlation, opt_2_asset_correlation, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_euro_exchange",
- "fffffffffff",
+ "fffffffffff",
help_opt_euro_exchange, opt_euro_exchange, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_amer_exchange",
- "fffffffffff",
+ "fffffffffff",
help_opt_amer_exchange, opt_amer_exchange, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_spread_approx",
- "sffffffff",
+ "sffffffff",
help_opt_spread_approx, opt_spread_approx, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_float_strk_lkbk",
- "sfffffff",
+ "sfffffff",
help_opt_float_strk_lkbk, opt_float_strk_lkbk, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_fixed_strk_lkbk",
- "sffffffff",
+ "sffffffff",
help_opt_fixed_strk_lkbk, opt_fixed_strk_lkbk, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
{ "opt_binomial",
- "ssffffff|f",
+ "ssffffff|f",
help_opt_binomial, opt_binomial, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/plugins/fn-financial/functions.c b/plugins/fn-financial/functions.c
index b2a7c23..ce1fa12 100644
--- a/plugins/fn-financial/functions.c
+++ b/plugins/fn-financial/functions.c
@@ -3161,211 +3161,211 @@ gnumeric_vdb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
/***************************************************************************/
GnmFuncDescriptor const financial_functions[] = {
- { "accrint", "ffffff|f",
+ { "accrint", "ffffff|f",
help_accrint, gnumeric_accrint, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "accrintm", "fff|ff",
+ { "accrintm", "fff|ff",
help_accrintm, gnumeric_accrintm, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "amordegrc", "fffffff",
+ { "amordegrc", "fffffff",
help_amordegrc, gnumeric_amordegrc, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "amorlinc", "fffffff",
+ { "amorlinc", "fffffff",
help_amorlinc, gnumeric_amorlinc, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "coupdaybs", "fff|fb",
+ { "coupdaybs", "fff|fb",
help_coupdaybs, gnumeric_coupdaybs, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "coupdays", "fff|fb",
+ { "coupdays", "fff|fb",
help_coupdays, gnumeric_coupdays, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "coupdaysnc", "fff|fb",
+ { "coupdaysnc", "fff|fb",
help_coupdaysnc, gnumeric_coupdaysnc, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "coupncd", "fff|fb",
+ { "coupncd", "fff|fb",
help_coupncd, gnumeric_coupncd, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_DATE,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "coupnum", "fff|fb",
+ { "coupnum", "fff|fb",
help_coupnum, gnumeric_coupnum, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "couppcd", "fff|fb",
+ { "couppcd", "fff|fb",
help_couppcd, gnumeric_couppcd, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_DATE,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "cumipmt", "ffffff",
+ { "cumipmt", "ffffff",
help_cumipmt, gnumeric_cumipmt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "cumprinc", "ffffff",
+ { "cumprinc", "ffffff",
help_cumprinc, gnumeric_cumprinc, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "db", "ffff|f",
+ { "db", "ffff|f",
help_db, gnumeric_db, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ddb", "ffff|f",
+ { "ddb", "ffff|f",
help_ddb, gnumeric_ddb, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "disc", "ffff|f",
+ { "disc", "ffff|f",
help_disc, gnumeric_disc, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dollarde", "ff",
+ { "dollarde", "ff",
help_dollarde, gnumeric_dollarde, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "dollarfr", "ff",
+ { "dollarfr", "ff",
help_dollarfr, gnumeric_dollarfr, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "duration", "fffff|f",
+ { "duration", "fffff|f",
help_duration, gnumeric_duration, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "effect", "ff",
+ { "effect", "ff",
help_effect, gnumeric_effect, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "euro", "s",
+ { "euro", "s",
help_euro, gnumeric_euro, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
- { "euroconvert", "fss",
+ { "euroconvert", "fss",
help_euroconvert, gnumeric_euroconvert, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "fv", "fff|ff",
+ { "fv", "fff|ff",
help_fv, gnumeric_fv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "fvschedule", "fA",
+ { "fvschedule", "fA",
help_fvschedule, gnumeric_fvschedule, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "g_duration", "fff",
+ { "g_duration", "fff",
help_g_duration, gnumeric_g_duration, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
- { "intrate", "ffff|f",
+ { "intrate", "ffff|f",
help_intrate, gnumeric_intrate, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ipmt", "ffff|ff",
+ { "ipmt", "ffff|ff",
help_ipmt, gnumeric_ipmt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "irr", "A|f",
+ { "irr", "A|f",
help_irr, gnumeric_irr, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ispmt", "ffff",
+ { "ispmt", "ffff",
help_ispmt, gnumeric_ispmt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "mduration", "fffff|f",
+ { "mduration", "fffff|f",
help_mduration, gnumeric_mduration, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "mirr", "Aff",
+ { "mirr", "Aff",
help_mirr, gnumeric_mirr, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "nominal", "ff",
+ { "nominal", "ff",
help_nominal, gnumeric_nominal, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "nper", "fff|ff",
+ { "nper", "fff|ff",
help_nper, gnumeric_nper, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
{ "npv", NULL,
help_npv, NULL, gnumeric_npv, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "oddfprice", "fffffffff",
+ { "oddfprice", "fffffffff",
help_oddfprice, gnumeric_oddfprice, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "oddfyield", "fffffffff",
+ { "oddfyield", "fffffffff",
help_oddfyield, gnumeric_oddfyield, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "oddlprice", "ffffffff",
+ { "oddlprice", "ffffffff",
help_oddlprice, gnumeric_oddlprice, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "oddlyield", "ffffffff",
+ { "oddlyield", "ffffffff",
help_oddlyield, gnumeric_oddlyield, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "pmt", "fff|ff",
+ { "pmt", "fff|ff",
help_pmt, gnumeric_pmt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ppmt", "ffff|ff",
+ { "ppmt", "ffff|ff",
help_ppmt, gnumeric_ppmt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "price", "ffffff|f",
+ { "price", "ffffff|f",
help_price, gnumeric_price, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "pricedisc", "ffff|f",
+ { "pricedisc", "ffff|f",
help_pricedisc, gnumeric_pricedisc, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "pricemat", "fffff|f",
+ { "pricemat", "fffff|f",
help_pricemat, gnumeric_pricemat, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "pv", "fff|ff",
+ { "pv", "fff|ff",
help_pv, gnumeric_pv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "rate", "fff|fff",
+ { "rate", "fff|fff",
help_rate, gnumeric_rate, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "rri", "fff",
+ { "rri", "fff",
help_rri, gnumeric_rri, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "received", "ffff|f",
+ { "received", "ffff|f",
help_received, gnumeric_received, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "sln", "fff",
+ { "sln", "fff",
help_sln, gnumeric_sln, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "syd", "ffff",
+ { "syd", "ffff",
help_syd, gnumeric_syd, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "tbilleq", "fff",
+ { "tbilleq", "fff",
help_tbilleq, gnumeric_tbilleq, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "tbillprice", "fff",
+ { "tbillprice", "fff",
help_tbillprice, gnumeric_tbillprice, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "tbillyield", "fff",
+ { "tbillyield", "fff",
help_tbillyield, gnumeric_tbillyield, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "vdb", "fffff|ff",
+ { "vdb", "fffff|ff",
help_vdb, gnumeric_vdb, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "xirr", "AA|f",
+ { "xirr", "AA|f",
help_xirr, gnumeric_xirr, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "xnpv", "fAA",
+ { "xnpv", "fAA",
help_xnpv, gnumeric_xnpv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_MONETARY,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "yield", "ffffff|f",
+ { "yield", "ffffff|f",
help_yield, gnumeric_yield, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_PERCENT,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "yielddisc", "ffff|f",
+ { "yielddisc", "ffff|f",
help_yielddisc, gnumeric_yielddisc, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "yieldmat", "fffff|f",
+ { "yieldmat", "fffff|f",
help_yieldmat, gnumeric_yieldmat, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
{NULL}
diff --git a/plugins/fn-financial/sc-fin.h b/plugins/fn-financial/sc-fin.h
index 42d72a2..69881b7 100644
--- a/plugins/fn-financial/sc-fin.h
+++ b/plugins/fn-financial/sc-fin.h
@@ -2,10 +2,10 @@
#ifndef __SC_FIN_H__
#define __SC_FIN_H__
-GnmValue *get_amordegrc (gnm_float fCost, GDate *nDate, GDate *nFirstPer,
+GnmValue *get_amordegrc (gnm_float fCost, GDate *nDate, GDate *nFirstPer,
gnm_float fRestVal, gint nPer, gnm_float fRate,
gint nBase);
-GnmValue *get_amorlinc (gnm_float fCost, GDate *nDate, GDate *nFirstPer,
+GnmValue *get_amorlinc (gnm_float fCost, GDate *nDate, GDate *nFirstPer,
gnm_float fRestVal, gint nPer, gnm_float fRate,
gint nBase);
GnmValue *get_yieldmat (GDate *nSettle, GDate *nMat, GDate *nIssue,
diff --git a/plugins/fn-info/functions.c b/plugins/fn-info/functions.c
index 0d58217..c05bec8 100644
--- a/plugins/fn-info/functions.c
+++ b/plugins/fn-info/functions.c
@@ -1724,7 +1724,7 @@ static GnmFuncHelp const help_type[] = {
"2 \t= text\n"
"4 \t= boolean\n"
"16 \t= error\n"
- "64 \t= array")},
+ "64 \t= array")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=TYPE(3)" },
{ GNM_FUNC_HELP_EXAMPLES, "=TYPE(\"Gnumeric\")" },
@@ -1761,7 +1761,7 @@ static GnmFuncHelp const help_getenv[] = {
{ GNM_FUNC_HELP_NAME, F_("GETENV:the value of execution environment varaible @{name}")},
{ GNM_FUNC_HELP_ARG, F_("name:the name of the environment variable")},
{ GNM_FUNC_HELP_NOTE, F_("If a variable called @{name} does not exist, #N/A! will be returned.") },
- { GNM_FUNC_HELP_NOTE, F_("Variable names are case sensitive.") },
+ { GNM_FUNC_HELP_NOTE, F_("Variable names are case sensitive.") },
{ GNM_FUNC_HELP_EXAMPLES, "=GETENV(\"HOME\")" },
{ GNM_FUNC_HELP_END}
};
diff --git a/plugins/fn-lookup/functions.c b/plugins/fn-lookup/functions.c
index ddcf447..b0d5ce5 100644
--- a/plugins/fn-lookup/functions.c
+++ b/plugins/fn-lookup/functions.c
@@ -1594,28 +1594,28 @@ gnumeric_transpose (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
/***************************************************************************/
GnmFuncDescriptor const lookup_functions[] = {
- { "address", "ff|fbs",
+ { "address", "ff|fbs",
help_address, gnumeric_address, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },
- { "areas", NULL,
+ { "areas", NULL,
help_areas, NULL, gnumeric_areas, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "choose", NULL,
+ { "choose", NULL,
help_choose, NULL, gnumeric_choose, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "column", "|A",
+ { "column", "|A",
help_column, gnumeric_column, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "columnnumber", "s",
+ { "columnnumber", "s",
help_columnnumber, gnumeric_columnnumber, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "columns", "A",
+ { "columns", "A",
help_columns, gnumeric_columns, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "hlookup", "EAf|bb",
+ { "hlookup", "EAf|bb",
help_hlookup, gnumeric_hlookup, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "hyperlink", "s|s",
+ { "hyperlink", "s|s",
help_hyperlink, gnumeric_hyperlink, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_SUBSET, GNM_FUNC_TEST_STATUS_BASIC },
{ "indirect", "s|b",
@@ -1624,25 +1624,25 @@ GnmFuncDescriptor const lookup_functions[] = {
{ "index", "A|fff",
help_index, NULL, gnumeric_index, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "lookup", "EA|r",
+ { "lookup", "EA|r",
help_lookup, gnumeric_lookup, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "match", "EA|f",
+ { "match", "EA|f",
help_match, gnumeric_match, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
{ "offset", "rff|ff",
help_offset, gnumeric_offset, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "row", "|A",
+ { "row", "|A",
help_row, gnumeric_row, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "rows", "A",
+ { "rows", "A",
help_rows, gnumeric_rows, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "transpose", "A",
+ { "transpose", "A",
help_transpose, gnumeric_transpose, NULL, NULL, NULL, NULL,
GNM_FUNC_RETURNS_NON_SCALAR, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "vlookup", "EAf|bb",
+ { "vlookup", "EAf|bb",
help_vlookup, gnumeric_vlookup, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/plugins/fn-math/functions.c b/plugins/fn-math/functions.c
index f9bac8e..fd4b5e4 100644
--- a/plugins/fn-math/functions.c
+++ b/plugins/fn-math/functions.c
@@ -265,7 +265,7 @@ static GnmFuncHelp const help_acosh[] = {
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=ACOSH(0.1)" },
{ GNM_FUNC_HELP_EXAMPLES, "=ACOSH(-0.1)" },
- { GNM_FUNC_HELP_SEEALSO, "ACOS,ASINH,DEGREES,RADIANS "},
+ { GNM_FUNC_HELP_SEEALSO, "ACOS,ASINH,DEGREES,RADIANS "},
{ GNM_FUNC_HELP_END}
};
@@ -323,7 +323,7 @@ static GnmFuncHelp const help_asin[] = {
{ GNM_FUNC_HELP_ARG, F_("x:number")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("ASIN calculates the arc sine of @{x}; that is the value whose sine is @{x}.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{x} falls outside the range -1 to 1, ASIN returns #NUM!") },
+ { GNM_FUNC_HELP_NOTE, F_("If @{x} falls outside the range -1 to 1, ASIN returns #NUM!") },
{ GNM_FUNC_HELP_EXAMPLES, "=ASIN(0.5)" },
{ GNM_FUNC_HELP_EXAMPLES, "=ASIN(1)" },
{ GNM_FUNC_HELP_SEEALSO, "SIN,COS,ASINH,DEGREES,RADIANS"},
@@ -386,7 +386,7 @@ static GnmFuncHelp const help_atanh[] = {
{ GNM_FUNC_HELP_ARG, F_("x:angle in radians")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("ATANH calculates the inverse hyperbolic tangent of @{x}; that is the value whose hyperbolic tangent is @{x}.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
- { GNM_FUNC_HELP_NOTE, F_("If the absolute value of @{x} is greater than 1.0, ATANH returns #NUM!") },
+ { GNM_FUNC_HELP_NOTE, F_("If the absolute value of @{x} is greater than 1.0, ATANH returns #NUM!") },
{ GNM_FUNC_HELP_EXAMPLES, "=ATANH(0.5)" },
{ GNM_FUNC_HELP_EXAMPLES, "=ATANH(1)" },
{ GNM_FUNC_HELP_SEEALSO, "ATAN,COS,SIN,DEGREES,RADIANS"},
@@ -434,12 +434,12 @@ gnumeric_atan2 (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_ceil[] = {
{ GNM_FUNC_HELP_NAME, F_("CEIL:smallest integer larger than or equal to @{x}")},
- { GNM_FUNC_HELP_ARG, F_("x:number")},
+ { GNM_FUNC_HELP_ARG, F_("x:number")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("CEIL(@{x}) is the smallest integer that is at least as large as @{x}.")},
{ GNM_FUNC_HELP_ODF, F_("This function is the OpenFormula function CEILING(@{x}).")},
{ GNM_FUNC_HELP_EXAMPLES, "=CEIL(0.4)" },
{ GNM_FUNC_HELP_EXAMPLES, "=CEIL(-1.1)" },
- { GNM_FUNC_HELP_EXAMPLES, "=CEIL(-2.9)" },
+ { GNM_FUNC_HELP_EXAMPLES, "=CEIL(-2.9)" },
{ GNM_FUNC_HELP_SEEALSO, "CEILING,FLOOR,ABS,INT,MOD"},
{ GNM_FUNC_HELP_END }
};
@@ -752,8 +752,8 @@ gnumeric_averageif (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_ceiling[] = {
{ GNM_FUNC_HELP_NAME, F_("CEILING:nearest multiple of @{significance} whose absolute value is at least ABS(@{x})")},
- { GNM_FUNC_HELP_ARG, F_("x:number")},
- { GNM_FUNC_HELP_ARG, F_("significance:base multiple (defaults to 1 for @{x} > 0 and -1 for @{x} <0)")},
+ { GNM_FUNC_HELP_ARG, F_("x:number")},
+ { GNM_FUNC_HELP_ARG, F_("significance:base multiple (defaults to 1 for @{x} > 0 and -1 for @{x} <0)")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("CEILING(@{x},@{significance}) is the nearest multiple of @{significance} whose absolute value is at least ABS(@{x}).")},
{ GNM_FUNC_HELP_NOTE, F_("If @{x} or @{significance} is non-numeric, CEILING returns a #VALUE! error.")},
{ GNM_FUNC_HELP_NOTE, F_("If @{x} and @{significance} have different signs, CEILING returns a #NUM! error.")},
@@ -761,7 +761,7 @@ static GnmFuncHelp const help_ceiling[] = {
{ GNM_FUNC_HELP_ODF, F_("CEILING(@{x}) is exported to ODF as CEILING(@{x},SIGN(@{x}),1). CEILING(@{x},@{significance}) is the OpenFormula function CEILING(@{x},@{significance},1).")},
{ GNM_FUNC_HELP_EXAMPLES, "=CEILING(2.43,1)" },
{ GNM_FUNC_HELP_EXAMPLES, "=CEILING(123.123,3)" },
- { GNM_FUNC_HELP_EXAMPLES, "=CEILING(-2.43,-1)" },
+ { GNM_FUNC_HELP_EXAMPLES, "=CEILING(-2.43,-1)" },
{ GNM_FUNC_HELP_SEEALSO, "CEIL,FLOOR,ABS,INT,MOD"},
{ GNM_FUNC_HELP_END }
};
@@ -1478,7 +1478,7 @@ static GnmFuncHelp const help_sinh[] = {
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=SINH(0.1)" },
{ GNM_FUNC_HELP_EXAMPLES, "=SINH(-0.1)" },
- { GNM_FUNC_HELP_SEEALSO, "ACOS,ASINH,DEGREES,RADIANS "},
+ { GNM_FUNC_HELP_SEEALSO, "ACOS,ASINH,DEGREES,RADIANS "},
{ GNM_FUNC_HELP_END}
};
@@ -1567,7 +1567,7 @@ static GnmFuncHelp const help_multinomial[] = {
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=MULTINOMIAL(2,3,4)"},
{ GNM_FUNC_HELP_SEEALSO, "COMBIN,SUM"},
- { GNM_FUNC_HELP_EXTREF, F_("wiki:en:Multinomial_theorem") },
+ { GNM_FUNC_HELP_EXTREF, F_("wiki:en:Multinomial_theorem") },
{ GNM_FUNC_HELP_END}
};
@@ -2083,7 +2083,7 @@ static GnmFuncHelp const help_arabic[] = {
"(directly or indirectly) reduces the final value "
"by the symbol amount, otherwise, it increases the "
"final amount by the symbol's amount.") },
- { GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
+ { GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
{ GNM_FUNC_HELP_EXAMPLES, "=ARABIC(\"I\")"},
{ GNM_FUNC_HELP_EXAMPLES, "=ARABIC(\"CDLII\")"},
{ GNM_FUNC_HELP_EXAMPLES, "=ARABIC(\"MCDXC\")"},
@@ -2743,8 +2743,8 @@ static GnmFuncHelp const help_cholesky[] = {
(var)[_i] = g_new (gnm_float, _d2); \
} while (0)
-static gboolean
-gnm_matrix_cholesky (gnm_float **A, gnm_float ***B, int n)
+static gboolean
+gnm_matrix_cholesky (gnm_float **A, gnm_float ***B, int n)
{
int i, j, k;
gnm_float sum;
@@ -2752,7 +2752,7 @@ gnm_matrix_cholesky (gnm_float **A, gnm_float ***B, int n)
ALLOC_MATRIX (*B, n, n);
for (i = 0; i < n; i++) { /* row number */
- for (j = 0; j < i; j++) { /* column number */
+ for (j = 0; j < i; j++) { /* column number */
sum = 0.;
for (k = 0; k < j; k++)
sum += (*B)[i][k]*(*B)[j][k];
@@ -2765,7 +2765,7 @@ gnm_matrix_cholesky (gnm_float **A, gnm_float ***B, int n)
(*B)[i][i] = gnm_sqrt (A[i][i] - sum);
}
return TRUE;
-}
+}
#undef ALLOC_MATRIX
@@ -2815,7 +2815,7 @@ gnumeric_cholesky (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_munit[] = {
{ GNM_FUNC_HELP_NAME, F_("MUNIT:the @{n} by @{n} identity matrix")},
{ GNM_FUNC_HELP_ARG, F_("n:size of the matrix")},
- { GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
+ { GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
{ GNM_FUNC_HELP_SEEALSO, "MMULT,MDETERM,MINVERSE"},
{ GNM_FUNC_HELP_END}
};
@@ -3180,7 +3180,7 @@ GnmFuncDescriptor const math_functions[] = {
{ "gamma", "f", help_gamma,
gnumeric_gamma, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "gammaln", "f",
+ { "gammaln", "f",
help_gammaln, gnumeric_gammaln, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
{ "gcd", NULL, help_gcd,
@@ -3328,10 +3328,10 @@ GnmFuncDescriptor const math_functions[] = {
GNM_FUNC_RETURNS_NON_SCALAR, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
{ "munit","f", help_munit,
gnumeric_munit, NULL, NULL, NULL, NULL,
- GNM_FUNC_RETURNS_NON_SCALAR, GNM_FUNC_IMPL_STATUS_COMPLETE,
+ GNM_FUNC_RETURNS_NON_SCALAR, GNM_FUNC_IMPL_STATUS_COMPLETE,
GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
#if 0
- { "logmdeterm", "A|si",
+ { "logmdeterm", "A|si",
help_logmdeterm, gnumeric_logmdeterm, NULL, NULL, NULL },
#endif
{NULL}
diff --git a/plugins/fn-numtheory/numtheory.c b/plugins/fn-numtheory/numtheory.c
index ef2e4be..9d59fbb 100644
--- a/plugins/fn-numtheory/numtheory.c
+++ b/plugins/fn-numtheory/numtheory.c
@@ -251,7 +251,7 @@ gnumeric_phi (GnmFuncEvalInfo *ei, GnmValue const * const *args)
static GnmFuncHelp const help_nt_mu[] = {
{ GNM_FUNC_HELP_NAME, F_("NT_MU:Möbius mu function")},
{ GNM_FUNC_HELP_ARG, F_("n:positive integer")},
- { GNM_FUNC_HELP_DESCRIPTION,
+ { GNM_FUNC_HELP_DESCRIPTION,
F_("NT_MU function (Möbius mu function) returns 0 if @{n} is "
"divisible by the square of a prime. Otherwise, if @{n} has"
" an odd number of different prime factors, NT_MU returns "
diff --git a/plugins/fn-r/functions.c b/plugins/fn-r/functions.c
index 1baa35a..35501de 100644
--- a/plugins/fn-r/functions.c
+++ b/plugins/fn-r/functions.c
@@ -1194,7 +1194,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dnorm",
"fff|b",
-
+
help_r_dnorm,
gnumeric_r_dnorm, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1202,7 +1202,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pnorm",
"fff|bb",
-
+
help_r_pnorm,
gnumeric_r_pnorm, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1210,7 +1210,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qnorm",
"fff|bb",
-
+
help_r_qnorm,
gnumeric_r_qnorm, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1218,7 +1218,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dlnorm",
"fff|b",
-
+
help_r_dlnorm,
gnumeric_r_dlnorm, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1226,7 +1226,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.plnorm",
"fff|bb",
-
+
help_r_plnorm,
gnumeric_r_plnorm, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1234,7 +1234,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qlnorm",
"fff|bb",
-
+
help_r_qlnorm,
gnumeric_r_qlnorm, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1242,7 +1242,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dgamma",
"fff|b",
-
+
help_r_dgamma,
gnumeric_r_dgamma, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1250,7 +1250,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pgamma",
"fff|bb",
-
+
help_r_pgamma,
gnumeric_r_pgamma, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1258,7 +1258,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qgamma",
"fff|bb",
-
+
help_r_qgamma,
gnumeric_r_qgamma, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1266,7 +1266,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dbeta",
"fff|b",
-
+
help_r_dbeta,
gnumeric_r_dbeta, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1274,7 +1274,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pbeta",
"fff|bb",
-
+
help_r_pbeta,
gnumeric_r_pbeta, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1282,7 +1282,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qbeta",
"fff|bb",
-
+
help_r_qbeta,
gnumeric_r_qbeta, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1290,7 +1290,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dt",
"ff|b",
-
+
help_r_dt,
gnumeric_r_dt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1298,7 +1298,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pt",
"ff|bb",
-
+
help_r_pt,
gnumeric_r_pt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1306,7 +1306,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qt",
"ff|bb",
-
+
help_r_qt,
gnumeric_r_qt, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1314,7 +1314,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.df",
"fff|b",
-
+
help_r_df,
gnumeric_r_df, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1322,7 +1322,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pf",
"fff|bb",
-
+
help_r_pf,
gnumeric_r_pf, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1330,7 +1330,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qf",
"fff|bb",
-
+
help_r_qf,
gnumeric_r_qf, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1338,7 +1338,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dchisq",
"ff|b",
-
+
help_r_dchisq,
gnumeric_r_dchisq, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1346,7 +1346,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pchisq",
"ff|bb",
-
+
help_r_pchisq,
gnumeric_r_pchisq, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1354,7 +1354,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qchisq",
"ff|bb",
-
+
help_r_qchisq,
gnumeric_r_qchisq, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1362,7 +1362,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dweibull",
"fff|b",
-
+
help_r_dweibull,
gnumeric_r_dweibull, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1370,7 +1370,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pweibull",
"fff|bb",
-
+
help_r_pweibull,
gnumeric_r_pweibull, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1378,7 +1378,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qweibull",
"fff|bb",
-
+
help_r_qweibull,
gnumeric_r_qweibull, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1386,7 +1386,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dpois",
"ff|b",
-
+
help_r_dpois,
gnumeric_r_dpois, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1394,7 +1394,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.ppois",
"ff|bb",
-
+
help_r_ppois,
gnumeric_r_ppois, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1402,7 +1402,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qpois",
"ff|bb",
-
+
help_r_qpois,
gnumeric_r_qpois, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1410,7 +1410,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dexp",
"ff|b",
-
+
help_r_dexp,
gnumeric_r_dexp, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1418,7 +1418,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pexp",
"ff|bb",
-
+
help_r_pexp,
gnumeric_r_pexp, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1426,7 +1426,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qexp",
"ff|bb",
-
+
help_r_qexp,
gnumeric_r_qexp, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1434,7 +1434,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dbinom",
"fff|b",
-
+
help_r_dbinom,
gnumeric_r_dbinom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1442,7 +1442,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pbinom",
"fff|bb",
-
+
help_r_pbinom,
gnumeric_r_pbinom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1450,7 +1450,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qbinom",
"fff|bb",
-
+
help_r_qbinom,
gnumeric_r_qbinom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1458,7 +1458,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dnbinom",
"fff|b",
-
+
help_r_dnbinom,
gnumeric_r_dnbinom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1466,7 +1466,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pnbinom",
"fff|bb",
-
+
help_r_pnbinom,
gnumeric_r_pnbinom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1474,7 +1474,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qnbinom",
"fff|bb",
-
+
help_r_qnbinom,
gnumeric_r_qnbinom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1482,7 +1482,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dhyper",
"ffff|b",
-
+
help_r_dhyper,
gnumeric_r_dhyper, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1490,7 +1490,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.phyper",
"ffff|bb",
-
+
help_r_phyper,
gnumeric_r_phyper, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1498,7 +1498,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qhyper",
"ffff|bb",
-
+
help_r_qhyper,
gnumeric_r_qhyper, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1506,7 +1506,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dgeom",
"ff|b",
-
+
help_r_dgeom,
gnumeric_r_dgeom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1514,7 +1514,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pgeom",
"ff|bb",
-
+
help_r_pgeom,
gnumeric_r_pgeom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1522,7 +1522,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qgeom",
"ff|bb",
-
+
help_r_qgeom,
gnumeric_r_qgeom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1530,7 +1530,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.dcauchy",
"fff|b",
-
+
help_r_dcauchy,
gnumeric_r_dcauchy, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1538,7 +1538,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.pcauchy",
"fff|bb",
-
+
help_r_pcauchy,
gnumeric_r_pcauchy, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
@@ -1546,7 +1546,7 @@ GnmFuncDescriptor const stat_functions[] = {
{
"r.qcauchy",
"fff|bb",
-
+
help_r_qcauchy,
gnumeric_r_qcauchy, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
diff --git a/plugins/fn-random/functions.c b/plugins/fn-random/functions.c
index df74483..8b75b5b 100644
--- a/plugins/fn-random/functions.c
+++ b/plugins/fn-random/functions.c
@@ -900,7 +900,7 @@ GnmFuncDescriptor const random_functions[] = {
{ "randchisq", "f", help_randchisq,
gnumeric_randchisq, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "randdiscrete", "r|r",
+ { "randdiscrete", "r|r",
help_randdiscrete, gnumeric_randdiscrete, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
{ "randexp", "f", help_randexp,
diff --git a/plugins/fn-stat/functions.c b/plugins/fn-stat/functions.c
index 7203dba..3917848 100644
--- a/plugins/fn-stat/functions.c
+++ b/plugins/fn-stat/functions.c
@@ -76,7 +76,7 @@ gnumeric_varp (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
static GnmFuncHelp const help_var[] = {
{ GNM_FUNC_HELP_NAME, F_("VAR:sample variance of the given sample")},
- { GNM_FUNC_HELP_ARG, F_("area1:first cell area")},
+ { GNM_FUNC_HELP_ARG, F_("area1:first cell area")},
{ GNM_FUNC_HELP_ARG, F_("area2:second cell area")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("VAR is also known as the N-1-variance. Under reasonable conditions, it is the maximum-likelihood estimator for the "
"true variance.")},
@@ -134,12 +134,12 @@ gnumeric_stdev (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
static GnmFuncHelp const help_stdevp[] = {
{ GNM_FUNC_HELP_NAME, F_("STDEVP:population standard deviation of the given population")},
- { GNM_FUNC_HELP_ARG, F_("area1:first cell area")},
+ { GNM_FUNC_HELP_ARG, F_("area1:first cell area")},
{ GNM_FUNC_HELP_ARG, F_("area2:second cell area")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("This is also known as the N-standard deviation")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.")},
- { GNM_FUNC_HELP_EXAMPLES, F_("Then STDEVP(A1:A5) equals 9.701133954.")},
+ { GNM_FUNC_HELP_EXAMPLES, F_("Then STDEVP(A1:A5) equals 9.701133954.")},
{ GNM_FUNC_HELP_SEEALSO, ("STDEV,STDEVA,STDEVPA")},
{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Standard_deviation") },
{ GNM_FUNC_HELP_EXTREF, F_("wolfram:StandardDeviation.html") },
@@ -212,14 +212,14 @@ static GnmFuncHelp const help_trimmean[] = {
{ GNM_FUNC_HELP_NAME, F_("TRIMMEAN:mean of the interior of a data set")},
{ GNM_FUNC_HELP_ARG, F_("ref:list of numbers whose mean you want to calculate")},
- { GNM_FUNC_HELP_ARG, F_("fraction:fraction of the data set excluded from the mean")},
+ { GNM_FUNC_HELP_ARG, F_("fraction:fraction of the data set excluded from the mean")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("If @{fraction}=0.2 and the data set contains 40 numbers, 8 numbers are trimmed from the data set (40 x 0.2): "
- "the 4 largest and the 4 smallest. To avoid a bias, the number of points to be excluded is always rounded down to the nearest even number.")},
+ "the 4 largest and the 4 smallest. To avoid a bias, the number of points to be excluded is always rounded down to the nearest even number.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.")},
{ GNM_FUNC_HELP_EXAMPLES, F_("Then TRIMMEAN(A1:A5,0.2) equals 23.2 and TRIMMEAN(A1:A5,0.4) equals 21.5.")},
{ GNM_FUNC_HELP_SEEALSO, ("AVERAGE,GEOMEAN,HARMEAN,MEDIAN,MODE")},
- { GNM_FUNC_HELP_END }
+ { GNM_FUNC_HELP_END }
};
static GnmValue *
@@ -1165,7 +1165,7 @@ static GnmFuncHelp const help_tinv[] = {
{ GNM_FUNC_HELP_NAME, F_("TINV:inverse of the survival function of the Student t-distribution")},
{ GNM_FUNC_HELP_ARG, F_("p:probability")},
{ GNM_FUNC_HELP_ARG, F_("dof:number of degrees of freedom")},
- { GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
+ { GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 or @{dof} < 1 this function returns a #NUM! error.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_NOTE, F_("The parameterization of this function is different from "
@@ -1367,7 +1367,7 @@ static GnmFuncHelp const help_finv[] = {
{ GNM_FUNC_HELP_ARG, F_("p:probability")},
{ GNM_FUNC_HELP_ARG, F_("dof_of_num:numerator degrees of freedom")},
{ GNM_FUNC_HELP_ARG, F_("dof_of_denom:denomiantor degrees of freedom")},
- { GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
+ { GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
{ GNM_FUNC_HELP_NOTE, F_("If @{p} < 0 or @{p} > 1 this function returns a #NUM! error.") },
{ GNM_FUNC_HELP_NOTE, F_("If @{dof_of_num} < 1 or @{dof_of_denom} < 1 this function returns a #NUM! error.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
@@ -3344,7 +3344,7 @@ gnumeric_linest (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
value_array_set (result, dim - i - 1, 1,
value_new_float (extra_stat->se[i+affine]));
value_array_set (result, dim, 1,
- affine ? value_new_float (extra_stat->se[0])
+ affine ? value_new_float (extra_stat->se[0])
: value_new_error_NA (ei->pos));
} else
result = value_new_array (dim + 1, 1);
@@ -4805,15 +4805,15 @@ gnumeric_permutationa (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
/***************************************************************************/
GnmFuncDescriptor const stat_functions[] = {
- { "avedev", NULL,
+ { "avedev", NULL,
help_avedev, NULL, gnumeric_avedev, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "average", NULL,
+ { "average", NULL,
help_average, NULL, gnumeric_average, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "averagea", NULL,
+ { "averagea", NULL,
help_averagea, NULL, gnumeric_averagea, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
@@ -4822,13 +4822,13 @@ GnmFuncDescriptor const stat_functions[] = {
gnumeric_bernoulli, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "betadist", "fff|ff",
+ { "betadist", "fff|ff",
help_betadist, gnumeric_betadist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "betainv", "fff|ff",
+ { "betainv", "fff|ff",
help_betainv, gnumeric_betainv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "binomdist", "fffb",
+ { "binomdist", "fffb",
help_binomdist, gnumeric_binomdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
@@ -4836,241 +4836,241 @@ GnmFuncDescriptor const stat_functions[] = {
gnumeric_cauchy, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "chidist", "ff",
+ { "chidist", "ff",
help_chidist, gnumeric_chidist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "chiinv", "ff",
+ { "chiinv", "ff",
help_chiinv, gnumeric_chiinv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "chitest", "AA",
+ { "chitest", "AA",
help_chitest, gnumeric_chitest, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "confidence", "fff",
+ { "confidence", "fff",
help_confidence, gnumeric_confidence, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "correl", "AA",
+ { "correl", "AA",
help_correl, gnumeric_correl, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "count", NULL,
+ { "count", NULL,
help_count, NULL, gnumeric_count, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "counta", NULL,
+ { "counta", NULL,
help_counta, NULL, gnumeric_counta, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "covar", "AA",
+ { "covar", "AA",
help_covar, gnumeric_covar, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "critbinom", "fff",
+ { "critbinom", "fff",
help_critbinom, gnumeric_critbinom, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "devsq", NULL,
+ { "devsq", NULL,
help_devsq, NULL, gnumeric_devsq, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "expondist", "ffb",
+ { "expondist", "ffb",
help_expondist, gnumeric_expondist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "fdist", "fff",
+ { "fdist", "fff",
help_fdist, gnumeric_fdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "finv", "fff",
+ { "finv", "fff",
help_finv, gnumeric_finv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "fisher", "f",
+ { "fisher", "f",
help_fisher, gnumeric_fisher, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "fisherinv", "f",
+ { "fisherinv", "f",
help_fisherinv, gnumeric_fisherinv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "forecast", "frr",
+ { "forecast", "frr",
help_forecast, gnumeric_forecast, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "frequency", "AA",
+ { "frequency", "AA",
help_frequency, gnumeric_frequency, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ftest", "rr",
+ { "ftest", "rr",
help_ftest, gnumeric_ftest, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "gammadist", "fffb",
+ { "gammadist", "fffb",
help_gammadist, gnumeric_gammadist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "gammainv", "fff",
+ { "gammainv", "fff",
help_gammainv, gnumeric_gammainv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "geomean", NULL,
+ { "geomean", NULL,
help_geomean, NULL, gnumeric_geomean, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "growth", "A|AAb",
+ { "growth", "A|AAb",
help_growth, gnumeric_growth, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "harmean", NULL,
+ { "harmean", NULL,
help_harmean, NULL, gnumeric_harmean, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "hypgeomdist", "ffff|b",
+ { "hypgeomdist", "ffff|b",
help_hypgeomdist, gnumeric_hypgeomdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "intercept", "AA",
+ { "intercept", "AA",
help_intercept, gnumeric_intercept, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "kurt", NULL,
+ { "kurt", NULL,
help_kurt, NULL, gnumeric_kurt, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "large", "Af",
+ { "large", "Af",
help_large, gnumeric_large, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "linest", "A|Abb",
+ { "linest", "A|Abb",
help_linest, gnumeric_linest, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "logest", "A|Abb",
+ { "logest", "A|Abb",
help_logest, gnumeric_logest, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "logfit", "rr",
+ { "logfit", "rr",
help_logfit, gnumeric_logfit, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "loginv", "fff",
+ { "loginv", "fff",
help_loginv, gnumeric_loginv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "lognormdist", "fff",
+ { "lognormdist", "fff",
help_lognormdist, gnumeric_lognormdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "logreg", "A|Abb",
+ { "logreg", "A|Abb",
help_logreg, gnumeric_logreg, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "max", NULL,
+ { "max", NULL,
help_max, NULL, gnumeric_max, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "maxa", NULL,
+ { "maxa", NULL,
help_maxa, NULL, gnumeric_maxa, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "median", NULL,
+ { "median", NULL,
help_median, NULL, gnumeric_median, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "min", NULL,
+ { "min", NULL,
help_min, NULL, gnumeric_min, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "mina", NULL,
+ { "mina", NULL,
help_mina, NULL, gnumeric_mina, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "mode", NULL,
+ { "mode", NULL,
help_mode, NULL, gnumeric_mode, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "negbinomdist", "fff",
+ { "negbinomdist", "fff",
help_negbinomdist, gnumeric_negbinomdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "normdist", "fffb",
+ { "normdist", "fffb",
help_normdist, gnumeric_normdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "norminv", "fff",
+ { "norminv", "fff",
help_norminv, gnumeric_norminv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "normsdist", "f",
+ { "normsdist", "f",
help_normsdist, gnumeric_normsdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "normsinv", "f",
+ { "normsinv", "f",
help_normsinv, gnumeric_normsinv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "pearson", "AA",
+ { "pearson", "AA",
help_pearson, gnumeric_pearson, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "percentile", "Af",
+ { "percentile", "Af",
help_percentile, gnumeric_percentile, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "percentrank", "Af|f",
+ { "percentrank", "Af|f",
help_percentrank, gnumeric_percentrank, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "permut", "ff",
+ { "permut", "ff",
help_permut, gnumeric_permut, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "poisson", "ffb",
+ { "poisson", "ffb",
help_poisson, gnumeric_poisson, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "prob", "AAf|f",
+ { "prob", "AAf|f",
help_prob, gnumeric_prob, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "quartile", "Af",
+ { "quartile", "Af",
help_quartile, gnumeric_quartile, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "rank", "fr|f",
+ { "rank", "fr|f",
help_rank, gnumeric_rank, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "slope", "AA",
+ { "slope", "AA",
help_slope, gnumeric_slope, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "small", "Af",
+ { "small", "Af",
help_small, gnumeric_small, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "standardize", "fff",
+ { "standardize", "fff",
help_standardize, gnumeric_standardize, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ssmedian", "A|f",
+ { "ssmedian", "A|f",
help_ssmedian, gnumeric_ssmedian, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "stdev", NULL,
+ { "stdev", NULL,
help_stdev, NULL, gnumeric_stdev, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "stdeva", NULL,
+ { "stdeva", NULL,
help_stdeva, NULL, gnumeric_stdeva, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "stdevp", NULL,
+ { "stdevp", NULL,
help_stdevp, NULL, gnumeric_stdevp, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "stdevpa", NULL,
+ { "stdevpa", NULL,
help_stdevpa, NULL, gnumeric_stdevpa, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "steyx", "AA",
+ { "steyx", "AA",
help_steyx, gnumeric_steyx, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "rsq", "AA",
+ { "rsq", "AA",
help_rsq, gnumeric_rsq, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "skew", NULL,
+ { "skew", NULL,
help_skew, NULL, gnumeric_skew, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "tdist", "fff",
+ { "tdist", "fff",
help_tdist, gnumeric_tdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "tinv", "ff",
+ { "tinv", "ff",
help_tinv, gnumeric_tinv, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "trend", "A|AAb",
+ { "trend", "A|AAb",
help_trend, gnumeric_trend, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "trimmean", "rf",
+ { "trimmean", "rf",
help_trimmean, gnumeric_trimmean, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ttest", "rrff",
+ { "ttest", "rrff",
help_ttest, gnumeric_ttest, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "var", NULL,
+ { "var", NULL,
help_var, NULL, gnumeric_var, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "vara", NULL,
+ { "vara", NULL,
help_vara, NULL, gnumeric_vara, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "varp", NULL,
+ { "varp", NULL,
help_varp, NULL, gnumeric_varp, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "varpa", NULL,
+ { "varpa", NULL,
help_varpa, NULL, gnumeric_varpa, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "weibull", "fffb",
+ { "weibull", "fffb",
help_weibull, gnumeric_weibull, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "ztest", "Af|f",
+ { "ztest", "Af|f",
help_ztest, gnumeric_ztest, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
@@ -5080,7 +5080,7 @@ GnmFuncDescriptor const stat_functions[] = {
{ "geomdist", "ffb", help_geomdist,
gnumeric_geomdist, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "kurtp", NULL,
+ { "kurtp", NULL,
help_kurtp, NULL, gnumeric_kurtp, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
{ "landau", "f", help_landau,
@@ -5101,13 +5101,13 @@ GnmFuncDescriptor const stat_functions[] = {
{ "rayleightail", "fff", help_rayleightail,
gnumeric_rayleightail, NULL, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "skewp", NULL,
+ { "skewp", NULL,
help_skewp, NULL, gnumeric_skewp, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
- { "subtotal", NULL,
+ { "subtotal", NULL,
help_subtotal, NULL, gnumeric_subtotal, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "cronbach", NULL,
+ { "cronbach", NULL,
help_cronbach, NULL, gnumeric_cronbach, NULL, NULL, NULL,
GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
{ "permutationa", "ff", help_permutationa,
diff --git a/plugins/fn-string/functions.c b/plugins/fn-string/functions.c
index a7481cd..6f0f902 100644
--- a/plugins/fn-string/functions.c
+++ b/plugins/fn-string/functions.c
@@ -249,8 +249,8 @@ gnumeric_lenb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_left[] = {
{ GNM_FUNC_HELP_NAME, F_("LEFT:the first @{num_chars} characters of the string @{s}")},
- { GNM_FUNC_HELP_ARG, F_("s:the string")},
- { GNM_FUNC_HELP_ARG, F_("num_chars:the number of characters to return (defaults to 1)")},
+ { GNM_FUNC_HELP_ARG, F_("s:the string")},
+ { GNM_FUNC_HELP_ARG, F_("num_chars:the number of characters to return (defaults to 1)")},
{ GNM_FUNC_HELP_NOTE, F_("If the string @{s} is in a right-to-left script, the returned first characters are from the right of the string.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
@@ -281,8 +281,8 @@ gnumeric_left (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_leftb[] = {
{ GNM_FUNC_HELP_NAME, F_("LEFTB:the first characters of the string @{s} comprising at most @{num_bytes} bytes")},
- { GNM_FUNC_HELP_ARG, F_("s:the string")},
- { GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},
+ { GNM_FUNC_HELP_ARG, F_("s:the string")},
+ { GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},
{ GNM_FUNC_HELP_NOTE, F_("The semantics of this function is subject to change as various applications implement it.")},
{ GNM_FUNC_HELP_NOTE, F_("If the string is in a right-to-left script, the returned first characters are from the right of the string.")},
{ GNM_FUNC_HELP_EXCEL, F_("While this function is syntactically Excel compatible, the differences in the underlying text encoding will usually yield different results.")},
@@ -306,7 +306,7 @@ gnumeric_leftb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
icount = (int)MIN ((gnm_float)INT_MAX, count);
if (icount >= len)
return value_new_string (peek);
-
+
newlen = ((const guchar *)g_utf8_find_prev_char (peek, peek + icount + 1)) - peek;
return value_new_string_nocopy (g_strndup (peek, newlen));
@@ -333,9 +333,9 @@ gnumeric_lower (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_mid[] = {
{ GNM_FUNC_HELP_NAME, F_("MID:the substring of the string @{s} starting at position @{position} consisting of @{length} characters")},
- { GNM_FUNC_HELP_ARG, F_("s:the string")},
- { GNM_FUNC_HELP_ARG, F_("position:the starting position")},
- { GNM_FUNC_HELP_ARG, F_("length:the number of characters to return")},
+ { GNM_FUNC_HELP_ARG, F_("s:the string")},
+ { GNM_FUNC_HELP_ARG, F_("position:the starting position")},
+ { GNM_FUNC_HELP_ARG, F_("length:the number of characters to return")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
{ GNM_FUNC_HELP_EXAMPLES, "=MID(\"L\xc3\xa9vy\",2,1)" },
@@ -373,9 +373,9 @@ gnumeric_mid (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_midb[] = {
{ GNM_FUNC_HELP_NAME, F_("MIDB:the characters following the first @{start_pos} bytes comprising at most @{num_bytes} bytes")},
- { GNM_FUNC_HELP_ARG, F_("s:the string")},
- { GNM_FUNC_HELP_ARG, F_("start_pos:the number of the byte with which to start (defaults to 1)")},
- { GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},
+ { GNM_FUNC_HELP_ARG, F_("s:the string")},
+ { GNM_FUNC_HELP_ARG, F_("start_pos:the number of the byte with which to start (defaults to 1)")},
+ { GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},
{ GNM_FUNC_HELP_NOTE, F_("The semantics of this function is subject to change as various applications implement it.")},
{ GNM_FUNC_HELP_EXCEL, F_("While this function is syntactically Excel compatible, "
"the differences in the underlying text encoding will usually yield different results.")},
@@ -400,13 +400,13 @@ gnumeric_midb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
return value_new_error_VALUE (ei->pos);
ipos = (int)MIN ((gnm_float)INT_MAX, pos) - 1;
ilen = (int)MIN ((gnm_float)INT_MAX, len);
- if ((ipos >= slen) ||
+ if ((ipos >= slen) ||
((gunichar)-1 == g_utf8_get_char_validated (peek + ipos, -1)))
return value_new_error_VALUE (ei->pos);
if ((ipos + ilen) >= slen)
return value_new_string (peek + ipos);
-
+
newlen = ((const guchar *)g_utf8_find_prev_char (peek + ipos, peek + ipos + ilen + 1))
- (peek + ipos);
@@ -460,8 +460,8 @@ gnumeric_findb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_right[] = {
{ GNM_FUNC_HELP_NAME, F_("RIGHT:the last @{num_chars} characters of the string @{s}")},
- { GNM_FUNC_HELP_ARG, F_("s:the string")},
- { GNM_FUNC_HELP_ARG, F_("num_chars:the number of characters to return (defaults to 1)")},
+ { GNM_FUNC_HELP_ARG, F_("s:the string")},
+ { GNM_FUNC_HELP_ARG, F_("num_chars:the number of characters to return (defaults to 1)")},
{ GNM_FUNC_HELP_NOTE, F_("If the string @{s} is in a right-to-left script, the returned last characters are from the left of the string.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
{ GNM_FUNC_HELP_ODF, F_("This function is OpenFormula compatible.")},
@@ -496,8 +496,8 @@ gnumeric_right (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_rightb[] = {
{ GNM_FUNC_HELP_NAME, F_("RIGHTB:the last characters of the string @{s} comprising at most @{num_bytes} bytes")},
- { GNM_FUNC_HELP_ARG, F_("s:the string")},
- { GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},
+ { GNM_FUNC_HELP_ARG, F_("s:the string")},
+ { GNM_FUNC_HELP_ARG, F_("num_bytes:the maximum number of bytes to return (defaults to 1)")},
{ GNM_FUNC_HELP_NOTE, F_("The semantics of this function is subject to change as various applications implement it.")},
{ GNM_FUNC_HELP_NOTE, F_("If the string @{s} is in a right-to-left script, the returned last characters are from the left of the string.")},
{ GNM_FUNC_HELP_EXCEL, F_("While this function is syntactically Excel compatible, the differences in the underlying text encoding will usually yield different results.")},
@@ -870,7 +870,7 @@ gnumeric_replaceb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
return value_new_error_VALUE (ei->pos);
ipos = (int)MIN ((gnm_float)INT_MAX, pos) - 1;
ilen = (int)MIN ((gnm_float)INT_MAX, len);
- if ((ipos >= slen) ||
+ if ((ipos >= slen) ||
(ipos + ilen - 1 > slen) ||
((gunichar)-1 == g_utf8_get_char_validated (old + ipos, -1)) ||
!g_utf8_validate (old + ipos, ilen, NULL))
@@ -1329,8 +1329,8 @@ gnumeric_searchb (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_asc[] = {
{ GNM_FUNC_HELP_NAME, F_("ASC:text with full-width katakana and ASCII characters converted to half-width.")},
- { GNM_FUNC_HELP_ARG, F_("text:string")},
- { GNM_FUNC_HELP_DESCRIPTION, F_("ASC converts full-width katakana and ASCII characters to half-width equivalent characters, copying all others. ")},
+ { GNM_FUNC_HELP_ARG, F_("text:string")},
+ { GNM_FUNC_HELP_DESCRIPTION, F_("ASC converts full-width katakana and ASCII characters to half-width equivalent characters, copying all others. ")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("The distinction between half-width and full-width characters is described in http://www.unicode.org/reports/tr11/.")},
{ GNM_FUNC_HELP_EXCEL, F_("For most strings, this function has the same effect as in Excel.")},
{ GNM_FUNC_HELP_NOTE, F_("While in obsolete encodings ASC used to translate between 2-byte and 1-byte characters, this is not the case in UTF-8.")},
@@ -1376,7 +1376,7 @@ gnm_asc_half (gunichar c, GString *str)
if (c%2 == 1)
return ((c - 0x30ab)/2 + 0xff76);
else {
- g_string_append_unichar
+ g_string_append_unichar
(str, (c - 0x30ac)/2 + 0xff76);
return 0xff9e;
}
@@ -1387,7 +1387,7 @@ gnm_asc_half (gunichar c, GString *str)
if (c%2 == 0)
return ((c - 0x30c4)/2 + 0xff82);
else {
- g_string_append_unichar
+ g_string_append_unichar
(str, (c - 0x30c5)/2 + 0xff82);
return 0xff9e;
}
@@ -1399,12 +1399,12 @@ gnm_asc_half (gunichar c, GString *str)
case 0:
return ((c - 0x30cf)/3 + 0xff8a);
case 1:
- g_string_append_unichar
+ g_string_append_unichar
(str, (c - 0x30d0)/3 + 0xff8a);
return 0xff9e;
case 2:
default:
- g_string_append_unichar
+ g_string_append_unichar
(str, (c - 0x30d1)/3 + 0xff8a);
return 0xff9f;
}
@@ -1415,7 +1415,7 @@ gnm_asc_half (gunichar c, GString *str)
return ((c - 0x30e4)/2 + 0xff94);
else
return ((c - 0x30e3)/2 + 0xff6c);
- }
+ }
if (c <= 0x30ed)
return (c - 0x30e9 + 0xff97);
if (c == 0x30ef)
@@ -1456,9 +1456,9 @@ gnumeric_asc (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_jis[] = {
{ GNM_FUNC_HELP_NAME, F_("JIS:text with half-width katakana and ASCII characters converted to full-width.")},
- { GNM_FUNC_HELP_ARG, F_("text:original text")},
+ { GNM_FUNC_HELP_ARG, F_("text:original text")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("JIS converts half-width katakana and ASCII characters "
- "to full-width equivalent characters, copying all others. ")},
+ "to full-width equivalent characters, copying all others. ")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("The distinction between half-width and full-width characters "
"is described in http://www.unicode.org/reports/tr11/.")},
{ GNM_FUNC_HELP_EXCEL, F_("For most strings, this function has the same effect as in Excel.")},
diff --git a/plugins/fn-tsa/functions.c b/plugins/fn-tsa/functions.c
index 63e6ab0..d7c41d6 100644
--- a/plugins/fn-tsa/functions.c
+++ b/plugins/fn-tsa/functions.c
@@ -965,10 +965,10 @@ gnumeric_fourier (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (argv[1]) {
inverse = 0 != (int) gnm_floor (value_get_as_float (argv[1]));
}
-
+
if (missing0) {
GArray *gval;
-
+
gval = g_array_new (FALSE, FALSE, sizeof (gnm_float));
gval = g_array_append_vals (gval, ord, n0);
g_free (ord);
@@ -976,7 +976,7 @@ gnumeric_fourier (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
ord = (gnm_float *) gval->data;
n0 = gval->len;
g_array_free (gval, FALSE);
-
+
g_slist_free (missing0);
}
@@ -996,7 +996,7 @@ gnumeric_fourier (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
res = value_new_array_empty (1 , nb);
sprintf (f, "%%.%d" GNM_FORMAT_g, GNM_DIG);
for (i = 0; i < nb; i++)
- res->v_array.vals[0][i] = value_new_string_nocopy
+ res->v_array.vals[0][i] = value_new_string_nocopy
(complex_to_string (&(out[i]), f, f, 'i'));
g_free (out);
} else
@@ -1008,15 +1008,15 @@ gnumeric_fourier (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
const GnmFuncDescriptor TimeSeriesAnalysis_functions[] = {
- { "interpolation", "AAA|f",
+ { "interpolation", "AAA|f",
help_interpolation, gnumeric_interpolation, NULL, NULL, NULL, NULL,
GNM_FUNC_RETURNS_NON_SCALAR, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "periodogram", "A|fAff",
+ { "periodogram", "A|fAff",
help_periodogram, gnumeric_periodogram, NULL, NULL, NULL, NULL,
GNM_FUNC_RETURNS_NON_SCALAR, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
- { "fourier", "A|b",
+ { "fourier", "A|b",
help_fourier, gnumeric_fourier, NULL, NULL, NULL, NULL,
GNM_FUNC_RETURNS_NON_SCALAR, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/plugins/gda/plugin-gda.c b/plugins/gda/plugin-gda.c
index 11cd4a8..2ec40f4 100644
--- a/plugins/gda/plugin-gda.c
+++ b/plugins/gda/plugin-gda.c
@@ -374,7 +374,7 @@ gnumeric_execSQL (GnmFuncEvalInfo *ei, GnmValue const * const *args)
g_object_unref (stmt);
return value_new_error (ei->pos, _("More than one statement in SQL string"));
}
-
+
recset = gda_connection_statement_execute_select (cnc, stmt, NULL, &error);
g_object_unref (stmt);
if (recset) {
@@ -457,7 +457,7 @@ gnumeric_readDBTable (GnmFuncEvalInfo *ei, GnmValue const * const *args)
recset = gda_connection_statement_execute_select (cnc, stmt, NULL, &error);
g_object_unref (stmt);
-
+
if (recset) {
ret = display_recordset (recset, ei);
g_object_unref (recset);
diff --git a/plugins/html/html.c b/plugins/html/html.c
index cc01555..e329390 100644
--- a/plugins/html/html.c
+++ b/plugins/html/html.c
@@ -168,7 +168,7 @@ cb_html_attrs_as_string (GsfOutput *output, PangoAttribute *a, html_version_t ve
} else if (((PangoAttrInt *)a)->value < -5) {
gsf_output_puts (output, "<sub>");
closure = "</sub>";
- }
+ }
break;
case PANGO_ATTR_STYLE :
if (((PangoAttrInt *)a)->value == PANGO_STYLE_ITALIC) {
@@ -176,7 +176,7 @@ cb_html_attrs_as_string (GsfOutput *output, PangoAttribute *a, html_version_t ve
closure = "</i>";
}
break;
- case PANGO_ATTR_WEIGHT :
+ case PANGO_ATTR_WEIGHT :
if (((PangoAttrInt *)a)->value > 600){
gsf_output_puts (output, "<b>");
closure = "</b>";
@@ -188,8 +188,8 @@ cb_html_attrs_as_string (GsfOutput *output, PangoAttribute *a, html_version_t ve
closure = "</strike>";
}
break;
- case PANGO_ATTR_UNDERLINE :
- if ((version != HTML40) &&
+ case PANGO_ATTR_UNDERLINE :
+ if ((version != HTML40) &&
(((PangoAttrInt *)a)->value != PANGO_UNDERLINE_NONE)) {
gsf_output_puts (output, "<u>");
closure = "</u>";
@@ -210,7 +210,7 @@ cb_html_attrs_as_string (GsfOutput *output, PangoAttribute *a, html_version_t ve
}
static void
-html_new_markup (GsfOutput *output, const PangoAttrList *markup, char const *text,
+html_new_markup (GsfOutput *output, const PangoAttrList *markup, char const *text,
html_version_t version)
{
int handled = 0;
@@ -223,7 +223,7 @@ html_new_markup (GsfOutput *output, const PangoAttrList *markup, char const *tex
do {
GSList *list, *l;
-
+
g_string_erase (closure, 0, -1);
pango_attr_iterator_range (iter, &from, &to);
from = (from > len) ? len : from; /* Since "from" can be really big! */
@@ -303,11 +303,11 @@ html_write_cell_content (GsfOutput *output, GnmCell *cell, GnmStyle const *style
gsf_output_printf (output, "<font color=\"#%02X%02X%02X\">", r, g, b);
}
- if ((cell->value->type == VALUE_STRING)
+ if ((cell->value->type == VALUE_STRING)
&& (VALUE_FMT (cell->value) != NULL)
&& go_format_is_markup (VALUE_FMT (cell->value)))
markup = go_format_get_markup (VALUE_FMT (cell->value));
-
+
if (markup != NULL) {
GString *str = g_string_new ("");
value_get_as_gstring (cell->value, str, NULL);
diff --git a/plugins/html/html.h b/plugins/html/html.h
index 1e2c85e..e9ab609 100644
--- a/plugins/html/html.h
+++ b/plugins/html/html.h
@@ -25,21 +25,21 @@
#include "gnumeric.h"
#include <goffice/goffice.h>
-void html32_file_save (GOFileSaver const *fs, GOIOContext *io_context,
+void html32_file_save (GOFileSaver const *fs, GOIOContext *io_context,
WorkbookView const *wb_view, GsfOutput *output);
-void html40_file_save (GOFileSaver const *fs, GOIOContext *io_context,
+void html40_file_save (GOFileSaver const *fs, GOIOContext *io_context,
WorkbookView const *wb_view, GsfOutput *output);
-void html40frag_file_save (GOFileSaver const *fs, GOIOContext *io_context,
+void html40frag_file_save (GOFileSaver const *fs, GOIOContext *io_context,
WorkbookView const *wb_view, GsfOutput *output);
void xhtml_file_save (GOFileSaver const *fs, GOIOContext *io_context,
WorkbookView const *wb_view, GsfOutput *output);
void xhtml_range_file_save (GOFileSaver const *fs, GOIOContext *io_context,
WorkbookView const *wb_view, GsfOutput *output);
-void html_file_open (GOFileOpener const *fo, GOIOContext *io_context,
+void html_file_open (GOFileOpener const *fo, GOIOContext *io_context,
WorkbookView *wb_view, GsfInput *input);
-gboolean html_file_probe (GOFileOpener const *fo, GsfInput *input,
+gboolean html_file_probe (GOFileOpener const *fo, GsfInput *input,
GOFileProbeLevel pl);
diff --git a/plugins/html/html_read.c b/plugins/html/html_read.c
index 5127a42..a2a22aa 100644
--- a/plugins/html/html_read.c
+++ b/plugins/html/html_read.c
@@ -509,7 +509,7 @@ html_file_open (GOFileOpener const *fo, GOIOContext *io_context,
bomlen = 0;
/* Try to detect unmarked UTF16LE
(Firefox Windows clipboard, drag data all platforms) */
- if ((buf[0] >= 0x20 || g_ascii_isspace(buf[0])) &&
+ if ((buf[0] >= 0x20 || g_ascii_isspace(buf[0])) &&
buf[1] == 0 &&
(buf[2] >= 0x20 || g_ascii_isspace(buf[2])) &&
buf[3] == 0)
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 5d40286..5ef71f0 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -867,8 +867,8 @@ oo_append_page_break (OOParseState *state, int pos, gboolean is_vert, gboolean i
if (NULL == (breaks = state->page_breaks.h))
breaks = state->page_breaks.h = gnm_page_breaks_new (FALSE);
}
-
- gnm_page_breaks_append_break (breaks, pos,
+
+ gnm_page_breaks_append_break (breaks, pos,
is_manual ? GNM_PAGE_BREAK_MANUAL : GNM_PAGE_BREAK_NONE);
}
@@ -876,7 +876,7 @@ static void
oo_set_page_break (OOParseState *state, int pos, gboolean is_vert, gboolean is_manual)
{
GnmPageBreaks *breaks = (is_vert) ? state->page_breaks.v : state->page_breaks.h;
-
+
switch (gnm_page_breaks_get_break (breaks, pos)) {
case GNM_PAGE_BREAK_NONE:
oo_append_page_break (state, pos, is_vert, is_manual);
@@ -895,9 +895,9 @@ static void
oo_col_row_style_apply_breaks (OOParseState *state, OOColRowStyle *cr_style,
int pos, gboolean is_vert)
{
-
+
if (cr_style->break_before != OO_PAGE_BREAK_NONE)
- oo_set_page_break (state, pos, is_vert,
+ oo_set_page_break (state, pos, is_vert,
cr_style->break_before == OO_PAGE_BREAK_MANUAL);
if (cr_style->break_after != OO_PAGE_BREAK_NONE)
oo_append_page_break (state, pos+1, is_vert,
@@ -926,7 +926,7 @@ oo_extent_sheet_cols (Sheet *sheet, int cols)
{
GOUndo * goundo;
int new_cols, new_rows;
-
+
new_cols = cols;
new_rows = gnm_sheet_get_max_rows (sheet);
gnm_sheet_suggest_size (&new_cols, &new_rows);
@@ -961,13 +961,13 @@ oo_col_start (GsfXMLIn *xin, xmlChar const **attrs)
hidden = !attr_eq (attrs[1], "visible");
if (state->pos.eval.col + repeat_count > max_cols) {
- max_cols = oo_extent_sheet_cols (state->pos.sheet, state->pos.eval.col
+ max_cols = oo_extent_sheet_cols (state->pos.sheet, state->pos.eval.col
+ repeat_count);
if (state->pos.eval.col + repeat_count > max_cols) {
g_warning ("Ignoring column information beyond"
" the range we can handle.");
repeat_count = max_cols - state->pos.eval.col - 1;
- }
+ }
}
if (hidden)
@@ -994,13 +994,13 @@ oo_col_start (GsfXMLIn *xin, xmlChar const **attrs)
state->default_style.columns->size_pts);
if (col_info->break_before != OO_PAGE_BREAK_NONE)
for (i = state->pos.eval.row ; i < last; i++ )
- oo_set_page_break (state, i, TRUE,
- col_info->break_before
+ oo_set_page_break (state, i, TRUE,
+ col_info->break_before
== OO_PAGE_BREAK_MANUAL);
if (col_info->break_after!= OO_PAGE_BREAK_NONE)
for (i = state->pos.eval.col ; i < last; i++ )
oo_append_page_break (state, i+1, FALSE,
- col_info->break_after
+ col_info->break_after
== OO_PAGE_BREAK_MANUAL);
} else {
int last = state->pos.eval.col + repeat_count;
@@ -1024,7 +1024,7 @@ oo_extent_sheet_rows (Sheet *sheet, int rows)
{
GOUndo * goundo;
int new_cols, new_rows;
-
+
new_cols = gnm_sheet_get_max_cols (sheet);
new_rows = rows;
gnm_sheet_suggest_size (&new_cols, &new_rows);
@@ -1057,7 +1057,7 @@ oo_row_start (GsfXMLIn *xin, xmlChar const **attrs)
return;
}
}
-
+
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_TABLE, "style-name"))
row_info = g_hash_table_lookup (state->styles.row, attrs[1]);
@@ -1068,8 +1068,8 @@ oo_row_start (GsfXMLIn *xin, xmlChar const **attrs)
}
if (state->pos.eval.row + repeat_count > max_rows) {
- max_rows = oo_extent_sheet_rows
- (state->pos.sheet,
+ max_rows = oo_extent_sheet_rows
+ (state->pos.sheet,
state->pos.eval.row + repeat_count);
if (state->pos.eval.row + repeat_count >= max_rows)
/* There are probably lots of empty lines at the end. */
@@ -1101,13 +1101,13 @@ oo_row_start (GsfXMLIn *xin, xmlChar const **attrs)
state->default_style.rows->size_pts);
if (row_info->break_before != OO_PAGE_BREAK_NONE)
for (i = state->pos.eval.row ; i < last; i++ )
- oo_set_page_break (state, i, FALSE,
- row_info->break_before
+ oo_set_page_break (state, i, FALSE,
+ row_info->break_before
== OO_PAGE_BREAK_MANUAL);
if (row_info->break_after!= OO_PAGE_BREAK_NONE)
for (i = state->pos.eval.row ; i < last; i++ )
oo_append_page_break (state, i+1, FALSE,
- row_info->break_after
+ row_info->break_after
== OO_PAGE_BREAK_MANUAL);
} else {
int const last = state->pos.eval.row + repeat_count;
@@ -1120,7 +1120,7 @@ oo_row_start (GsfXMLIn *xin, xmlChar const **attrs)
row_info->count += repeat_count;
}
}
-
+
state->row_inc = repeat_count;
}
@@ -1138,7 +1138,7 @@ oo_cell_start (GsfXMLIn *xin, xmlChar const **attrs)
OOParseState *state = (OOParseState *)xin->user_state;
GnmExprTop const *texpr = NULL;
GnmValue *val = NULL;
- gboolean has_date = FALSE, has_datetime = FALSE, has_time = FALSE;
+ gboolean has_date = FALSE, has_datetime = FALSE, has_time = FALSE;
gboolean bool_val;
gnm_float float_val = 0;
int array_cols = -1, array_rows = -1;
@@ -1278,7 +1278,7 @@ oo_cell_start (GsfXMLIn *xin, xmlChar const **attrs)
} else {
format = go_format_default_time ();
}
-
+
if (style == NULL) {
style = gnm_style_new_default ();
/* gnm_style_ref(style); */
@@ -1681,19 +1681,19 @@ oo_date_hours (GsfXMLIn *xin, xmlChar const **attrs)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER, "style"))
is_short = attr_eq (attrs[1], "short");
else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT,
- "truncate-on-overflow",
+ "truncate-on-overflow",
&truncate_hour_on_overflow))
truncate_hour_on_overflow_set = TRUE;
if (truncate_hour_on_overflow_set) {
- if (truncate_hour_on_overflow)
+ if (truncate_hour_on_overflow)
g_string_append (state->cur_format.accum, is_short ? "h" : "hh");
else {
g_string_append (state->cur_format.accum, is_short ? "[h]" : "[hh]");
state->cur_format.elapsed_set |= ODF_ELAPSED_SET_HOURS;
}
} else {
- if (state->cur_format.truncate_hour_on_overflow)
+ if (state->cur_format.truncate_hour_on_overflow)
g_string_append (state->cur_format.accum, is_short ? "h" : "hh");
else {
g_string_append (state->cur_format.accum, is_short ? "[h]" : "[hh]");
@@ -1717,13 +1717,13 @@ oo_date_minutes (GsfXMLIn *xin, xmlChar const **attrs)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER, "style"))
is_short = attr_eq (attrs[1], "short");
else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT,
- "truncate-on-overflow",
+ "truncate-on-overflow",
&truncate_hour_on_overflow))
truncate_hour_on_overflow_set = TRUE;
state->cur_format.pos_minutes = state->cur_format.accum->len;
-
+
if (truncate_hour_on_overflow_set) {
- if (truncate_hour_on_overflow)
+ if (truncate_hour_on_overflow)
g_string_append (state->cur_format.accum, is_short ? "m" : "mm");
else {
g_string_append (state->cur_format.accum, is_short ? "[m]" : "[mm]");
@@ -1731,7 +1731,7 @@ oo_date_minutes (GsfXMLIn *xin, xmlChar const **attrs)
}
} else {
if (state->cur_format.truncate_hour_on_overflow ||
- 0 != (state->cur_format.elapsed_set & ODF_ELAPSED_SET_HOURS))
+ 0 != (state->cur_format.elapsed_set & ODF_ELAPSED_SET_HOURS))
g_string_append (state->cur_format.accum, is_short ? "m" : "mm");
else {
g_string_append (state->cur_format.accum, is_short ? "[m]" : "[mm]");
@@ -1768,16 +1768,16 @@ oo_date_seconds (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_NUMBER, "style"))
is_short = attr_eq (attrs[1], "short");
- else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
+ else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
"decimal-places"))
digits = atoi (attrs[1]);
else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT,
- "truncate-on-overflow",
+ "truncate-on-overflow",
&truncate_hour_on_overflow))
truncate_hour_on_overflow_set = TRUE;
state->cur_format.pos_seconds = state->cur_format.accum->len;
-
+
if (truncate_hour_on_overflow_set) {
if (truncate_hour_on_overflow) {
OO_DATE_SECONDS_PRINT_SECONDS;
@@ -1789,7 +1789,7 @@ oo_date_seconds (GsfXMLIn *xin, xmlChar const **attrs)
}
} else {
if (state->cur_format.truncate_hour_on_overflow ||
- 0 != (state->cur_format.elapsed_set &
+ 0 != (state->cur_format.elapsed_set &
(ODF_ELAPSED_SET_HOURS | ODF_ELAPSED_SET_MINUTES))) {
OO_DATE_SECONDS_PRINT_SECONDS;
} else {
@@ -1818,7 +1818,7 @@ oo_date_text_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
if (state->cur_format.accum == NULL)
return;
-
+
if (xin->content->len == 1 && NULL != strchr (" /-(),",*xin->content->str))
g_string_append (state->cur_format.accum, xin->content->str);
else if (xin->content->len >0) {
@@ -1843,7 +1843,7 @@ oo_date_style (GsfXMLIn *xin, xmlChar const **attrs)
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_STYLE, "family") &&
!attr_eq (attrs[1], "data-style"))
return;
- else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT,
+ else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT,
"format-magic"))
magic = atoi (attrs[1]);
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER, "format-source"))
@@ -1855,7 +1855,7 @@ oo_date_style (GsfXMLIn *xin, xmlChar const **attrs)
g_return_if_fail (name != NULL);
/* We always save a magic number with source language, so if that is gone somebody may have changed formats */
- state->cur_format.magic = format_source_is_language ? magic : GO_FORMAT_MAGIC_NONE;
+ state->cur_format.magic = format_source_is_language ? magic : GO_FORMAT_MAGIC_NONE;
state->cur_format.accum = (state->cur_format.magic == GO_FORMAT_MAGIC_NONE) ? g_string_new (NULL) : NULL;
state->cur_format.name = g_strdup (name);
state->cur_format.truncate_hour_on_overflow = truncate_hour_on_overflow;
@@ -1865,7 +1865,7 @@ oo_date_style (GsfXMLIn *xin, xmlChar const **attrs)
}
static void
-oo_date_style_end_rm_elapsed (GString *str, guint pos)
+oo_date_style_end_rm_elapsed (GString *str, guint pos)
{
guint end;
g_return_if_fail (str->len > pos && str->str[pos] == '[');
@@ -1881,30 +1881,30 @@ oo_date_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
OOParseState *state = (OOParseState *)xin->user_state;
int elapsed = state->cur_format.elapsed_set;
- if (state->cur_format.magic != GO_FORMAT_MAGIC_NONE)
+ if (state->cur_format.magic != GO_FORMAT_MAGIC_NONE)
g_hash_table_insert (state->formats, state->cur_format.name,
go_format_new_magic (state->cur_format.magic));
else {
g_return_if_fail (state->cur_format.accum != NULL);
-
- while (elapsed != 0 && elapsed != ODF_ELAPSED_SET_SECONDS
+
+ while (elapsed != 0 && elapsed != ODF_ELAPSED_SET_SECONDS
&& elapsed != ODF_ELAPSED_SET_MINUTES
&& elapsed != ODF_ELAPSED_SET_HOURS) {
/*We need to fix the format string since several times are set as "elapsed". */
if (0 != (elapsed & ODF_ELAPSED_SET_SECONDS)) {
- oo_date_style_end_rm_elapsed (state->cur_format.accum,
+ oo_date_style_end_rm_elapsed (state->cur_format.accum,
state->cur_format.pos_seconds);
if (state->cur_format.pos_seconds < state->cur_format.pos_minutes)
state->cur_format.pos_minutes -= 2;
elapsed -= ODF_ELAPSED_SET_SECONDS;
} else {
- oo_date_style_end_rm_elapsed (state->cur_format.accum,
+ oo_date_style_end_rm_elapsed (state->cur_format.accum,
state->cur_format.pos_minutes);
elapsed -= ODF_ELAPSED_SET_MINUTES;
break;
}
}
-
+
g_hash_table_insert (state->formats, state->cur_format.name,
go_format_new_from_XL (state->cur_format.accum->str));
g_string_free (state->cur_format.accum, TRUE);
@@ -1927,7 +1927,7 @@ odf_fraction (GsfXMLIn *xin, xmlChar const **attrs)
int max_d_digits = 3;
int min_i_digits = 0;
int min_n_digits = 0;
-
+
if (state->cur_format.accum == NULL)
return;
@@ -1937,17 +1937,17 @@ odf_fraction (GsfXMLIn *xin, xmlChar const **attrs)
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER, "denominator-value")) {
denominator_fixed = TRUE;
denominator = atoi (CXML2C (attrs[1]));
- } else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
+ } else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
"min-denominator-digits"))
min_d_digits = atoi (CXML2C (attrs[1]));
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_GNUM_NS_EXT,
"max-denominator-digits"))
max_d_digits = atoi (CXML2C (attrs[1]));
- else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
+ else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
"min-integer-digits"))
min_i_digits = atoi (CXML2C (attrs[1]));
else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "no-integer-part", &no_int_part)) {}
- else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
+ else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
"min-numerator-digits"))
min_n_digits = atoi (CXML2C (attrs[1]));
@@ -2004,7 +2004,7 @@ odf_number (GsfXMLIn *xin, xmlChar const **attrs)
} /* else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER, */
/* "display-factor")) */
/* display_factor = atof (CXML2C (attrs[1])); */
- else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
+ else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER,
"min-integer-digits"))
min_i_digits = atoi (CXML2C (attrs[1]));
@@ -2038,7 +2038,7 @@ odf_scientific (GsfXMLIn *xin, xmlChar const **attrs)
/* else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_NUMBER, */
/* "min-exponent-digits")) */
/* min_exp_digits = atoi (CXML2C (attrs[1])); */
- else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "engineering",
+ else if (oo_attr_bool (xin, attrs, OO_GNUM_NS_EXT, "engineering",
&engineering));
if (engineering)
details.exponent_step = 3;
@@ -2080,11 +2080,11 @@ odf_map (GsfXMLIn *xin, xmlChar const **attrs)
while (*condition == ' ') condition++;
if (*condition == '>' || *condition == '<' || *condition == '=') {
state->conditions = g_slist_prepend (state->conditions, g_strdup (condition));
- state->cond_formats = g_slist_prepend (state->cond_formats,
+ state->cond_formats = g_slist_prepend (state->cond_formats,
g_strdup (style_name));
return;
}
- }
+ }
}
static inline gboolean
@@ -2145,7 +2145,7 @@ static void
odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
OOParseState *state = (OOParseState *)xin->user_state;
-
+
g_return_if_fail (state->cur_format.accum != NULL);
if (state->conditions != NULL) {
@@ -2169,10 +2169,10 @@ odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
char *val = cond + strcspn (cond, "0123456789.");
float value = atof (val);
if (value != 0. || (*(cond+1) != '='))
- g_string_append_printf
- (state->cur_format.accum,
+ g_string_append_printf
+ (state->cur_format.accum,
(*(cond+1) == '=') ? "[>=%.2f]" : "[>%.2f]", value);
- g_string_append (state->cur_format.accum, go_format_as_XL
+ g_string_append (state->cur_format.accum, go_format_as_XL
(g_hash_table_lookup (state->formats, lf->data)));
parts++;
g_free (lc->data);
@@ -2192,7 +2192,7 @@ odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
char *val = cond + strcspn (cond, "0123456789.");
float value = atof (val);
g_string_append_printf (state->cur_format.accum, "[=%.2f]", value);
- g_string_append (state->cur_format.accum, go_format_as_XL
+ g_string_append (state->cur_format.accum, go_format_as_XL
(g_hash_table_lookup (state->formats, lf->data)));
parts++;
g_free (lc->data);
@@ -2213,7 +2213,7 @@ odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
char *val = cond + strcspn (cond, "0123456789.");
float value = atof (val);
g_string_append_printf (state->cur_format.accum, "[<>%.2f]", value);
- g_string_append (state->cur_format.accum, go_format_as_XL
+ g_string_append (state->cur_format.accum, go_format_as_XL
(g_hash_table_lookup (state->formats, lf->data)));
parts++;
g_free (lc->data);
@@ -2229,7 +2229,7 @@ odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
g_string_append (state->cur_format.accum, accum);
parts++;
}
-
+
lc = state->conditions;
lf = state->cond_formats;
while (lc && lf) {
@@ -2240,10 +2240,10 @@ odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
if (parts > 0)
g_string_append_c (state->cur_format.accum, ';');
if (value != 0. || (*(cond+1) != '='))
- g_string_append_printf
- (state->cur_format.accum,
+ g_string_append_printf
+ (state->cur_format.accum,
(*(cond+1) == '=') ? "[<=%.2f]" : "[<%.2f]", value);
- g_string_append (state->cur_format.accum, go_format_as_XL
+ g_string_append (state->cur_format.accum, go_format_as_XL
(g_hash_table_lookup (state->formats, lf->data)));
parts++;
}
@@ -2262,7 +2262,7 @@ odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
if (parts > 0)
g_string_append_c (state->cur_format.accum, ';');
g_string_append_printf (state->cur_format.accum, "[=%.2f]", value);
- g_string_append (state->cur_format.accum, go_format_as_XL
+ g_string_append (state->cur_format.accum, go_format_as_XL
(g_hash_table_lookup (state->formats, lf->data)));
parts++;
break;
@@ -2283,7 +2283,7 @@ odf_number_style_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
if (parts > 0)
g_string_append_c (state->cur_format.accum, ';');
g_string_append_printf (state->cur_format.accum, "[<>%.2f]", value);
- g_string_append (state->cur_format.accum, go_format_as_XL
+ g_string_append (state->cur_format.accum, go_format_as_XL
(g_hash_table_lookup (state->formats, lf->data)));
parts++;
break;
@@ -2386,7 +2386,7 @@ oo_parse_border (GsfXMLIn *xin, GnmStyle *style,
border_style = GNM_STYLE_BORDER_DASHED;
else if (g_str_has_prefix (border_type, "dotted"))
border_style = GNM_STYLE_BORDER_DOTTED;
- else
+ else
border_style = GNM_STYLE_BORDER_DOUBLE;
border = gnm_style_border_fetch (border_style, color,
@@ -2403,8 +2403,8 @@ odf_style_set_align_h (GnmStyle *style, gboolean h_align_is_valid, gboolean repe
{
int alignment = HALIGN_GENERAL;
if (h_align_is_valid)
- alignment = repeat_content ? HALIGN_FILL
- : ((text_align < 0) ? ((gnm_halign > -1) ? gnm_halign : HALIGN_LEFT)
+ alignment = repeat_content ? HALIGN_FILL
+ : ((text_align < 0) ? ((gnm_halign > -1) ? gnm_halign : HALIGN_LEFT)
: text_align);
gnm_style_set_align_h (style, alignment);
@@ -2477,7 +2477,7 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
state->text_align, state->gnm_halign);
else if (oo_attr_int (xin,attrs, OO_GNUM_NS_EXT, "GnmHAlign", &(state->gnm_halign)))
odf_style_set_align_h (style, state->h_align_is_valid, state->repeat_content,
- state->text_align, state->gnm_halign);
+ state->text_align, state->gnm_halign);
else if (oo_attr_enum (xin, attrs,
(state->ver >= OOO_VER_OPENDOC) ? OO_NS_STYLE : OO_NS_FO,
"vertical-align", v_alignments, &tmp)) {
@@ -2486,7 +2486,7 @@ oo_style_prop_cell (GsfXMLIn *xin, xmlChar const **attrs)
v_alignment_is_fixed = TRUE;
} else if (!v_alignment_is_fixed)
/* This should depend on the rotation */
- gnm_style_set_align_v (style, VALIGN_BOTTOM);
+ gnm_style_set_align_v (style, VALIGN_BOTTOM);
} else if (oo_attr_int (xin,attrs, OO_GNUM_NS_EXT, "GnmVAlign", &tmp)) {
if (!v_alignment_is_fixed) {
gnm_style_set_align_v (style, tmp);
@@ -2647,17 +2647,17 @@ odf_style_map_load_two_values (GsfXMLIn *xin, char *condition, GnmStyleCond *con
char *end = condition + len - 1;
if (*end == ')') {
GnmParsePos pp;
-
+
parse_pos_init (&pp, state->pos.wb, NULL, 0, 0);
len -= 1;
*end = '\0';
while (1) {
gchar * try = g_strrstr_len (condition, len, ",");
GnmExprTop const *texpr;
-
+
if (try == NULL || try == condition) return FALSE;
-
- texpr = oo_expr_parse_str
+
+ texpr = oo_expr_parse_str
(xin, try + 1, &pp,
GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES,
FORMULA_OPENFORMULA);
@@ -2668,7 +2668,7 @@ odf_style_map_load_two_values (GsfXMLIn *xin, char *condition, GnmStyleCond *con
}
len = try - condition - 1;
}
- cond->texpr[0] = oo_expr_parse_str
+ cond->texpr[0] = oo_expr_parse_str
(xin, condition, &pp,
GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES,
FORMULA_OPENFORMULA);
@@ -2685,7 +2685,7 @@ odf_style_map_load_one_value (GsfXMLIn *xin, char *condition, GnmStyleCond *cond
GnmParsePos pp;
parse_pos_init (&pp, state->pos.wb, NULL, 0, 0);
- cond->texpr[0] = oo_expr_parse_str
+ cond->texpr[0] = oo_expr_parse_str
(xin, condition, &pp,
GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES,
FORMULA_OPENFORMULA);
@@ -2718,7 +2718,7 @@ oo_style_map (GsfXMLIn *xin, xmlChar const **attrs)
g_return_if_fail (style != NULL);
g_return_if_fail (state->cur_style.cells != NULL);
-
+
full_condition = condition;
cond.texpr[0] = NULL;
cond.texpr[1] = NULL;
@@ -2786,7 +2786,7 @@ oo_style_map (GsfXMLIn *xin, xmlChar const **attrs)
success = odf_style_map_load_one_value (xin, text, &cond);
g_free (text);
}
-
+
if (!success)
{
if (cond.texpr[0] != NULL)
@@ -2794,7 +2794,7 @@ oo_style_map (GsfXMLIn *xin, xmlChar const **attrs)
if (cond.texpr[1] != NULL)
gnm_expr_top_unref (cond.texpr[1]);
oo_warning (xin,
- _("Unknown condition '%s' encountered, ignoring."),
+ _("Unknown condition '%s' encountered, ignoring."),
full_condition);
return;
}
@@ -2890,9 +2890,9 @@ oo_style_have_three_dimensional (GSList *styles)
{
GSList *l;
gboolean is_three_dimensional = FALSE;
- for (l = styles; l != NULL; l = l->next) {
+ for (l = styles; l != NULL; l = l->next) {
OOChartStyle *style = l->data;
- oo_prop_list_has_three_dimensional (style->other_props,
+ oo_prop_list_has_three_dimensional (style->other_props,
&is_three_dimensional);
}
return is_three_dimensional;
@@ -2914,9 +2914,9 @@ oo_style_have_multi_series (GSList *styles)
{
GSList *l;
gboolean is_multi_series = FALSE;
- for (l = styles; l != NULL; l = l->next) {
+ for (l = styles; l != NULL; l = l->next) {
OOChartStyle *style = l->data;
- oo_prop_list_has_multi_series (style->other_props,
+ oo_prop_list_has_multi_series (style->other_props,
&is_multi_series);
}
return is_multi_series;
@@ -2964,15 +2964,15 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
style->plot_props = g_slist_prepend (style->plot_props,
oo_prop_new_int ("gap-percentage", tmp));
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_CHART, "symbol-type"))
- style->plot_props = g_slist_prepend
+ style->plot_props = g_slist_prepend
(style->plot_props,
- oo_prop_new_bool ("default-style-has-markers",
+ oo_prop_new_bool ("default-style-has-markers",
!attr_eq (attrs[1], "none")));
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_DRAW, "stroke")) {
draw_stroke = !attr_eq (attrs[1], "none");
draw_stroke_set = TRUE;
} else if (oo_attr_bool (xin, attrs, OO_NS_CHART, "lines", &btmp)) {
- style->plot_props = g_slist_prepend
+ style->plot_props = g_slist_prepend
(style->plot_props,
oo_prop_new_bool ("default-style-has-lines", btmp));
default_style_has_lines_set = TRUE;
@@ -2987,7 +2987,7 @@ od_style_prop_chart (GsfXMLIn *xin, xmlChar const **attrs)
}
if (draw_stroke_set && !default_style_has_lines_set)
- style->plot_props = g_slist_prepend
+ style->plot_props = g_slist_prepend
(style->plot_props,
oo_prop_new_bool ("default-style-has-lines", draw_stroke));
}
@@ -3212,7 +3212,7 @@ od_draw_frame (GsfXMLIn *xin, xmlChar const **attrs)
char *end_str = g_strconcat ("[", CXML2C (attrs[1]), "]", NULL);
parse_pos_init (&pp, state->pos.wb, NULL, 0, 0);
texpr = oo_expr_parse_str (xin, end_str, &pp,
- GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES,
+ GNM_EXPR_PARSE_FORCE_EXPLICIT_SHEET_REFERENCES,
FORMULA_OPENFORMULA);
g_free (end_str);
}
@@ -3383,7 +3383,7 @@ oo_chart_axis (GsfXMLIn *xin, xmlChar const **attrs)
g_slist_free (axes);
}
- for (l = state->chart.these_plot_styles; l != NULL; l = l->next) {
+ for (l = state->chart.these_plot_styles; l != NULL; l = l->next) {
style = l->data;
oo_prop_list_apply (style->axis_props, G_OBJECT (state->chart.axis));
}
@@ -3443,7 +3443,7 @@ oo_plot_assign_dim (GsfXMLIn *xin, xmlChar const *range, int dim_type, char cons
dim = - (1 + dim_type);
else if (dim_name == NULL)
dim = gog_series_map_dim (state->chart.series, dim_type);
- else
+ else
dim = gog_series_map_dim_by_name (state->chart.series, dim_name);
if (dim < -1)
return;
@@ -3507,11 +3507,11 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
GSList *l;
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
- if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
+ if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
OO_NS_CHART, "style-name"))
- state->chart.these_plot_styles = g_slist_append
+ state->chart.these_plot_styles = g_slist_append
(state->chart.these_plot_styles,
- g_hash_table_lookup
+ g_hash_table_lookup
(state->chart.graph_styles, CXML2C (attrs[1])));
else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_TABLE, "cell-range-address"))
source_range_str = attrs[1];
@@ -3541,7 +3541,7 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
if (label_flags & 2)
state->chart.src_range.start.col++;
- for (l = state->chart.these_plot_styles; l != NULL; l = l->next) {
+ for (l = state->chart.these_plot_styles; l != NULL; l = l->next) {
style = l->data;
state->chart.src_in_rows = style->src_in_rows;
}
@@ -3568,22 +3568,22 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
case OO_PLOT_CONTOUR:
if (oo_style_have_multi_series (state->chart.these_plot_styles)) {
type = "XLSurfacePlot";
- state->chart.plot_type = OO_PLOT_XL_SURFACE;
+ state->chart.plot_type = OO_PLOT_XL_SURFACE;
} else if (oo_style_have_three_dimensional (state->chart.these_plot_styles)) {
type = "GogSurfacePlot";
state->chart.plot_type = OO_PLOT_SURFACE;
- } else
- type = "GogContourPlot";
+ } else
+ type = "GogContourPlot";
break;
case OO_PLOT_BUBBLE: type = "GogBubblePlot"; break;
case OO_PLOT_GANTT: type = "GogDropBarPlot"; break;
case OO_PLOT_POLAR: type = "GogPolarPlot"; break;
- case OO_PLOT_XYZ_CONTOUR:
+ case OO_PLOT_XYZ_CONTOUR:
if (oo_style_have_three_dimensional (state->chart.these_plot_styles)) {
type = "GogXYZSurfacePlot";
state->chart.plot_type = OO_PLOT_XYZ_SURFACE;
- } else
- type = "GogXYZContourPlot";
+ } else
+ type = "GogXYZContourPlot";
break;
case OO_PLOT_XYZ_SURFACE: type = "GogXYZSurfacePlot"; break;
case OO_PLOT_SURFACE: type = "GogSurfacePlot"; break;
@@ -3595,12 +3595,12 @@ oo_plot_area (GsfXMLIn *xin, xmlChar const **attrs)
state->chart.plot = gog_plot_new_by_name (type);
gog_object_add_by_name (GOG_OBJECT (state->chart.chart),
"Plot", GOG_OBJECT (state->chart.plot));
- for (l = state->chart.these_plot_styles; l != NULL; l = l->next) {
+ for (l = state->chart.these_plot_styles; l != NULL; l = l->next) {
style = l->data;
oo_prop_list_apply (style->plot_props, G_OBJECT (state->chart.plot));
}
if (state->chart.plot_type == OO_PLOT_GANTT) {
- GogObject *yaxis = gog_object_get_child_by_name (GOG_OBJECT (state->chart.chart),
+ GogObject *yaxis = gog_object_get_child_by_name (GOG_OBJECT (state->chart.chart),
"Y-Axis");
if (yaxis != NULL) {
GValue *val = g_value_init (g_new0 (GValue, 1), G_TYPE_BOOLEAN);
@@ -3644,7 +3644,7 @@ oo_plot_area_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
state->chart.stock_series = NULL;
} else if (state->chart.series != NULL) {
oo_plot_assign_dim (xin, NULL, GOG_MS_DIM_VALUES, NULL);
- state->chart.series = NULL;
+ state->chart.series = NULL;
}
state->chart.plot = NULL;
g_slist_free (state->chart.these_plot_styles);
@@ -3660,14 +3660,14 @@ oo_plot_series (GsfXMLIn *xin, xmlChar const **attrs)
#ifdef OO_DEBUG_OBJS
g_print ("<<<<< Start\n");
#endif
- state->chart.series_count++;
+ state->chart.series_count++;
state->chart.domain_count = 0;
switch (state->chart.plot_type) {
case OO_PLOT_STOCK:
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]), OO_NS_CHART, "values-cell-range-address"))
- state->chart.stock_series = g_slist_append (state->chart.stock_series,
+ state->chart.stock_series = g_slist_append (state->chart.stock_series,
g_strdup (attrs[1]));
break;
case OO_PLOT_SURFACE:
@@ -3720,7 +3720,7 @@ static void
oo_plot_series_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
OOParseState *state = (OOParseState *)xin->user_state;
-
+
switch (state->chart.plot_type) {
case OO_PLOT_STOCK:
case OO_PLOT_CONTOUR:
@@ -3809,11 +3809,11 @@ oo_chart (GsfXMLIn *xin, xmlChar const **attrs)
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
if (oo_attr_enum (xin, attrs, OO_NS_CHART, "class", types, &tmp))
type = tmp;
- else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
+ else if (gsf_xml_in_namecmp (xin, CXML2C (attrs[0]),
OO_NS_CHART, "style-name"))
- state->chart.these_plot_styles = g_slist_append
+ state->chart.these_plot_styles = g_slist_append
(state->chart.these_plot_styles,
- g_hash_table_lookup
+ g_hash_table_lookup
(state->chart.graph_styles, CXML2C (attrs[1])));
state->chart.plot_type = type;
state->chart.chart = GOG_CHART (gog_object_add_by_name (
@@ -3889,7 +3889,7 @@ oo_chart_wall (GsfXMLIn *xin, xmlChar const **attrs)
/* GogObject *backplane; */
/* backplane = */gog_object_add_by_name (GOG_OBJECT (state->chart.chart), "Backplane", NULL);
-
+
/* g_object_get (G_OBJECT (backplane), "style", &style, NULL); */
}
@@ -4336,10 +4336,10 @@ odf_func_address_handler (GnmConventions const *convs, Workbook *scope, GnmExprL
guint argc = gnm_expr_list_length (args);
if (argc == 4 && convs->sheet_name_sep == '!') {
- /* Openoffice was missing the A1 parameter */
+ /* Openoffice was missing the A1 parameter */
GnmExprList *new_args;
GnmFunc *f = gnm_func_lookup_or_add_placeholder ("ADDRESS", scope, FALSE);
-
+
new_args = g_slist_insert ((GSList *) args,
(gpointer) gnm_expr_new_constant (value_new_int (1)),
3);
@@ -4352,16 +4352,16 @@ static GnmExpr const *
odf_func_phi_handler (GnmConventions const *convs, Workbook *scope, GnmExprList *args)
{
GnmFunc *f = gnm_func_lookup_or_add_placeholder ("NORMDIST", scope, FALSE);
-
+
args = g_slist_append (args,
(gpointer) gnm_expr_new_constant (value_new_int (0)));
args = g_slist_append (args,
(gpointer) gnm_expr_new_constant (value_new_int (1)));
args = g_slist_append (args,
- (gpointer) gnm_expr_new_funcall
+ (gpointer) gnm_expr_new_funcall
(gnm_func_lookup_or_add_placeholder ("FALSE", scope, FALSE), NULL));
-
+
return gnm_expr_new_funcall (f, args);
}
@@ -4376,11 +4376,11 @@ odf_func_gauss_handler (GnmConventions const *convs, Workbook *scope, GnmExprLis
if (argc != 1)
return NULL;
- expr = gnm_expr_new_binary (gnm_expr_new_funcall1
+ expr = gnm_expr_new_binary (gnm_expr_new_funcall1
(f, gnm_expr_new_binary ((gnm_expr_copy ((GnmExpr const *)(args->data))),
GNM_EXPR_OP_DIV,
gnm_expr_new_funcall1 (fs,
- gnm_expr_new_constant
+ gnm_expr_new_constant
(value_new_int (2))))),
GNM_EXPR_OP_DIV,
gnm_expr_new_constant (value_new_int (2)));
@@ -4419,15 +4419,15 @@ odf_func_floor_handler (GnmConventions const *convs, Workbook *scope, GnmExprLis
expr_mode_zero = gnm_expr_new_funcall3
(fd_if,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_copy (expr_x),
GNM_EXPR_OP_LT,
gnm_expr_new_constant (value_new_int (0))),
- gnm_expr_new_funcall2
+ gnm_expr_new_funcall2
(fd_ceiling,
gnm_expr_copy (expr_x),
gnm_expr_copy (expr_sig)),
- gnm_expr_new_funcall2
+ gnm_expr_new_funcall2
(fd_floor,
gnm_expr_copy (expr_x),
gnm_expr_copy (expr_sig)));
@@ -4437,8 +4437,8 @@ odf_func_floor_handler (GnmConventions const *convs, Workbook *scope, GnmExprLis
return expr_mode_zero;
}
- expr_mode_one =
- gnm_expr_new_funcall2
+ expr_mode_one =
+ gnm_expr_new_funcall2
(fd_floor,
gnm_expr_copy (expr_x),
gnm_expr_copy (expr_sig));
@@ -4461,9 +4461,9 @@ odf_func_floor_handler (GnmConventions const *convs, Workbook *scope, GnmExprLis
}
}
}
- expr_if = gnm_expr_new_funcall3
+ expr_if = gnm_expr_new_funcall3
(fd_if,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (0)),
GNM_EXPR_OP_EQUAL,
gnm_expr_copy (expr_mode)),
@@ -4491,22 +4491,22 @@ odf_func_ceiling_handler (GnmConventions const *convs, Workbook *scope, GnmExprL
GnmExpr const *expr_mode;
GnmExpr const *expr_x = g_slist_nth_data ((GSList *) args, 0);
GnmExpr const *expr_sig = g_slist_nth_data ((GSList *) args, 1);
-
+
GnmFunc *fd_ceiling = gnm_func_lookup_or_add_placeholder ("CEILING", scope, FALSE);
GnmFunc *fd_floor = gnm_func_lookup_or_add_placeholder ("FLOOR", scope, FALSE);
GnmFunc *fd_if = gnm_func_lookup_or_add_placeholder ("IF", scope, FALSE);
-
+
expr_mode_zero = gnm_expr_new_funcall3
(fd_if,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_copy (expr_x),
GNM_EXPR_OP_LT,
gnm_expr_new_constant (value_new_int (0))),
- gnm_expr_new_funcall2
+ gnm_expr_new_funcall2
(fd_floor,
gnm_expr_copy (expr_x),
gnm_expr_copy (expr_sig)),
- gnm_expr_new_funcall2
+ gnm_expr_new_funcall2
(fd_ceiling,
gnm_expr_copy (expr_x),
gnm_expr_copy (expr_sig)));
@@ -4515,8 +4515,8 @@ odf_func_ceiling_handler (GnmConventions const *convs, Workbook *scope, GnmExprL
return expr_mode_zero;
}
- expr_mode_one =
- gnm_expr_new_funcall2
+ expr_mode_one =
+ gnm_expr_new_funcall2
(fd_ceiling,
gnm_expr_copy (expr_x),
gnm_expr_copy (expr_sig));
@@ -4537,9 +4537,9 @@ odf_func_ceiling_handler (GnmConventions const *convs, Workbook *scope, GnmExprL
}
}
}
- expr_if = gnm_expr_new_funcall3
+ expr_if = gnm_expr_new_funcall3
(fd_if,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (0)),
GNM_EXPR_OP_EQUAL,
gnm_expr_copy (expr_mode)),
@@ -4570,10 +4570,10 @@ odf_func_chisqdist_handler (GnmConventions const *convs, Workbook *scope, GnmExp
GnmFunc *fd_dchisq;
GnmExpr const *expr_pchisq;
GnmExpr const *expr_dchisq;
-
+
args = (GnmExprList *) g_slist_remove_link ((GSList *) args, link);
g_slist_free (link);
-
+
if (GNM_EXPR_GET_OPER (expr) == GNM_EXPR_OP_FUNCALL) {
if (go_ascii_strcase_equal (expr->func.func->name, "TRUE")) {
fd_pchisq = gnm_func_lookup_or_add_placeholder ("R.PCHISQ", scope, FALSE);
@@ -4618,7 +4618,7 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
{"GAUSS", odf_func_gauss_handler},
{NULL, NULL}
};
-
+
static struct {
char const *oo_name;
char const *gnm_name;
@@ -4793,7 +4793,7 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
/* { "FINDB","FINDB" }, */
/* { "FINV","FINV" }, */
/* { "FISHER","FISHER" }, */
-/* { "FISHERINV","FISHERINV" }, */
+/* { "FISHERINV","FISHERINV" }, */
/* { "FIXED","FIXED" }, */
/* { "FORECAST","FORECAST" }, */
/* { "FREQUENCY","FREQUENCY" }, */
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index b71bfab..2e7b2fa 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -193,7 +193,7 @@ odf_add_chars (GnmOOExport *state, char const *text, int len, gboolean *white_wr
}
switch (*text) {
- case ' ':
+ case ' ':
{
int white = strspn(text, " ");
@@ -231,7 +231,7 @@ odf_add_chars (GnmOOExport *state, char const *text, int len, gboolean *white_wr
g_warning ("How can we get here?");
break;
}
-
+
if (len > 0)
odf_add_chars (state, text, len, white_written);
}
@@ -250,21 +250,21 @@ odf_attrs_as_string (GnmOOExport *state, PangoAttribute *a)
case PANGO_ATTR_RISE:
if (((PangoAttrInt *)a)->value != 0) {
gsf_xml_out_start_element (state->xml, TEXT "span");
- gsf_xml_out_add_cstr (state->xml, TEXT "style-name",
- (((PangoAttrInt *)a)->value < 0)
+ gsf_xml_out_add_cstr (state->xml, TEXT "style-name",
+ (((PangoAttrInt *)a)->value < 0)
? "AC-subscript" : "AC-superscript");
spans += 1;
- }
+ }
break; /* ignored */
case PANGO_ATTR_STYLE :
spans += 1;
gsf_xml_out_start_element (state->xml, TEXT "span");
- gsf_xml_out_add_cstr (state->xml, TEXT "style-name",
- (((PangoAttrInt *)a)->value
- == PANGO_STYLE_ITALIC)
+ gsf_xml_out_add_cstr (state->xml, TEXT "style-name",
+ (((PangoAttrInt *)a)->value
+ == PANGO_STYLE_ITALIC)
? "AC-italic" : "AC-roman");
break;
- case PANGO_ATTR_WEIGHT :
+ case PANGO_ATTR_WEIGHT :
{
char * str = g_strdup_printf ("AC-weight%i",
((((PangoAttrInt *)a)->value
@@ -278,12 +278,12 @@ odf_attrs_as_string (GnmOOExport *state, PangoAttribute *a)
case PANGO_ATTR_STRIKETHROUGH :
spans += 1;
gsf_xml_out_start_element (state->xml, TEXT "span");
- gsf_xml_out_add_cstr (state->xml, TEXT "style-name",
+ gsf_xml_out_add_cstr (state->xml, TEXT "style-name",
((PangoAttrInt *)a)->value
- ? "AC-strikethrough-solid"
+ ? "AC-strikethrough-solid"
: "AC-strikethrough-none");
break;
- case PANGO_ATTR_UNDERLINE :
+ case PANGO_ATTR_UNDERLINE :
{
char const *name = NULL;
switch (((PangoAttrInt *)a)->value) {
@@ -359,7 +359,7 @@ odf_new_markup (GnmOOExport *state, const PangoAttrList *markup, char const *tex
gsf_xml_out_end_element (state->xml); /* </text:span> */
handled = to;
} while (pango_attr_iterator_next (iter));
-
+
pango_attr_iterator_destroy (iter);
return;
@@ -386,10 +386,10 @@ static void
odf_add_percent (GsfXMLOut *xml, char const *id, double val)
{
GString *str = g_string_new (NULL);
-
+
g_string_append_printf (str, "%.2f%%", val * 100.);
gsf_xml_out_add_cstr_unchecked (xml, id, str->str);
- g_string_free (str, TRUE);
+ g_string_free (str, TRUE);
}
@@ -397,7 +397,7 @@ static void
odf_add_pt (GsfXMLOut *xml, char const *id, float l)
{
GString *str = g_string_new (NULL);
-
+
g_string_append_printf (str, "%.2fpt", l);
gsf_xml_out_add_cstr_unchecked (xml, id, str->str);
g_string_free (str, TRUE);
@@ -414,7 +414,7 @@ gnm_xml_out_add_hex_color (GsfXMLOut *o, char const *id, GnmColor const *c)
gsf_xml_out_add_cstr_unchecked (o, id, "transparent");
else {
char *color;
- color = g_strdup_printf ("#%.2x%.2x%.2x",
+ color = g_strdup_printf ("#%.2x%.2x%.2x",
GO_COLOR_UINT_R (c->go_color),
GO_COLOR_UINT_G (c->go_color),
GO_COLOR_UINT_B (c->go_color));
@@ -465,15 +465,15 @@ xl_find_format (GnmOOExport *state, GOFormat const *format, int i)
const char *prefix;
switch (i) {
- case 0:
+ case 0:
hash = state->xl_styles;
prefix = "ND.%i";
break;
- case 1:
+ case 1:
hash = state->xl_styles_neg;
prefix = "ND-%i";
break;
- default:
+ default:
hash = state->xl_styles_zero;
prefix = "ND0%i";
break;
@@ -483,7 +483,7 @@ xl_find_format (GnmOOExport *state, GOFormat const *format, int i)
if (found == NULL) {
char *new_found;
- new_found = g_strdup_printf (prefix,
+ new_found = g_strdup_printf (prefix,
g_hash_table_size (hash));
g_hash_table_insert (hash, g_strdup (xl), new_found);
found = new_found;
@@ -502,7 +502,7 @@ xl_find_conditional_format (GnmOOExport *state, GOFormat const *format)
if (found == NULL) {
char *new_found;
- new_found = g_strdup_printf ("NDC-%i",
+ new_found = g_strdup_printf ("NDC-%i",
g_hash_table_size (state->xl_styles_conditional));
g_hash_table_insert (state->xl_styles_conditional, g_strdup (xl), new_found);
found = new_found;
@@ -514,7 +514,7 @@ xl_find_conditional_format (GnmOOExport *state, GOFormat const *format)
g_free (condition);
}
}
-
+
return found;
}
@@ -596,7 +596,7 @@ odf_get_border_format (GnmBorder *border)
w = GO_PT_TO_CM (w);
g_string_append_printf (str, "%.3fcm ", w);
g_string_append (str, border_type);
- g_string_append_printf (str, " #%.2x%.2x%.2x",
+ g_string_append_printf (str, " #%.2x%.2x%.2x",
GO_COLOR_UINT_R (color->go_color),
GO_COLOR_UINT_G (color->go_color),
GO_COLOR_UINT_B (color->go_color));
@@ -680,15 +680,15 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
BORDERSTYLE(MSTYLE_BORDER_RIGHT,FOSTYLE "border-right", STYLE "border-line-width-right", GNMSTYLE "border-line-style-right");
BORDERSTYLE(MSTYLE_BORDER_REV_DIAGONAL,STYLE "diagonal-bl-tr", STYLE "diagonal-bl-tr-widths", GNMSTYLE "diagonal-bl-tr-line-style");
BORDERSTYLE(MSTYLE_BORDER_DIAGONAL,STYLE "diagonal-tl-br", STYLE "diagonal-tl-br-widths", GNMSTYLE "diagonal-tl-br-line-style");
- /* note that we are at this time not setting any of:
- fo:padding 18.209,
- fo:padding-bottom 18.210,
- fo:padding-left 18.211,
- fo:padding-right 18.212,
- fo:padding-top 18.213,
- style:shadow 18.347,
+ /* note that we are at this time not setting any of:
+ fo:padding 18.209,
+ fo:padding-bottom 18.210,
+ fo:padding-left 18.211,
+ fo:padding-right 18.212,
+ fo:padding-top 18.213,
+ style:shadow 18.347,
*/
-
+
/* Vertical Alignment */
if (gnm_style_is_element_set (style, MSTYLE_ALIGN_V)) {
GnmVAlign align = gnm_style_get_align_v (style);
@@ -715,17 +715,17 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
if (gnum_specs && state->with_extension)
gsf_xml_out_add_int (state->xml, GNMSTYLE "GnmVAlign", align);
}
-
+
/* Wrapped Text */
if (gnm_style_is_element_set (style, MSTYLE_WRAP_TEXT))
- gsf_xml_out_add_cstr (state->xml, FOSTYLE "wrap-option",
+ gsf_xml_out_add_cstr (state->xml, FOSTYLE "wrap-option",
gnm_style_get_wrap_text (style) ? "wrap" : "no-wrap");
-
+
/* Shrink-To-Fit */
if (gnm_style_is_element_set (style, MSTYLE_SHRINK_TO_FIT))
- odf_add_bool (state->xml, STYLE "shrink-to-fit",
+ odf_add_bool (state->xml, STYLE "shrink-to-fit",
gnm_style_get_shrink_to_fit (style));
-
+
/* Text Direction */
/* Note that fo:direction, style:writing-mode and style:writing-mode-automatic interact. */
/* style:writing-mode-automatic is set in the paragraph properties below. */
@@ -750,7 +750,7 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
gsf_xml_out_add_cstr (state->xml, FOSTYLE "direction", direction);
gsf_xml_out_add_cstr (state->xml, STYLE "glyph-orientation-vertical", "auto");
}
-
+
/* Cell Protection */
test1 = gnm_style_is_element_set (style, MSTYLE_CONTENTS_HIDDEN);
test2 = gnm_style_is_element_set (style, MSTYLE_CONTENTS_LOCKED);
@@ -764,20 +764,20 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
else
label = protected ? "protected" : "none";
gsf_xml_out_add_cstr (state->xml, STYLE "cell-protect", label);
- }
-
+ }
+
/* Rotation */
if (gnm_style_is_element_set (style, MSTYLE_ROTATION)) {
gsf_xml_out_add_cstr (state->xml, STYLE "rotation-align", "none");
odf_add_angle (state->xml, STYLE "rotation-angle", gnm_style_get_rotation (style));
}
-
+
/* Print Content */
odf_add_bool (state->xml, STYLE "print-content", TRUE);
-
+
/* Repeat Content */
odf_add_bool (state->xml, STYLE "repeat-content", FALSE);
-
+
/* Decimal Places (this is the maximum number of decimal places shown if not otherwise specified.) */
/* Only interpreted in a default style. */
gsf_xml_out_add_int (state->xml, STYLE "decimal-places", 13);
@@ -786,15 +786,15 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
if (gnm_style_is_element_set (style, MSTYLE_INPUT_MSG) && state->with_extension) {
GnmInputMsg *msg = gnm_style_get_input_msg (style);
if (msg != NULL) {
- gsf_xml_out_add_cstr (state->xml, GNMSTYLE "input-title",
+ gsf_xml_out_add_cstr (state->xml, GNMSTYLE "input-title",
gnm_input_msg_get_title (msg));
-
- gsf_xml_out_add_cstr (state->xml, GNMSTYLE "input-msg",
+
+ gsf_xml_out_add_cstr (state->xml, GNMSTYLE "input-msg",
gnm_input_msg_get_msg (msg)); }
}
-
+
gsf_xml_out_end_element (state->xml); /* </style:table-cell-properties */
-
+
}
static void
@@ -805,9 +805,9 @@ odf_write_style_paragraph_properties (GnmOOExport *state, GnmStyle const *style)
/* Note that fo:direction, style:writing-mode and style:writing-mode-automatic interact. */
/* fo:direction and style:writing-mode may have been set in the cell properties above. */
if (gnm_style_is_element_set (style, MSTYLE_TEXT_DIR))
- odf_add_bool (state->xml, STYLE "writing-mode-automatic",
+ odf_add_bool (state->xml, STYLE "writing-mode-automatic",
(gnm_style_get_text_dir (style) == GNM_TEXT_DIR_CONTEXT));
-
+
/* Horizontal Alignment */
if (gnm_style_is_element_set (style, MSTYLE_ALIGN_H)) {
GnmHAlign align = gnm_style_get_align_h (style);
@@ -849,7 +849,7 @@ odf_write_style_paragraph_properties (GnmOOExport *state, GnmStyle const *style)
/* Text Indent */
if (gnm_style_is_element_set (style, MSTYLE_INDENT))
odf_add_pt (state->xml, FOSTYLE "text-indent", gnm_style_get_indent (style));
-
+
gsf_xml_out_end_element (state->xml); /* </style:paragraph-properties */
}
@@ -865,18 +865,18 @@ odf_write_style_text_properties (GnmOOExport *state, GnmStyle const *style)
char const *label = gnm_style_get_contents_hidden (style) ?
"none":"true";
gsf_xml_out_add_cstr (state->xml, TEXT "display", label);
- }
+ }
/* Font Weight */
if (gnm_style_is_element_set (style, MSTYLE_FONT_BOLD))
- gsf_xml_out_add_int (state->xml, FOSTYLE "font-weight",
- gnm_style_get_font_bold (style)
- ? PANGO_WEIGHT_BOLD
+ gsf_xml_out_add_int (state->xml, FOSTYLE "font-weight",
+ gnm_style_get_font_bold (style)
+ ? PANGO_WEIGHT_BOLD
: PANGO_WEIGHT_NORMAL);
/* Font Style (Italic vs Roman) */
if (gnm_style_is_element_set (style, MSTYLE_FONT_ITALIC))
- gsf_xml_out_add_cstr (state->xml, FOSTYLE "font-style",
- gnm_style_get_font_italic (style)
+ gsf_xml_out_add_cstr (state->xml, FOSTYLE "font-style",
+ gnm_style_get_font_italic (style)
? "italic" : "normal");
/* Strikethrough */
if (gnm_style_is_element_set (style, MSTYLE_FONT_STRIKETHROUGH)) {
@@ -902,23 +902,23 @@ odf_write_style_text_properties (GnmOOExport *state, GnmStyle const *style)
break;
}
/* Superscript/Subscript */
- if (gnm_style_is_element_set (style, MSTYLE_FONT_SCRIPT))
+ if (gnm_style_is_element_set (style, MSTYLE_FONT_SCRIPT))
switch (gnm_style_get_font_script (style)) {
case GO_FONT_SCRIPT_SUB:
- gsf_xml_out_add_cstr (state->xml,
+ gsf_xml_out_add_cstr (state->xml,
STYLE "text-position", "sub 80%");
break;
case GO_FONT_SCRIPT_STANDARD:
- gsf_xml_out_add_cstr (state->xml,
+ gsf_xml_out_add_cstr (state->xml,
STYLE "text-position", "0% 100%");
break;
case GO_FONT_SCRIPT_SUPER:
- gsf_xml_out_add_cstr (state->xml,
+ gsf_xml_out_add_cstr (state->xml,
STYLE "text-position", "super 80%");
break;
}
/* Font Size */
- if (gnm_style_is_element_set (style, MSTYLE_FONT_SIZE))
+ if (gnm_style_is_element_set (style, MSTYLE_FONT_SIZE))
gsf_xml_out_add_int (state->xml, FOSTYLE "font-size",
gnm_style_get_font_size (style));
/* Foreground Color */
@@ -931,7 +931,7 @@ odf_write_style_text_properties (GnmOOExport *state, GnmStyle const *style)
gnm_style_get_font_name (style));
- gsf_xml_out_end_element (state->xml); /* </style:text-properties> */
+ gsf_xml_out_end_element (state->xml); /* </style:text-properties> */
}
@@ -940,7 +940,7 @@ odf_write_style_goformat_name (GnmOOExport *state, GOFormat *gof)
{
char const *name;
- if ((gof == NULL) || go_format_is_markup (gof)
+ if ((gof == NULL) || go_format_is_markup (gof)
|| go_format_is_text (gof))
return;
@@ -958,7 +958,7 @@ static const char*
odf_find_style (GnmOOExport *state, GnmStyle const *style)
{
char const *found = g_hash_table_lookup (state->named_cell_styles, style);
-
+
if (found == NULL) {
found = g_hash_table_lookup (state->cell_styles, style);
}
@@ -976,7 +976,7 @@ odf_save_style_map_single_f (GnmOOExport *state, GString *str, GnmExprTop const
{
char *formula;
GnmParsePos pp;
-
+
parse_pos_init (&pp, WORKBOOK (state->wb), state->sheet, 0, 0);
formula = gnm_expr_top_as_string (texpr, &pp, state->conv);
@@ -1097,10 +1097,10 @@ odf_write_style (GnmOOExport *state, GnmStyle const *style, gboolean is_default)
#undef UNDERLINESPECS
#undef BORDERSTYLE
-static gint
+static gint
odf_compare_ci (gconstpointer a, gconstpointer b)
{
- col_row_styles_t const *old_style = a;
+ col_row_styles_t const *old_style = a;
ColRowInfo const *new_style = b;
return !colrow_equal (new_style, old_style->ci);
@@ -1274,13 +1274,13 @@ odf_write_character_styles (GnmOOExport *state)
gsf_xml_out_add_cstr (state->xml, STYLE "text-position", "sub 75%");
gsf_xml_out_end_element (state->xml); /* </style:text-properties> */
gsf_xml_out_end_element (state->xml); /* </style:style> */
-
+
odf_start_style (state->xml, "AC-superscript", "text");
gsf_xml_out_start_element (state->xml, STYLE "text-properties");
gsf_xml_out_add_cstr (state->xml, STYLE "text-position", "super 75%");
gsf_xml_out_end_element (state->xml); /* </style:text-properties> */
gsf_xml_out_end_element (state->xml); /* </style:style> */
-
+
odf_start_style (state->xml, "AC-strikethrough-solid", "text");
gsf_xml_out_start_element (state->xml, STYLE "text-properties");
gsf_xml_out_add_cstr (state->xml, STYLE "text-line-through-type", "single");
@@ -1372,10 +1372,10 @@ odf_write_column_styles (GnmOOExport *state)
ColRowInfo const *last_ci;
odf_find_col_style (state, &sheet->cols.default_style, TRUE);
-
+
last_ci = sheet_col_get (sheet, 0);
odf_find_col_style (state, last_ci , TRUE);
-
+
for (i = 1; i < max_cols; i++) {
ColRowInfo const *this_ci = sheet_col_get (sheet, i);
if (!colrow_equal (last_ci, this_ci))
@@ -1403,10 +1403,10 @@ odf_write_row_styles (GnmOOExport *state)
ColRowInfo const *last_ci;
odf_find_row_style (state, &sheet->rows.default_style, TRUE);
-
+
last_ci = sheet_row_get (sheet, 0);
odf_find_row_style (state, last_ci , TRUE);
-
+
for (i = 1; i < max_rows; i++) {
ColRowInfo const *this_ci = sheet_row_get (sheet, i);
if (!colrow_equal (last_ci, this_ci))
@@ -1550,7 +1550,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
{"SECH", odf_func_sech_handler},
{NULL, NULL}
};
-
+
static struct {
char const *gnm_name;
char const *odf_name;
@@ -1958,10 +1958,10 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
};
static GHashTable *namemap = NULL;
static GHashTable *handlermap = NULL;
-
+
char const *name = gnm_func_get_name (func->func);
gboolean (*handler) (GnmConventionsOut *out, GnmExprFunction const *func);
-
+
if (NULL == namemap) {
guint i;
namemap = g_hash_table_new (go_ascii_strcase_hash,
@@ -1986,7 +1986,7 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
if (handler == NULL || !handler (out, func)) {
char const *new_name = g_hash_table_lookup (namemap, name);
GString *target = out->accum;
-
+
if (new_name == NULL) {
if (0 == g_ascii_strncasecmp (name, "ODF.", 4)) {
char *new_u_name;
@@ -2003,10 +2003,10 @@ odf_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
}
else
g_string_append (target, new_name);
-
+
gnm_expr_list_as_string (func->argc, func->argv, out);
}
- return;
+ return;
}
@@ -2073,10 +2073,10 @@ odf_write_comment (GnmOOExport *state, GnmComment const *cc)
gboolean pp = TRUE;
g_object_get (G_OBJECT (state->xml), "pretty-print", &pp, NULL);
-
- g_object_get (G_OBJECT (cc), "text", &text,
+
+ g_object_get (G_OBJECT (cc), "text", &text,
"markup", &markup, "author", &author, NULL);
-
+
gsf_xml_out_start_element (state->xml, OFFICE "annotation");
if (author != NULL) {
gsf_xml_out_start_element (state->xml, DUBLINCORE "creator");
@@ -2103,7 +2103,7 @@ odf_strip_brackets (char *string)
closing = strrchr(string, ']');
if (closing != NULL)
*closing = '\0';
- return ((*string == '[') ? (string + 1) : string);
+ return ((*string == '[') ? (string + 1) : string);
}
static char *
@@ -2122,7 +2122,7 @@ odf_graph_get_series (GnmOOExport *state, GogGraph *sog, GnmParsePos *pp)
g_free (formula);
}
}
-
+
return g_string_free (str, FALSE);
}
@@ -2197,7 +2197,7 @@ odf_write_frame (GnmOOExport *state, SheetObject *so)
gsf_xml_out_simple_element (state->xml, TEXT "p", "Missing Sheet Object");
gsf_xml_out_end_element (state->xml); /* DRAW "text-box" */
}
-
+
gsf_xml_out_end_element (state->xml); /* DRAW "frame" */
}
@@ -2232,7 +2232,7 @@ odf_write_empty_cell (GnmOOExport *state, int num, GnmStyle const *style, GSList
char const * name = odf_find_style (state, style);
if (name != NULL)
gsf_xml_out_add_cstr (state->xml,
- TABLE "style-name", name);
+ TABLE "style-name", name);
}
odf_write_objects (state, objects);
gsf_xml_out_end_element (state->xml); /* table-cell */
@@ -2261,14 +2261,14 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
gboolean pp = TRUE;
g_object_get (G_OBJECT (state->xml), "pretty-print", &pp, NULL);
-
+
if (merge_range != NULL) {
rows_spanned = merge_range->end.row - merge_range->start.row + 1;
cols_spanned = merge_range->end.col - merge_range->start.col + 1;
}
gsf_xml_out_start_element (state->xml, TABLE "table-cell");
-
+
if (cols_spanned > 1)
gsf_xml_out_add_int (state->xml,
TABLE "number-columns-spanned", cols_spanned);
@@ -2285,14 +2285,14 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
TABLE "style-name", name);
}
- if ((NULL != cell->base.texpr) &&
+ if ((NULL != cell->base.texpr) &&
!gnm_expr_top_is_array_elem (cell->base.texpr, NULL, NULL)) {
char *formula, *eq_formula;
GnmParsePos pp;
-
+
if (gnm_cell_is_array (cell)) {
GnmExprArrayCorner const *ac;
-
+
ac = gnm_expr_top_get_array_corner (cell->base.texpr);
if (ac != NULL) {
gsf_xml_out_add_uint (state->xml,
@@ -2354,7 +2354,7 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
}
odf_write_objects (state, objects);
-
+
if (cell != NULL && cell->value != NULL) {
g_object_set (G_OBJECT (state->xml), "pretty-print", FALSE, NULL);
if ((VALUE_FMT (cell->value) == NULL)
@@ -2362,10 +2362,10 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
|| (!go_format_is_markup (VALUE_FMT (cell->value)))) {
char *rendered_string = gnm_cell_get_rendered_text (cell);
gboolean white_written = TRUE;
-
+
if (*rendered_string != '\0') {
gsf_xml_out_start_element (state->xml, TEXT "p");
- odf_add_chars (state, rendered_string, strlen (rendered_string),
+ odf_add_chars (state, rendered_string, strlen (rendered_string),
&white_written);
gsf_xml_out_end_element (state->xml); /* p */
}
@@ -2373,19 +2373,19 @@ odf_write_cell (GnmOOExport *state, GnmCell *cell, GnmRange const *merge_range,
} else {
GString *str = g_string_new (NULL);
const PangoAttrList * markup;
-
+
value_get_as_gstring (cell->value, str, NULL);
markup = go_format_get_markup (VALUE_FMT (cell->value));
-
+
gsf_xml_out_start_element (state->xml, TEXT "p");
odf_new_markup (state, markup, str->str);
gsf_xml_out_end_element (state->xml); /* p */
-
+
g_string_free (str, TRUE);
- }
+ }
g_object_set (G_OBJECT (state->xml), "pretty-print", pp, NULL);
}
-
+
gsf_xml_out_end_element (state->xml); /* table-cell */
}
@@ -2397,22 +2397,22 @@ filter_style (GnmStyle *default_style, GnmStyle * this)
}
static void
-write_col_style (GnmOOExport *state, GnmStyle *col_style, ColRowInfo const *ci,
+write_col_style (GnmOOExport *state, GnmStyle *col_style, ColRowInfo const *ci,
Sheet const *sheet)
{
char const * name;
- if (col_style != NULL) {
- name = odf_find_style (state, col_style);
- if (name != NULL)
- gsf_xml_out_add_cstr (state->xml,
- TABLE "default-cell-style-name", name);
+ if (col_style != NULL) {
+ name = odf_find_style (state, col_style);
+ if (name != NULL)
+ gsf_xml_out_add_cstr (state->xml,
+ TABLE "default-cell-style-name", name);
}
- name = odf_find_col_style (state,
- (ci == NULL) ? &sheet->cols.default_style: ci,
- FALSE);
- if (name != NULL)
- gsf_xml_out_add_cstr (state->xml, TABLE "style-name", name);
+ name = odf_find_col_style (state,
+ (ci == NULL) ? &sheet->cols.default_style: ci,
+ FALSE);
+ if (name != NULL)
+ gsf_xml_out_add_cstr (state->xml, TABLE "style-name", name);
}
static void
@@ -2452,20 +2452,20 @@ odf_write_formatted_columns (GnmOOExport *state, Sheet const *sheet, GnmStyle **
if (number_cols_rep > 1)
gsf_xml_out_add_int (state->xml, TABLE "number-columns-repeated",
number_cols_rep);
- gsf_xml_out_end_element (state->xml); /* table-column */
+ gsf_xml_out_end_element (state->xml); /* table-column */
}
static void
-write_row_style (GnmOOExport *state, ColRowInfo const *ci,
+write_row_style (GnmOOExport *state, ColRowInfo const *ci,
Sheet const *sheet)
{
char const * name;
- name = odf_find_row_style (state,
- (ci == NULL) ? &sheet->rows.default_style: ci,
- FALSE);
- if (name != NULL)
- gsf_xml_out_add_cstr (state->xml, TABLE "style-name", name);
+ name = odf_find_row_style (state,
+ (ci == NULL) ? &sheet->rows.default_style: ci,
+ FALSE);
+ if (name != NULL)
+ gsf_xml_out_add_cstr (state->xml, TABLE "style-name", name);
}
@@ -2479,7 +2479,7 @@ finder (gconstpointer a, gconstpointer b)
}
static int
-write_styled_cells (GnmOOExport *state, Sheet const *sheet, int row, int row_length,
+write_styled_cells (GnmOOExport *state, Sheet const *sheet, int row, int row_length,
int max_rows, GnmStyleList *list)
{
int answer = max_rows;
@@ -2487,7 +2487,7 @@ write_styled_cells (GnmOOExport *state, Sheet const *sheet, int row, int row_len
where.row = row;
for (where.col = 0; where.col < row_length; ) {
- GSList* l = g_slist_find_custom (list, &where, finder);
+ GSList* l = g_slist_find_custom (list, &where, finder);
if (l == NULL) {
answer = 1;
@@ -2508,8 +2508,8 @@ write_styled_cells (GnmOOExport *state, Sheet const *sheet, int row, int row_len
}
static void
-odf_write_styled_empty_rows (GnmOOExport *state, Sheet const *sheet,
- int from, int to, int row_length,
+odf_write_styled_empty_rows (GnmOOExport *state, Sheet const *sheet,
+ int from, int to, int row_length,
GnmPageBreaks *pb, G_GNUC_UNUSED GnmStyle **col_styles)
{
int number_rows_rep;
@@ -2526,8 +2526,8 @@ odf_write_styled_empty_rows (GnmOOExport *state, Sheet const *sheet,
for (i = from; i < to; ) {
if (gnm_page_breaks_get_break (pb, i) != GNM_PAGE_BREAK_NONE)
- gsf_xml_out_simple_element (state->xml,
- TEXT "soft-page-break",
+ gsf_xml_out_simple_element (state->xml,
+ TEXT "soft-page-break",
NULL);
next_to = gnm_page_breaks_get_next_break (pb, i);
if (next_to < from || next_to > to)
@@ -2536,7 +2536,7 @@ odf_write_styled_empty_rows (GnmOOExport *state, Sheet const *sheet,
gsf_xml_out_start_element (state->xml, TABLE "table-row");
last_ci = sheet_row_get (sheet, i);
write_row_style (state, last_ci, sheet);
- style_rep = write_styled_cells (state, sheet, i - from, row_length,
+ style_rep = write_styled_cells (state, sheet, i - from, row_length,
next_to - i, list) - 1;
gsf_xml_out_end_element (state->xml); /* table-row */
i++;
@@ -2546,26 +2546,26 @@ odf_write_styled_empty_rows (GnmOOExport *state, Sheet const *sheet,
if (i + style_rep < next_to)
next_to = i + style_rep;
-
+
number_rows_rep = 1;
last_ci = sheet_row_get (sheet, i);
for (j = i + 1; j < next_to; j++) {
ColRowInfo const *this_ci = sheet_row_get (sheet, j);
-
+
if (colrow_equal (last_ci, this_ci))
number_rows_rep++;
}
-
+
gsf_xml_out_start_element (state->xml, TABLE "table-row");
write_row_style (state, last_ci, sheet);
if (number_rows_rep > 1)
gsf_xml_out_add_int (state->xml, TABLE "number-rows-repeated",
number_rows_rep);
write_styled_cells (state, sheet, i - from, row_length, 0, list);
- gsf_xml_out_end_element (state->xml); /* table-row */
-
+ gsf_xml_out_end_element (state->xml); /* table-row */
+
i += number_rows_rep;
- }
+ }
style_list_free (list);
}
@@ -2587,8 +2587,8 @@ odf_sheet_objects_get (Sheet const *sheet, GnmCellPos const *pos)
}
static void
-odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to,
- G_GNUC_UNUSED int col_from, G_GNUC_UNUSED int col_to, int row_length,
+odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to,
+ G_GNUC_UNUSED int col_from, G_GNUC_UNUSED int col_to, int row_length,
GSList **sheet_merges, GnmPageBreaks *pb, G_GNUC_UNUSED GnmStyle **col_styles)
{
int col, row;
@@ -2603,8 +2603,8 @@ odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to
pos.row = row;
if (gnm_page_breaks_get_break (pb, row) != GNM_PAGE_BREAK_NONE)
- gsf_xml_out_simple_element (state->xml,
- TEXT "soft-page-break",
+ gsf_xml_out_simple_element (state->xml,
+ TEXT "soft-page-break",
NULL);
gsf_xml_out_start_element (state->xml, TABLE "table-row");
@@ -2632,7 +2632,7 @@ odf_write_content_rows (GnmOOExport *state, Sheet const *sheet, int from, int to
gnm_cell_is_empty (current_cell)) {
GnmStyle const *this_style= sheet_style_get (sheet, pos.col, pos.row);
- if ((null_cell == 0) || (null_style == this_style)) {
+ if ((null_cell == 0) || (null_style == this_style)) {
null_style = this_style;
if (covered_cell > 0)
odf_write_covered_cell (state, &covered_cell);
@@ -2696,13 +2696,13 @@ odf_write_sheet (GnmOOExport *state)
/* ODF does not allow us to mark soft page breaks between columns */
odf_write_formatted_columns (state, sheet, col_styles, 0, max_cols);
- odf_write_styled_empty_rows (state, sheet, 0, extent.start.row,
+ odf_write_styled_empty_rows (state, sheet, 0, extent.start.row,
max_cols, pb, col_styles);
- odf_write_content_rows (state, sheet,
- extent.start.row, extent.end.row + 1,
- extent.start.col, extent.end.col + 1,
+ odf_write_content_rows (state, sheet,
+ extent.start.row, extent.end.row + 1,
+ extent.start.col, extent.end.col + 1,
max_cols, &sheet_merges, pb, col_styles);
- odf_write_styled_empty_rows (state, sheet, extent.end.row + 1, max_rows,
+ odf_write_styled_empty_rows (state, sheet, extent.end.row + 1, max_rows,
max_cols, pb, col_styles);
go_slist_free_custom (sheet_merges, g_free);
@@ -2812,15 +2812,15 @@ odf_print_spreadsheet_content_prelude (GnmOOExport *state)
else
gsf_xml_out_add_cstr_unchecked (state->xml, TABLE "date-value", "1904-1-1");
gsf_xml_out_add_cstr_unchecked (state->xml, TABLE "value-type", "date");
- gsf_xml_out_end_element (state->xml); /* </table:null-date> */
+ gsf_xml_out_end_element (state->xml); /* </table:null-date> */
gsf_xml_out_start_element (state->xml, TABLE "iteration");
- gsf_xml_out_add_float (state->xml, TABLE "maximum-difference",
+ gsf_xml_out_add_float (state->xml, TABLE "maximum-difference",
state->wb->iteration.tolerance, -1);
- gsf_xml_out_add_cstr_unchecked (state->xml, TABLE "status",
+ gsf_xml_out_add_cstr_unchecked (state->xml, TABLE "status",
state->wb->iteration.enabled ? "enable" : "disable");
gsf_xml_out_add_int (state->xml, TABLE "steps", state->wb->iteration.max_number);
- gsf_xml_out_end_element (state->xml); /* </table:iteration> */
- gsf_xml_out_end_element (state->xml); /* </table:calculation-settings> */
+ gsf_xml_out_end_element (state->xml); /* </table:iteration> */
+ gsf_xml_out_end_element (state->xml); /* </table:calculation-settings> */
}
@@ -2837,7 +2837,7 @@ odf_write_content (GnmOOExport *state, GsfOutput *child)
for (i = 0 ; i < (int)G_N_ELEMENTS (ns) ; i++)
gsf_xml_out_add_cstr_unchecked (state->xml, ns[i].key, ns[i].url);
- gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
+ gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
get_gsf_odf_version_string ());
gsf_xml_out_simple_element (state->xml, OFFICE "scripts", NULL);
@@ -2868,7 +2868,7 @@ odf_write_content (GnmOOExport *state, GsfOutput *child)
graphs = sheet_objects_get (sheet, NULL, SHEET_OBJECT_GRAPH_TYPE);
for (l = graphs; l != NULL; l = l->next)
- g_hash_table_insert (state->objects, l->data,
+ g_hash_table_insert (state->objects, l->data,
g_strdup_printf ("Graph%i", graph_n++));
g_slist_free (graphs);
@@ -2881,18 +2881,18 @@ odf_write_content (GnmOOExport *state, GsfOutput *child)
p_area = sheet_get_nominal_printarea (sheet);
- if (p_area != NULL) {
+ if (p_area != NULL) {
GnmValue *v = value_new_cellrange_r (sheet, p_area);
GnmExprTop const *texpr;
char *formula;
GnmParsePos pp;
GnmCellRef *a, *b;
-
+
a = &v->v_range.cell.a;
b = &v->v_range.cell.b;
a->col_relative = b->col_relative = TRUE;
a->row_relative = b->row_relative = TRUE;
-
+
texpr = gnm_expr_top_new_constant (v);
g_free (p_area);
@@ -2901,7 +2901,7 @@ odf_write_content (GnmOOExport *state, GsfOutput *child)
&pp,
state->conv);
gnm_expr_top_unref (texpr);
- gsf_xml_out_add_cstr (state->xml, TABLE "print-ranges",
+ gsf_xml_out_add_cstr (state->xml, TABLE "print-ranges",
odf_strip_brackets (formula));
g_free (formula);
}
@@ -2972,20 +2972,20 @@ odf_write_map (GnmOOExport *state, char const *xl, int i)
if (condition == NULL)
return FALSE;
switch (i) {
- case 0:
+ case 0:
xl_styles = state->xl_styles;
break;
- case 1:
+ case 1:
xl_styles = state->xl_styles_neg;
break;
- default:
+ default:
xl_styles = state->xl_styles_zero;
break;
}
gsf_xml_out_start_element (state->xml, STYLE "map");
gsf_xml_out_add_cstr (state->xml, STYLE "condition", condition);
- gsf_xml_out_add_cstr (state->xml, STYLE "apply-style-name",
+ gsf_xml_out_add_cstr (state->xml, STYLE "apply-style-name",
g_hash_table_lookup (xl_styles, xl));
gsf_xml_out_end_element (state->xml); /* </style:map> */
g_free (condition);
@@ -3012,17 +3012,17 @@ odf_write_styles (GnmOOExport *state, GsfOutput *child)
gsf_xml_out_start_element (state->xml, OFFICE "document-styles");
for (i = 0 ; i < (int)G_N_ELEMENTS (ns) ; i++)
gsf_xml_out_add_cstr_unchecked (state->xml, ns[i].key, ns[i].url);
- gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
+ gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
get_gsf_odf_version_string ());
gsf_xml_out_start_element (state->xml, OFFICE "styles");
-
+
g_hash_table_foreach (state->xl_styles, (GHFunc) odf_write_this_xl_style, state);
g_hash_table_foreach (state->xl_styles_neg, (GHFunc) odf_write_this_xl_style_neg, state);
g_hash_table_foreach (state->xl_styles_zero, (GHFunc) odf_write_this_xl_style_zero, state);
g_hash_table_foreach (state->xl_styles_conditional, (GHFunc) odf_write_this_conditional_xl_style, state);
g_hash_table_foreach (state->named_cell_styles, (GHFunc) odf_save_this_style_with_name, state);
-
+
if (state->default_style != NULL) {
gsf_xml_out_start_element (state->xml, STYLE "default-style");
gsf_xml_out_add_cstr_unchecked (state->xml, STYLE "family", "table-cell");
@@ -3061,7 +3061,7 @@ odf_write_meta (GnmOOExport *state, GsfOutput *child)
g_value_init (val, G_TYPE_STRING);
g_value_set_string (val, PACKAGE_NAME "/" VERSION);
-
+
gsf_doc_meta_data_insert (meta, g_strdup (GSF_META_NAME_GENERATOR), val);
gsf_opendoc_metadata_write (xml, meta);
gsf_doc_meta_data_remove (meta,GSF_META_NAME_GENERATOR);
@@ -3079,7 +3079,7 @@ odf_write_meta_graph (GnmOOExport *state, GsfOutput *child)
g_value_init (val, G_TYPE_STRING);
g_value_set_string (val, PACKAGE_NAME "/" VERSION);
-
+
gsf_doc_meta_data_insert (meta, g_strdup (GSF_META_NAME_GENERATOR), val);
gsf_opendoc_metadata_write (xml, meta);
@@ -3097,7 +3097,7 @@ odf_write_settings (GnmOOExport *state, GsfOutput *child)
gsf_xml_out_start_element (state->xml, OFFICE "document-settings");
for (i = 0 ; i < (int)G_N_ELEMENTS (ns) ; i++)
gsf_xml_out_add_cstr_unchecked (state->xml, ns[i].key, ns[i].url);
- gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
+ gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
get_gsf_odf_version_string ());
gsf_xml_out_end_element (state->xml); /* </office:document-settings> */
g_object_unref (state->xml);
@@ -3176,7 +3176,7 @@ typedef enum {
ODF_BUBBLE,
ODF_SCATTER_COLOUR,
ODF_POLAR
-} odf_chart_type_t;
+} odf_chart_type_t;
static void
odf_write_standard_series (GnmOOExport *state, GSList const *series)
@@ -3193,18 +3193,18 @@ odf_write_standard_series (GnmOOExport *state, GSList const *series)
char *str = gnm_expr_top_as_string (texpr, &pp, state->conv);
GOData const *cat = gog_dataset_get_dim (GOG_DATASET (series->data), GOG_MS_DIM_LABELS);
gsf_xml_out_start_element (state->xml, CHART "series");
- gsf_xml_out_add_cstr (state->xml, CHART "values-cell-range-address",
+ gsf_xml_out_add_cstr (state->xml, CHART "values-cell-range-address",
odf_strip_brackets (str));
g_free (str);
str = g_strdup_printf ("series%i", i);
gsf_xml_out_add_cstr (state->xml, CHART "style-name", str);
g_free (str);
if (NULL != cat) {
- texpr = gnm_go_data_get_expr (cat);
+ texpr = gnm_go_data_get_expr (cat);
if (NULL != texpr) {
str = gnm_expr_top_as_string (texpr, &pp, state->conv);
gsf_xml_out_start_element (state->xml, CHART "domain");
- gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
+ gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
odf_strip_brackets (str));
gsf_xml_out_end_element (state->xml); /* </chart:domain> */
g_free (str);
@@ -3231,18 +3231,18 @@ odf_write_gantt_series (GnmOOExport *state, GSList const *series)
char *str = gnm_expr_top_as_string (texpr, &pp, state->conv);
GOData const *cat = gog_dataset_get_dim (GOG_DATASET (series->data), GOG_MS_DIM_LABELS);
gsf_xml_out_start_element (state->xml, CHART "series");
- gsf_xml_out_add_cstr (state->xml, CHART "values-cell-range-address",
+ gsf_xml_out_add_cstr (state->xml, CHART "values-cell-range-address",
odf_strip_brackets (str));
g_free (str);
str = g_strdup_printf ("series%i", i);
gsf_xml_out_add_cstr (state->xml, CHART "style-name", str);
g_free (str);
if (NULL != cat) {
- texpr = gnm_go_data_get_expr (cat);
+ texpr = gnm_go_data_get_expr (cat);
if (NULL != texpr) {
str = gnm_expr_top_as_string (texpr, &pp, state->conv);
gsf_xml_out_start_element (state->xml, CHART "domain");
- gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
+ gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
odf_strip_brackets (str));
gsf_xml_out_end_element (state->xml); /* </chart:domain> */
g_free (str);
@@ -3257,7 +3257,7 @@ odf_write_gantt_series (GnmOOExport *state, GSList const *series)
if (NULL != texpr) {
char *str = gnm_expr_top_as_string (texpr, &pp, state->conv);
gsf_xml_out_start_element (state->xml, CHART "series");
- gsf_xml_out_add_cstr (state->xml, CHART "values-cell-range-address",
+ gsf_xml_out_add_cstr (state->xml, CHART "values-cell-range-address",
odf_strip_brackets (str));
g_free (str);
str = g_strdup_printf ("series%i", i);
@@ -3298,7 +3298,7 @@ odf_write_bubble_series (GnmOOExport *state, GSList const *orig_series)
if (NULL != texpr) {
str = gnm_expr_top_as_string (texpr, &pp, state->conv);
gsf_xml_out_start_element (state->xml, CHART "domain");
- gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
+ gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
odf_strip_brackets (str));
gsf_xml_out_end_element (state->xml); /* </chart:domain> */
g_free (str);
@@ -3319,7 +3319,7 @@ odf_write_min_max_series (GnmOOExport *state, GSList const *orig_series)
GSList const *series;
parse_pos_init (&pp, WORKBOOK (state->wb), NULL, 0,0 );
- for (j = 1; j < 3; j++) {
+ for (j = 1; j < 3; j++) {
gsf_xml_out_start_element (state->xml, CHART "series");
for (series = orig_series, i = 1; NULL != series; series = series->next, i++) {
GOData const *dat = gog_dataset_get_dim (GOG_DATASET (series->data), j);
@@ -3400,7 +3400,7 @@ odf_write_scatter_series_style (GnmOOExport *state, G_GNUC_UNUSED GogObject cons
}
static void
-odf_write_axis_style (GnmOOExport *state, GogObject const *chart,
+odf_write_axis_style (GnmOOExport *state, GogObject const *chart,
char const *style_label, GogObject const *axis, gboolean reverse)
{
odf_start_style (state->xml, style_label, "chart");
@@ -3412,7 +3412,7 @@ odf_write_axis_style (GnmOOExport *state, GogObject const *chart,
if (axis != NULL) {
char const *type = NULL;
double minima = 0., maxima = 0.;
-
+
g_object_get (G_OBJECT (axis), "map-name", &type, NULL);
odf_add_bool (state->xml, CHART "logarithmic", 0 != strcmp (type, "Linear"));
if (gog_axis_get_bounds (GOG_AXIS (axis), &minima, &maxima)) {
@@ -3428,7 +3428,7 @@ odf_write_axis_style (GnmOOExport *state, GogObject const *chart,
}
static void
-odf_write_circle_axes_styles (GnmOOExport *state, GogObject const *chart,
+odf_write_circle_axes_styles (GnmOOExport *state, GogObject const *chart,
G_GNUC_UNUSED GogObject const *plot)
{
odf_write_axis_style (state, chart, "yaxis", gog_object_get_child_by_name (chart, "Y-Axis"), TRUE);
@@ -3436,7 +3436,7 @@ odf_write_circle_axes_styles (GnmOOExport *state, GogObject const *chart,
}
static void
-odf_write_radar_axes_styles (GnmOOExport *state, GogObject const *chart,
+odf_write_radar_axes_styles (GnmOOExport *state, GogObject const *chart,
G_GNUC_UNUSED GogObject const *plot)
{
odf_write_axis_style (state, chart, "yaxis", gog_object_get_child_by_name (chart, "Radial-Axis"), FALSE);
@@ -3444,35 +3444,35 @@ odf_write_radar_axes_styles (GnmOOExport *state, GogObject const *chart,
}
static void
-odf_write_dropbar_axes_styles (GnmOOExport *state, GogObject const *chart,
+odf_write_dropbar_axes_styles (GnmOOExport *state, GogObject const *chart,
GogObject const *plot)
{
GObjectClass *klass = G_OBJECT_GET_CLASS (G_OBJECT (plot));
gboolean horizontal = FALSE;
if (NULL != g_object_class_find_property (klass, "horizontal"))
g_object_get (G_OBJECT (plot), "horizontal", &horizontal, NULL);
- odf_write_axis_style (state, chart, horizontal ? "xaxis" : "yaxis",
+ odf_write_axis_style (state, chart, horizontal ? "xaxis" : "yaxis",
gog_object_get_child_by_name (chart, "Y-Axis"), horizontal);
- odf_write_axis_style (state, chart, horizontal ? "yaxis" : "xaxis",
+ odf_write_axis_style (state, chart, horizontal ? "yaxis" : "xaxis",
gog_object_get_child_by_name (chart, "X-Axis"), FALSE);
}
static void
-odf_write_standard_axes_styles (GnmOOExport *state, GogObject const *chart,
+odf_write_standard_axes_styles (GnmOOExport *state, GogObject const *chart,
GogObject const *plot)
{
GObjectClass *klass = G_OBJECT_GET_CLASS (G_OBJECT (plot));
gboolean horizontal = FALSE;
if (NULL != g_object_class_find_property (klass, "horizontal"))
g_object_get (G_OBJECT (plot), "horizontal", &horizontal, NULL);
- odf_write_axis_style (state, chart, horizontal ? "xaxis" : "yaxis",
+ odf_write_axis_style (state, chart, horizontal ? "xaxis" : "yaxis",
gog_object_get_child_by_name (chart, "Y-Axis"), FALSE);
- odf_write_axis_style (state, chart, horizontal ? "yaxis" : "xaxis",
+ odf_write_axis_style (state, chart, horizontal ? "yaxis" : "xaxis",
gog_object_get_child_by_name (chart, "X-Axis"), FALSE);
}
static void
-odf_write_surface_axes_styles (GnmOOExport *state, GogObject const *chart,
+odf_write_surface_axes_styles (GnmOOExport *state, GogObject const *chart,
GogObject const *plot)
{
odf_write_axis_style (state, chart, "zaxis", gog_object_get_child_by_name (chart, "Z-Axis"), FALSE);
@@ -3485,7 +3485,7 @@ odf_write_axis (GnmOOExport *state, GogObject const *chart, char const *axis_rol
char const *dimension, odf_chart_type_t gtype)
{
GogObject const *axis;
-
+
if (axis_role == NULL)
return;
@@ -3495,7 +3495,7 @@ odf_write_axis (GnmOOExport *state, GogObject const *chart, char const *axis_rol
gsf_xml_out_add_cstr (state->xml, CHART "dimension", dimension);
gsf_xml_out_add_cstr (state->xml, CHART "style-name", style_label);
gsf_xml_out_end_element (state->xml); /* </chart:axis> */
- }
+ }
}
static void
@@ -3516,11 +3516,11 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *chart, Gog
char const * x_axis_name;
char const * y_axis_name;
char const * z_axis_name;
- void (*odf_write_axes_styles) (GnmOOExport *state, GogObject const *chart,
+ void (*odf_write_axes_styles) (GnmOOExport *state, GogObject const *chart,
GogObject const *plot);
- void (*odf_write_chart_styles) (GnmOOExport *state, GogObject const *chart,
+ void (*odf_write_chart_styles) (GnmOOExport *state, GogObject const *chart,
GogObject const *plot);
- void (*odf_write_plot_styles) (GnmOOExport *state, GogObject const *chart,
+ void (*odf_write_plot_styles) (GnmOOExport *state, GogObject const *chart,
GogObject const *plot);
void (*odf_write_series) (GnmOOExport *state, GSList const *series);
void (*odf_write_series_style) (GnmOOExport *state, GogObject const *series);
@@ -3628,7 +3628,7 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *chart, Gog
if (this_plot->odf_write_series_style != NULL)
this_plot->odf_write_series_style (state, l->data);
gsf_xml_out_end_element (state->xml); /* </style:chart-properties> */
- gsf_xml_out_end_element (state->xml); /* </style:style> */
+ gsf_xml_out_end_element (state->xml); /* </style:style> */
g_free (name);
}
@@ -3651,7 +3651,7 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *chart, Gog
sheet_object_anchor_to_pts (anchor, state->sheet, res_pts);
odf_add_pt (state->xml, SVG "width", res_pts[2] - res_pts[0] - 2 * this_plot->pad);
odf_add_pt (state->xml, SVG "height", res_pts[3] - res_pts[1] - 2 * this_plot->pad);
-
+
if (get_gsf_odf_version () > 101)
gsf_xml_out_add_cstr (state->xml, XLINK "href", "..");
gsf_xml_out_add_cstr (state->xml, CHART "class", this_plot->odf_plot_type);
@@ -3660,7 +3660,7 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *chart, Gog
gsf_xml_out_add_cstr (state->xml, CHART "style-name", "plotarea");
if (get_gsf_odf_version () <= 101) {
for ( ; NULL != series ; series = series->next) {
- GOData const *dat = gog_dataset_get_dim
+ GOData const *dat = gog_dataset_get_dim
(GOG_DATASET (series->data), GOG_MS_DIM_VALUES);
if (NULL != dat) {
GnmExprTop const *texpr = gnm_go_data_get_expr (dat);
@@ -3669,7 +3669,7 @@ odf_write_plot (GnmOOExport *state, SheetObject *so, GogObject const *chart, Gog
char *str;
parse_pos_init (&pp, WORKBOOK (state->wb), NULL, 0,0 );
str = gnm_expr_top_as_string (texpr, &pp, state->conv);
- gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
+ gsf_xml_out_add_cstr (state->xml, TABLE "cell-range-address",
odf_strip_brackets (str));
g_free (str);
break;
@@ -3710,7 +3710,7 @@ odf_write_graph_content (GnmOOExport *state, GsfOutput *child, SheetObject *so)
for (i = 0 ; i < (int)G_N_ELEMENTS (ns) ; i++)
gsf_xml_out_add_cstr_unchecked (state->xml, ns[i].key, ns[i].url);
- gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
+ gsf_xml_out_add_cstr_unchecked (state->xml, OFFICE "version",
get_gsf_odf_version_string ());
graph = sheet_object_graph_get_gog (so);
@@ -3718,7 +3718,7 @@ odf_write_graph_content (GnmOOExport *state, GsfOutput *child, SheetObject *so)
GogObject const *chart = gog_object_get_child_by_name (GOG_OBJECT (graph), "Chart");
if (chart != NULL) {
GogObject const *plot = gog_object_get_child_by_name (GOG_OBJECT (chart), "Plot");
- if (plot != NULL)
+ if (plot != NULL)
odf_write_plot (state, so, chart, plot);
}
}
@@ -3733,7 +3733,7 @@ static void
odf_write_graphs (SheetObject *graph, char const *name, GnmOOExport *state)
{
GsfOutput *child;
-
+
child = gsf_outfile_new_child_full (state->outfile, name, TRUE,
"compression-level", GSF_ZIP_DEFLATED,
NULL);
@@ -3875,7 +3875,7 @@ openoffice_file_save_real (GOFileSaver const *fs, GOIOContext *ioc,
gsf_output_close (pictures);
g_object_unref (G_OBJECT (pictures));
}
-
+
g_free (state.conv);
@@ -3892,7 +3892,7 @@ openoffice_file_save_real (GOFileSaver const *fs, GOIOContext *ioc,
g_hash_table_unref (state.xl_styles_conditional);
g_slist_free (state.col_styles);
g_slist_free (state.row_styles);
- gnm_style_unref (state.default_style);
+ gnm_style_unref (state.default_style);
}
diff --git a/plugins/psiconv/psiconv-read.c b/plugins/psiconv/psiconv-read.c
index b912adb..39f559d 100644
--- a/plugins/psiconv/psiconv-read.c
+++ b/plugins/psiconv/psiconv-read.c
@@ -512,7 +512,7 @@ set_row_heights (Sheet *sheet, psiconv_sheet_grid_size_list heights)
for (i = 0; i < psiconv_list_length(heights); i++) {
if ((psi_height = psiconv_list_get (heights, i)))
- sheet_row_set_size_pts
+ sheet_row_set_size_pts
(sheet, psi_height->line_number,
cm2pts (psi_height->size), TRUE);
}
@@ -526,7 +526,7 @@ set_col_widths (Sheet *sheet, psiconv_sheet_grid_size_list widths)
for (i = 0; i < psiconv_list_length(widths); i++) {
if ((psi_width = psiconv_list_get (widths, i)))
- sheet_col_set_size_pts
+ sheet_col_set_size_pts
(sheet, psi_width->line_number,
cm2pts (psi_width->size), TRUE);
}
@@ -558,9 +558,9 @@ add_worksheet(Workbook *wb, psiconv_sheet_worksheet psi_worksheet,int nr,
/* TODO: Add show_zeros */
grid = psi_worksheet->grid;
if (grid) {
- sheet_row_set_default_size_pts
+ sheet_row_set_default_size_pts
(sheet, cm2pts (grid->default_row_height));
- sheet_col_set_default_size_pts
+ sheet_col_set_default_size_pts
(sheet, cm2pts (grid->default_column_width));
if (grid->row_heights)
set_row_heights (sheet, grid->row_heights);
diff --git a/src/application.c b/src/application.c
index af812e5..eeac881 100644
--- a/src/application.c
+++ b/src/application.c
@@ -71,7 +71,7 @@ struct _GnmApp {
#ifdef HAVE_GTK_RECENT_MANAGER_GET_DEFAULT
GtkRecentManager *recent;
gulong recent_sig;
-#endif
+#endif
};
typedef struct {
@@ -518,7 +518,7 @@ gnm_app_create_opener_filter (void)
} else
g_string_append_unichar (pattern, uc);
}
-
+
gtk_file_filter_add_pattern (filter, pattern->str);
if (0)
g_print ("%s: Adding %s\n", go_file_opener_get_description (opener), pattern->str);
diff --git a/src/cell.c b/src/cell.c
index a90400d..641a46c 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -448,7 +448,7 @@ gnm_cell_is_nonsingleton_array (GnmCell const *cell)
if (gnm_expr_top_is_array_elem (cell->base.texpr, NULL, NULL))
return TRUE;
- corner = gnm_expr_top_get_array_corner (cell->base.texpr);
+ corner = gnm_expr_top_get_array_corner (cell->base.texpr);
return corner && (corner->cols > 1 || corner->rows > 1);
}
diff --git a/src/dialogs/dao-gui-utils.h b/src/dialogs/dao-gui-utils.h
index 34e5934..5b68c95 100644
--- a/src/dialogs/dao-gui-utils.h
+++ b/src/dialogs/dao-gui-utils.h
@@ -9,7 +9,7 @@
*
* (C) Copyright 2000, 2001 by Jukka-Pekka Iivonen <jiivonen hutcs cs hut fi>
* (C) Copyright 2001, 2002 by Andreas J. Guelzow <aguelzow taliesin ca>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
diff --git a/src/dialogs/dialog-about.c b/src/dialogs/dialog-about.c
index 5aebb18..699ee45 100644
--- a/src/dialogs/dialog-about.c
+++ b/src/dialogs/dialog-about.c
@@ -293,7 +293,7 @@ text_item_renderer (AboutRenderer *r, AboutState *state)
* sliding text.
*/
gdk_pango_renderer_set_drawable (gdk_renderer, drawable);
- gdk_pango_renderer_set_gc (gdk_renderer, text_gc);
+ gdk_pango_renderer_set_gc (gdk_renderer, text_gc);
pango_renderer_draw_layout (renderer, layout, x, y);
return TRUE;
diff --git a/src/dialogs/dialog-analysis-tool-chi-squared.c b/src/dialogs/dialog-analysis-tool-chi-squared.c
index 25a2089..692486a 100644
--- a/src/dialogs/dialog-analysis-tool-chi-squared.c
+++ b/src/dialogs/dialog-analysis-tool-chi-squared.c
@@ -115,7 +115,7 @@ calc_min_size (GnmValue *input_range)
{
int row = (input_range->v_range.cell.b.row - input_range->v_range.cell.a.row + 1);
int col = (input_range->v_range.cell.b.col - input_range->v_range.cell.a.col + 1);
-
+
return ((row < col) ? row : col);
}
@@ -202,7 +202,7 @@ dialog_chi_square_tool (WBCGtk *wbcg, Sheet *sheet, gboolean independence)
"Gnumeric_fnmath",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
diff --git a/src/dialogs/dialog-analysis-tool-frequency.c b/src/dialogs/dialog-analysis-tool-frequency.c
index d429043..742bfeb 100644
--- a/src/dialogs/dialog-analysis-tool-frequency.c
+++ b/src/dialogs/dialog-analysis-tool-frequency.c
@@ -101,7 +101,7 @@ frequency_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
return;
}
-
+
range_list_destroy (input_range);
predetermined_bins = gtk_toggle_button_get_active (
@@ -113,16 +113,16 @@ frequency_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The categories range is not valid."));
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
- return;
+ return;
}
value_release (input_range_2);
} else if (entry_to_int(state->n_entry, &the_n,FALSE) != 0 || the_n <= 0) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The number of categories is invalid."));
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
- return;
+ return;
}
-
+
if (!gnm_dao_is_ready (GNM_DAO (state->base.gdao))) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The output specification "
@@ -242,7 +242,7 @@ dialog_frequency_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnlogical",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
diff --git a/src/dialogs/dialog-analysis-tool-kaplan-meier.c b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
index 6286387..edf8188 100644
--- a/src/dialogs/dialog-analysis-tool-kaplan-meier.c
+++ b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
@@ -106,7 +106,7 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
GTK_TOGGLE_BUTTON (state->censorship_button));
groups = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (state->groups_check));
-
+
gtk_widget_set_sensitive (state->tick_button, censorship);
input_range = gnm_expr_entry_parse_as_value
@@ -120,7 +120,7 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
height = input_range->v_range.cell.b.row - input_range->v_range.cell.a.row;
width = input_range->v_range.cell.b.col - input_range->v_range.cell.a.col;
-
+
value_release (input_range);
if (width != 0) {
@@ -146,7 +146,7 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
value_release (input_range_2);
return;
- }
+ }
if (input_range_2->v_range.cell.b.row - input_range_2->v_range.cell.a.row != height) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The censorship and time columns should have the same height."));
@@ -161,7 +161,7 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
if (groups) {
input_range_2 = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->groups_input), state->base.sheet);
-
+
if (input_range_2 == NULL) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The groups column is not valid."));
@@ -174,7 +174,7 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
value_release (input_range_2);
return;
- }
+ }
if (input_range_2->v_range.cell.b.row - input_range_2->v_range.cell.a.row != height) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The groups and time columns should have the same height."));
@@ -185,7 +185,7 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
value_release (input_range_2);
}
-
+
if (!gnm_dao_is_ready (GNM_DAO (state->base.gdao))) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The output specification "
@@ -200,17 +200,17 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
return;
}
-static gboolean
+static gboolean
kaplan_meier_tool_get_groups_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
gpointer data)
{
GSList **list = data;
analysis_tools_kaplan_meier_group_t *group_item = g_new0 (analysis_tools_kaplan_meier_group_t, 1);
-
+
gtk_tree_model_get (model, iter,
GROUP_NAME, &(group_item->name),
GROUP_FROM, &(group_item->group_from),
- GROUP_TO, &(group_item->group_to),
+ GROUP_TO, &(group_item->group_to),
-1);
*list = g_slist_prepend (*list, group_item);
@@ -221,7 +221,7 @@ static GSList *
kaplan_meier_tool_get_groups (KaplanMeierToolState *state)
{
GSList *list = NULL;
-
+
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->groups_check)))
return NULL;
@@ -258,7 +258,7 @@ kaplan_meier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.range_1 = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
-
+
data->censored = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (state->censorship_button));
@@ -296,7 +296,7 @@ kaplan_meier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_kaplan_meier_engine))
gtk_widget_destroy (state->base.dialog);
-
+
return;
}
@@ -347,10 +347,10 @@ static gboolean
kaplan_meier_tool_set_censor_from_cb (G_GNUC_UNUSED GtkWidget *dummy,
KaplanMeierToolState *state)
{
- gtk_spin_button_set_range (GTK_SPIN_BUTTON (state->censor_spin_to),
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (state->censor_spin_to),
gtk_spin_button_get_value (GTK_SPIN_BUTTON (state->censor_spin_from)),G_MAXSHORT);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->censorship_button), TRUE);
-
+
return FALSE;
}
static gboolean
@@ -358,7 +358,7 @@ kaplan_meier_tool_set_censor_cb (G_GNUC_UNUSED GtkWidget *dummy,
KaplanMeierToolState *state)
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->censorship_button), TRUE);
-
+
return FALSE;
}
@@ -373,9 +373,9 @@ cb_group_name_edited (GtkCellRendererText *cell,
if (cell != NULL) {
path = gtk_tree_path_new_from_string (path_string);
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->groups_list),
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->groups_list),
&iter, path))
- gtk_list_store_set (state->groups_list, &iter,
+ gtk_list_store_set (state->groups_list, &iter,
GROUP_NAME, new_text, -1);
else
g_warning ("Did not get a valid iterator");
@@ -395,9 +395,9 @@ cb_change_to (GtkCellRendererText *cell,
if (cell != NULL) {
path = gtk_tree_path_new_from_string (path_string);
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->groups_list),
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->groups_list),
&iter, path))
- gtk_list_store_set (state->groups_list, &iter,
+ gtk_list_store_set (state->groups_list, &iter,
GROUP_TO, val, -1);
else
g_warning ("Did not get a valid iterator");
@@ -417,29 +417,29 @@ cb_change_from (GtkCellRendererText *cell,
guint val = (guint) (atoi (new_text));
guint old_to;
GtkObject *adjustment_to;
-
+
path = gtk_tree_path_new_from_string (path_string);
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->groups_list),
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->groups_list),
&iter, path))
- gtk_list_store_set (state->groups_list, &iter,
+ gtk_list_store_set (state->groups_list, &iter,
GROUP_FROM, val,
-1);
else
g_warning ("Did not get a valid iterator");
gtk_tree_path_free (path);
- gtk_tree_model_get (GTK_TREE_MODEL (state->groups_list), &iter,
- GROUP_TO, &old_to,
+ gtk_tree_model_get (GTK_TREE_MODEL (state->groups_list), &iter,
+ GROUP_TO, &old_to,
GROUP_ADJUSTMENT_TO, &adjustment_to,
-1);
if (old_to < val)
- gtk_list_store_set (state->groups_list, &iter,
+ gtk_list_store_set (state->groups_list, &iter,
GROUP_TO, val,
-1);
g_object_set (G_OBJECT (adjustment_to), "lower", (gdouble) val, NULL);
-
+
}
}
@@ -447,7 +447,7 @@ static void
cb_selection_changed (GtkTreeSelection *selection,
KaplanMeierToolState *state)
{
- gtk_widget_set_sensitive (state->remove_group_button,
+ gtk_widget_set_sensitive (state->remove_group_button,
gtk_tree_selection_get_selected (selection, NULL, NULL));
}
@@ -487,7 +487,7 @@ dialog_kaplan_meier_tool_treeview_add_item (KaplanMeierToolState *state, guint
GROUP_ADJUSTMENT_FROM, adjustment_from,
GROUP_ADJUSTMENT_TO, adjustment_to,
-1);
- g_free (name);
+ g_free (name);
}
static void
@@ -501,7 +501,7 @@ dialog_kaplan_meier_tool_setup_treeview (KaplanMeierToolState *state)
state->groups_treeview = GTK_TREE_VIEW (glade_xml_get_widget
(state->base.gui,
"groups-tree"));
- state->groups_list = gtk_list_store_new (GROUP_COLUMNS,
+ state->groups_list = gtk_list_store_new (GROUP_COLUMNS,
G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_OBJECT, G_TYPE_OBJECT);
state->groups_treeview = GTK_TREE_VIEW (gtk_tree_view_new_with_model
(GTK_TREE_MODEL (state->groups_list)));
@@ -522,14 +522,14 @@ dialog_kaplan_meier_tool_setup_treeview (KaplanMeierToolState *state)
gtk_tree_view_insert_column_with_attributes (state->groups_treeview,
-1, _("Group"),
renderer,
- "text", GROUP_NAME,
+ "text", GROUP_NAME,
NULL);
g_signal_connect (G_OBJECT (renderer), "edited",
G_CALLBACK (cb_group_name_edited), state);
renderer = gtk_cell_renderer_spin_new ();
- g_object_set (G_OBJECT (renderer), "editable", TRUE, "xalign", 1.0,
+ g_object_set (G_OBJECT (renderer), "editable", TRUE, "xalign", 1.0,
"digits", 0, NULL);
g_signal_connect (G_OBJECT (renderer), "edited",
G_CALLBACK (cb_change_from), state);
@@ -561,7 +561,7 @@ static gboolean
kaplan_meier_tool_add_group_cb (G_GNUC_UNUSED GtkWidget *dummy,
KaplanMeierToolState *state)
{
- dialog_kaplan_meier_tool_treeview_add_item
+ dialog_kaplan_meier_tool_treeview_add_item
(state, gtk_tree_model_iter_n_children (GTK_TREE_MODEL (state->groups_list),
NULL));
return FALSE;
@@ -604,7 +604,7 @@ dialog_kaplan_meier_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnlogical",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -624,7 +624,7 @@ dialog_kaplan_meier_tool (WBCGtk *wbcg, Sheet *sheet)
0))
return 0;
-
+
state->censorship_button = GTK_WIDGET (glade_xml_get_widget
(state->base.gui,
diff --git a/src/dialogs/dialog-analysis-tools.c b/src/dialogs/dialog-analysis-tools.c
index 77bd0c0..7d4c7e0 100644
--- a/src/dialogs/dialog-analysis-tools.c
+++ b/src/dialogs/dialog-analysis-tools.c
@@ -422,7 +422,7 @@ dialog_tool_init (GenericToolState *state,
tchild = (GtkTableChild *)(this_label_widget->data);
gtk_table_attach (table, GTK_WIDGET (state->input_entry),
- tchild->right_attach, tchild->right_attach + 1,
+ tchild->right_attach, tchild->right_attach + 1,
tchild->top_attach, tchild->bottom_attach,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
@@ -458,7 +458,7 @@ dialog_tool_init (GenericToolState *state,
tchild = (GtkTableChild *)(this_label_widget->data);
gtk_table_attach (table, GTK_WIDGET (state->input_entry_2),
- tchild->right_attach, tchild->right_attach + 1,
+ tchild->right_attach, tchild->right_attach + 1,
tchild->top_attach, tchild->bottom_attach,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
@@ -483,7 +483,7 @@ dialog_tool_init (GenericToolState *state,
gnumeric_keyed_dialog (wbcg, GTK_WINDOW (state->dialog), key);
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog), state->wbcg,
- GNM_DIALOG_DESTROY_SHEET_REMOVED |
+ GNM_DIALOG_DESTROY_SHEET_REMOVED |
GNM_DIALOG_DESTROY_SHEET_RENAMED);
return FALSE;
@@ -668,7 +668,7 @@ dialog_correlation_tool (WBCGtk *wbcg, Sheet *sheet)
char const * plugins[] = { "Gnumeric_fnstat",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -788,7 +788,7 @@ dialog_covariance_tool (WBCGtk *wbcg, Sheet *sheet)
char const * plugins[] = { "Gnumeric_fnstat",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -880,7 +880,7 @@ dialog_ranking_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnlookup",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -973,7 +973,7 @@ dialog_fourier_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fncomplex",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -1186,7 +1186,7 @@ dialog_descriptive_stat_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnmath",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -1555,7 +1555,7 @@ dialog_ttest_tool (WBCGtk *wbcg, Sheet *sheet, ttest_type test)
"Gnumeric_fnlogical",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -1749,7 +1749,7 @@ dialog_ftest_tool (WBCGtk *wbcg, Sheet *sheet)
char const * plugins[] = { "Gnumeric_fnstat",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -1815,8 +1815,8 @@ sampling_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
_("The input range is invalid."));
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
return;
- } else
- range_list_destroy (input_range);
+ } else
+ range_list_destroy (input_range);
err = entry_to_int (GTK_ENTRY (state->number_entry), &number, FALSE);
@@ -1826,8 +1826,8 @@ sampling_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
return;
}
-
- periodic = gtk_toggle_button_get_active
+
+ periodic = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->periodic_button));
if (periodic) {
@@ -1906,8 +1906,8 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
if (data->periodic) {
err = entry_to_int (GTK_ENTRY (state->period_entry), &data->period, TRUE);
err = entry_to_int (GTK_ENTRY (state->offset_entry), &data->offset, TRUE);
- data->row_major = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (state->row_major_button));
+ data->row_major = gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON (state->row_major_button));
} else
err = entry_to_int (GTK_ENTRY (state->random_entry), &data->size, TRUE);
@@ -1995,10 +1995,10 @@ dialog_sampling_tool (WBCGtk *wbcg, Sheet *sheet)
{
SamplingState *state;
char const * plugins[] = { "Gnumeric_fnlookup",
- "Gnumeric_fnrandom",
+ "Gnumeric_fnrandom",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -2154,7 +2154,7 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
error_in_entry ((GenericToolState *) state,
GTK_WIDGET (state->base.input_entry), text);
g_free (text);
-
+
if (data->base.range_1)
value_release (data->base.range_1);
if (data->base.range_2)
@@ -2195,7 +2195,7 @@ regression_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
return;
}
-
+
y_h = regression_tool_calc_height(input_range_2);
y_w = regression_tool_calc_width (input_range_2);
value_release (input_range_2);
@@ -2238,7 +2238,7 @@ regression_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
return;
}
-
+
if ((y_h == 1 && y_w != x_w) || (y_w == 1 && y_h != x_h)) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The sizes of the x variable and y variable ranges do not match."));
@@ -2286,7 +2286,7 @@ dialog_regression_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnstring",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -2357,21 +2357,21 @@ exp_smoothing_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
err = entry_to_float (GTK_ENTRY (state->damping_fact_entry), &data->damp_fact, TRUE);
- err = entry_to_float (GTK_ENTRY (state->g_damping_fact_entry),
+ err = entry_to_float (GTK_ENTRY (state->g_damping_fact_entry),
&data->g_damp_fact, TRUE);
- err = entry_to_float (GTK_ENTRY (state->s_damping_fact_entry),
+ err = entry_to_float (GTK_ENTRY (state->s_damping_fact_entry),
&data->s_damp_fact, TRUE);
- err = entry_to_int (GTK_ENTRY (state->s_period_entry),
+ err = entry_to_int (GTK_ENTRY (state->s_period_entry),
&data->s_period, TRUE);
- data->std_error_flag = gtk_toggle_button_get_active
+ data->std_error_flag = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->show_std_errors));
- data->show_graph = gtk_toggle_button_get_active
+ data->show_graph = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->graph_button));
data->df = gnumeric_glade_group_value (state->base.gui, n_group);
data->es_type = gnumeric_glade_group_value (state->base.gui, exp_smoothing_group);
-
+
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_exponential_smoothing_engine))
gtk_widget_destroy (state->base.dialog);
@@ -2409,7 +2409,7 @@ exp_smoothing_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
switch (gnumeric_glade_group_value (state->base.gui, exp_smoothing_group)) {
case exp_smoothing_type_mtes:
case exp_smoothing_type_ates:
- err = entry_to_float (GTK_ENTRY (state->s_damping_fact_entry),
+ err = entry_to_float (GTK_ENTRY (state->s_damping_fact_entry),
&damp_fact, FALSE);
if (err!= 0 || damp_fact < 0 || damp_fact > 1) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
@@ -2418,7 +2418,7 @@ exp_smoothing_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
return;
}
- err = entry_to_int (GTK_ENTRY (state->s_period_entry),
+ err = entry_to_int (GTK_ENTRY (state->s_period_entry),
&period, FALSE);
if (err!= 0 || period < 2) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
@@ -2429,7 +2429,7 @@ exp_smoothing_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
}
/* no break */
case exp_smoothing_type_des:
- err = entry_to_float (GTK_ENTRY (state->g_damping_fact_entry),
+ err = entry_to_float (GTK_ENTRY (state->g_damping_fact_entry),
&damp_fact, FALSE);
if (err!= 0 || damp_fact < 0 || damp_fact > 1) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
@@ -2441,7 +2441,7 @@ exp_smoothing_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
/* no break */
case exp_smoothing_type_ses_r:
case exp_smoothing_type_ses_h:
- err = entry_to_float (GTK_ENTRY (state->damping_fact_entry),
+ err = entry_to_float (GTK_ENTRY (state->damping_fact_entry),
&damp_fact, FALSE);
if (err!= 0 || damp_fact < 0 || damp_fact > 1) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
@@ -2483,10 +2483,10 @@ exp_smoothing_ses_h_cb (GtkToggleButton *togglebutton, gpointer user_data)
gtk_widget_set_sensitive (state->g_damping_fact_entry, FALSE);
gtk_widget_set_sensitive (state->s_damping_fact_entry, FALSE);
gtk_widget_set_sensitive (state->s_period_entry, FALSE);
-
+
std_error = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->show_std_errors));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->n_button), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
}
static void
@@ -2501,10 +2501,10 @@ exp_smoothing_ses_r_cb (GtkToggleButton *togglebutton, gpointer user_data)
gtk_widget_set_sensitive (state->g_damping_fact_entry, FALSE);
gtk_widget_set_sensitive (state->s_damping_fact_entry, FALSE);
gtk_widget_set_sensitive (state->s_period_entry, FALSE);
-
+
std_error = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->show_std_errors));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->nm1_button), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
}
static void
@@ -2522,7 +2522,7 @@ exp_smoothing_des_cb (GtkToggleButton *togglebutton, gpointer user_data)
std_error = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->show_std_errors));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->nm2_button), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
}
static void
@@ -2540,7 +2540,7 @@ exp_smoothing_tes_cb (GtkToggleButton *togglebutton, gpointer user_data)
std_error = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->show_std_errors));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->nm3_button), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->show_std_errors), std_error);
}
/**
@@ -2561,7 +2561,7 @@ dialog_exp_smoothing_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnlogical",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -2597,7 +2597,7 @@ dialog_exp_smoothing_tool (WBCGtk *wbcg, Sheet *sheet)
state->s_period_entry = glade_xml_get_widget (state->base.gui,
"s-period-spin");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->s_period_entry), 12.);
-
+
state->n_button = glade_xml_get_widget (state->base.gui, "n-button");
state->nm1_button = glade_xml_get_widget (state->base.gui, "nm1-button");
@@ -2606,7 +2606,7 @@ dialog_exp_smoothing_tool (WBCGtk *wbcg, Sheet *sheet)
state->show_std_errors = glade_xml_get_widget (state->base.gui, "std-errors-button");
state->graph_button = glade_xml_get_widget (state->base.gui, "graph-check");
-
+
state->ses_h_button = glade_xml_get_widget (state->base.gui, "ses-h-button");
state->ses_r_button = glade_xml_get_widget (state->base.gui, "ses-r-button");
state->des_button = glade_xml_get_widget (state->base.gui, "des-button");
@@ -2657,7 +2657,7 @@ dialog_exp_smoothing_tool (WBCGtk *wbcg, Sheet *sheet)
exp_smoothing_ses_h_cb (GTK_TOGGLE_BUTTON (state->ses_h_button), state);
exp_smoothing_tool_update_sensitivity_cb (NULL, state);
tool_load_selection ((GenericToolState *)state, TRUE);
-
+
return 0;
}
@@ -2706,7 +2706,7 @@ average_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->show_graph = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->graph_button));
data->df = gnumeric_glade_group_value (state->base.gui, n_group);
-
+
data->ma_type = gnumeric_glade_group_value (state->base.gui, moving_average_group);
switch (data->ma_type) {
@@ -2753,7 +2753,7 @@ average_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
int interval, err, offset;
GSList *input_range;
moving_average_type_t type;
-
+
input_range = gnm_expr_entry_parse_as_list (
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
@@ -2768,7 +2768,7 @@ average_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
type = gnumeric_glade_group_value (state->base.gui, moving_average_group);
if (type == moving_average_type_sma || moving_average_type_wma) {
- err = entry_to_int (GTK_ENTRY (state->interval_entry),
+ err = entry_to_int (GTK_ENTRY (state->interval_entry),
&interval, FALSE);
if (err!= 0 || interval <= 0) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
@@ -2787,7 +2787,7 @@ average_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
return;
}
}
-
+
if (!gnm_dao_is_ready (GNM_DAO (state->base.gdao))) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The output specification "
@@ -2824,7 +2824,7 @@ static void
average_tool_prior_cb (GtkToggleButton *togglebutton, gpointer user_data)
{
AverageToolState *state = (AverageToolState *)user_data;
-
+
if (gtk_toggle_button_get_active (togglebutton))
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->offset_spin), 0.0);
}
@@ -2834,7 +2834,7 @@ average_tool_interval_cb (G_GNUC_UNUSED GtkWidget *dummy, AverageToolState *stat
{
int interval;
int err;
-
+
err = entry_to_int (GTK_ENTRY (state->interval_entry), &interval, TRUE);
if (err == 0)
@@ -2848,7 +2848,7 @@ static void
average_tool_offset_cb (GtkToggleButton *togglebutton, gpointer user_data)
{
AverageToolState *state = (AverageToolState *)user_data;
-
+
gtk_widget_set_sensitive (state->offset_spin, gtk_toggle_button_get_active (togglebutton));
}
@@ -2929,7 +2929,7 @@ dialog_average_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnmath",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -2966,7 +2966,7 @@ dialog_average_tool (WBCGtk *wbcg, Sheet *sheet)
state->cma_button = glade_xml_get_widget (state->base.gui, "cma-button");
state->wma_button = glade_xml_get_widget (state->base.gui, "wma-button");
state->spencer_button = glade_xml_get_widget (state->base.gui, "spencer-ma-button");
-
+
g_signal_connect_after (G_OBJECT (state->n_button),
"toggled",
@@ -3000,7 +3000,7 @@ dialog_average_tool (WBCGtk *wbcg, Sheet *sheet)
g_signal_connect_after (G_OBJECT (state->spencer_button),
"toggled",
G_CALLBACK (average_tool_spencer_cb), state);
-
+
g_signal_connect_after (G_OBJECT (state->interval_entry),
"changed",
@@ -3051,7 +3051,7 @@ histogram_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
return;
}
-
+
range_list_destroy (input_range);
predetermined_bins = gtk_toggle_button_get_active (
@@ -3063,16 +3063,16 @@ histogram_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The cutoff range is not valid."));
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
- return;
+ return;
}
value_release (input_range_2);
} else if (entry_to_int(state->n_entry, &the_n,FALSE) != 0 || the_n <= 0) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The number of to be calculated cutoffs is invalid."));
gtk_widget_set_sensitive (state->base.ok_button, FALSE);
- return;
+ return;
}
-
+
if (!gnm_dao_is_ready (GNM_DAO (state->base.gdao))) {
gtk_label_set_text (GTK_LABEL (state->base.warning),
_("The output specification "
@@ -3196,7 +3196,7 @@ dialog_histogram_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnlookup",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -3373,7 +3373,7 @@ dialog_anova_single_factor_tool (WBCGtk *wbcg, Sheet *sheet)
char const * plugins[] = { "Gnumeric_fnstat",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
@@ -3604,7 +3604,7 @@ dialog_anova_two_factor_tool (WBCGtk *wbcg, Sheet *sheet)
"Gnumeric_fnlogical",
NULL};
- if ((wbcg == NULL) ||
+ if ((wbcg == NULL) ||
gnm_check_for_plugins_missing (plugins, wbcg_toplevel (wbcg)))
return 1;
diff --git a/src/dialogs/dialog-autofilter.c b/src/dialogs/dialog-autofilter.c
index 03852f7..ed85553 100644
--- a/src/dialogs/dialog-autofilter.c
+++ b/src/dialogs/dialog-autofilter.c
@@ -311,7 +311,7 @@ dialog_auto_filter (WBCGtk *wbcg,
is_expr ? GNUMERIC_HELP_LINK_AUTOFILTER_CUSTOM :
GNUMERIC_HELP_LINK_AUTOFILTER_TOP_TEN);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
diff --git a/src/dialogs/dialog-autoformat.c b/src/dialogs/dialog-autoformat.c
index 0bd3f13..93488fa 100644
--- a/src/dialogs/dialog-autoformat.c
+++ b/src/dialogs/dialog-autoformat.c
@@ -340,7 +340,7 @@ previews_load (AutoFormatState *state, int topindex)
style->line.width = 3.;
style->line.color = GO_COLOR_RED;
style->fill.pattern.back = 0;
-
+
gtk_frame_set_shadow_type (state->frame[i], GTK_SHADOW_IN);
} else
gtk_frame_set_shadow_type (state->frame[i], GTK_SHADOW_ETCHED_IN);
diff --git a/src/dialogs/dialog-cell-comment.c b/src/dialogs/dialog-cell-comment.c
index 81d968e..e7fb115 100644
--- a/src/dialogs/dialog-cell-comment.c
+++ b/src/dialogs/dialog-cell-comment.c
@@ -69,12 +69,12 @@ cb_cell_comment_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
PangoAttrList *attr;
char const *author;
- author = gtk_entry_get_text
- (GTK_ENTRY (glade_xml_get_widget
+ author = gtk_entry_get_text
+ (GTK_ENTRY (glade_xml_get_widget
(state->gui, "new-author-entry")));
- g_object_get (G_OBJECT (state->gtv), "text", &text,
+ g_object_get (G_OBJECT (state->gtv), "text", &text,
"attributes", &attr, NULL);
- if (!cmd_set_comment (WORKBOOK_CONTROL (state->wbcg),
+ if (!cmd_set_comment (WORKBOOK_CONTROL (state->wbcg),
state->sheet, state->pos, text, attr, author))
gtk_widget_destroy (state->dialog);
g_free (text);
@@ -85,7 +85,7 @@ static void
cb_wrap_toggled (GtkToggleButton *button, GObject *gtv)
{
g_object_set (gtv, "wrap",
- gtk_toggle_button_get_active (button) ? GTK_WRAP_WORD : GTK_WRAP_NONE,
+ gtk_toggle_button_get_active (button) ? GTK_WRAP_WORD : GTK_WRAP_NONE,
NULL);
}
@@ -126,9 +126,9 @@ dialog_cell_comment (WBCGtk *wbcg, Sheet *sheet, GnmCellPos const *pos)
g_return_if_fail (box != NULL);
state->gtv = gnm_text_view_new ();
gtk_widget_show_all (GTK_WIDGET (state->gtv));
- gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (state->gtv),
+ gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (state->gtv),
TRUE, TRUE, TRUE);
- g_object_set (state->gtv, "wrap", GTK_WRAP_WORD, NULL);
+ g_object_set (state->gtv, "wrap", GTK_WRAP_WORD, NULL);
gnm_cellref_init (&ref, sheet, pos->col, pos->row, FALSE);
out.accum = g_string_new (NULL);
@@ -151,8 +151,8 @@ dialog_cell_comment (WBCGtk *wbcg, Sheet *sheet, GnmCellPos const *pos)
if (comment) {
char const *text;
PangoAttrList *attr;
- g_object_get (G_OBJECT (comment), "text", &text,
- "markup", &attr, NULL);
+ g_object_get (G_OBJECT (comment), "text", &text,
+ "markup", &attr, NULL);
g_object_set (state->gtv, "text", text,
"attributes", attr, NULL);
if (attr != NULL)
@@ -162,13 +162,13 @@ dialog_cell_comment (WBCGtk *wbcg, Sheet *sheet, GnmCellPos const *pos)
if (text != NULL)
gtk_label_set_text (GTK_LABEL (old_author),
text);
- title = g_strdup_printf (_("Edit Cell Comment (%s)"),
+ title = g_strdup_printf (_("Edit Cell Comment (%s)"),
cell_name);
} else {
- title = g_strdup_printf (_("New Cell Comment (%s)"),
+ title = g_strdup_printf (_("New Cell Comment (%s)"),
cell_name);
gtk_widget_hide (old_author);
- gtk_widget_hide (glade_xml_get_widget (state->gui,
+ gtk_widget_hide (glade_xml_get_widget (state->gui,
"old-author-label"));
}
gtk_window_set_title (GTK_WINDOW (state->dialog), title);
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index fd851d7..9fff531 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -389,7 +389,7 @@ setup_color_pickers (FormatState *state,
}
cg = go_color_group_fetch (color_group,
wb_control_view (WORKBOOK_CONTROL (state->wbcg)));
- combo = go_combo_color_new (NULL, default_caption,
+ combo = go_combo_color_new (NULL, default_caption,
def_sc ? def_sc->go_color : GO_COLOR_BLACK, cg);
go_combo_box_set_title (GO_COMBO_BOX (combo), caption);
@@ -1291,7 +1291,7 @@ draw_border_preview (FormatState *state)
points->points[j].y = corners[i][k--] + .5;
points->points[j].x = corners[i][k--] + .5;
}
-
+
style = go_styled_object_get_style (GO_STYLED_OBJECT (
goc_item_new (group,
@@ -1336,7 +1336,7 @@ draw_border_preview (FormatState *state)
(*func) (state->border.lines[j]);
}
}
-
+
fmt_dialog_changed (state);
}
@@ -1528,7 +1528,7 @@ fmt_dialog_init_protection_page (FormatState *state)
G_CALLBACK (cb_protection_hidden_toggle), state);
state->protection.sheet_protected_changed = FALSE;
- flag = state->sheet->is_protected;
+ flag = state->sheet->is_protected;
w = glade_xml_get_widget (state->gui, "protection_sheet_protected");
state->protection.sheet_protected = GTK_CHECK_BUTTON (w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), flag);
@@ -1949,27 +1949,27 @@ fmt_dialog_init_input_msg_page (FormatState *state)
/*****************************************************************************/
static void
-fmt_dialog_conditions_page_load_cond_single_f (FormatState *state,
+fmt_dialog_conditions_page_load_cond_single_f (FormatState *state,
GnmExprTop const *texpr, GtkTreeIter *iter1)
{
char *formula;
GnmParsePos pp;
GtkTreeIter iter2;
-
+
gtk_tree_store_append (state->conditions.model, &iter2, iter1);
- parse_pos_init (&pp, wb_control_get_workbook (WORKBOOK_CONTROL (state->wbcg)),
+ parse_pos_init (&pp, wb_control_get_workbook (WORKBOOK_CONTROL (state->wbcg)),
state->sheet, 0, 0);
formula = gnm_expr_top_as_string (texpr, &pp, gnm_conventions_default);
- gtk_tree_store_set (state->conditions.model, &iter2, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter2, CONDITIONS_RANGE, NULL,
CONDITIONS_COND, formula, -1);
g_free (formula);
}
static void
-fmt_dialog_conditions_page_load_cond_double_f (FormatState *state,
+fmt_dialog_conditions_page_load_cond_double_f (FormatState *state,
GnmStyleCond const *cond, GtkTreeIter *iter1)
{
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], iter1);
@@ -1977,58 +1977,58 @@ fmt_dialog_conditions_page_load_cond_double_f (FormatState *state,
}
static void
-fmt_dialog_conditions_page_load_cond (FormatState *state, GnmStyleCond const *cond,
+fmt_dialog_conditions_page_load_cond (FormatState *state, GnmStyleCond const *cond,
GtkTreeIter *iter)
{
GtkTreeIter iter1;
-
+
gtk_tree_store_append (state->conditions.model, &iter1, iter);
switch (cond->op) {
case GNM_STYLE_COND_BETWEEN:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is between these "
"two values, a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_double_f (state, cond, &iter1);
break;
case GNM_STYLE_COND_NOT_BETWEEN:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is not between these"
" two values, a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_double_f (state, cond, &iter1);
break;
case GNM_STYLE_COND_EQUAL:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is equal to this value"
", a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_NOT_EQUAL:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is not equal to this value"
", a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_GT:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is > this value, a "
"special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_LT:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is < this value, a "
"special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_GTE:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is \xe2\x89\xa7 this "
"value, a special style is used."), -1);
@@ -2036,7 +2036,7 @@ fmt_dialog_conditions_page_load_cond (FormatState *state, GnmStyleCond const *co
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_LTE:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is \xe2\x89\xa6 this "
"value, a special style is used."), -1);
@@ -2044,80 +2044,80 @@ fmt_dialog_conditions_page_load_cond (FormatState *state, GnmStyleCond const *co
break;
case GNM_STYLE_COND_CUSTOM:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If this formula evaluates to TRUE, a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_CONTAINS_STR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content contains this string"
", a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_NOT_CONTAINS_STR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content does not contain this string"
", a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_BEGINS_WITH_STR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content begins with this string"
", a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_NOT_BEGINS_WITH_STR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content does not begin with this string,"
" a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_ENDS_WITH_STR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content ends with this string"
", a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_NOT_ENDS_WITH_STR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content does not end "
"with this string, a special style is used."), -1);
fmt_dialog_conditions_page_load_cond_single_f (state, cond->texpr[0], &iter1);
break;
case GNM_STYLE_COND_CONTAINS_ERR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell contains an error "
"value, a special style is used."), -1);
break;
case GNM_STYLE_COND_NOT_CONTAINS_ERR:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell does not contain an error value"
", a special style is used."), -1);
break;
case GNM_STYLE_COND_CONTAINS_BLANKS:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content is \xe2\x89\xa6 this "
"contains blanks, a special style is used."), -1);
break;
case GNM_STYLE_COND_NOT_CONTAINS_BLANKS:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
CONDITIONS_COND,
_("If the cell content does not contain blanks"
", a special style is used."), -1);
break;
default:
- gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
- CONDITIONS_COND,
+ gtk_tree_store_set (state->conditions.model, &iter1, CONDITIONS_RANGE, NULL,
+ CONDITIONS_COND,
_("This is an unknown condition type."), -1);
return;
}
@@ -2136,18 +2136,18 @@ fmt_dialog_conditions_page_load_conditions (GnmStyle *style, char const *range,
else {
iter = &iter1;
gtk_tree_store_append (state->conditions.model, iter, NULL);
- gtk_tree_store_set (state->conditions.model, iter, CONDITIONS_RANGE, range,
- CONDITIONS_COND, NULL, -1);
+ gtk_tree_store_set (state->conditions.model, iter, CONDITIONS_RANGE, range,
+ CONDITIONS_COND, NULL, -1);
}
-
+
if (gnm_style_is_element_set (style, MSTYLE_CONDITIONS) &&
NULL != (sc = gnm_style_get_conditions (style)) &&
NULL != (conds = gnm_style_conditions_details (sc)))
for (i = 0 ; i < conds->len ; i++)
- fmt_dialog_conditions_page_load_cond
- (state, &g_array_index (conds,
- GnmStyleCond,
+ fmt_dialog_conditions_page_load_cond
+ (state, &g_array_index (conds,
+ GnmStyleCond,
i), iter);
}
@@ -2161,11 +2161,11 @@ fmt_dialog_condition_collector (SheetView *sv, GnmRange const *range, gpointer u
for (l = list; l != NULL; l = l->next) {
GnmStyleRegion const *sr = l->data;
GnmRange r = *((GnmRange *) l->data);
- r.start.row += range->start.row;
- r.end.row += range->start.row;
- r.start.col += range->start.col;
- r.end.col += range->start.col;
- fmt_dialog_conditions_page_load_conditions
+ r.start.row += range->start.row;
+ r.end.row += range->start.row;
+ r.start.col += range->start.col;
+ r.end.col += range->start.col;
+ fmt_dialog_conditions_page_load_conditions
(sr->style, range_as_string (&r), state);
}
@@ -2183,19 +2183,19 @@ fmt_dialog_init_conditions_page (FormatState *state)
g_return_if_fail (state != NULL);
- state->conditions.add = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ state->conditions.add = GTK_BUTTON (glade_xml_get_widget (state->gui,
"conditions_add"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.add), FALSE);
- state->conditions.remove = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ state->conditions.remove = GTK_BUTTON (glade_xml_get_widget (state->gui,
"conditions_remove"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.remove), FALSE);
- state->conditions.clear = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ state->conditions.clear = GTK_BUTTON (glade_xml_get_widget (state->gui,
"conditions_clear"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.clear), FALSE);
- state->conditions.expand = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ state->conditions.expand = GTK_BUTTON (glade_xml_get_widget (state->gui,
"conditions_expand"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.expand), FALSE);
- state->conditions.edit = GTK_BUTTON (glade_xml_get_widget (state->gui,
+ state->conditions.edit = GTK_BUTTON (glade_xml_get_widget (state->gui,
"conditions_edit"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.edit), FALSE);
@@ -2206,29 +2206,29 @@ fmt_dialog_init_conditions_page (FormatState *state)
gtk_tree_view_set_fixed_height_mode (treeview, FALSE);
gtk_tree_view_set_model (treeview, GTK_TREE_MODEL (state->conditions.model));
renderer = gtk_cell_renderer_text_new ();
- column = gtk_tree_view_column_new_with_attributes
+ column = gtk_tree_view_column_new_with_attributes
("Range", renderer, "text", CONDITIONS_RANGE, NULL);
gtk_tree_view_insert_column (treeview, column, -1);
renderer = gtk_cell_renderer_text_new ();
- column = gtk_tree_view_column_new_with_attributes
+ column = gtk_tree_view_column_new_with_attributes
("Conditions", renderer, "text", CONDITIONS_COND, NULL);
gtk_tree_view_insert_column (treeview, column, -1);
gtk_tree_view_set_expander_column (treeview, column);
- state->conditions.label = GTK_LABEL (glade_xml_get_widget (state->gui,
+ state->conditions.label = GTK_LABEL (glade_xml_get_widget (state->gui,
"conditions_label"));
if (state->conflicts & (1 << MSTYLE_CONDITIONS)) {
- gtk_label_set_markup (state->conditions.label,
+ gtk_label_set_markup (state->conditions.label,
"The selection is <b>not</b> homogeneous "
"with respect to conditions!");
(void) sv_selection_foreach (state->sv,
fmt_dialog_condition_collector, state);
} else {
- gtk_label_set_markup (state->conditions.label,
+ gtk_label_set_markup (state->conditions.label,
"The selection is homogeneous with "
"respect to conditions.");
if (state->style != NULL)
- fmt_dialog_conditions_page_load_conditions
+ fmt_dialog_conditions_page_load_conditions
(state->style, NULL, state);
gtk_tree_view_expand_all (treeview);
}
@@ -2607,7 +2607,7 @@ fmt_dialog_impl (FormatState *state, FormatDialogPosition_t pageno)
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (dialog), state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
-
+
/* Ok, edit events from now on are real */
state->enable_edit = TRUE;
diff --git a/src/dialogs/dialog-cell-sort.c b/src/dialogs/dialog-cell-sort.c
index 5ea1d2b..e8a2fef 100644
--- a/src/dialogs/dialog-cell-sort.c
+++ b/src/dialogs/dialog-cell-sort.c
@@ -1051,7 +1051,7 @@ dialog_init (SortFlowState *state)
"clicked",
G_CALLBACK (cb_dialog_cancel_clicked), state);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
diff --git a/src/dialogs/dialog-col-width.c b/src/dialogs/dialog-col-width.c
index 3c65859..8050445 100644
--- a/src/dialogs/dialog-col-width.c
+++ b/src/dialogs/dialog-col-width.c
@@ -302,7 +302,7 @@ dialog_col_width (WBCGtk *wbcg, gboolean use_default)
glade_xml_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_COL_WIDTH);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
dialog_col_width_set_mode (use_default, state);
diff --git a/src/dialogs/dialog-consolidate.c b/src/dialogs/dialog-consolidate.c
index bf87082..331f7df 100644
--- a/src/dialogs/dialog-consolidate.c
+++ b/src/dialogs/dialog-consolidate.c
@@ -63,14 +63,14 @@ typedef struct {
GtkTreeModel *source_areas;
GnumericCellRendererExprEntry *cellrenderer;
GdkPixbuf *pixmap;
-
+
GtkButton *clear;
GtkButton *delete;
-
+
GtkCheckButton *labels_row;
GtkCheckButton *labels_col;
GtkCheckButton *labels_copy;
-
+
int areas_index; /* Select index in sources clist */
char *construct_error; /* If set an error occurred in construct_consolidate */
} ConsolidateState;
@@ -80,7 +80,7 @@ static void dialog_set_button_sensitivity (G_GNUC_UNUSED GtkWidget *dummy,
/**
* adjust_source_areas
- *
+ *
* ensures that we have exactly 2 empty rows
*
*
@@ -91,20 +91,20 @@ adjust_source_areas (ConsolidateState *state)
int i = 0;
int cnt_empty = 2;
GtkTreeIter iter;
-
- if (gtk_tree_model_get_iter_first
+
+ if (gtk_tree_model_get_iter_first
(state->source_areas, &iter)) {
do {
char *source;
- gtk_tree_model_get (state->source_areas,
+ gtk_tree_model_get (state->source_areas,
&iter,
SOURCE_COLUMN, &source,
-1);
if (strlen(source) == 0)
cnt_empty--;
g_free (source);
- } while (gtk_tree_model_iter_next
+ } while (gtk_tree_model_iter_next
(state->source_areas,&iter));
} else {
g_warning ("Did not get a valid iterator");
@@ -174,19 +174,19 @@ construct_consolidate (ConsolidateState *state, data_analysis_output_t *dao)
(state->source_areas,
NULL)> 2, NULL);
- has_iter = gtk_tree_model_get_iter_first (state->source_areas,
+ has_iter = gtk_tree_model_get_iter_first (state->source_areas,
&iter);
g_return_val_if_fail (has_iter, NULL);
do {
char *source;
- gtk_tree_model_get (state->source_areas,
+ gtk_tree_model_get (state->source_areas,
&iter,
SOURCE_COLUMN, &source,
-1);
if (strlen(source) != 0) {
range_value = value_new_cellrange_str (state->base.sheet, source);
-
+
if (range_value == NULL) {
state->construct_error = g_strdup_printf (
_("Specification %s "
@@ -207,7 +207,7 @@ construct_consolidate (ConsolidateState *state, data_analysis_output_t *dao)
}
}
g_free (source);
- } while (gtk_tree_model_iter_next
+ } while (gtk_tree_model_iter_next
(state->source_areas,&iter));
return cs;
@@ -241,7 +241,7 @@ cb_selection_changed (G_GNUC_UNUSED GtkTreeSelection *ignored,
GtkTreeIter iter;
GtkTreeSelection *selection = gtk_tree_view_get_selection (state->source_view);
- gtk_widget_set_sensitive (GTK_WIDGET(state->delete),
+ gtk_widget_set_sensitive (GTK_WIDGET(state->delete),
gtk_tree_selection_get_selected (selection, NULL, &iter));
}
@@ -258,7 +258,7 @@ cb_source_edited (G_GNUC_UNUSED GtkCellRendererText *cell,
path = gtk_tree_path_new_from_string (path_string);
if (gtk_tree_model_get_iter (state->source_areas, &iter, path))
- gtk_list_store_set (GTK_LIST_STORE(state->source_areas),
+ gtk_list_store_set (GTK_LIST_STORE(state->source_areas),
&iter, SOURCE_COLUMN, new_text, -1);
else
g_warning ("Did not get a valid iterator");
@@ -291,10 +291,10 @@ cb_consolidate_ok_clicked (GtkWidget *button, ConsolidateState *state)
if (state->base.warning_dialog != NULL)
gtk_widget_destroy (state->base.warning_dialog);
-
+
dao = parse_output ((GenericToolState *)state, NULL);
cs = construct_consolidate (state, dao);
-
+
/*
* If something went wrong consolidate_construct
* return NULL and sets the state->construct_error to
@@ -308,10 +308,10 @@ cb_consolidate_ok_clicked (GtkWidget *button, ConsolidateState *state)
g_free (state->construct_error);
g_free (dao);
state->construct_error = NULL;
-
+
return;
}
-
+
if (consolidate_check_destination (cs, dao)) {
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
@@ -349,7 +349,7 @@ cb_clear_clicked (G_GNUC_UNUSED GtkButton *button,
state->cellrenderer);
gtk_list_store_clear (GTK_LIST_STORE(state->source_areas));
- adjust_source_areas (state);
+ adjust_source_areas (state);
dialog_set_button_sensitivity (NULL, state);
}
@@ -359,7 +359,7 @@ cb_delete_clicked (G_GNUC_UNUSED GtkButton *button,
ConsolidateState *state)
{
GtkTreeIter sel_iter;
- GtkTreeSelection *selection =
+ GtkTreeSelection *selection =
gtk_tree_view_get_selection (state->source_view);
if (state->cellrenderer->entry)
@@ -409,23 +409,23 @@ setup_widgets (ConsolidateState *state, GladeXML *glade_gui)
gtk_combo_box_set_active (state->function, 0);
/* Begin: Source Areas View*/
- state->source_view = GTK_TREE_VIEW (glade_xml_get_widget
- (glade_gui,
+ state->source_view = GTK_TREE_VIEW (glade_xml_get_widget
+ (glade_gui,
"source_treeview"));
- state->source_areas = GTK_TREE_MODEL(gtk_list_store_new
- (NUM_COLMNS,
- G_TYPE_STRING,
+ state->source_areas = GTK_TREE_MODEL(gtk_list_store_new
+ (NUM_COLMNS,
+ G_TYPE_STRING,
GDK_TYPE_PIXBUF,
G_TYPE_INT));
- gtk_tree_view_set_model (state->source_view,
+ gtk_tree_view_set_model (state->source_view,
state->source_areas);
-
- selection = gtk_tree_view_get_selection
+
+ selection = gtk_tree_view_get_selection
(state->source_view );
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
-
+
renderer = gnumeric_cell_renderer_expr_entry_new (state->base.wbcg);
- state->cellrenderer =
+ state->cellrenderer =
GNUMERIC_CELL_RENDERER_EXPR_ENTRY (renderer);
column = gtk_tree_view_column_new_with_attributes
("", renderer,
@@ -436,8 +436,8 @@ setup_widgets (ConsolidateState *state, GladeXML *glade_gui)
G_CALLBACK (cb_source_edited), state);
gtk_tree_view_column_set_expand (column, TRUE);
gtk_tree_view_append_column (state->source_view, column);
- column = gtk_tree_view_column_new_with_attributes
- ("", gtk_cell_renderer_pixbuf_new (),
+ column = gtk_tree_view_column_new_with_attributes
+ ("", gtk_cell_renderer_pixbuf_new (),
"pixbuf", PIXMAP_COLUMN, NULL);
gtk_tree_view_append_column (state->source_view, column);
/* End: Source Areas View*/
@@ -472,7 +472,7 @@ add_source_area (SheetView *sv, GnmRange const *r, gpointer closure)
ConsolidateState *state = closure;
char *range_name = global_range_name (sv_sheet (sv), r);
GtkTreeIter iter;
-
+
gtk_list_store_prepend (GTK_LIST_STORE(state->source_areas),
&iter);
gtk_list_store_set (GTK_LIST_STORE(state->source_areas),
@@ -501,7 +501,7 @@ dialog_consolidate_tool_init (ConsolidateState *state)
state->areas_index = -1;
setup_widgets (state, state->base.gui);
- state->pixmap = gtk_widget_render_icon
+ state->pixmap = gtk_widget_render_icon
(GTK_WIDGET(state->base.dialog),
"Gnumeric_ExprEntry",
GTK_ICON_SIZE_LARGE_TOOLBAR,
@@ -515,7 +515,7 @@ dialog_consolidate_tool_init (ConsolidateState *state)
* When there are non-singleton selections add them all to the
* source range list for convenience
*/
- if ((r = selection_first_range (state->base.sv, NULL, NULL)) != NULL
+ if ((r = selection_first_range (state->base.sv, NULL, NULL)) != NULL
&& !range_is_singleton (r))
sv_selection_foreach (state->base.sv, &add_source_area, state);
@@ -548,13 +548,13 @@ dialog_consolidate (WBCGtk *wbcg)
"consolidate.glade", "Consolidate",
_("Could not create the Consolidate dialog."),
CONSOLIDATE_KEY,
- G_CALLBACK (cb_consolidate_ok_clicked),
+ G_CALLBACK (cb_consolidate_ok_clicked),
NULL,
G_CALLBACK (dialog_set_button_sensitivity),
0))
return;
- gnm_dao_set_put (GNM_DAO (state->base.gdao), TRUE, TRUE);
+ gnm_dao_set_put (GNM_DAO (state->base.gdao), TRUE, TRUE);
dialog_consolidate_tool_init (state);
gtk_widget_show (GTK_WIDGET (state->base.dialog));
}
diff --git a/src/dialogs/dialog-define-names.c b/src/dialogs/dialog-define-names.c
index 531be90..a832037 100644
--- a/src/dialogs/dialog-define-names.c
+++ b/src/dialogs/dialog-define-names.c
@@ -194,25 +194,25 @@ name_guru_update_sensitivity (NameGuruState *state, gboolean update_entries)
**/
sheet_scope = name_guru_scope_is_sheet (state);
-
+
in_list = name_guru_in_list (state, name, TRUE, sheet_scope);
-
+
if (in_list != NULL) {
delete = delete && !in_list->is_permanent;
clear_selection = FALSE;
} else
add = TRUE;
-
+
update = !add && in_list->is_editable;
}
-
+
if (switchscope) {
GnmNamedExpr const *nexpr = state->cur_name;
-
- if (nexpr != NULL )
- switchscope = !nexpr->is_permanent &&
- (NULL == name_guru_in_list (state, expr_name_name (nexpr),
- TRUE, (nexpr->pos.sheet == NULL)));
+
+ if (nexpr != NULL )
+ switchscope = !nexpr->is_permanent &&
+ (NULL == name_guru_in_list (state, expr_name_name (nexpr),
+ TRUE, (nexpr->pos.sheet == NULL)));
}
gtk_widget_set_sensitive (state->delete_button, delete);
@@ -358,7 +358,7 @@ name_guru_switchscope (NameGuruState *state)
g_return_if_fail (nexpr != NULL);
g_return_if_fail (!nexpr->is_permanent);
-
+
expr_name_set_scope (state->cur_name,
(nexpr->pos.sheet == NULL) ?
state->sheet : NULL);
diff --git a/src/dialogs/dialog-delete-cells.c b/src/dialogs/dialog-delete-cells.c
index 6cbce59..d81a026 100644
--- a/src/dialogs/dialog-delete-cells.c
+++ b/src/dialogs/dialog-delete-cells.c
@@ -164,7 +164,7 @@ dialog_delete_cells (WBCGtk *wbcg)
g_signal_connect (G_OBJECT (w), "clicked",
G_CALLBACK (cb_delete_cell_cancel_clicked), state);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
@@ -172,10 +172,10 @@ dialog_delete_cells (WBCGtk *wbcg)
glade_xml_get_widget (state->gui, "helpbutton"),
GNUMERIC_HELP_LINK_DELETE_CELLS);
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (glade_xml_get_widget
- (state->gui, cols < rows
- ? "radio_0" : "radio_1")),
+ gtk_toggle_button_set_active
+ (GTK_TOGGLE_BUTTON (glade_xml_get_widget
+ (state->gui, cols < rows
+ ? "radio_0" : "radio_1")),
TRUE);
wbc_gtk_attach_guru (state->wbcg, state->dialog);
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index 0b5ac4e..7bacb24 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -83,7 +83,7 @@ typedef struct {
GtkCheckButton *group_read;
GtkCheckButton *group_write;
-
+
GtkCheckButton *others_read;
GtkCheckButton *others_write;
@@ -106,7 +106,7 @@ typedef struct {
GtkListStore *ppt_name_store;
GtkEntry *ppt_value;
GtkEntry *ppt_link;
-
+
GtkButton *add_button;
GtkButton *remove_button;
GtkButton *apply_button;
@@ -118,7 +118,7 @@ typedef struct {
} DialogDocMetaData;
/******************************************************************************
- * G_VALUE TRANSFORM FUNCTIONS
+ * G_VALUE TRANSFORM FUNCTIONS
******************************************************************************/
/*
@@ -204,7 +204,7 @@ cb_dialog_doc_metadata_change_permission (GtkCheckButton *bt,
state->file_permissions->others_write = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (bt));
else
return;
-
+
state->permissions_changed = TRUE;
}
@@ -229,7 +229,7 @@ dialog_doc_metadata_set_up_permissions (DialogDocMetaData *state)
/* Group */
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->group_read),
state->file_permissions->group_read);
-
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->group_write),
state->file_permissions->group_write);
@@ -240,7 +240,7 @@ dialog_doc_metadata_set_up_permissions (DialogDocMetaData *state)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->others_write),
state->file_permissions->others_write);
}
-
+
/* At this moment we don't let user change file permissions */
gtk_widget_set_sensitive (GTK_WIDGET (state->owner_read), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (state->owner_write), FALSE);
@@ -259,7 +259,7 @@ time2str (time_t t)
if (t == -1)
return NULL;
-
+
len = strftime (buffer, sizeof (buffer), format, localtime (&t));
if (len == 0)
return NULL;
@@ -268,7 +268,7 @@ time2str (time_t t)
}
/* @auto_fill : if TRUE and the text is NULL, try to set the label text with an automatic value. */
-static void
+static void
dialog_doc_metadata_set_label (DialogDocMetaData *state,
GtkLabel *label,
char const *text,
@@ -322,7 +322,7 @@ dialog_doc_metadata_set_label (DialogDocMetaData *state,
else if (label == state->sheets) {
str_value = g_strdup_printf ("%d", workbook_sheet_count (wb));
}
-
+
/* Number of cells */
else if (label == state->cells) {
/* Nothing to do ATM */
@@ -377,7 +377,7 @@ dialog_doc_metadata_init_file_page (DialogDocMetaData *state)
"toggled",
G_CALLBACK (cb_dialog_doc_metadata_change_permission),
state);
-
+
g_signal_connect (G_OBJECT (state->group_write),
"toggled",
G_CALLBACK (cb_dialog_doc_metadata_change_permission),
@@ -388,7 +388,7 @@ dialog_doc_metadata_init_file_page (DialogDocMetaData *state)
"toggled",
G_CALLBACK (cb_dialog_doc_metadata_change_permission),
state);
-
+
g_signal_connect (G_OBJECT (state->others_write),
"toggled",
G_CALLBACK (cb_dialog_doc_metadata_change_permission),
@@ -405,7 +405,7 @@ dialog_doc_metadata_init_file_page (DialogDocMetaData *state)
}
/******************************************************************************
- * FUNCTIONS RELATED TO 'DESCRIPTION' PAGE
+ * FUNCTIONS RELATED TO 'DESCRIPTION' PAGE
******************************************************************************/
/* @activate_property : if TRUE, sets the tree view row which was added active. */
@@ -427,7 +427,7 @@ dialog_doc_metadata_add_prop (DialogDocMetaData *state,
/* Append new values in tree view */
gtk_tree_store_append (state->properties_store, &tree_iter, NULL);
- gtk_tree_store_set (state->properties_store,
+ gtk_tree_store_set (state->properties_store,
&tree_iter,
0, name,
1, value,
@@ -436,7 +436,7 @@ dialog_doc_metadata_add_prop (DialogDocMetaData *state,
/* Append new values in combo box */
gtk_list_store_append (state->ppt_name_store, &list_iter);
- gtk_list_store_set (state->ppt_name_store,
+ gtk_list_store_set (state->ppt_name_store,
&list_iter,
0, name,
-1);
@@ -459,7 +459,7 @@ dialog_doc_metadata_get_gsf_prop_val_type (DialogDocMetaData *state,
/* First we try the clean way */
prop = gsf_doc_meta_data_lookup (state->metadata, name);
- if (prop != NULL)
+ if (prop != NULL)
value = (GValue *) gsf_doc_prop_get_val (prop);
if (value != NULL) {
@@ -472,7 +472,7 @@ dialog_doc_metadata_get_gsf_prop_val_type (DialogDocMetaData *state,
/* Just leave it as is */
break;
- case G_TYPE_BOXED:
+ case G_TYPE_BOXED:
{
/* Check if it is really a GsfTimeStamp */
GsfTimestamp *timestamp;
@@ -504,11 +504,11 @@ dialog_doc_metadata_get_gsf_prop_val_type (DialogDocMetaData *state,
/* Anything else is invalid */
{
val_type = G_TYPE_INVALID;
-
+
break;
}
}
- }
+ }
else {
/* FIXME: At this moment, we will assume a G_TYPE_STRING */
val_type = G_TYPE_STRING;
@@ -573,9 +573,9 @@ dialog_doc_metadata_set_gsf_prop (DialogDocMetaData *state,
if (existing_prop != NULL) {
gboolean link_changed;
gboolean value_changed = TRUE;
-
+
link_changed = ((link != NULL && *link != 0) && !(existing_link != NULL && *existing_link != 0))
- || (!(link != NULL && *link != 0) && (existing_link != NULL && *existing_link != 0))
+ || (!(link != NULL && *link != 0) && (existing_link != NULL && *existing_link != 0))
|| !((link == NULL && existing_link == NULL) || (0 == strcmp (link, existing_link)));
if (existing_value == NULL)
value_changed = ((value != NULL) && (*value != 0));
@@ -585,14 +585,14 @@ dialog_doc_metadata_set_gsf_prop (DialogDocMetaData *state,
!(value == NULL || *value == 0)) ||
(!(existing_val_str == NULL || *existing_val_str == 0) &&
(value == NULL || *value == 0)) ||
- !((existing_val_str == NULL && value == NULL) ||
+ !((existing_val_str == NULL && value == NULL) ||
0 == strcmp (existing_val_str, value));
if (!link_changed && !value_changed)
return;
}
}
-
+
/* Create a new GsfDocProp */
doc_prop = gsf_doc_prop_new (g_strdup (name));
@@ -610,7 +610,7 @@ dialog_doc_metadata_set_gsf_prop (DialogDocMetaData *state,
if (link != NULL)
gsf_doc_prop_set_link (doc_prop, g_strdup (link));
- cmd_change_meta_data (WORKBOOK_CONTROL (state->wbcg),
+ cmd_change_meta_data (WORKBOOK_CONTROL (state->wbcg),
g_slist_prepend (NULL, doc_prop), NULL);
}
@@ -628,7 +628,7 @@ dialog_doc_metadata_set_gsf_prop (DialogDocMetaData *state,
static void
dialog_doc_metadata_set_prop (DialogDocMetaData *state,
const gchar *prop_name,
- const gchar *prop_value,
+ const gchar *prop_value,
const gchar *link_value)
{
GtkTreeIter tree_iter;
@@ -636,7 +636,7 @@ dialog_doc_metadata_set_prop (DialogDocMetaData *state,
GValue *value;
gboolean ret;
gboolean found;
-
+
g_return_if_fail (state->metadata != NULL);
found = FALSE;
@@ -648,7 +648,7 @@ dialog_doc_metadata_set_prop (DialogDocMetaData *state,
&tree_iter);
while (ret == TRUE) {
-
+
gtk_tree_model_get_value (GTK_TREE_MODEL (state->properties_store),
&tree_iter,
0,
@@ -656,13 +656,13 @@ dialog_doc_metadata_set_prop (DialogDocMetaData *state,
if (strcmp (prop_name, g_value_get_string (value)) == 0) {
/* Set new value */
- gtk_tree_store_set (state->properties_store,
+ gtk_tree_store_set (state->properties_store,
&tree_iter,
1, prop_value,
-1);
if (link_value != NULL)
- gtk_tree_store_set (state->properties_store,
+ gtk_tree_store_set (state->properties_store,
&tree_iter,
2, link_value,
-1);
@@ -709,7 +709,7 @@ dialog_doc_metadata_set_prop (DialogDocMetaData *state,
}
/**
- * CALLBACKS for 'Description' page entries
+ * CALLBACKS for 'Description' page entries
**/
static gboolean
cb_dialog_doc_metadata_title_changed (GtkEntry *entry,
@@ -881,7 +881,7 @@ dialog_doc_metadata_init_description_page (DialogDocMetaData *state)
/**
* cb_dialog_doc_metadata_add_clicked
*
- * @w : widget
+ * @w : widget
* @state : dialog main struct
*
* Adds a new "empty" property to the tree view.
@@ -977,7 +977,7 @@ dialog_doc_metadata_update_prop (DialogDocMetaData *state,
}
else if (strcmp (prop_name, GSF_META_NAME_DESCRIPTION) == 0) {
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (state->comments),
+ gtk_text_buffer_set_text (gtk_text_view_get_buffer (state->comments),
prop_value,
-1);
}
@@ -986,7 +986,7 @@ dialog_doc_metadata_update_prop (DialogDocMetaData *state,
/**
* cb_dialog_doc_metadata_remove_clicked
*
- * @remove_bt : widget
+ * @remove_bt : widget
* @state : dialog main struct
*
* Removes a property from the tree view and updates all the dialog and
@@ -1013,7 +1013,7 @@ cb_dialog_doc_metadata_remove_clicked (GtkWidget *remove_bt,
path = gtk_tree_model_get_path (GTK_TREE_MODEL (state->ppt_name_store),
&list_iter);
- has_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (state->properties_store),
+ has_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (state->properties_store),
&tree_iter, path);
gtk_tree_path_free (path);
g_return_if_fail (has_iter);
@@ -1026,14 +1026,14 @@ cb_dialog_doc_metadata_remove_clicked (GtkWidget *remove_bt,
prop_name);
/* Update other pages */
- dialog_doc_metadata_update_prop (state,
+ dialog_doc_metadata_update_prop (state,
g_value_get_string (prop_name),
NULL);
/* Remove property from GsfMetadata */
- cmd_change_meta_data (WORKBOOK_CONTROL (state->wbcg), NULL,
+ cmd_change_meta_data (WORKBOOK_CONTROL (state->wbcg), NULL,
g_slist_prepend (NULL, g_value_dup_string (prop_name)));
-
+
/* Remove from Tree View */
gtk_tree_store_remove (state->properties_store,
&tree_iter);
@@ -1067,7 +1067,7 @@ cb_dialog_doc_metadata_apply_clicked (GtkWidget *w,
/**
* cb_dialog_doc_metadata_combo_prop_selected
*
- * @combo_box : widget
+ * @combo_box : widget
* @state : dialog main struct
*
* Update the highlited item in the tree view and the 'Properties' page entry values.
@@ -1087,32 +1087,32 @@ cb_dialog_doc_metadata_combo_prop_selected (GtkComboBox *combo_box,
/* Get list store path */
if (gtk_combo_box_get_active_iter (combo_box, &list_iter)) {
- path = gtk_tree_model_get_path
+ path = gtk_tree_model_get_path
(GTK_TREE_MODEL (state->ppt_name_store), &list_iter);
- if (gtk_tree_model_get_iter
- (GTK_TREE_MODEL (state->properties_store),
+ if (gtk_tree_model_get_iter
+ (GTK_TREE_MODEL (state->properties_store),
&tree_iter, path)) {
/* Get value on the second column */
value = g_new0 (GValue, 1);
- gtk_tree_model_get_value
+ gtk_tree_model_get_value
(GTK_TREE_MODEL (state->properties_store),
&tree_iter, 1, value);
- gtk_entry_set_text (state->ppt_value,
+ gtk_entry_set_text (state->ppt_value,
g_value_get_string (value));
/* Get link value on the 3rd column */
g_value_unset (value);
- gtk_tree_model_get_value
+ gtk_tree_model_get_value
(GTK_TREE_MODEL (state->properties_store),
&tree_iter, 2, value);
link_value = (gchar *) g_value_get_string (value);
if (link_value != NULL)
- gtk_entry_set_text (state->ppt_link,
+ gtk_entry_set_text (state->ppt_link,
(const gchar *) link_value);
/* Update tree view cursor */
@@ -1136,13 +1136,13 @@ cb_dialog_doc_metadata_combo_prop_selected (GtkComboBox *combo_box,
/**
* cb_dialog_doc_metadata_tree_prop_selected
*
- * @combo_box : widget
+ * @combo_box : widget
* @state : dialog main struct
*
* Update the highlited item in the 'Properties' page combo box.
*
**/
-static void
+static void
cb_dialog_doc_metadata_tree_prop_selected (GtkTreeView *tree_view,
DialogDocMetaData *state)
{
@@ -1161,7 +1161,7 @@ cb_dialog_doc_metadata_tree_prop_selected (GtkTreeView *tree_view,
&list_iter);
/* Set remove button sensitive */
- gtk_widget_set_sensitive (GTK_WIDGET (state->remove_button),
+ gtk_widget_set_sensitive (GTK_WIDGET (state->remove_button),
TRUE);
} else {
g_warning ("Did not get a valid iterator");
@@ -1172,13 +1172,13 @@ cb_dialog_doc_metadata_tree_prop_selected (GtkTreeView *tree_view,
/**
* dialog_doc_metadata_get_prop_val
*
- * @prop_name : property name
- * @prop_value : property value
+ * @prop_name : property name
+ * @prop_value : property value
*
* Retrieves an arbitrary property value always as string.
*
**/
-static gchar *
+static gchar *
dialog_doc_metadata_get_prop_val (char const *prop_name,
GValue *prop_value)
{
@@ -1202,11 +1202,11 @@ dialog_doc_metadata_get_prop_val (char const *prop_name,
/**
* dialog_doc_metadata_populate_tree_view
*
- * @name : property name
- * @prop : property stored in GsfDocMetaData
+ * @name : property name
+ * @prop : property stored in GsfDocMetaData
* @state : dialog main struct
*
- * Populates the tree view in 'Properties' page.
+ * Populates the tree view in 'Properties' page.
*
**/
static void
@@ -1253,13 +1253,13 @@ dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
gtk_widget_set_sensitive (GTK_WIDGET (state->add_button), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (state->remove_button), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (state->apply_button), FALSE);
-
+
/* Intialize Combo Box */
state->ppt_name_store = gtk_list_store_new (1, G_TYPE_STRING);
-
+
gtk_combo_box_set_model (GTK_COMBO_BOX (state->ppt_name),
GTK_TREE_MODEL (state->ppt_name_store));
-
+
gtk_combo_box_entry_set_text_column (state->ppt_name, 0);
/* Populate Treeview */
@@ -1267,24 +1267,24 @@ dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING);
-
- gtk_tree_view_set_model (state->properties,
+
+ gtk_tree_view_set_model (state->properties,
GTK_TREE_MODEL (state->properties_store));
-
+
/* Append Columns */
- gtk_tree_view_insert_column_with_attributes (state->properties,
+ gtk_tree_view_insert_column_with_attributes (state->properties,
0, _("Name"),
gtk_cell_renderer_text_new(),
"text", 0,
NULL);
-
- gtk_tree_view_insert_column_with_attributes (state->properties,
+
+ gtk_tree_view_insert_column_with_attributes (state->properties,
1, _("Value"),
gtk_cell_renderer_text_new(),
"text", 1,
NULL);
- gtk_tree_view_insert_column_with_attributes (state->properties,
+ gtk_tree_view_insert_column_with_attributes (state->properties,
2, _("Linked To"),
gtk_cell_renderer_text_new(),
"text", 2,
@@ -1309,18 +1309,18 @@ dialog_doc_metadata_init_properties_page (DialogDocMetaData *state)
state);
/* Entries */
-
+
/* 'Add', 'Remove' and 'Apply' Button Signals */
g_signal_connect (G_OBJECT (state->add_button),
"clicked",
G_CALLBACK (cb_dialog_doc_metadata_add_clicked),
state);
-
+
g_signal_connect (G_OBJECT (state->remove_button),
"clicked",
G_CALLBACK (cb_dialog_doc_metadata_remove_clicked),
state);
-
+
g_signal_connect (G_OBJECT (state->apply_button),
"clicked",
G_CALLBACK (cb_dialog_doc_metadata_apply_clicked),
@@ -1365,14 +1365,14 @@ dialog_doc_metadata_init_statistics_page (DialogDocMetaData *state)
static void
dialog_doc_metadata_set_file_permissions (DialogDocMetaData *state)
{
- if (state->file_permissions != NULL &&
+ if (state->file_permissions != NULL &&
state->permissions_changed == TRUE)
go_set_file_permissions (go_doc_get_uri (state->doc),
state->file_permissions);
}
static void
-dialog_doc_metadata_free (DialogDocMetaData *state)
+dialog_doc_metadata_free (DialogDocMetaData *state)
{
WorkbookControl *wbc = WORKBOOK_CONTROL (state->wbcg);
@@ -1395,8 +1395,8 @@ dialog_doc_metadata_free (DialogDocMetaData *state)
g_free (state);
}
-static void
-dialog_doc_metadata_init_widgets (DialogDocMetaData *state)
+static void
+dialog_doc_metadata_init_widgets (DialogDocMetaData *state)
{
state->dialog = glade_xml_get_widget (state->gui, "GOMetadataDialog");
@@ -1412,7 +1412,7 @@ dialog_doc_metadata_init_widgets (DialogDocMetaData *state)
state->accessed = GTK_LABEL (glade_xml_get_widget (state->gui, "accessed"));
state->owner = GTK_LABEL (glade_xml_get_widget (state->gui, "owner"));
state->group = GTK_LABEL (glade_xml_get_widget (state->gui, "group"));
-
+
state->owner_read = GTK_CHECK_BUTTON (glade_xml_get_widget (state->gui, "owner_read"));
state->owner_write = GTK_CHECK_BUTTON (glade_xml_get_widget (state->gui, "owner_write"));
@@ -1462,8 +1462,8 @@ dialog_doc_metadata_init (DialogDocMetaData *state,
g_return_val_if_fail (state->metadata != NULL, TRUE);
state->gui = gnm_glade_xml_new (GO_CMD_CONTEXT (wbcg),
- "doc-meta-data.glade",
- NULL,
+ "doc-meta-data.glade",
+ NULL,
NULL);
if (state->gui == NULL)
@@ -1520,7 +1520,7 @@ dialog_doc_metadata_init (DialogDocMetaData *state,
/**
* dialog_doc_metadata_new
*
- * @wbcg : WBCGtk
+ * @wbcg : WBCGtk
*
* Creates a new instance of the dialog.
*
diff --git a/src/dialogs/dialog-fill-series.c b/src/dialogs/dialog-fill-series.c
index b39f3aa..984f879 100644
--- a/src/dialogs/dialog-fill-series.c
+++ b/src/dialogs/dialog-fill-series.c
@@ -74,14 +74,14 @@ cb_fill_series_update_sensitivity (G_GNUC_UNUSED GtkWidget *dummy,
stop = !entry_to_float (GTK_ENTRY (state->stop_entry),
&a_float,FALSE);
- ready = gnm_dao_is_ready (GNM_DAO (state->base.gdao)) &&
+ ready = gnm_dao_is_ready (GNM_DAO (state->base.gdao)) &&
!entry_to_float (GTK_ENTRY (state->start_entry),
&a_float,
- FALSE) &&
- ((gnm_dao_is_finite (GNM_DAO (state->base.gdao))
- && (step || stop)) ||
+ FALSE) &&
+ ((gnm_dao_is_finite (GNM_DAO (state->base.gdao))
+ && (step || stop)) ||
(step && stop));
-
+
gtk_widget_set_sensitive (state->base.ok_button, ready);
}
@@ -111,13 +111,13 @@ cb_fill_series_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
fs->date_unit = gtk_radio_group_get_selected
(GTK_RADIO_BUTTON (radio)->group);
- fs->is_step_set = ! entry_to_float (GTK_ENTRY (state->step_entry),
+ fs->is_step_set = ! entry_to_float (GTK_ENTRY (state->step_entry),
&fs->step_value, TRUE);
- fs->is_stop_set = ! entry_to_float (GTK_ENTRY (state->stop_entry),
+ fs->is_stop_set = ! entry_to_float (GTK_ENTRY (state->stop_entry),
&fs->stop_value, TRUE);
- entry_to_float (GTK_ENTRY (state->start_entry),
+ entry_to_float (GTK_ENTRY (state->start_entry),
&fs->start_value, TRUE);
-
+
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
dao, fs, fill_series_engine))
@@ -160,11 +160,11 @@ dialog_fill_series_tool_init (FillSeriesState *state)
sel = selection_first_range (state->base.sv, NULL, NULL);
/* Set the sensitivity of Unit day. */
- radio = glade_xml_get_widget (state->base.gui,
+ radio = glade_xml_get_widget (state->base.gui,
"type_date");
g_signal_connect (G_OBJECT (radio), "clicked",
G_CALLBACK (cb_type_button_clicked), state);
-
+
state->stop_entry = glade_xml_get_widget (state->base.gui, "stop_entry");
g_signal_connect_after (G_OBJECT (state->stop_entry),
"changed",
@@ -179,12 +179,12 @@ dialog_fill_series_tool_init (FillSeriesState *state)
G_CALLBACK (cb_fill_series_update_sensitivity), state);
- state->date_steps_type = glade_xml_get_widget (state->base.gui,
+ state->date_steps_type = glade_xml_get_widget (state->base.gui,
"table_date_unit");
gtk_widget_set_sensitive (state->date_steps_type, FALSE);
button = (sel == NULL ||
- (prefer_rows =
+ (prefer_rows =
(range_width (sel) >= range_height (sel))))
? "series_in_rows"
: "series_in_cols";
@@ -197,7 +197,7 @@ dialog_fill_series_tool_init (FillSeriesState *state)
dialog_tool_preset_to_range (&state->base);
- cell_start = sheet_cell_get (state->base.sheet,
+ cell_start = sheet_cell_get (state->base.sheet,
sel->start.col, sel->start.row);
if (cell_start) {
char *content = gnm_cell_get_rendered_text (cell_start);
@@ -208,9 +208,9 @@ dialog_fill_series_tool_init (FillSeriesState *state)
}
}
cell_end = prefer_rows ?
- sheet_cell_get (state->base.sheet,
+ sheet_cell_get (state->base.sheet,
sel->end.col, sel->start.row) :
- sheet_cell_get (state->base.sheet,
+ sheet_cell_get (state->base.sheet,
sel->start.col, sel->end.row);
if (cell_end) {
char *content = gnm_cell_get_rendered_text (cell_end);
@@ -221,10 +221,10 @@ dialog_fill_series_tool_init (FillSeriesState *state)
}
}
if (cell_start && cell_end) {
- float_to_entry (GTK_ENTRY(state->step_entry),
+ float_to_entry (GTK_ENTRY(state->step_entry),
(value_get_as_float(cell_end->value) -
value_get_as_float(cell_start->value))
- / (prefer_rows ?
+ / (prefer_rows ?
(sel->end.col-sel->start.col) :
(sel->end.row-sel->start.row)));
}
@@ -258,7 +258,7 @@ dialog_fill_series (WBCGtk *wbcg)
G_CALLBACK (cb_fill_series_update_sensitivity),
0))
return;
-
+
gnm_dao_set_put (GNM_DAO (state->base.gdao), FALSE, FALSE);
dialog_fill_series_tool_init (state);
gtk_widget_show (state->base.dialog);
diff --git a/src/dialogs/dialog-formula-guru.c b/src/dialogs/dialog-formula-guru.c
index 6511a6a..0395dbb 100644
--- a/src/dialogs/dialog-formula-guru.c
+++ b/src/dialogs/dialog-formula-guru.c
@@ -623,7 +623,7 @@ cb_dialog_formula_guru_clear_clicked (G_GNUC_UNUSED GtkWidget *button,
static gboolean
dialog_formula_guru_is_array (FormulaGuruState *state)
{
- return gtk_toggle_button_get_active
+ return gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->array_button));
}
@@ -642,7 +642,7 @@ cb_dialog_formula_guru_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
gnumeric_cell_renderer_expr_entry_editing_done (
GTK_CELL_EDITABLE (state->cellrenderer->entry),
state->cellrenderer);
- wbcg_edit_finish (state->wbcg,
+ wbcg_edit_finish (state->wbcg,
dialog_formula_guru_is_array (state)
? WBC_EDIT_ACCEPT_ARRAY
: WBC_EDIT_ACCEPT, NULL);
@@ -694,10 +694,10 @@ cb_dialog_formula_guru_edited (G_GNUC_UNUSED GtkCellRendererText *cell,
path = gtk_tree_path_new_from_string (path_string);
- have_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (state->model),
+ have_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (state->model),
&iter, path);
gtk_tree_path_free (path);
- if (!have_iter)
+ if (!have_iter)
return;
gtk_tree_store_set (state->model, &iter, FUN_ARG_ENTRY, new_text, -1);
@@ -855,7 +855,7 @@ dialog_formula_guru_init (FormulaGuruState *state)
/* Finished set-up of treeview */
- state->array_button = glade_xml_get_widget (state->gui,
+ state->array_button = glade_xml_get_widget (state->gui,
"array_button");
gtk_widget_set_sensitive (state->array_button, TRUE);
diff --git a/src/dialogs/dialog-function-select.c b/src/dialogs/dialog-function-select.c
index b0b3767..2d4ef41 100644
--- a/src/dialogs/dialog-function-select.c
+++ b/src/dialogs/dialog-function-select.c
@@ -237,7 +237,7 @@ make_link (GtkTextBuffer *description, const char *name,
GCallback cb, gpointer user)
{
GtkTextTag *link =
- gtk_text_tag_table_lookup
+ gtk_text_tag_table_lookup
(gtk_text_buffer_get_tag_table (description), name);
if (!link) {
@@ -326,7 +326,7 @@ make_expr_example (Sheet *sheet, const char *text, gboolean localized)
gnm_expr_top_unref (texpr);
gnm_expr_top_unref (texpr_res);
-
+
res = g_strdup_printf (_("%s evaluates to %s."), etxt, vtxt);
g_free (etxt);
@@ -347,7 +347,7 @@ make_expr_example (Sheet *sheet, const char *text, gboolean localized)
#define ADD_LINK_TEXT(text,len) gtk_text_buffer_insert_with_tags (description, &ti, (text), (len), link, NULL)
#define ADD_TEXT_WITH_ARGS(text) { const char *t = text; while (*t) { const char *at = strstr (t, "@{"); \
if (at == NULL) { ADD_TEXT(t); break;} ADD_LTEXT(t, at - t); t = at + 2; at = strchr (t,'}'); \
- if (at != NULL) { ADD_BOLD_TEXT(t, at - t); t = at + 1; } else {ADD_TEXT (t); break;}}}
+ if (at != NULL) { ADD_BOLD_TEXT(t, at - t); t = at + 1; } else {ADD_TEXT (t); break;}}}
static void
describe_new_style (GtkTextBuffer *description, GnmFunc const *func, Sheet *sheet)
@@ -571,7 +571,7 @@ dialog_function_select_find_func (FunctionSelectState *state, char* name)
if (name == NULL)
return;
-
+
fd = gnm_func_lookup (name, state->wb);
if (fd != NULL) {
dialog_function_select_find_func_t data;
@@ -579,12 +579,12 @@ dialog_function_select_find_func (FunctionSelectState *state, char* name)
data.cat = fd->fn_group;
data.state = state;
data.iter = NULL;
-
+
gtk_tree_model_foreach (GTK_TREE_MODEL (state->model),
dialog_function_select_search_cat_func,
&data);
if (data.iter != NULL) {
- GtkTreeSelection *selection = gtk_tree_view_get_selection
+ GtkTreeSelection *selection = gtk_tree_view_get_selection
(state->treeview);
GtkTreePath *path;
@@ -603,9 +603,9 @@ dialog_function_select_find_func (FunctionSelectState *state, char* name)
dialog_function_select_search_func,
&data);
if (data.iter != NULL) {
- selection = gtk_tree_view_get_selection
+ selection = gtk_tree_view_get_selection
(state->treeview_f);
-
+
gtk_tree_selection_select_iter (selection,
data.iter);
path = gtk_tree_model_get_path (GTK_TREE_MODEL (state->model_f),
@@ -622,7 +622,7 @@ dialog_function_select_find_func (FunctionSelectState *state, char* name)
g_warning ("Category of function %s was not found", name);
} else
g_warning ("Function %s was not found", name);
-}
+}
typedef struct {
FunctionSelectState *state;
@@ -642,11 +642,11 @@ cb_dialog_function_select_idle_handler (gpointer dt)
return FALSE;
}
-static void
+static void
cb_description_clicked (GtkTextBuffer *textbuffer,
GtkTextIter *location,
GtkTextMark *mark,
- FunctionSelectState *state)
+ FunctionSelectState *state)
{
const char * mark_name;
GtkTextTag *link;
@@ -654,11 +654,11 @@ cb_description_clicked (GtkTextBuffer *textbuffer,
GtkTextIter *end;
cb_dialog_function_select_idle_handler_t *data;
- if ((mark == NULL) || ((mark_name = gtk_text_mark_get_name (mark)) == NULL)
+ if ((mark == NULL) || ((mark_name = gtk_text_mark_get_name (mark)) == NULL)
|| (strcmp(mark_name, "selection_bound") != 0))
return;
- link = gtk_text_tag_table_lookup
+ link = gtk_text_tag_table_lookup
(gtk_text_buffer_get_tag_table (textbuffer), "LINK");
if ((link == NULL) || !gtk_text_iter_has_tag (location, link))
@@ -762,7 +762,7 @@ cb_dialog_function_select_cat_selection_changed (GtkTreeSelection *the_selection
gtk_list_store_append (state->model_f, &iter);
gtk_list_store_set (state->model_f, &iter,
FUN_NAME, gnm_func_get_name (func),
- FUNCTION_CAT,
+ FUNCTION_CAT,
cat_specific ? "" : _(func->fn_group->display_name->str),
FUNCTION, func,
-1);
@@ -845,10 +845,10 @@ dialog_function_select_init (FunctionSelectState *state)
description = gtk_text_view_get_buffer (state->description_view);
gtk_text_buffer_get_start_iter (description, &where);
gtk_text_buffer_create_mark (description, "start-mark", &where, TRUE);
-
+
g_signal_connect_after (G_OBJECT (description),
"mark-set",
- G_CALLBACK (cb_description_clicked), state);
+ G_CALLBACK (cb_description_clicked), state);
state->ok_button = glade_xml_get_widget (state->gui, "ok_button");
gtk_widget_set_sensitive (state->ok_button, FALSE);
@@ -859,10 +859,10 @@ dialog_function_select_init (FunctionSelectState *state)
"clicked",
G_CALLBACK (cb_dialog_function_select_cancel_clicked), state);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
-
+
gnumeric_init_help_button (
glade_xml_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_FUNCTION_SELECT);
diff --git a/src/dialogs/dialog-goal-seek.c b/src/dialogs/dialog-goal-seek.c
index 39dd3fd..401e2e3 100644
--- a/src/dialogs/dialog-goal-seek.c
+++ b/src/dialogs/dialog-goal-seek.c
@@ -262,8 +262,8 @@ gnumeric_goal_seek (GoalSeekState *state)
static void
cb_dialog_destroy (GoalSeekState *state)
{
- if (!state->cancelled
- && state->old_value != NULL
+ if (!state->cancelled
+ && state->old_value != NULL
&& state->old_cell != NULL) {
cmd_goal_seek (WORKBOOK_CONTROL(state->wbcg),
state->old_cell, state->old_value, NULL);
@@ -453,7 +453,7 @@ cb_dialog_apply_clicked (G_GNUC_UNUSED GtkWidget *button,
break;
}
state->cancelled = FALSE;
-
+
gtk_widget_show (state->result_table);
return;
}
@@ -485,8 +485,8 @@ dialog_preload_selection (GoalSeekState *state, GnmExprEntry *entry)
{
GnmRange const *sel;
- sel = selection_first_range
- (wb_control_cur_sheet_view
+ sel = selection_first_range
+ (wb_control_cur_sheet_view
(WORKBOOK_CONTROL (state->wbcg)), NULL, NULL);
if (sel)
gnm_expr_entry_load_from_range (entry,
diff --git a/src/dialogs/dialog-hyperlink.c b/src/dialogs/dialog-hyperlink.c
index fddb45d..cc61256 100644
--- a/src/dialogs/dialog-hyperlink.c
+++ b/src/dialogs/dialog-hyperlink.c
@@ -128,7 +128,7 @@ dhl_get_target_cur_wb (HyperlinkState *state, gboolean *success)
ret = g_strdup (target);
value_release (val);
} else {
- go_gtk_notice_dialog (GTK_WINDOW (state->dialog),
+ go_gtk_notice_dialog (GTK_WINDOW (state->dialog),
GTK_MESSAGE_ERROR,
_("Not a range or name"));
gnm_expr_entry_grab_focus (gee, TRUE);
@@ -208,8 +208,8 @@ dhl_get_target_email (HyperlinkState *state, gboolean *success)
result = g_strconcat ("mailto:", enc_addr, NULL);
} else {
enc_subj = go_url_encode (subject, 0);
-
- result = g_strconcat ("mailto:", enc_addr,
+
+ result = g_strconcat ("mailto:", enc_addr,
"?subject=", enc_subj, NULL);
g_free (enc_subj);
}
@@ -335,12 +335,12 @@ dhl_cb_ok (G_GNUC_UNUSED GtkWidget *button, HyperlinkState *state)
if (state->is_new) {
cmdname = _("Add Hyperlink");
- cmd_selection_hyperlink (WORKBOOK_CONTROL (state->wbcg),
+ cmd_selection_hyperlink (WORKBOOK_CONTROL (state->wbcg),
style,
cmdname, target);
} else {
cmdname = _("Edit Hyperlink");
- cmd_selection_hyperlink (WORKBOOK_CONTROL (state->wbcg),
+ cmd_selection_hyperlink (WORKBOOK_CONTROL (state->wbcg),
style,
cmdname, NULL);
g_free (target);
@@ -494,10 +494,10 @@ dhl_init (HyperlinkState *state)
G_CALLBACK (dhl_cb_menu_changed),
state);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
-
+
return FALSE;
}
diff --git a/src/dialogs/dialog-insert-cells.c b/src/dialogs/dialog-insert-cells.c
index c08d619..85d70ba 100644
--- a/src/dialogs/dialog-insert-cells.c
+++ b/src/dialogs/dialog-insert-cells.c
@@ -171,10 +171,10 @@ dialog_insert_cells (WBCGtk *wbcg)
gnumeric_init_help_button (
glade_xml_get_widget (state->gui, "helpbutton"),
GNUMERIC_HELP_LINK_INSERT_CELS);
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (glade_xml_get_widget
- (state->gui, cols < rows
- ? "radio_0" : "radio_1")),
+ gtk_toggle_button_set_active
+ (GTK_TOGGLE_BUTTON (glade_xml_get_widget
+ (state->gui, cols < rows
+ ? "radio_0" : "radio_1")),
TRUE);
wbc_gtk_attach_guru (state->wbcg, state->dialog);
diff --git a/src/dialogs/dialog-merge.c b/src/dialogs/dialog-merge.c
index 2d52a8d..d4518d1 100644
--- a/src/dialogs/dialog-merge.c
+++ b/src/dialogs/dialog-merge.c
@@ -1,7 +1,7 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* dialog-merge.c: Dialog to merge a list of data into a given range
- *
+ *
*
* Author:
* Andreas J. Guelzow <aguelzow taliesin ca>
@@ -433,7 +433,7 @@ dialog_merge (WBCGtk *wbcg)
"clicked",
G_CALLBACK (cb_merge_cancel_clicked), state);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
diff --git a/src/dialogs/dialog-paste-special.c b/src/dialogs/dialog-paste-special.c
index b4b027f..67503a5 100644
--- a/src/dialogs/dialog-paste-special.c
+++ b/src/dialogs/dialog-paste-special.c
@@ -239,9 +239,9 @@ dialog_paste_special (WBCGtk *wbcg)
gtk_widget_show_all (vbox);
gtk_widget_grab_focus (first_button);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
- GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
+ GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
/* a candidate for merging into attach guru */
g_signal_connect (G_OBJECT (state->dialog), "response",
diff --git a/src/dialogs/dialog-plugin-manager.c b/src/dialogs/dialog-plugin-manager.c
index 3109bc8..002b7b5 100644
--- a/src/dialogs/dialog-plugin-manager.c
+++ b/src/dialogs/dialog-plugin-manager.c
@@ -671,7 +671,7 @@ dialog_plugin_manager (WBCGtk *wbcg)
GTK_BUTTON (glade_xml_get_widget (gui, "button_activate_all"));
/* If we add the following image in glade it does */
/* not obey gtk-button-images = 0 */
- image = g_object_ref (gtk_image_new_from_stock (GTK_STOCK_EXECUTE,
+ image = g_object_ref (gtk_image_new_from_stock (GTK_STOCK_EXECUTE,
GTK_ICON_SIZE_BUTTON));
gtk_button_set_image (pm_gui->button_activate_all, image);
diff --git a/src/dialogs/dialog-preferences.c b/src/dialogs/dialog-preferences.c
index b8a8ca1..a4f56b0 100644
--- a/src/dialogs/dialog-preferences.c
+++ b/src/dialogs/dialog-preferences.c
@@ -73,7 +73,7 @@ typedef void (* enum_conf_setter_t) (int value);
static void
dialog_pref_add_item (PrefState *state, char const *page_name,
- char const *icon_name,
+ char const *icon_name,
int page, char const* parent_path)
{
GtkTreeIter iter, parent;
@@ -137,7 +137,7 @@ pref_create_label (GOConfNode *node, GtkWidget *table,
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
GTK_FILL | GTK_EXPAND,
GTK_FILL | GTK_SHRINK, 5, 2);
@@ -148,7 +148,7 @@ pref_create_label (GOConfNode *node, GtkWidget *table,
/*************************************************************************/
static void
-bool_pref_widget_to_conf (GtkToggleButton *button,
+bool_pref_widget_to_conf (GtkToggleButton *button,
gboolean_conf_setter_t setter)
{
GOConfNode *node = g_object_get_data (G_OBJECT (button), "node");
@@ -170,7 +170,7 @@ bool_pref_conf_to_widget (GOConfNode *node, G_GNUC_UNUSED char const *key,
static void
bool_pref_create_widget (GOConfNode *node, GtkWidget *table,
- gint row, gboolean_conf_setter_t setter,
+ gint row, gboolean_conf_setter_t setter,
char const *default_label)
{
char *desc = go_conf_get_short_desc (node, NULL);
@@ -271,7 +271,7 @@ enum_pref_create_widget (GOConfNode *node, GtkWidget *table,
1, enum_class->values + i,
-1);
}
-
+
g_type_class_unref (enum_class);
gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (model));
@@ -319,7 +319,7 @@ int_pref_conf_to_widget (GOConfNode *node, G_GNUC_UNUSED char const *key,
static GtkWidget *
int_pref_create_widget (GOConfNode *node, GtkWidget *table,
- gint row, gint val, gint from, gint to, gint step,
+ gint row, gint val, gint from, gint to, gint step,
gint_conf_setter_t setter, char const *default_label)
{
GtkAdjustment *adj = GTK_ADJUSTMENT
@@ -394,7 +394,7 @@ double_pref_conf_to_widget (GOConfNode *node, G_GNUC_UNUSED char const *key,
}
static void
double_pref_create_widget (GOConfNode *node, GtkWidget *table,
- gint row, gnm_float val, gnm_float from,gnm_float to,
+ gint row, gnm_float val, gnm_float from,gnm_float to,
gnm_float step,
gint digits, double_conf_setter_t setter,
char const *default_label)
@@ -550,19 +550,19 @@ pref_undo_page_initializer (PrefState *state,
gint row = 0;
int_pref_create_widget (gnm_conf_get_undo_max_descriptor_width_node (),
- page, row++, 5, 5, 200, 1,
+ page, row++, 5, 5, 200, 1,
gnm_conf_set_undo_max_descriptor_width,
_("Length of Undo Descriptors"));
int_pref_create_widget (gnm_conf_get_undo_size_node (),
- page, row++, 1000, 0, 30000, 100,
+ page, row++, 1000, 0, 30000, 100,
gnm_conf_set_undo_size,
_("Maximal Undo Size"));
int_pref_create_widget (gnm_conf_get_undo_maxnum_node (),
- page, row++, 20, 1, 200, 1,
+ page, row++, 20, 1, 200, 1,
gnm_conf_set_undo_maxnum,
_("Number of Undo Items"));
bool_pref_create_widget (gnm_conf_get_undo_show_sheet_name_node (),
- page, row++,
+ page, row++,
gnm_conf_set_undo_show_sheet_name,
_("Show Sheet Name in Undo List"));
@@ -584,19 +584,19 @@ pref_sort_page_initializer (PrefState *state,
gint row = 0;
int_pref_create_widget (gnm_conf_get_core_sort_dialog_max_initial_clauses_node (),
- page, row++, 10, 0, 50, 1,
+ page, row++, 10, 0, 50, 1,
gnm_conf_set_core_sort_dialog_max_initial_clauses,
_("Number of Automatic Clauses"));
bool_pref_create_widget (gnm_conf_get_core_sort_default_retain_formats_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_sort_default_retain_formats,
_("Sorting Preserves Formats"));
bool_pref_create_widget (gnm_conf_get_core_sort_default_by_case_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_sort_default_by_case,
_("Sorting is Case-Sensitive"));
bool_pref_create_widget (gnm_conf_get_core_sort_default_ascending_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_sort_default_ascending,
_("Sort Ascending"));
@@ -619,38 +619,38 @@ pref_window_page_initializer (PrefState *state,
GtkWidget *w;
double_pref_create_widget (gnm_conf_get_core_gui_window_y_node (),
- page, row++, 0.75, 0.25, 1, 0.05, 2,
+ page, row++, 0.75, 0.25, 1, 0.05, 2,
gnm_conf_set_core_gui_window_y,
_("Default Vertical Window Size"));
double_pref_create_widget (gnm_conf_get_core_gui_window_x_node (),
- page, row++, 0.75, 0.25, 1, 0.05, 2,
+ page, row++, 0.75, 0.25, 1, 0.05, 2,
gnm_conf_set_core_gui_window_x,
_("Default Horizontal Window Size"));
double_pref_create_widget (gnm_conf_get_core_gui_window_zoom_node (),
- page, row++, 1.00, 0.10, 5.00, 0.05, 2,
+ page, row++, 1.00, 0.10, 5.00, 0.05, 2,
gnm_conf_set_core_gui_window_zoom,
_("Default Zoom Factor"));
int_pref_create_widget (gnm_conf_get_core_workbook_n_sheet_node (),
- page, row++, 1, 1, 64, 1,
+ page, row++, 1, 1, 64, 1,
gnm_conf_set_core_workbook_n_sheet,
_("Default Number of Sheets"));
w = int_pref_create_widget (gnm_conf_get_core_workbook_n_rows_node (),
page, row++,
- GNM_DEFAULT_ROWS, GNM_MIN_ROWS, GNM_MAX_ROWS, 1,
+ GNM_DEFAULT_ROWS, GNM_MIN_ROWS, GNM_MAX_ROWS, 1,
gnm_conf_set_core_workbook_n_rows,
_("Default Number of Rows in a Sheet"));
power_of_2_handlers (w);
w = int_pref_create_widget (gnm_conf_get_core_workbook_n_cols_node (),
page, row++,
- GNM_DEFAULT_COLS, GNM_MIN_COLS, GNM_MAX_COLS, 1,
+ GNM_DEFAULT_COLS, GNM_MIN_COLS, GNM_MAX_COLS, 1,
gnm_conf_set_core_workbook_n_cols,
_("Default Number of Columns in a Sheet"));
power_of_2_handlers (w);
bool_pref_create_widget (gnm_conf_get_core_gui_editing_livescrolling_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_gui_editing_livescrolling,
_("Live Scrolling"));
@@ -672,25 +672,25 @@ pref_file_page_initializer (PrefState *state,
gint row = 0;
int_pref_create_widget (gnm_conf_get_core_xml_compression_level_node (),
- page, row++, 9, 0, 9, 1,
+ page, row++, 9, 0, 9, 1,
gnm_conf_set_core_xml_compression_level,
_("Default Compression Level For "
"Gnumeric Files"));
int_pref_create_widget (gnm_conf_get_core_workbook_autosave_time_node (),
- page, row++, 0, 0, 365*24*60*60, 60,
+ page, row++, 0, 0, 365*24*60*60, 60,
gnm_conf_set_core_workbook_autosave_time,
_("Default autosave frequency in seconds"));
bool_pref_create_widget (gnm_conf_get_core_file_save_def_overwrite_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_file_save_def_overwrite,
_("Default To Overwriting Files"));
bool_pref_create_widget (gnm_conf_get_core_file_save_single_sheet_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_file_save_single_sheet,
_("Warn When Exporting Into Single "
"Sheet Format"));
bool_pref_create_widget (gnm_conf_get_plugin_latex_use_utf8_node (),
- page, row++,
+ page, row++,
gnm_conf_set_plugin_latex_use_utf8,
_("Use UTF-8 in LaTeX Export"));
@@ -710,13 +710,13 @@ pref_screen_page_initializer (PrefState *state,
{
GtkWidget *page = gtk_table_new (2, 2, FALSE);
gint row = 0;
-
+
double_pref_create_widget (gnm_conf_get_core_gui_screen_horizontaldpi_node (),
- page, row++, 96, 50, 250, 1, 1,
+ page, row++, 96, 50, 250, 1, 1,
gnm_conf_set_core_gui_screen_horizontaldpi,
_("Horizontal DPI"));
double_pref_create_widget (gnm_conf_get_core_gui_screen_verticaldpi_node (),
- page, row++, 96, 50, 250, 1, 1,
+ page, row++, 96, 50, 250, 1, 1,
gnm_conf_set_core_gui_screen_verticaldpi,
_("Vertical DPI"));
@@ -738,28 +738,28 @@ pref_tool_page_initializer (PrefState *state,
gint row = 0;
enum_pref_create_widget (gnm_conf_get_core_gui_editing_enter_moves_dir_node (),
- page, row++,
+ page, row++,
GO_TYPE_DIRECTION,
(enum_conf_setter_t)gnm_conf_set_core_gui_editing_enter_moves_dir,
_("Enter _Moves Selection"));
bool_pref_create_widget (gnm_conf_get_core_gui_editing_transitionkeys_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_gui_editing_transitionkeys,
_("Transition Keys"));
bool_pref_create_widget (gnm_conf_get_core_gui_editing_autocomplete_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_gui_editing_autocomplete,
_("Autocomplete"));
bool_pref_create_widget (gnm_conf_get_dialogs_rs_unfocused_node (),
- page, row++,
+ page, row++,
gnm_conf_set_dialogs_rs_unfocused,
_("Allow Unfocused Range Selections"));
int_pref_create_widget (gnm_conf_get_functionselector_num_of_recent_node (),
- page, row++, 10, 0, 40, 1,
+ page, row++, 10, 0, 40, 1,
gnm_conf_set_functionselector_num_of_recent,
_("Maximum Length of Recently "
"Used Functions List"));
-
+
gtk_widget_show_all (page);
return page;
}
@@ -778,10 +778,10 @@ pref_copypaste_page_initializer (PrefState *state,
gint row = 0;
bool_pref_create_widget (gnm_conf_get_cut_and_paste_prefer_clipboard_node (),
- page, row++,
+ page, row++,
gnm_conf_set_cut_and_paste_prefer_clipboard,
_("Prefer CLIPBOARD Over PRIMARY Selection"));
-
+
gtk_widget_show_all (page);
return page;
}
@@ -820,7 +820,7 @@ dialog_pref_select_page (PrefState *state, char const *page)
GtkTreePath *path;
path = gtk_tree_path_new_from_string (page);
-
+
if (path != NULL) {
gtk_tree_selection_select_path (selection, path);
gtk_tree_path_free (path);
@@ -935,7 +935,7 @@ dialog_preferences (WBCGtk *wbcg, gint page)
g_signal_connect (selection,
"changed",
G_CALLBACK (cb_dialog_pref_selection_changed), state);
-
+
g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (gui, "close_button")),
"clicked",
G_CALLBACK (cb_close_clicked), state);
diff --git a/src/dialogs/dialog-printer-setup.c b/src/dialogs/dialog-printer-setup.c
index a04189b..3d672f5 100644
--- a/src/dialogs/dialog-printer-setup.c
+++ b/src/dialogs/dialog-printer-setup.c
@@ -136,7 +136,7 @@ struct _PrinterSetupState {
double height, width;
GtkWidget * check_center_v;
- GtkWidget * check_center_h;
+ GtkWidget * check_center_h;
GtkWidget *icon_rd;
GtkWidget *icon_dr;
@@ -182,7 +182,7 @@ struct _HFCustomizeState {
typedef enum {
HF_FIELD_UNKNOWN,
- HF_FIELD_FILE,
+ HF_FIELD_FILE,
HF_FIELD_PATH,
HF_FIELD_DATE,
HF_FIELD_TIME,
@@ -331,9 +331,9 @@ draw_margin_header (UnitInfo *uinfo)
x2 = uinfo->bound_x2;
if (inside < 1.0)
- inside = 1.0;
+ inside = 1.0;
y1 += outside + inside ;
-
+
move_line (uinfo->line, x1, y1, x2, y1);
}
@@ -344,13 +344,13 @@ draw_margin_footer (UnitInfo *uinfo)
double outside = uinfo->pi->scale *
uinfo->state->margins.bottom.value;
double inside = uinfo->pi->scale * uinfo->value;
-
+
x1 = uinfo->bound_x1;
x2 = uinfo->bound_x2;
y2 = uinfo->bound_y2;
if (inside < 1.0)
- inside = 1.0;
+ inside = 1.0;
y2 -= outside + inside ;
move_line (uinfo->line, x1, y2, x2, y2);
}
@@ -635,7 +635,7 @@ cb_unit_selector_changed (GtkComboBox *widget, PrinterSetupState *state)
{
GtkTreeIter iter;
GtkUnit unit;
-
+
g_return_if_fail (state != NULL);
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (state->unit_selector), &iter)) {
@@ -657,7 +657,7 @@ unit_sort_func (GtkTreeModel *model,
gtk_tree_model_get (model, a, 0, &str_a, -1);
gtk_tree_model_get (model, b, 0, &str_b, -1);
-
+
result = g_utf8_collate (str_a, str_b);
g_free (str_a);
@@ -676,7 +676,7 @@ unit_sort_func (GtkTreeModel *model,
static void
do_setup_margin (PrinterSetupState *state)
{
- GtkWidget *table;
+ GtkWidget *table;
GtkBox *container;
g_return_if_fail (state && state->pi);
@@ -690,7 +690,7 @@ do_setup_margin (PrinterSetupState *state)
GtkTreeIter iter;
GtkTreeIter current;
GtkCellRenderer *text_renderer;
-
+
list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
gtk_list_store_append (list_store, &iter);
@@ -717,19 +717,19 @@ do_setup_margin (PrinterSetupState *state)
state->unit_selector = gtk_combo_box_new_with_model (GTK_TREE_MODEL (list_store));
state->unit_model = GTK_TREE_MODEL (list_store);
text_renderer = gtk_cell_renderer_text_new ();
- gtk_cell_layout_pack_start (GTK_CELL_LAYOUT(state->unit_selector),
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT(state->unit_selector),
text_renderer, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT(state->unit_selector),
- text_renderer, "text", 0);
-
+ text_renderer, "text", 0);
+
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (state->unit_selector), ¤t);
}
table = glade_xml_get_widget (state->gui, "table-paper-selector");
gtk_table_attach (GTK_TABLE (table), state->unit_selector, 3, 4, 8, 9,
GTK_FILL | GTK_EXPAND, 0, 0, 0);
- g_signal_connect (G_OBJECT (state->unit_selector), "changed",
- G_CALLBACK (cb_unit_selector_changed), state);
+ g_signal_connect (G_OBJECT (state->unit_selector), "changed",
+ G_CALLBACK (cb_unit_selector_changed), state);
gtk_widget_show (state->unit_selector);
margin_spin_configure (&state->margins.header, state, "spin-header",
@@ -830,7 +830,7 @@ header_changed (GtkComboBox *menu, PrinterSetupState *state)
print_hf_free (state->header);
state->header = print_hf_copy (format);
}
-
+
display_hf_preview (state, TRUE);
}
@@ -858,7 +858,7 @@ create_hf_name (char const *left, char const *middle, char const *right)
res = g_strdup_printf ("%s%s%s%s%s",
left," \xe2\x90\xa3 ", middle, " \xe2\x90\xa3 ", right);
-
+
this = res;
while (*this) {
if (*this == '\n') {
@@ -931,10 +931,10 @@ fill_hf (PrinterSetupState *state, GtkComboBox *om, GCallback callback, gboolean
if (idx < 0)
g_critical ("Current format is not registered!");
-
+
gtk_combo_box_set_active (om, idx);
g_signal_connect (G_OBJECT (om), "changed", callback, state);
-
+
hf_render_info_destroy (hfi);
}
@@ -979,13 +979,13 @@ hf_delete_tag_cb (HFCustomizeState *hf_state)
tag = gtk_text_tag_table_lookup (gtk_text_buffer_get_tag_table (textbuffer),
HF_TAG_NAME);
gtk_text_buffer_get_selection_bounds (textbuffer, &start, &end);
-
+
if (gtk_text_iter_has_tag (&start, tag) && !gtk_text_iter_begins_tag (&start, tag))
gtk_text_iter_backward_to_tag_toggle (&start, tag);
if (gtk_text_iter_has_tag (&end, tag) && !gtk_text_iter_toggles_tag (&end, tag))
gtk_text_iter_forward_to_tag_toggle (&end, tag);
-
-
+
+
gtk_text_buffer_delete (textbuffer, &start, &end);
}
}
@@ -999,8 +999,8 @@ hf_insert_hf_stock_tag (HFCustomizeState *hf_state, GtkTextBuffer *buffer, HFFie
GdkPixbuf* pix;
GtkTextMark *new_mark;
HFMarkInfo *mark_info;
-
-
+
+
switch (type) {
case HF_FIELD_FILE:
stock_id = GTK_STOCK_FILE;
@@ -1029,15 +1029,15 @@ hf_insert_hf_stock_tag (HFCustomizeState *hf_state, GtkTextBuffer *buffer, HFFie
default:
return;
}
-
+
hf_delete_tag_cb (hf_state);
- if (gtk_text_buffer_insert_interactive_at_cursor
+ if (gtk_text_buffer_insert_interactive_at_cursor
(buffer, "", -1, TRUE)) {
- gtk_text_buffer_get_iter_at_mark
+ gtk_text_buffer_get_iter_at_mark
(buffer, &iter, gtk_text_buffer_get_insert (buffer));
-
- pix = gtk_widget_render_icon (GTK_WIDGET (hf_state->dialog),
+
+ pix = gtk_widget_render_icon (GTK_WIDGET (hf_state->dialog),
stock_id,
GTK_ICON_SIZE_MENU, NULL);
gtk_text_buffer_insert_pixbuf (buffer, &iter, pix);
@@ -1062,7 +1062,7 @@ hf_insert_hf_tag (HFCustomizeState *hf_state, HFFieldType type, char *options)
focus = gtk_window_get_focus (GTK_WINDOW (hf_state->dialog));
if (GTK_IS_TEXT_VIEW (focus)) {
- GtkTextBuffer *buffer =
+ GtkTextBuffer *buffer =
gtk_text_view_get_buffer (GTK_TEXT_VIEW (focus));
hf_insert_hf_stock_tag (hf_state, buffer, type, options);
}
@@ -1073,7 +1073,7 @@ hf_insert_hf_tag (HFCustomizeState *hf_state, HFFieldType type, char *options)
static void
hf_insert_date_cb (GtkWidget *widget, HFCustomizeState *hf_state)
{
-
+
hf_insert_hf_tag (hf_state, HF_FIELD_DATE, g_object_get_data (G_OBJECT (widget), "options"));
}
@@ -1147,7 +1147,7 @@ hf_insert_path_cb (HFCustomizeState *hf_state)
hf_insert_hf_tag (hf_state, HF_FIELD_PATH, NULL);
}
-static void
+static void
buffer_delete_range_cb (GtkTextBuffer *textbuffer,
GtkTextIter *start,
GtkTextIter *end,
@@ -1156,7 +1156,7 @@ buffer_delete_range_cb (GtkTextBuffer *textbuffer,
GtkTextTag *tag;
GtkTextIter iter;
GList *l = hf_state->marks;
-
+
tag = gtk_text_tag_table_lookup (gtk_text_buffer_get_tag_table (textbuffer),
HF_TAG_NAME);
gtk_text_iter_order (start, end);
@@ -1169,7 +1169,7 @@ buffer_delete_range_cb (GtkTextBuffer *textbuffer,
/* Deleting all of our marks from this range */
while (l) {
HFMarkInfo *info = l->data;
-
+
if (gtk_text_mark_get_buffer (info->mark) == textbuffer) {
gtk_text_buffer_get_iter_at_mark (textbuffer, &iter, info->mark);
if (gtk_text_iter_in_range (&iter, start, end))
@@ -1249,13 +1249,13 @@ text_get (HFCustomizeState *hf_state, GtkTextBuffer *buffer)
while (l) {
HFMarkInfo *m = l->data;
if (gtk_text_mark_get_buffer (m->mark) == buffer)
- sorted_marks = g_list_insert_sorted
+ sorted_marks = g_list_insert_sorted
(sorted_marks, m, (GCompareFunc) mark_info_compare);
l = l->next;
}
gtk_text_buffer_get_bounds (buffer, &start, &end);
-
+
l = sorted_marks;
while (l) {
HFMarkInfo *m = l->data;
@@ -1269,7 +1269,7 @@ text_get (HFCustomizeState *hf_state, GtkTextBuffer *buffer)
start = mark_position;
l = l->next;
}
- g_list_free (sorted_marks);
+ g_list_free (sorted_marks);
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
g_string_append (string, text);
g_free (text);
@@ -1375,19 +1375,19 @@ is_known_tag (HFCustomizeState* hf_state, GtkTextBuffer *buffer, char const *tag
if (check_hf_tag (tag, "FILE", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_FILE, options);
- else if (check_hf_tag (tag, "PATH", &options, length))
+ else if (check_hf_tag (tag, "PATH", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_PATH, options);
- else if (check_hf_tag (tag, "PAGES", &options, length))
+ else if (check_hf_tag (tag, "PAGES", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_PAGES, options);
- else if (check_hf_tag (tag, "PAGE", &options, length))
+ else if (check_hf_tag (tag, "PAGE", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_PAGE, options);
- else if (check_hf_tag (tag, "TAB", &options, length))
+ else if (check_hf_tag (tag, "TAB", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_SHEET, options);
- else if (check_hf_tag (tag, "DATE", &options, length))
+ else if (check_hf_tag (tag, "DATE", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_DATE, options);
- else if (check_hf_tag (tag, "TIME", &options, length))
+ else if (check_hf_tag (tag, "TIME", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_TIME, options);
- else if (check_hf_tag (tag, "CELL", &options, length))
+ else if (check_hf_tag (tag, "CELL", &options, length))
hf_insert_hf_stock_tag (hf_state, buffer, HF_FIELD_CELL, options);
else return FALSE;
return TRUE;
@@ -1402,7 +1402,7 @@ add_text_to_buffer (HFCustomizeState* hf_state, GtkTextBuffer *buffer, char cons
GtkTextIter iter;
g_return_if_fail (here != NULL);
-
+
while (*here) {
if (here[0] == '&' && here[1] == '[') {
end = g_utf8_strchr (here, -1, closing);
@@ -1413,7 +1413,7 @@ add_text_to_buffer (HFCustomizeState* hf_state, GtkTextBuffer *buffer, char cons
if (!is_known_tag ( hf_state, buffer, here, end - here + 1)) {
gtk_text_buffer_get_end_iter (buffer, &iter);
gtk_text_buffer_insert_with_tags_by_name
- (buffer, &iter, here, end - here + 1,
+ (buffer, &iter, here, end - here + 1,
HF_TAG_NAME, NULL);
}
here = end + 1;
@@ -1431,7 +1431,7 @@ add_text_to_buffer (HFCustomizeState* hf_state, GtkTextBuffer *buffer, char cons
}
}
}
-
+
gtk_text_buffer_set_modified (buffer, FALSE);
}
@@ -1459,7 +1459,7 @@ hf_attach_insert_date_menu (GtkMenuToolButton *button, HFCustomizeState* hf_stat
GtkWidget *menu = NULL;
GtkWidget *item = NULL;
- g_signal_connect
+ g_signal_connect
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_date_cb), hf_state);
@@ -1481,7 +1481,7 @@ hf_attach_insert_date_menu (GtkMenuToolButton *button, HFCustomizeState* hf_stat
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
item = gtk_menu_item_new_with_label (("YYYY/MM/DD"));
- g_signal_connect
+ g_signal_connect
(G_OBJECT (item),
"activate", G_CALLBACK (hf_insert_date_cb), hf_state);
g_object_set_data_full (G_OBJECT (item), "options", g_strdup("YYYY/MM/DD"), g_free);
@@ -1497,7 +1497,7 @@ hf_attach_insert_time_menu (GtkMenuToolButton *button, HFCustomizeState* hf_stat
GtkWidget *menu = NULL;
GtkWidget *item = NULL;
- g_signal_connect
+ g_signal_connect
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_time_cb), hf_state);
@@ -1519,7 +1519,7 @@ hf_attach_insert_time_menu (GtkMenuToolButton *button, HFCustomizeState* hf_stat
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
item = gtk_menu_item_new_with_label (("HH:MM:SS"));
- g_signal_connect
+ g_signal_connect
(G_OBJECT (item),
"activate", G_CALLBACK (hf_insert_time_cb), hf_state);
g_object_set_data_full (G_OBJECT (item), "options", g_strdup("HH:MM:SS"), g_free);
@@ -1535,14 +1535,14 @@ hf_attach_insert_cell_menu (GtkMenuToolButton *button, HFCustomizeState* hf_stat
GtkWidget *menu = NULL;
GtkWidget *item = NULL;
- g_signal_connect
+ g_signal_connect
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_cell_cb), hf_state);
menu = gtk_menu_new ();
item = gtk_menu_item_new_with_label (("A1 (first cell of the page area)"));
- g_signal_connect
+ g_signal_connect
(G_OBJECT (item),
"activate", G_CALLBACK (hf_insert_cell_cb), hf_state);
g_object_set_data_full (G_OBJECT (item), "options", g_strdup("A1"), g_free);
@@ -1556,7 +1556,7 @@ hf_attach_insert_cell_menu (GtkMenuToolButton *button, HFCustomizeState* hf_stat
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
item = gtk_menu_item_new_with_label (("First Printed Cell Of The Page)"));
- g_signal_connect
+ g_signal_connect
(G_OBJECT (item),
"activate", G_CALLBACK (hf_insert_cell_cb), hf_state);
g_object_set_data_full (G_OBJECT (item), "options", g_strdup("rep|A1"), g_free);
@@ -1576,7 +1576,7 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
GladeXML *gui;
GtkTextView *left, *middle, *right;
GtkTextBuffer *left_buffer, *middle_buffer, *right_buffer;
-
+
GtkWidget *dialog;
HFCustomizeState* hf_state;
GtkToolButton *button;
@@ -1620,7 +1620,7 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
state->customize_footer = dialog;
gtk_window_set_title (GTK_WINDOW (dialog), _("Custom footer configuration"));
}
-
+
hf_state->left_buffer = left_buffer = gtk_text_view_get_buffer (left);
hf_state->middle_buffer = middle_buffer = gtk_text_view_get_buffer (middle);
hf_state->right_buffer = right_buffer = gtk_text_view_get_buffer (right);
@@ -1633,18 +1633,18 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
add_text_to_buffer (hf_state, middle_buffer, (*(hf_state->hf))->middle_format);
add_text_to_buffer (hf_state, right_buffer, (*(hf_state->hf))->right_format);
- g_signal_connect (G_OBJECT (left_buffer), "delete-range",
+ g_signal_connect (G_OBJECT (left_buffer), "delete-range",
G_CALLBACK (buffer_delete_range_cb), hf_state);
- g_signal_connect (G_OBJECT (middle_buffer), "delete-range",
+ g_signal_connect (G_OBJECT (middle_buffer), "delete-range",
G_CALLBACK (buffer_delete_range_cb), hf_state);
- g_signal_connect (G_OBJECT (right_buffer), "delete-range",
+ g_signal_connect (G_OBJECT (right_buffer), "delete-range",
G_CALLBACK (buffer_delete_range_cb), hf_state);
g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (gui, "apply_button")),
"clicked", G_CALLBACK (hf_customize_apply), hf_state);
g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (gui, "ok_button")),
"clicked", G_CALLBACK (hf_customize_ok), hf_state);
- g_signal_connect_swapped
+ g_signal_connect_swapped
(G_OBJECT (glade_xml_get_widget (gui, "cancel_button")),
"clicked", G_CALLBACK (gtk_widget_destroy), dialog);
gtk_widget_set_sensitive (glade_xml_get_widget (gui, "apply_button"), FALSE);
@@ -1652,11 +1652,11 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
if (header)
g_signal_connect (G_OBJECT (dialog), "destroy",
- G_CALLBACK (gtk_widget_destroyed),
+ G_CALLBACK (gtk_widget_destroyed),
&state->customize_header);
else
g_signal_connect (G_OBJECT (dialog), "destroy",
- G_CALLBACK (gtk_widget_destroyed),
+ G_CALLBACK (gtk_widget_destroyed),
&state->customize_footer);
@@ -1675,7 +1675,7 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
header ? GNUMERIC_HELP_LINK_PRINTER_SETUP_HEADER_CUSTOMIZATION
: GNUMERIC_HELP_LINK_PRINTER_SETUP_FOOTER_CUSTOMIZATION);
- g_signal_connect_swapped
+ g_signal_connect_swapped
(G_OBJECT (glade_xml_get_widget (gui, "delete-button")),
"clicked", G_CALLBACK (hf_delete_tag_cb), hf_state);
@@ -1685,19 +1685,19 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
button = GTK_TOOL_BUTTON (glade_xml_get_widget (gui, "insert-page-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Page");
- g_signal_connect_swapped
+ g_signal_connect_swapped
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_page_cb), hf_state);
button = GTK_TOOL_BUTTON (glade_xml_get_widget (gui, "insert-pages-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Pages");
- g_signal_connect_swapped
+ g_signal_connect_swapped
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_pages_cb), hf_state);
button = GTK_TOOL_BUTTON (glade_xml_get_widget (gui, "insert-sheet-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Sheet");
- g_signal_connect_swapped
+ g_signal_connect_swapped
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_sheet_cb), hf_state);
@@ -1705,24 +1705,24 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Time");
hf_attach_insert_time_menu (GTK_MENU_TOOL_BUTTON (button), hf_state);
- g_signal_connect_swapped
+ g_signal_connect_swapped
(G_OBJECT (glade_xml_get_widget (gui, "insert-file-button")),
"clicked", G_CALLBACK (hf_insert_file_cb), hf_state);
- g_signal_connect_swapped
+ g_signal_connect_swapped
(G_OBJECT (glade_xml_get_widget (gui, "insert-path-button")),
"clicked", G_CALLBACK (hf_insert_path_cb), hf_state);
button = GTK_TOOL_BUTTON (glade_xml_get_widget (gui, "insert-cell-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Cell");
hf_attach_insert_cell_menu (GTK_MENU_TOOL_BUTTON (button), hf_state);
-
+
/* Let them begin typing into the first entry widget. */
gtk_widget_grab_focus (GTK_WIDGET (left));
- gtk_window_set_transient_for (GTK_WINDOW (dialog),
- GTK_WINDOW (state->dialog));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog),
+ GTK_WINDOW (state->dialog));
/* The following would cause the dialog to be below the page setup dialog: */
/* go_gtk_window_set_transient (GTK_WINDOW (dialog), GTK_WINDOW (state->dialog)); */
@@ -1747,7 +1747,7 @@ static char *
do_hf_dt_format_customize (gboolean date, HFCustomizeState *hf_state)
{
GladeXML *gui;
-
+
GtkWidget *dialog, *format_sel, *table;
HFDTFormatState* hf_dt_state;
gint result;
@@ -1771,7 +1771,7 @@ do_hf_dt_format_customize (gboolean date, HFCustomizeState *hf_state)
} else {
gtk_window_set_title (GTK_WINDOW (dialog), _("Time format selection"));
}
-
+
g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (gui, "ok_button")),
"clicked", G_CALLBACK (hf_dt_customize_ok), hf_dt_state);
@@ -1787,8 +1787,8 @@ do_hf_dt_format_customize (gboolean date, HFCustomizeState *hf_state)
return NULL;
}
hf_dt_state->format_sel = format_sel = go_format_sel_new ();
- go_format_sel_set_style_format
- (GO_FORMAT_SEL (format_sel),
+ go_format_sel_set_style_format
+ (GO_FORMAT_SEL (format_sel),
date ? go_format_default_date () : go_format_default_time ());
gtk_widget_show_all (dialog);
@@ -1826,7 +1826,7 @@ header_preview_event (G_GNUC_UNUSED GocCanvas *canvas,
event->type != GDK_2BUTTON_PRESS ||
event->button.button != 1)
return FALSE;
- do_hf_customize (TRUE, state);
+ do_hf_customize (TRUE, state);
return TRUE;
}
@@ -1838,7 +1838,7 @@ footer_preview_event (G_GNUC_UNUSED GocCanvas *canvas,
event->type != GDK_2BUTTON_PRESS ||
event->button.button != 1)
return FALSE;
- do_hf_customize (FALSE, state);
+ do_hf_customize (FALSE, state);
return TRUE;
}
@@ -1897,8 +1897,8 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
style = gnm_conf_get_printer_decoration_font ();
font_desc = pango_font_description_new ();
pango_font_description_set_family (font_desc, gnm_style_get_font_name (style));
- pango_font_description_set_style
- (font_desc, gnm_style_get_font_italic (style) ?
+ pango_font_description_set_style
+ (font_desc, gnm_style_get_font_italic (style) ?
PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL);
pango_font_description_set_variant (font_desc, PANGO_VARIANT_NORMAL);
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_NORMAL);
@@ -1914,7 +1914,7 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
"text", "Left",
NULL);
gostyle = go_styled_object_get_style (GO_STYLED_OBJECT (pi->left));
- go_style_set_font_desc (gostyle, pango_font_description_copy (font_desc));
+ go_style_set_font_desc (gostyle, pango_font_description_copy (font_desc));
pi->middle = goc_item_new (
goc_canvas_get_root (GOC_CANVAS (pi->canvas)),
@@ -1925,7 +1925,7 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
"text", "Center",
NULL);
gostyle = go_styled_object_get_style (GO_STYLED_OBJECT (pi->left));
- go_style_set_font_desc (gostyle, pango_font_description_copy (font_desc));
+ go_style_set_font_desc (gostyle, pango_font_description_copy (font_desc));
pi->right = goc_item_new (
goc_canvas_get_root (GOC_CANVAS (pi->canvas)),
@@ -1936,7 +1936,7 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
"text", "Right",
NULL);
gostyle = go_styled_object_get_style (GO_STYLED_OBJECT (pi->left));
- go_style_set_font_desc (gostyle, pango_font_description_copy (font_desc));
+ go_style_set_font_desc (gostyle, pango_font_description_copy (font_desc));
pango_font_description_free (font_desc);
@@ -2033,7 +2033,7 @@ static void
load_print_area (PrinterSetupState *state)
{
GnmRange *print_area;
-
+
print_area = sheet_get_nominal_printarea
(wb_control_cur_sheet
(WORKBOOK_CONTROL (state->wbcg)));
@@ -2108,15 +2108,15 @@ do_setup_page_info (PrinterSetupState *state)
g_signal_connect (G_OBJECT (order_rd), "toggled", G_CALLBACK (display_order_icon), state);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gridlines),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gridlines),
state->pi->print_grid_lines);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (onlystyles),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (onlystyles),
state->pi->print_even_if_only_styles);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bw),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bw),
state->pi->print_black_and_white);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (titles),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (titles),
state->pi->print_titles);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (do_not_print),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (do_not_print),
state->pi->do_not_print);
order = state->pi->print_across_then_down ? order_rd : order_dr;
@@ -2238,19 +2238,19 @@ do_update_page (PrinterSetupState *state)
switch (print_info_get_paper_orientation (state->pi)) {
case GTK_PAGE_ORIENTATION_PORTRAIT:
- gtk_toggle_button_set_active
+ gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (state->portrait_radio), TRUE);
break;
case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
- gtk_toggle_button_set_active
+ gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (state->rev_portrait_radio), TRUE);
break;
case GTK_PAGE_ORIENTATION_LANDSCAPE:
- gtk_toggle_button_set_active
+ gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (state->landscape_radio), TRUE);
break;
default:
- gtk_toggle_button_set_active
+ gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (state->rev_landscape_radio), TRUE);
break;
}
@@ -2260,13 +2260,13 @@ do_update_page (PrinterSetupState *state)
static void
orientation_changed_cb (PrinterSetupState *state)
{
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->portrait_radio)))
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->portrait_radio)))
print_info_set_paper_orientation (state->pi, GTK_PAGE_ORIENTATION_PORTRAIT);
- else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->rev_portrait_radio)))
+ else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->rev_portrait_radio)))
print_info_set_paper_orientation (state->pi, GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT);
- else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->landscape_radio)))
+ else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->landscape_radio)))
print_info_set_paper_orientation (state->pi, GTK_PAGE_ORIENTATION_LANDSCAPE);
- else
+ else
print_info_set_paper_orientation (state->pi, GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE);
do_update_page (state);
}
@@ -2278,9 +2278,9 @@ do_setup_page (PrinterSetupState *state)
gui = state->gui;
- g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (gui, "paper-button")),
- "clicked",
- G_CALLBACK (dialog_gtk_printer_setup_cb), state);
+ g_signal_connect_swapped (G_OBJECT (glade_xml_get_widget (gui, "paper-button")),
+ "clicked",
+ G_CALLBACK (dialog_gtk_printer_setup_cb), state);
state->portrait_radio = glade_xml_get_widget (gui, "portrait-button");
state->landscape_radio = glade_xml_get_widget (gui, "landscape-button");
@@ -2295,9 +2295,9 @@ do_setup_page (PrinterSetupState *state)
G_CALLBACK (orientation_changed_cb), state);
do_setup_margin (state);
-
+
do_update_page (state);
-
+
}
@@ -2314,11 +2314,11 @@ static void
scaling_fit_to_h_changed (GtkToggleButton *toggle, PrinterSetupState *state)
{
gboolean scale_fit_to_h = gtk_toggle_button_get_active (toggle);
- gtk_widget_set_sensitive
- (GTK_WIDGET (glade_xml_get_widget (state->gui, "scale-h-spin")),
+ gtk_widget_set_sensitive
+ (GTK_WIDGET (glade_xml_get_widget (state->gui, "scale-h-spin")),
scale_fit_to_h);
- gtk_widget_set_sensitive
- (GTK_WIDGET (glade_xml_get_widget (state->gui, "fit-h-check-label")),
+ gtk_widget_set_sensitive
+ (GTK_WIDGET (glade_xml_get_widget (state->gui, "fit-h-check-label")),
scale_fit_to_h);
}
@@ -2332,7 +2332,7 @@ scaling_fit_to_v_changed (GtkToggleButton *toggle, PrinterSetupState *state)
gtk_widget_set_sensitive
(GTK_WIDGET (glade_xml_get_widget (state->gui, "fit-v-check-label")),
scale_fit_to_v);
-}
+}
static void
scaling_fit_to_changed (GtkToggleButton *toggle, PrinterSetupState *state)
@@ -2340,7 +2340,7 @@ scaling_fit_to_changed (GtkToggleButton *toggle, PrinterSetupState *state)
gboolean scale_fit_to = gtk_toggle_button_get_active (toggle);
if (scale_fit_to) {
- scaling_fit_to_h_changed (GTK_TOGGLE_BUTTON
+ scaling_fit_to_h_changed (GTK_TOGGLE_BUTTON
(glade_xml_get_widget (state->gui, "fit-h-check")), state);
scaling_fit_to_v_changed (GTK_TOGGLE_BUTTON
(glade_xml_get_widget (state->gui, "fit-v-check")), state);
@@ -2384,20 +2384,20 @@ do_setup_scale (PrinterSetupState *state)
scaling_percent_changed (GTK_TOGGLE_BUTTON (state->scale_percent_radio), state);
scaling_fit_to_changed (GTK_TOGGLE_BUTTON (state->scale_fit_to_radio), state);
-
- if (pi->scaling.type == PRINT_SCALE_PERCENTAGE) {
+
+ if (pi->scaling.type == PRINT_SCALE_PERCENTAGE) {
if (pi->scaling.percentage.x == 100.)
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (state->scale_no_radio), TRUE);
else
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (state->scale_percent_radio), TRUE);
- } else {
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (state->scale_fit_to_radio), TRUE);
- }
-
+ } else {
+ gtk_toggle_button_set_active
+ (GTK_TOGGLE_BUTTON (state->scale_fit_to_radio), TRUE);
+ }
+
scale_percent_spin = glade_xml_get_widget (gui, "scale-percent-spin");
gtk_spin_button_set_value (
GTK_SPIN_BUTTON (scale_percent_spin), pi->scaling.percentage.x);
@@ -2464,7 +2464,7 @@ cb_do_print_ok (PrinterSetupState *state)
fetch_settings (state);
if (gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (
- glade_xml_get_widget (state->gui,
+ glade_xml_get_widget (state->gui,
"is_default_check")))) {
print_info_save (state->pi);
}
@@ -2486,11 +2486,11 @@ cb_do_print (PrinterSetupState *state)
static void
cb_do_print_destroy (PrinterSetupState *state)
{
- if (state->customize_header)
- gtk_widget_destroy (state->customize_header);
+ if (state->customize_header)
+ gtk_widget_destroy (state->customize_header);
- if (state->customize_footer)
- gtk_widget_destroy (state->customize_footer);
+ if (state->customize_footer)
+ gtk_widget_destroy (state->customize_footer);
g_object_unref (state->gui);
@@ -2560,13 +2560,13 @@ do_setup_main_dialog (PrinterSetupState *state)
state->dialog = glade_xml_get_widget (state->gui, "print-setup");
- w = glade_xml_get_widget (state->gui, "ok");
- g_signal_connect_swapped (G_OBJECT (w),
- "clicked",
- G_CALLBACK (cb_do_print_ok), state);
- w = glade_xml_get_widget (state->gui, "print");
- g_signal_connect_swapped (G_OBJECT (w),
- "clicked",
+ w = glade_xml_get_widget (state->gui, "ok");
+ g_signal_connect_swapped (G_OBJECT (w),
+ "clicked",
+ G_CALLBACK (cb_do_print_ok), state);
+ w = glade_xml_get_widget (state->gui, "print");
+ g_signal_connect_swapped (G_OBJECT (w),
+ "clicked",
G_CALLBACK (cb_do_print), state);
w = glade_xml_get_widget (state->gui, "preview");
g_signal_connect_swapped (G_OBJECT (w),
@@ -2576,10 +2576,10 @@ do_setup_main_dialog (PrinterSetupState *state)
g_signal_connect_swapped (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_do_print_cancel), state);
-
+
w = glade_xml_get_widget (state->gui, "print-setup-notebook");
gtk_notebook_set_current_page (GTK_NOTEBOOK (w), 0);
-
+
g_object_set_data_full (G_OBJECT (state->dialog),
"state", state, (GDestroyNotify) cb_do_print_destroy);
wbc_gtk_attach_guru (state->wbcg, state->dialog);
@@ -2602,12 +2602,12 @@ printer_setup_state_new (WBCGtk *wbcg, Sheet *sheet)
state->gui = gui;
state->pi = print_info_dup (sheet->print_info);
state->display_unit = state->pi->desired_display.top;
- state->customize_header = NULL;
- state->customize_footer = NULL;
+ state->customize_header = NULL;
+ state->customize_footer = NULL;
do_setup_main_dialog (state);
do_setup_sheet_selector (state);
- do_setup_hf (state);
+ do_setup_hf (state);
do_setup_page_info (state);
do_setup_page (state);
do_setup_scale (state);
@@ -2663,7 +2663,7 @@ do_fetch_scale (PrinterSetupState *state)
state->pi->scaling.dim.cols =
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (w));
}
-
+
w = glade_xml_get_widget (gui, "fit-v-check");
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
state->pi->scaling.dim.rows = 0;
@@ -2722,13 +2722,13 @@ do_fetch_page_info (PrinterSetupState *state)
{
PrintInformation *pi = state->pi;
- pi->print_grid_lines = gtk_toggle_button_get_active
+ pi->print_grid_lines = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "check-grid-lines")));
- pi->print_even_if_only_styles = gtk_toggle_button_get_active
+ pi->print_even_if_only_styles = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "check-only-styles")));
- pi->print_black_and_white = gtk_toggle_button_get_active
+ pi->print_black_and_white = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "check-black-white")));
- pi->print_titles = gtk_toggle_button_get_active
+ pi->print_titles = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "check-print-titles")));
pi->print_across_then_down = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "radio-order-right")));
@@ -2770,7 +2770,7 @@ static void
dialog_gtk_printer_setup_cb (PrinterSetupState *state)
{
GtkPageSetup *page_setup = print_info_get_page_setup (state->pi);
-
+
gtk_print_run_page_setup_dialog_async
(GTK_WINDOW (state->dialog),
page_setup,
@@ -2801,7 +2801,7 @@ dialog_printer_setup (WBCGtk *wbcg, Sheet *sheet)
if (!state)
return;
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
diff --git a/src/dialogs/dialog-quit.c b/src/dialogs/dialog-quit.c
index 5f9c16b..1bd415c 100644
--- a/src/dialogs/dialog-quit.c
+++ b/src/dialogs/dialog-quit.c
@@ -190,7 +190,7 @@ show_quit_dialog (GList *dirty, WBCGtk *wbcg)
_("Save selected documents and then quit"));
} else {
button = go_gtk_dialog_add_button (dialog,
- _("_Discard"),
+ _("_Discard"),
GTK_STOCK_DELETE,
GTK_RESPONSE_NO);
go_widget_set_tooltip_text (button, _("Discard changes"));
@@ -203,7 +203,7 @@ show_quit_dialog (GList *dirty, WBCGtk *wbcg)
}
button = go_gtk_dialog_add_button (dialog,
- _("Don't Quit"),
+ _("Don't Quit"),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
go_widget_set_tooltip_text (button, _("Resume editing"));
diff --git a/src/dialogs/dialog-row-height.c b/src/dialogs/dialog-row-height.c
index ff18cc2..e547e26 100644
--- a/src/dialogs/dialog-row-height.c
+++ b/src/dialogs/dialog-row-height.c
@@ -297,7 +297,7 @@ dialog_row_height (WBCGtk *wbcg, gboolean use_default)
g_object_set_data_full (G_OBJECT (state->dialog),
"state", state, (GDestroyNotify) cb_dialog_row_height_destroy);
- gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
+ gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
diff --git a/src/dialogs/dialog-scenarios.c b/src/dialogs/dialog-scenarios.c
index 3571e81..0bd01fd 100644
--- a/src/dialogs/dialog-scenarios.c
+++ b/src/dialogs/dialog-scenarios.c
@@ -619,7 +619,7 @@ init_scenario_buttons (ScenariosState *state)
return TRUE;
g_signal_connect (G_OBJECT (state->scenario_state->summary_button),
"clicked",
- G_CALLBACK (scenarios_summary_clicked_cb),
+ G_CALLBACK (scenarios_summary_clicked_cb),
state);
set_selection_state (state, FALSE);
diff --git a/src/dialogs/dialog-sheet-order.c b/src/dialogs/dialog-sheet-order.c
index 5000123..2cb478d 100644
--- a/src/dialogs/dialog-sheet-order.c
+++ b/src/dialogs/dialog-sheet-order.c
@@ -167,9 +167,9 @@ cb_name_edited (GtkCellRendererText *cell,
if (cell != NULL) {
path = gtk_tree_path_new_from_string (path_string);
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->model),
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->model),
&iter, path))
- gtk_list_store_set (state->model, &iter,
+ gtk_list_store_set (state->model, &iter,
SHEET_NEW_NAME, new_text, -1);
else
g_warning ("Did not get a valid iterator");
@@ -183,7 +183,7 @@ cb_name_edited (GtkCellRendererText *cell,
gtk_label_set_text (GTK_LABEL (state->warning), error);
} else {
gtk_widget_set_sensitive (state->apply_names_btn, changed);
- gtk_label_set_markup (GTK_LABEL (state->warning),
+ gtk_label_set_markup (GTK_LABEL (state->warning),
changed ? _("<b>Note:</b> A sheet name change is pending.") : "");
}
}
@@ -211,17 +211,17 @@ gtmff_asc (GtkTreeModel *model, GtkTreePath *path,
Sheet *this_sheet;
char *name;
gtmff_sort_t *ptr;
-
+
ptr = g_new (gtmff_sort_t, 1);
- gtk_tree_model_get (model, iter,
+ gtk_tree_model_get (model, iter,
SHEET_POINTER, &this_sheet,
SHEET_NAME, &name,
-1);
ptr->i = this_sheet->index_in_wb;
ptr->key = g_utf8_collate_key_for_filename (name, -1);
- *l = g_slist_insert_sorted (*l, ptr, (GCompareFunc) gtmff_compare_func);
+ *l = g_slist_insert_sorted (*l, ptr, (GCompareFunc) gtmff_compare_func);
return FALSE;
}
@@ -248,7 +248,7 @@ sort_asc_desc (SheetManager *state, gboolean asc)
gtmff_sort_t *ptr = l_tmp->data;
GtkTreeIter iter;
Sheet *sheet;
-
+
gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (state->model),
&iter, NULL, ptr->i);
g_free (ptr->key);
@@ -265,7 +265,7 @@ sort_asc_desc (SheetManager *state, gboolean asc)
/* Now we change the list store */
dialog_sheet_order_update_sheet_order (state);
-
+
cmd_reorganize_sheets (wbc, old_state, NULL);
update_undo (state, wbc);
@@ -311,11 +311,11 @@ cb_color_changed_fore (G_GNUC_UNUSED GOComboColor *go_combo_color,
WorkbookControl *wbc;
Workbook *wb;
WorkbookSheetState *old_state;
-
+
gtk_tree_model_get (GTK_TREE_MODEL (state->model), &sel_iter,
SHEET_POINTER, &this_sheet,
-1);
-
+
p_gdk_color = (color == 0) ? NULL : go_color_to_gdk (color, &gdk_color);
if (color_equal (p_gdk_color, this_sheet->tab_text_color))
@@ -357,11 +357,11 @@ cb_color_changed_back (G_GNUC_UNUSED GOComboColor *go_combo_color,
WorkbookControl *wbc;
Workbook *wb;
WorkbookSheetState *old_state;
-
+
gtk_tree_model_get (GTK_TREE_MODEL (state->model), &sel_iter,
SHEET_POINTER, &this_sheet,
-1);
-
+
p_gdk_color = (color == 0) ? NULL : go_color_to_gdk (color, &gdk_color);
if (color_equal (p_gdk_color, this_sheet->tab_color))
@@ -468,20 +468,20 @@ cb_toggled_lock (G_GNUC_UNUSED GtkCellRendererToggle *cell,
Workbook *wb = wb_control_get_workbook (wbc);
if (gtk_tree_model_get_iter (model, &iter, path)) {
- gtk_tree_model_get (model, &iter,
- SHEET_LOCKED, &is_locked,
+ gtk_tree_model_get (model, &iter,
+ SHEET_LOCKED, &is_locked,
SHEET_POINTER, &this_sheet,
-1);
if (is_locked) {
- gtk_list_store_set
+ gtk_list_store_set
(GTK_LIST_STORE (model), &iter, SHEET_LOCKED,
- FALSE, SHEET_LOCK_IMAGE,
+ FALSE, SHEET_LOCK_IMAGE,
state->image_padlock_no, -1);
} else {
- gtk_list_store_set
+ gtk_list_store_set
(GTK_LIST_STORE (model), &iter, SHEET_LOCKED,
- TRUE, SHEET_LOCK_IMAGE,
+ TRUE, SHEET_LOCK_IMAGE,
state->image_padlock, -1);
}
} else {
@@ -512,14 +512,14 @@ cb_toggled_direction (G_GNUC_UNUSED GtkCellRendererToggle *cell,
Workbook *wb = wb_control_get_workbook (wbc);
if (gtk_tree_model_get_iter (model, &iter, path)) {
- gtk_tree_model_get (model, &iter,
- SHEET_DIRECTION, &is_rtl,
+ gtk_tree_model_get (model, &iter,
+ SHEET_DIRECTION, &is_rtl,
SHEET_POINTER, &this_sheet,
-1);
- gtk_list_store_set
+ gtk_list_store_set
(GTK_LIST_STORE (model), &iter,
SHEET_DIRECTION, !is_rtl,
- SHEET_DIRECTION_IMAGE,
+ SHEET_DIRECTION_IMAGE,
is_rtl ? state->image_ltr : state->image_rtl,
-1);
} else {
@@ -552,8 +552,8 @@ cb_sheet_order_cnt_visible (GtkTreeModel *model,
gboolean is_visible;
Sheet *this_sheet;
- gtk_tree_model_get (model, iter,
- SHEET_VISIBLE, &is_visible,
+ gtk_tree_model_get (model, iter,
+ SHEET_VISIBLE, &is_visible,
SHEET_POINTER, &this_sheet,
-1);
if (is_visible != (this_sheet->visibility == GNM_SHEET_VISIBILITY_VISIBLE)) {
@@ -565,7 +565,7 @@ cb_sheet_order_cnt_visible (GtkTreeModel *model,
-1);
is_visible = (this_sheet->visibility == GNM_SHEET_VISIBILITY_VISIBLE);
}
-
+
if (is_visible)
(svc->i)++;
@@ -604,18 +604,18 @@ cb_toggled_visible (G_GNUC_UNUSED GtkCellRendererToggle *cell,
return;
}
- gtk_tree_model_get (model, &iter,
- SHEET_VISIBLE, &is_visible,
+ gtk_tree_model_get (model, &iter,
+ SHEET_VISIBLE, &is_visible,
SHEET_POINTER, &this_sheet,
-1);
-
+
if (is_visible) {
cnt = sheet_order_cnt_visible (state);
if (cnt <= 1) {
/* Note: sheet_order_cnt_visible may have changed whether this sheet is indeed */
/* so we should not post a warning message if the sheet has become invisible. */
- gtk_tree_model_get (model, &iter,
- SHEET_VISIBLE, &is_visible,
+ gtk_tree_model_get (model, &iter,
+ SHEET_VISIBLE, &is_visible,
-1);
if (is_visible) {
go_gtk_notice_dialog (GTK_WINDOW (state->dialog), GTK_MESSAGE_ERROR,
@@ -628,20 +628,20 @@ cb_toggled_visible (G_GNUC_UNUSED GtkCellRendererToggle *cell,
SHEET_VISIBLE, FALSE,
SHEET_VISIBLE_IMAGE, NULL,
-1);
-
+
} else {
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
SHEET_VISIBLE, TRUE,
- SHEET_VISIBLE_IMAGE,
+ SHEET_VISIBLE_IMAGE,
state->image_visible,
-1);
}
gtk_tree_path_free (path);
-
+
old_state = workbook_sheet_state_new (wb);
g_object_set (this_sheet,
- "visibility",
- !is_visible ? GNM_SHEET_VISIBILITY_VISIBLE
+ "visibility",
+ !is_visible ? GNM_SHEET_VISIBILITY_VISIBLE
: GNM_SHEET_VISIBILITY_HIDDEN,
NULL);
@@ -761,7 +761,7 @@ create_sheet_list (SheetManager *state)
gtk_tree_view_set_reorderable (state->sheet_list, TRUE);
/* Init the buttons & selection */
- state->model_selection_changed_listener =
+ state->model_selection_changed_listener =
g_signal_connect (selection,
"changed",
G_CALLBACK (cb_selection_changed), state);
@@ -801,7 +801,7 @@ set_sheet_info_at_iter (SheetManager *state, GtkTreeIter *iter, Sheet *sheet)
? state->image_rtl
: state->image_ltr),
-1);
-
+
}
@@ -844,7 +844,7 @@ populate_sheet_list (SheetManager *state)
if (state->model_row_insertion_listener)
g_signal_handler_unblock (state->model, state->model_row_insertion_listener);
- g_signal_handler_unblock (selection, state->model_selection_changed_listener);
+ g_signal_handler_unblock (selection, state->model_selection_changed_listener);
/* Init the buttons & selection */
cb_selection_changed (NULL, state);
@@ -894,7 +894,7 @@ cb_add_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
Sheet *sheet, *old_sheet = NULL;
if (gtk_tree_selection_get_selected (selection, NULL, &sel_iter)) {
- gtk_tree_model_get (GTK_TREE_MODEL (state->model), &sel_iter,
+ gtk_tree_model_get (GTK_TREE_MODEL (state->model), &sel_iter,
SHEET_POINTER, &old_sheet,
-1);
index = old_sheet->index_in_wb;
@@ -923,7 +923,7 @@ cb_add_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
g_signal_handler_unblock (state->model, state->model_row_insertion_listener);
set_sheet_info_at_iter (state, &iter, sheet);
-
+
cb_selection_changed (NULL, state);
}
@@ -949,11 +949,11 @@ cb_append_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
workbook_signals_unblock (state);
sheet = workbook_sheet_by_index (wb, workbook_sheet_count (wb) - 1);
-
+
g_signal_handler_block (state->model, state->model_row_insertion_listener);
gtk_list_store_append (state->model, &iter);
g_signal_handler_unblock (state->model, state->model_row_insertion_listener);
-
+
set_sheet_info_at_iter (state, &iter, sheet);
cb_selection_changed (NULL, state);
@@ -974,8 +974,8 @@ cb_duplicate_clicked (G_GNUC_UNUSED GtkWidget *ignore,
if (!gtk_tree_selection_get_selected (selection, NULL, &sel_iter)) {
g_warning ("No selection!");
}
-
- gtk_tree_model_get (GTK_TREE_MODEL (state->model), &sel_iter,
+
+ gtk_tree_model_get (GTK_TREE_MODEL (state->model), &sel_iter,
SHEET_POINTER, &this_sheet,
-1);
@@ -996,7 +996,7 @@ cb_duplicate_clicked (G_GNUC_UNUSED GtkWidget *ignore,
g_signal_handler_unblock (state->model, state->model_row_insertion_listener);
set_sheet_info_at_iter (state, &iter, new_sheet);
- g_object_unref (new_sheet);
+ g_object_unref (new_sheet);
cb_selection_changed (NULL, state);
}
@@ -1029,14 +1029,14 @@ cb_delete_clicked (G_GNUC_UNUSED GtkWidget *ignore,
gtk_list_store_remove (state->model, &sel_iter);
workbook_signals_block (state);
-
+
old_state = workbook_sheet_state_new (wb);
workbook_sheet_delete (sheet);
cmd_reorganize_sheets (wbc, old_state, NULL);
update_undo (state, wbc);
workbook_signals_unblock (state);
-
+
cb_selection_changed (NULL, state);
cb_name_edited (NULL, NULL, NULL, state);
}
@@ -1078,10 +1078,10 @@ verify_validity (SheetManager *state, gboolean *pchanged)
g_free (new_name2);
} else
g_hash_table_insert (names, new_name2, new_name2);
-
+
if (*new_name && strcmp (old_name, new_name))
changed = TRUE;
-
+
g_free (old_name);
g_free (new_name);
n++;
@@ -1125,11 +1125,11 @@ cb_apply_names_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
SHEET_NEW_NAME, "",
-1);
}
-
+
g_free (new_name);
n++;
}
-
+
cmd_reorganize_sheets (wbc, old_state, NULL);
gtk_label_set_text (GTK_LABEL (state->warning), "");
update_undo (state, wbc);
@@ -1289,7 +1289,7 @@ cb_sheet_added (Workbook *wb, SheetManager *state)
-static void
+static void
dialog_sheet_order_changed (SheetManager *state)
{
WorkbookControl *wbc = WORKBOOK_CONTROL (state->wbcg);
@@ -1317,13 +1317,13 @@ dialog_sheet_order_changed (SheetManager *state)
if (changes > 0) {
cmd_reorganize_sheets (wbc, old_state, NULL);
update_undo (state, wbc);
- } else
- workbook_sheet_state_free (old_state);
+ } else
+ workbook_sheet_state_free (old_state);
workbook_signals_unblock (state);
}
-static void
+static void
cb_dialog_order_changed (G_GNUC_UNUSED GtkListStore *model,
G_GNUC_UNUSED GtkTreePath *path,
G_GNUC_UNUSED GtkTreeIter *iter,
@@ -1341,14 +1341,14 @@ dialog_sheet_order_changed_idle_handler (SheetManager *state)
}
-static void
+static void
cb_dialog_order_changed_by_insertion (G_GNUC_UNUSED GtkListStore *model,
G_GNUC_UNUSED GtkTreePath *path,
G_GNUC_UNUSED GtkTreeIter *iter,
SheetManager *state)
{
- g_idle_add_full (G_PRIORITY_HIGH_IDLE,
- (GSourceFunc)dialog_sheet_order_changed_idle_handler,
+ g_idle_add_full (G_PRIORITY_HIGH_IDLE,
+ (GSourceFunc)dialog_sheet_order_changed_idle_handler,
state, NULL);
}
@@ -1365,10 +1365,10 @@ cb_undo_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
}
static void
-cb_adv_check_toggled (G_GNUC_UNUSED GtkToggleButton *ignored,
+cb_adv_check_toggled (G_GNUC_UNUSED GtkToggleButton *ignored,
SheetManager *state)
{
- gboolean visible = gtk_toggle_button_get_active
+ gboolean visible = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->advanced_check));
gtk_tree_view_column_set_visible (state->dir_column, visible);
@@ -1395,7 +1395,7 @@ dialog_sheet_order (WBCGtk *wbcg)
wb = wb_control_get_workbook (WORKBOOK_CONTROL (wbcg));
if (g_object_get_data (G_OBJECT (wb), SHEET_ORDER_KEY)) {
- GtkWidget *dialog = gtk_message_dialog_new
+ GtkWidget *dialog = gtk_message_dialog_new
(wbcg_toplevel (wbcg),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
@@ -1403,7 +1403,7 @@ dialog_sheet_order (WBCGtk *wbcg)
_("Another view is already managing sheets"));
go_gtk_dialog_run (GTK_DIALOG (dialog), wbcg_toplevel (wbcg));
return;
- }
+ }
g_object_set_data (G_OBJECT (wb), SHEET_ORDER_KEY, (gpointer) gui);
state = g_new0 (SheetManager, 1);
state->gui = gui;
@@ -1420,7 +1420,7 @@ dialog_sheet_order (WBCGtk *wbcg)
state->apply_names_btn = glade_xml_get_widget (gui, "ok_button");
state->sort_asc_btn = glade_xml_get_widget (gui, "sort-asc-button");
state->sort_desc_btn = glade_xml_get_widget (gui, "sort-desc-button");
- state->undo_btn = glade_xml_get_widget (gui, "undo-button");
+ state->undo_btn = glade_xml_get_widget (gui, "undo-button");
state->cancel_btn = glade_xml_get_widget (gui, "cancel_button");
state->advanced_check = glade_xml_get_widget (gui, "advanced-check");
state->initial_colors_set = FALSE;
diff --git a/src/dialogs/dialog-so-list.c b/src/dialogs/dialog-so-list.c
index bd3bb1a..83bb0b4 100644
--- a/src/dialogs/dialog-so-list.c
+++ b/src/dialogs/dialog-so-list.c
@@ -72,8 +72,8 @@ init_entry (GnmDialogSOList *state, char const *name,
"scg", wbcg_cur_scg (state->wbcg),
"with-icon", TRUE,
NULL);
- gnm_expr_entry_set_flags (gee, GNM_EE_FORCE_ABS_REF |
- GNM_EE_SHEET_OPTIONAL |
+ gnm_expr_entry_set_flags (gee, GNM_EE_FORCE_ABS_REF |
+ GNM_EE_SHEET_OPTIONAL |
GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
gnm_expr_entry_load_from_dep (gee, dep);
return gee;
@@ -91,9 +91,9 @@ cb_so_list_response (GtkWidget *dialog, gint response_id, GnmDialogSOList *state
GnmExprTop const *content;
parse_pos_init (&pp, sheet->workbook, sheet, 0, 0);
- output = gnm_expr_entry_parse (state->link_entry,
+ output = gnm_expr_entry_parse (state->link_entry,
&pp, NULL, FALSE, GNM_EE_FORCE_ABS_REF);
- content = gnm_expr_entry_parse (state->content_entry,
+ content = gnm_expr_entry_parse (state->content_entry,
&pp, NULL, FALSE, GNM_EE_FORCE_ABS_REF);
cmd_so_set_links (WORKBOOK_CONTROL (state->wbcg), state->so, output, content);
}
diff --git a/src/dialogs/dialog-so-styled.c b/src/dialogs/dialog-so-styled.c
index 8cadb0b..782caca 100644
--- a/src/dialogs/dialog-so-styled.c
+++ b/src/dialogs/dialog-so-styled.c
@@ -71,7 +71,7 @@ cb_dialog_so_styled_response (GtkWidget *dialog,
return;
if (response_id == GTK_RESPONSE_OK) {
cmd_object_format (WORKBOOK_CONTROL (pref->wbcg),
- SHEET_OBJECT (pref->so), pref->orig_style,
+ SHEET_OBJECT (pref->so), pref->orig_style,
pref->orig_text, pref->orig_attributes);
g_object_unref (pref->orig_style);
pref->orig_style = NULL;
@@ -93,7 +93,7 @@ cb_dialog_so_styled_text_widget_changed (GnmTextView *gtv, DialogSOStyled *state
g_object_set (state->so, "text", text, NULL);
g_free (text);
- g_object_get (gtv, "attributes", &attr, NULL);
+ g_object_get (gtv, "attributes", &attr, NULL);
g_object_set (state->so, "markup", attr, NULL);
pango_attr_list_unref (attr);
}
@@ -169,7 +169,7 @@ dialog_so_styled (WBCGtk *wbcg,
gtk_label_new (_("Content")));
else
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- text_w, TRUE, TRUE, TRUE);
+ text_w, TRUE, TRUE, TRUE);
}
g_signal_connect (G_OBJECT (dialog), "response",
diff --git a/src/dialogs/dialog-solver.c b/src/dialogs/dialog-solver.c
index 50c01be..82f76f5 100644
--- a/src/dialogs/dialog-solver.c
+++ b/src/dialogs/dialog-solver.c
@@ -417,7 +417,7 @@ cb_dialog_solver_destroy (SolverState *state)
if (state->ov_cell_stack != NULL &&
!state->cancelled &&
- !cmd_solver (WORKBOOK_CONTROL(state->wbcg), state->ov_cell_stack,
+ !cmd_solver (WORKBOOK_CONTROL(state->wbcg), state->ov_cell_stack,
state->ov_stack, NULL))
{
state->ov_cell_stack = NULL;
@@ -975,7 +975,7 @@ cb_dialog_solve_clicked (G_GNUC_UNUSED GtkWidget *button,
/* WARNING : The dialog may be deleted by the reports
* solver_reporting will return FALSE if state is gone and cleared */
if (solver_reporting (state, res, errmsg) &&
- res->status == SolverOptimal &&
+ res->status == SolverOptimal &&
param->options.add_scenario)
solver_add_scenario (state, res,
param->options.scenario_name);
diff --git a/src/dialogs/dialog-stf-csv-page.c b/src/dialogs/dialog-stf-csv-page.c
index 636f7e3..512be15 100644
--- a/src/dialogs/dialog-stf-csv-page.c
+++ b/src/dialogs/dialog-stf-csv-page.c
@@ -88,7 +88,7 @@ csv_page_global_change (G_GNUC_UNUSED GtkWidget *widget,
lines_chunk = g_string_chunk_new (100 * 1024);
/* Don't trim on this page. */
- trim = parseoptions->trim_spaces;
+ trim = parseoptions->trim_spaces;
stf_parse_options_set_trim_spaces (parseoptions, TRIM_TYPE_NEVER);
lines = stf_parse_general (parseoptions, lines_chunk,
pagedata->cur, pagedata->cur_end);
diff --git a/src/dialogs/dialog-stf-export.c b/src/dialogs/dialog-stf-export.c
index edf9936..fb7aa4d 100644
--- a/src/dialogs/dialog-stf-export.c
+++ b/src/dialogs/dialog-stf-export.c
@@ -352,7 +352,7 @@ static void
set_sheet_selection_count (TextExportState *state, int n)
{
state->sheets.num_selected = n;
- gtk_widget_set_sensitive (state->sheets.select_all,
+ gtk_widget_set_sensitive (state->sheets.select_all,
state->sheets.non_empty > n);
gtk_widget_set_sensitive (state->sheets.select_none, n != 0);
gtk_widget_set_sensitive (state->next_button, n != 0);
@@ -369,7 +369,7 @@ cb_set_sheet (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
-1);
if (value)
gtk_list_store_set (GTK_LIST_STORE (model), iter,
- STF_EXPORT_COL_EXPORTED,
+ STF_EXPORT_COL_EXPORTED,
GPOINTER_TO_INT (data),
-1);
return FALSE;
@@ -401,24 +401,24 @@ cb_selection_changed (GtkTreeSelection *new_selection,
GtkTreeIter iter, it;
gboolean first_selected = TRUE, last_selected = TRUE;
- GtkTreeSelection *selection =
- (new_selection == NULL)
- ? gtk_tree_view_get_selection (state->sheets.view)
+ GtkTreeSelection *selection =
+ (new_selection == NULL)
+ ? gtk_tree_view_get_selection (state->sheets.view)
: new_selection;
- if (selection != NULL
+ if (selection != NULL
&& gtk_tree_selection_count_selected_rows (selection) > 0
- && gtk_tree_model_get_iter_first
+ && gtk_tree_model_get_iter_first
(GTK_TREE_MODEL (state->sheets.model),
&iter)) {
- first_selected = gtk_tree_selection_iter_is_selected
+ first_selected = gtk_tree_selection_iter_is_selected
(selection, &iter);
it = iter;
- while (gtk_tree_model_iter_next
+ while (gtk_tree_model_iter_next
(GTK_TREE_MODEL (state->sheets.model),
&it))
iter = it;
- last_selected = gtk_tree_selection_iter_is_selected
+ last_selected = gtk_tree_selection_iter_is_selected
(selection, &iter);
}
@@ -450,21 +450,21 @@ move_element (TextExportState *state, gnm_iter_search_t iter_search)
cb_selection_changed (NULL, state);
}
-static void
-cb_sheet_up (TextExportState *state)
-{
- move_element (state, gnm_tree_model_iter_prev);
+static void
+cb_sheet_up (TextExportState *state)
+{
+ move_element (state, gnm_tree_model_iter_prev);
}
-static void
-cb_sheet_down (TextExportState *state)
-{
- move_element (state, gnm_tree_model_iter_next);
+static void
+cb_sheet_down (TextExportState *state)
+{
+ move_element (state, gnm_tree_model_iter_next);
}
-static void
-cb_sheet_top (TextExportState *state)
-{
+static void
+cb_sheet_top (TextExportState *state)
+{
GtkTreeIter this_iter;
GtkTreeSelection *selection = gtk_tree_view_get_selection (state->sheets.view);
@@ -472,12 +472,12 @@ cb_sheet_top (TextExportState *state)
if (!gtk_tree_selection_get_selected (selection, NULL, &this_iter))
return;
-
+
gtk_list_store_move_after (state->sheets.model, &this_iter, NULL);
cb_selection_changed (NULL, state);
}
-static void
+static void
cb_sheet_bottom (TextExportState *state)
{
GtkTreeIter this_iter;
@@ -500,17 +500,17 @@ cb_sheet_export_toggled (GtkCellRendererToggle *cell,
GtkTreeIter iter;
gboolean value;
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->sheets.model),
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (state->sheets.model),
&iter, path)) {
- gtk_tree_model_get
+ gtk_tree_model_get
(GTK_TREE_MODEL (state->sheets.model), &iter,
STF_EXPORT_COL_EXPORTED, &value,
-1);
- gtk_list_store_set
+ gtk_list_store_set
(state->sheets.model, &iter,
STF_EXPORT_COL_EXPORTED, !value,
-1);
- set_sheet_selection_count
+ set_sheet_selection_count
(state,
state->sheets.num_selected + (value ? -1 : 1));
} else {
@@ -551,11 +551,11 @@ stf_export_dialog_sheet_page_init (TextExportState *state)
"toggled",
G_CALLBACK (cb_sheet_export_toggled), state);
gtk_tree_view_append_column (GTK_TREE_VIEW (state->sheets.view),
- gtk_tree_view_column_new_with_attributes
+ gtk_tree_view_column_new_with_attributes
(_("Export"),
- renderer,
+ renderer,
"active", STF_EXPORT_COL_EXPORTED,
- "activatable", STF_EXPORT_COL_NON_EMPTY,
+ "activatable", STF_EXPORT_COL_NON_EMPTY,
NULL));
gtk_tree_view_append_column (GTK_TREE_VIEW (state->sheets.view),
gtk_tree_view_column_new_with_attributes (_("Sheet"),
@@ -621,7 +621,7 @@ stf_export_dialog_sheet_page_init (TextExportState *state)
"changed",
G_CALLBACK (cb_selection_changed), state);
- gtk_tree_view_set_reorderable (state->sheets.view, TRUE);
+ gtk_tree_view_set_reorderable (state->sheets.view, TRUE);
}
static void
@@ -693,13 +693,13 @@ stf_export_dialog (WBCGtk *wbcg, GnmStfExport *stfe, Workbook *wb)
stf_export_dialog_format_page_init (&state);
if (state.sheets.non_empty == 0) {
gtk_widget_destroy (GTK_WIDGET (state.window));
- go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
+ go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("This workbook does not contain any "
"exportable content."));
} else {
- stf_export_dialog_switch_page
+ stf_export_dialog_switch_page
(&state,
- (1 >= state.sheets.non_empty) ?
+ (1 >= state.sheets.non_empty) ?
PAGE_FORMAT : PAGE_SHEETS);
gtk_widget_grab_default (state.next_button);
g_signal_connect_swapped (G_OBJECT (state.back_button),
diff --git a/src/dialogs/dialog-stf-format-page.c b/src/dialogs/dialog-stf-format-page.c
index 65c705b..451b465 100644
--- a/src/dialogs/dialog-stf-format-page.c
+++ b/src/dialogs/dialog-stf-format-page.c
@@ -43,7 +43,7 @@ static void
format_page_update_column_selection (StfDialogData *pagedata)
{
char *text = NULL;
-
+
if (pagedata->format.col_import_count == pagedata->format.col_import_array_len) {
text = g_strdup_printf (_("Importing %i columns and ignoring none."),
pagedata->format.col_import_count);
@@ -146,12 +146,12 @@ activate_column (StfDialogData *pagedata, int i)
if (colformat) {
g_signal_handler_block(pagedata->format.format_selector,
pagedata->format.format_changed_handler_id);
- go_format_sel_set_style_format
+ go_format_sel_set_style_format
(pagedata->format.format_selector, colformat);
g_signal_handler_unblock(pagedata->format.format_selector,
pagedata->format.format_changed_handler_id);
}
-
+
}
static void
@@ -182,10 +182,10 @@ cb_col_check_clicked (GtkToggleButton *togglebutton, gpointer _i)
pagedata->format.col_import_count++;
format_page_update_column_selection (pagedata);
} else {
- char *msg = g_strdup_printf(
+ char *msg = g_strdup_printf(
ngettext("A maximum of %d column can be imported.",
"A maximum of %d columns can be imported.",
- GNM_MAX_COLS),
+ GNM_MAX_COLS),
GNM_MAX_COLS);
gtk_toggle_button_set_active (togglebutton, FALSE);
go_gtk_notice_dialog (GTK_WINDOW (pagedata->dialog),
@@ -196,7 +196,7 @@ cb_col_check_clicked (GtkToggleButton *togglebutton, gpointer _i)
return;
}
-static void
+static void
check_columns_for_import (StfDialogData *pagedata, int from, int to)
{
int i;
@@ -221,21 +221,21 @@ check_columns_for_import (StfDialogData *pagedata, int from, int to)
}
}
-static void
+static void
uncheck_columns_for_import (StfDialogData *pagedata, int from, int to)
{
int i;
-
+
g_return_if_fail (pagedata != NULL);
g_return_if_fail (!(from < 0));
g_return_if_fail (to < pagedata->format.renderdata->colcount);
g_return_if_fail (to < pagedata->format.col_import_array_len);
-
+
for (i = from; i <= to; i++) {
if (pagedata->format.col_import_array[i]) {
GtkTreeViewColumn* column = stf_preview_get_column (pagedata->format.renderdata, i);
GtkWidget *w = g_object_get_data (G_OBJECT (column), "checkbox");
-
+
gtk_widget_hide (w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), FALSE);
/* Note this caused a signal to be send that sets the */
@@ -249,7 +249,7 @@ static void
cb_popup_menu_uncheck_right (GtkWidget *widget, gpointer data)
{
StfDialogData *pagedata = data;
-
+
uncheck_columns_for_import (pagedata, pagedata->format.index + 1,
pagedata->format.renderdata->colcount - 1);
}
@@ -258,7 +258,7 @@ static void
cb_popup_menu_check_right (GtkWidget *widget, gpointer data)
{
StfDialogData *pagedata = data;
-
+
check_columns_for_import (pagedata, pagedata->format.index + 1,
pagedata->format.renderdata->colcount - 1);
}
@@ -267,7 +267,7 @@ static void
cb_popup_menu_uncheck_left (GtkWidget *widget, gpointer data)
{
StfDialogData *pagedata = data;
-
+
uncheck_columns_for_import (pagedata, 0, pagedata->format.index - 1);
}
@@ -275,7 +275,7 @@ static void
cb_popup_menu_check_left (GtkWidget *widget, gpointer data)
{
StfDialogData *pagedata = data;
-
+
check_columns_for_import (pagedata, 0, pagedata->format.index - 1);
}
@@ -284,21 +284,21 @@ cb_popup_menu_extend_format (GtkWidget *widget, gpointer data)
{
StfDialogData *pagedata = data;
guint index = pagedata->format.index;
- GOFormat *colformat = g_ptr_array_index
+ GOFormat *colformat = g_ptr_array_index
(pagedata->format.formats, pagedata->format.index);
for (index++; index < pagedata->format.formats->len; index++) {
- GOFormat *sf = g_ptr_array_index
+ GOFormat *sf = g_ptr_array_index
(pagedata->format.formats, index);
- GtkTreeViewColumn* column =
- stf_preview_get_column (pagedata->format.renderdata,
+ GtkTreeViewColumn* column =
+ stf_preview_get_column (pagedata->format.renderdata,
index);
- GtkWidget *w = g_object_get_data (G_OBJECT (column),
+ GtkWidget *w = g_object_get_data (G_OBJECT (column),
"formatlabel");
go_format_unref (sf);
- g_ptr_array_index (pagedata->format.formats, index)
- = go_format_ref (colformat);
- gtk_label_set_text (GTK_LABEL (w),
+ g_ptr_array_index (pagedata->format.formats, index)
+ = go_format_ref (colformat);
+ gtk_label_set_text (GTK_LABEL (w),
go_format_sel_format_classification (colformat));
}
@@ -328,7 +328,7 @@ format_context_menu (StfDialogData *pagedata,
{ N_("Import all columns on left"), &cb_popup_menu_check_left, COLUMN_POPUP_ITEM_NOT_FIRST},
{ N_("Copy format to right"), &cb_popup_menu_extend_format, COLUMN_POPUP_ITEM_NOT_LAST}
};
-
+
GtkWidget *menu = gtk_menu_new ();
unsigned i;
@@ -344,7 +344,7 @@ format_context_menu (StfDialogData *pagedata,
gtk_widget_set_sensitive (item, col > 0);
break;
case COLUMN_POPUP_ITEM_NOT_LAST:
- gtk_widget_set_sensitive
+ gtk_widget_set_sensitive
(item, col < pagedata->format.renderdata->colcount - 1);
break;
case COLUMN_POPUP_ITEM_ANY:
@@ -493,8 +493,8 @@ format_page_update_preview (StfDialogData *pagedata)
col_import_array_len_old = pagedata->format.col_import_array_len;
pagedata->format.col_import_array_len = renderdata->colcount;
- pagedata->format.col_import_array =
- g_renew(gboolean, pagedata->format.col_import_array,
+ pagedata->format.col_import_array =
+ g_renew(gboolean, pagedata->format.col_import_array,
pagedata->format.col_import_array_len);
old_part = (col_import_array_len_old < pagedata->format.col_import_array_len)
? col_import_array_len_old
@@ -503,20 +503,20 @@ format_page_update_preview (StfDialogData *pagedata)
for (i = 0; i < old_part; i++)
if (pagedata->format.col_import_array[i])
pagedata->format.col_import_count++;
- for (i = old_part;
- i < pagedata->format.col_import_array_len; i++)
+ for (i = old_part;
+ i < pagedata->format.col_import_array_len; i++)
if (pagedata->format.col_import_count < GNM_MAX_COLS) {
pagedata->format.col_import_array[i] = TRUE;
pagedata->format.col_import_count++;
} else {
- pagedata->format.col_import_array[i] = FALSE;
+ pagedata->format.col_import_array[i] = FALSE;
}
format_page_update_column_selection (pagedata);
-
+
if (old_part < renderdata->colcount)
- msg = g_strdup_printf
- (_("A maximum of %d columns can be imported."),
+ msg = g_strdup_printf
+ (_("A maximum of %d columns can be imported."),
GNM_MAX_COLS);
for (i = old_part; i < renderdata->colcount; i++) {
@@ -527,20 +527,20 @@ format_page_update_preview (StfDialogData *pagedata)
GtkWidget *box = gtk_hbox_new (FALSE,5);
GtkWidget *vbox = gtk_vbox_new (FALSE,5);
GtkWidget *check = gtk_check_button_new ();
- char * label_text = g_strdup_printf
+ char * label_text = g_strdup_printf
(pagedata->format.col_header, i+1);
GtkWidget *label = gtk_label_new (label_text);
GOFormat const *gf = go_format_general ();
- GtkWidget *format_label = gtk_label_new
+ GtkWidget *format_label = gtk_label_new
(go_format_sel_format_classification (gf));
-
+
g_free (label_text);
gtk_misc_set_alignment (GTK_MISC (format_label), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
- g_object_set (G_OBJECT (stf_preview_get_cell_renderer
- (pagedata->format.renderdata, i)),
- "strikethrough",
+ g_object_set (G_OBJECT (stf_preview_get_cell_renderer
+ (pagedata->format.renderdata, i)),
+ "strikethrough",
!pagedata->format.col_import_array[i], NULL);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check),
pagedata->
@@ -556,16 +556,16 @@ format_page_update_preview (StfDialogData *pagedata)
gtk_box_pack_start (GTK_BOX(vbox), box, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX(vbox), format_label, TRUE, TRUE, 0);
gtk_widget_show_all (vbox);
-
+
gtk_tree_view_column_set_widget (column, vbox);
g_object_set_data (G_OBJECT (column), "pagedata", pagedata);
g_object_set_data (G_OBJECT (column), "checkbox", check);
g_object_set_data (G_OBJECT (column), "formatlabel", format_label);
- g_object_set_data (G_OBJECT (column->button),
+ g_object_set_data (G_OBJECT (column->button),
"pagedata", pagedata);
- g_object_set_data (G_OBJECT (column->button),
+ g_object_set_data (G_OBJECT (column->button),
"checkbox", check);
- g_object_set_data (G_OBJECT (column->button),
+ g_object_set_data (G_OBJECT (column->button),
"formatlabel", format_label);
g_object_set (G_OBJECT (column), "clickable", TRUE, NULL);
@@ -573,9 +573,9 @@ format_page_update_preview (StfDialogData *pagedata)
"toggled",
G_CALLBACK (cb_col_check_clicked),
GINT_TO_POINTER (i));
- g_signal_connect (G_OBJECT (column->button),
+ g_signal_connect (G_OBJECT (column->button),
"event",
- G_CALLBACK (cb_col_event),
+ G_CALLBACK (cb_col_event),
GINT_TO_POINTER (i));
}
}
@@ -616,18 +616,18 @@ cb_number_format_changed (G_GNUC_UNUSED GtkWidget *widget,
{
if (data->format.index >= 0) {
GOFormat *sf;
- GtkTreeViewColumn* column =
- stf_preview_get_column (data->format.renderdata,
+ GtkTreeViewColumn* column =
+ stf_preview_get_column (data->format.renderdata,
data->format.index);
- GtkWidget *w = g_object_get_data (G_OBJECT (column),
+ GtkWidget *w = g_object_get_data (G_OBJECT (column),
"formatlabel");
- sf = g_ptr_array_index (data->format.formats,
+ sf = g_ptr_array_index (data->format.formats,
data->format.index);
go_format_unref (sf);
sf = go_format_new_from_XL (fmt);
- gtk_label_set_text (GTK_LABEL (w),
+ gtk_label_set_text (GTK_LABEL (w),
go_format_sel_format_classification (sf));
g_ptr_array_index (data->format.formats, data->format.index) =
sf;
@@ -685,7 +685,7 @@ stf_dialog_format_page_cleanup (StfDialogData *pagedata)
g_free (pagedata->format.col_import_array);
pagedata->format.col_import_array = NULL;
pagedata->format.col_import_array_len = 0;
- pagedata->format.col_import_count = 0;
+ pagedata->format.col_import_count = 0;
}
void
@@ -701,7 +701,7 @@ stf_dialog_format_page_init (GladeXML *gui, StfDialogData *pagedata)
pagedata->format.col_import_array_len = 0;
pagedata->format.col_import_count = 0;
pagedata->format.col_header = _("Column %d");
-
+
pagedata->format.format_selector = GO_FORMAT_SEL( go_format_sel_new ());
pagedata->format.format_data_container = glade_xml_get_widget (gui, "format_data_container");
@@ -742,7 +742,7 @@ stf_dialog_format_page_init (GladeXML *gui, StfDialogData *pagedata)
format_page_update_column_selection (pagedata);
/* Connect signals */
- pagedata->format.format_changed_handler_id =
+ pagedata->format.format_changed_handler_id =
g_signal_connect (G_OBJECT (pagedata->format.format_selector),
"format_changed",
G_CALLBACK (cb_number_format_changed), pagedata);
diff --git a/src/dialogs/dialog-stf-main-page.c b/src/dialogs/dialog-stf-main-page.c
index f58ca0f..9ad8334 100644
--- a/src/dialogs/dialog-stf-main-page.c
+++ b/src/dialogs/dialog-stf-main-page.c
@@ -84,7 +84,7 @@ static void
main_page_update_preview (StfDialogData *pagedata)
{
RenderData_t *renderdata = pagedata->main.renderdata;
- GStringChunk *lines_chunk = g_string_chunk_new (100 * 1024);
+ GStringChunk *lines_chunk = g_string_chunk_new (100 * 1024);
GPtrArray *lines = stf_parse_lines (pagedata->parseoptions,
lines_chunk,
pagedata->utf8_data,
@@ -304,7 +304,7 @@ main_page_parseoptions_to_gui (StfDialogData *pagedata)
{
gboolean lb_unix = FALSE, lb_windows = FALSE, lb_mac = FALSE;
GSList *l;
-
+
for (l = po->terminator; l; l = l->next) {
const char *term = l->data;
if (strcmp (term, "\n") == 0)
diff --git a/src/dialogs/dialog-stf.c b/src/dialogs/dialog-stf.c
index a5a076b..3b6d94c 100644
--- a/src/dialogs/dialog-stf.c
+++ b/src/dialogs/dialog-stf.c
@@ -329,9 +329,9 @@ stf_dialog (WBCGtk *wbcg,
dialogresult->parseoptions->formats = pagedata.format.formats;
pagedata.format.formats = NULL;
- dialogresult->parseoptions->col_import_array
+ dialogresult->parseoptions->col_import_array
= pagedata.format.col_import_array;
- dialogresult->parseoptions->col_import_array_len
+ dialogresult->parseoptions->col_import_array_len
= pagedata.format.col_import_array_len;
pagedata.format.col_import_array = NULL;
pagedata.format.col_import_count = 0;
@@ -386,22 +386,22 @@ stf_dialog_result_free (DialogStfResult_t *dialogresult)
*
* returns: nothing
**/
-void
+void
stf_dialog_result_attach_formats_to_cr (DialogStfResult_t *dialogresult,
GnmCellRegion *cr)
{
unsigned int col, targetcol;
-
+
g_return_if_fail (dialogresult != NULL);
g_return_if_fail (cr != NULL);
targetcol = 0;
for (col = 0; col < dialogresult->parseoptions->formats->len; col++) {
if (dialogresult->parseoptions->col_import_array[col]) {
- GOFormat *sf = g_ptr_array_index
+ GOFormat *sf = g_ptr_array_index
(dialogresult->parseoptions->formats, col);
GnmStyleRegion *sr = g_new (GnmStyleRegion, 1);
-
+
sr->range.start.col = targetcol;
sr->range.start.row = 0;
sr->range.end.col = targetcol;
@@ -409,7 +409,7 @@ stf_dialog_result_attach_formats_to_cr (DialogStfResult_t *dialogresult,
sr->style = gnm_style_new_default ();
gnm_style_set_format (sr->style, sf);
targetcol++;
-
+
cr->styles = g_slist_prepend (cr->styles, sr);
}
}
diff --git a/src/dialogs/dialog-stf.h b/src/dialogs/dialog-stf.h
index 75e77d0..c073aa1 100644
--- a/src/dialogs/dialog-stf.h
+++ b/src/dialogs/dialog-stf.h
@@ -20,7 +20,7 @@ typedef struct {
GtkCheckButton *line_break_unix;
GtkCheckButton *line_break_windows;
GtkCheckButton *line_break_mac;
-
+
/* Page members that are created at run-time */
GOCharmapSel *charmap_selector;
RenderData_t *renderdata;
@@ -51,7 +51,7 @@ typedef struct {
/* Page members that are created at run-time */
RenderData_t *renderdata;
- int context_col, context_dx;
+ int context_col, context_dx;
int ruler_x;
GdkGC *ruler_gc;
} FixedInfo_t;
@@ -62,7 +62,7 @@ typedef struct {
GtkWidget *format_trim;
GOFormatSel *format_selector;
GtkWidget *column_selection_label;
-
+
/* Page members that are created at run-time */
GOLocaleSel *locale_selector;
RenderData_t *renderdata;
diff --git a/src/dialogs/dialog-tabulate.c b/src/dialogs/dialog-tabulate.c
index 2b0e59e..3d26690 100644
--- a/src/dialogs/dialog-tabulate.c
+++ b/src/dialogs/dialog-tabulate.c
@@ -292,7 +292,7 @@ tabulate_ok_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
data->steps = steps;
data->with_coordinates = with_coordinates;
- if (!cmd_tabulate (WORKBOOK_CONTROL (dd->wbcg), data)) {
+ if (!cmd_tabulate (WORKBOOK_CONTROL (dd->wbcg), data)) {
gtk_widget_destroy (GTK_WIDGET (dialog));
return;
}
diff --git a/src/dialogs/dialog-view.c b/src/dialogs/dialog-view.c
index e3e89db..ef39c2e 100644
--- a/src/dialogs/dialog-view.c
+++ b/src/dialogs/dialog-view.c
@@ -77,10 +77,10 @@ cb_view_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
return; /* Just ignore */
display = gdk_display_open (name);
- if (!display) {
+ if (!display) {
char *error_str =
g_strdup_printf (_("Display \"%s\" could not be opened."),
- name);
+ name);
gtk_widget_destroy (state->dialog);
go_gtk_notice_dialog (wbcg_toplevel (wbcg),
GTK_MESSAGE_ERROR, error_str);
@@ -154,7 +154,7 @@ dialog_new_view (WBCGtk *wbcg)
GSList *group =
gtk_radio_button_get_group (state->location_elsewhere);
GdkScreen *screen = gdk_display_get_screen (this_display, i);
- char *label =
+ char *label =
screen == this_screen
? (n_screens == 1
? g_strdup (_("This screen"))
@@ -186,7 +186,7 @@ dialog_new_view (WBCGtk *wbcg)
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (state->location_display_name));
-
+
gnumeric_init_help_button (
glade_xml_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_VIEW);
diff --git a/src/dialogs/tool-dialogs.h b/src/dialogs/tool-dialogs.h
index d38892b..cf81c50 100644
--- a/src/dialogs/tool-dialogs.h
+++ b/src/dialogs/tool-dialogs.h
@@ -49,10 +49,10 @@ struct _GenericToolState {
void tool_load_selection (GenericToolState *state, gboolean allow_multiple);
void dialog_tool_init_buttons (GenericToolState *state,
- GCallback ok_function,
+ GCallback ok_function,
GCallback close_function);
void error_in_entry (GenericToolState *state, GtkWidget *entry, char const *err_str);
-gboolean dialog_tool_init (GenericToolState *state,
+gboolean dialog_tool_init (GenericToolState *state,
WBCGtk *wbcg,
Sheet *sheet,
char const *help_file,
@@ -60,8 +60,8 @@ gboolean dialog_tool_init (GenericToolState *state,
char const *dialog_name,
char const *error_str,
char const *key,
- GCallback ok_function,
- GCallback close_function,
+ GCallback ok_function,
+ GCallback close_function,
GCallback sensitivity_cb,
GnmExprEntryFlags flags);
diff --git a/src/func-builtin.c b/src/func-builtin.c
index bd1b784..d8b38df 100644
--- a/src/func-builtin.c
+++ b/src/func-builtin.c
@@ -345,19 +345,19 @@ func_builtin_init (void)
const char *textdomain = GETTEXT_PACKAGE;
static GnmFuncDescriptor const builtins [] = {
- { "sum", NULL,
+ { "sum", NULL,
help_sum, NULL, gnumeric_sum,
NULL, NULL, NULL, GNM_FUNC_SIMPLE + GNM_FUNC_AUTO_FIRST,
GNM_FUNC_IMPL_STATUS_COMPLETE,
GNM_FUNC_TEST_STATUS_BASIC
},
- { "product", NULL,
+ { "product", NULL,
help_product, NULL, gnumeric_product,
NULL, NULL, NULL, GNM_FUNC_SIMPLE,
GNM_FUNC_IMPL_STATUS_COMPLETE,
GNM_FUNC_TEST_STATUS_BASIC
},
- { "gnumeric_version", "",
+ { "gnumeric_version", "",
help_gnumeric_version, gnumeric_version, NULL,
NULL, NULL, NULL, GNM_FUNC_SIMPLE,
GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC,
diff --git a/src/func.c b/src/func.c
index a941325..c72940e 100644
--- a/src/func.c
+++ b/src/func.c
@@ -559,7 +559,7 @@ gnm_func_sanity_check (void)
res = cmd_context_stderr_get_status (COMMAND_CONTEXT_STDERR (cc));
if (res)
goto out;
-
+
ordered = g_ptr_array_new ();
g_hash_table_foreach (global_symbol_table->hash,
copy_hash_table_to_ptr_array, ordered);
@@ -704,8 +704,8 @@ function_def_create_arg_names (GnmFunc const *fn_def)
fn_def->help[i].type != GNM_FUNC_HELP_END;
i++) {
if (fn_def->help[i].type == GNM_FUNC_HELP_ARG)
- g_ptr_array_add
- (ptr, split_at_colon
+ g_ptr_array_add
+ (ptr, split_at_colon
(_(fn_def->help[i].text), NULL));
}
return ptr;
@@ -1155,9 +1155,9 @@ function_def_get_arg_name (GnmFunc const *fn_def, guint arg_idx)
gnm_func_load_if_stub ((GnmFunc *)fn_def);
- if ((fn_def->arg_names_p != NULL)
+ if ((fn_def->arg_names_p != NULL)
&& (arg_idx < fn_def->arg_names_p->len))
- return g_strdup (g_ptr_array_index (fn_def->arg_names_p,
+ return g_strdup (g_ptr_array_index (fn_def->arg_names_p,
arg_idx));
return NULL;
}
diff --git a/src/func.h b/src/func.h
index c03641b..25d5b99 100644
--- a/src/func.h
+++ b/src/func.h
@@ -242,7 +242,7 @@ GnmFunc *gnm_func_add_placeholder (Workbook *optional_scope, /* change scop
char const *name,
char const *type,
gboolean copy_name);
-GnmFunc *gnm_func_lookup_or_add_placeholder
+GnmFunc *gnm_func_lookup_or_add_placeholder
(char const *name, Workbook *scope, /* change scope one day */
gboolean copy_name);
diff --git a/src/gnm-datetime.c b/src/gnm-datetime.c
index 28ddc07..b73434d 100644
--- a/src/gnm-datetime.c
+++ b/src/gnm-datetime.c
@@ -48,7 +48,7 @@ gnm_datetime_allow_negative (void)
char *text = format_value (fmt, v, NULL, -1, conv);
allow = (strcmp (text, "1899-11-19") == 0);
-
+
value_release (v);
go_format_unref (fmt);
g_free (text);
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index 0f146aa..657dd0e 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -70,7 +70,7 @@ so_filled_view_set_bounds (SheetObjectView *sov, double const *coords, gboolean
{
GocItem *view = GOC_ITEM (sov);
FilledItemView *fiv = (FilledItemView *) sov;
- double scale = goc_canvas_get_pixels_per_unit (view->canvas);
+ double scale = goc_canvas_get_pixels_per_unit (view->canvas);
if (visible) {
SheetObject *so = sheet_object_view_get_so (sov);
diff --git a/src/go-data-cache.h b/src/go-data-cache.h
index eba5bd6..c36d845 100644
--- a/src/go-data-cache.h
+++ b/src/go-data-cache.h
@@ -1,6 +1,6 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * go-data-cache.h :
+ * go-data-cache.h :
*
* Copyright (C) 2008 Jody Goldberg (jody gnome org)
*
diff --git a/src/graph.c b/src/graph.c
index 8fb7d6d..b826955 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -78,7 +78,7 @@ render_val (GnmValue const *v, int i, int j,
if (!v)
return NULL;
-
+
date_conv = ep->sheet ? workbook_date_conv (ep->sheet->workbook) : NULL;
#if 0
diff --git a/src/gui-util.c b/src/gui-util.c
index 8219552..3e04513 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -1372,14 +1372,14 @@ gnm_canvas_get_position (GocCanvas *canvas, int *x, int *y, gint64 px, gint64 py
}
-gboolean
+gboolean
gnm_check_for_plugins_missing (char const **ids, GtkWindow *parent)
{
for (; *ids != NULL; ids++) {
GOPlugin *pi = go_plugins_get_plugin_by_id (*ids);
if (pi == NULL) {
GOErrorInfo *error;
- error = go_error_info_new_printf
+ error = go_error_info_new_printf
(_("The plugin with id %s is required "
"but cannot be found."), *ids);
gnumeric_go_error_info_dialog_show (parent,
@@ -1387,13 +1387,13 @@ gnm_check_for_plugins_missing (char const **ids, GtkWindow *parent)
return TRUE;
} else if (!go_plugin_is_active (pi)) {
GOErrorInfo *error;
- error = go_error_info_new_printf
+ error = go_error_info_new_printf
(_("The %s plugin is required "
- "but is not loaded."),
+ "but is not loaded."),
go_plugin_get_name (pi));
gnumeric_go_error_info_dialog_show (parent,
error);
- return TRUE;
+ return TRUE;
}
}
return FALSE;
diff --git a/src/gui-util.h b/src/gui-util.h
index bd566c5..e47a871 100644
--- a/src/gui-util.h
+++ b/src/gui-util.h
@@ -74,7 +74,7 @@ void gnumeric_init_help_button (GtkWidget *w, char const *link);
char *gnumeric_textbuffer_get_text (GtkTextBuffer *buf);
char *gnumeric_textview_get_text (GtkTextView *text_view);
void gnumeric_textview_set_text (GtkTextView *text_view, char const *txt);
-void gnm_load_pango_attributes_into_buffer (PangoAttrList *markup,
+void gnm_load_pango_attributes_into_buffer (PangoAttrList *markup,
GtkTextBuffer *buffer);
PangoAttrList *gnm_get_pango_attributes_from_buffer (GtkTextBuffer *buffer);
void gnm_create_std_tags_for_buffer (GtkTextBuffer *buffer);
diff --git a/src/item-edit.c b/src/item-edit.c
index dd374ba..1298876 100644
--- a/src/item-edit.c
+++ b/src/item-edit.c
@@ -331,7 +331,7 @@ cb_item_edit_cursor_blink (ItemEdit *ie)
GocItem *item = GOC_ITEM (ie);
ie->cursor_visible = !ie->cursor_visible;
-
+
goc_item_invalidate (item);
return TRUE;
}
diff --git a/src/parse-util.c b/src/parse-util.c
index 14024ce..fe3c562 100644
--- a/src/parse-util.c
+++ b/src/parse-util.c
@@ -1157,7 +1157,7 @@ std_expr_func_handler (GnmConventionsOut *out, GnmExprFunction const *func)
g_string_append (target, name);
/* FIXME: possibly a space here. */
gnm_expr_list_as_string (func->argc, func->argv, out);
- return;
+ return;
}
static void
diff --git a/src/preview-grid.c b/src/preview-grid.c
index ac8b616..f3a5d3b 100644
--- a/src/preview-grid.c
+++ b/src/preview-grid.c
@@ -185,7 +185,7 @@ preview_grid_draw_background (cairo_t *cr, PreviewGrid const *pg, GnmStyle const
#define border_null(b) ((b) == none || (b) == NULL)
static void
pg_style_get_row (PreviewGrid *pg, GnmStyleRow *sr)
-{
+{
GnmBorder const *top, *bottom, *none = gnm_style_border_none ();
GnmBorder const *left, *right;
int const end = sr->end_col, row = sr->row;
diff --git a/src/print-info.c b/src/print-info.c
index eace539..616835b 100644
--- a/src/print-info.c
+++ b/src/print-info.c
@@ -1353,7 +1353,7 @@ gnm_page_breaks_get_next_manual_break (GnmPageBreaks *breaks,
for (i = 0; i < breaks->details->len; i++) {
GnmPageBreak const *pbreak;
pbreak = &g_array_index (breaks->details, GnmPageBreak, i);
- if (pbreak->pos > pos
+ if (pbreak->pos > pos
&& pbreak->type != GNM_PAGE_BREAK_AUTO)
return pbreak->pos;
}
@@ -1393,7 +1393,7 @@ gnm_page_breaks_set_break (GnmPageBreaks *breaks,
/* Do some simple validation */
if (pos < 0)
return FALSE;
-
+
if (breaks->details->len == 0 && type != GNM_PAGE_BREAK_NONE)
return gnm_page_breaks_append_break (breaks, pos, type);
@@ -1449,7 +1449,7 @@ gnm_page_break_type_from_str (char const *str)
*
**/
-void
+void
gnm_page_breaks_clean (GnmPageBreaks *breaks)
{
guint i;
@@ -1458,11 +1458,11 @@ gnm_page_breaks_clean (GnmPageBreaks *breaks)
return;
for (i = 0; i < breaks->details->len; i++) {
- GnmPageBreak *pbreak = &g_array_index (breaks->details,
+ GnmPageBreak *pbreak = &g_array_index (breaks->details,
GnmPageBreak, i);
if (pbreak->type == GNM_PAGE_BREAK_AUTO) {
g_array_remove_index (breaks->details, i);
i--;
}
- }
+ }
}
diff --git a/src/print.c b/src/print.c
index 9851fe3..d733617 100644
--- a/src/print.c
+++ b/src/print.c
@@ -641,7 +641,7 @@ paginate (GSList **paginationInfo,
gint start, gint end,
gdouble usable, gboolean repeat, gint repeat_start, gint repeat_end,
double (sheet_get_distance_pts) (Sheet const *sheet, int from, int to),
- ColRowInfo const *(get_info)(Sheet const *sheet, int const p),
+ ColRowInfo const *(get_info)(Sheet const *sheet, int const p),
GnmPageBreaks *pb, gboolean store_breaks)
{
GSList *list = NULL;
@@ -666,21 +666,21 @@ paginate (GSList **paginationInfo,
while (rc <= n_end) {
int count;
PaginationInfo *item;
-
+
gdouble repeating_used = 0.;
gint n_rep_used = 0, first_rep_used = 0;
-
+
adjust_repetition (sheet, rc,
first_rep, n_rep,
repeating,
&first_rep_used, &n_rep_used,
&repeating_used,
sheet_get_distance_pts);
-
+
count = compute_group (sheet, rc, n_end,
usable - repeating_used,
get_info);
-
+
if (paginationInfo) {
item = g_new (PaginationInfo,1);
item->rc = rc;
@@ -691,7 +691,7 @@ paginate (GSList **paginationInfo,
list = g_slist_prepend (list, item);
}
page_count++;
-
+
rc += count;
if (store_breaks && (rc < n_end))
gnm_page_breaks_set_break (pb, rc, GNM_PAGE_BREAK_AUTO);
@@ -953,12 +953,12 @@ compute_sheet_pages (GtkPrintContext *context,
if (!pi->ignore_pb) {
if (pinfo->page_breaks.h == NULL)
- print_info_set_breaks (pinfo,
+ print_info_set_breaks (pinfo,
gnm_page_breaks_new (FALSE));
else
gnm_page_breaks_clean (pinfo->page_breaks.h);
if (pinfo->page_breaks.v == NULL)
- print_info_set_breaks (pinfo,
+ print_info_set_breaks (pinfo,
gnm_page_breaks_new (TRUE));
else
gnm_page_breaks_clean (pinfo->page_breaks.v);
@@ -976,7 +976,7 @@ compute_sheet_pages (GtkPrintContext *context,
pinfo->scaling.dim.rows, 1.,
col_header_height,
repeat_top_use,
- repeat_top_start, repeat_top_end,
+ repeat_top_start, repeat_top_end,
pi->ignore_pb ? NULL : pinfo->page_breaks.v);
pxy = compute_scale_fit_to (sheet, r.start.col, r.end.col,
page_width, sheet_col_get_info,
@@ -984,7 +984,7 @@ compute_sheet_pages (GtkPrintContext *context,
pinfo->scaling.dim.cols, pxy,
row_header_width,
repeat_left_use,
- repeat_left_start, repeat_left_end,
+ repeat_left_start, repeat_left_end,
pi->ignore_pb ? NULL : pinfo->page_breaks.h);
pinfo->scaling.percentage.x = pxy * 100.;
@@ -1005,12 +1005,12 @@ compute_sheet_pages (GtkPrintContext *context,
paginate (&column_pagination, sheet, r.start.col, r.end.col,
usable_x - row_header_width,
repeat_left_use, repeat_left_start, repeat_left_end,
- sheet_col_get_distance_pts, sheet_col_get_info,
+ sheet_col_get_distance_pts, sheet_col_get_info,
pi->ignore_pb ? NULL : pinfo->page_breaks.h, !pi->ignore_pb);
paginate (&row_pagination, sheet, r.start.row, r.end.row,
usable_y - col_header_height,
repeat_top_use, repeat_top_start, repeat_top_end,
- sheet_row_get_distance_pts, sheet_row_get_info,
+ sheet_row_get_distance_pts, sheet_row_get_info,
pi->ignore_pb ? NULL : pinfo->page_breaks.v, !pi->ignore_pb);
if (sheet->print_info->print_across_then_down)
@@ -1444,7 +1444,7 @@ gnm_create_widget_cb (GtkPrintOperation *operation, gpointer user_data)
gtk_print_settings_get_int_with_default
(settings, GNUMERIC_PRINT_SETTING_PRINT_TO_SHEET_KEY,
n_sheets));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_ignore_page_breaks),
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_ignore_page_breaks),
0 != gtk_print_settings_get_int_with_default
(settings, GNUMERIC_PRINT_SETTING_IGNORE_PAGE_BREAKS_KEY,
1));
diff --git a/src/ranges.c b/src/ranges.c
index f432db8..39e2a5a 100644
--- a/src/ranges.c
+++ b/src/ranges.c
@@ -603,11 +603,11 @@ range_is_full (GnmRange const *r, Sheet const *sheet, gboolean horiz)
* @sheet : the sheet in which @range lives
*
* Clip the range to the area of the sheet with content.
- * if the range reaches the edge
+ * if the range reaches the edge
*
* The idea here is that users may select a whole column or ow when they
* really are only concerned with the extent of the sheet.
- * On the otehr hand, if users select any smaller region they probably
+ * On the otehr hand, if users select any smaller region they probably
* intend to selec tjust that.
*
* WARNING THIS IS EXPENSIVE!
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index 9404ffb..fa4c9a4 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -54,7 +54,7 @@ static void
so_graph_view_set_bounds (SheetObjectView *sov, double const *coords, gboolean visible)
{
GocItem *view = GOC_ITEM (GOC_GROUP (sov)->children->data);
- double scale = goc_canvas_get_pixels_per_unit (view->canvas);
+ double scale = goc_canvas_get_pixels_per_unit (view->canvas);
if (visible) {
goc_item_set (GOC_ITEM (sov),
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index fc8b57c..22a0085 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -122,7 +122,7 @@ static void
so_widget_view_set_bounds (SheetObjectView *sov, double const *coords, gboolean visible)
{
GocItem *view = GOC_ITEM (sov);
- double scale = goc_canvas_get_pixels_per_unit (view->canvas);
+ double scale = goc_canvas_get_pixels_per_unit (view->canvas);
double left = MIN (coords [0], coords [2]) / scale;
double top = MIN (coords [1], coords [3]) / scale;
double width = (fabs (coords [2] - coords [0]) + 1.) / scale;
diff --git a/src/sheet-object.c b/src/sheet-object.c
index 9f363be..3da28b1 100644
--- a/src/sheet-object.c
+++ b/src/sheet-object.c
@@ -411,7 +411,7 @@ sheet_object_clear_sheet (SheetObject *so)
g_object_set_qdata (G_OBJECT (so->realized_list->data), sov_so_quark, NULL);
g_object_unref (G_OBJECT (so->realized_list->data));
so->realized_list = g_list_remove (so->realized_list, so->realized_list->data);
-
+
}
g_signal_emit (so, signals [UNREALIZED], 0);
diff --git a/src/stf-export.c b/src/stf-export.c
index f4636a8..82a87f2 100644
--- a/src/stf-export.c
+++ b/src/stf-export.c
@@ -579,7 +579,7 @@ gnm_stf_get_stfe (GObject *obj)
NULL);
g_object_set_data_full (obj, "stfe", stfe, g_object_unref);
}
- return stfe;
+ return stfe;
}
static void
diff --git a/src/tools/analysis-anova.c b/src/tools/analysis-anova.c
index 08cf3c3..6baf29c 100644
--- a/src/tools/analysis-anova.c
+++ b/src/tools/analysis-anova.c
@@ -55,7 +55,7 @@ analysis_tool_anova_two_factor_prepare_input_range (
info->err = analysis_tools_replication_invalid;
return TRUE;
}
-
+
/* Check that at least two columns of data are given */
if (info->n_c < 2) {
info->err = analysis_tools_too_few_cols;
@@ -66,7 +66,7 @@ analysis_tool_anova_two_factor_prepare_input_range (
info->err = analysis_tools_too_few_rows;
return TRUE;
}
-
+
return FALSE;
}
@@ -84,7 +84,7 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
int i, r;
GnmExpr const *expr_check;
GnmExpr const *expr_region;
-
+
GnmFunc *fd_index;
GnmFunc *fd_offset;
GnmFunc *fd_count;
@@ -125,7 +125,7 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
"/Count"
"/Sum"
"/Average"
- "/Variance"));
+ "/Variance"));
r = 3;
for (i = 1; i <= info->n_r; i++, r++) {
@@ -133,7 +133,7 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
dao_set_italic (dao, 0, r, 0, r);
if (info->labels) {
GnmExpr const *expr_label;
- expr_label = gnm_expr_new_funcall3
+ expr_label = gnm_expr_new_funcall3
(fd_index,
gnm_expr_new_constant (value_dup (info->input)),
gnm_expr_new_constant (value_new_int (i+1)),
@@ -155,16 +155,16 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (0)),
gnm_expr_new_constant (value_new_int (1)));
}
- dao_set_cell_expr (dao, 1, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 1, r, gnm_expr_new_funcall1
(fd_count, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, 2, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 2, r, gnm_expr_new_funcall1
(fd_sum, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, 3, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 3, r, gnm_expr_new_funcall1
(fd_average, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, 4, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 4, r, gnm_expr_new_funcall1
(fd_var, expr_source));
}
-
+
r++;
for (i = 1; i <= info->n_c; i++, r++) {
@@ -172,7 +172,7 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
dao_set_italic (dao, 0, r, 0, r);
if (info->labels) {
GnmExpr const *expr_label;
- expr_label = gnm_expr_new_funcall3
+ expr_label = gnm_expr_new_funcall3
(fd_index,
gnm_expr_new_constant (value_dup (info->input)),
gnm_expr_new_constant (value_new_int (1)),
@@ -195,13 +195,13 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (info->n_r)),
gnm_expr_new_constant (value_new_int (1)));
}
- dao_set_cell_expr (dao, 1, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 1, r, gnm_expr_new_funcall1
(fd_count, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, 2, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 2, r, gnm_expr_new_funcall1
(fd_sum, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, 3, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 3, r, gnm_expr_new_funcall1
(fd_average, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, 4, r, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, 4, r, gnm_expr_new_funcall1
(fd_var, expr_source));
}
@@ -209,10 +209,10 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
dao_set_merge (dao, 0, r, 6, r);
dao_set_italic (dao, 0, r, 6, r);
-
+
if (info->labels)
expr_region = gnm_expr_new_funcall5
- (fd_offset,
+ (fd_offset,
gnm_expr_new_constant (value_dup (info->input)),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (1)),
@@ -221,20 +221,20 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
else
expr_region = gnm_expr_new_constant (value_dup (info->input));
- expr_check = gnm_expr_new_funcall3
- (fd_if,
+ expr_check = gnm_expr_new_funcall3
+ (fd_if,
gnm_expr_new_binary
- (gnm_expr_new_funcall1
+ (gnm_expr_new_funcall1
(fd_count, gnm_expr_copy (expr_region)),
GNM_EXPR_OP_EQUAL,
gnm_expr_new_constant (value_new_int (info->n_r*info->n_c))),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (-1)));
dao_set_cell_expr (dao, 0, r, expr_check);
- dao_set_format (dao, 0, r, 0, r,
+ dao_set_format (dao, 0, r, 0, r,
_("\"ANOVA\";[Red]\"Invalid ANOVA: Missing Observations\""));
dao_set_align (dao, 0, r, 0, r, HALIGN_LEFT, VALIGN_BOTTOM);
-
+
r++;
dao_set_italic (dao, 0, r, 0, r + 4);
set_cell_text_col (dao, 0, r, _("/Source of Variation"
@@ -243,9 +243,9 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
"/Error"
"/Total"));
dao_set_italic (dao, 1, r, 6, r);
- dao_set_border (dao, 0, r, 6, r, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
+ dao_set_border (dao, 0, r, 6, r, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
style_color_black (), GNM_STYLE_BORDER_HORIZ);
- dao_set_border (dao, 0, r+3, 6, r+3, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
+ dao_set_border (dao, 0, r+3, 6, r+3, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
style_color_black (), GNM_STYLE_BORDER_HORIZ);
set_cell_text_row (dao, 1, r, _("/SS"
"/df"
@@ -268,88 +268,88 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_t;
GnmExpr const *expr_cf;
- expr_t = gnm_expr_new_funcall1 (fd_sumsq, gnm_expr_copy (expr_region));
- expr_cf = gnm_expr_new_binary
- (gnm_expr_new_binary
- (gnm_expr_new_funcall1 (fd_sum, gnm_expr_copy (expr_region)),
+ expr_t = gnm_expr_new_funcall1 (fd_sumsq, gnm_expr_copy (expr_region));
+ expr_cf = gnm_expr_new_binary
+ (gnm_expr_new_binary
+ (gnm_expr_new_funcall1 (fd_sum, gnm_expr_copy (expr_region)),
GNM_EXPR_OP_EXP,
- gnm_expr_new_constant (value_new_int (2))),
+ gnm_expr_new_constant (value_new_int (2))),
GNM_EXPR_OP_DIV,
gnm_expr_new_funcall1 (fd_count, gnm_expr_copy (expr_region)));
-
+
args = NULL;
for (i = 1; i <= info->n_r; i++) {
GnmExpr const *expr;
- expr = gnm_expr_new_funcall1
+ expr = gnm_expr_new_funcall1
(fd_sum,
gnm_expr_new_funcall5
- (fd_offset,
+ (fd_offset,
gnm_expr_new_constant (value_dup (info->input)),
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
((info->labels)?i:(i-1))),
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
((info->labels)?1:0)),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (info->n_c))));
args = gnm_expr_list_prepend (args, expr);
}
- expr_a = gnm_expr_new_binary
+ expr_a = gnm_expr_new_binary
(gnm_expr_new_funcall (fd_sumsq, args), GNM_EXPR_OP_DIV,
gnm_expr_new_constant (value_new_int (info->n_c)));
args = NULL;
for (i = 1; i <= info->n_c; i++) {
GnmExpr const *expr;
- expr = gnm_expr_new_funcall1
+ expr = gnm_expr_new_funcall1
(fd_sum,
gnm_expr_new_funcall5
- (fd_offset,
+ (fd_offset,
gnm_expr_new_constant (value_dup (info->input)),
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
((info->labels)?1:0)),
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
((info->labels)?i:(i-1))),
gnm_expr_new_constant (value_new_int (info->n_r)),
gnm_expr_new_constant (value_new_int (1))));
args = gnm_expr_list_prepend (args, expr);
}
- expr_b = gnm_expr_new_binary
+ expr_b = gnm_expr_new_binary
(gnm_expr_new_funcall (fd_sumsq, args), GNM_EXPR_OP_DIV,
gnm_expr_new_constant (value_new_int (info->n_r)));
-
- dao_set_cell_expr (dao, 0, 0, gnm_expr_new_binary
- (gnm_expr_copy (expr_a), GNM_EXPR_OP_SUB,
+
+ dao_set_cell_expr (dao, 0, 0, gnm_expr_new_binary
+ (gnm_expr_copy (expr_a), GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_cf)));
- dao_set_cell_expr (dao, 0, 1, gnm_expr_new_binary
- (gnm_expr_copy (expr_b), GNM_EXPR_OP_SUB,
+ dao_set_cell_expr (dao, 0, 1, gnm_expr_new_binary
+ (gnm_expr_copy (expr_b), GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_cf)));
dao_set_cell_expr (dao, 0, 2, gnm_expr_new_binary
- (gnm_expr_new_binary
+ (gnm_expr_new_binary
(expr_t, GNM_EXPR_OP_ADD, expr_cf),
GNM_EXPR_OP_SUB ,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(expr_a, GNM_EXPR_OP_ADD, expr_b)));
- expr_total = gnm_expr_new_funcall1
+ expr_total = gnm_expr_new_funcall1
(fd_sum, make_rangeref (0, -3, 0, -1));
dao_set_cell_expr (dao, 0, 3, gnm_expr_copy (expr_total));
dao_set_cell_int (dao, 1, 0, info->n_r - 1);
dao_set_cell_int (dao, 1, 1, info->n_c - 1);
dao_set_cell_expr (dao, 1, 2, gnm_expr_new_binary
- (make_cellref (0,-1), GNM_EXPR_OP_MULT,
+ (make_cellref (0,-1), GNM_EXPR_OP_MULT,
make_cellref (0,-2)));
dao_set_cell_expr (dao, 1, 3, expr_total);
- expr_ms = gnm_expr_new_binary (make_cellref (-2,0), GNM_EXPR_OP_DIV,
+ expr_ms = gnm_expr_new_binary (make_cellref (-2,0), GNM_EXPR_OP_DIV,
make_cellref (-1,0));
dao_set_cell_expr (dao, 2, 0, gnm_expr_copy (expr_ms));
dao_set_cell_expr (dao, 2, 1, gnm_expr_copy (expr_ms));
dao_set_cell_expr (dao, 2, 2, expr_ms);
- dao_set_cell_expr (dao, 3, 0, gnm_expr_new_binary
- (make_cellref (-1,0), GNM_EXPR_OP_DIV,
+ dao_set_cell_expr (dao, 3, 0, gnm_expr_new_binary
+ (make_cellref (-1,0), GNM_EXPR_OP_DIV,
make_cellref (-1,2)));
- dao_set_cell_expr (dao, 3, 1, gnm_expr_new_binary
- (make_cellref (-1,0), GNM_EXPR_OP_DIV,
+ dao_set_cell_expr (dao, 3, 1, gnm_expr_new_binary
+ (make_cellref (-1,0), GNM_EXPR_OP_DIV,
make_cellref (-1,1)));
dao_set_cell_expr
(dao, 4, 0,
@@ -422,7 +422,7 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_check;
GnmExpr const *expr_source;
GnmExpr const *expr_total_count;
-
+
GnmFunc *fd_index;
GnmFunc *fd_offset;
GnmFunc *fd_count;
@@ -464,7 +464,7 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
for (k = 1; k <= info->n_c; k++) {
if (info->labels) {
GnmExpr const *expr_label;
- expr_label = gnm_expr_new_funcall3
+ expr_label = gnm_expr_new_funcall3
(fd_index,
gnm_expr_new_constant (value_dup (info->input)),
gnm_expr_new_constant (value_new_int (1)),
@@ -473,7 +473,7 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
} else
/*xgettext: this is a label for the first, second,... level of factor B in an ANOVA*/
dao_set_cell_printf (dao, k, 2, _("B, Level %i"), k);
- }
+ }
dao_set_cell (dao, info->n_c + 1, 2, _("Subtotal"));
r = 3;
@@ -483,7 +483,7 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
dao_set_italic (dao, 0, r, 0, r+4);
if (info->labels) {
GnmExpr const *expr_label;
- expr_label = gnm_expr_new_funcall3
+ expr_label = gnm_expr_new_funcall3
(fd_index,
gnm_expr_new_constant (value_dup (info->input)),
gnm_expr_new_constant (value_new_int (level_start + 1)),
@@ -504,15 +504,15 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int ((info->labels) ? k : (k - 1))),
gnm_expr_new_constant (value_new_int (info->replication)),
gnm_expr_new_constant (value_new_int (1)));
- dao_set_cell_expr (dao, k, r + 1, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 1, gnm_expr_new_funcall1
(fd_count, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 2, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 2, gnm_expr_new_funcall1
(fd_sum, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 3, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 3, gnm_expr_new_funcall1
(fd_average, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 4, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 4, gnm_expr_new_funcall1
(fd_var, expr_source));
- }
+ }
expr_source = gnm_expr_new_funcall5
(fd_offset,
@@ -521,13 +521,13 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int ((info->labels) ? 1 : 0)),
gnm_expr_new_constant (value_new_int (info->replication)),
gnm_expr_new_constant (value_new_int (info->n_c)));
- dao_set_cell_expr (dao, k, r + 1, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 1, gnm_expr_new_funcall1
(fd_count, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 2, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 2, gnm_expr_new_funcall1
(fd_sum, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 3, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 3, gnm_expr_new_funcall1
(fd_average, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 4, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 4, gnm_expr_new_funcall1
(fd_var, expr_source));
}
@@ -546,19 +546,19 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int ((info->labels) ? k : (k - 1))),
gnm_expr_new_constant (value_new_int (info->replication * info->n_r)),
gnm_expr_new_constant (value_new_int (1)));
- dao_set_cell_expr (dao, k, r + 1, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 1, gnm_expr_new_funcall1
(fd_count, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 2, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 2, gnm_expr_new_funcall1
(fd_sum, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 3, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 3, gnm_expr_new_funcall1
(fd_average, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, k, r + 4, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, k, r + 4, gnm_expr_new_funcall1
(fd_var, expr_source));
- }
-
+ }
+
dao_set_italic (dao, info->n_c + 1, r, info->n_c + 1, r);
dao_set_cell (dao, info->n_c + 1, r, _("Total"));
-
+
expr_source = gnm_expr_new_funcall5
(fd_offset,
gnm_expr_new_constant (value_dup (info->input)),
@@ -568,20 +568,20 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (info->n_c)));
expr_total_count = gnm_expr_new_funcall1 (fd_count, gnm_expr_copy (expr_source));
dao_set_cell_expr (dao, info->n_c + 1, r + 1, gnm_expr_copy (expr_total_count));
- dao_set_cell_expr (dao, info->n_c + 1, r + 2, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, info->n_c + 1, r + 2, gnm_expr_new_funcall1
(fd_sum, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, info->n_c + 1, r + 3, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, info->n_c + 1, r + 3, gnm_expr_new_funcall1
(fd_average, gnm_expr_copy (expr_source)));
- dao_set_cell_expr (dao, info->n_c + 1, r + 4, gnm_expr_new_funcall1
+ dao_set_cell_expr (dao, info->n_c + 1, r + 4, gnm_expr_new_funcall1
(fd_var, gnm_expr_copy (expr_source)));
r += 7;
dao_set_merge (dao, 0, r, 6, r);
dao_set_italic (dao, 0, r, 6, r);
-
- expr_check = gnm_expr_new_funcall3
- (fd_if,
+
+ expr_check = gnm_expr_new_funcall3
+ (fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_total_count),
GNM_EXPR_OP_EQUAL,
@@ -589,10 +589,10 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (-1)));
dao_set_cell_expr (dao, 0, r, expr_check);
- dao_set_format (dao, 0, r, 0, r,
+ dao_set_format (dao, 0, r, 0, r,
_("\"ANOVA\";[Red]\"Invalid ANOVA: Missing Observations\""));
dao_set_align (dao, 0, r, 0, r, HALIGN_LEFT, VALIGN_BOTTOM);
-
+
r++;
dao_set_italic (dao, 0, r, 0, r + 5);
set_cell_text_col (dao, 0, r, _("/Source of Variation"
@@ -602,9 +602,9 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
"/Error"
"/Total"));
dao_set_italic (dao, 1, r, 6, r);
- dao_set_border (dao, 0, r, 6, r, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
+ dao_set_border (dao, 0, r, 6, r, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
style_color_black (), GNM_STYLE_BORDER_HORIZ);
- dao_set_border (dao, 0, r+4, 6, r+4, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
+ dao_set_border (dao, 0, r+4, 6, r+4, MSTYLE_BORDER_BOTTOM, GNM_STYLE_BORDER_THICK,
style_color_black (), GNM_STYLE_BORDER_HORIZ);
set_cell_text_row (dao, 1, r, _("/SS"
"/df"
@@ -636,12 +636,12 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (2))),
GNM_EXPR_OP_DIV,
gnm_expr_copy (expr_total_count));
-
+
args = NULL;
for (i = 1; i <= info->n_r; i++) {
GnmExpr const *expr;
int level_start = (i-1)*info->replication + 1;
-
+
expr = gnm_expr_new_funcall1
(fd_sum,
gnm_expr_new_funcall5
@@ -689,7 +689,7 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
gnm_expr_new_funcall5
(fd_offset,
gnm_expr_new_constant (value_dup (info->input)),
- gnm_expr_new_constant
+ gnm_expr_new_constant
(value_new_int ((info->labels)?level_start:level_start-1)),
gnm_expr_new_constant (value_new_int
((info->labels)?k:(k-1))),
@@ -701,7 +701,7 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
expr_s = gnm_expr_new_binary
(gnm_expr_new_funcall (fd_sumsq, args), GNM_EXPR_OP_DIV,
gnm_expr_new_constant (value_new_int (info->replication)));
-
+
dao_set_cell_expr (dao, 0, 0, gnm_expr_new_binary
(gnm_expr_copy (expr_a), GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_cf)));
diff --git a/src/tools/analysis-chi-squared.c b/src/tools/analysis-chi-squared.c
index baa8a0c..14825ef 100644
--- a/src/tools/analysis-chi-squared.c
+++ b/src/tools/analysis-chi-squared.c
@@ -56,8 +56,8 @@ analysis_tool_chi_squared_engine_run (data_analysis_output_t *dao,
char const *label;
char *cc;
- label = (info->independence)
- ? _("[>=5]\"Test of Independence\";[<5][Red]\"Invalid Test of Independence\"")
+ label = (info->independence)
+ ? _("[>=5]\"Test of Independence\";[<5][Red]\"Invalid Test of Independence\"")
: _("[>=5]\"Test of Homogeneity\";[<5][Red]\"Invalid Test of Homogeneity\"");
fd_mmult = gnm_func_lookup_or_add_placeholder ("MMULT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
@@ -88,7 +88,7 @@ analysis_tool_chi_squared_engine_run (data_analysis_output_t *dao,
if (info->labels)
expr_region = gnm_expr_new_funcall5
- (fd_offset,
+ (fd_offset,
gnm_expr_new_constant (value_dup (info->input)),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (1)),
@@ -96,9 +96,9 @@ analysis_tool_chi_squared_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (info->n_c)));
else
expr_region = gnm_expr_new_constant (value_dup (info->input));
-
+
expr_row = gnm_expr_new_funcall1 (fd_row, gnm_expr_copy (expr_region));
- expr_ones = gnm_expr_new_binary (gnm_expr_copy (expr_row),
+ expr_ones = gnm_expr_new_binary (gnm_expr_copy (expr_row),
GNM_EXPR_OP_DIV,
expr_row);
expr_expect = gnm_expr_new_binary (gnm_expr_new_funcall2
@@ -121,24 +121,24 @@ analysis_tool_chi_squared_engine_run (data_analysis_output_t *dao,
dao_set_format (dao, 0, 0, 0, 0, label);
dao_set_align (dao, 0, 0, 0, 0, HALIGN_CENTER, VALIGN_BOTTOM);
- expr_statistic = gnm_expr_new_funcall1 (fd_sum,
- gnm_expr_new_binary
- (gnm_expr_new_binary (gnm_expr_new_binary
- (gnm_expr_copy (expr_region),
- GNM_EXPR_OP_SUB,
+ expr_statistic = gnm_expr_new_funcall1 (fd_sum,
+ gnm_expr_new_binary
+ (gnm_expr_new_binary (gnm_expr_new_binary
+ (gnm_expr_copy (expr_region),
+ GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_expect)),
GNM_EXPR_OP_EXP,
gnm_expr_new_constant (value_new_int (2))),
GNM_EXPR_OP_DIV,
gnm_expr_copy (expr_expect)));
dao_set_cell_array_expr (dao, 1, 1, expr_statistic);
-
+
dao_set_cell_int (dao, 1, 2, (info->n_r - 1)*(info->n_c - 1));
dao_set_cell_expr(dao, 1, 3, gnm_expr_new_funcall2
(fd_chidist, make_cellref (0,-2), make_cellref (0,-1)));
dao_set_cell_expr(dao, 1, 4, gnm_expr_new_funcall2
- (fd_chiinv,
- gnm_expr_new_constant (value_new_float (info->alpha)),
+ (fd_chiinv,
+ gnm_expr_new_constant (value_new_float (info->alpha)),
make_cellref (0,-2)));
gnm_func_unref (fd_mmult);
@@ -179,9 +179,9 @@ analysis_tool_chi_squared_engine (data_analysis_output_t *dao, gpointer specs,
switch (selector) {
case TOOL_ENGINE_UPDATE_DESCRIPTOR:
- return (dao_command_descriptor
- (dao,
- info->independence ?
+ return (dao_command_descriptor
+ (dao,
+ info->independence ?
_("Test of Independence (%s)")
: _("Test of Homogeneity (%s)"), result)
== NULL);
@@ -193,12 +193,12 @@ analysis_tool_chi_squared_engine (data_analysis_output_t *dao, gpointer specs,
case TOOL_ENGINE_LAST_VALIDITY_CHECK:
return FALSE;
case TOOL_ENGINE_PREPARE_OUTPUT_RANGE:
- dao_prepare_output (NULL, dao, info->independence ?
+ dao_prepare_output (NULL, dao, info->independence ?
_("Test of Independence")
: _("Test of Homogeneity"));
return FALSE;
case TOOL_ENGINE_FORMAT_OUTPUT_RANGE:
- return dao_format_output (dao, info->independence ?
+ return dao_format_output (dao, info->independence ?
_("Test of Independence")
: _("Test of Homogeneity"));
case TOOL_ENGINE_PERFORM_CALC:
diff --git a/src/tools/analysis-exp-smoothing.c b/src/tools/analysis-exp-smoothing.c
index 93eeb84..3a8f22e 100644
--- a/src/tools/analysis-exp-smoothing.c
+++ b/src/tools/analysis-exp-smoothing.c
@@ -45,10 +45,10 @@ static GnmExpr const *
analysis_tool_exp_smoothing_funcall5 (GnmFunc *fd, GnmExpr const *ex, int y, int x, int dy, int dx)
{
GnmExprList *list;
- list = gnm_expr_list_prepend (NULL, gnm_expr_new_constant (value_new_int (dx)));
- list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (dy)));
- list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (x)));
- list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (y)));
+ list = gnm_expr_list_prepend (NULL, gnm_expr_new_constant (value_new_int (dx)));
+ list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (dy)));
+ list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (x)));
+ list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (y)));
list = gnm_expr_list_prepend (list, ex);
return gnm_expr_new_funcall (fd, list);
@@ -59,7 +59,7 @@ create_line_plot (GogPlot **plot, SheetObject **so)
{
GogGraph *graph;
GogChart *chart;
-
+
graph = g_object_new (GOG_TYPE_GRAPH, NULL);
chart = GOG_CHART (gog_object_add_by_name (GOG_OBJECT (graph), "Chart", NULL));
*plot = gog_plot_new_by_name ("GogLinePlot");
@@ -76,7 +76,7 @@ attach_series (GogPlot *plot, GOData *expr)
g_return_if_fail (plot != NULL);
series = gog_plot_new_series (plot);
- gog_series_set_dim (series, 1, expr, NULL);
+ gog_series_set_dim (series, 1, expr, NULL);
}
static gboolean
@@ -96,13 +96,13 @@ analysis_tool_exponential_smoothing_engine_ses_h_run (data_analysis_output_t *da
if (info->std_error_flag) {
fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sqrt);
+ gnm_func_ref (fd_sqrt);
fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sumxmy2);
+ gnm_func_ref (fd_sumxmy2);
}
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_offset);
@@ -114,7 +114,7 @@ analysis_tool_exponential_smoothing_engine_ses_h_run (data_analysis_output_t *da
dao_set_format (dao, 0, 1, 0, 1, _("\"\xce\xb1 =\" * 0.000"));
dao_set_cell_expr (dao, 0, 1, gnm_expr_new_constant (value_new_float (info->damp_fact)));
expr_alpha = dao_get_cellref (dao, 0, 1);
-
+
dao->offset_row = 2;
for (l = info->base.input, source = 1; l; l = l->next, col++, source++) {
@@ -141,15 +141,15 @@ analysis_tool_exponential_smoothing_engine_ses_h_run (data_analysis_output_t *da
val->v_range.cell.a.row++;
break;
}
- expr_title = gnm_expr_new_funcall1 (fd_index,
+ expr_title = gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c));
dao_set_italic (dao, col, 0, col, 0);
dao_set_cell_expr (dao, col, 0, expr_title);
} else
- dao_set_cell_printf
- (dao, col, 0,
- (info->base.group_by ? _("Row %d") : _("Column %d")),
+ dao_set_cell_printf
+ (dao, col, 0,
+ (info->base.group_by ? _("Row %d") : _("Column %d")),
source);
switch (info->base.group_by) {
@@ -161,35 +161,35 @@ analysis_tool_exponential_smoothing_engine_ses_h_run (data_analysis_output_t *da
height = value_area_get_height (val, NULL);
mover = &y;
break;
- }
+ }
sheet = val->v_range.cell.a.sheet;
expr_input = gnm_expr_new_constant (val);
if (plot != NULL) {
- attach_series (plot, gnm_go_data_vector_new_expr (sheet, gnm_expr_top_new
+ attach_series (plot, gnm_go_data_vector_new_expr (sheet, gnm_expr_top_new
(gnm_expr_copy (expr_input))));
attach_series (plot, dao_go_data_vector (dao, col, 1, col, height));
}
/* F(t+1) = F(t) + damp_fact * ( A(t) - F(t) ) */
(*mover) = 1;
- dao_set_cell_expr (dao, col, 1,
- gnm_expr_new_funcall1 (fd_index,
+ dao_set_cell_expr (dao, col, 1,
+ gnm_expr_new_funcall1 (fd_index,
gnm_expr_copy (expr_input)));
-
+
for (row = 2; row <= height; row++, (*mover)++) {
GnmExpr const *A;
GnmExpr const *F;
-
+
A = gnm_expr_new_binary (gnm_expr_copy (expr_alpha),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall3
- (fd_index,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_input),
gnm_expr_new_constant(value_new_int(y)),
gnm_expr_new_constant(value_new_int(x))));
- F = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
+ F = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
(value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_alpha)),
@@ -202,37 +202,37 @@ analysis_tool_exponential_smoothing_engine_ses_h_run (data_analysis_output_t *da
col++;
dao_set_italic (dao, col, 0, col, 0);
dao_set_cell (dao, col, 0, _("Standard Error"));
-
+
y = 0;
x = 0;
(*mover) = 1;
for (row = 1; row <= height; row++) {
- if (row > 1 && row <= height && (row - 1 - info->df) > 0) {
+ if (row > 1 && row <= height && (row - 1 - info->df) > 0) {
GnmExpr const *expr_offset;
-
+
if (info->base.group_by == GROUPED_BY_ROW)
delta_x = row - 1;
else
delta_y = row - 1;
-
- expr_offset = analysis_tool_exp_smoothing_funcall5
+
+ expr_offset = analysis_tool_exp_smoothing_funcall5
(fd_offset, gnm_expr_copy (expr_input), y, x, delta_y, delta_x);
dao_set_cell_expr (dao, col, row,
- gnm_expr_new_funcall1
+ gnm_expr_new_funcall1
(fd_sqrt,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_funcall2
(fd_sumxmy2,
expr_offset,
make_rangeref (-1, 2 - row, -1, 0)),
GNM_EXPR_OP_DIV,
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
(row - 1 - info->df)))));
} else
dao_set_cell_na (dao, col, row);
}
}
-
+
gnm_expr_free (expr_input);
}
@@ -270,14 +270,14 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
if (info->std_error_flag) {
fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sqrt);
+ gnm_func_ref (fd_sqrt);
fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sumxmy2);
+ gnm_func_ref (fd_sumxmy2);
}
fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_average);
+ gnm_func_ref (fd_average);
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_offset);
@@ -289,7 +289,7 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
dao_set_format (dao, 0, 1, 0, 1, _("\"\xce\xb1 =\" * 0.000"));
dao_set_cell_expr (dao, 0, 1, gnm_expr_new_constant (value_new_float (info->damp_fact)));
expr_alpha = dao_get_cellref (dao, 0, 1);
-
+
dao->offset_row = 2;
for (l = info->base.input, source = 1; l; l = l->next, col++, source++) {
@@ -316,15 +316,15 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
val->v_range.cell.a.row++;
break;
}
- expr_title = gnm_expr_new_funcall1 (fd_index,
+ expr_title = gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c));
dao_set_italic (dao, col, 0, col, 0);
dao_set_cell_expr (dao, col, 0, expr_title);
} else
- dao_set_cell_printf
- (dao, col, 0,
- (info->base.group_by ? _("Row %d") : _("Column %d")),
+ dao_set_cell_printf
+ (dao, col, 0,
+ (info->base.group_by ? _("Row %d") : _("Column %d")),
source);
switch (info->base.group_by) {
@@ -336,24 +336,24 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
height = value_area_get_height (val, NULL);
mover = &y;
break;
- }
+ }
sheet = val->v_range.cell.a.sheet;
expr_input = gnm_expr_new_constant (val);
if (plot != NULL) {
- attach_series (plot, gnm_go_data_vector_new_expr (sheet, gnm_expr_top_new
+ attach_series (plot, gnm_go_data_vector_new_expr (sheet, gnm_expr_top_new
(gnm_expr_copy (expr_input))));
attach_series (plot, dao_go_data_vector (dao, col, 2, col, height + 1));
}
/* F(t+1) = F(t) + damp_fact * ( A(t+1) - F(t) ) */
-
+
x = 1;
y = 1;
*mover = 5;
dao_set_cell_expr (dao, col, 1, gnm_expr_new_funcall1
- (fd_average,
+ (fd_average,
analysis_tool_exp_smoothing_funcall5 (fd_offset, gnm_expr_copy (expr_input), 0, 0, y, x)));
x = 1;
y = 1;
@@ -361,15 +361,15 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
for (row = 1; row <= height; row++, (*mover)++) {
GnmExpr const *A;
GnmExpr const *F;
-
+
A = gnm_expr_new_binary (gnm_expr_copy (expr_alpha),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall3
- (fd_index,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_input),
gnm_expr_new_constant(value_new_int(y)),
gnm_expr_new_constant(value_new_int(x))));
- F = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
+ F = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
(value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_alpha)),
@@ -382,31 +382,31 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
col++;
dao_set_italic (dao, col, 0, col, 0);
dao_set_cell (dao, col, 0, _("Standard Error"));
-
+
y = 0;
x = 0;
(*mover) = 0;
for (row = 1; row <= height+1; row++) {
- if (row > 1 && (row - 1 - info->df) > 0) {
+ if (row > 1 && (row - 1 - info->df) > 0) {
GnmExpr const *expr_offset;
-
+
if (info->base.group_by == GROUPED_BY_ROW)
delta_x = row - 1;
else
delta_y = row - 1;
-
- expr_offset = analysis_tool_exp_smoothing_funcall5
+
+ expr_offset = analysis_tool_exp_smoothing_funcall5
(fd_offset, gnm_expr_copy (expr_input), y, x, delta_y, delta_x);
dao_set_cell_expr (dao, col, row,
- gnm_expr_new_funcall1
+ gnm_expr_new_funcall1
(fd_sqrt,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_funcall2
(fd_sumxmy2,
expr_offset,
make_rangeref (-1, 1 - row, -1, -1)),
GNM_EXPR_OP_DIV,
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
(row - 1 - info->df)))));
} else
dao_set_cell_na (dao, col, row);
@@ -414,10 +414,10 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
}
gnm_expr_free (expr_input);
}
-
+
if (so != NULL)
dao_set_sheet_object (dao, 0, 1, so);
-
+
gnm_expr_free (expr_alpha);
if (fd_sqrt != NULL)
gnm_func_unref (fd_sqrt);
@@ -451,15 +451,15 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
if (info->std_error_flag) {
fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sqrt);
+ gnm_func_ref (fd_sqrt);
fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sumxmy2);
+ gnm_func_ref (fd_sumxmy2);
}
-
+
fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_linest);
+ gnm_func_ref (fd_linest);
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_offset);
@@ -472,7 +472,7 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
dao_set_format (dao, 0, 1, 0, 1, _("\"\xce\xb1 =\" * 0.000"));
dao_set_cell_expr (dao, 0, 1, gnm_expr_new_constant (value_new_float (info->damp_fact)));
expr_alpha = dao_get_cellref (dao, 0, 1);
-
+
dao_set_format (dao, 1, 1, 1, 1, _("\"\xce\xb3 =\" * 0.000"));
dao_set_cell_expr (dao, 1, 1, gnm_expr_new_constant (value_new_float (info->g_damp_fact)));
expr_gamma = dao_get_cellref (dao, 1, 1);
@@ -503,15 +503,15 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
val->v_range.cell.a.row++;
break;
}
- expr_title = gnm_expr_new_funcall1 (fd_index,
+ expr_title = gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c));
dao_set_italic (dao, col, 0, col, 0);
dao_set_cell_expr (dao, col, 0, expr_title);
} else
- dao_set_cell_printf
- (dao, col, 0,
- (info->base.group_by ? _("Row %d") : _("Column %d")),
+ dao_set_cell_printf
+ (dao, col, 0,
+ (info->base.group_by ? _("Row %d") : _("Column %d")),
source);
switch (info->base.group_by) {
@@ -523,13 +523,13 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
height = value_area_get_height (val, NULL);
mover = &y;
break;
- }
+ }
sheet = val->v_range.cell.a.sheet;
expr_input = gnm_expr_new_constant (val);
if (plot != NULL) {
- attach_series (plot, gnm_go_data_vector_new_expr (sheet, gnm_expr_top_new
+ attach_series (plot, gnm_go_data_vector_new_expr (sheet, gnm_expr_top_new
(gnm_expr_copy (expr_input))));
attach_series (plot, dao_go_data_vector (dao, col, 2, col, height + 1));
}
@@ -537,24 +537,24 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
if (dao_cell_is_visible (dao, col+1, 1))
{
GnmExpr const *expr_linest;
-
+
x = 1;
y = 1;
*mover = 5;
expr_linest = gnm_expr_new_funcall1
- (fd_linest,
+ (fd_linest,
analysis_tool_exp_smoothing_funcall5 (fd_offset, gnm_expr_copy (expr_input), 0, 0, y, x));
- dao_set_cell_expr (dao, col, 1,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_expr (dao, col, 1,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (2))));
- dao_set_cell_expr (dao, col + 1, 1,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_expr (dao, col + 1, 1,
+ gnm_expr_new_funcall3 (fd_index,
expr_linest,
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (1))));
-
+
*mover = 1;
for (row = 1; row <= height; row++, (*mover)++) {
GnmExpr const *LB;
@@ -563,12 +563,12 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
GnmExpr const *B;
A = gnm_expr_new_binary (gnm_expr_copy (expr_alpha),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall3
- (fd_index,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_input),
gnm_expr_new_constant(value_new_int(y)),
gnm_expr_new_constant(value_new_int(x))));
- LB = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
+ LB = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
(value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_alpha)),
@@ -577,55 +577,55 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
GNM_EXPR_OP_ADD,
make_cellref (1, -1)));
dao_set_cell_expr (dao, col, row + 1, gnm_expr_new_binary (A, GNM_EXPR_OP_ADD, LB));
-
+
LL = gnm_expr_new_binary (gnm_expr_copy (expr_gamma),
GNM_EXPR_OP_MULT,
gnm_expr_new_binary (make_cellref (-1, 0),
GNM_EXPR_OP_SUB,
make_cellref (-1, -1)));
- B = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
+ B = gnm_expr_new_binary (gnm_expr_new_binary (gnm_expr_new_constant
(value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_gamma)),
GNM_EXPR_OP_MULT,
make_cellref (0, -1));
dao_set_cell_expr (dao, col + 1, row + 1, gnm_expr_new_binary (LL, GNM_EXPR_OP_ADD, B));
- }
-
+ }
+
col++;
-
+
if (info->std_error_flag) {
col++;
dao_set_italic (dao, col, 0, col, 0);
dao_set_cell (dao, col, 0, _("Standard Error"));
-
+
y = 0;
x = 0;
(*mover) = 0;
for (row = 1; row <= height+1; row++) {
- if (row > 1 && (row - 1 - info->df) > 0) {
+ if (row > 1 && (row - 1 - info->df) > 0) {
GnmExpr const *expr_offset;
-
+
if (info->base.group_by == GROUPED_BY_ROW)
delta_x = row - 1;
else
delta_y = row - 1;
-
- expr_offset = analysis_tool_exp_smoothing_funcall5
+
+ expr_offset = analysis_tool_exp_smoothing_funcall5
(fd_offset, gnm_expr_copy (expr_input), y, x, delta_y, delta_x);
-
+
dao_set_cell_expr (dao, col, row,
- gnm_expr_new_funcall1
+ gnm_expr_new_funcall1
(fd_sqrt,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_funcall2
(fd_sumxmy2,
expr_offset,
gnm_expr_new_binary(make_rangeref (-2, 1 - row, -2, -1),
- GNM_EXPR_OP_ADD,
+ GNM_EXPR_OP_ADD,
make_rangeref (-1, 1 - row, -1, -1))),
GNM_EXPR_OP_DIV,
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
(row - 1 - info->df)))));
} else
dao_set_cell_na (dao, col, row);
@@ -642,10 +642,10 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
value_release (val);
}
}
-
+
if (so != NULL)
dao_set_sheet_object (dao, 0, 1, so);
-
+
gnm_expr_free (expr_alpha);
gnm_expr_free (expr_gamma);
if (fd_sqrt != NULL)
@@ -685,15 +685,15 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
if (info->std_error_flag) {
fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sqrt);
+ gnm_func_ref (fd_sqrt);
fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sumxmy2);
+ gnm_func_ref (fd_sumxmy2);
}
-
+
fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_linest);
+ gnm_func_ref (fd_linest);
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_average);
fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
@@ -712,7 +712,7 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
dao_set_format (dao, 2, 0, 2, 0, _("\"\xce\xb1 =\" * 0.000"));
dao_set_cell_expr (dao, 2, 0, gnm_expr_new_constant (value_new_float (info->damp_fact)));
expr_alpha = dao_get_cellref (dao, 2, 0);
-
+
dao_set_format (dao, 3, 0, 3, 0, _("\"\xce\xb3 =\" * 0.000"));
dao_set_cell_expr (dao, 3, 0, gnm_expr_new_constant (value_new_float (info->g_damp_fact)));
expr_gamma = dao_get_cellref (dao, 3, 0);
@@ -755,7 +755,7 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
set_cell_text_row (dao, col + 1, -info->s_period, _("/Level"
"/Trend"
"/Seasonal Adjustment"));
-
+
if (info->base.labels) {
val_c = value_dup (val);
switch (info->base.group_by) {
@@ -768,7 +768,7 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
}
expr_title = gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c));
-
+
dao_set_italic (dao, col, -info->s_period, col, -info->s_period);
dao_set_cell_expr (dao, col, -info->s_period, expr_title);
} else
@@ -776,21 +776,21 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
(dao, col, -info->s_period,
(info->base.group_by ? _("Row %d") : _("Column %d")),
source);
-
-
+
+
switch (info->base.group_by) {
case GROUPED_BY_ROW:
height = value_area_get_width (val, NULL);
expr_input = gnm_expr_new_constant (val);
expr_index = gnm_expr_new_funcall3 (fd_index, gnm_expr_copy (expr_input),
- gnm_expr_new_constant (value_new_int (1)),
+ gnm_expr_new_constant (value_new_int (1)),
make_cellref (-1 - col, 0));
break;
default:
height = value_area_get_height (val, NULL);
expr_input = gnm_expr_new_constant (val);
expr_index = gnm_expr_new_funcall3 (fd_index, gnm_expr_copy (expr_input),
- make_cellref (-1 - col, 0),
+ make_cellref (-1 - col, 0),
gnm_expr_new_constant (value_new_int (1)));
break;
}
@@ -810,55 +810,55 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (1))));
expr_linest_slope = dao_get_cellref (dao, col + 2, 0);
- expr_level = gnm_expr_new_binary (gnm_expr_new_binary
+ expr_level = gnm_expr_new_binary (gnm_expr_new_binary
(gnm_expr_copy (expr_alpha),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (-1,0),
GNM_EXPR_OP_SUB,
make_cellref (2,-info->s_period))),
GNM_EXPR_OP_ADD,
- gnm_expr_new_binary
- (gnm_expr_new_binary
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_alpha)),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (0,-1),
GNM_EXPR_OP_ADD,
make_cellref (1,-1))));
- expr_trend = gnm_expr_new_binary (gnm_expr_new_binary
+ expr_trend = gnm_expr_new_binary (gnm_expr_new_binary
(gnm_expr_copy (expr_gamma),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (-1,0),
GNM_EXPR_OP_SUB,
make_cellref (-1,-1))),
GNM_EXPR_OP_ADD,
- gnm_expr_new_binary
- (gnm_expr_new_binary
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_gamma)),
GNM_EXPR_OP_MULT,
make_cellref (0,-1)));
- expr_season = gnm_expr_new_binary (gnm_expr_new_binary
+ expr_season = gnm_expr_new_binary (gnm_expr_new_binary
(gnm_expr_copy (expr_delta),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (-3,0),
GNM_EXPR_OP_SUB,
make_cellref (-2,0))),
GNM_EXPR_OP_ADD,
- gnm_expr_new_binary
- (gnm_expr_new_binary
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_delta)),
GNM_EXPR_OP_MULT,
make_cellref (0,-info->s_period)));
-
+
for (time = 1; time <= maxheight; time++) {
dao_set_cell_expr (dao, col, time, gnm_expr_copy (expr_index));
dao_set_cell_expr (dao, col+1, time, gnm_expr_copy (expr_level));
@@ -869,7 +869,7 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
gnm_expr_free (expr_level);
gnm_expr_free (expr_trend);
gnm_expr_free (expr_season);
-
+
if (plot != NULL) {
attach_series (plot, dao_go_data_vector (dao, col, 1, col, height));
attach_series (plot, dao_go_data_vector (dao, col+1, 1, col+1, height));
@@ -877,16 +877,16 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
/* We still need to calculate the estimates for the seasonal adjustment. */
- expr_season_est = gnm_expr_new_funcall1
+ expr_season_est = gnm_expr_new_funcall1
(fd_average,
gnm_expr_new_funcall3
(fd_if,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_funcall2
(fd_mod,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_funcall1
- (fd_row,
+ (fd_row,
gnm_expr_copy (expr_data)),
GNM_EXPR_OP_SUB,
gnm_expr_new_funcall (fd_row, NULL)),
@@ -904,23 +904,23 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
GNM_EXPR_OP_MULT,
expr_linest_slope))),
gnm_expr_new_constant (value_new_string ("NA"))));
-
+
for (time = 0; time > -info->s_period; time--)
dao_set_cell_array_expr (dao, col+3, time, gnm_expr_copy (expr_season_est));
gnm_expr_free (expr_season_est);
-
+
col += 4;
if (info->std_error_flag) {
int row;
-
+
dao_set_italic (dao, col, - info->s_period, col, - info->s_period);
dao_set_cell (dao, col, - info->s_period, _("Standard Error"));
-
+
for (row = 1; row <= height; row++) {
if (row > 1 && (row - info->df) > 0) {
GnmExpr const *expr_stderr;
-
+
expr_stderr = gnm_expr_new_funcall1
(fd_sqrt,
gnm_expr_new_binary
@@ -928,7 +928,7 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
(fd_sumxmy2,
make_rangeref (-4, 1 - row, -4, 0),
gnm_expr_new_binary
- (make_rangeref (-1, 1 - row - info->s_period,
+ (make_rangeref (-1, 1 - row - info->s_period,
-1, - info->s_period),
GNM_EXPR_OP_ADD,
gnm_expr_new_binary
@@ -1002,15 +1002,15 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
if (info->std_error_flag) {
fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sqrt);
+ gnm_func_ref (fd_sqrt);
fd_sumsq = gnm_func_lookup_or_add_placeholder ("SUMSQ", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sumsq);
+ gnm_func_ref (fd_sumsq);
}
-
+
fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_linest);
+ gnm_func_ref (fd_linest);
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_offset);
fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
@@ -1031,7 +1031,7 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
dao_set_format (dao, 2, 0, 2, 0, _("\"\xce\xb1 =\" * 0.000"));
dao_set_cell_expr (dao, 2, 0, gnm_expr_new_constant (value_new_float (info->damp_fact)));
expr_alpha = dao_get_cellref (dao, 2, 0);
-
+
dao_set_format (dao, 3, 0, 3, 0, _("\"\xce\xb3 =\" * 0.000"));
dao_set_cell_expr (dao, 3, 0, gnm_expr_new_constant (value_new_float (info->g_damp_fact)));
expr_gamma = dao_get_cellref (dao, 3, 0);
@@ -1076,7 +1076,7 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
set_cell_text_row (dao, col + 1, -info->s_period, _("/Level"
"/Trend"
"/Seasonal Adjustment"));
-
+
if (info->base.labels) {
val_c = value_dup (val);
switch (info->base.group_by) {
@@ -1089,7 +1089,7 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
}
expr_title = gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c));
-
+
dao_set_italic (dao, col, -info->s_period, col, -info->s_period);
dao_set_cell_expr (dao, col, -info->s_period, expr_title);
} else
@@ -1097,21 +1097,21 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
(dao, col, -info->s_period,
(info->base.group_by ? _("Row %d") : _("Column %d")),
source);
-
-
+
+
switch (info->base.group_by) {
case GROUPED_BY_ROW:
height = value_area_get_width (val, NULL);
expr_input = gnm_expr_new_constant (val);
expr_index = gnm_expr_new_funcall3 (fd_index, gnm_expr_copy (expr_input),
- gnm_expr_new_constant (value_new_int (1)),
+ gnm_expr_new_constant (value_new_int (1)),
make_cellref (-1 - col, 0));
break;
default:
height = value_area_get_height (val, NULL);
expr_input = gnm_expr_new_constant (val);
expr_index = gnm_expr_new_funcall3 (fd_index, gnm_expr_copy (expr_input),
- make_cellref (-1 - col, 0),
+ make_cellref (-1 - col, 0),
gnm_expr_new_constant (value_new_int (1)));
break;
}
@@ -1119,7 +1119,7 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
if (starting_length > height)
starting_length = height;
expr_data = analysis_tool_exp_smoothing_funcall5 (fd_offset,
- dao_get_rangeref (dao, col, 1, col, height),
+ dao_get_rangeref (dao, col, 1, col, height),
0, 0, starting_length, 1);
expr_linest = gnm_expr_new_funcall1 (fd_linest, gnm_expr_copy (expr_data));
dao_set_cell_expr (dao, col+1, 0,
@@ -1134,55 +1134,55 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (1))));
expr_linest_slope = dao_get_cellref (dao, col + 2, 0);
- expr_level = gnm_expr_new_binary (gnm_expr_new_binary
+ expr_level = gnm_expr_new_binary (gnm_expr_new_binary
(gnm_expr_copy (expr_alpha),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (-1,0),
GNM_EXPR_OP_DIV,
make_cellref (2,-info->s_period))),
GNM_EXPR_OP_ADD,
- gnm_expr_new_binary
- (gnm_expr_new_binary
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_alpha)),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (0,-1),
GNM_EXPR_OP_ADD,
make_cellref (1,-1))));
- expr_trend = gnm_expr_new_binary (gnm_expr_new_binary
+ expr_trend = gnm_expr_new_binary (gnm_expr_new_binary
(gnm_expr_copy (expr_gamma),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (-1,0),
GNM_EXPR_OP_SUB,
make_cellref (-1,-1))),
GNM_EXPR_OP_ADD,
- gnm_expr_new_binary
- (gnm_expr_new_binary
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_gamma)),
GNM_EXPR_OP_MULT,
make_cellref (0,-1)));
- expr_season = gnm_expr_new_binary (gnm_expr_new_binary
+ expr_season = gnm_expr_new_binary (gnm_expr_new_binary
(gnm_expr_copy (expr_delta),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(make_cellref (-3,0),
GNM_EXPR_OP_DIV,
make_cellref (-2,0))),
GNM_EXPR_OP_ADD,
- gnm_expr_new_binary
- (gnm_expr_new_binary
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_delta)),
GNM_EXPR_OP_MULT,
make_cellref (0,-info->s_period)));
-
+
for (time = 1; time <= maxheight; time++) {
dao_set_cell_expr (dao, col, time, gnm_expr_copy (expr_index));
dao_set_cell_expr (dao, col+1, time, gnm_expr_copy (expr_level));
@@ -1193,7 +1193,7 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
gnm_expr_free (expr_level);
gnm_expr_free (expr_trend);
gnm_expr_free (expr_season);
-
+
if (plot != NULL) {
attach_series (plot, dao_go_data_vector (dao, col, 1, col, height));
attach_series (plot, dao_go_data_vector (dao, col+1, 1, col+1, height));
@@ -1225,8 +1225,8 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
(gnm_expr_copy (expr_linest_intercept),
GNM_EXPR_OP_ADD,
gnm_expr_new_binary
- (analysis_tool_exp_smoothing_funcall5
- (fd_offset, dao_get_rangeref
+ (analysis_tool_exp_smoothing_funcall5
+ (fd_offset, dao_get_rangeref
(dao, -1, 1, -1, height), 0, 0, starting_length, 1),
GNM_EXPR_OP_MULT,
gnm_expr_copy (expr_linest_slope)))),
@@ -1258,14 +1258,14 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
(expr_linest_intercept,
GNM_EXPR_OP_ADD,
gnm_expr_new_binary
- (analysis_tool_exp_smoothing_funcall5
- (fd_offset, dao_get_rangeref
+ (analysis_tool_exp_smoothing_funcall5
+ (fd_offset, dao_get_rangeref
(dao, -1, 1, -1, height), 0, 0, starting_length, 1),
GNM_EXPR_OP_MULT,
expr_linest_slope))),
gnm_expr_new_constant (value_new_string ("NA"))));
-
- expr_season_est = gnm_expr_new_binary (expr_season_est,
+
+ expr_season_est = gnm_expr_new_binary (expr_season_est,
GNM_EXPR_OP_DIV,
expr_season_denom);
@@ -1276,22 +1276,22 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
col += 4;
if (info->std_error_flag) {
int row;
-
+
dao_set_italic (dao, col, - info->s_period, col, - info->s_period);
dao_set_cell (dao, col, - info->s_period, _("Standard Error"));
-
+
for (row = 1; row <= height; row++) {
if (row > 1 && (row - info->df) > 0) {
GnmExpr const *expr_stderr;
GnmExpr const *expr_denom;
-
+
expr_denom = gnm_expr_new_binary
(gnm_expr_new_binary
(make_rangeref (-2, - row, -2, -1),
GNM_EXPR_OP_ADD,
make_rangeref (-3, - row, -3, -1)),
GNM_EXPR_OP_MULT,
- make_rangeref (-1, 1 - row - info->s_period,
+ make_rangeref (-1, 1 - row - info->s_period,
-1, - info->s_period));
expr_stderr = gnm_expr_new_funcall1
(fd_sqrt,
@@ -1324,7 +1324,7 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
"output columns for each data set."));
value_release (val);
}
-
+
}
if (so != NULL)
@@ -1381,7 +1381,7 @@ analysis_tool_exponential_smoothing_engine (data_analysis_output_t *dao,
n += 4;
m += info->s_period;
}
- dao_adjust (dao,
+ dao_adjust (dao,
n * g_slist_length (info->base.input), m);
return FALSE;
case TOOL_ENGINE_CLEAN_UP:
diff --git a/src/tools/analysis-exp-smoothing.h b/src/tools/analysis-exp-smoothing.h
index a19b4be..15d907a 100644
--- a/src/tools/analysis-exp-smoothing.h
+++ b/src/tools/analysis-exp-smoothing.h
@@ -55,9 +55,9 @@ typedef struct {
exponential_smoothing_type_t es_type;
} analysis_tools_data_exponential_smoothing_t;
-gboolean analysis_tool_exponential_smoothing_engine (data_analysis_output_t *dao,
+gboolean analysis_tool_exponential_smoothing_engine (data_analysis_output_t *dao,
gpointer specs,
- analysis_tool_engine_t selector,
+ analysis_tool_engine_t selector,
gpointer result);
diff --git a/src/tools/analysis-frequency.c b/src/tools/analysis-frequency.c
index f72fa48..2c1c302 100644
--- a/src/tools/analysis-frequency.c
+++ b/src/tools/analysis-frequency.c
@@ -60,7 +60,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
gnm_func_ref (fd_index);
fd_isblank = gnm_func_lookup_or_add_placeholder ("ISBLANK", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_isblank);
-
+
if (info->exact) {
fd_exact = gnm_func_lookup_or_add_placeholder ("EXACT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_exact);
@@ -83,7 +83,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
int row = 2, i, j, i_h_limit, i_w_limit;
GnmExpr const *expr_bin;
GnmRange range;
-
+
range_init_value (&range, info->bin);
i_h_limit = range_height (&range);
i_w_limit = range_width (&range);
@@ -100,7 +100,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
gnm_expr_copy (expr_bin),
gnm_expr_new_constant (value_new_int (i)),
gnm_expr_new_constant (value_new_int (j)));
-
+
dao_set_cell_expr (dao, 0, row++,
gnm_expr_new_funcall3
(fd_if,
@@ -114,7 +114,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
} else {
i_limit = info->n;
}
-
+
for (l = info->base.input, col = 1; l; col++, l = l->next) {
GnmValue *val = value_dup ((GnmValue *)l->data);
GnmValue *val_c = NULL;
@@ -123,7 +123,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_if;
int i, row = 2;
-
+
if (info->base.labels) {
val_c = value_dup (val);
switch (info->base.group_by) {
@@ -139,7 +139,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (val_c)));
} else {
char const *format;
-
+
switch (info->base.group_by) {
case GROUPED_BY_ROW:
format = _("Row %d");
@@ -155,17 +155,17 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
}
expr_data = gnm_expr_new_constant (val);
-
+
if (info->exact)
- expr_if = gnm_expr_new_funcall2
- (fd_exact, gnm_expr_copy (expr_data),
+ expr_if = gnm_expr_new_funcall2
+ (fd_exact, gnm_expr_copy (expr_data),
make_cellref (- col, 0));
else
expr_if = gnm_expr_new_binary
(gnm_expr_copy (expr_data),
GNM_EXPR_OP_EQUAL, make_cellref (- col, 0));
- expr_count = gnm_expr_new_funcall1 (fd_sum,
+ expr_count = gnm_expr_new_funcall1 (fd_sum,
gnm_expr_new_funcall3
(fd_if, expr_if,
gnm_expr_new_constant (value_new_int (1)),
@@ -175,7 +175,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
dao_set_format (dao, col, 2, col, i_limit + 2, "0.0%");
expr_count = gnm_expr_new_binary (expr_count,
GNM_EXPR_OP_DIV,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_funcall1
(fd_rows, gnm_expr_copy (expr_data)),
GNM_EXPR_OP_MULT,
@@ -186,7 +186,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
for (i = 0; i < i_limit; i++, row++)
dao_set_cell_array_expr (dao, col, row, gnm_expr_copy (expr_count));
-
+
gnm_expr_free (expr_count);
}
@@ -211,7 +211,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
GOData *cats;
GOData *values;
int ct;
-
+
graph = g_object_new (GOG_TYPE_GRAPH, NULL);
chart = GOG_CHART (gog_object_add_by_name (
GOG_OBJECT (graph), "Chart", NULL));
@@ -220,7 +220,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
go_object_toggle (plot, "horizontal");
gog_object_add_by_name (GOG_OBJECT (chart),
"Plot", GOG_OBJECT (plot));
-
+
cats = dao_go_data_vector (dao, 0, 2,
0, 2 + i_limit);
@@ -228,7 +228,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
g_object_ref (cats);
values = dao_go_data_vector (dao, ct, 2,
ct, 2 + i_limit);
-
+
series = gog_plot_new_series (plot);
gog_series_set_dim (series, 0, cats, NULL);
gog_series_set_dim (series, 1, values, NULL);
@@ -237,7 +237,7 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
so = sheet_object_graph_new (graph);
g_object_unref (graph);
-
+
dao_set_sheet_object (dao, 0, 1, so);
}
diff --git a/src/tools/analysis-frequency.h b/src/tools/analysis-frequency.h
index 8e3b39d..2c8da06 100644
--- a/src/tools/analysis-frequency.h
+++ b/src/tools/analysis-frequency.h
@@ -49,7 +49,7 @@ typedef struct {
gint n;
gboolean percentage;
gboolean exact;
- chart_freq_t chart;
+ chart_freq_t chart;
} analysis_tools_data_frequency_t;
gboolean analysis_tool_frequency_engine (data_analysis_output_t *dao, gpointer specs,
diff --git a/src/tools/analysis-histogram.c b/src/tools/analysis-histogram.c
index 307e76d..22d0648 100644
--- a/src/tools/analysis-histogram.c
+++ b/src/tools/analysis-histogram.c
@@ -67,9 +67,9 @@ make_hist_expr (analysis_tools_data_histogram_t *info,
expr_if_to = gnm_expr_new_constant (value_new_int (1));
else
expr_if_to = gnm_expr_new_funcall3
- (fd_if,
- gnm_expr_new_binary
- (gnm_expr_copy (expr_data),
+ (fd_if,
+ gnm_expr_new_binary
+ (gnm_expr_copy (expr_data),
to, make_cellref (- (col-to_col), 0)),
gnm_expr_new_constant (value_new_int (0)),
gnm_expr_new_constant (value_new_int (1)));
@@ -82,9 +82,9 @@ make_hist_expr (analysis_tools_data_histogram_t *info,
expr_if_from = one;
else
expr_if_from = gnm_expr_new_funcall3
- (fd_if,
- gnm_expr_new_binary
- (gnm_expr_copy (expr_data),
+ (fd_if,
+ gnm_expr_new_binary
+ (gnm_expr_copy (expr_data),
from, make_cellref (- col, 0)),
gnm_expr_new_constant (value_new_int (0)),
one);
@@ -98,8 +98,8 @@ make_hist_expr (analysis_tools_data_histogram_t *info,
if (info->percentage)
expr = gnm_expr_new_binary (expr,
GNM_EXPR_OP_DIV,
- gnm_expr_new_funcall1
- (fd_count,
+ gnm_expr_new_funcall1
+ (fd_count,
expr_data));
else
gnm_expr_free (expr_data);
@@ -128,9 +128,9 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
if (info->base.labels) {
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
}
-
+
/* General Info */
@@ -145,7 +145,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
} else {
i_limit = info->n;
}
-
+
i_end = i_limit;
if (info->bin_type & bintype_p_inf_lower)
i_end++;
@@ -167,16 +167,16 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
if (info->predetermined) {
expr_bin = gnm_expr_new_constant (info->bin);
for (i = 0; i < i_limit; i++)
- dao_set_cell_expr (dao, to_col, i_start + i,
+ dao_set_cell_expr (dao, to_col, i_start + i,
gnm_expr_new_funcall2 (fd_small,
gnm_expr_copy (expr_bin),
- gnm_expr_new_constant
+ gnm_expr_new_constant
(value_new_int (i + 1))));
} else {
GnmValue *val = value_dup (info->base.input->data);
GnmExpr const *expr_min;
GnmExpr const *expr_max;
-
+
switch (info->base.group_by) {
case GROUPED_BY_ROW:
val->v_range.cell.a.col++;
@@ -185,16 +185,16 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
val->v_range.cell.a.row++;
break;
}
-
+
if (info->min_given)
dao_set_cell_float (dao, to_col, i_start, info->min);
else {
GnmFunc *fd_min;
-
+
fd_min = gnm_func_lookup_or_add_placeholder ("MIN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_min);
dao_set_cell_expr (dao, to_col, i_start,
- gnm_expr_new_funcall1
+ gnm_expr_new_funcall1
(fd_min,
gnm_expr_new_constant (value_dup (val))));
gnm_func_unref (fd_min);
@@ -204,42 +204,42 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
dao_set_cell_float (dao, to_col, i_start + i_limit - 1, info->max);
else {
GnmFunc *fd_max;
-
+
fd_max = gnm_func_lookup_or_add_placeholder ("MAX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_max);
dao_set_cell_expr (dao, to_col, i_start + i_limit - 1,
- gnm_expr_new_funcall1
+ gnm_expr_new_funcall1
(fd_max,
gnm_expr_new_constant (value_dup (val))));
gnm_func_unref (fd_max);
}
value_release (val);
-
+
expr_min = dao_get_cellref (dao, to_col, i_start);
expr_max = dao_get_cellref (dao, to_col, i_start + i_limit - 1);
for (i = 1; i < i_limit - 1; i++)
- dao_set_cell_expr (dao, to_col, i_start + i,
+ dao_set_cell_expr (dao, to_col, i_start + i,
gnm_expr_new_binary (gnm_expr_copy (expr_min),
GNM_EXPR_OP_ADD,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (i)),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
- (gnm_expr_new_binary
- (gnm_expr_copy (expr_max),
- GNM_EXPR_OP_SUB,
- gnm_expr_copy (expr_min)),
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
+ (gnm_expr_copy (expr_max),
+ GNM_EXPR_OP_SUB,
+ gnm_expr_copy (expr_min)),
GNM_EXPR_OP_DIV,
gnm_expr_new_constant (value_new_int (info->n - 1))))));
-
+
gnm_expr_free (expr_min);
gnm_expr_free (expr_max);
}
-
+
if (info->bin_type & bintype_p_inf_lower) {
- dao_set_format (dao, to_col, i_end, to_col, i_end,
+ dao_set_format (dao, to_col, i_end, to_col, i_end,
_("\"to\" * \"\xe2\x88\x9e\""));
dao_set_cell_value (dao, to_col, i_end, value_new_float (GNM_MAX));
}
@@ -255,7 +255,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
_("\"from\" * General") : _("\"above\" * General");
dao_set_format (dao, 0, 2, 0, i_end, format);
if (info->bin_type & bintype_m_inf_lower)
- dao_set_format (dao, 0, 2, 0, 2,
+ dao_set_format (dao, 0, 2, 0, 2,
_("\"from\" * \"\xe2\x88\x92\xe2\x88\x9e\";"
"\"from\" * \"\xe2\x88\x92\xe2\x88\x9e\""));
for (i = 2; i <= i_end; i++)
@@ -269,7 +269,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
for (l = info->base.input, col = to_col + 1; l; col++, l = l->next) {
GnmValue *val = l->data;
GnmValue *val_c = NULL;
-
+
if (info->base.labels) {
val_c = value_dup (val);
switch (info->base.group_by) {
@@ -281,11 +281,11 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
break;
}
dao_set_cell_expr (dao, col, 1,
- gnm_expr_new_funcall1 (fd_index,
+ gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c)));
} else {
char const *format;
-
+
switch (info->base.group_by) {
case GROUPED_BY_ROW:
format = _("Row %d");
@@ -295,7 +295,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
break;
default:
format = _("Area %d");
- break;
+ break;
}
dao_set_cell_printf (dao, col, 1, format, col - to_col);
}
@@ -310,7 +310,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
(info->bin_type & bintype_p_inf_lower);
dao_set_cell_array_expr
(dao, col, i,
- make_hist_expr (info, col, val,
+ make_hist_expr (info, col, val,
fromminf, topinf, dao));
}
}
@@ -334,7 +334,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
GOData *limits;
GOData *values;
int ct;
-
+
graph = g_object_new (GOG_TYPE_GRAPH, NULL);
chart = GOG_CHART (gog_object_add_by_name (
GOG_OBJECT (graph), "Chart", NULL));
@@ -357,15 +357,15 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
gog_object_add_by_name (GOG_OBJECT (chart),
"Plot", GOG_OBJECT (plot));
-
- limits = dao_go_data_vector (dao, to_col, limits_start,
+
+ limits = dao_go_data_vector (dao, to_col, limits_start,
to_col, limits_end);
for (ct = 1; ct < (col - to_col); ct ++) {
g_object_ref (limits);
- values = dao_go_data_vector (dao, to_col + ct, values_start,
+ values = dao_go_data_vector (dao, to_col + ct, values_start,
to_col + ct, values_end);
-
+
series = gog_plot_new_series (plot);
gog_series_set_dim (series, 0, limits, NULL);
gog_series_set_dim (series, 1, values, NULL);
@@ -380,11 +380,11 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
NULL, NULL);
}
-
-
+
+
so = sheet_object_graph_new (graph);
g_object_unref (graph);
-
+
dao_set_sheet_object (dao, 0, 1, so);
}
@@ -400,7 +400,7 @@ calc_length (GnmValue *bin)
g_return_val_if_fail (bin != NULL, 0);
g_return_val_if_fail (bin->type == VALUE_CELLRANGE, 0);
- return ((bin->v_range.cell.b.col - bin->v_range.cell.a.col + 1) *
+ return ((bin->v_range.cell.b.col - bin->v_range.cell.a.col + 1) *
(bin->v_range.cell.b.row - bin->v_range.cell.a.row + 1));
}
diff --git a/src/tools/analysis-histogram.h b/src/tools/analysis-histogram.h
index 3b0c24b..ef87434 100644
--- a/src/tools/analysis-histogram.h
+++ b/src/tools/analysis-histogram.h
@@ -41,7 +41,7 @@ typedef enum {
bintype_p_inf_lower = 1 << 1,
bintype_p_inf_upper = bintype_no_inf_upper | bintype_p_inf_lower,
bintype_m_inf_lower = 1 << 2,
- bintype_m_inf_upper = bintype_m_inf_lower | bintype_no_inf_upper,
+ bintype_m_inf_upper = bintype_m_inf_lower | bintype_no_inf_upper,
bintype_pm_inf_lower = bintype_m_inf_lower | bintype_p_inf_lower,
bintype_pm_inf_upper = bintype_m_inf_lower | bintype_p_inf_lower | bintype_no_inf_upper
} analysis_histogram_bin_type_t;
@@ -66,7 +66,7 @@ typedef struct {
gint n;
gboolean percentage;
gboolean cumulative;
- chart_t chart;
+ chart_t chart;
} analysis_tools_data_histogram_t;
gboolean analysis_tool_histogram_engine (data_analysis_output_t *dao, gpointer specs,
diff --git a/src/tools/analysis-kaplan-meier.c b/src/tools/analysis-kaplan-meier.c
index 2a7549b..c1388e6 100644
--- a/src/tools/analysis-kaplan-meier.c
+++ b/src/tools/analysis-kaplan-meier.c
@@ -46,7 +46,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
int rows, row;
int std_err_col = info->censored ? 4 : 3;
int prob_col = info->censored ? 3 : 2;
- int repetitions = ((info->group_list == NULL) ? 1
+ int repetitions = ((info->group_list == NULL) ? 1
: g_slist_length (info->group_list));
int colspan = ((info->std_err ? 4 : 3) + (info->censored ? 1 : 0));
int i;
@@ -85,7 +85,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_func_ref (fd_iserror);
fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_sum);
-
+
if (info->std_err) {
fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_sqrt);
@@ -95,7 +95,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_func_ref (fd_min);
}
- rows = info->base.range_1->v_range.cell.b.row
+ rows = info->base.range_1->v_range.cell.b.row
- info->base.range_1->v_range.cell.a.row + 1;
dao_set_italic (dao, 0, 0, 0, 0);
@@ -104,7 +104,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
if (info->chart) {
GogChart *chart;
-
+
graph = g_object_new (GOG_TYPE_GRAPH, NULL);
chart = GOG_CHART (gog_object_add_by_name (
GOG_OBJECT (graph), "Chart", NULL));
@@ -127,7 +127,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
if (info->group_list != NULL && info->range_3 != NULL)
expr_group_data = gnm_expr_new_constant (value_dup (info->range_3));
- expr_small = gnm_expr_new_funcall2 (fd_small,
+ expr_small = gnm_expr_new_funcall2 (fd_small,
gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
@@ -138,7 +138,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_string ("N/A"))),
gnm_expr_new_constant (value_new_int (1)));
expr_time = gnm_expr_new_funcall3 (fd_if,
- gnm_expr_new_funcall1 (fd_iserror,
+ gnm_expr_new_funcall1 (fd_iserror,
gnm_expr_copy (expr_small)),
gnm_expr_new_constant (value_new_string ("")),
expr_small);
@@ -146,17 +146,17 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
dao_set_cell_int (dao, 0, 2, 0);
for (row = 1; row < rows; row++)
dao_set_cell_array_expr (dao, 0, 2+row, gnm_expr_copy (expr_time));
-
+
gnm_expr_free (expr_time);
-
+
dao->offset_col++;
/* Repeated Info start */
for (i = 0; i < repetitions; i++) {
GnmExpr const *expr_group = NULL;
-
+
if (gl != NULL && gl->data != NULL) {
analysis_tools_kaplan_meier_group_t *gd = gl->data;
if (gd->name != NULL) {
@@ -164,7 +164,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
dao_set_cell (dao, 0, 0, gd->name);
if (gd->group_from == gd->group_to)
- expr_group = gnm_expr_new_funcall3
+ expr_group = gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_group_data),
@@ -173,8 +173,8 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0)));
else
- expr_group = gnm_expr_new_binary
- (gnm_expr_new_funcall3
+ expr_group = gnm_expr_new_binary
+ (gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_group_data),
@@ -183,7 +183,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0))),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall3
+ gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_group_data),
@@ -196,25 +196,25 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
if (expr_group == NULL)
expr_group = gnm_expr_new_constant (value_new_int (1));
-
+
dao_set_italic (dao, 0, 1, prob_col, 1);
- if (info->censored)
- set_cell_text_row (dao, 0, 1,
+ if (info->censored)
+ set_cell_text_row (dao, 0, 1,
_("/At Risk"
"/Deaths"
"/Censures"
"/Probability"));
else
- set_cell_text_row (dao, 0, 1,
+ set_cell_text_row (dao, 0, 1,
_("/At Risk"
"/Deaths"
"/Probability"));
if (info->std_err) {
dao_set_italic (dao, std_err_col, 1, std_err_col, 1);
- dao_set_cell (dao, std_err_col, 1, _("Standard Error"));
+ dao_set_cell (dao, std_err_col, 1, _("Standard Error"));
}
-
- expr_at_risk = gnm_expr_new_funcall3
+
+ expr_at_risk = gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary (make_cellref (-1-i*colspan, 0),
GNM_EXPR_OP_EQUAL,
@@ -222,7 +222,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_string ("")),
gnm_expr_new_funcall1 (fd_sum,
gnm_expr_new_binary (
- gnm_expr_new_funcall3
+ gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_data),
@@ -232,12 +232,12 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1))),
GNM_EXPR_OP_MULT,
gnm_expr_copy (expr_group))));
-
+
if (info->censored) {
GnmExpr const *expr_censor;
-
+
if (info->censor_mark == info->censor_mark_to)
- expr_censor = gnm_expr_new_funcall3
+ expr_censor = gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_new_constant (value_dup (info->base.range_2)),
@@ -246,8 +246,8 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0)));
else
- expr_censor = gnm_expr_new_binary
- (gnm_expr_new_funcall3
+ expr_censor = gnm_expr_new_binary
+ (gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_new_constant (value_dup (info->base.range_2)),
@@ -256,7 +256,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0))),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall3
+ gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_new_constant (value_dup (info->base.range_2)),
@@ -264,20 +264,20 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (info->censor_mark_to))),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0))));
-
-
- expr_deaths = gnm_expr_new_funcall3
+
+
+ expr_deaths = gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary (make_cellref (-1, 0),
GNM_EXPR_OP_EQUAL,
gnm_expr_new_constant (value_new_string (""))),
gnm_expr_new_constant (value_new_string ("")),
gnm_expr_new_funcall1 (fd_sum,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_copy (expr_group),
GNM_EXPR_OP_MULT,
gnm_expr_new_binary
- (gnm_expr_new_funcall3
+ (gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_data),
@@ -286,22 +286,22 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0))),
GNM_EXPR_OP_MULT,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_censor))))));
- expr_censures = gnm_expr_new_funcall3
+ expr_censures = gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary (make_cellref (-1, 0),
GNM_EXPR_OP_EQUAL,
gnm_expr_new_constant (value_new_string (""))),
gnm_expr_new_constant (value_new_string ("")),
gnm_expr_new_funcall1 (fd_sum,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_copy (expr_group),
GNM_EXPR_OP_MULT,
gnm_expr_new_binary
- (gnm_expr_new_funcall3
+ (gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_data),
@@ -312,17 +312,17 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
GNM_EXPR_OP_MULT,
expr_censor))));
} else
- expr_deaths = gnm_expr_new_funcall3
+ expr_deaths = gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary (make_cellref (-1, 0),
GNM_EXPR_OP_EQUAL,
gnm_expr_new_constant (value_new_string (""))),
gnm_expr_new_constant (value_new_string ("")),
gnm_expr_new_funcall1 (fd_sum,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_copy (expr_group),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall3
+ gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(gnm_expr_copy (expr_data),
@@ -330,7 +330,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
make_cellref (-2-i*colspan, 0)),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0))))));
-
+
expr_prob_zero = gnm_expr_new_binary (gnm_expr_new_binary (make_cellref ( - prob_col, 0),
GNM_EXPR_OP_SUB,
make_cellref (1 - prob_col, 0)),
@@ -345,7 +345,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_binary (gnm_expr_copy (expr_prob_zero),
GNM_EXPR_OP_MULT,
make_cellref (0, -1)));
-
+
if (info->std_err) {
expr_std_err = gnm_expr_new_funcall3 (fd_if,
gnm_expr_new_binary
@@ -357,39 +357,39 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
GNM_EXPR_OP_MULT,
gnm_expr_new_funcall1
(fd_sqrt,
- gnm_expr_new_binary
- (gnm_expr_new_binary
- (gnm_expr_new_constant
+ gnm_expr_new_binary
+ (gnm_expr_new_binary
+ (gnm_expr_new_constant
(value_new_int (1)),
GNM_EXPR_OP_SUB,
make_cellref (-1, 0)),
GNM_EXPR_OP_DIV,
- make_cellref
+ make_cellref
( - std_err_col, 0)))));
-
+
dao_set_format (dao, std_err_col, 2, std_err_col, rows + 1, "0.0000");
dao_set_cell_expr (dao, std_err_col, 2, gnm_expr_copy (expr_std_err));
}
-
+
dao_set_format (dao, prob_col, 2, prob_col, rows + 1, "0.00%");
-
+
dao_set_cell_array_expr (dao, 0, 2, gnm_expr_copy (expr_at_risk));
dao_set_cell_array_expr (dao, 1, 2, gnm_expr_copy (expr_deaths));
dao_set_cell_expr (dao, prob_col, 2, expr_prob_zero);
-
+
if (expr_censures != NULL)
dao_set_cell_array_expr (dao, 2, 2, gnm_expr_copy (expr_censures));
-
+
for (row = 1; row < rows; row++) {
dao_set_cell_array_expr (dao, 0, 2+row, gnm_expr_copy (expr_at_risk));
dao_set_cell_array_expr (dao, 1, 2+row, gnm_expr_copy (expr_deaths));
if (expr_censures != NULL)
dao_set_cell_array_expr (dao, 2, 2+row, gnm_expr_copy (expr_censures));
- dao_set_cell_array_expr (dao, prob_col, 2+row, gnm_expr_copy (expr_prob));
+ dao_set_cell_array_expr (dao, prob_col, 2+row, gnm_expr_copy (expr_prob));
if (info->std_err)
dao_set_cell_expr (dao, std_err_col, 2+row, gnm_expr_copy (expr_std_err));
}
-
+
gnm_expr_free (expr_at_risk);
gnm_expr_free (expr_deaths);
gnm_expr_free (expr_prob);
@@ -401,43 +401,43 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_free (expr_std_err);
expr_std_err = NULL;
}
-
+
/* Create Chart if requested */
if (info->chart) {
GogSeries *series;
GOData *probabilities;
GOStyle *style;
-
+
probabilities = dao_go_data_vector (dao, prob_col, 2, prob_col, 1+rows);
-
+
g_object_ref (times);
series = gog_plot_new_series (plot);
gog_series_set_dim (series, 0, times, NULL);
gog_series_set_dim (series, 1, probabilities, NULL);
-
+
style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
style->marker.auto_shape = FALSE;
go_marker_set_shape (style->marker.mark, GO_MARKER_NONE);
go_styled_object_set_style (GO_STYLED_OBJECT (series), style);
-
+
if (info->censored && info->ticks) {
GOData *censures;
GnmExpr const *expr;
-
- expr = gnm_expr_new_binary
+
+ expr = gnm_expr_new_binary
(gnm_expr_new_binary (dao_get_rangeref (dao, prob_col, 2, prob_col, 1+rows),
GNM_EXPR_OP_DIV,
dao_get_rangeref (dao, 2, 2, 2, 1+rows)),
GNM_EXPR_OP_MULT,
dao_get_rangeref (dao, 2, 2, 2, 1+rows));
-
+
censures = gnm_go_data_vector_new_expr (dao->sheet, gnm_expr_top_new (expr));
-
+
series = gog_plot_new_series (plot);
g_object_ref (times);
gog_series_set_dim (series, 0, times, NULL);
gog_series_set_dim (series, 1, censures, NULL);
-
+
style = go_styled_object_get_style (GO_STYLED_OBJECT (series));
style->marker.auto_shape = FALSE;
go_marker_set_shape (style->marker.mark, GO_MARKER_TRIANGLE_DOWN);
@@ -460,14 +460,14 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
so = sheet_object_graph_new (graph);
g_object_unref (graph);
g_object_unref (times);
-
+
dao_set_sheet_object (dao, 0, 1, so);
- }
+ }
if (info->median) {
dao_set_italic (dao, 1, 1, 1, 1);
dao_set_cell (dao, 1, 1, _("Median:"));
-
+
dao->offset_col += 2;
gl = info->group_list;
@@ -478,7 +478,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_median;
dao_set_italic (dao, 0, 0, 0, 0);
-
+
if (gl != NULL && gl->data != NULL) {
analysis_tools_kaplan_meier_group_t *gd = gl->data;
if (gd->name != NULL) {
@@ -488,7 +488,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
}
expr_prob = gnm_expr_new_binary
- (gnm_expr_new_funcall3
+ (gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_binary
(make_rangeref(prob_dx, 1, prob_dx, rows),
@@ -498,26 +498,26 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_int (1))),
GNM_EXPR_OP_MULT,
make_rangeref (times_dx, 1, times_dx, rows));
-
+
expr_median = gnm_expr_new_funcall1
(fd_min,
- gnm_expr_new_funcall3
+ gnm_expr_new_funcall3
(fd_if,
gnm_expr_new_funcall1
(fd_iserror,
gnm_expr_copy (expr_prob)),
gnm_expr_new_constant (value_new_string ("NA")),
expr_prob));
-
+
dao_set_cell_array_expr (dao, 0, 1,expr_median);
-
+
dao->offset_col += 1;
}
logrank_test_y_offset = 5;
dao->offset_col -= (2 + repetitions);
}
- if (info->logrank_test) {
+ if (info->logrank_test) {
GnmFunc *fd_chidist;
GnmExpr const *expr_statistics = gnm_expr_new_constant (value_new_int (0));
GnmExpr const *expr_p;
@@ -528,26 +528,26 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_func_ref (fd_chidist);
dao_set_italic (dao, 1, logrank_test_y_offset, 1, logrank_test_y_offset+3);
- set_cell_text_col (dao, 1, logrank_test_y_offset,
+ set_cell_text_col (dao, 1, logrank_test_y_offset,
_("/Log-Rank Test:"
"/Statistics:"
"/Degrees of Freedom:"
"/p-Value:"));
-
+
/* Test Statistics */
for (i = 0; i < repetitions; i++) {
gint atrisk_dx = - (repetitions - i)* colspan - 2;
- expr_n_total = gnm_expr_new_binary
- (expr_n_total, GNM_EXPR_OP_ADD,
- make_rangeref ( atrisk_dx,
- - logrank_test_y_offset + 1,
- atrisk_dx,
+ expr_n_total = gnm_expr_new_binary
+ (expr_n_total, GNM_EXPR_OP_ADD,
+ make_rangeref ( atrisk_dx,
+ - logrank_test_y_offset + 1,
+ atrisk_dx,
- logrank_test_y_offset + rows));
- expr_death_total = gnm_expr_new_binary
- (expr_death_total, GNM_EXPR_OP_ADD,
- make_rangeref ( atrisk_dx + 1,
- - logrank_test_y_offset + 1,
- atrisk_dx + 1,
+ expr_death_total = gnm_expr_new_binary
+ (expr_death_total, GNM_EXPR_OP_ADD,
+ make_rangeref ( atrisk_dx + 1,
+ - logrank_test_y_offset + 1,
+ atrisk_dx + 1,
- logrank_test_y_offset + rows));
}
@@ -555,17 +555,17 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_expect;
gint atrisk_dx = - (repetitions - i)* colspan - 2;
- expr_expect = gnm_expr_new_binary
- (gnm_expr_new_binary
+ expr_expect = gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_copy (expr_death_total),
GNM_EXPR_OP_MULT,
- make_rangeref (atrisk_dx,
- - logrank_test_y_offset + 1,
- atrisk_dx,
- - logrank_test_y_offset + rows)),
- GNM_EXPR_OP_DIV,
+ make_rangeref (atrisk_dx,
+ - logrank_test_y_offset + 1,
+ atrisk_dx,
+ - logrank_test_y_offset + rows)),
+ GNM_EXPR_OP_DIV,
gnm_expr_copy (expr_n_total));
-
+
expr_expect = gnm_expr_new_funcall3 (
fd_if,
gnm_expr_new_funcall1 (fd_iserror,
@@ -579,10 +579,10 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_binary (
gnm_expr_new_funcall1 (
fd_sum,
- make_rangeref
- (atrisk_dx + 1,
- - logrank_test_y_offset + 1,
- atrisk_dx + 1,
+ make_rangeref
+ (atrisk_dx + 1,
+ - logrank_test_y_offset + 1,
+ atrisk_dx + 1,
- logrank_test_y_offset + rows)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_expect)),
@@ -593,8 +593,8 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
expr_statistics = gnm_expr_new_binary (
expr_statistics, GNM_EXPR_OP_ADD, expr_expect);
}
- gnm_expr_free (expr_n_total);
- gnm_expr_free (expr_death_total);
+ gnm_expr_free (expr_n_total);
+ gnm_expr_free (expr_death_total);
dao_set_cell_array_expr (dao, 2, logrank_test_y_offset + 1, expr_statistics);
@@ -606,12 +606,12 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
make_cellref (0,-2),
make_cellref (0,-1));
dao_set_cell_expr (dao, 2, logrank_test_y_offset + 3, expr_p);
-
- gnm_func_unref (fd_chidist);
+
+ gnm_func_unref (fd_chidist);
}
-
-
+
+
gnm_expr_free (expr_data);
@@ -653,17 +653,17 @@ analysis_tool_kaplan_meier_engine (data_analysis_output_t *dao, gpointer specs,
switch (selector) {
case TOOL_ENGINE_UPDATE_DESCRIPTOR:
- return (dao_command_descriptor (dao,
+ return (dao_command_descriptor (dao,
_("Kaplan-Meier (%s)"),
- result)
+ result)
== NULL);
case TOOL_ENGINE_UPDATE_DAO:
multiple = ((info->group_list == NULL) ? 1 : g_slist_length (info->group_list));
median = (info->median ? (2 + multiple) : 0);
if (median == 0 && info->logrank_test)
median = 3;
- dao_adjust (dao, median + 1 + multiple * ((info->std_err ? 4 : 3) + (info->censored ? 1 : 0)),
- info->base.range_1->v_range.cell.b.row
+ dao_adjust (dao, median + 1 + multiple * ((info->std_err ? 4 : 3) + (info->censored ? 1 : 0)),
+ info->base.range_1->v_range.cell.b.row
- info->base.range_1->v_range.cell.a.row + 3);
return FALSE;
case TOOL_ENGINE_CLEAN_UP:
diff --git a/src/tools/analysis-kaplan-meier.h b/src/tools/analysis-kaplan-meier.h
index 791819a..dbcda61 100644
--- a/src/tools/analysis-kaplan-meier.h
+++ b/src/tools/analysis-kaplan-meier.h
@@ -63,9 +63,9 @@ typedef struct {
} analysis_tools_kaplan_meier_group_t;
-gboolean analysis_tool_kaplan_meier_engine (data_analysis_output_t *dao,
+gboolean analysis_tool_kaplan_meier_engine (data_analysis_output_t *dao,
gpointer specs,
- analysis_tool_engine_t selector,
+ analysis_tool_engine_t selector,
gpointer result);
#endif
diff --git a/src/tools/analysis-tools.c b/src/tools/analysis-tools.c
index 02873e6..d817fba 100644
--- a/src/tools/analysis-tools.c
+++ b/src/tools/analysis-tools.c
@@ -94,7 +94,7 @@ make_rangeref (int dx0, int dy0, int dx1, int dy1)
}
-static gboolean
+static gboolean
gnm_check_input_range_list_homogeneity (GSList *input_range);
typedef struct {
@@ -516,8 +516,8 @@ int analysis_tool_calc_length (analysis_tools_data_generic_t *info)
if (info->group_by == GROUPED_BY_AREA) {
given_length = (current->v_range.cell.b.row - current->v_range.cell.a.row + 1) *
(current->v_range.cell.b.col - current->v_range.cell.a.col + 1);
- } else
- given_length = (info->group_by == GROUPED_BY_COL) ?
+ } else
+ given_length = (info->group_by == GROUPED_BY_COL) ?
(current->v_range.cell.b.row - current->v_range.cell.a.row + 1) :
(current->v_range.cell.b.col - current->v_range.cell.a.col + 1);
if (given_length > result)
@@ -1117,11 +1117,11 @@ analysis_tool_sampling_engine_run (data_analysis_output_t *dao,
if (info->base.labels || info->periodic) {
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
}
if (!info->periodic) {
fd_randdiscrete = gnm_func_lookup_or_add_placeholder ("RANDDISCRETE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_randdiscrete);
+ gnm_func_ref (fd_randdiscrete);
}
for (l = info->base.input, source = 1; l; l = l->next, source++) {
@@ -1146,11 +1146,11 @@ analysis_tool_sampling_engine_run (data_analysis_output_t *dao,
offset++;
break;
}
- expr_title = gnm_expr_new_funcall1 (fd_index,
+ expr_title = gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c));
for (ct = 0; ct < info->number; ct++)
dao_set_cell_expr (dao, col+ct, 0, gnm_expr_copy (expr_title));
- gnm_expr_free (expr_title);
+ gnm_expr_free (expr_title);
} else {
switch (info->base.group_by) {
case GROUPED_BY_ROW:
@@ -1161,15 +1161,15 @@ analysis_tool_sampling_engine_run (data_analysis_output_t *dao,
break;
default:
format = _("Area %d");
- break;
- }
+ break;
+ }
for (ct = 0; ct < info->number; ct++)
dao_set_cell_printf (dao, col+ct, 0, format, source);
}
-
+
expr_input = gnm_expr_new_constant (value_dup (val));
-
-
+
+
if (info->periodic) {
guint i;
gint height = value_area_get_height (val, NULL);
@@ -1182,70 +1182,70 @@ analysis_tool_sampling_engine_run (data_analysis_output_t *dao,
if (info->row_major) {
y_offset = (offset - 1)/width + 1;
- x_offset = offset - (y_offset - 1) * width;
+ x_offset = offset - (y_offset - 1) * width;
} else {
x_offset = (offset - 1)/height + 1;
- y_offset = offset - (x_offset - 1) * height;
+ y_offset = offset - (x_offset - 1) * height;
}
- expr_period = gnm_expr_new_funcall3
+ expr_period = gnm_expr_new_funcall3
(fd_index, gnm_expr_copy (expr_input),
gnm_expr_new_constant (value_new_int (y_offset)),
gnm_expr_new_constant (value_new_int (x_offset)));
for (ct = 0; ct < info->number; ct += 2)
- dao_set_cell_expr (dao, col + ct, i + 1,
+ dao_set_cell_expr (dao, col + ct, i + 1,
gnm_expr_copy (expr_period));
gnm_expr_free (expr_period);
if (info->number > 1) {
if (!info->row_major) {
y_offset = (offset - 1)/width + 1;
- x_offset = offset - (y_offset - 1) * width;
+ x_offset = offset - (y_offset - 1) * width;
} else {
x_offset = (offset - 1)/height + 1;
- y_offset = offset - (x_offset - 1) * height;
+ y_offset = offset - (x_offset - 1) * height;
}
-
- expr_period = gnm_expr_new_funcall3
+
+ expr_period = gnm_expr_new_funcall3
(fd_index, gnm_expr_copy (expr_input),
gnm_expr_new_constant (value_new_int (y_offset)),
gnm_expr_new_constant (value_new_int (x_offset)));
-
+
for (ct = 1; ct < info->number; ct += 2)
- dao_set_cell_expr (dao, col + ct, i + 1,
+ dao_set_cell_expr (dao, col + ct, i + 1,
gnm_expr_copy (expr_period));
gnm_expr_free (expr_period);
-
+
}
}
col += info->number;
} else {
GnmExpr const *expr_random;
guint i;
-
- expr_random = gnm_expr_new_funcall1 (fd_randdiscrete,
+
+ expr_random = gnm_expr_new_funcall1 (fd_randdiscrete,
gnm_expr_copy (expr_input));
-
+
for (ct = 0; ct < info->number; ct++, col++)
for (i=0; i < info->size; i++)
- dao_set_cell_expr (dao, col, i + 1,
+ dao_set_cell_expr (dao, col, i + 1,
gnm_expr_copy (expr_random));
gnm_expr_free (expr_random);
}
-
+
value_release (val);
gnm_expr_free (expr_input);
-
+
}
-
+
if (fd_index != NULL)
gnm_func_unref (fd_index);
if (fd_randdiscrete != NULL)
gnm_func_unref (fd_randdiscrete);
-
+
dao_redraw_respan (dao);
-
+
return FALSE;
}
@@ -1262,14 +1262,14 @@ analysis_tool_sampling_engine (data_analysis_output_t *dao, gpointer specs,
case TOOL_ENGINE_UPDATE_DAO:
{
GSList *l;
-
+
prepare_input_range (&info->base.input, info->base.group_by);
if (info->periodic) {
info->size = 1;
for (l = info->base.input; l; l = l->next) {
GnmValue *val = ((GnmValue *)l->data);
- gint size = (value_area_get_width (val, NULL) *
+ gint size = (value_area_get_width (val, NULL) *
value_area_get_height (val, NULL));
guint usize = (size > 0) ? size : 1;
@@ -1281,7 +1281,7 @@ analysis_tool_sampling_engine (data_analysis_output_t *dao, gpointer specs,
info->size = usize;
}
}
-
+
dao_adjust (dao, info->number * g_slist_length (info->base.input),
1 + info->size);
return FALSE;
@@ -1575,7 +1575,7 @@ analysis_tool_ttest_paired_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_isnumber;
GnmFunc *fd_if;
GnmFunc *fd_sum;
-
+
GnmExpr const *expr_1;
GnmExpr const *expr_2;
GnmExpr const *expr_diff;
@@ -1678,7 +1678,7 @@ analysis_tool_ttest_paired_engine_run (data_analysis_output_t *dao,
gnm_expr_copy (expr_1)),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (0))),
- GNM_EXPR_OP_MULT,
+ GNM_EXPR_OP_MULT,
gnm_expr_new_funcall3 (
fd_if,
gnm_expr_new_funcall1 (
@@ -1708,11 +1708,11 @@ analysis_tool_ttest_paired_engine_run (data_analysis_output_t *dao,
dao_set_cell_array_expr (dao, 1, 8,
gnm_expr_new_binary
(gnm_expr_new_funcall1 (
- fd_sum,
+ fd_sum,
expr_ifisnumber),
GNM_EXPR_OP_SUB,
gnm_expr_new_constant (value_new_int (1))));
-
+
/* t */
/* E24 = (E21-E20)/(E22/(E23+1))^0.5 */
{
@@ -2096,7 +2096,7 @@ analysis_tool_ttest_eqvar_engine_run (data_analysis_output_t *dao,
value_release (val_1);
value_release (val_2);
- gnm_func_unref (fd_mean);
+ gnm_func_unref (fd_mean);
gnm_func_unref (fd_var);
gnm_func_unref (fd_count);
gnm_func_unref (fd_tdist);
@@ -2760,7 +2760,7 @@ calculate_xdim (GnmValue *input, group_by_t group_by)
if (group_by == GROUPED_BY_ROW)
return range_height (&r);
-
+
return range_width (&r);
}
@@ -2804,7 +2804,7 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_offset = NULL;
char const *str = ((info->group_by == GROUPED_BY_ROW) ? "row" : "col");
- char const *label = ((info->group_by == GROUPED_BY_ROW) ? _("Row")
+ char const *label = ((info->group_by == GROUPED_BY_ROW) ? _("Row")
: _("Column"));
fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
@@ -2857,23 +2857,23 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
dao_set_cell (dao, 2, 0, _("Response Variable:"));
if (info->base.labels) {
-
- dao_set_cell_expr (dao, 3, 0,
+
+ dao_set_cell_expr (dao, 3, 0,
gnm_expr_new_funcall1 (fd_index, gnm_expr_new_constant (value_dup (val_2))));
-
+
val_1_cp = value_dup (val_1);
val_2_cp = value_dup (val_2);
if (info->group_by == GROUPED_BY_ROW) {
val_1->v_range.cell.a.col++;
val_2->v_range.cell.a.col++;
val_1_cp->v_range.cell.b.col = val_1_cp->v_range.cell.a.col;
- dao_set_array_expr (dao, 0, 17, 1, xdim, gnm_expr_new_constant
+ dao_set_array_expr (dao, 0, 17, 1, xdim, gnm_expr_new_constant
(value_dup (val_1_cp)));
} else {
val_1->v_range.cell.a.row++;
val_2->v_range.cell.a.row++;
val_1_cp->v_range.cell.b.row = val_1_cp->v_range.cell.a.row;
- dao_set_array_expr (dao, 0, 17, 1, xdim, gnm_expr_new_funcall1
+ dao_set_array_expr (dao, 0, 17, 1, xdim, gnm_expr_new_funcall1
(fd_transpose,
gnm_expr_new_constant (value_dup (val_1_cp))));
}
@@ -2881,8 +2881,8 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
dao_set_cell_expr (dao, 3, 0, gnm_expr_new_funcall3
(fd_concatenate, gnm_expr_new_constant (value_new_string (label)),
gnm_expr_new_constant (value_new_string (" ")),
- gnm_expr_new_funcall2 (fd_cell,
- gnm_expr_new_constant (value_new_string (str)),
+ gnm_expr_new_funcall2 (fd_cell,
+ gnm_expr_new_constant (value_new_string (str)),
gnm_expr_new_constant (value_dup (val_2)))));
}
@@ -2894,7 +2894,7 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
"/Significance of F"));
dao_set_italic (dao, 1, 15, 6, 15);
- set_cell_text_row (dao, 1, 15, _("/Coefficients"
+ set_cell_text_row (dao, 1, 15, _("/Coefficients"
"/Standard Error"
"/t-Statistics"
"/p-Value"));
@@ -2918,36 +2918,36 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
"but the uncentered version of the\n"
"coefficient of determination; that\n"
"is, the proportion of the sum of\n"
- "squares explained by the model."));
+ "squares explained by the model."));
expr_x = gnm_expr_new_constant (value_dup (val_1));
expr_y = gnm_expr_new_constant (value_dup (val_2));
expr_intercept = gnm_expr_new_constant (value_new_bool (info->intercept));
-
+
expr_linest = gnm_expr_new_funcall4 (fd_linest,
expr_y,
expr_x,
expr_intercept,
gnm_expr_new_constant (value_new_bool (TRUE)));
-
+
/* Multiple R */
if (info->intercept) {
if (dao_cell_is_visible (dao, 1, 4))
dao_set_cell_expr (dao, 1, 3, gnm_expr_new_funcall1 (fd_sqrt, make_cellref (0, 1)));
else
- dao_set_cell_expr (dao, 1, 3,
- gnm_expr_new_funcall1 (fd_sqrt, gnm_expr_new_funcall3
- (fd_index,
+ dao_set_cell_expr (dao, 1, 3,
+ gnm_expr_new_funcall1 (fd_sqrt, gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (3)),
gnm_expr_new_constant (value_new_int (1)))));
} else
- dao_set_cell_expr (dao, 1, 3,
- gnm_expr_new_funcall1 (fd_sqrt, gnm_expr_new_funcall3
- (fd_index,
- gnm_expr_new_funcall4
+ dao_set_cell_expr (dao, 1, 3,
+ gnm_expr_new_funcall1 (fd_sqrt, gnm_expr_new_funcall3
+ (fd_index,
+ gnm_expr_new_funcall4
(fd_linest,
gnm_expr_new_constant (value_dup (val_2)),
gnm_expr_new_constant (value_dup (val_1)),
@@ -2955,18 +2955,18 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (value_new_bool (TRUE))),
gnm_expr_new_constant (value_new_int (3)),
gnm_expr_new_constant (value_new_int (1)))));
-
+
/* R Square */
- dao_set_cell_array_expr (dao, 1, 4,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_array_expr (dao, 1, 4,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (3)),
gnm_expr_new_constant (value_new_int (1))));
-
+
/* Standard Error */
- dao_set_cell_array_expr (dao, 1, 5,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_array_expr (dao, 1, 5,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (3)),
gnm_expr_new_constant (value_new_int (2))));
@@ -2977,23 +2977,23 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
else
expr_n = gnm_expr_new_funcall3 (fd_sum,
gnm_expr_new_constant (value_new_int (xdim)),
- gnm_expr_new_funcall3 (fd_index,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (4)),
gnm_expr_new_constant (value_new_int (2))),
gnm_expr_new_constant (value_new_int (1)));
-
+
dao_set_cell_expr (dao, 1, 6, gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (1)),
GNM_EXPR_OP_SUB,
gnm_expr_new_binary
(gnm_expr_new_binary
- (gnm_expr_new_binary
+ (gnm_expr_new_binary
(gnm_expr_copy (expr_n),
GNM_EXPR_OP_SUB,
gnm_expr_new_constant (value_new_int (1))),
GNM_EXPR_OP_DIV,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(expr_n,
GNM_EXPR_OP_SUB,
gnm_expr_new_constant (value_new_int (xdim + (info->intercept?1:0))))),
@@ -3005,27 +3005,27 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
/* Observations */
- if (dao_cell_is_visible (dao, 1, 13))
- dao_set_cell_expr (dao, 1, 7,
+ if (dao_cell_is_visible (dao, 1, 13))
+ dao_set_cell_expr (dao, 1, 7,
gnm_expr_new_funcall2 (fd_sum,
make_cellref (0, 6),
gnm_expr_new_constant (value_new_int (info->intercept?1:0))));
- else if (dao_cell_is_visible (dao, 1, 12))
- dao_set_cell_expr (dao, 1, 7,
+ else if (dao_cell_is_visible (dao, 1, 12))
+ dao_set_cell_expr (dao, 1, 7,
gnm_expr_new_funcall3 (fd_sum,
make_cellref (0, 4),
make_cellref (0, 5),
gnm_expr_new_constant (value_new_int (info->intercept?1:0))));
- else
- dao_set_cell_expr (dao, 1, 7,
+ else
+ dao_set_cell_expr (dao, 1, 7,
gnm_expr_new_funcall3 (fd_sum,
gnm_expr_new_constant (value_new_int (xdim)),
- gnm_expr_new_funcall3 (fd_index,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (4)),
gnm_expr_new_constant (value_new_int (2))),
gnm_expr_new_constant (value_new_int (info->intercept?1:0))));
-
+
/* Regression / df */
@@ -3033,8 +3033,8 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
dao_set_cell_int (dao, 1, 11, xdim);
/* Residual / df */
- dao_set_cell_array_expr (dao, 1, 12,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_array_expr (dao, 1, 12,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (4)),
gnm_expr_new_constant (value_new_int (2))));
@@ -3047,15 +3047,15 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
dao_set_cell_expr (dao, 1, 13, gnm_expr_copy (expr_sum));
/* Regression / SS */
- dao_set_cell_array_expr (dao, 2, 11,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_array_expr (dao, 2, 11,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (5)),
gnm_expr_new_constant (value_new_int (1))));
/* Residual / SS */
- dao_set_cell_array_expr (dao, 2, 12,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_array_expr (dao, 2, 12,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (5)),
gnm_expr_new_constant (value_new_int (2))));
@@ -3064,7 +3064,7 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
/* Total / SS */
dao_set_cell_expr (dao, 2, 13, expr_sum);
-
+
/* Regression / MS */
expr_ms = gnm_expr_new_binary (make_cellref (-1, 0),
GNM_EXPR_OP_DIV,
@@ -3073,11 +3073,11 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
/* Residual / MS */
dao_set_cell_expr (dao, 3, 12, expr_ms);
-
+
/* F */
- dao_set_cell_array_expr (dao, 4, 11,
- gnm_expr_new_funcall3 (fd_index,
+ dao_set_cell_array_expr (dao, 4, 11,
+ gnm_expr_new_funcall3 (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (4)),
gnm_expr_new_constant (value_new_int (1))));
@@ -3093,12 +3093,12 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
dao_set_cell_expr (dao, 5, 11, gnm_expr_new_funcall3 (fd_fdist,
make_cellref (-1, 0),
make_cellref (-4, 0),
- gnm_expr_new_funcall3
- (fd_index,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (4)),
gnm_expr_new_constant (value_new_int (2)))));
-
+
/* Intercept */
@@ -3114,9 +3114,9 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
GNM_EXPR_OP_SUB,
gnm_expr_new_binary (make_cellref (-3, 0),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall2
+ gnm_expr_new_funcall2
(fd_tinv,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_constant (value_new_float (1.0)),
GNM_EXPR_OP_SUB,
gnm_expr_copy (expr_confidence)),
@@ -3125,9 +3125,9 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
GNM_EXPR_OP_ADD,
gnm_expr_new_binary (make_cellref (-4, 0),
GNM_EXPR_OP_MULT,
- gnm_expr_new_funcall2
+ gnm_expr_new_funcall2
(fd_tinv,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_constant (value_new_float (1.0)),
GNM_EXPR_OP_SUB,
expr_confidence),
@@ -3141,15 +3141,15 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
for (i = 2; i <= 6; i++)
dao_set_cell_na (dao, i, 16);
} else {
- dao_set_cell_array_expr (dao, 1, 16,
- gnm_expr_new_funcall3
- (fd_index,
+ dao_set_cell_array_expr (dao, 1, 16,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (xdim+1))));
- dao_set_cell_array_expr (dao, 2, 16,
- gnm_expr_new_funcall3
- (fd_index,
+ dao_set_cell_array_expr (dao, 2, 16,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (2)),
gnm_expr_new_constant (value_new_int (xdim+1))));
@@ -3167,7 +3167,7 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
if (!info->base.labels) {
GnmExpr const *expr_offset;
- if (info->group_by == GROUPED_BY_ROW)
+ if (info->group_by == GROUPED_BY_ROW)
expr_offset = gnm_expr_new_funcall3
(fd_offset, gnm_expr_new_constant (value_dup (val_1)),
gnm_expr_new_constant (value_new_int (i)),
@@ -3181,31 +3181,31 @@ analysis_tool_regression_engine_run (data_analysis_output_t *dao,
dao_set_cell_expr (dao, 0, i, gnm_expr_new_funcall3
(fd_concatenate, gnm_expr_new_constant (value_new_string (label)),
gnm_expr_new_constant (value_new_string (" ")),
- gnm_expr_new_funcall2
+ gnm_expr_new_funcall2
(fd_cell,
- gnm_expr_new_constant (value_new_string (str)),
+ gnm_expr_new_constant (value_new_string (str)),
expr_offset)));
}
-
- dao_set_cell_array_expr (dao, 1, i,
- gnm_expr_new_funcall3
- (fd_index,
+
+ dao_set_cell_array_expr (dao, 1, i,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (1)),
gnm_expr_new_constant (value_new_int (xdim - i))));
- dao_set_cell_array_expr (dao, 2, i,
- gnm_expr_new_funcall3
- (fd_index,
+ dao_set_cell_array_expr (dao, 2, i,
+ gnm_expr_new_funcall3
+ (fd_index,
gnm_expr_copy (expr_linest),
gnm_expr_new_constant (value_new_int (2)),
- gnm_expr_new_constant (value_new_int (xdim - i))));
+ gnm_expr_new_constant (value_new_int (xdim - i))));
dao_set_cell_expr (dao, 3, i, gnm_expr_copy (expr_tstat));
dao_set_cell_expr (dao, 4, i, gnm_expr_copy (expr_pvalue));
dao_set_cell_expr (dao, 5, i, gnm_expr_copy (expr_lower));
dao_set_cell_expr (dao, 6, i, gnm_expr_copy (expr_upper));
}
-
+
gnm_expr_free (expr_linest);
gnm_expr_free (expr_tstat);
gnm_expr_free (expr_pvalue);
@@ -3286,24 +3286,24 @@ static GnmExpr const *
analysis_tool_moving_average_funcall5 (GnmFunc *fd, GnmExpr const *ex, int y, int x, int dy, int dx)
{
GnmExprList *list;
- list = gnm_expr_list_prepend (NULL, gnm_expr_new_constant (value_new_int (dx)));
- list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (dy)));
- list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (x)));
- list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (y)));
+ list = gnm_expr_list_prepend (NULL, gnm_expr_new_constant (value_new_int (dx)));
+ list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (dy)));
+ list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (x)));
+ list = gnm_expr_list_prepend (list, gnm_expr_new_constant (value_new_int (y)));
list = gnm_expr_list_prepend (list, gnm_expr_copy (ex));
return gnm_expr_new_funcall (fd, list);
}
static GnmExpr const *
-analysis_tool_moving_average_weighted_av (GnmFunc *fd_sum, GnmFunc *fd_in, GnmExpr const *ex,
+analysis_tool_moving_average_weighted_av (GnmFunc *fd_sum, GnmFunc *fd_in, GnmExpr const *ex,
int y, int x, int dy, int dx, int *w)
{
GnmExprList *list = NULL;
while (*w != 0) {
- list = gnm_expr_list_prepend
- (list, gnm_expr_new_binary
+ list = gnm_expr_list_prepend
+ (list, gnm_expr_new_binary
(gnm_expr_new_constant (value_new_int (*w)),
GNM_EXPR_OP_MULT,
gnm_expr_new_funcall3 (fd_in, gnm_expr_copy (ex),
@@ -3335,27 +3335,27 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
if (info->base.labels) {
fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_index);
+ gnm_func_ref (fd_index);
}
if (info->std_error_flag) {
fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sqrt);
+ gnm_func_ref (fd_sqrt);
fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sumxmy2);
+ gnm_func_ref (fd_sumxmy2);
}
if (moving_average_type_wma == info->ma_type || moving_average_type_spencer_ma == info->ma_type) {
fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_sum);
+ gnm_func_ref (fd_sum);
}
fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- gnm_func_ref (fd_average);
+ gnm_func_ref (fd_average);
fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_offset);
if (info->show_graph) {
GogGraph *graph;
GogChart *chart;
-
+
graph = g_object_new (GOG_TYPE_GRAPH, NULL);
chart = GOG_CHART (gog_object_add_by_name (GOG_OBJECT (graph), "Chart", NULL));
plot = gog_plot_new_by_name ("GogLinePlot");
@@ -3390,7 +3390,7 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
val->v_range.cell.a.row++;
break;
}
- expr_title = gnm_expr_new_funcall1 (fd_index,
+ expr_title = gnm_expr_new_funcall1 (fd_index,
gnm_expr_new_constant (val_c));
dao_set_italic (dao, col, 0, col, 0);
@@ -3403,7 +3403,7 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
default:
format = _("Column %d");
break;
- }
+ }
dao_set_cell_printf (dao, col, 0, format, source);
}
@@ -3418,8 +3418,8 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
mover = &y;
delta_mover = &delta_y;
break;
- }
-
+ }
+
sheet = val->v_range.cell.a.sheet;
expr_input = gnm_expr_new_constant (val);
@@ -3427,19 +3427,19 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
GogSeries *series;
series = gog_plot_new_series (plot);
- gog_series_set_dim (series, 1,
+ gog_series_set_dim (series, 1,
gnm_go_data_vector_new_expr (sheet,
- gnm_expr_top_new (gnm_expr_copy (expr_input))),
+ gnm_expr_top_new (gnm_expr_copy (expr_input))),
NULL);
series = gog_plot_new_series (plot);
- gog_series_set_dim (series, 1,
+ gog_series_set_dim (series, 1,
dao_go_data_vector (dao, col, 1, col, height),
NULL);
}
switch (info->ma_type) {
- case moving_average_type_central_sma:
+ case moving_average_type_central_sma:
{
GnmExpr const *expr_offset_last = NULL;
GnmExpr const *expr_offset = NULL;
@@ -3448,16 +3448,16 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
for (row = 1; row <= height; row++, (*mover)++) {
expr_offset_last = expr_offset;
expr_offset = NULL;
- if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
- expr_offset = gnm_expr_new_funcall1
- (fd_average, analysis_tool_moving_average_funcall5
+ if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
+ expr_offset = gnm_expr_new_funcall1
+ (fd_average, analysis_tool_moving_average_funcall5
(fd_offset,expr_input, y, x, delta_y, delta_x));
-
+
if (expr_offset_last == NULL)
dao_set_cell_na (dao, col, row);
else
- dao_set_cell_expr (dao, col, row,
- gnm_expr_new_funcall2 (fd_average, expr_offset_last,
+ dao_set_cell_expr (dao, col, row,
+ gnm_expr_new_funcall2 (fd_average, expr_offset_last,
gnm_expr_copy (expr_offset)));
} else {
if (expr_offset_last != NULL) {
@@ -3475,39 +3475,39 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_offset;
*delta_mover = row;
-
- expr_offset = analysis_tool_moving_average_funcall5
+
+ expr_offset = analysis_tool_moving_average_funcall5
(fd_offset, expr_input, y, x, delta_y, delta_x);
- dao_set_cell_expr (dao, col, row,
+ dao_set_cell_expr (dao, col, row,
gnm_expr_new_funcall1 (fd_average, expr_offset));
}
base = 0;
break;
case moving_average_type_wma:
{
- GnmExpr const *expr_divisor = gnm_expr_new_constant
+ GnmExpr const *expr_divisor = gnm_expr_new_constant
(value_new_int((info->interval * (info->interval + 1))/2));
int *w = g_new (int, (info->interval + 1));
int i;
-
+
for (i = 0; i < info->interval; i++)
w[i] = i+1;
w[info->interval] = 0;
-
+
delta_x = 0;
delta_y= 0;
(*delta_mover) = 1;
(*mover) = 1 - info->interval;
for (row = 1; row <= height; row++, (*mover)++) {
- if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
+ if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
GnmExpr const *expr_sum;
- expr_sum = analysis_tool_moving_average_weighted_av
+ expr_sum = analysis_tool_moving_average_weighted_av
(fd_sum, fd_index, expr_input, y+1, x+1, delta_y, delta_x, w);
-
- dao_set_cell_expr (dao, col, row,
- gnm_expr_new_binary
+
+ dao_set_cell_expr (dao, col, row,
+ gnm_expr_new_binary
(expr_sum,
GNM_EXPR_OP_DIV,
gnm_expr_copy (expr_divisor)));
@@ -3523,23 +3523,23 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
break;
case moving_average_type_spencer_ma:
{
- GnmExpr const *expr_divisor = gnm_expr_new_constant
+ GnmExpr const *expr_divisor = gnm_expr_new_constant
(value_new_int(-3-6-5+3+21+45+67+74+67+46+21+3-5-6-3));
int w[] = {-3, -6, -5, 3, 21, 45, 67, 74, 67, 46, 21, 3, -5, -6, -3, 0};
-
+
delta_x = 0;
delta_y= 0;
(*delta_mover) = 1;
(*mover) = 1 - info->interval + info->offset;
for (row = 1; row <= height; row++, (*mover)++) {
- if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
+ if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
GnmExpr const *expr_sum;
- expr_sum = analysis_tool_moving_average_weighted_av
+ expr_sum = analysis_tool_moving_average_weighted_av
(fd_sum, fd_index, expr_input, y+1, x+1, delta_y, delta_x, w);
-
- dao_set_cell_expr (dao, col, row,
- gnm_expr_new_binary
+
+ dao_set_cell_expr (dao, col, row,
+ gnm_expr_new_binary
(expr_sum,
GNM_EXPR_OP_DIV,
gnm_expr_copy (expr_divisor)));
@@ -3556,12 +3556,12 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
(*delta_mover) = info->interval;
(*mover) = 1 - info->interval + info->offset;
for (row = 1; row <= height; row++, (*mover)++) {
- if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
+ if ((*mover >= 0) && (*mover < height - info->interval + 1)) {
GnmExpr const *expr_offset;
-
- expr_offset = analysis_tool_moving_average_funcall5
+
+ expr_offset = analysis_tool_moving_average_funcall5
(fd_offset, expr_input, y, x, delta_y, delta_x);
- dao_set_cell_expr (dao, col, row,
+ dao_set_cell_expr (dao, col, row,
gnm_expr_new_funcall1 (fd_average, expr_offset));
} else
dao_set_cell_na (dao, col, row);
@@ -3577,32 +3577,32 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
(*mover) = base;
for (row = 1; row <= height; row++) {
- if (row > base && row <= height - info->offset && (row - base - info->df) > 0) {
+ if (row > base && row <= height - info->offset && (row - base - info->df) > 0) {
GnmExpr const *expr_offset;
-
+
if (info->base.group_by == GROUPED_BY_ROW)
delta_x = row - base;
else
delta_y = row - base;
-
- expr_offset = analysis_tool_moving_average_funcall5
+
+ expr_offset = analysis_tool_moving_average_funcall5
(fd_offset, expr_input, y, x, delta_y, delta_x);
dao_set_cell_expr (dao, col, row,
- gnm_expr_new_funcall1
+ gnm_expr_new_funcall1
(fd_sqrt,
- gnm_expr_new_binary
+ gnm_expr_new_binary
(gnm_expr_new_funcall2
(fd_sumxmy2,
expr_offset,
make_rangeref (-1, - row + base + 1, -1, 0)),
GNM_EXPR_OP_DIV,
- gnm_expr_new_constant (value_new_int
+ gnm_expr_new_constant (value_new_int
(row - base - info->df)))));
} else
dao_set_cell_na (dao, col, row);
}
}
-
+
gnm_expr_free (expr_input);
}
@@ -3709,20 +3709,20 @@ analysis_tool_ranking_engine_run (data_analysis_output_t *dao,
rows = (val_org->v_range.cell.b.row - val_org->v_range.cell.a.row + 1) *
(val_org->v_range.cell.b.col - val_org->v_range.cell.a.col + 1);
-
- expr_large = gnm_expr_new_funcall2
+
+ expr_large = gnm_expr_new_funcall2
(fd_large, gnm_expr_new_constant (value_dup (val_org)),
- gnm_expr_new_binary (gnm_expr_new_binary
+ gnm_expr_new_binary (gnm_expr_new_binary
(gnm_expr_new_funcall (fd_row, NULL),
GNM_EXPR_OP_SUB,
- gnm_expr_new_funcall1
+ gnm_expr_new_funcall1
(fd_row, dao_get_cellref (dao, 1, 2))),
GNM_EXPR_OP_ADD,
gnm_expr_new_constant (value_new_int (1))));
dao_set_array_expr (dao, 1, 2, 1, rows, gnm_expr_copy (expr_large));
/* If there are ties the following will only give us the first occurrence... */
- expr_position = gnm_expr_new_funcall3 (fd_match, expr_large,
+ expr_position = gnm_expr_new_funcall3 (fd_match, expr_large,
gnm_expr_new_constant (value_dup (val_org)),
gnm_expr_new_constant (value_new_int (0)));
@@ -3738,12 +3738,12 @@ analysis_tool_ranking_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_count;
fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
gnm_func_ref (fd_count);
-
- expr_rows = gnm_expr_new_funcall1
+
+ expr_rows = gnm_expr_new_funcall1
(fd_count, gnm_expr_new_constant (value_dup (val_org)));
expr_rows_p_one = gnm_expr_new_binary
- (expr_rows,
- GNM_EXPR_OP_ADD,
+ (expr_rows,
+ GNM_EXPR_OP_ADD,
gnm_expr_new_constant (value_new_int (1)));
expr_rank_lower = gnm_expr_new_funcall3
(fd_rank,
@@ -3756,7 +3756,7 @@ analysis_tool_ranking_engine_run (data_analysis_output_t *dao,
GNM_EXPR_OP_ADD, expr_rows_p_one),
GNM_EXPR_OP_DIV,
gnm_expr_new_constant (value_new_int (2)));
-
+
gnm_func_unref (fd_count);
}
expr_percentile = gnm_expr_new_funcall3 (fd_percentrank,
@@ -3770,7 +3770,7 @@ analysis_tool_ranking_engine_run (data_analysis_output_t *dao,
dao_set_cell_expr ( dao, 3, i, gnm_expr_copy (expr_percentile));
}
-
+
dao->offset_col += 4;
value_release (val_org);
gnm_expr_free (expr_rank);
@@ -4184,7 +4184,7 @@ analysis_tool_fourier_engine_run (data_analysis_output_t *dao,
dao_set_merge (dao, 0, 0, 1, 0);
dao_set_italic (dao, 0, 0, 0, 0);
- dao_set_cell (dao, 0, 0, info->inverse ? _("Inverse Fourier Transform")
+ dao_set_cell (dao, 0, 0, info->inverse ? _("Inverse Fourier Transform")
: _("Fourier Transform"));
for (; data; data = data->next, col++) {
@@ -4209,11 +4209,11 @@ analysis_tool_fourier_engine_run (data_analysis_output_t *dao,
gnm_expr_new_constant (val_org),
gnm_expr_new_constant (value_new_bool (info->inverse)));
- dao_set_array_expr (dao, 0, 3, 1, rows,
- gnm_expr_new_funcall1 (fd_imreal,
+ dao_set_array_expr (dao, 0, 3, 1, rows,
+ gnm_expr_new_funcall1 (fd_imreal,
gnm_expr_copy (expr_fourier)));
- dao_set_array_expr (dao, 1, 3, 1, rows,
- gnm_expr_new_funcall1 (fd_imaginary,
+ dao_set_array_expr (dao, 1, 3, 1, rows,
+ gnm_expr_new_funcall1 (fd_imaginary,
expr_fourier));
dao->offset_col += 2;
}
diff --git a/src/tools/analysis-tools.h b/src/tools/analysis-tools.h
index 29f7bb5..26658c4 100644
--- a/src/tools/analysis-tools.h
+++ b/src/tools/analysis-tools.h
@@ -217,9 +217,9 @@ const GnmExpr *make_rangeref (int dx0, int dy0, int dx1, int dy1);
gnm_float *range_sort (gnm_float const *xs, int n);
-void set_cell_text_row (data_analysis_output_t *dao,
+void set_cell_text_row (data_analysis_output_t *dao,
int col, int row, const char *text);
-void set_cell_text_col (data_analysis_output_t *dao,
+void set_cell_text_col (data_analysis_output_t *dao,
int col, int row, const char *text);
#endif
diff --git a/src/tools/auto-correct.c b/src/tools/auto-correct.c
index ae48d0d..f712749 100644
--- a/src/tools/auto-correct.c
+++ b/src/tools/auto-correct.c
@@ -273,24 +273,24 @@ autocorrect_initial_caps (const char *src)
for (l = autocorrect.exceptions.init_caps; l; l = l->next) {
const char *except = l->data;
if (strncmp (begin, except, strlen (except)) == 0) {
- exception_found = TRUE;
+ exception_found = TRUE;
break;
}
}
if (!exception_found) {
const char *q;
- for (q = g_utf8_next_char (p);
- *q && !g_unichar_isspace (g_utf8_get_char (q));
+ for (q = g_utf8_next_char (p);
+ *q && !g_unichar_isspace (g_utf8_get_char (q));
q = g_utf8_next_char (q)) {
- if (g_unichar_isupper
+ if (g_unichar_isupper
(g_utf8_get_char (q))) {
exception_found = TRUE;
break;
}
}
}
-
+
if (!exception_found) {
lotext = g_utf8_strdown (target, 1);
newres = replace1 (src, target - src, lotext, p);
diff --git a/src/tools/dao.c b/src/tools/dao.c
index 9ff5000..9d3e1de 100644
--- a/src/tools/dao.c
+++ b/src/tools/dao.c
@@ -220,7 +220,7 @@ dao_adjust (data_analysis_output_t *dao, gint cols, gint rows)
/* new sheet and/or workbook */
Sheet *old_sheet = wb_control_cur_sheet (dao->wbc);
max_rows = gnm_sheet_get_max_rows (old_sheet) - dao->start_row;
- max_cols = gnm_sheet_get_max_cols (old_sheet) - dao->start_col;
+ max_cols = gnm_sheet_get_max_cols (old_sheet) - dao->start_col;
}
if (dao->cols > max_cols)
@@ -338,7 +338,7 @@ adjust_range (data_analysis_output_t *dao, GnmRange *r)
}
range_ensure_sanity (r, dao->sheet);
-
+
return ((r->start.col <= r->end.col) && (r->start.row <= r->end.row));
}
@@ -365,7 +365,7 @@ dao_cell_is_visible (data_analysis_output_t *dao, int col, int row)
* dao_set_cell_array_expr absorbs the reference for the expr.
*
*/
-void
+void
dao_set_array_expr (data_analysis_output_t *dao,
int col, int row, int cols, int rows,
GnmExpr const *expr)
@@ -381,8 +381,8 @@ dao_set_array_expr (data_analysis_output_t *dao,
}
texpr = gnm_expr_top_new (expr);
- gnm_cell_set_array_formula (dao->sheet,
- r.start.col, r.start.row,
+ gnm_cell_set_array_formula (dao->sheet,
+ r.start.col, r.start.row,
r.end.col, r.end.row,
texpr);
}
@@ -390,7 +390,7 @@ dao_set_array_expr (data_analysis_output_t *dao,
* dao_set_cell_array_expr absorbs the reference for the expr.
*
*/
-void
+void
dao_set_cell_array_expr (data_analysis_output_t *dao, int col, int row,
GnmExpr const *expr)
{
@@ -907,9 +907,9 @@ dao_set_border (data_analysis_output_t *dao, int col1, int row1,
GnmStyle *mstyle;
mstyle = gnm_style_new ();
- gnm_style_set_border (mstyle, elem,
+ gnm_style_set_border (mstyle, elem,
gnm_style_border_fetch (border,
- color,
+ color,
orientation));
dao_set_style (dao, col1, row1, col2, row2, mstyle);
}
@@ -1151,7 +1151,7 @@ dao_get_rangeref (data_analysis_output_t *dao, int ax, int ay, int bx, int by)
}
-void
+void
dao_set_sheet_object (data_analysis_output_t *dao, int col, int row, SheetObject* so)
{
SheetObjectAnchor anchor;
@@ -1163,7 +1163,7 @@ dao_set_sheet_object (data_analysis_output_t *dao, int col, int row, SheetObject
g_object_unref (so);
return;
}
-
+
range_init (&anchor_r, dao->start_col + col, dao->start_row + row,
dao->start_col + ((dao->cols < 5) ? dao->cols : 5),
dao->start_row + ((dao->rows < 20) ? dao->rows : 20));
@@ -1187,10 +1187,10 @@ dao_surrender_so (data_analysis_output_t *dao)
GSList *l = dao->sos;
dao->sos = NULL;
- return l;
+ return l;
}
-void
+void
dao_set_omit_so (data_analysis_output_t *dao, gboolean omit)
{
dao->omit_so = omit;
@@ -1198,7 +1198,7 @@ dao_set_omit_so (data_analysis_output_t *dao, gboolean omit)
-void
+void
dao_set_merge (data_analysis_output_t *dao, int col1, int row1,
int col2, int row2)
{
diff --git a/src/tools/dao.h b/src/tools/dao.h
index aa17a21..55e094a 100644
--- a/src/tools/dao.h
+++ b/src/tools/dao.h
@@ -9,7 +9,7 @@
*
* (C) Copyright 2000, 2001 by Jukka-Pekka Iivonen <jiivonen hutcs cs hut fi>
* (C) Copyright 2001, 2002 by Andreas J. Guelzow <aguelzow taliesin ca>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -54,10 +54,10 @@ typedef struct {
WorkbookControl *wbc;
GSList *sos;
gboolean omit_so;
- gboolean use_gfree;
+ gboolean use_gfree;
} data_analysis_output_t;
-data_analysis_output_t *dao_init (data_analysis_output_t *dao,
+data_analysis_output_t *dao_init (data_analysis_output_t *dao,
data_analysis_output_type_t type);
data_analysis_output_t *dao_init_new_sheet (data_analysis_output_t *dao);
data_analysis_output_t *dao_load_from_value (data_analysis_output_t *dao,
@@ -89,7 +89,7 @@ void dao_set_colors (data_analysis_output_t *dao, int col1, int row1,
void dao_set_align (data_analysis_output_t *dao, int col1, int row1,
int col2, int row2,
GnmHAlign align_h, GnmVAlign align_v);
-void dao_set_border (data_analysis_output_t *dao, int col1,
+void dao_set_border (data_analysis_output_t *dao, int col1,
int row1, int col2, int row2,
GnmStyleElement elem,GnmStyleBorderType border,
GnmColor *color,
@@ -115,13 +115,13 @@ void dao_set_cell_int (data_analysis_output_t *dao,
void dao_set_cell_na (data_analysis_output_t *dao,
int col, int row);
void dao_set_cell_float_na (data_analysis_output_t *dao, int col, int row,
- gnm_float v,
+ gnm_float v,
gboolean is_valid);
void dao_set_cell_comment (data_analysis_output_t *dao, int col, int row,
char const *comment);
void dao_set_sheet_object (data_analysis_output_t *dao, int col, int row, SheetObject* so);
-void dao_prepare_output (WorkbookControl *wbc,
+void dao_prepare_output (WorkbookControl *wbc,
data_analysis_output_t *dao, char const *name);
gboolean dao_format_output (data_analysis_output_t *dao, char const *cmd);
char *dao_range_name (data_analysis_output_t *dao);
@@ -131,7 +131,7 @@ void dao_adjust (data_analysis_output_t *dao, gint cols, gint rows);
ColRowStateList *dao_get_colrow_state_list (data_analysis_output_t *dao,
gboolean is_cols);
-void dao_set_colrow_state_list (data_analysis_output_t *dao, gboolean is_cols,
+void dao_set_colrow_state_list (data_analysis_output_t *dao, gboolean is_cols,
ColRowStateList *list);
void dao_write_header (data_analysis_output_t *dao, const gchar *toolname,
const gchar *title, Sheet *sheet);
@@ -150,7 +150,7 @@ GOData *dao_go_data_vector (data_analysis_output_t *dao, int ax, int ay, int bx
/* The following 2 functions are intended solely for undo support */
-/* of sheet objects normally created by the dao. */
+/* of sheet objects normally created by the dao. */
GSList *dao_surrender_so (data_analysis_output_t *dao);
void dao_set_omit_so (data_analysis_output_t *dao, gboolean omit);
diff --git a/src/tools/fill-series.c b/src/tools/fill-series.c
index 84cc74d..b03d82b 100644
--- a/src/tools/fill-series.c
+++ b/src/tools/fill-series.c
@@ -53,7 +53,7 @@ do_row_filling_wday (data_analysis_output_t *dao, fill_series_t *info)
GODateConventions const *conv =
workbook_date_conv (dao->sheet->workbook);
-
+
for (i = 0; i < info->n; i++) {
int steps = (i * info->step_value) + 0.5;
int days = (steps / 5) * 7 + steps % 5;
@@ -64,8 +64,8 @@ do_row_filling_wday (data_analysis_output_t *dao, fill_series_t *info)
if (wd + (steps % 5) > G_DATE_FRIDAY)
days += 2;
gnm_date_add_days (&date, days);
-
- dao_set_cell_float (dao, i, 0,
+
+ dao_set_cell_float (dao, i, 0,
go_date_g_to_serial (&date, conv));
}
@@ -80,7 +80,7 @@ do_column_filling_wday (data_analysis_output_t *dao, fill_series_t *info)
GODateConventions const *conv =
workbook_date_conv (dao->sheet->workbook);
-
+
for (i = 0; i < info->n; i++) {
int steps = (i * info->step_value) + 0.5;
int days = (steps / 5) * 7 + steps % 5;
@@ -91,8 +91,8 @@ do_column_filling_wday (data_analysis_output_t *dao, fill_series_t *info)
if (wd + (steps % 5) > G_DATE_FRIDAY)
days += 2;
gnm_date_add_days (&date, days);
-
- dao_set_cell_float (dao, 0,i,
+
+ dao_set_cell_float (dao, 0,i,
go_date_g_to_serial (&date, conv));
}
@@ -108,12 +108,12 @@ do_row_filling_month (data_analysis_output_t *dao, fill_series_t *info)
GODateConventions const *conv =
workbook_date_conv (dao->sheet->workbook);
-
+
for (i = 0; i < info->n; i++) {
go_date_serial_to_g (&date, start, conv);
gnm_date_add_months (&date, i * info->step_value);
-
- dao_set_cell_float (dao, i, 0,
+
+ dao_set_cell_float (dao, i, 0,
go_date_g_to_serial (&date, conv));
}
}
@@ -127,12 +127,12 @@ do_column_filling_month (data_analysis_output_t *dao, fill_series_t *info)
GODateConventions const *conv =
workbook_date_conv (dao->sheet->workbook);
-
+
for (i = 0; i < info->n; i++) {
go_date_serial_to_g (&date, start, conv);
gnm_date_add_months (&date, i * info->step_value);
-
- dao_set_cell_float (dao, 0, i,
+
+ dao_set_cell_float (dao, 0, i,
go_date_g_to_serial (&date, conv));
}
}
@@ -146,12 +146,12 @@ do_row_filling_year (data_analysis_output_t *dao, fill_series_t *info)
GODateConventions const *conv =
workbook_date_conv (dao->sheet->workbook);
-
+
for (i = 0; i < info->n; i++) {
go_date_serial_to_g (&date, start, conv);
gnm_date_add_years (&date, i * info->step_value);
-
- dao_set_cell_float (dao, i, 0,
+
+ dao_set_cell_float (dao, i, 0,
go_date_g_to_serial (&date, conv));
}
}
@@ -165,12 +165,12 @@ do_column_filling_year (data_analysis_output_t *dao, fill_series_t *info)
GODateConventions const *conv =
workbook_date_conv (dao->sheet->workbook);
-
+
for (i = 0; i < info->n; i++) {
go_date_serial_to_g (&date, start, conv);
gnm_date_add_years (&date, i * info->step_value);
-
- dao_set_cell_float (dao, 0, i,
+
+ dao_set_cell_float (dao, 0, i,
go_date_g_to_serial (&date, conv));
}
}
@@ -231,10 +231,10 @@ static void
fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
{
int length_of_series = -1;
- int length_of_space = info->series_in_rows
+ int length_of_space = info->series_in_rows
? dao->cols : dao->rows;
-
- if (info->type == FillSeriesTypeDate &&
+
+ if (info->type == FillSeriesTypeDate &&
info->date_unit != FillSeriesUnitDay) {
if (info->is_step_set)
info->step_value = gnm_floor (info->step_value + 0.5);
@@ -246,14 +246,14 @@ fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
workbook_date_conv (dao->sheet->workbook);
if (info->step_value < 0) {
- go_date_serial_to_g (&from_date,
+ go_date_serial_to_g (&from_date,
info->stop_value, conv);
- go_date_serial_to_g (&to_date,
+ go_date_serial_to_g (&to_date,
info->start_value, conv);
} else {
- go_date_serial_to_g (&from_date,
+ go_date_serial_to_g (&from_date,
info->start_value, conv);
- go_date_serial_to_g (&to_date,
+ go_date_serial_to_g (&to_date,
info->stop_value, conv);
}
switch (info->date_unit) {
@@ -263,15 +263,15 @@ fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
case FillSeriesUnitWeekday:
{
int days;
- days = g_date_days_between
+ days = g_date_days_between
(&from_date, &to_date);
- length_of_series = (days / 7) * 5 + 1
+ length_of_series = (days / 7) * 5 + 1
+ (days % 7);
if (length_of_series < 1)
length_of_series = 1;
}
break;
- case FillSeriesUnitMonth:
+ case FillSeriesUnitMonth:
{
GDateYear from_year, to_year;
GDateMonth from_month, to_month;
@@ -282,14 +282,14 @@ fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
from_month = g_date_get_month(&from_date);
to_month = g_date_get_month(&to_date);
g_date_set_year (&to_date, from_year);
-
+
if (g_date_compare (&from_date, &to_date) > 0)
months = (to_year - from_year) * 12 +
(to_month - from_month);
else
months = (to_year - from_year) * 12 +
(to_month - from_month) + 1;
- length_of_series = months
+ length_of_series = months
/ (int)(info->step_value + 0.5);
if (length_of_series < 1)
length_of_series = 1;
@@ -307,26 +307,26 @@ fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
years = to_year - from_year;
else
years = to_year - from_year + 1;
- length_of_series = years
+ length_of_series = years
/ (int)(info->step_value + 0.5);
if (length_of_series < 1)
length_of_series = 1;
}
break;
}
-
+
}
} else {
if (!info->is_step_set) {
switch (info->type) {
case FillSeriesTypeDate:
case FillSeriesTypeLinear:
- info->step_value =
+ info->step_value =
(info->stop_value - info->start_value)/
(length_of_space - 1);
break;
case FillSeriesTypeGrowth:
- info->step_value =
+ info->step_value =
gnm_exp((gnm_log(info->stop_value
/info->start_value))/
(length_of_space - 1));
@@ -337,16 +337,16 @@ fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
switch (info->type) {
case FillSeriesTypeDate:
case FillSeriesTypeLinear:
- length_of_series
+ length_of_series
= gnm_floor(GNM_EPSILON + 1 +
- (info->stop_value
+ (info->stop_value
- info->start_value)/
info->step_value);
if (length_of_series < 1)
length_of_series = 1;
break;
case FillSeriesTypeGrowth:
- length_of_series
+ length_of_series
= gnm_floor(GNM_EPSILON + 1 +
(gnm_log(info->stop_value
/info->start_value))/
@@ -368,7 +368,7 @@ fill_series_adjust_variables (data_analysis_output_t *dao, fill_series_t *info)
info->n = length_of_series;
}
-gboolean fill_series_engine (data_analysis_output_t *dao, gpointer specs,
+gboolean fill_series_engine (data_analysis_output_t *dao, gpointer specs,
analysis_tool_engine_t selector, gpointer result)
{
fill_series_t *info = specs;
@@ -377,7 +377,7 @@ gboolean fill_series_engine (data_analysis_output_t *dao, gpointer specs,
case TOOL_ENGINE_UPDATE_DESCRIPTOR:
return (dao_command_descriptor (dao, _("Fill Series (%s)"),
result) == NULL);
- case TOOL_ENGINE_UPDATE_DAO:
+ case TOOL_ENGINE_UPDATE_DAO:
fill_series_adjust_variables (dao, info);
return FALSE;
case TOOL_ENGINE_CLEAN_UP:
@@ -418,7 +418,7 @@ gboolean fill_series_engine (data_analysis_output_t *dao, gpointer specs,
else
do_column_filling_wday (dao, info);
break;
- case FillSeriesUnitMonth:
+ case FillSeriesUnitMonth:
if (info->series_in_rows)
do_row_filling_month (dao, info);
else
@@ -431,7 +431,7 @@ gboolean fill_series_engine (data_analysis_output_t *dao, gpointer specs,
do_column_filling_year (dao, info);
break;
}
- dao_set_date (dao, 0, 0,
+ dao_set_date (dao, 0, 0,
dao->cols - 1, dao->rows -1);
break;
}
diff --git a/src/tools/fill-series.h b/src/tools/fill-series.h
index 54d257f..975fe46 100644
--- a/src/tools/fill-series.h
+++ b/src/tools/fill-series.h
@@ -10,7 +10,7 @@ typedef enum {
} fill_series_type_t;
typedef enum {
- FillSeriesUnitDay, FillSeriesUnitWeekday, FillSeriesUnitMonth,
+ FillSeriesUnitDay, FillSeriesUnitWeekday, FillSeriesUnitMonth,
FillSeriesUnitYear
} fill_series_date_unit_t;
@@ -27,7 +27,7 @@ typedef struct {
gint n;
} fill_series_t;
-gboolean fill_series_engine (data_analysis_output_t *dao, gpointer specs,
+gboolean fill_series_engine (data_analysis_output_t *dao, gpointer specs,
analysis_tool_engine_t selector, gpointer result);
#endif
diff --git a/src/tools/filter.c b/src/tools/filter.c
index 29a6b1e..5b284f4 100644
--- a/src/tools/filter.c
+++ b/src/tools/filter.c
@@ -151,7 +151,7 @@ advanced_filter (WorkbookControl *wbc,
return OK;
}
-static gboolean
+static gboolean
cb_show_all (GnmColRowIter const *iter, Sheet *sheet)
{
if (iter->cri->in_filter && !iter->cri->visible)
diff --git a/src/tools/goal-seek.c b/src/tools/goal-seek.c
index 457d6e9..2db250a 100644
--- a/src/tools/goal-seek.c
+++ b/src/tools/goal-seek.c
@@ -217,7 +217,7 @@ goal_seek_newton_polish (GoalSeekFunction f, GoalSeekFunction df,
goto nomore_square;
x0 = x1;
-#ifdef DEBUG_GOAL_SEEK
+#ifdef DEBUG_GOAL_SEEK
g_print ("polish square: x0=%.20" GNM_FORMAT_g "\n",
x0);
#endif
@@ -256,7 +256,7 @@ goal_seek_newton_polish (GoalSeekFunction f, GoalSeekFunction df,
goto nomore_newton;
x0 = x1;
-#ifdef DEBUG_GOAL_SEEK
+#ifdef DEBUG_GOAL_SEEK
g_print ("polish Newton: x0=%.20" GNM_FORMAT_g "\n",
x0);
#endif
@@ -315,7 +315,7 @@ goal_seek_newton (GoalSeekFunction f, GoalSeekFunction df,
GoalSeekStatus status;
gboolean flat;
-#ifdef DEBUG_GOAL_SEEK
+#ifdef DEBUG_GOAL_SEEK
g_print ("x0 = %.20" GNM_FORMAT_g " (i=%d)\n", x0, iterations);
#endif
diff --git a/src/tools/random-generator.c b/src/tools/random-generator.c
index 5a4d672..da88268 100644
--- a/src/tools/random-generator.c
+++ b/src/tools/random-generator.c
@@ -177,7 +177,7 @@ tool_random_engine_run_discrete (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_uniform (data_analysis_output_t *dao,
+tool_random_engine_run_uniform (data_analysis_output_t *dao,
tools_data_random_t *info,
uniform_random_tool_t *param)
{
@@ -195,7 +195,7 @@ tool_random_engine_run_uniform (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_uniform_int (data_analysis_output_t *dao,
+tool_random_engine_run_uniform_int (data_analysis_output_t *dao,
tools_data_random_t *info,
uniform_random_tool_t *param)
{
@@ -215,7 +215,7 @@ tool_random_engine_run_uniform_int (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_normal (data_analysis_output_t *dao,
+tool_random_engine_run_normal (data_analysis_output_t *dao,
tools_data_random_t *info,
normal_random_tool_t *param)
{
@@ -231,7 +231,7 @@ tool_random_engine_run_normal (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_bernoulli (data_analysis_output_t *dao,
+tool_random_engine_run_bernoulli (data_analysis_output_t *dao,
tools_data_random_t *info,
bernoulli_random_tool_t *param)
{
@@ -246,7 +246,7 @@ tool_random_engine_run_bernoulli (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_beta (data_analysis_output_t *dao,
+tool_random_engine_run_beta (data_analysis_output_t *dao,
tools_data_random_t *info,
beta_random_tool_t *param)
{
@@ -261,7 +261,7 @@ tool_random_engine_run_beta (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_binomial (data_analysis_output_t *dao,
+tool_random_engine_run_binomial (data_analysis_output_t *dao,
tools_data_random_t *info,
binomial_random_tool_t *param)
{
@@ -278,7 +278,7 @@ tool_random_engine_run_binomial (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_negbinom (data_analysis_output_t *dao,
+tool_random_engine_run_negbinom (data_analysis_output_t *dao,
tools_data_random_t *info,
negbinom_random_tool_t *param)
{
@@ -295,7 +295,7 @@ tool_random_engine_run_negbinom (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_poisson (data_analysis_output_t *dao,
+tool_random_engine_run_poisson (data_analysis_output_t *dao,
tools_data_random_t *info,
poisson_random_tool_t *param)
{
@@ -311,7 +311,7 @@ tool_random_engine_run_poisson (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_exponential (data_analysis_output_t *dao,
+tool_random_engine_run_exponential (data_analysis_output_t *dao,
tools_data_random_t *info,
exponential_random_tool_t *param)
{
@@ -327,7 +327,7 @@ tool_random_engine_run_exponential (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_exppow (data_analysis_output_t *dao,
+tool_random_engine_run_exppow (data_analysis_output_t *dao,
tools_data_random_t *info,
exppow_random_tool_t *param)
{
@@ -343,7 +343,7 @@ tool_random_engine_run_exppow (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_cauchy (data_analysis_output_t *dao,
+tool_random_engine_run_cauchy (data_analysis_output_t *dao,
tools_data_random_t *info,
cauchy_random_tool_t *param)
{
@@ -359,7 +359,7 @@ tool_random_engine_run_cauchy (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_chisq (data_analysis_output_t *dao,
+tool_random_engine_run_chisq (data_analysis_output_t *dao,
tools_data_random_t *info,
chisq_random_tool_t *param)
{
@@ -375,7 +375,7 @@ tool_random_engine_run_chisq (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_pareto (data_analysis_output_t *dao,
+tool_random_engine_run_pareto (data_analysis_output_t *dao,
tools_data_random_t *info,
pareto_random_tool_t *param)
{
@@ -391,7 +391,7 @@ tool_random_engine_run_pareto (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_rayleigh (data_analysis_output_t *dao,
+tool_random_engine_run_rayleigh (data_analysis_output_t *dao,
tools_data_random_t *info,
rayleigh_random_tool_t *param)
{
@@ -407,7 +407,7 @@ tool_random_engine_run_rayleigh (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_rayleigh_tail (data_analysis_output_t *dao,
+tool_random_engine_run_rayleigh_tail (data_analysis_output_t *dao,
tools_data_random_t *info,
rayleigh_tail_random_tool_t *param)
{
@@ -423,7 +423,7 @@ tool_random_engine_run_rayleigh_tail (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_levy (data_analysis_output_t *dao,
+tool_random_engine_run_levy (data_analysis_output_t *dao,
tools_data_random_t *info,
levy_random_tool_t *param)
{
@@ -439,7 +439,7 @@ tool_random_engine_run_levy (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_fdist (data_analysis_output_t *dao,
+tool_random_engine_run_fdist (data_analysis_output_t *dao,
tools_data_random_t *info,
fdist_random_tool_t *param)
{
@@ -455,7 +455,7 @@ tool_random_engine_run_fdist (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_lognormal (data_analysis_output_t *dao,
+tool_random_engine_run_lognormal (data_analysis_output_t *dao,
tools_data_random_t *info,
lognormal_random_tool_t *param)
{
@@ -471,7 +471,7 @@ tool_random_engine_run_lognormal (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_logarithmic (data_analysis_output_t *dao,
+tool_random_engine_run_logarithmic (data_analysis_output_t *dao,
tools_data_random_t *info,
logarithmic_random_tool_t *param)
{
@@ -487,7 +487,7 @@ tool_random_engine_run_logarithmic (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_logistic (data_analysis_output_t *dao,
+tool_random_engine_run_logistic (data_analysis_output_t *dao,
tools_data_random_t *info,
logistic_random_tool_t *param)
{
@@ -503,7 +503,7 @@ tool_random_engine_run_logistic (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_tdist (data_analysis_output_t *dao,
+tool_random_engine_run_tdist (data_analysis_output_t *dao,
tools_data_random_t *info,
tdist_random_tool_t *param)
{
@@ -519,7 +519,7 @@ tool_random_engine_run_tdist (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_gamma (data_analysis_output_t *dao,
+tool_random_engine_run_gamma (data_analysis_output_t *dao,
tools_data_random_t *info,
gamma_random_tool_t *param)
{
@@ -535,7 +535,7 @@ tool_random_engine_run_gamma (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_geometric (data_analysis_output_t *dao,
+tool_random_engine_run_geometric (data_analysis_output_t *dao,
tools_data_random_t *info,
geometric_random_tool_t *param)
{
@@ -551,7 +551,7 @@ tool_random_engine_run_geometric (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_weibull (data_analysis_output_t *dao,
+tool_random_engine_run_weibull (data_analysis_output_t *dao,
tools_data_random_t *info,
weibull_random_tool_t *param)
{
@@ -567,7 +567,7 @@ tool_random_engine_run_weibull (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_laplace (data_analysis_output_t *dao,
+tool_random_engine_run_laplace (data_analysis_output_t *dao,
tools_data_random_t *info,
laplace_random_tool_t *param)
{
@@ -583,7 +583,7 @@ tool_random_engine_run_laplace (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_gaussian_tail (data_analysis_output_t *dao,
+tool_random_engine_run_gaussian_tail (data_analysis_output_t *dao,
tools_data_random_t *info,
gaussian_tail_random_tool_t *param)
{
@@ -599,7 +599,7 @@ tool_random_engine_run_gaussian_tail (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_landau (data_analysis_output_t *dao,
+tool_random_engine_run_landau (data_analysis_output_t *dao,
tools_data_random_t *info)
{
int i, n;
@@ -614,7 +614,7 @@ tool_random_engine_run_landau (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_gumbel1 (data_analysis_output_t *dao,
+tool_random_engine_run_gumbel1 (data_analysis_output_t *dao,
tools_data_random_t *info,
gumbel_random_tool_t *param)
{
@@ -630,7 +630,7 @@ tool_random_engine_run_gumbel1 (data_analysis_output_t *dao,
}
static gboolean
-tool_random_engine_run_gumbel2 (data_analysis_output_t *dao,
+tool_random_engine_run_gumbel2 (data_analysis_output_t *dao,
tools_data_random_t *info,
gumbel_random_tool_t *param)
{
@@ -645,8 +645,8 @@ tool_random_engine_run_gumbel2 (data_analysis_output_t *dao,
return FALSE;
}
-gboolean
-tool_random_engine (data_analysis_output_t *dao, gpointer specs,
+gboolean
+tool_random_engine (data_analysis_output_t *dao, gpointer specs,
analysis_tool_engine_t selector, gpointer result)
{
tools_data_random_t *info = specs;
@@ -655,11 +655,11 @@ tool_random_engine (data_analysis_output_t *dao, gpointer specs,
case TOOL_ENGINE_UPDATE_DESCRIPTOR:
return (dao_command_descriptor (dao, _("Random Numbers (%s)"),
result) == NULL);
- case TOOL_ENGINE_UPDATE_DAO:
+ case TOOL_ENGINE_UPDATE_DAO:
dao_adjust (dao, info->n_vars, info->count);
return FALSE;
case TOOL_ENGINE_CLEAN_UP:
- if (info->distribution == DiscreteDistribution &&
+ if (info->distribution == DiscreteDistribution &&
info->param.discrete.range != NULL) {
value_release (info->param.discrete.range);
info->param.discrete.range = NULL;
@@ -667,7 +667,7 @@ tool_random_engine (data_analysis_output_t *dao, gpointer specs,
return FALSE;
case TOOL_ENGINE_LAST_VALIDITY_CHECK:
if (info->distribution == DiscreteDistribution)
- return tool_random_engine_run_discrete_last_check
+ return tool_random_engine_run_discrete_last_check
(dao, specs, &info->param.discrete, result);
return FALSE;
case TOOL_ENGINE_PREPARE_OUTPUT_RANGE:
@@ -679,19 +679,19 @@ tool_random_engine (data_analysis_output_t *dao, gpointer specs,
default:
switch (info->distribution) {
case DiscreteDistribution:
- return tool_random_engine_run_discrete
+ return tool_random_engine_run_discrete
(dao, specs, &info->param.discrete, result);
- case NormalDistribution:
+ case NormalDistribution:
return tool_random_engine_run_normal
(dao, specs, &info->param.normal);
case BernoulliDistribution:
- return tool_random_engine_run_bernoulli
+ return tool_random_engine_run_bernoulli
(dao, specs, &info->param.bernoulli);
case BetaDistribution:
return tool_random_engine_run_beta
(dao, specs, &info->param.beta);
case UniformDistribution:
- return tool_random_engine_run_uniform
+ return tool_random_engine_run_uniform
(dao, specs, &info->param.uniform);
case UniformIntDistribution:
return tool_random_engine_run_uniform_int
@@ -700,13 +700,13 @@ tool_random_engine (data_analysis_output_t *dao, gpointer specs,
return tool_random_engine_run_poisson
(dao, specs, &info->param.poisson);
case ExponentialDistribution:
- return tool_random_engine_run_exponential
+ return tool_random_engine_run_exponential
(dao, specs, &info->param.exponential);
case ExponentialPowerDistribution:
return tool_random_engine_run_exppow
(dao, specs, &info->param.exppow);
case CauchyDistribution:
- return tool_random_engine_run_cauchy
+ return tool_random_engine_run_cauchy
(dao, specs, &info->param.cauchy);
case ChisqDistribution:
return tool_random_engine_run_chisq
diff --git a/src/tools/random-generator.h b/src/tools/random-generator.h
index 5e9150a..91dfd5e 100644
--- a/src/tools/random-generator.h
+++ b/src/tools/random-generator.h
@@ -183,13 +183,13 @@ typedef union {
typedef struct {
random_tool_t param;
- WorkbookControl *wbc;
+ WorkbookControl *wbc;
gint n_vars;
gint count;
random_distribution_t distribution;
} tools_data_random_t;
-gboolean tool_random_engine (data_analysis_output_t *dao, gpointer specs,
+gboolean tool_random_engine (data_analysis_output_t *dao, gpointer specs,
analysis_tool_engine_t selector, gpointer result);
#endif
diff --git a/src/tools/scenarios.c b/src/tools/scenarios.c
index 0b1255c..f697c66 100644
--- a/src/tools/scenarios.c
+++ b/src/tools/scenarios.c
@@ -49,7 +49,7 @@ scenario_t *
scenario_by_name (GList *scenarios, gchar const *name, gboolean *all_deleted)
{
scenario_t *res = NULL;
-
+
if (all_deleted)
*all_deleted = TRUE;
@@ -215,7 +215,7 @@ static GnmValue *
copy_cb (int col, int row, GnmValue *v, copy_cb_t *p)
{
p->dest->changing_cells [col - p->col_offset +
- (row - p->row_offset) * p->cols] =
+ (row - p->row_offset) * p->cols] =
value_dup (v);
return v;
@@ -228,7 +228,7 @@ scenario_copy (scenario_t *s, Sheet *new_sheet)
copy_cb_t cb;
p = g_new (scenario_t, 1);
-
+
p->name = g_strdup (s->name);
p->comment = g_strdup (s->comment);
/* FIXME: Sheet name change */
@@ -378,7 +378,7 @@ scenario_show (WorkbookControl *wbc,
/* Scenario: Insert columns(s)/row(s) *************************************/
static void
-insert_cols (scenario_t *s, int col, int count)
+insert_cols (scenario_t *s, int col, int count)
{
if (s->range.start.col >= col) {
s->range.start.col += count;
@@ -403,7 +403,7 @@ scenarios_insert_cols (GList *list, int col, int count)
}
static void
-insert_rows (scenario_t *s, int row, int count)
+insert_rows (scenario_t *s, int row, int count)
{
if (s->range.start.row >= row) {
s->range.start.row += count;
@@ -430,7 +430,7 @@ scenarios_insert_rows (GList *list, int row, int count)
/* Scenario: Delete columns(s)/row(s) *************************************/
static void
-delete_cols (scenario_t *s, int col, int count)
+delete_cols (scenario_t *s, int col, int count)
{
if (s->range.start.col >= col) {
s->range.start.col -= count;
@@ -455,7 +455,7 @@ scenarios_delete_cols (GList *list, int col, int count)
}
static void
-delete_rows (scenario_t *s, int row, int count)
+delete_rows (scenario_t *s, int row, int count)
{
if (s->range.start.row >= row) {
s->range.start.row -= count;
@@ -564,7 +564,7 @@ summary_cb (int col, int row, GnmValue *v, summary_cb_t *p)
* cell. If so, it's row will be put into *index. */
index = g_hash_table_lookup (p->names, tmp);
if (index != NULL) {
- dao_set_cell_value (&p->dao, 2 + p->col, 3 + *index,
+ dao_set_cell_value (&p->dao, 2 + p->col, 3 + *index,
value_dup (v));
/* Set the colors. */
@@ -572,19 +572,19 @@ summary_cb (int col, int row, GnmValue *v, summary_cb_t *p)
2 + p->col, 3 + *index,
style_color_new_go (GO_COLOR_BLACK),
style_color_new_gdk (&gs_light_gray));
-
+
} else {
/* New cell. */
GnmCell *cell;
int *r;
-
+
/* Changing cell name. */
dao_set_cell (&p->dao, 0, 3 + p->row, tmp);
-
+
/* GnmValue of the cell in this scenario. */
- dao_set_cell_value (&p->dao, 2 + p->col, 3 + p->row,
+ dao_set_cell_value (&p->dao, 2 + p->col, 3 + p->row,
value_dup (v));
-
+
/* Current value of the cell. */
cell = sheet_cell_fetch (p->sheet, col, row);
dao_set_cell_value (&p->dao, 1, 3 + p->row,
@@ -595,12 +595,12 @@ summary_cb (int col, int row, GnmValue *v, summary_cb_t *p)
2 + p->col, 3 + p->row,
style_color_new_go (GO_COLOR_BLACK),
style_color_new_gdk (&gs_light_gray));
-
+
/* Insert row number into the hash table. */
r = g_new (int, 1);
*r = p->row;
g_hash_table_insert (p->names, tmp, r);
-
+
/* Increment the nbr of rows. */
p->row++;
}
@@ -628,30 +628,30 @@ scenario_summary_res_cells (WorkbookControl *wbc, GSList *results,
scenario_t *ov = NULL;
GnmCell *cell;
GList *cur;
-
+
cell = sheet_cell_fetch (cb->sheet, i, j);
-
+
/* Names of the result cells. */
dao_set_cell (&cb->dao, 0, 3 + cb->row,
cell_name (cell));
-
+
/* Current value. */
dao_set_cell_value
(&cb->dao, 1, 3 + cb->row,
value_dup (cell->value));
-
+
/* Evaluate and write the value of the cell
* with all different scenario values. */
col = 2;
for (cur = cb->sheet->scenarios; cur != NULL;
cur = cur->next) {
scenario_t *s = cur->data;
-
+
ov = scenario_show (wbc, s, ov, &dao);
-
+
cell = sheet_cell_fetch (cb->sheet,
i, j);
-
+
cell_queue_recalc (cell);
gnm_cell_eval (cell);
dao_set_cell_value (&cb->dao, col++,
@@ -660,7 +660,7 @@ scenario_summary_res_cells (WorkbookControl *wbc, GSList *results,
(cell->value));
}
cb->row++;
-
+
/* Use show to clean up 'ov'. */
scenario_show (wbc, NULL, ov, &dao);
ov = NULL;
@@ -707,7 +707,7 @@ scenario_summary (WorkbookControl *wbc,
}
/* Set the alignment of names of the changing cells to be right. */
- dao_set_align (&cb.dao, 0, 3, 0, 2 + cb.row, HALIGN_RIGHT,
+ dao_set_align (&cb.dao, 0, 3, 0, 2 + cb.row, HALIGN_RIGHT,
VALIGN_BOTTOM);
/* Result cells. */
@@ -730,7 +730,7 @@ scenario_summary (WorkbookControl *wbc,
style_color_new_go (GO_COLOR_BLACK),
style_color_new_gdk (&gs_light_gray));
- dao_set_align (&cb.dao, 1, 1, cb.col + 1, 1, HALIGN_RIGHT,
+ dao_set_align (&cb.dao, 1, 1, cb.col + 1, 1, HALIGN_RIGHT,
VALIGN_BOTTOM);
*new_sheet = cb.dao.sheet;
diff --git a/src/tools/solver/api.c b/src/tools/solver/api.c
index f92fd5d..31dbdcf 100644
--- a/src/tools/solver/api.c
+++ b/src/tools/solver/api.c
@@ -54,7 +54,7 @@
* Package: LP Solve
* Version: 5.5
* License: LGPL
- * Homepage:
+ * Homepage:
*/
typedef struct {
@@ -154,7 +154,7 @@ w_lp_solve_set_int (SolverProgram program, int col)
{
lp_solve_t *lp = (lp_solve_t *) program;
- if (lp->assume_non_negative)
+ if (lp->assume_non_negative)
lp_solve_set_int (lp->p, col + 1, TRUE);
else {
lp_solve_set_int (lp->p, 2 * col + 1, TRUE);
@@ -337,9 +337,9 @@ w_glpk_init (const SolverParameters *param)
lpx_add_cols (lp->p, cols);
lpx_add_rows (lp->p, param->n_constraints);
- lp->a = g_new (gnm_float, cols * param->n_constraints + 1);
- lp->cn = g_new (int, cols * param->n_constraints + 1);
- lp->rn = g_new (int, cols * param->n_constraints + 1);
+ lp->a = g_new (gnm_float, cols * param->n_constraints + 1);
+ lp->cn = g_new (int, cols * param->n_constraints + 1);
+ lp->rn = g_new (int, cols * param->n_constraints + 1);
lp->n = 1;
if (lp->assume_non_negative)
@@ -474,7 +474,7 @@ w_glpk_print_lp (SolverProgram program)
}
g_free (ndx);
g_free (a);
-
+
lpx_get_row_bnds (lp->p, i + 1, &typex, &lb, &ub);
if (typex == LPX_LO)
printf (">= %8g\n", lb);
@@ -486,7 +486,7 @@ w_glpk_print_lp (SolverProgram program)
printf ("Type\t\t");
for (i = 0; i < cols; i++)
- if (lpx_get_class (lp->p) == LPX_LP
+ if (lpx_get_class (lp->p) == LPX_LP
|| lpx_get_col_kind (lp->p, i + 1) == LPX_CV)
printf (" Real\t");
else
@@ -516,7 +516,7 @@ static SolverStatus
w_glpk_simplex_solve (SolverProgram program)
{
glpk_simplex_t *lp = (glpk_simplex_t *) program;
-
+
if (lp->scaling)
lpx_scale_prob (lp->p);
diff --git a/src/tools/solver/api.h b/src/tools/solver/api.h
index 0b4fb2d..afab33c 100644
--- a/src/tools/solver/api.h
+++ b/src/tools/solver/api.h
@@ -5,7 +5,7 @@
* Jukka-Pekka Iivonen <jiivonen hutcs cs hut fi>
*
* (C) Copyright 2002 by Jukka-Pekka Iivonen <jiivonen hutcs cs hut fi>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
diff --git a/src/tools/solver/glpk/source/glplpx4.c b/src/tools/solver/glpk/source/glplpx4.c
index 80fcebb..0edbbfa 100644
--- a/src/tools/solver/glpk/source/glplpx4.c
+++ b/src/tools/solver/glpk/source/glplpx4.c
@@ -361,7 +361,7 @@ void lpx_scale_prob(LPX *lp)
int m = lpx_get_num_rows(lp);
int n = lpx_get_num_cols(lp);
int sc_ord = 0, sc_max = 20;
- gnm_float sc_eps = 0.01;
+ gnm_float sc_eps = 0.01;
int i, j;
gnm_float *R, *S;
/* initialize R := I and S := I */
diff --git a/src/tools/solver/lp_solve/lp_solve.c b/src/tools/solver/lp_solve/lp_solve.c
index 93b0332..3cfb10e 100644
--- a/src/tools/solver/lp_solve/lp_solve.c
+++ b/src/tools/solver/lp_solve/lp_solve.c
@@ -711,13 +711,13 @@ typedef struct _MATrec
int mat_alloc; /* The allocated size for matrix sized structures */
/* Sparse problem matrix storage */
-#if MatrixColAccess==CAM_Record
+#if MatrixColAccess==CAM_Record
MATitem *col_mat; /* mat_alloc : The sparse data storage */
#else /*MatrixColAccess==CAM_Vector*/
int *col_mat_colnr;
int *col_mat_rownr;
gnm_float *col_mat_value;
-#endif
+#endif
int *col_end; /* columns_alloc+1 : col_end[i] is the index of the
first element after column i; column[i] is stored
in elements col_end[i-1] to col_end[i]-1 */
@@ -815,7 +815,7 @@ STATIC void btran(lprec *lp, gnm_float *rhsvector, int *nzidx, gnm_float roundze
/* Combined equation solution and matrix product for simplex operations */
STATIC gboolean fsolve(lprec *lp, int varin, gnm_float *pcol, int *nzidx, gnm_float roundzero, gnm_float ofscalar, gboolean prepareupdate);
STATIC gboolean bsolve(lprec *lp, int row_nr, gnm_float *rhsvector, int *nzidx, gnm_float roundzero, gnm_float ofscalar);
-STATIC void bsolve_xA2(lprec *lp, int* coltarget,
+STATIC void bsolve_xA2(lprec *lp, int* coltarget,
int row_nr1, gnm_float *vector1, gnm_float roundzero1, int *nzvector1,
int row_nr2, gnm_float *vector2, gnm_float roundzero2, int *nzvector2, int roundmode);
@@ -932,7 +932,7 @@ static gboolean SOS_set_marked(SOSgroup *group, int sosindex, int column, gboole
static gboolean SOS_unmark(SOSgroup *group, int sosindex, int column);
static int SOS_fix_unmarked(SOSgroup *group, int sosindex, int variable, gnm_float *bound, gnm_float value,
gboolean isupper, int *diffcount, DeltaVrec *changelog);
-static int SOS_fix_list(SOSgroup *group, int sosindex, int variable, gnm_float *bound,
+static int SOS_fix_list(SOSgroup *group, int sosindex, int variable, gnm_float *bound,
int *varlist, gboolean isleft, DeltaVrec *changelog);
static int SOS_is_satisfied(SOSgroup *group, int sosindex, gnm_float *solution);
static gboolean SOS_is_feasible(SOSgroup *group, int sosindex, gnm_float *solution);
@@ -3806,7 +3806,7 @@ static int getMDO(lprec *lp, gboolean *usedpos, int *colorder, int *size, gboole
/* If mode = 3,4,5,6, v and w must not be the same arrays.
If lu1fac has just been used to factorize a symmetric matrix A
(which must be definite or quasi-definite), the factors A = L U
- may be regarded as A = LDL', where D = diag(U). In such cases,
+ may be regarded as A = LDL', where D = diag(U). In such cases,
the following (faster) lp_solve_solve codes may be used: */
#define LUSOL_SOLVE_Av_v 7 /* v solves A v = L D L'v = v(input). w is not touched. */
#define LUSOL_SOLVE_LDLtv_v 8 /* v solves L |D| L'v = v(input). w is not touched. */
@@ -3871,14 +3871,14 @@ typedef struct _LUSOLrec {
/* Extra arrays of length n for TCP and keepLU == FALSE */
gnm_float *Ha, *diagU;
- int *Hj, *Hk;
+ int *Hj, *Hk;
/* Extra arrays of length m for TRP*/
gnm_float *amaxr;
/* Extra array for L0 stored by row for faster btran */
LUSOLmat *L0;
-
+
/* Miscellaneous data */
int expanded_a;
int replaced_c;
@@ -3889,7 +3889,7 @@ typedef struct _LUSOLrec {
static LUSOLrec *LUSOL_create(FILE *outstream, int msgfil, int pivotmodel, int updatelimit);
static gboolean LUSOL_sizeto(LUSOLrec *LUSOL, int init_r, int init_c, int init_a);
-static gboolean LUSOL_assign(LUSOLrec *LUSOL, int iA[], int jA[], gnm_float Aij[],
+static gboolean LUSOL_assign(LUSOLrec *LUSOL, int iA[], int jA[], gnm_float Aij[],
int nzcount, gboolean istriplet);
static void LUSOL_clear(LUSOLrec *LUSOL, gboolean nzonly);
static void LUSOL_free(LUSOLrec *LUSOL);
@@ -3914,8 +3914,8 @@ static int LUSOL_btran(LUSOLrec *LUSOL, gnm_float b[], int NZidx[]);
static void LU1FAC(LUSOLrec *LUSOL, int *INFORM);
static gboolean LU1L0(LUSOLrec *LUSOL, LUSOLmat **mat, int *inform);
static void LU6SOL(LUSOLrec *LUSOL, int MODE, gnm_float V[], gnm_float W[], int NZidx[], int *INFORM);
-static void LU8RPC(LUSOLrec *LUSOL, int MODE1, int MODE2,
- int JREP, gnm_float V[], gnm_float W[],
+static void LU8RPC(LUSOLrec *LUSOL, int MODE1, int MODE2,
+ int JREP, gnm_float V[], gnm_float W[],
int *INFORM, gnm_float *DIAG, gnm_float *VNORM);
@@ -4008,7 +4008,7 @@ extern "C" {
#define BFP_STAT_REFACT_DENSE 2
-
+
/* Routines with UNIQUE implementations for each inversion engine */
/* ---------------------------------------------------------------------------------- */
@@ -4167,7 +4167,7 @@ static gnm_float my_dnormi( int *n, gnm_float *x );
/* modifying the max_Bsize to include slack variables. KE. */
/* 16 June 2004 Make the symbolic minimum degree ordering routine available */
/* to BFPs as a routine internal to the library. KE */
-/* 1 July 2004 Change due to change in MDO naming. */
+/* 1 July 2004 Change due to change in MDO naming. */
/* ---------------------------------------------------------------------------------- */
@@ -4175,11 +4175,11 @@ static gnm_float my_dnormi( int *n, gnm_float *x );
static gboolean bfp_compatible(lprec *lp, int bfpversion, int lpversion, int sizeofvar)
{
gboolean status = FALSE;
-
+
if((lp != NULL) && (bfpversion == BFPVERSION) && (sizeof(gnm_float) == sizeofvar)) {
-#if 0
+#if 0
if(lpversion == MAJORVERSION) /* Forces BFP renewal at lp_solve major version changes */
-#endif
+#endif
status = TRUE;
}
return( status );
@@ -4280,17 +4280,17 @@ static gboolean bfp_mustrefactorize(lprec *lp)
if((lu->timed_refact == AUTOMATIC) &&
(lu->num_pivots < 0.4*lp->bfp_pivotmax(lp)))
lu->time_refactnext = f;
- /* ... otherwise set flag for the optimal time-based refactorization */
+ /* ... otherwise set flag for the optimal time-based refactorization */
else
lp->set_action(&lp->spx_action, ACTION_TIMEDREINVERT);
}
-
+
/* Otherwise simply update the optimal time metric */
else
lu->time_refactnext = f;
#if 0
- if(lu->num_pivots % 10 == 0)
- lp->report(lp, NORMAL, "bfp pivot %d - start %f - timestat %f",
+ if(lu->num_pivots % 10 == 0)
+ lp->report(lp, NORMAL, "bfp pivot %d - start %f - timestat %f",
lu->num_pivots, lu->time_refactstart, f);
#endif
}
@@ -4342,7 +4342,7 @@ static gboolean bfp_init(lprec *lp, int size, int delta, char *options)
lp->invB = g_new0 (INVrec , 1);
lu = lp->invB;
- if((lu == NULL) ||
+ if((lu == NULL) ||
!lp->bfp_resize(lp, size) ||
!lp->bfp_restart(lp))
return( FALSE );
@@ -6129,7 +6129,7 @@ static gboolean LU1L0(LUSOLrec *LUSOL, LUSOLmat **mat, int *inform)
/* Check if we should apply "smarts" before proceeding to the row matrix creation */
if((LUSOL->luparm[LUSOL_IP_USEROWL0] == LUSOL_AUTOORDER) &&
- ((gnm_float) LUSOL->luparm[LUSOL_IP_ROWCOUNT_L0] /
+ ((gnm_float) LUSOL->luparm[LUSOL_IP_ROWCOUNT_L0] /
#if 0
LUSOL->luparm[LUSOL_IP_COLCOUNT_L0]
#else
@@ -6533,12 +6533,12 @@ static void LU6CHK(LUSOLrec *LUSOL, int MODE, int LENA2, int *INFORM)
Negate w(j) if the corresponding diagonal of U is
too small in absolute terms or relative to the other elements
in the same column of U.
-
+
23 Apr 2004: TRP ensures that diags are NOT small relative to
other elements in their own column.
Much better, we can compare all diags to DUmax.
-------------------------------------------------------------- */
- if((MODE == 1) && TRP)
+ if((MODE == 1) && TRP)
UTOL1 = MAX( UTOL1, UTOL2*DUMAX );
if(KEEPLU) {
@@ -6782,7 +6782,7 @@ static void LU6LT(LUSOLrec *LUSOL, int *INFORM, gnm_float V[], int NZidx[])
*INFORM = LUSOL_INFORM_LUSUCCESS;
L1 = (LUSOL->lena-LENL)+1;
L2 = LUSOL->lena-LENL0;
-
+
/* ***** This loop could be coded specially. */
#if (defined LUSOLFastSolve) && !(defined DoTraceL0)
for(L = L1, aptr = LUSOL->a+L1, iptr = LUSOL->indr+L1, jptr = LUSOL->indc+L1;
@@ -6811,7 +6811,7 @@ static void LU6LT(LUSOLrec *LUSOL, int *INFORM, gnm_float V[], int NZidx[])
#endif
/* Do row-based L0 version, if available */
- if((LUSOL->L0 != NULL) ||
+ if((LUSOL->L0 != NULL) ||
((LUSOL->luparm[LUSOL_IP_BTRANCOUNT] == 0) && LU1L0(LUSOL, &(LUSOL->L0), INFORM))) {
LU6L0T_v(LUSOL, LUSOL->L0, V, NZidx, INFORM);
}
@@ -8584,7 +8584,7 @@ static void LU1FUL(LUSOLrec *LUSOL, int LEND, int LU1, gboolean TPP,
MEMCLEAR((D+1), LEND);
#else
/* dload(LEND, ZERO, D, 1); */
- for(J = 1; J <= LEND; J++)
+ for(J = 1; J <= LEND; J++)
D[J] = ZERO;
#endif
@@ -9566,7 +9566,7 @@ x300:
/* Check if we need to allocate more memory, and allocate if necessary */
#if 0 /* Proposal by Michael A. Saunders (logic based on Markowitz' rule) */
L = NROWD*NCOLD;
-
+
/* Try to avoid future expansions by anticipating further updates - KE extension */
if(LUSOL->luparm[LUSOL_IP_UPDATELIMIT] > 0)
#if 1
@@ -9581,7 +9581,7 @@ x300:
L = MAX(L, NROWD*NCOLD);
#endif
- /* Do the memory expansion */
+ /* Do the memory expansion */
if((L > LFREE-LCOL) && LUSOL_expand_a(LUSOL, &L, &LFREE)) {
LL1 += L;
LU1 += L;
@@ -9592,7 +9592,7 @@ x300:
#ifdef ClassicHamaxR
HA += L;
HJ += L;
- HK += L;
+ HK += L;
AMAXR += L;
#endif
}
@@ -10335,7 +10335,7 @@ static void LU1FAC(LUSOLrec *LUSOL, int *INFORM)
if(LPRINT>=LUSOL_MSG_STATISTICS) {
DENSTY = (100*DELEM)/(DM*DN);
LUSOL_report(LUSOL, 0, "m:%6d %c n:%6d nzcount:%9d Amax:%g Density:%g\n",
- LUSOL->m, relationChar(LUSOL->m, LUSOL->n), LUSOL->n,
+ LUSOL->m, relationChar(LUSOL->m, LUSOL->n), LUSOL->n,
LUSOL->nelem, AMAX, DENSTY);
}
if(*INFORM!=LUSOL_INFORM_LUSUCCESS)
@@ -10379,7 +10379,7 @@ static void LU1FAC(LUSOLrec *LUSOL, int *INFORM)
LOCH = LENA2+1; /* Start of Ha, Hj, Hk in a, indc, indr */
LMAXR = 1; /* Dummy */
}
- LU1FAD(LUSOL,
+ LU1FAD(LUSOL,
LENA2,LENH,
LUSOL->a+LOCH-LUSOL_ARRAYOFFSET,
LUSOL->indc+LOCH-LUSOL_ARRAYOFFSET,
@@ -10596,7 +10596,7 @@ x990:
LUSOL->luparm[LUSOL_IP_INFORM] = *INFORM;
if(*INFORM == LUSOL_INFORM_NOMEMLEFT)
LUSOL_report(LUSOL, 0, "lu1fac error...\ninsufficient memory available\n");
-
+
/* ------------------------------------------------------------------
Print statistics for the LU factors.
------------------------------------------------------------------ */
@@ -10800,7 +10800,7 @@ static void LU7ELM(LUSOLrec *LUSOL, int JELM, gnm_float V[], int *LENL,
NFREE = LUSOL->lena-(*LENL)-(*LROW);
if(NFREE<MINFRE)
goto x970;
-
+
/* Pack the subdiagonals of v into L, and find the largest. */
x100:
VMAX = ZERO;
@@ -11436,7 +11436,7 @@ x10:
else if(V==NULL)
/* Otherwise, the V vector is taken to satisfy this already, or stored earlier. */
V=LUSOL->vLU6L;
-
+
/* Insert into U any nonzeros in the top of v.
row ip(klast) will contain the last nonzero in pivotal order.
@@ -11913,7 +11913,7 @@ static int symamd /* return (1) if OK, (0) otherwise */
floating point operations than A. Symamd constructs a matrix M such
that M'M has the same nonzero pattern of A, and then orders the columns
of M using colmmd. The column ordering of M is then returned as the
- row and column ordering P of A.
+ row and column ordering P of A.
Authors:
@@ -12001,7 +12001,7 @@ static int symamd /* return (1) if OK, (0) otherwise */
* TRUE and FALSE are predefined on some systems, so they are defined
here only if not already defined.
-
+
* web site changed
* UNIX Makefile modified, to handle the case if "." is not in your path.
@@ -12064,7 +12064,7 @@ static int symamd /* return (1) if OK, (0) otherwise */
Colamd: rows with more than (knobs [COLAMD_DENSE_ROW] * n_col)
entries are removed prior to ordering. Columns with more than
(knobs [COLAMD_DENSE_COL] * n_row) entries are removed prior to
- ordering, and placed last in the output column ordering.
+ ordering, and placed last in the output column ordering.
Symamd: uses only knobs [COLAMD_DENSE_ROW], which is knobs [0].
Rows and columns with more than (knobs [COLAMD_DENSE_ROW] * n)
@@ -12096,7 +12096,7 @@ static int symamd /* return (1) if OK, (0) otherwise */
(AQ)'AQ=LL' have less fill-in and require fewer floating point
operations than factorizing the unpermuted matrix A or A'A,
respectively.
-
+
Returns:
TRUE (1) if successful, FALSE (0) otherwise.
@@ -12126,8 +12126,8 @@ static int symamd /* return (1) if OK, (0) otherwise */
We do, however, guarantee that
Alen >= colamd_recommended (nnz, n_row, n_col)
-
- or equivalently as a C preprocessor macro:
+
+ or equivalently as a C preprocessor macro:
Alen >= COLAMD_RECOMMENDED (nnz, n_row, n_col)
@@ -12265,7 +12265,7 @@ static int symamd /* return (1) if OK, (0) otherwise */
Future versions may return more statistics in the stats array.
Example:
-
+
See http://www.cise.ufl.edu/research/sparse/colamd/example.c
for a complete example.
@@ -12324,12 +12324,12 @@ static int symamd /* return (1) if OK, (0) otherwise */
int A [nnz] ; Input argument.
A is an integer array of size nnz, where nnz = p [n].
-
+
The row indices of the entries in column c of the matrix are
held in A [(p [c]) ... (p [c+1]-1)]. The row indices in a
given column c need not be in ascending order, and duplicate
row indices may be present. However, symamd will run faster
- if the columns are in sorted order with no duplicate entries.
+ if the columns are in sorted order with no duplicate entries.
The matrix is 0-based. That is, rows are in the range 0 to
n-1, and columns are in the range 0 to n-1. Symamd
@@ -12371,7 +12371,7 @@ static int symamd /* return (1) if OK, (0) otherwise */
Symamd returns FALSE if stats is not present.
stats [0]: number of dense or empty row and columns ignored
- (and ordered last in the output permutation
+ (and ordered last in the output permutation
perm). Note that a row/column can become
"empty" if it contains only "dense" and/or
"empty" columns/rows.
@@ -12567,7 +12567,7 @@ static int symamd /* return (1) if OK, (0) otherwise */
#define ONES_COMPLEMENT(r) (-(r)-1)
/* -------------------------------------------------------------------------- */
-/* Change for version 2.1: define TRUE and FALSE only if not yet defined */
+/* Change for version 2.1: define TRUE and FALSE only if not yet defined */
/* -------------------------------------------------------------------------- */
#ifndef TRUE
@@ -12822,7 +12822,7 @@ static int colamd_recommended /* returns recommended value of Alen. */
int n_col /* number of columns in A */
)
{
- return (COLAMD_RECOMMENDED (nnz, n_row, n_col)) ;
+ return (COLAMD_RECOMMENDED (nnz, n_row, n_col)) ;
}
@@ -12903,7 +12903,7 @@ static int symamd /* return TRUE if OK, FALSE otherwise */
int nnz ; /* number of entries in A */
int i ; /* row index of A */
int j ; /* column index of A */
- int k ; /* row index of M */
+ int k ; /* row index of M */
int mnz ; /* number of nonzeros in M */
int pp ; /* index into a column of A */
int last_row ; /* last row seen in the current column */
@@ -13370,7 +13370,7 @@ static int colamd /* returns TRUE if successful, FALSE otherwise*/
stats [COLAMD_DENSE_ROW] = n_row - n_row2 ;
stats [COLAMD_DENSE_COL] = n_col - n_col2 ;
stats [COLAMD_DEFRAG_COUNT] = ngarbage ;
- DEBUG0 (("colamd: done.\n")) ;
+ DEBUG0 (("colamd: done.\n")) ;
return (TRUE) ;
}
@@ -13418,7 +13418,7 @@ static int init_rows_cols /* returns TRUE if OK, or FALSE otherwise */
Colamd_Col Col [], /* of size n_col+1 */
int A [], /* row indices of A, of size Alen */
int p [], /* pointers to columns in A, of size n_col+1 */
- int stats [COLAMD_STATS] /* colamd statistics */
+ int stats [COLAMD_STATS] /* colamd statistics */
)
{
/* === Local variables ================================================== */
@@ -15373,7 +15373,7 @@ static int mod(int n, int d)
}
-/* Return the greatest common divisor of a and b, or -1 if it is
+/* Return the greatest common divisor of a and b, or -1 if it is
not defined. Return through the pointer arguments the integers
such that mygcd(a,b) = c*a + b*d. */
static int mygcd(gint64 a, gint64 b, int *c, int *d)
@@ -15381,7 +15381,7 @@ static int mygcd(gint64 a, gint64 b, int *c, int *d)
gint64 q,r,t;
int cret,dret,C,D,rval, sgn_a = 1,sgn_b = 1, swap = 0;
- if((a == 0) || (b == 0))
+ if((a == 0) || (b == 0))
return( -1 );
/* Use local multiplier instances, if necessary */
@@ -15534,8 +15534,8 @@ static int compareREAL(const void *current, const void *candidate)
return( 0 );
}
-/* Heap sort function (procedurally based on the Numerical Recipes version,
- but expanded and generalized to hande any object with the use of
+/* Heap sort function (procedurally based on the Numerical Recipes version,
+ but expanded and generalized to hande any object with the use of
qsort-style comparison operator). An expanded version is also implemented,
where interchanges are reflected in a caller-initialized integer "tags" list. */
static void hpsort(void *attributes, int count, int offset, int recsize, gboolean descending, findCompare_func findCompare)
@@ -15554,7 +15554,7 @@ static void hpsort(void *attributes, int count, int offset, int recsize, gboolea
order = -1;
else
order = 1;
-
+
k = (count >> 1) + 1;
ir = count;
@@ -15590,7 +15590,7 @@ static void hpsort(void *attributes, int count, int offset, int recsize, gboolea
}
MEMCOPY(CMP_ATTRIBUTES(i), save, recsize);
}
-
+
FREE(save);
}
static void hpsortex(void *attributes, int count, int offset, int recsize, gboolean descending, findCompare_func findCompare, int *tags)
@@ -15606,7 +15606,7 @@ static void hpsortex(void *attributes, int count, int offset, int recsize, gbool
register char *hold, *base;
char *save;
int savetag;
-
+
offset -= 1;
attributes = CMP_ATTRIBUTES(offset);
tags += offset;
@@ -15616,7 +15616,7 @@ static void hpsortex(void *attributes, int count, int offset, int recsize, gbool
order = -1;
else
order = 1;
-
+
k = (count >> 1) + 1;
ir = count;
@@ -15658,17 +15658,17 @@ static void hpsortex(void *attributes, int count, int offset, int recsize, gbool
MEMCOPY(CMP_ATTRIBUTES(i), save, recsize);
tags[i] = savetag;
}
-
+
FREE(save);
}
}
-/* This is a "specialized generic" version of C.A.R Hoare's Quick Sort algorithm.
- It will handle arrays that are already sorted, and arrays with duplicate keys.
+/* This is a "specialized generic" version of C.A.R Hoare's Quick Sort algorithm.
+ It will handle arrays that are already sorted, and arrays with duplicate keys.
The implementation here requires the user to pass a comparison operator and
assumes that the array passed has the QSORTrec format, which i.a. includes
- the ability for to do linked list sorting. If the passed comparison operator
+ the ability for to do linked list sorting. If the passed comparison operator
is NULL, the comparison is assumed to be for integers. */
#define QS_IS_switch 4 /* Threshold for switching to insertion sort */
static int QS_addfirst(QSORTrec a[], void *mydata)
@@ -15722,10 +15722,10 @@ static int QS_sort(QSORTrec a[], int l, int r, findCompare_func findCompare)
/* Tri-Median Method */
if(findCompare((char *) &a[l], (char *) &a[i]) > 0)
- { nmove++; QS_swap(a,l,i); }
- if(findCompare((char *) &a[l], (char *) &a[r]) > 0)
+ { nmove++; QS_swap(a,l,i); }
+ if(findCompare((char *) &a[l], (char *) &a[r]) > 0)
{ nmove++; QS_swap(a,l,r); }
- if(findCompare((char *) &a[i], (char *) &a[r]) > 0)
+ if(findCompare((char *) &a[i], (char *) &a[r]) > 0)
{ nmove++; QS_swap(a,i,r); }
j = r-1;
@@ -15803,7 +15803,7 @@ Finish:
return( TRUE );
}
-
+
/* Simple specialized bubble/insertion sort functions */
static int sortByREAL(int *item, gnm_float *weight, int size, int offset, gboolean unique)
@@ -16102,10 +16102,10 @@ static gboolean load_BLAS(char *libname)
BLAS_dswap = (BLAS_dswap_func *) GetProcAddress(hBLAS, BLAS_prec "swap");
BLAS_ddot = (BLAS_ddot_func *) GetProcAddress(hBLAS, BLAS_prec "dot");
BLAS_idamax = (BLAS_idamax_func *) GetProcAddress(hBLAS, "i" BLAS_prec "amax");
-#if 0
+#if 0
BLAS_dload = (BLAS_dload_func *) GetProcAddress(hBLAS, BLAS_prec "load");
BLAS_dnormi = (BLAS_dnormi_func *) GetProcAddress(hBLAS, BLAS_prec "normi");
-#endif
+#endif
}
#else
/* First standardize UNIX .SO library name format. */
@@ -16135,10 +16135,10 @@ static gboolean load_BLAS(char *libname)
BLAS_dswap = (BLAS_dswap_func *) dlsym(hBLAS, BLAS_prec "swap");
BLAS_ddot = (BLAS_ddot_func *) dlsym(hBLAS, BLAS_prec "dot");
BLAS_idamax = (BLAS_idamax_func *) dlsym(hBLAS, "i" BLAS_prec "amax");
-#if 0
+#if 0
BLAS_dload = (BLAS_dload_func *) dlsym(hBLAS, BLAS_prec "load");
BLAS_dnormi = (BLAS_dnormi_func *) dlsym(hBLAS, BLAS_prec "normi");
-#endif
+#endif
}
#endif
#endif
@@ -16209,7 +16209,7 @@ static void my_daxpy( int *_n, gnm_float *_da, gnm_float *dx, int *_incx, gnm_fl
(*yptr) += rda*(*xptr);
return;
}
-#else
+#else
if (incx==1 && incy==1) goto x20;
@@ -16353,8 +16353,8 @@ static void my_dscal (int *_n, gnm_float *_da, gnm_float *dx, int *_incx)
if (n <= 0)
return;
- rda = da;
-
+ rda = da;
+
dx--;
/* Optionally do fast pointer arithmetic */
@@ -16506,7 +16506,7 @@ static void my_dswap( int *_n, gnm_float *dx, int *_incx, gnm_float *dy, int *_i
}
return;
}
-#else
+#else
if (incx == incy) {
if (incx <= 0) goto x5;
@@ -16670,7 +16670,7 @@ static int my_idamax( int *_n, gnm_float *x, int *_is )
imax = i;
}
}
-#endif
+#endif
return(imax);
}
@@ -16726,11 +16726,11 @@ int subvec( int item)
/*
- ----------------------------------------------------------------------------------
+ ----------------------------------------------------------------------------------
Crash management routines in lp_solve v5.0+
----------------------------------------------------------------------------------
Author: Kjell Eikland
- Contact: kjell eikland broadpark no
+ Contact: kjell eikland broadpark no
License terms: LGPL.
Requires: lp_lib.h, lp_utils.h, lp_matrix.h
@@ -16774,7 +16774,7 @@ gboolean crash_basis(lprec *lp)
gnm_float wx, tx, *rowMAX = NULL, *colMAX = NULL;
int *rowNZ = NULL, *colNZ = NULL, *rowWT = NULL, *colWT = NULL;
gnm_float *value;
- int *rownr, *colnr;
+ int *rownr, *colnr;
report(lp, NORMAL, "crash_basis: 'Most feasible' basis crashing selected\n");
@@ -16790,7 +16790,7 @@ gboolean crash_basis(lprec *lp)
rownr = &COL_MAT_ROWNR(0);
colnr = &COL_MAT_COLNR(0);
value = &COL_MAT_VALUE(0);
- for(i = 0; i < nz;
+ for(i = 0; i < nz;
i++, rownr += matRowColStep, colnr += matRowColStep, value += matValueStep) {
rx = *rownr;
cx = *colnr;
@@ -16812,7 +16812,7 @@ gboolean crash_basis(lprec *lp)
rownr = &COL_MAT_ROWNR(0);
colnr = &COL_MAT_COLNR(0);
value = &COL_MAT_VALUE(0);
- for(i = 0; i < nz;
+ for(i = 0; i < nz;
i++, rownr += matRowColStep, colnr += matRowColStep, value += matValueStep) {
rx = *rownr;
cx = *colnr;
@@ -16911,7 +16911,7 @@ gboolean crash_basis(lprec *lp)
wx = tx;
}
}
- if(cx == 0)
+ if(cx == 0)
break;
removeLink(colLL, cx);
@@ -16919,7 +16919,7 @@ gboolean crash_basis(lprec *lp)
ii = mat->col_end[cx-1];
rownr = &COL_MAT_ROWNR(ii);
value = &COL_MAT_VALUE(ii);
- for(; ii < mat->col_end[cx];
+ for(; ii < mat->col_end[cx];
ii++, rownr += matRowColStep, value += matValueStep) {
wx = fabs(*value);
ix = *rownr;
@@ -16953,7 +16953,7 @@ Finish:
LLrec *rowLL = NULL, *colLL = NULL;
int ii, rx, cx, ix, nz, *merit = NULL;
gnm_float *value, wx, hold, *rhs = NULL, *eta = NULL;
- int *rownr, *colnr;
+ int *rownr, *colnr;
report(lp, NORMAL, "crash_basis: 'Least degenerate' basis crashing selected\n");
@@ -16981,7 +16981,7 @@ Finish:
colnr = &COL_MAT_COLNR(0);
ii = 0;
MEMCLEAR(merit, lp->columns + 1);
- for(i = 0; i < nz;
+ for(i = 0; i < nz;
i++, rownr += matRowColStep, colnr += matRowColStep) {
rx = *rownr;
cx = *colnr;
@@ -17011,7 +17011,7 @@ Finish:
rx = 0;
wx = 0;
MEMCLEAR(eta, lp->rows + 1);
- for(; i < nz;
+ for(; i < nz;
i++, rownr += matRowColStep, value += matValueStep) {
ix = *rownr;
hold = *value;
@@ -17254,7 +17254,7 @@ STATIC int find_row(lprec *lp, char *name, gboolean Unconstrained_rows_found)
hp = findhash(name, lp->rowname_hashtab);
else
hp = NULL;
-
+
if (hp == NULL) {
if(Unconstrained_rows_found) { /* just ignore them in this case */
return(-1);
@@ -17274,7 +17274,7 @@ STATIC int find_var(lprec *lp, char *name, gboolean verbose)
hp = findhash(name, lp->colname_hashtab);
else
hp = NULL;
-
+
if (hp == NULL) {
if(verbose)
report(lp, SEVERE, "find_var: Unknown variable name '%s'\n", name);
@@ -29451,21 +29451,21 @@ STATIC void bsolve_xA2(lprec *lp, int* coltarget,
/*
Minimum matrix inverse fill-in modules - interface for lp_solve v5.0+
----------------------------------------------------------------------------------
- Author: Kjell Eikland
- Contact: kjell eikland broadpark no
+ Author: Kjell Eikland
+ Contact: kjell eikland broadpark no
License terms: LGPL.
-
+
Requires: string.h, colamd.h, lp_lib.h
Release notes:
- v1.0 1 September 2003 Preprocessing routines for minimum fill-in column
- ordering for inverse factorization using the open
+ v1.0 1 September 2003 Preprocessing routines for minimum fill-in column
+ ordering for inverse factorization using the open
source COLAMD library. Suitable for the dense parts
- of both the product form and LU factorization inverse
+ of both the product form and LU factorization inverse
methods.
- v1.1 1 July 2004 Renamed from lp_colamdMDO to lp_MDO.
+ v1.1 1 July 2004 Renamed from lp_colamdMDO to lp_MDO.
- ----------------------------------------------------------------------------------
+ ----------------------------------------------------------------------------------
*/
@@ -29482,7 +29482,7 @@ STATIC gboolean includeMDO(gboolean *usedpos, int item)
/* Handle case where we are processing all columns */
if(usedpos == NULL)
return( TRUE );
-
+
else {
/* Otherwise do the selective case */
gboolean test = usedpos[item];
@@ -29497,8 +29497,8 @@ STATIC gboolean includeMDO(gboolean *usedpos, int item)
STATIC int prepareMDO(lprec *lp, gboolean *usedpos, int *colorder, int *data, int *rowmap)
/* This routine prepares data structures for colamd(). It is called twice, the first
- time to count applicable non-zero elements by column, and the second time to fill in
- the row indexes of the non-zero values from the first call. Note that the colamd()
+ time to count applicable non-zero elements by column, and the second time to fill in
+ the row indexes of the non-zero values from the first call. Note that the colamd()
row index base is 0 (which suits lp_solve fine). */
{
int i, ii, j, k, kk;
@@ -29547,14 +29547,14 @@ STATIC int prepareMDO(lprec *lp, gboolean *usedpos, int *colorder, int *data, in
Bnz++;
}
/* Loop over all NZ-variables */
- for(; i < ii;
+ for(; i < ii;
i++, value += matValueStep, rownr += matRowColStep) {
if(!includeMDO(usedpos, *rownr))
continue;
/* See if we need to change phase 1 OF value */
if(*rownr == 0) {
hold = *value;
- if(!modifyOF1(lp, kk, &hold, 1.0))
+ if(!modifyOF1(lp, kk, &hold, 1.0))
continue;
}
/* Tally uneliminated constraint row values */
@@ -29590,14 +29590,14 @@ static int getMDO(lprec *lp, gboolean *usedpos, int *colorder, int *size, gboole
int stats[COLAMD_STATS];
double knobs[COLAMD_KNOBS];
- /* Tally the non-zero counts of the unused columns/rows of the
+ /* Tally the non-zero counts of the unused columns/rows of the
basis matrix and store corresponding "net" starting positions */
allocINT(lp, &col_end, ncols+1, FALSE);
n = prepareMDO(lp, usedpos, colorder, col_end, NULL);
Bnz = col_end[ncols];
- /* Check that we have unused basic columns, otherwise skip analysis */
- if(ncols == 0 || Bnz == 0)
+ /* Check that we have unused basic columns, otherwise skip analysis */
+ if(ncols == 0 || Bnz == 0)
goto Transfer;
/* Get net number of rows and fill mapper */
@@ -29606,7 +29606,7 @@ static int getMDO(lprec *lp, gboolean *usedpos, int *colorder, int *size, gboole
for(i = 0; i <= lp->rows; i++) {
row_map[i] = i-nrows;
/* Increment eliminated row counter if necessary */
- if(!includeMDO(usedpos, i))
+ if(!includeMDO(usedpos, i))
nrows++;
}
nrows = lp->rows+1 - nrows;
@@ -29623,7 +29623,7 @@ static int getMDO(lprec *lp, gboolean *usedpos, int *colorder, int *size, gboole
#if 1
colamd_set_defaults(knobs);
knobs [COLAMD_DENSE_ROW] = 0.2+0.2 ; /* default changed for UMFPACK */
- knobs [COLAMD_DENSE_COL] = knobs [COLAMD_DENSE_ROW];
+ knobs [COLAMD_DENSE_COL] = knobs [COLAMD_DENSE_ROW];
if(symmetric && (nrows == ncols)) {
MEMCOPY(colorder, Brows, ncols + 1);
error = !symamd(nrows, colorder, col_end, Brows, knobs, stats, mdo_calloc, mdo_free);
@@ -29641,7 +29641,7 @@ static int getMDO(lprec *lp, gboolean *usedpos, int *colorder, int *size, gboole
/* Transfer the estimated optimal ordering, adjusting for index offsets */
Transfer:
- if(error)
+ if(error)
error = stats[COLAMD_STATUS];
else {
MEMCOPY(Brows, colorder, ncols + 1);
@@ -41994,11 +41994,11 @@ STATIC int clean_SOSgroup(SOSgroup *group)
{
int i, n, k;
SOSrec *SOS;
-
+
if(group == NULL)
return( 0 );
-
- /* Delete any SOS without members or trivial member count */
+
+ /* Delete any SOS without members or trivial member count */
n = 0;
if(group->sos_alloc > 0) {
group->maxorder = 0;
@@ -42166,7 +42166,7 @@ static int SOS_usecount(SOSgroup *group, int varnr)
}
else
/* Return the SOS usage count for a particular variable */
- n = counts[varnr];
+ n = counts[varnr];
FREE(counts);
return( n );
@@ -42369,7 +42369,7 @@ STATIC gboolean SOS_shift_col(SOSgroup *group, int sosindex, int column, int del
changed = 0;
if(usedmap != NULL) {
int *newidx = NULL;
- /* Defer creation of index mapper until we are sure that a
+ /* Defer creation of index mapper until we are sure that a
member of this SOS is actually targeted for deletion */
if(newidx == NULL) {
allocINT(group->lp, &newidx, group->lp->columns+1, TRUE);
@@ -42614,7 +42614,7 @@ static gboolean SOS_is_member_of_type(SOSgroup *group, int column, int sostype)
if(group != NULL)
for(i = 1; i <= group->sos_count; i++) {
n = SOS_get_type(group, i);
- if(((n == sostype) ||
+ if(((n == sostype) ||
((sostype == SOSn) && (n > 2))) && SOS_is_member(group, i, column))
return(TRUE);
}
@@ -43019,7 +43019,7 @@ static gboolean SOS_unmark(SOSgroup *group, int sosindex, int column)
}
-static int SOS_fix_unmarked(SOSgroup *group, int sosindex, int variable, gnm_float *bound, gnm_float value, gboolean isupper,
+static int SOS_fix_unmarked(SOSgroup *group, int sosindex, int variable, gnm_float *bound, gnm_float value, gboolean isupper,
int *diffcount, DeltaVrec *changelog)
{
int i, ii, count, n, nn, nLeft, nRight, *list;
@@ -43091,7 +43091,7 @@ static int SOS_fix_unmarked(SOSgroup *group, int sosindex, int variable, gnm_flo
bound[ii] = value;
else
modifyUndoLadder(changelog, ii, bound, value);
-
+
}
if((diffcount != NULL) && (lp->solution[ii] != value))
(*diffcount)++;
@@ -43101,7 +43101,7 @@ static int SOS_fix_unmarked(SOSgroup *group, int sosindex, int variable, gnm_flo
return(count);
}
-static int *SOS_get_candidates(SOSgroup *group, int sosindex, int column, gboolean excludetarget,
+static int *SOS_get_candidates(SOSgroup *group, int sosindex, int column, gboolean excludetarget,
gnm_float *upbound, gnm_float *lobound)
{
int i, ii, j, n, nn = 0, *list, *candidates = NULL;
@@ -43117,7 +43117,7 @@ static int *SOS_get_candidates(SOSgroup *group, int sosindex, int column, gboole
}
#endif
- /* Determine SOS target(s); note that if "sosindex" is negative, only
+ /* Determine SOS target(s); note that if "sosindex" is negative, only
the first non-empty SOS where "column" is a member is processed */
if(sosindex <= 0) {
i = 0;
@@ -43172,7 +43172,7 @@ Finish:
}
-static int SOS_fix_list(SOSgroup *group, int sosindex, int variable, gnm_float *bound,
+static int SOS_fix_list(SOSgroup *group, int sosindex, int variable, gnm_float *bound,
int *varlist, gboolean isleft, DeltaVrec *changelog)
{
int i, ii, jj, count = 0;
diff --git a/src/tools/solver/reports-write.c b/src/tools/solver/reports-write.c
index cd9c002..42b625d 100644
--- a/src/tools/solver/reports-write.c
+++ b/src/tools/solver/reports-write.c
@@ -542,12 +542,12 @@ solver_performance_report (WorkbookControl *wbc,
dao_set_cell (&dao, 2, 7, _("Infeasible problem"));
break;
case SolverMaxIterExc:
- dao_set_cell (&dao, 2, 7,
+ dao_set_cell (&dao, 2, 7,
_("Maximum number of iterations "
"exceeded: optimization interrupted"));
break;
case SolverMaxTimeExc:
- dao_set_cell (&dao, 2, 7,
+ dao_set_cell (&dao, 2, 7,
_("Maximum time exceeded: optimization "
"interrupted"));
break;
@@ -582,7 +582,7 @@ solver_performance_report (WorkbookControl *wbc,
value_new_float (res->param->n_constraints));
/* Set the `Nbr of Int Constraints'. */
- dao_set_cell_value (&dao, 4, 13,
+ dao_set_cell_value (&dao, 4, 13,
value_new_float (res->param->n_int_constraints));
/* Set the `Nbr of Bool Constraints'. */
@@ -633,7 +633,7 @@ solver_performance_report (WorkbookControl *wbc,
res->param->n_variables);
value_set_fmt (v, go_format_default_percentage ());
dao_set_cell_value (&dao, 4, 20, v);
-
+
/*
* Fill in the labels of `Computing Time' section.
diff --git a/src/tools/solver/reports-write.h b/src/tools/solver/reports-write.h
index 0439ce4..6aa2831 100644
--- a/src/tools/solver/reports-write.h
+++ b/src/tools/solver/reports-write.h
@@ -5,7 +5,7 @@
* Jukka-Pekka Iivonen <jiivonen hutcs cs hut fi>
*
* (C) Copyright 2002 by Jukka-Pekka Iivonen <jiivonen hutcs cs hut fi>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
diff --git a/src/tools/solver/reports.c b/src/tools/solver/reports.c
index 4e11a50..a0320e3 100644
--- a/src/tools/solver/reports.c
+++ b/src/tools/solver/reports.c
@@ -169,7 +169,7 @@ calculate_limits (Sheet *sheet, SolverParameters *param, SolverResults *res)
get_target_cell_value (res, cell, n,
x, &y);
gnm_cell_eval (cell);
- res->limits[n].lower_result =
+ res->limits[n].lower_result =
value_get_as_float (cell->value);
}
if (x > res->limits[n].upper_limit) {
@@ -261,7 +261,7 @@ solver_prepare_reports_success (SolverProgram *program, SolverResults *res,
for (i = 0; i < param->n_variables; i++) {
res->limits[i].lower_limit = res->limits[i].upper_limit =
res->optimal_values[i];
- res->limits[i].lower_result =
+ res->limits[i].lower_result =
res->limits[i].upper_result =
value_get_as_float (cell->value);
}
diff --git a/src/tools/solver/solver.c b/src/tools/solver/solver.c
index 37882ee..6b68158 100644
--- a/src/tools/solver/solver.c
+++ b/src/tools/solver/solver.c
@@ -372,7 +372,7 @@ save_original_values (SolverResults *res,
const SolverParameters *param,
Sheet *sheet)
{
-
+
GSList *inputs = param->input_cells;
GnmCell *cell;
int i = 0;
@@ -548,7 +548,7 @@ lp_qp_solver_init (Sheet *sheet, const SolverParameters *param,
x = rx - lx;
alg->set_constr_fn (program, ind, c->type, x);
- res->rhs[i] = x;
+ res->rhs[i] = x;
ind++;
/* Check that max time has not elapsed. */
@@ -559,7 +559,7 @@ lp_qp_solver_init (Sheet *sheet, const SolverParameters *param,
solver_results_free (res);
return NULL;
}
-
+
}
/* Set up the problem type. */
@@ -649,7 +649,7 @@ check_program_definition_failures (Sheet *sheet,
"input range.");
return TRUE;
}
-
+
param->n_variables += 1;
}
input_cells_array = g_new (GnmCell *, param->n_variables);
@@ -746,7 +746,7 @@ solver_run (WorkbookControl *wbc, Sheet *sheet,
start.tv_usec / (gnm_float) G_USEC_PER_SEC);
save_original_values (res, param, sheet);
- program = lp_qp_solver_init (sheet, param, res, alg,
+ program = lp_qp_solver_init (sheet, param, res, alg,
-res->time_real, start,
errmsg);
if (program == NULL)
diff --git a/src/tools/tabulate.c b/src/tools/tabulate.c
index 8c70965..f639cb9 100644
--- a/src/tools/tabulate.c
+++ b/src/tools/tabulate.c
@@ -133,7 +133,7 @@ do_tabulation (WorkbookControl *wbc,
gnm_sheet_get_max_rows (old_sheet));
g_free (unique_name);
workbook_sheet_attach (wb, sheet);
- sheet_idx = g_slist_prepend (sheet_idx,
+ sheet_idx = g_slist_prepend (sheet_idx,
GINT_TO_POINTER (sheet->index_in_wb));
val += data->steps[dim];
@@ -148,7 +148,7 @@ do_tabulation (WorkbookControl *wbc,
gnm_sheet_get_max_rows (old_sheet));
g_free (unique_name);
workbook_sheet_attach (wb, sheet);
- sheet_idx = g_slist_prepend (sheet_idx,
+ sheet_idx = g_slist_prepend (sheet_idx,
GINT_TO_POINTER (sheet->index_in_wb));
}
@@ -197,7 +197,7 @@ do_tabulation (WorkbookControl *wbc,
range.start.col = 0;
range.start.row = 0;
- range.end.col = (data->dims >= 2 ?
+ range.end.col = (data->dims >= 2 ?
counts[1] : 1);
range.end.row = 0;
diff --git a/src/tools/tabulate.h b/src/tools/tabulate.h
index c8317de..b6238cc 100644
--- a/src/tools/tabulate.h
+++ b/src/tools/tabulate.h
@@ -13,7 +13,7 @@ typedef struct {
gnm_float *minima;
gnm_float *maxima;
gnm_float *steps;
- gboolean with_coordinates;
+ gboolean with_coordinates;
} GnmTabulateInfo;
GSList *
diff --git a/src/tools/tools.h b/src/tools/tools.h
index 66749bf..e552544 100644
--- a/src/tools/tools.h
+++ b/src/tools/tools.h
@@ -30,7 +30,7 @@ typedef enum {
TOOL_ENGINE_CLEAN_UP
} analysis_tool_engine_t;
-typedef gboolean (* analysis_tool_engine) (data_analysis_output_t *dao, gpointer specs,
+typedef gboolean (* analysis_tool_engine) (data_analysis_output_t *dao, gpointer specs,
analysis_tool_engine_t selector, gpointer result);
diff --git a/src/wbc-gtk-actions.c b/src/wbc-gtk-actions.c
index 8a04865..8bd1d24 100644
--- a/src/wbc-gtk-actions.c
+++ b/src/wbc-gtk-actions.c
@@ -265,7 +265,7 @@ static GNM_ACTION_DEF (cb_file_print_area_show)
GnmRange *r = sheet_get_nominal_printarea (sheet);
if (r != NULL) {
- SheetView *sv = sheet_get_view (sheet,
+ SheetView *sv = sheet_get_view (sheet,
wb_control_view (WORKBOOK_CONTROL (wbcg)));
wb_control_sheet_focus (WORKBOOK_CONTROL (wbcg), sheet);
sv_selection_reset (sv);
@@ -1007,8 +1007,8 @@ static GNM_ACTION_DEF (cb_help_docs)
#ifndef G_OS_WIN32
argv[0] = (char *)"yelp";
argv[1] = (char *)"ghelp:gnumeric";
- g_spawn_async (NULL, argv, NULL,
- G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL
+ g_spawn_async (NULL, argv, NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL
| G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL, NULL, &err);
#else
@@ -1017,16 +1017,16 @@ static GNM_ACTION_DEF (cb_help_docs)
argv[0] = (char *)"hh";
argv[1] = g_build_filename (gnm_sys_data_dir (), "doc", "C",
"gnumeric.chm", NULL);
- g_spawn_async (NULL, argv, NULL,
- G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL
+ g_spawn_async (NULL, argv, NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL
| G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL, NULL, &err);
g_free (argv[1]);
#endif
if (NULL != err) {
- GOErrorInfo *ei = go_error_info_new_printf
+ GOErrorInfo *ei = go_error_info_new_printf
(_("Unable to start the help browser (%s).\n"
- "The system error message is: \n\n%s"),
+ "The system error message is: \n\n%s"),
argv[0], err->message);
go_cmd_context_error_info (GO_CMD_CONTEXT (wbcg), ei);
g_error_free (err);
@@ -2106,7 +2106,7 @@ static GtkActionEntry const actions[] = {
{ "ToolsHistogram", NULL, N_("_Histogram..."),
NULL, N_("Various frequency tables for numeric data"),
G_CALLBACK (cb_tools_histogram) },
-
+
/* Tools -> Two Means */
{ "ToolTTestPaired", NULL, N_("_Paired Samples: T-Test..."),
NULL, N_("Comparing two population means for two paired samples: t-test..."),
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 6829631..c8d0a69 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -350,7 +350,7 @@ wbcg_update_action_sensitivity (WorkbookControl *wbc)
gtk_widget_set_sensitive (wbcg->func_button, enable_actions);
if (wbcg->snotebook) {
- int i, N = wbcg_get_n_scg (wbcg);
+ int i, N = wbcg_get_n_scg (wbcg);
for (i = 0; i < N; i++) {
GtkWidget *label =
gnm_notebook_get_nth_label (wbcg->bnotebook, i);
@@ -459,7 +459,7 @@ static void cb_sheets_add (SheetControlGUI *scg) { wbcg_append_sheet (NULL, s
static void cb_sheets_clone (SheetControlGUI *scg) { wbcg_clone_sheet (NULL, scg->wbcg); }
static void cb_sheets_rename (SheetControlGUI *scg) { editable_label_start_editing (EDITABLE_LABEL(scg->label)); }
static void cb_sheets_resize (SheetControlGUI *scg) { dialog_sheet_resize (scg->wbcg); }
-
+
static gint
cb_by_scg_sheet_name (gconstpointer a_, gconstpointer b_)
@@ -966,7 +966,7 @@ cb_paned_size_allocate (GtkHPaned *hpaned,
/*
* We don't have room so make the notebook scrollable.
* We will then not set the size again.
- */
+ */
g_object_set (G_OBJECT (child1), "scrollable", TRUE, NULL);
}
@@ -1296,8 +1296,8 @@ wbcg_sheet_focus (WorkbookControl *wbc, Sheet *sheet)
if (sheet) {
wbcg_update_menu_feedback (wbcg, sheet);
-
- if (scg)
+
+ if (scg)
wbcg_set_direction (scg);
#if 0
@@ -3767,7 +3767,7 @@ cb_wbcg_window_state_event (GtkWidget *widget,
wbcg->undo_for_fullscreen =
go_undo_combine (wbcg->undo_for_fullscreen, u);
gtk_toggle_action_set_active (ta, FALSE);
- }
+ }
} else {
if (wbcg->undo_for_fullscreen) {
go_undo_undo (wbcg->undo_for_fullscreen);
@@ -4564,7 +4564,7 @@ wbc_gtk_finalize (GObject *obj)
g_slist_free (wbcg->hide_for_fullscreen);
wbcg->hide_for_fullscreen = NULL;
-
+
#ifdef GNM_USE_HILDON
UNREF_OBJ (hildon_prog);
@@ -5219,7 +5219,7 @@ wbcg_get_nth_scg (WBCGtk *wbcg, int i)
NULL != (scg = get_scg (w)) &&
NULL != scg->table &&
NULL != scg_sheet (scg) &&
- NULL != scg_view (scg))
+ NULL != scg_view (scg))
return scg;
return NULL;
diff --git a/src/widgets/gnm-notebook.c b/src/widgets/gnm-notebook.c
index 1155aea..6f0112f 100644
--- a/src/widgets/gnm-notebook.c
+++ b/src/widgets/gnm-notebook.c
@@ -391,7 +391,7 @@ ggg__OBJECT__OBJECT_INT_INT (GClosure *closure,
* Modified by the GTK+ Team and others 1997-2000. 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/.
*/
#ifndef __GGG_NOTEBOOK_H__
@@ -423,20 +423,20 @@ typedef struct _GggNotebookPage GggNotebookPage;
struct _GggNotebook
{
GtkContainer container;
-
+
GggNotebookPage *cur_page;
GList *children;
GList *first_tab; /* The first tab visible (for scrolling notebooks) */
GList *focus_tab;
-
+
GtkWidget *menu;
GdkWindow *event_window;
-
+
guint32 timer;
-
+
guint16 tab_hborder;
guint16 tab_vborder;
-
+
guint show_tabs : 1;
guint homogeneous : 1;
guint show_border : 1;
@@ -459,7 +459,7 @@ struct _GggNotebook
struct _GggNotebookClass
{
GtkContainerClass parent_class;
-
+
void (* switch_page) (GggNotebook *notebook,
GggNotebookPage *page,
guint page_num);
@@ -685,7 +685,7 @@ G_END_DECLS
* Modified by the GTK+ Team and others 1997-2000. 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 <gnumeric-config.h>
@@ -853,7 +853,7 @@ static const GtkTargetEntry notebook_targets [] = {
#define CHECK_FIND_CHILD(notebook, child) \
ggg_notebook_find_child (notebook, child, NULL)
#endif
-
+
/*** GggNotebook Methods ***/
static gboolean ggg_notebook_select_page (GggNotebook *notebook,
gboolean move_focus);
@@ -1113,7 +1113,7 @@ add_arrow_bindings (GtkBindingSet *binding_set,
GtkDirectionType direction)
{
guint keypad_keysym = keysym - GDK_Left + GDK_KP_Left;
-
+
gtk_binding_entry_add_signal (binding_set, keysym, GDK_CONTROL_MASK,
"move_focus_out", 1,
GTK_TYPE_DIRECTION_TYPE, direction);
@@ -1164,7 +1164,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (class);
GtkBindingSet *binding_set;
-
+
gobject_class->set_property = ggg_notebook_set_property;
gobject_class->get_property = ggg_notebook_get_property;
object_class->destroy = ggg_notebook_destroy;
@@ -1213,7 +1213,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
class->move_focus_out = ggg_notebook_move_focus_out;
class->reorder_tab = ggg_notebook_reorder_tab;
class->create_window = ggg_notebook_create_window;
-
+
g_object_class_install_property (gobject_class,
PROP_PAGE,
g_param_spec_int ("page",
@@ -1305,11 +1305,11 @@ ggg_notebook_class_init (GggNotebookClass *class)
/**
* GggNotebook:group:
- *
+ *
* Group for tabs drag and drop.
*
* Since: 2.12
- */
+ */
g_object_class_install_property (gobject_class,
PROP_GROUP,
g_param_spec_pointer ("group",
@@ -1319,42 +1319,42 @@ ggg_notebook_class_init (GggNotebookClass *class)
gtk_container_class_install_child_property (container_class,
CHILD_PROP_TAB_LABEL,
- g_param_spec_string ("tab-label",
+ g_param_spec_string ("tab-label",
_("Tab label"),
_("The string displayed on the child's tab label"),
NULL,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_MENU_LABEL,
- g_param_spec_string ("menu-label",
- _("Menu label"),
+ g_param_spec_string ("menu-label",
+ _("Menu label"),
_("The string displayed in the child's menu entry"),
NULL,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_POSITION,
- g_param_spec_int ("position",
- _("Position"),
+ g_param_spec_int ("position",
+ _("Position"),
_("The index of the child in the parent"),
-1, G_MAXINT, 0,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_TAB_EXPAND,
- g_param_spec_boolean ("tab-expand",
- _("Tab expand"),
+ g_param_spec_boolean ("tab-expand",
+ _("Tab expand"),
_("Whether to expand the child's tab or not"),
FALSE,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_TAB_FILL,
- g_param_spec_boolean ("tab-fill",
- _("Tab fill"),
+ g_param_spec_boolean ("tab-fill",
+ _("Tab fill"),
_("Whether the child's tab should fill the allocated area or not"),
TRUE,
G_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_TAB_PACK,
- g_param_spec_enum ("tab-pack",
+ g_param_spec_enum ("tab-pack",
_("Tab pack type"),
_("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
GTK_TYPE_PACK_TYPE, GTK_PACK_START,
@@ -1377,12 +1377,12 @@ ggg_notebook_class_init (GggNotebookClass *class)
/**
* GggNotebook:has-secondary-backward-stepper:
*
- * The "has-secondary-backward-stepper" property determines whether
- * a second backward arrow button is displayed on the opposite end
+ * The "has-secondary-backward-stepper" property determines whether
+ * a second backward arrow button is displayed on the opposite end
* of the tab area.
*
* Since: 2.4
- */
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("has-secondary-backward-stepper",
_("Secondary backward stepper"),
@@ -1393,12 +1393,12 @@ ggg_notebook_class_init (GggNotebookClass *class)
/**
* GggNotebook:has-secondary-forward-stepper:
*
- * The "has-secondary-forward-stepper" property determines whether
- * a second forward arrow button is displayed on the opposite end
+ * The "has-secondary-forward-stepper" property determines whether
+ * a second forward arrow button is displayed on the opposite end
* of the tab area.
*
* Since: 2.4
- */
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("has-secondary-forward-stepper",
_("Secondary forward stepper"),
@@ -1409,11 +1409,11 @@ ggg_notebook_class_init (GggNotebookClass *class)
/**
* GggNotebook:has-backward-stepper:
*
- * The "has-backward-stepper" property determines whether
+ * The "has-backward-stepper" property determines whether
* the standard backward arrow button is displayed.
*
* Since: 2.4
- */
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("has-backward-stepper",
_("Backward stepper"),
@@ -1424,18 +1424,18 @@ ggg_notebook_class_init (GggNotebookClass *class)
/**
* GggNotebook:has-forward-stepper:
*
- * The "has-forward-stepper" property determines whether
+ * The "has-forward-stepper" property determines whether
* the standard forward arrow button is displayed.
*
* Since: 2.4
- */
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("has-forward-stepper",
_("Forward stepper"),
_("Display the standard forward arrow button"),
TRUE,
G_PARAM_READABLE));
-
+
/**
* GggNotebook:tab-overlap:
*
@@ -1443,7 +1443,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
* area.
*
* Since: 2.10
- */
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("tab-overlap",
_("Tab overlap"),
@@ -1459,7 +1459,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
* The "tab-curvature" property defines size of tab curvature.
*
* Since: 2.10
- */
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("tab-curvature",
_("Tab curvature"),
@@ -1496,7 +1496,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
G_TYPE_NONE, 2,
G_TYPE_POINTER,
G_TYPE_UINT);
- notebook_signals[FOCUS_TAB] =
+ notebook_signals[FOCUS_TAB] =
g_signal_new (I_("focus_tab"),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -1505,7 +1505,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
ggg__BOOLEAN__ENUM,
G_TYPE_BOOLEAN, 1,
GTK_TYPE_NOTEBOOK_TAB);
- notebook_signals[SELECT_PAGE] =
+ notebook_signals[SELECT_PAGE] =
g_signal_new (I_("select_page"),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -1514,7 +1514,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
ggg__BOOLEAN__BOOLEAN,
G_TYPE_BOOLEAN, 1,
G_TYPE_BOOLEAN);
- notebook_signals[CHANGE_CURRENT_PAGE] =
+ notebook_signals[CHANGE_CURRENT_PAGE] =
g_signal_new (I_("change_current_page"),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
@@ -1611,12 +1611,12 @@ ggg_notebook_class_init (GggNotebookClass *class)
* @y: the Y coordinate where the drop happens
*
* The ::create-window signal is emitted when a detachable
- * tab is dropped on the root window.
+ * tab is dropped on the root window.
*
- * A handler for this signal can create a window containing
- * a notebook where the tab will be attached. It is also
- * responsible for moving/resizing the window and adding the
- * necessary properties to the notebook (e.g. the
+ * A handler for this signal can create a window containing
+ * a notebook where the tab will be attached. It is also
+ * responsible for moving/resizing the window and adding the
+ * necessary properties to the notebook (e.g. the
* #GggNotebook:group-id ).
*
* The default handler uses the global window creation hook,
@@ -1626,7 +1626,7 @@ ggg_notebook_class_init (GggNotebookClass *class)
*
* Since: 2.12
*/
- notebook_signals[CREATE_WINDOW] =
+ notebook_signals[CREATE_WINDOW] =
g_signal_new (I_("create_window"),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
@@ -1635,32 +1635,32 @@ ggg_notebook_class_init (GggNotebookClass *class)
ggg__OBJECT__OBJECT_INT_INT,
GGG_TYPE_NOTEBOOK, 3,
GTK_TYPE_WIDGET, G_TYPE_INT, G_TYPE_INT);
-
+
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set,
GDK_space, 0,
- "select_page", 1,
+ "select_page", 1,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Space, 0,
- "select_page", 1,
+ "select_page", 1,
G_TYPE_BOOLEAN, FALSE);
-
+
gtk_binding_entry_add_signal (binding_set,
GDK_Home, 0,
- "focus_tab", 1,
+ "focus_tab", 1,
GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_FIRST);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Home, 0,
- "focus_tab", 1,
+ "focus_tab", 1,
GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_FIRST);
gtk_binding_entry_add_signal (binding_set,
GDK_End, 0,
- "focus_tab", 1,
+ "focus_tab", 1,
GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_LAST);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_End, 0,
- "focus_tab", 1,
+ "focus_tab", 1,
GTK_TYPE_NOTEBOOK_TAB, GGG_NOTEBOOK_TAB_LAST);
gtk_binding_entry_add_signal (binding_set,
@@ -1908,7 +1908,7 @@ get_effective_tab_pos (GggNotebook *notebook)
{
if (gtk_widget_get_direction (GTK_WIDGET (notebook)) == GTK_TEXT_DIR_RTL)
{
- switch (notebook->tab_pos)
+ switch (notebook->tab_pos)
{
case GTK_POS_LEFT:
return GTK_POS_RIGHT;
@@ -1926,7 +1926,7 @@ get_tab_gap_pos (GggNotebook *notebook)
{
gint tab_pos = get_effective_tab_pos (notebook);
gint gap_side = GTK_POS_BOTTOM;
-
+
switch (tab_pos)
{
case GTK_POS_TOP:
@@ -1952,7 +1952,7 @@ ggg_notebook_move_focus_out (GggNotebook *notebook,
{
GtkDirectionType effective_direction = get_effective_direction (notebook, direction_type);
GtkWidget *toplevel;
-
+
if (GTK_CONTAINER (notebook)->focus_child && effective_direction == GTK_DIR_UP)
if (focus_tabs_in (notebook))
return;
@@ -1968,11 +1968,11 @@ ggg_notebook_move_focus_out (GggNotebook *notebook,
return;
g_object_ref (notebook);
-
+
notebook->focus_out = TRUE;
g_signal_emit_by_name (toplevel, "move_focus", direction_type);
notebook->focus_out = FALSE;
-
+
g_object_unref (notebook);
}
@@ -2048,7 +2048,7 @@ ggg_notebook_reorder_tab (GggNotebook *notebook,
do
{
last = child;
- child = ggg_notebook_search_page (notebook, last,
+ child = ggg_notebook_search_page (notebook, last,
(effective_direction == GTK_DIR_RIGHT) ? STEP_NEXT : STEP_PREV,
TRUE);
}
@@ -2089,7 +2089,7 @@ ggg_notebook_reorder_tab (GggNotebook *notebook,
/**
* ggg_notebook_new:
- *
+ *
* Creates a new #GggNotebook widget with no pages.
* Return value: the newly created #GggNotebook
@@ -2101,7 +2101,7 @@ ggg_notebook_new (void)
}
/* Private GtkObject Methods :
- *
+ *
* ggg_notebook_destroy
* ggg_notebook_set_arg
* ggg_notebook_get_arg
@@ -2159,7 +2159,7 @@ ggg_notebook_set_property (GObject *object,
break;
case PROP_HOMOGENEOUS:
ggg_notebook_set_homogeneous_tabs_internal (notebook, g_value_get_boolean (value));
- break;
+ break;
case PROP_PAGE:
ggg_notebook_set_current_page (notebook, g_value_get_int (value));
break;
@@ -2240,7 +2240,7 @@ ggg_notebook_get_property (GObject *object,
}
/* Private GtkWidget Methods :
- *
+ *
* ggg_notebook_map
* ggg_notebook_unmap
* ggg_notebook_realize
@@ -2291,7 +2291,7 @@ ggg_notebook_get_event_window_position (GggNotebook *notebook,
{
rectangle->x = widget->allocation.x + border_width;
rectangle->y = widget->allocation.y + border_width;
-
+
switch (tab_pos)
{
case GTK_POS_TOP:
@@ -2336,7 +2336,7 @@ ggg_notebook_map (GtkWidget *widget)
notebook = GGG_NOTEBOOK (widget);
- if (notebook->cur_page &&
+ if (notebook->cur_page &&
GTK_WIDGET_VISIBLE (notebook->cur_page->child) &&
!GTK_WIDGET_MAPPED (notebook->cur_page->child))
gtk_widget_map (notebook->cur_page->child);
@@ -2367,7 +2367,7 @@ static void
ggg_notebook_unmap (GtkWidget *widget)
{
stop_scrolling (GGG_NOTEBOOK (widget));
-
+
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gdk_window_hide (GGG_NOTEBOOK (widget)->event_window);
@@ -2387,10 +2387,10 @@ ggg_notebook_realize (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (notebook, GTK_REALIZED);
ggg_notebook_get_event_window_position (notebook, &event_window_pos);
-
+
widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window);
-
+
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = event_window_pos.x;
attributes.y = event_window_pos.y;
@@ -2404,7 +2404,7 @@ ggg_notebook_realize (GtkWidget *widget)
GDK_SCROLL_MASK);
attributes_mask = GDK_WA_X | GDK_WA_Y;
- notebook->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
+ notebook->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (notebook->event_window, notebook);
@@ -2473,7 +2473,7 @@ ggg_notebook_size_request (GtkWidget *widget,
{
vis_pages++;
gtk_widget_size_request (page->child, &child_requisition);
-
+
widget->requisition.width = MAX (widget->requisition.width,
child_requisition.width);
widget->requisition.height = MAX (widget->requisition.height,
@@ -2504,12 +2504,12 @@ ggg_notebook_size_request (GtkWidget *widget,
gint tab_height = 0;
gint tab_max = 0;
gint padding;
-
+
for (children = notebook->children; children;
children = children->next)
{
page = children->data;
-
+
if (GTK_WIDGET_VISIBLE (page->child))
{
if (!GTK_WIDGET_VISIBLE (page->tab_label))
@@ -2518,13 +2518,13 @@ ggg_notebook_size_request (GtkWidget *widget,
gtk_widget_size_request (page->tab_label,
&child_requisition);
- page->requisition.width =
+ page->requisition.width =
child_requisition.width +
2 * widget->style->xthickness;
- page->requisition.height =
+ page->requisition.height =
child_requisition.height +
2 * widget->style->ythickness;
-
+
switch (notebook->tab_pos)
{
case GTK_POS_TOP:
@@ -2558,7 +2558,7 @@ ggg_notebook_size_request (GtkWidget *widget,
if (tab_height == 0)
break;
- if (notebook->scrollable && vis_pages > 1 &&
+ if (notebook->scrollable && vis_pages > 1 &&
widget->requisition.width < tab_width)
tab_height = MAX (tab_height, scroll_arrow_hlength);
@@ -2569,7 +2569,7 @@ ggg_notebook_size_request (GtkWidget *widget,
{
page = children->data;
children = children->next;
-
+
if (!GTK_WIDGET_VISIBLE (page->child))
continue;
@@ -2601,7 +2601,7 @@ ggg_notebook_size_request (GtkWidget *widget,
if (tab_width == 0)
break;
- if (notebook->scrollable && vis_pages > 1 &&
+ if (notebook->scrollable && vis_pages > 1 &&
widget->requisition.height < tab_height)
tab_width = MAX (tab_width,
arrow_spacing + 2 * scroll_arrow_vlength);
@@ -2628,7 +2628,7 @@ ggg_notebook_size_request (GtkWidget *widget,
tab_height += page->requisition.height;
}
- if (notebook->scrollable && vis_pages > 1 &&
+ if (notebook->scrollable && vis_pages > 1 &&
widget->requisition.height < tab_height)
tab_height = tab_max + (2 * scroll_arrow_vlength + arrow_spacing);
@@ -2658,7 +2658,7 @@ ggg_notebook_size_request (GtkWidget *widget,
children = children->next)
{
page = children->data;
-
+
if (page->tab_label && GTK_WIDGET_VISIBLE (page->tab_label))
gtk_widget_hide (page->tab_label);
}
@@ -2730,7 +2730,7 @@ ggg_notebook_size_allocate (GtkWidget *widget,
GggNotebookPage *page;
GtkAllocation child_allocation;
GList *children;
-
+
child_allocation.x = widget->allocation.x + border_width;
child_allocation.y = widget->allocation.y + border_width;
child_allocation.width = MAX (1, allocation->width - border_width * 2);
@@ -2772,7 +2772,7 @@ ggg_notebook_size_allocate (GtkWidget *widget,
{
page = children->data;
children = children->next;
-
+
if (GTK_WIDGET_VISIBLE (page->child))
gtk_widget_size_allocate (page->child, &child_allocation);
}
@@ -2841,7 +2841,7 @@ ggg_notebook_show_arrows (GggNotebook *notebook)
{
gboolean show_arrow = FALSE;
GList *children;
-
+
if (!notebook->scrollable)
return FALSE;
@@ -2886,11 +2886,11 @@ ggg_notebook_get_arrow_rect (GggNotebook *notebook,
rectangle->height = scroll_arrow_vlength;
if ((before && (notebook->has_before_previous != notebook->has_before_next)) ||
- (!before && (notebook->has_after_previous != notebook->has_after_next)))
+ (!before && (notebook->has_after_previous != notebook->has_after_next)))
rectangle->x = event_window_pos.x + (event_window_pos.width - rectangle->width) / 2;
else if (left)
rectangle->x = event_window_pos.x + event_window_pos.width / 2 - rectangle->width;
- else
+ else
rectangle->x = event_window_pos.x + event_window_pos.width / 2;
rectangle->y = event_window_pos.y;
if (!before)
@@ -2941,13 +2941,13 @@ ggg_notebook_get_arrow (GggNotebook *notebook,
if (ggg_notebook_show_arrows (notebook))
{
ggg_notebook_get_event_window_position (notebook, &event_window_pos);
- for (i = 0; i < 4; i++)
- {
+ for (i = 0; i < 4; i++)
+ {
if (arrow[i] == ARROW_NONE)
continue;
-
+
ggg_notebook_get_arrow_rect (notebook, &arrow_rect, arrow[i]);
-
+
x0 = x - arrow_rect.x;
y0 = y - arrow_rect.y;
@@ -2969,7 +2969,7 @@ ggg_notebook_do_arrow (GggNotebook *notebook,
gboolean is_rtl, left;
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
- left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
+ left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
(!ARROW_IS_LEFT (arrow) && is_rtl);
if (!notebook->focus_tab ||
@@ -2995,12 +2995,12 @@ ggg_notebook_arrow_button_press (GggNotebook *notebook,
{
GtkWidget *widget = GTK_WIDGET (notebook);
gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
- gboolean left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
+ gboolean left = (ARROW_IS_LEFT (arrow) && !is_rtl) ||
(!ARROW_IS_LEFT (arrow) && is_rtl);
if (!GTK_WIDGET_HAS_FOCUS (widget))
gtk_widget_grab_focus (widget);
-
+
notebook->button = button;
notebook->click_child = arrow;
@@ -3074,7 +3074,7 @@ ggg_notebook_scroll (GtkWidget *widget,
/* ignore scroll events from the content of the page */
if (!originator || gtk_widget_is_ancestor (originator, child) || originator == child)
return FALSE;
-
+
switch (event->direction)
{
case GDK_SCROLL_RIGHT:
@@ -3099,7 +3099,7 @@ get_tab_at_pos (GggNotebook *notebook, gint x, gint y)
while (children)
{
page = children->data;
-
+
if (GTK_WIDGET_VISIBLE (page->child) &&
page->tab_label && GTK_WIDGET_MAPPED (page->tab_label) &&
(x >= page->allocation.x) &&
@@ -3138,7 +3138,7 @@ ggg_notebook_button_press (GtkWidget *widget,
if (event->button == 3 && notebook->menu)
{
- gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
+ gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
NULL, NULL, 3, event->time);
return TRUE;
}
@@ -3227,7 +3227,7 @@ ggg_notebook_popup_menu (GtkWidget *widget)
if (notebook->menu)
{
- gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
+ gtk_menu_popup (GTK_MENU (notebook->menu), NULL, NULL,
popup_position_func, notebook,
0, gtk_get_current_event_time ());
gtk_menu_shell_select_first (GTK_MENU_SHELL (notebook->menu), FALSE);
@@ -3237,7 +3237,7 @@ ggg_notebook_popup_menu (GtkWidget *widget)
return FALSE;
}
-static void
+static void
stop_scrolling (GggNotebook *notebook)
{
if (notebook->timer)
@@ -3422,14 +3422,14 @@ ggg_notebook_stop_reorder (GggNotebook *notebook)
old_page_num = g_list_position (notebook->children, notebook->focus_tab);
page_num = reorder_tab (notebook, element, notebook->focus_tab);
ggg_notebook_child_reordered (notebook, page);
-
+
if (priv->has_scrolled || old_page_num != page_num)
g_signal_emit (notebook,
notebook_signals[PAGE_REORDERED], 0,
page->child, page_num);
priv->has_scrolled = FALSE;
- priv->during_reorder = FALSE;
+ priv->during_reorder = FALSE;
}
hide_drag_window (notebook, priv, page);
@@ -3574,7 +3574,7 @@ check_threshold (GggNotebook *notebook,
gint dnd_threshold;
GdkRectangle rectangle = { 0, }; /* shut up gcc */
GtkSettings *settings;
-
+
widget = GTK_WIDGET (notebook);
settings = gtk_widget_get_settings (GTK_WIDGET (notebook));
g_object_get (G_OBJECT (settings), "gtk-dnd-drag-threshold", &dnd_threshold, NULL);
@@ -3669,7 +3669,7 @@ ggg_notebook_motion_notify (GtkWidget *widget,
g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
priv->dnd_timer = gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
- scroll_notebook_timer,
+ scroll_notebook_timer,
(gpointer) notebook);
}
}
@@ -3721,7 +3721,7 @@ static void
ggg_notebook_state_changed (GtkWidget *widget,
GtkStateType previous_state)
{
- if (!GTK_WIDGET_IS_SENSITIVE (widget))
+ if (!GTK_WIDGET_IS_SENSITIVE (widget))
stop_scrolling (GGG_NOTEBOOK (widget));
}
@@ -3732,7 +3732,7 @@ ggg_notebook_focus_in (GtkWidget *widget,
GGG_NOTEBOOK (widget)->child_has_focus = FALSE;
ggg_notebook_redraw_tabs (GGG_NOTEBOOK (widget));
-
+
return FALSE;
}
@@ -3771,7 +3771,7 @@ ggg_notebook_draw_focus (GtkWidget *widget,
area.width = page->tab_label->allocation.width + 2 * focus_width;
area.height = page->tab_label->allocation.height + 2 * focus_width;
- gtk_paint_focus (widget->style, event->window,
+ gtk_paint_focus (widget->style, event->window,
GTK_WIDGET_STATE (widget), NULL, widget, "tab",
area.x, area.y, area.width, area.height);
}
@@ -3790,19 +3790,19 @@ ggg_notebook_style_set (GtkWidget *widget,
gboolean has_after_next;
notebook = GGG_NOTEBOOK (widget);
-
+
gtk_widget_style_get (widget,
"has-backward-stepper", &has_before_previous,
"has-secondary-forward-stepper", &has_before_next,
"has-secondary-backward-stepper", &has_after_previous,
"has-forward-stepper", &has_after_next,
NULL);
-
+
notebook->has_before_previous = has_before_previous;
notebook->has_before_next = has_before_next;
notebook->has_after_previous = has_after_previous;
notebook->has_after_next = has_after_next;
-
+
(* GTK_WIDGET_CLASS (ggg_notebook_parent_class)->style_set) (widget, previous);
}
@@ -4000,7 +4000,7 @@ ggg_notebook_drag_motion (GtkWidget *widget,
if (widget_group && source_widget_group &&
widget_group == source_widget_group &&
- !(widget == GGG_NOTEBOOK (source_widget)->cur_page->child ||
+ !(widget == GGG_NOTEBOOK (source_widget)->cur_page->child ||
gtk_widget_is_ancestor (widget, GGG_NOTEBOOK (source_widget)->cur_page->child)))
{
gdk_drag_status (context, GDK_ACTION_MOVE, time);
@@ -4106,7 +4106,7 @@ do_detach_tab (GggNotebook *from,
g_object_ref (menu_label);
tab_label = ggg_notebook_get_tab_label (from, child);
-
+
if (tab_label)
g_object_ref (tab_label);
@@ -4200,7 +4200,7 @@ ggg_notebook_drag_data_received (GtkWidget *widget,
}
/* Private GtkContainer Methods :
- *
+ *
* ggg_notebook_set_child_arg
* ggg_notebook_get_child_arg
* ggg_notebook_add
@@ -4357,7 +4357,7 @@ static void
ggg_notebook_add (GtkContainer *container,
GtkWidget *widget)
{
- ggg_notebook_insert_page_menu (GGG_NOTEBOOK (container), widget,
+ ggg_notebook_insert_page_menu (GGG_NOTEBOOK (container), widget,
NULL, NULL, -1);
}
@@ -4383,10 +4383,10 @@ ggg_notebook_remove (GtkContainer *container,
page_num++;
children = children->next;
}
-
+
if (children == NULL)
return;
-
+
g_object_ref (widget);
ggg_notebook_real_remove (notebook, children);
@@ -4396,7 +4396,7 @@ ggg_notebook_remove (GtkContainer *container,
0,
widget,
page_num);
-
+
g_object_unref (widget);
}
@@ -4481,7 +4481,7 @@ ggg_notebook_focus (GtkWidget *widget,
}
widget_is_focus = gtk_widget_is_focus (widget);
- old_focus_child = container->focus_child;
+ old_focus_child = container->focus_child;
effective_direction = get_effective_direction (notebook, direction);
@@ -4489,7 +4489,7 @@ ggg_notebook_focus (GtkWidget *widget,
{
if (gtk_widget_child_focus (old_focus_child, direction))
return TRUE;
-
+
switch (effective_direction)
{
case GTK_DIR_TAB_BACKWARD:
@@ -4549,7 +4549,7 @@ ggg_notebook_focus (GtkWidget *widget,
g_assert_not_reached ();
return FALSE;
-}
+}
static void
ggg_notebook_set_focus_child (GtkContainer *container,
@@ -4567,22 +4567,22 @@ ggg_notebook_set_focus_child (GtkContainer *container,
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel))
{
- page_child = GTK_WINDOW (toplevel)->focus_widget;
+ page_child = GTK_WINDOW (toplevel)->focus_widget;
while (page_child)
{
if (page_child->parent == GTK_WIDGET (container))
{
GList *list = ggg_notebook_find_child (notebook, page_child, NULL);
- if (list != NULL)
+ if (list != NULL)
{
GggNotebookPage *page = list->data;
-
+
if (page->last_focus_child)
g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
-
+
page->last_focus_child = GTK_WINDOW (toplevel)->focus_widget;
g_object_add_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
-
+
break;
}
}
@@ -4590,7 +4590,7 @@ ggg_notebook_set_focus_child (GtkContainer *container,
page_child = page_child->parent;
}
}
-
+
if (child)
{
g_return_if_fail (GTK_IS_WIDGET (child));
@@ -4630,7 +4630,7 @@ ggg_notebook_forall (GtkContainer *container,
while (children)
{
GggNotebookPage *page;
-
+
page = children->data;
children = children->next;
(* callback) (page->child, callback_data);
@@ -4710,11 +4710,11 @@ ggg_notebook_real_insert_page (GggNotebook *notebook,
page->menu_label = menu_label;
page->expand = FALSE;
page->fill = TRUE;
- page->pack = GTK_PACK_START;
+ page->pack = GTK_PACK_START;
if (!menu_label)
page->default_menu = TRUE;
- else
+ else
g_object_ref_sink (page->menu_label);
if (notebook->menu)
@@ -4861,13 +4861,13 @@ ggg_notebook_redraw_arrows (GggNotebook *notebook)
arrow[2] = notebook->has_after_previous ? ARROW_LEFT_AFTER : ARROW_NONE;
arrow[3] = notebook->has_after_next ? ARROW_RIGHT_AFTER : ARROW_NONE;
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
{
if (arrow[i] == ARROW_NONE)
continue;
ggg_notebook_get_arrow_rect (notebook, &rect, arrow[i]);
- gdk_window_invalidate_rect (GTK_WIDGET (notebook)->window,
+ gdk_window_invalidate_rect (GTK_WIDGET (notebook)->window,
&rect, FALSE);
}
}
@@ -4976,13 +4976,13 @@ ggg_notebook_real_remove (GggNotebook *notebook,
priv = GGG_NOTEBOOK_GET_PRIVATE (notebook);
destroying = GTK_OBJECT_FLAGS (notebook) & GTK_IN_DESTRUCTION;
-
+
next_list = ggg_notebook_search_page (notebook, list, STEP_PREV, TRUE);
if (!next_list)
next_list = ggg_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
if (notebook->cur_page == list->data)
- {
+ {
notebook->cur_page = NULL;
if (next_list && !destroying)
ggg_notebook_switch_page (notebook, GGG_NOTEBOOK_PAGE (next_list));
@@ -4997,8 +4997,8 @@ ggg_notebook_real_remove (GggNotebook *notebook,
ggg_notebook_switch_focus_tab (notebook, next_list);
page = list->data;
-
- g_signal_handler_disconnect (page->child, page->notify_visible_handler);
+
+ g_signal_handler_disconnect (page->child, page->notify_visible_handler);
if (GTK_WIDGET_VISIBLE (page->child) && GTK_WIDGET_VISIBLE (notebook))
need_resize = TRUE;
@@ -5017,13 +5017,13 @@ ggg_notebook_real_remove (GggNotebook *notebook,
if (notebook->menu)
{
- gtk_container_remove (GTK_CONTAINER (notebook->menu),
+ gtk_container_remove (GTK_CONTAINER (notebook->menu),
page->menu_label->parent);
gtk_widget_queue_resize (notebook->menu);
}
if (!page->default_menu)
g_object_unref (page->menu_label);
-
+
notebook->children = g_list_remove_link (notebook->children, list);
g_list_free (list);
@@ -5032,7 +5032,7 @@ ggg_notebook_real_remove (GggNotebook *notebook,
g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
page->last_focus_child = NULL;
}
-
+
g_free (page);
ggg_notebook_update_labels (notebook);
@@ -5086,7 +5086,7 @@ ggg_notebook_update_labels (GggNotebook *notebook)
else
gtk_label_set_text (GTK_LABEL (page->menu_label), string);
}
- }
+ }
}
static gint
@@ -5197,7 +5197,7 @@ ggg_notebook_paint (GtkWidget *widget,
gint gap_x = 0, gap_width = 0, step = STEP_PREV;
gboolean is_rtl;
gint tab_pos;
-
+
if (!GTK_WIDGET_DRAWABLE (widget))
return;
@@ -5301,7 +5301,7 @@ ggg_notebook_paint (GtkWidget *widget,
ggg_notebook_draw_tab (notebook, page, area);
}
- if (showarrow && notebook->scrollable)
+ if (showarrow && notebook->scrollable)
{
if (notebook->has_before_previous)
ggg_notebook_draw_arrow (notebook, ARROW_LEFT_BEFORE);
@@ -5327,7 +5327,7 @@ ggg_notebook_draw_tab (GggNotebook *notebook,
GtkPositionType gap_side;
GdkWindow *window;
GtkWidget *widget;
-
+
if (!NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page) ||
!GTK_WIDGET_MAPPED (page->tab_label) ||
(page->allocation.width == 0) || (page->allocation.height == 0))
@@ -5352,7 +5352,7 @@ ggg_notebook_draw_tab (GggNotebook *notebook,
if (notebook->cur_page == page)
state_type = GTK_STATE_NORMAL;
- else
+ else
state_type = GTK_STATE_ACTIVE;
gtk_paint_extension (widget->style, window,
@@ -5387,7 +5387,7 @@ ggg_notebook_draw_arrow (GggNotebook *notebook,
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
left = (ARROW_IS_LEFT (nbarrow) && !is_rtl) ||
- (!ARROW_IS_LEFT (nbarrow) && is_rtl);
+ (!ARROW_IS_LEFT (nbarrow) && is_rtl);
gtk_widget_style_get (widget,
"scroll-arrow-hlength", &scroll_arrow_hlength,
@@ -5416,7 +5416,7 @@ ggg_notebook_draw_arrow (GggNotebook *notebook,
shadow_type = GTK_SHADOW_ETCHED_IN;
state_type = GTK_STATE_INSENSITIVE;
}
-
+
if (notebook->tab_pos == GTK_POS_LEFT ||
notebook->tab_pos == GTK_POS_RIGHT)
{
@@ -5428,10 +5428,10 @@ ggg_notebook_draw_arrow (GggNotebook *notebook,
arrow = (ARROW_IS_LEFT (nbarrow) ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT);
arrow_size = scroll_arrow_hlength;
}
-
- gtk_paint_arrow (widget->style, widget->window, state_type,
+
+ gtk_paint_arrow (widget->style, widget->window, state_type,
shadow_type, NULL, widget, "notebook",
- arrow, TRUE, arrow_rect.x, arrow_rect.y,
+ arrow, TRUE, arrow_rect.x, arrow_rect.y,
arrow_size, arrow_size);
}
}
@@ -5594,7 +5594,7 @@ ggg_notebook_calculate_shown_tabs (GggNotebook *notebook,
GList *children;
GggNotebookPage *page;
gint tab_pos, tab_overlap;
-
+
widget = GTK_WIDGET (notebook);
container = GTK_CONTAINER (notebook);
gtk_widget_style_get (widget, "tab-overlap", &tab_overlap, NULL);
@@ -5668,9 +5668,9 @@ ggg_notebook_calculate_shown_tabs (GggNotebook *notebook,
notebook->first_tab = notebook->focus_tab;
*last_child = ggg_notebook_search_page (notebook, notebook->focus_tab,
- STEP_NEXT, TRUE);
+ STEP_NEXT, TRUE);
}
- else /* focus_tab -> end */
+ else /* focus_tab -> end */
{
if (!notebook->first_tab)
notebook->first_tab = ggg_notebook_search_page (notebook,
@@ -5685,7 +5685,7 @@ ggg_notebook_calculate_shown_tabs (GggNotebook *notebook,
TRUE),
&children, remaining_space, STEP_NEXT);
- if (*remaining_space <= 0)
+ if (*remaining_space <= 0)
*last_child = children;
else /* start <- first_tab */
{
@@ -5709,7 +5709,7 @@ ggg_notebook_calculate_shown_tabs (GggNotebook *notebook,
}
}
- if (*remaining_space < 0)
+ if (*remaining_space < 0)
{
/* calculate number of tabs */
*remaining_space = - (*remaining_space);
@@ -5721,7 +5721,7 @@ ggg_notebook_calculate_shown_tabs (GggNotebook *notebook,
STEP_NEXT, TRUE))
(*n)++;
}
- else
+ else
*remaining_space = 0;
}
@@ -5854,7 +5854,7 @@ ggg_notebook_calculate_tabs_allocation (GggNotebook *notebook,
child_allocation.height = notebook->cur_page->requisition.height;
anchor = child_allocation.x;
break;
-
+
case GTK_POS_RIGHT:
child_allocation.x = widget->allocation.x + widget->allocation.width -
notebook->cur_page->requisition.width - container->border_width;
@@ -5949,7 +5949,7 @@ ggg_notebook_calculate_tabs_allocation (GggNotebook *notebook,
{
if (allocate_at_bottom)
anchor -= child_allocation.width;
-
+
if (priv->operation == DRAG_OPERATION_REORDER && page->pack == notebook->cur_page->pack)
{
if (!allocate_at_bottom &&
@@ -5981,7 +5981,7 @@ ggg_notebook_calculate_tabs_allocation (GggNotebook *notebook,
top_y = priv->drag_window_y = anchor;
anchor += notebook->cur_page->allocation.height - tab_overlap;
}
-
+
gap_left = TRUE;
}
@@ -6030,7 +6030,7 @@ ggg_notebook_calculate_tabs_allocation (GggNotebook *notebook,
page->allocation.x = 0;
page->allocation.y = 0;
}
-
+
if (page != notebook->cur_page)
{
switch (tab_pos)
@@ -6071,7 +6071,7 @@ ggg_notebook_calculate_tabs_allocation (GggNotebook *notebook,
right_x <= anchor + child_allocation.width / 2)
anchor -= notebook->cur_page->allocation.width - tab_overlap;
}
-
+
if (!allocate_at_bottom)
anchor += child_allocation.width - tab_overlap;
else
@@ -6277,7 +6277,7 @@ ggg_notebook_page_allocate (GggNotebook *notebook,
gtk_widget_size_allocate (page->tab_label, &child_allocation);
}
-static void
+static void
ggg_notebook_calc_tabs (GggNotebook *notebook,
GList *start,
GList **end,
@@ -6319,7 +6319,7 @@ ggg_notebook_calc_tabs (GggNotebook *notebook,
*tab_space -= page->requisition.width;
if (*tab_space < 0 || children == *end)
{
- if (*tab_space < 0)
+ if (*tab_space < 0)
{
*tab_space = - (*tab_space +
page->requisition.width);
@@ -6395,7 +6395,7 @@ ggg_notebook_update_tab_states (GggNotebook *notebook)
for (list = notebook->children; list != NULL; list = list->next)
{
GggNotebookPage *page = list->data;
-
+
if (page->tab_label)
{
if (page == notebook->cur_page)
@@ -6425,7 +6425,7 @@ ggg_notebook_real_switch_page (GggNotebook *notebook,
if (!notebook->focus_tab ||
notebook->focus_tab->data != (gpointer) notebook->cur_page)
- notebook->focus_tab =
+ notebook->focus_tab =
g_list_find (notebook->children, notebook->cur_page);
gtk_widget_set_child_visible (notebook->cur_page->child, TRUE);
@@ -6443,7 +6443,7 @@ ggg_notebook_real_switch_page (GggNotebook *notebook,
if (!gtk_widget_child_focus (notebook->cur_page->child, GTK_DIR_TAB_FORWARD))
gtk_widget_grab_focus (GTK_WIDGET (notebook));
}
-
+
ggg_notebook_update_tab_states (notebook);
gtk_widget_queue_resize (GTK_WIDGET (notebook));
g_object_notify (G_OBJECT (notebook), "page");
@@ -6459,7 +6459,7 @@ ggg_notebook_real_switch_page (GggNotebook *notebook,
static void
ggg_notebook_switch_page (GggNotebook *notebook,
GggNotebookPage *page)
-{
+{
guint page_num;
if (notebook->cur_page == page)
@@ -6513,7 +6513,7 @@ ggg_notebook_page_select (GggNotebook *notebook,
}
static void
-ggg_notebook_switch_focus_tab (GggNotebook *notebook,
+ggg_notebook_switch_focus_tab (GggNotebook *notebook,
GList *new_child)
{
GList *old_child;
@@ -6576,9 +6576,9 @@ ggg_notebook_menu_switch_page (GtkWidget *widget,
* ggg_notebook_menu_detacher
*/
static void
-ggg_notebook_menu_item_create (GggNotebook *notebook,
+ggg_notebook_menu_item_create (GggNotebook *notebook,
GList *list)
-{
+{
GggNotebookPage *page;
GtkWidget *menu_item;
@@ -6604,7 +6604,7 @@ ggg_notebook_menu_item_create (GggNotebook *notebook,
}
static void
-ggg_notebook_menu_label_unparent (GtkWidget *widget,
+ggg_notebook_menu_label_unparent (GtkWidget *widget,
gpointer data)
{
gtk_widget_unparent (GTK_BIN (widget)->child);
@@ -6705,7 +6705,7 @@ ggg_notebook_set_tab_vborder_internal (GggNotebook *notebook,
* @child: the #GtkWidget to use as the contents of the page.
* @tab_label: the #GtkWidget to be used as the label for the page,
* or %NULL to use the default label, 'page N'.
- *
+ *
* Appends a page to @notebook.
*
* Return value: the index (starting from 0) of the appended
@@ -6719,7 +6719,7 @@ ggg_notebook_append_page (GggNotebook *notebook,
g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-
+
return ggg_notebook_insert_page_menu (notebook, child, tab_label, NULL, -1);
}
@@ -6735,7 +6735,7 @@ ggg_notebook_append_page (GggNotebook *notebook,
* a newly created label with the same text as @tab_label;
* If @tab_label is not a #GtkLabel, @menu_label must be
* specified if the page-switch menu is to be used.
- *
+ *
* Appends a page to @notebook, specifying the widget to use as the
* label in the popup menu.
*
@@ -6752,7 +6752,7 @@ ggg_notebook_append_page_menu (GggNotebook *notebook,
g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
-
+
return ggg_notebook_insert_page_menu (notebook, child, tab_label, menu_label, -1);
}
@@ -6776,7 +6776,7 @@ ggg_notebook_prepend_page (GggNotebook *notebook,
g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-
+
return ggg_notebook_insert_page_menu (notebook, child, tab_label, NULL, 0);
}
@@ -6792,7 +6792,7 @@ ggg_notebook_prepend_page (GggNotebook *notebook,
* a newly created label with the same text as @tab_label;
* If @tab_label is not a #GtkLabel, @menu_label must be
* specified if the page-switch menu is to be used.
- *
+ *
* Prepends a page to @notebook, specifying the widget to use as the
* label in the popup menu.
*
@@ -6809,7 +6809,7 @@ ggg_notebook_prepend_page_menu (GggNotebook *notebook,
g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
g_return_val_if_fail (menu_label == NULL || GTK_IS_WIDGET (menu_label), -1);
-
+
return ggg_notebook_insert_page_menu (notebook, child, tab_label, menu_label, 0);
}
@@ -6821,7 +6821,7 @@ ggg_notebook_prepend_page_menu (GggNotebook *notebook,
* or %NULL to use the default label, 'page N'.
* @position: the index (starting at 0) at which to insert the page,
* or -1 to append the page after all other pages.
- *
+ *
* Insert a page into @notebook at the given position.
*
* Return value: the index (starting from 0) of the inserted
@@ -6836,7 +6836,7 @@ ggg_notebook_insert_page (GggNotebook *notebook,
g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), -1);
g_return_val_if_fail (GTK_IS_WIDGET (child), -1);
g_return_val_if_fail (tab_label == NULL || GTK_IS_WIDGET (tab_label), -1);
-
+
return ggg_notebook_insert_page_menu (notebook, child, tab_label, NULL, position);
}
@@ -6855,7 +6855,7 @@ ggg_notebook_mnemonic_activate_switch_page (GtkWidget *child,
{
GggNotebook *notebook = GGG_NOTEBOOK (data);
GList *list;
-
+
list = g_list_find_custom (notebook->children, child,
ggg_notebook_page_compare_tab);
if (list)
@@ -6884,7 +6884,7 @@ ggg_notebook_mnemonic_activate_switch_page (GtkWidget *child,
* specified if the page-switch menu is to be used.
* @position: the index (starting at 0) at which to insert the page,
* or -1 to append the page after all other pages.
- *
+ *
* Insert a page into @notebook at the given position, specifying
* the widget to use as the label in the popup menu.
*
@@ -6916,7 +6916,7 @@ ggg_notebook_insert_page_menu (GggNotebook *notebook,
* @page_num: the index of a notebook page, starting
* from 0. If -1, the last page will
* be removed.
- *
+ *
* Removes a page from the notebook given its index
* in the notebook.
**/
@@ -6948,9 +6948,9 @@ ggg_notebook_remove_page (GggNotebook *notebook,
/**
* ggg_notebook_get_current_page:
* @notebook: a #GggNotebook
- *
+ *
* Returns the page number of the current page.
- *
+ *
* Return value: the index (starting from 0) of the current
* page in the notebook. If the notebook has no pages, then
* -1 will be returned.
@@ -6971,9 +6971,9 @@ ggg_notebook_get_current_page (GggNotebook *notebook)
* @notebook: a #GggNotebook
* @page_num: the index of a page in the notebook, or -1
* to get the last page.
- *
+ *
* Returns the child widget contained in page number @page_num.
- *
+ *
* Return value: the child widget, or %NULL if @page_num is
* out of bounds.
**/
@@ -7003,9 +7003,9 @@ ggg_notebook_get_nth_page (GggNotebook *notebook,
/**
* ggg_notebook_get_n_pages:
* @notebook: a #GggNotebook
- *
+ *
* Gets the number of pages in a notebook.
- *
+ *
* Return value: the number of pages in the notebook.
*
* Since: 2.2
@@ -7022,10 +7022,10 @@ ggg_notebook_get_n_pages (GggNotebook *notebook)
* ggg_notebook_page_num:
* @notebook: a #GggNotebook
* @child: a #GtkWidget
- *
+ *
* Finds the index of the page which contains the given child
* widget.
- *
+ *
* Return value: the index of the page containing @child, or
* -1 if @child is not in the notebook.
**/
@@ -7043,7 +7043,7 @@ ggg_notebook_page_num (GggNotebook *notebook,
while (children)
{
GggNotebookPage *page = children->data;
-
+
if (page->child == child)
return num;
@@ -7061,13 +7061,13 @@ ggg_notebook_page_num (GggNotebook *notebook,
* If negative, the last page will be used. If greater
* than the number of pages in the notebook, nothing
* will be done.
- *
- * Switches to the page number @page_num.
+ *
+ * Switches to the page number @page_num.
*
* Note that due to historical reasons, GggNotebook refuses
- * to switch to a page unless the child widget is visible.
+ * to switch to a page unless the child widget is visible.
* Therefore, it is recommended to show child widgets before
- * adding them to a notebook.
+ * adding them to a notebook.
*/
void
ggg_notebook_set_current_page (GggNotebook *notebook,
@@ -7088,7 +7088,7 @@ ggg_notebook_set_current_page (GggNotebook *notebook,
/**
* ggg_notebook_next_page:
* @notebook: a #GggNotebook
- *
+ *
* Switches to the next page. Nothing happens if the current page is
* the last page.
**/
@@ -7113,7 +7113,7 @@ ggg_notebook_next_page (GggNotebook *notebook)
/**
* ggg_notebook_prev_page:
* @notebook: a #GggNotebook
- *
+ *
* Switches to the previous page. Nothing happens if the current page
* is the first page.
**/
@@ -7150,7 +7150,7 @@ ggg_notebook_prev_page (GggNotebook *notebook)
* ggg_notebook_set_show_border:
* @notebook: a #GggNotebook
* @show_border: %TRUE if a bevel should be drawn around the notebook.
- *
+ *
* Sets whether a bevel will be drawn around the notebook pages.
* This only has a visual effect when the tabs are not shown.
* See ggg_notebook_set_show_tabs().
@@ -7167,7 +7167,7 @@ ggg_notebook_set_show_border (GggNotebook *notebook,
if (GTK_WIDGET_VISIBLE (notebook))
gtk_widget_queue_resize (GTK_WIDGET (notebook));
-
+
g_object_notify (G_OBJECT (notebook), "show-border");
}
}
@@ -7193,7 +7193,7 @@ ggg_notebook_get_show_border (GggNotebook *notebook)
* ggg_notebook_set_show_tabs:
* @notebook: a #GggNotebook
* @show_tabs: %TRUE if the tabs should be shown.
- *
+ *
* Sets whether to show the tabs for the notebook or not.
**/
void
@@ -7216,7 +7216,7 @@ ggg_notebook_set_show_tabs (GggNotebook *notebook,
if (!show_tabs)
{
GTK_WIDGET_UNSET_FLAGS (notebook, GTK_CAN_FOCUS);
-
+
while (children)
{
page = children->data;
@@ -7261,7 +7261,7 @@ ggg_notebook_get_show_tabs (GggNotebook *notebook)
* ggg_notebook_set_tab_pos:
* @notebook: a #GggNotebook.
* @pos: the edge to draw the tabs at.
- *
+ *
* Sets the edge at which the tabs for switching pages in the
* notebook are drawn.
**/
@@ -7302,7 +7302,7 @@ ggg_notebook_get_tab_pos (GggNotebook *notebook)
* ggg_notebook_set_homogeneous_tabs:
* @notebook: a #GggNotebook
* @homogeneous: %TRUE if all tabs should be the same size.
- *
+ *
* Sets whether the tabs must have all the same size or not.
**/
void
@@ -7318,7 +7318,7 @@ ggg_notebook_set_homogeneous_tabs (GggNotebook *notebook,
* ggg_notebook_set_tab_border:
* @notebook: a #GggNotebook
* @border_width: width of the border around the tab labels.
- *
+ *
* Sets the width the border around the tab labels
* in a notebook. This is equivalent to calling
* ggg_notebook_set_tab_hborder (@notebook, @border_width) followed
@@ -7337,7 +7337,7 @@ ggg_notebook_set_tab_border (GggNotebook *notebook,
* ggg_notebook_set_tab_hborder:
* @notebook: a #GggNotebook
* @tab_hborder: width of the horizontal border of tab labels.
- *
+ *
* Sets the width of the horizontal border of tab labels.
**/
void
@@ -7353,7 +7353,7 @@ ggg_notebook_set_tab_hborder (GggNotebook *notebook,
* ggg_notebook_set_tab_vborder:
* @notebook: a #GggNotebook
* @tab_vborder: width of the vertical border of tab labels.
- *
+ *
* Sets the width of the vertical border of tab labels.
**/
void
@@ -7369,7 +7369,7 @@ ggg_notebook_set_tab_vborder (GggNotebook *notebook,
* ggg_notebook_set_scrollable:
* @notebook: a #GggNotebook
* @scrollable: %TRUE if scroll arrows should be added
- *
+ *
* Sets whether the tab label area will have arrows for scrolling if
* there are too many tabs to fit in the area.
**/
@@ -7419,7 +7419,7 @@ ggg_notebook_get_scrollable (GggNotebook *notebook)
/**
* ggg_notebook_popup_enable:
* @notebook: a #GggNotebook
- *
+ *
* Enables the popup menu: if the user clicks with the right mouse button on
* the bookmarks, a menu with all the pages will be popped up.
**/
@@ -7450,10 +7450,10 @@ ggg_notebook_popup_enable (GggNotebook *notebook)
/**
* ggg_notebook_popup_disable:
* @notebook: a #GggNotebook
- *
+ *
* Disables the popup menu.
**/
-void
+void
ggg_notebook_popup_disable (GggNotebook *notebook)
{
g_return_if_fail (GGG_IS_NOTEBOOK (notebook));
@@ -7488,11 +7488,11 @@ ggg_notebook_popup_disable (GggNotebook *notebook)
* ggg_notebook_get_tab_label:
* @notebook: a #GggNotebook
* @child: the page
- *
+ *
* Returns the tab label widget for the page @child. %NULL is returned
* if @child is not in @notebook or if no tab label has specifically
* been set for @child.
- *
+ *
* Return value: the tab label
**/
GtkWidget *
@@ -7505,14 +7505,14 @@ ggg_notebook_get_tab_label (GggNotebook *notebook,
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return NULL;
if (GGG_NOTEBOOK_PAGE (list)->default_tab)
return NULL;
return GGG_NOTEBOOK_PAGE (list)->tab_label;
-}
+}
/**
* ggg_notebook_set_tab_label:
@@ -7520,7 +7520,7 @@ ggg_notebook_get_tab_label (GggNotebook *notebook,
* @child: the page
* @tab_label: the tab label widget to use, or %NULL for default tab
* label.
- *
+ *
* Changes the tab label for @child. If %NULL is specified
* for @tab_label, then the page will have the label 'page N'.
**/
@@ -7536,20 +7536,20 @@ ggg_notebook_set_tab_label (GggNotebook *notebook,
g_return_if_fail (GTK_IS_WIDGET (child));
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return;
/* a NULL pointer indicates a default_tab setting, otherwise
* we need to set the associated label
*/
page = list->data;
-
+
if (page->tab_label == tab_label)
return;
-
+
ggg_notebook_remove_tab_label (notebook, page);
-
+
if (tab_label)
{
page->default_tab = FALSE;
@@ -7565,7 +7565,7 @@ ggg_notebook_set_tab_label (GggNotebook *notebook,
{
gchar string[32];
- g_snprintf (string, sizeof(string), _("Page %u"),
+ g_snprintf (string, sizeof(string), _("Page %u"),
ggg_notebook_real_page_position (notebook, list));
page->tab_label = gtk_label_new (string);
gtk_widget_set_parent (page->tab_label, GTK_WIDGET (notebook));
@@ -7594,7 +7594,7 @@ ggg_notebook_set_tab_label (GggNotebook *notebook,
* @notebook: a #GggNotebook
* @child: the page
* @tab_text: the label text
- *
+ *
* Creates a new label and sets it as the tab label for the page
* containing @child.
**/
@@ -7647,9 +7647,9 @@ ggg_notebook_get_tab_label_text (GggNotebook *notebook,
* ggg_notebook_get_menu_label:
* @notebook: a #GggNotebook
* @child: a widget contained in a page of @notebook
- *
+ *
* Retrieves the menu label widget of the page containing @child.
- *
+ *
* Return value: the menu label, or %NULL if the
* notebook page does not have a menu label other
* than the default (the tab label).
@@ -7664,22 +7664,22 @@ ggg_notebook_get_menu_label (GggNotebook *notebook,
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return NULL;
if (GGG_NOTEBOOK_PAGE (list)->default_menu)
return NULL;
return GGG_NOTEBOOK_PAGE (list)->menu_label;
-}
+}
/**
* ggg_notebook_set_menu_label:
* @notebook: a #GggNotebook
* @child: the child widget
* @menu_label: the menu label, or NULL for default
- *
- * Changes the menu label for the page containing @child.
+ *
+ * Changes the menu label for the page containing @child.
**/
void
ggg_notebook_set_menu_label (GggNotebook *notebook,
@@ -7693,14 +7693,14 @@ ggg_notebook_set_menu_label (GggNotebook *notebook,
g_return_if_fail (GTK_IS_WIDGET (child));
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return;
page = list->data;
if (page->menu_label)
{
if (notebook->menu)
- gtk_container_remove (GTK_CONTAINER (notebook->menu),
+ gtk_container_remove (GTK_CONTAINER (notebook->menu),
page->menu_label->parent);
if (!page->default_menu)
@@ -7726,7 +7726,7 @@ ggg_notebook_set_menu_label (GggNotebook *notebook,
* @notebook: a #GggNotebook
* @child: the child widget
* @menu_text: the label text
- *
+ *
* Creates a new label and sets it as the menu label of @child.
**/
void
@@ -7769,7 +7769,7 @@ ggg_notebook_get_menu_label_text (GggNotebook *notebook,
g_return_val_if_fail (GGG_IS_NOTEBOOK (notebook), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
-
+
menu_label = ggg_notebook_get_menu_label (notebook, child);
if (menu_label && GTK_IS_LABEL (menu_label))
@@ -7777,7 +7777,7 @@ ggg_notebook_get_menu_label_text (GggNotebook *notebook,
else
return NULL;
}
-
+
/* Helper function called when pages are reordered
*/
static void
@@ -7787,7 +7787,7 @@ ggg_notebook_child_reordered (GggNotebook *notebook,
if (notebook->menu)
{
GtkWidget *menu_item;
-
+
menu_item = page->menu_label->parent;
gtk_container_remove (GTK_CONTAINER (menu_item), page->menu_label);
gtk_container_remove (GTK_CONTAINER (notebook->menu), menu_item);
@@ -7805,7 +7805,7 @@ ggg_notebook_child_reordered (GggNotebook *notebook,
* @expand: whether to expand the bookmark or not
* @fill: whether the bookmark should fill the allocated area or not
* @pack_type: the position of the bookmark
- *
+ *
* Sets the packing parameters for the tab label of the page
* containing @child. See gtk_box_pack_start() for the exact meaning
* of the parameters.
@@ -7824,7 +7824,7 @@ ggg_notebook_set_tab_label_packing (GggNotebook *notebook,
g_return_if_fail (GTK_IS_WIDGET (child));
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return;
page = list->data;
@@ -7848,7 +7848,7 @@ ggg_notebook_set_tab_label_packing (GggNotebook *notebook,
if (notebook->show_tabs)
ggg_notebook_pages_allocate (notebook);
gtk_widget_thaw_child_notify (child);
-}
+}
/**
* ggg_notebook_query_tab_label_packing:
@@ -7857,7 +7857,7 @@ ggg_notebook_set_tab_label_packing (GggNotebook *notebook,
* @expand: location to store the expand value (or NULL)
* @fill: location to store the fill value (or NULL)
* @pack_type: location to store the pack_type (or NULL)
- *
+ *
* Query the packing attributes for the tab label of the page
* containing @child.
**/
@@ -7890,7 +7890,7 @@ ggg_notebook_query_tab_label_packing (GggNotebook *notebook,
* @notebook: a #GggNotebook
* @child: the child to move
* @position: the new position, or -1 to move to the end
- *
+ *
* Reorders the page containing @child, so that it appears in position
* @position. If @position is greater than or equal to the number of
* children in the list or negative, @child will be moved to the end
@@ -7961,7 +7961,7 @@ ggg_notebook_reorder_child (GggNotebook *notebook,
*
* Installs a global function used to create a window
* when a detached tab is dropped in an empty area.
- *
+ *
* Since: 2.10
**/
void
@@ -7986,7 +7986,7 @@ ggg_notebook_set_window_creation_hook (GggNotebookWindowCreationFunc func,
* the same group identificator will be able to exchange tabs
* via drag and drop. A notebook with group identificator -1 will
* not be able to exchange tabs with any other notebook.
- *
+ *
* Since: 2.10
* Deprecated:2.12: use ggg_notebook_set_group() instead.
*/
@@ -8012,7 +8012,7 @@ ggg_notebook_set_group_id (GggNotebook *notebook,
* the same group identificator pointer will be able to exchange tabs
* via drag and drop. A notebook with a %NULL group identificator will
* not be able to exchange tabs with any other notebook.
- *
+ *
* Since: 2.12
*/
void
@@ -8036,9 +8036,9 @@ ggg_notebook_set_group (GggNotebook *notebook,
/**
* ggg_notebook_get_group_id:
* @notebook: a #GggNotebook
- *
+ *
* Gets the current group identificator for @notebook.
- *
+ *
* Return Value: the group identificator, or -1 if none is set.
*
* Since: 2.10
@@ -8060,9 +8060,9 @@ ggg_notebook_get_group_id (GggNotebook *notebook)
/**
* ggg_notebook_get_group:
* @notebook: a #GggNotebook
- *
+ *
* Gets the current group identificator pointer for @notebook.
- *
+ *
* Return Value: the group identificator, or %NULL if none is set.
*
* Since: 2.12
@@ -8082,11 +8082,11 @@ ggg_notebook_get_group (GggNotebook *notebook)
* ggg_notebook_get_tab_reorderable:
* @notebook: a #GggNotebook
* @child: a child #GtkWidget
- *
+ *
* Gets whether the tab can be reordered via drag and drop or not.
- *
+ *
* Return Value: %TRUE if the tab is reorderable.
- *
+ *
* Since: 2.10
**/
gboolean
@@ -8099,7 +8099,7 @@ ggg_notebook_get_tab_reorderable (GggNotebook *notebook,
g_return_val_if_fail (GTK_IS_WIDGET (child), FALSE);
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return FALSE;
return GGG_NOTEBOOK_PAGE (list)->reorderable;
@@ -8113,7 +8113,7 @@ ggg_notebook_get_tab_reorderable (GggNotebook *notebook,
*
* Sets whether the notebook tab can be reordered
* via drag and drop or not.
- *
+ *
* Since: 2.10
**/
void
@@ -8127,7 +8127,7 @@ ggg_notebook_set_tab_reorderable (GggNotebook *notebook,
g_return_if_fail (GTK_IS_WIDGET (child));
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return;
if (GGG_NOTEBOOK_PAGE (list)->reorderable != reorderable)
@@ -8141,9 +8141,9 @@ ggg_notebook_set_tab_reorderable (GggNotebook *notebook,
* ggg_notebook_get_tab_detachable:
* @notebook: a #GggNotebook
* @child: a child #GtkWidget
- *
+ *
* Returns whether the tab contents can be detached from @notebook.
- *
+ *
* Return Value: TRUE if the tab is detachable.
*
* Since: 2.10
@@ -8158,7 +8158,7 @@ ggg_notebook_get_tab_detachable (GggNotebook *notebook,
g_return_val_if_fail (GTK_IS_WIDGET (child), FALSE);
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return FALSE;
return GGG_NOTEBOOK_PAGE (list)->detachable;
@@ -8196,10 +8196,10 @@ ggg_notebook_get_tab_detachable (GggNotebook *notebook,
* {
* GtkWidget *notebook;
* GtkWidget **child;
- *
+ *
* notebook = gtk_drag_get_source_widget (context);
* child = (void*) selection_data->data;
- *
+ *
* process_widget (*child);
* gtk_container_remove (GTK_CONTAINER (notebook), *child);
* }
@@ -8221,7 +8221,7 @@ ggg_notebook_set_tab_detachable (GggNotebook *notebook,
g_return_if_fail (GTK_IS_WIDGET (child));
list = CHECK_FIND_CHILD (notebook, child);
- if (!list)
+ if (!list)
return;
if (GGG_NOTEBOOK_PAGE (list)->detachable != detachable)
@@ -8260,7 +8260,7 @@ struct _GnmNotebook {
* This is the number of pixels from a regular notebook that
* we are not drawing. It is caused by the empty widgets
* that we have to use.
- */
+ */
int dummy_height;
};
diff --git a/src/widgets/gnumeric-cell-renderer-text.c b/src/widgets/gnumeric-cell-renderer-text.c
index a18d6c5..e323bdc 100644
--- a/src/widgets/gnumeric-cell-renderer-text.c
+++ b/src/widgets/gnumeric-cell-renderer-text.c
@@ -117,7 +117,7 @@ gnumeric_cell_renderer_text_render (GtkCellRenderer *cell,
g_object_unref (G_OBJECT (gc));
-
+
if (celltext->foreground_set) {
GTK_CELL_RENDERER_CLASS (parent_class)->render
(cell, window, widget, background_area,
diff --git a/src/widgets/gnumeric-text-view.c b/src/widgets/gnumeric-text-view.c
index 76a4f79..a84723d 100644
--- a/src/widgets/gnumeric-text-view.c
+++ b/src/widgets/gnumeric-text-view.c
@@ -1,10 +1,10 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * gnumeric-text-view.c: A textview extension handling formatting
- *
- * Copyright (C) 2009 Andreas J. Guelzow
-
+ * gnumeric-text-view.c: A textview extension handling formatting
+ *
+ * Copyright (C) 2009 Andreas J. Guelzow
+
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 or 3 of the GNU General Public License as published
* by the Free Software Foundation.
@@ -35,7 +35,7 @@ struct _GnmTextView {
GtkTextBuffer *buffer;
GtkTextView *view;
-
+
GtkToggleToolButton *italic;
GtkToggleToolButton *strikethrough;
GtkToolButton *bold;
@@ -76,7 +76,7 @@ gnm_toggle_tool_button_set_active_no_signal (GtkToggleToolButton *button,
gboolean is_active,
GnmTextView *gtv)
{
- gulong handler_id = g_signal_handler_find (button, G_SIGNAL_MATCH_DATA,
+ gulong handler_id = g_signal_handler_find (button, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, gtv);
g_signal_handler_block (button, handler_id);
@@ -92,25 +92,25 @@ cb_gtv_mark_set (GtkTextBuffer *buffer,
{
GtkTextIter start, end;
gtk_text_buffer_get_selection_bounds (gtv->buffer, &start, &end);
-
+
{ /* Handling italic button */
- GtkTextTag *tag_italic = gtk_text_tag_table_lookup
- (gtk_text_buffer_get_tag_table (gtv->buffer),
+ GtkTextTag *tag_italic = gtk_text_tag_table_lookup
+ (gtk_text_buffer_get_tag_table (gtv->buffer),
"PANGO_STYLE_ITALIC");
gnm_toggle_tool_button_set_active_no_signal
- (gtv->italic,
- (tag_italic != NULL)
- && gtk_text_iter_has_tag (&start, tag_italic),
+ (gtv->italic,
+ (tag_italic != NULL)
+ && gtk_text_iter_has_tag (&start, tag_italic),
gtv);
}
{ /* Handling strikethrough button */
- GtkTextTag *tag_strikethrough = gtk_text_tag_table_lookup
- (gtk_text_buffer_get_tag_table (gtv->buffer),
+ GtkTextTag *tag_strikethrough = gtk_text_tag_table_lookup
+ (gtk_text_buffer_get_tag_table (gtv->buffer),
"PANGO_STRIKETHROUGH_TRUE");
gnm_toggle_tool_button_set_active_no_signal
- (gtv->strikethrough,
- (tag_strikethrough != NULL)
- && gtk_text_iter_has_tag (&start, tag_strikethrough),
+ (gtv->strikethrough,
+ (tag_strikethrough != NULL)
+ && gtk_text_iter_has_tag (&start, tag_strikethrough),
gtv);
}
}
@@ -121,22 +121,22 @@ cb_gtv_set_italic (GtkToggleToolButton *toolbutton, GnmTextView *gtv)
GtkTextIter start, end;
if (gtk_text_buffer_get_selection_bounds (gtv->buffer, &start, &end)) {
- GtkTextTag *tag_italic = gtk_text_tag_table_lookup
- (gtk_text_buffer_get_tag_table (gtv->buffer),
+ GtkTextTag *tag_italic = gtk_text_tag_table_lookup
+ (gtk_text_buffer_get_tag_table (gtv->buffer),
"PANGO_STYLE_ITALIC");
- GtkTextTag *tag_normal = gtk_text_tag_table_lookup
- (gtk_text_buffer_get_tag_table (gtv->buffer),
+ GtkTextTag *tag_normal = gtk_text_tag_table_lookup
+ (gtk_text_buffer_get_tag_table (gtv->buffer),
"PANGO_STYLE_NORMAL");
-
+
if (gtk_text_iter_has_tag (&start, tag_italic)) {
gtk_text_buffer_remove_tag (gtv->buffer, tag_italic,
&start, &end);
- gtk_text_buffer_apply_tag (gtv->buffer, tag_normal,
+ gtk_text_buffer_apply_tag (gtv->buffer, tag_normal,
&start, &end);
} else {
gtk_text_buffer_remove_tag (gtv->buffer, tag_normal,
&start, &end);
- gtk_text_buffer_apply_tag (gtv->buffer, tag_italic,
+ gtk_text_buffer_apply_tag (gtv->buffer, tag_italic,
&start, &end);
}
cb_gtv_emit_changed (NULL, gtv);
@@ -149,22 +149,22 @@ cb_gtv_set_strikethrough (GtkToggleToolButton *toolbutton, GnmTextView *gtv)
GtkTextIter start, end;
if (gtk_text_buffer_get_selection_bounds (gtv->buffer, &start, &end)) {
- GtkTextTag *tag_no_strikethrough = gtk_text_tag_table_lookup
- (gtk_text_buffer_get_tag_table (gtv->buffer),
+ GtkTextTag *tag_no_strikethrough = gtk_text_tag_table_lookup
+ (gtk_text_buffer_get_tag_table (gtv->buffer),
"PANGO_STRIKETHROUGH_FALSE");
- GtkTextTag *tag_strikethrough = gtk_text_tag_table_lookup
- (gtk_text_buffer_get_tag_table (gtv->buffer),
+ GtkTextTag *tag_strikethrough = gtk_text_tag_table_lookup
+ (gtk_text_buffer_get_tag_table (gtv->buffer),
"PANGO_STRIKETHROUGH_TRUE");
-
+
if (gtk_text_iter_has_tag (&start, tag_strikethrough)) {
gtk_text_buffer_remove_tag (gtv->buffer, tag_strikethrough,
&start, &end);
- gtk_text_buffer_apply_tag (gtv->buffer, tag_no_strikethrough,
+ gtk_text_buffer_apply_tag (gtv->buffer, tag_no_strikethrough,
&start, &end);
} else {
gtk_text_buffer_remove_tag (gtv->buffer, tag_no_strikethrough,
&start, &end);
- gtk_text_buffer_apply_tag (gtv->buffer, tag_strikethrough,
+ gtk_text_buffer_apply_tag (gtv->buffer, tag_strikethrough,
&start, &end);
}
cb_gtv_emit_changed (NULL, gtv);
@@ -172,7 +172,7 @@ cb_gtv_set_strikethrough (GtkToggleToolButton *toolbutton, GnmTextView *gtv)
}
static GtkToggleToolButton *
-gtv_build_toggle_button (GtkWidget *tb, GnmTextView *gtv,
+gtv_build_toggle_button (GtkWidget *tb, GnmTextView *gtv,
char const *button_name, GCallback cb)
{
GtkToolItem * tb_button;
@@ -214,7 +214,7 @@ gtv_bold_button_activated (GtkMenuItem *menuitem, GnmTextView *gtv)
if (val != NULL) {
GtkTextIter start, end;
if (gtk_text_buffer_get_selection_bounds (gtv->buffer, &start, &end)) {
- GtkTextTag *tag = gtk_text_tag_table_lookup
+ GtkTextTag *tag = gtk_text_tag_table_lookup
(gtk_text_buffer_get_tag_table (gtv->buffer), val);
gtv_remove_weight_tags (gtv->buffer, &start, &end);
gtk_text_buffer_apply_tag (gtv->buffer, tag, &start, &end);
@@ -243,7 +243,7 @@ gtv_build_button_bold (GtkWidget *tb, GnmTextView *gtv)
GtkWidget *child;
menu = gtk_menu_new ();
-
+
SETUPBPLDMENUITEM(_("Thin"), "PANGO_WEIGHT_THIN")
SETUPBPLDMENUITEM(_("Ultralight"), "PANGO_WEIGHT_ULTRALIGHT")
SETUPBPLDMENUITEM(_("Light"), "PANGO_WEIGHT_LIGHT")
@@ -289,14 +289,14 @@ gtv_set_property (GObject *object,
GnmTextView *gtv = GNM_TEXT_VIEW (object);
switch (prop_id) {
case PROP_TEXT:
- gtk_text_buffer_set_text (gtv->buffer,
+ gtk_text_buffer_set_text (gtv->buffer,
g_value_get_string (value), -1);
break;
case PROP_WRAP:
gtk_text_view_set_wrap_mode (gtv->view, g_value_get_int (value));
break;
case PROP_ATTR:
- gnm_load_pango_attributes_into_buffer (g_value_get_boxed (value),
+ gnm_load_pango_attributes_into_buffer (g_value_get_boxed (value),
gtv->buffer);
break;
default:
@@ -325,7 +325,7 @@ gtv_get_property (GObject *object,
break;
case PROP_ATTR:
{
- PangoAttrList *attr = gnm_get_pango_attributes_from_buffer
+ PangoAttrList *attr = gnm_get_pango_attributes_from_buffer
(gtv->buffer);
g_value_take_boxed (value, attr);
}
@@ -346,11 +346,11 @@ gtv_init (GnmTextView *gtv)
gtv->buffer = gtk_text_view_get_buffer (gtv->view);
gnm_create_std_tags_for_buffer (gtv->buffer);
- gtv->italic = gtv_build_toggle_button (tb, gtv, GTK_STOCK_ITALIC,
+ gtv->italic = gtv_build_toggle_button (tb, gtv, GTK_STOCK_ITALIC,
G_CALLBACK (cb_gtv_set_italic));
- gtv->strikethrough = gtv_build_toggle_button (tb, gtv,
- GTK_STOCK_STRIKETHROUGH,
- G_CALLBACK
+ gtv->strikethrough = gtv_build_toggle_button (tb, gtv,
+ GTK_STOCK_STRIKETHROUGH,
+ G_CALLBACK
(cb_gtv_set_strikethrough));
gtk_toolbar_insert(GTK_TOOLBAR(tb), gtk_separator_tool_item_new (), -1);
gtv->bold = gtv_build_button_bold (tb, gtv);
@@ -358,9 +358,9 @@ gtv_init (GnmTextView *gtv)
gtk_container_set_border_width (GTK_CONTAINER (gtv->view), 5);
gtk_text_view_set_wrap_mode (gtv->view, GTK_WRAP_WORD_CHAR);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC,
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
-
+
g_signal_connect (G_OBJECT (gtv->buffer), "changed",
G_CALLBACK (cb_gtv_emit_changed), gtv);
g_signal_connect (G_OBJECT (gtv->buffer), "mark_set",
@@ -402,15 +402,15 @@ gtv_class_init (GObjectClass *gobject_class)
PROP_WRAP,
g_param_spec_int ("wrap", "Wrap",
"The wrapping mode",
- GTK_WRAP_NONE, GTK_WRAP_WORD_CHAR,
+ GTK_WRAP_NONE, GTK_WRAP_WORD_CHAR,
GTK_WRAP_WORD,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
- g_object_class_install_property
+ g_object_class_install_property
(gobject_class, PROP_ATTR,
- g_param_spec_boxed
+ g_param_spec_boxed
("attributes", "PangoAttrList",
"A PangoAttrList derived from the buffer content.",
- PANGO_TYPE_ATTR_LIST,
+ PANGO_TYPE_ATTR_LIST,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
}
diff --git a/src/widgets/gnumeric-text-view.h b/src/widgets/gnumeric-text-view.h
index f2e8b74..70f9fa1 100644
--- a/src/widgets/gnumeric-text-view.h
+++ b/src/widgets/gnumeric-text-view.h
@@ -1,10 +1,10 @@
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * gnumeric-text-view.c: A textview extension handling formatting
- *
- * Copyright (C) 2009 Andreas J. Guelzow
-
+ * gnumeric-text-view.c: A textview extension handling formatting
+ *
+ * Copyright (C) 2009 Andreas J. Guelzow
+
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 or 3 of the GNU General Public License as published
* by the Free Software Foundation.
diff --git a/src/workbook-control.c b/src/workbook-control.c
index 5e91b00..6ddc2c7 100644
--- a/src/workbook-control.c
+++ b/src/workbook-control.c
@@ -202,7 +202,7 @@ wb_create_name (WorkbookControl *wbc, char const *text, GnmParsePos *pp)
GnmRange const *r;
GnmCellRef a, b;
GnmExpr const *target_range;
-
+
r = selection_first_range (wb_control_cur_sheet_view (wbc),
GO_CMD_CONTEXT (wbc), _("Define Name"));
if (r != NULL) {
diff --git a/src/xml-io.c b/src/xml-io.c
index db6aafb..ad9081c 100644
--- a/src/xml-io.c
+++ b/src/xml-io.c
@@ -366,7 +366,7 @@ xml_read_names (XmlParseContext *ctxt, xmlNodePtr tree,
/*For the next while we have to ignore Print_areas that look like a whole sheet */
- if (0 == strcmp (CXML2C (name_str), "Print_Area")
+ if (0 == strcmp (CXML2C (name_str), "Print_Area")
&& g_str_has_suffix (CXML2C (expr_str), "$A$1:$IV$65536")) {
xmlFree (name_str);
xmlFree (expr_str);
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index b9305be..11ddd64 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -1061,7 +1061,7 @@ xml_sax_print_hf (GsfXMLIn *xin, xmlChar const **attrs)
default:
return;
}
-
+
g_return_if_fail (hf != NULL);
for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2) {
@@ -2214,7 +2214,7 @@ xml_sax_named_expr_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
g_return_if_fail (state->name.value != NULL);
/*For the next while we have to ignore Print_areas that look like a whole sheet */
- if (0 == strcmp (state->name.name, "Print_Area")
+ if (0 == strcmp (state->name.name, "Print_Area")
&& g_str_has_suffix (state->name.value, "$A$1:$IV$65536")) {
g_free (state->name.value);
state->name.value = NULL;
@@ -2227,7 +2227,7 @@ xml_sax_named_expr_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
NULL,
TRUE,
NULL);
-
+
state->delayed_names = g_list_prepend (state->delayed_names, state->sheet);
state->delayed_names = g_list_prepend (state->delayed_names, state->name.value);
state->name.value = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]