Commit b121e5da authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Woohoo! The last of the release critical bugs are done.

2000-09-18  Jody Goldberg <jgoldberg@home.com>

	* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
	  Avoid the ugly row size changes when fitting the size.

	* src/format.c (style_format_new_XL) : Implement translation.
	(style_format_as_XL) : Ditto.

	* src/number-match.c (format_match_init) : No need to compare to
	  translated General.

	* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
parent 62fd10ba
......@@ -6,7 +6,6 @@ Release Critical
----------------
- Saving xml should not rely on changing the textdomain to disable translation
of TRUE/FALSE in expressions.
- The translate/untranslate routines for formats need to be written
Post 0.57 Changes
-----------------
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
Avoid the ugly row size changes when fitting the size.
* src/format.c (style_format_new_XL) : Implement translation.
(style_format_as_XL) : Ditto.
* src/number-match.c (format_match_init) : No need to compare to
translated General.
* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
2000-09-17 Morten Welinder <terra@diku.dk>
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
Avoid the ugly row size changes when fitting the size.
* src/format.c (style_format_new_XL) : Implement translation.
(style_format_as_XL) : Ditto.
* src/number-match.c (format_match_init) : No need to compare to
translated General.
* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
2000-09-17 Morten Welinder <terra@diku.dk>
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
Avoid the ugly row size changes when fitting the size.
* src/format.c (style_format_new_XL) : Implement translation.
(style_format_as_XL) : Ditto.
* src/number-match.c (format_match_init) : No need to compare to
translated General.
* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
2000-09-17 Morten Welinder <terra@diku.dk>
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
Avoid the ugly row size changes when fitting the size.
* src/format.c (style_format_new_XL) : Implement translation.
(style_format_as_XL) : Ditto.
* src/number-match.c (format_match_init) : No need to compare to
translated General.
* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
2000-09-17 Morten Welinder <terra@diku.dk>
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
Avoid the ugly row size changes when fitting the size.
* src/format.c (style_format_new_XL) : Implement translation.
(style_format_as_XL) : Ditto.
* src/number-match.c (format_match_init) : No need to compare to
translated General.
* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
2000-09-17 Morten Welinder <terra@diku.dk>
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
Avoid the ugly row size changes when fitting the size.
* src/format.c (style_format_new_XL) : Implement translation.
(style_format_as_XL) : Ditto.
* src/number-match.c (format_match_init) : No need to compare to
translated General.
* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
2000-09-17 Morten Welinder <terra@diku.dk>
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_row_size_fit_pixels) : PUTRID KLUDGE.
Avoid the ugly row size changes when fitting the size.
* src/format.c (style_format_new_XL) : Implement translation.
(style_format_as_XL) : Ditto.
* src/number-match.c (format_match_init) : No need to compare to
translated General.
* src/sheet.c (sheet_flag_status_update_cell) : Adjust signature.
2000-09-17 Morten Welinder <terra@diku.dk>
......
2000-09-18 Jody Goldberg <jgoldberg@home.com>
* cell-format.glade : Set the descriptive string for cell protection
to wrap. This avoids ugly dialogs when in a different locale.
* dialog-solver.c (dialog_solver) : No need to create a cell manually
and fill with empty. sheet_cell_fetch will handle that.
......
......@@ -18,6 +18,11 @@
<class>GnomePropertyBox</class>
<name>CellFormat</name>
<visible>False</visible>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>False</allow_grow>
<auto_shrink>False</auto_shrink>
<widget>
<class>GtkNotebook</class>
......@@ -505,6 +510,7 @@
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>De_lete format</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
......@@ -1428,6 +1434,7 @@ Double
<height>40</height>
<tooltip>Reverse Diagonal</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1457,6 +1464,7 @@ Double
<height>40</height>
<tooltip>Left</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1498,6 +1506,7 @@ Double
<height>40</height>
<tooltip>Top</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1563,6 +1572,7 @@ Double
<height>40</height>
<tooltip>Bottom</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1604,6 +1614,7 @@ Double
<height>40</height>
<tooltip>Diagonal</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1633,6 +1644,7 @@ Double
<height>40</height>
<tooltip>Right</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1675,6 +1687,7 @@ Double
<height>45</height>
<tooltip>None</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<widget>
<class>Placeholder</class>
......@@ -1703,6 +1716,7 @@ Double
<height>45</height>
<tooltip>Outline</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<widget>
<class>Placeholder</class>
......@@ -1731,6 +1745,7 @@ Double
<height>45</height>
<tooltip>Inside Vertical</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1760,6 +1775,7 @@ Double
<height>45</height>
<tooltip>Inside</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<widget>
<class>Placeholder</class>
......@@ -1788,6 +1804,7 @@ Double
<height>45</height>
<tooltip>Inside Horizontal</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<widget>
......@@ -1868,6 +1885,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_double</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -1893,6 +1911,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_thick</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -1918,6 +1937,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_medium</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -1943,6 +1963,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_medium_dash</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -1968,6 +1989,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_medium_dash_dot</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -1993,6 +2015,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_slant</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -2018,6 +2041,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_thin</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2043,6 +2067,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_dashed</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2068,6 +2093,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_dash_dot</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2093,6 +2119,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_dash_dot_dot</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2118,6 +2145,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_dotted</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2143,6 +2171,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_hair</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2168,6 +2197,7 @@ Double
<class>GtkToggleButton</class>
<name>line_pattern_medium_dash_dot_dot</name>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -2194,6 +2224,7 @@ Double
<name>line_pattern_none</name>
<can_focus>True</can_focus>
<label>None</label>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2519,6 +2550,7 @@ Double
<height>29</height>
<tooltip>75% Grey</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -2548,6 +2580,7 @@ Double
<height>29</height>
<tooltip>50% Grey</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>2</left_attach>
......@@ -2577,6 +2610,7 @@ Double
<height>29</height>
<tooltip>25% Grey</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>3</left_attach>
......@@ -2606,6 +2640,7 @@ Double
<height>29</height>
<tooltip>12.5% Grey</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>4</left_attach>
......@@ -2635,6 +2670,7 @@ Double
<height>29</height>
<tooltip>6.25% Grey</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>5</left_attach>
......@@ -2664,6 +2700,7 @@ Double
<height>29</height>
<tooltip>Horizontal Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2693,6 +2730,7 @@ Double
<height>29</height>
<tooltip>Thin Horizontal Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -2722,6 +2760,7 @@ Double
<height>29</height>
<tooltip>Vertical Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -2751,6 +2790,7 @@ Double
<height>29</height>
<tooltip>Thin Vertical Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -2780,6 +2820,7 @@ Double
<height>29</height>
<tooltip>Reverse Diagonal Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>2</left_attach>
......@@ -2809,6 +2850,7 @@ Double
<height>29</height>
<tooltip>Thin Reverse Diagonal Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>2</left_attach>
......@@ -2838,6 +2880,7 @@ Double
<height>29</height>
<tooltip>Diagonal Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>3</left_attach>
......@@ -2867,6 +2910,7 @@ Double
<height>29</height>
<tooltip>Thin Diagonal Stripe</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>3</left_attach>
......@@ -2896,6 +2940,7 @@ Double
<height>29</height>
<tooltip>Diagonal Crosshatch</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>4</left_attach>
......@@ -2925,6 +2970,7 @@ Double
<height>29</height>
<tooltip>Thick Diagonal Crosshatch</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>5</left_attach>
......@@ -2954,6 +3000,7 @@ Double
<height>29</height>
<tooltip>Thin Horizontal Crosshatch</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>4</left_attach>
......@@ -2983,6 +3030,7 @@ Double
<height>29</height>
<tooltip>Thin Diagonal Crosshatch</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>5</left_attach>
......@@ -3012,6 +3060,7 @@ Double
<height>29</height>
<tooltip>Solid</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -3041,6 +3090,7 @@ Double
<height>29</height>
<tooltip>Bricks</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>5</left_attach>
......@@ -3070,6 +3120,7 @@ Double
<height>29</height>
<tooltip>Large Circles</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>4</left_attach>
......@@ -3099,6 +3150,7 @@ Double
<height>29</height>
<tooltip>Thatch</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>3</left_attach>
......@@ -3128,6 +3180,7 @@ Double
<height>29</height>
<tooltip>Semi Circles</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>2</left_attach>
......@@ -3157,6 +3210,7 @@ Double
<height>29</height>
<tooltip>Small Circles</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>1</left_attach>
......@@ -3186,6 +3240,7 @@ Double
<height>29</height>
<tooltip>Foreground Solid</tooltip>
<can_focus>True</can_focus>
<relief>GTK_RELIEF_NORMAL</relief>
<active>False</active>
<child>
<left_attach>0</left_attach>
......@@ -3315,11 +3370,12 @@ Double
<name>label28</name>
<label>Locking cells or hiding formulas only affects protected worksheets.</label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<wrap>True</wrap>
<xalign>0</xalign>
<yalign>1</yalign>
<yalign>0</yalign>
<xpad>0</xpad>
<ypad>17</ypad>
<ypad>10</ypad>
<focus_target>protected_button</focus_target>
<child>
<padding>0</padding>
<expand>False</expand>
......
......@@ -21,8 +21,6 @@ gchar *s = N_("General format cells attempt to select an appropriate format depe
gchar *s = N_("Deci_mal places:");
gchar *s = N_("_Use Separator for 1000's");
gchar *s = N_("S_ymbol:");
gchar *s = N_("\n"
"");
gchar *s = N_("$");
gchar *s = N_("Negat_ive number:");
gchar *s = N_("De_lete format");
......@@ -56,10 +54,9 @@ gchar *s = N_("_Custom");
gchar *s = N_("Pick a font color");
gchar *s = N_("Effects");
gchar *s = N_("_Underline:");
gchar *s = N_("None\n"
"Single\n"
"Double\n"
"");
gchar *s = N_("None");
gchar *s = N_("Single");
gchar *s = N_("Double");
gchar *s = N_("None");
gchar *s = N_("Stri_kethrough");
gchar *s = N_("Sup_erscript");
......@@ -91,15 +88,10 @@ gchar *s = N_("Pattern");
gchar *s = N_("_Automatic");
gchar *s = N_("_Custom");
gchar *s = N_("Pick a Pattern color");
/* xgettext:no-c-format */
gchar *s = N_("75% grey");
/* xgettext:no-c-format */
gchar *s = N_("75% Grey");
gchar *s = N_("50% Grey");
/* xgettext:no-c-format */
gchar *s = N_("25% Grey");
/* xgettext:no-c-format */
gchar *s = N_("12.5% Grey");
/* xgettext:no-c-format */
gchar *s = N_("6.25% Grey");
gchar *s = N_("Horizontal Stripe");
gchar *s = N_("Thin Horizontal Stripe");
......
......@@ -1519,23 +1519,69 @@ number_format_shutdown (void)
* style_format_new_XL :
*/
StyleFormat *
style_format_new_XL (const char *name, gboolean delocalize)
style_format_new_XL (const char *descriptor_string, gboolean delocalize)
{
StyleFormat *format;
char *internal_string = NULL;
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (descriptor_string != NULL, NULL);
format = (StyleFormat *) g_hash_table_lookup (style_format_hash, name);
if (delocalize) {
if (!strcmp (descriptor_string, _("General")))
descriptor_string = "General";
else {
char const thousands_sep = format_get_thousand ();
char const decimal = format_get_decimal ();
char const *ptr = descriptor_string;
GString *res = g_string_sized_new (strlen (ptr));
for ( ; *ptr ; ++ptr)
if (*ptr == decimal)
g_string_append_c (res, '.');
else if (*ptr == thousands_sep)
g_string_append_c (res, ',');
else if (*ptr == '\\')
switch (*ptr) {
case '.' : g_string_append_c (res, decimal);
break;
case ',' : g_string_append_c (res, thousands_sep);
break;
case '\"' : do {
g_string_append_c (res, *ptr++);
} while (*ptr && *ptr != '\"');
if (*ptr)
g_string_append_c (res, *ptr);
break;
case '\\' : g_string_append_c (res, '\\');
if (ptr [1] != '\0') {
g_string_append_c (res, ptr[1]);
++ptr;
}
break;
default : g_string_append_c (res, *ptr);
};
internal_string = g_strdup (res->str);
descriptor_string = internal_string;
g_string_free (res, TRUE);
}
}
format = (StyleFormat *) g_hash_table_lookup (style_format_hash, descriptor_string);
if (!format) {
format = g_new0 (StyleFormat, 1);
format->format = g_strdup (name);
format->format = g_strdup (descriptor_string);
format->entries = NULL;
format_compile (format);
g_hash_table_insert (style_format_hash, format->format, format);
}
format->ref_count++;
if (internal_string)
g_free (internal_string);
return format;
}
......@@ -1547,8 +1593,65 @@ style_format_new_XL (const char *name, gboolean delocalize)
char *
style_format_as_XL (StyleFormat const *fmt, gboolean localized)
{
/* TODO : add localization support */
return g_strdup (fmt->format);
char const *ptr;
g_return_val_if_fail (fmt != NULL, g_strdup (_("General")));
ptr = fmt->format;
if (!localized)
return g_strdup (ptr);
if (!strcmp (ptr, "General"))
return g_strdup (_("General"));
{
char const thousands_sep = format_get_thousand ();
char const decimal = format_get_decimal ();
char *tmp;
GString *res = g_string_sized_new (strlen (ptr));
/* TODO : XL seems to do an adaptive escaping of
* things.
* eg '#,##0.00 ' in a locale that uses ' '
* as the thousands would become
* '# ##0.00 '
* rather than
* '# ##0.00\ '
*
* TODO : Minimal quotes.
* It also seems to have a display mode vs a storage mode.
* Internally it adds a few quotes around strings.
* Then tries not to display the quotes unless needed.
*/
for ( ; *ptr ; ++ptr)
switch (*ptr) {
case '.' : g_string_append_c (res, decimal);
break;
case ',' : g_string_append_c (res, thousands_sep);
break;
case '\"' : do {
g_string_append_c (res, *ptr++);
} while (*ptr && *ptr != '\"');
if (*ptr)
g_string_append_c (res, *ptr);
break;
case '\\' : g_string_append_c (res, '\\');
if (ptr [1] != '\0') {
g_string_append_c (res, ptr[1]);
++ptr;
}
break;
default : if (*ptr == decimal || *ptr == thousands_sep)
g_string_append_c (res, '\\');
g_string_append_c (res, *ptr);
};
tmp = g_strdup (res->str);
g_string_free (res, TRUE);
return tmp;
}
}
void
......
......@@ -3,8 +3,10 @@
#include "gnumeric.h"
StyleFormat *style_format_new_XL (const char *name, gboolean delocalize);
char *style_format_as_XL (StyleFormat const *fmt, gboolean localized);
StyleFormat *style_format_new_XL (const char *descriptor_string,
gboolean delocalize);
char *style_format_as_XL (StyleFormat const *fmt,
gboolean localized);
void style_format_ref (StyleFormat *sf);
void style_format_unref (StyleFormat *sf);
......
......@@ -572,11 +572,8 @@ format_match_init (void)
char const * const * p = cell_formats [i];
for (; *p; p++){
/* FIXME : Why do we need to compare both */
if (strcmp (*p, "General") == 0)
continue;
if (strcmp (*p, _("General")) == 0)
continue;
format_match_define (*p);
}
}
......
......@@ -987,7 +987,7 @@ int
sheet_row_size_fit_pixels (Sheet *sheet, int row)
{
int max = -1;
ColRowInfo *ri = sheet_row_get (sheet, row);
ColRowInfo const *ri = sheet_row_get (sheet, row);
if (ri == NULL)
return 0;
......@@ -1000,8 +1000,22 @@ sheet_row_size_fit_pixels (Sheet *sheet, int row)
if (max <= 0)
return 0;
/* Cell height does not include margins or far grid line */
/* Cell height does not include margins or bottom grid line */
max += ri->margin_a + ri->margin_b + 1;
/* FIXME FIXME FIXME : HACK HACK HACK
* if the height is 1 pixel larger than the minimum required
* do not bother to resize. The current font kludges cause a
* problem because the 9pt font font that we display @ 96dpi is a 12
* pixel font. Where as the row height was calculated using windows
* which uses a 10pt font @96 dpi and displays a 13pixel font.
*
* As a result the default row height is 1 pixel too large for the
* font. When we run this test things then resize 1 pixel smaller for
* no apparent reason.
*/
if (ri->size_pixels = (max+1))
return 0;
return max;