Commit 85caf3c6 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

xmlNodeGetContent always returns a value now. That simplifies comments and

2002-02-26  Jody Goldberg <jody@gnome.org>

	* src/xml-io.c (xml_read_cell) : xmlNodeGetContent always returns a
	  value now.  That simplifies comments and complicates content.
	(xml_cellregion_read) : ditto.

2002-02-26  Jody Goldberg <jody@gnome.org>

	* ms-escher.c (ms_escher_get_data) : clarify the interface.
	(ms_escher_read_BSE) : fix call to ms_escher_get_data.
	(ms_escher_read_Sp) : ditto.
	(ms_escher_read_ClientAnchor) : ditto.
	(ms_escher_read_OPT) : ditto.
	(ms_escher_read_container) : ditto.
	(ms_escher_read_Blip) : support decompress and validate emf & wmf.

	* ms-excel-util.c (excel_iconv_open_for_import) : recognize that
	cp1200 makes no sense in that context and fall back to 8859-1.

2002-02-24  Jody Goldberg <jody@gnome.org>

	http://bugzilla.gnome.org/show_bug.cgi?id=72459
	* ms-formula-write.c (write_node) : fix typo.
parent a3a381e7
......@@ -294,9 +294,8 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) 19yy <name of author>
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.
it under the terms of verson 2 of the GNU General Public License as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......
Email: miguel@kernel.org
Email: mmeeks@gnu.org
Email: jody@gnome.org
Email: jody@gnome.org
Email: terra@diku.dk
......@@ -45,7 +45,7 @@ AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource)
## this should come after `AC_PROG_CC'
GNOME_COMPILE_WARNINGS
set_more_warnings=yes
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
if test "$GCC" = "yes" -a "x$set_more_warnings" != "xno"; then
for option in -Wsign-promo -Wsign-compare -Wpointer-arith -Wnested-externs -Wchar-subscripts -Wwrite-strings; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
......@@ -69,7 +69,7 @@ AC_ARG_WITH(long_double,
[--{with,without}-long-double Use long double for floating point],
[if test "x$withval" = xyes; then
AC_C_LONG_DOUBLE
if test "$ac_cv_c_long_double" != "yes"; then
if test "x$ac_cv_c_long_double" != "xyes"; then
AC_MSG_ERROR([Long double type is not available.])
fi
......@@ -85,7 +85,7 @@ AC_ARG_WITH(long_double,
,
AC_CHECK_LIB(sunmath,
$ldfunc,
[ if test "$need_sunmath" = "no"; then
[ if test "x$need_sunmath" = "xno"; then
# FIXME: better idea?
LDFLAGS="$LDFLAGS -L/opt/SUNWspro/lib -R/opt/SUNWspro/lib -lsunmath"
sunmathinclude=`ls -d /opt/SUNWspro/*/include/cc | tail -1`
......@@ -95,14 +95,14 @@ AC_ARG_WITH(long_double,
AC_MSG_ERROR([Long doubles require the $ldfunc function.]),
-L/opt/SUNWspro/lib $GNUMERIC_LIBS)))
done
if test "$need_sunmath" = "yes"; then
if test "x$need_sunmath" = "xyes"; then
AC_CHECK_HEADERS([sunmath.h floatingpoint.h],
,
AC_MSG_ERROR([Long doubles require the sunmath.h header.]))
fi
AC_CHECK_FUNCS(modfl frexpl ldexpl strtold string_to_decimal decimal_to_quadruple)
if test "$ac_cv_func_strtold" = "yes"; then
if test "x$ac_cv_func_strtold" = "xyes"; then
AC_MSG_CHECKING([if we must prototype strtold ourselves])
AC_TRY_RUN([
#include <stdlib.h>
......@@ -119,15 +119,15 @@ AC_ARG_WITH(long_double,
AC_DEFINE(MUST_PROTOTYPE_STRTOLD)],
AC_MSG_RESULT(assuming not));
true
elif test "$ac_cv_func_string_to_decimal" = "yes" -a \
"$ac_cv_func_decimal_to_quadruple" = "yes" -a \
"$ac_cv_header_floatingpoint_h" = "yes"; then
elif test "x$ac_cv_func_string_to_decimal" = "xyes" -a \
"x$ac_cv_func_decimal_to_quadruple" = "xyes" -a \
"x$ac_cv_header_floatingpoint_h" = "xyes"; then
true
else
AC_MSG_WARN([You lack the strtold function -- precision will be impaired])
fi
if test "$ac_cv_func_modfl" != "yes"; then
if test "x$ac_cv_func_modfl" != "xyes"; then
AC_MSG_WARN([You lack the modfl function -- precision will be impaired])
fi
......
......@@ -288,6 +288,7 @@ figures/zoom.png
docname = gnumeric
lang = C
omffile = gnumeric-C.omf
sgml_ents = \
analysis-tools.sgml \
authors.sgml \
......
......@@ -4,12 +4,6 @@
<sect1 id="translating">
<title>Translating Gnumeric</title>
<para>
WARNING -- Do not translate the function descriptions yet. It
is still undecided if the descriptions will stay in the .po
files or if they should be moved into doc/.
</para>
<para>
There are a couple of things that should be kept in mind when
translating Gnumeric. Gnumeric, unlike regular applications
......
......@@ -38,12 +38,21 @@ doc_DATA = index.html
sgml_files = $(sgml_ents) $(docname).sgml
omffile = gnumeric-C.omf
omf_dir=$(top_srcdir)/omf-install
EXTRA_DIST = $(sgml_files) $(doc_DATA) $(figs)
EXTRA_DIST = $(sgml_files) $(doc_DATA) $(omffile) $(figs)
CLEANFILES = omf_timestamp
all: index.html
all: index.html omf
omf: omf_timestamp
omf_timestamp: $(omffile)
-for file in $(omffile); do \
scrollkeeper-preinstall $(docdir)/$(docname).sgml $(srcdir)/$$file $(omf_dir)/$$file; \
done
touch omf_timestamp
index.html: $(docname)/index.html
-cp $(docname)/index.html .
......@@ -80,10 +89,12 @@ app-dist-hook: index.html
cp $(srcdir)/topic.dat $(distdir); \
fi
install-data-am: index.html
install-data-am: index.html omf
-$(mkinstalldirs) $(DESTDIR)$(docdir)/stylesheet-images
-$(mkinstalldirs) $(DESTDIR)$(docdir)/figures
-cp $(srcdir)/$(sgml_files) $(DESTDIR)$(docdir)
-for file in $(sgml_files); do \
cp $(srcdir)/$$file $(DESTDIR)$(docdir) ; \
done
-for file in $(srcdir)/$(docname)/*.html $(srcdir)/$(docname)/*.css; do \
basefile=`echo $$file | sed -e 's,^.*/,,'`; \
$(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$$basefile; \
......
omf_dest_dir=$(datadir)/omf/gnumeric
scrollkeeper_localstate_dir = $(SCROLLKEEPER_LOCALSTATE_DIR)
scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
......
2002-02-26 Jody Goldberg <jody@gnome.org>
* ms-escher.c (ms_escher_get_data) : clarify the interface.
(ms_escher_read_BSE) : fix call to ms_escher_get_data.
(ms_escher_read_Sp) : ditto.
(ms_escher_read_ClientAnchor) : ditto.
(ms_escher_read_OPT) : ditto.
(ms_escher_read_container) : ditto.
(ms_escher_read_Blip) : support decompress and validate emf & wmf.
* ms-excel-util.c (excel_iconv_open_for_import) : recognize that
cp1200 makes no sense in that context and fall back to 8859-1.
2002-02-24 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=72459
* ms-formula-write.c (write_node) : fix typo.
2002-02-26 Morten Welinder <terra@diku.dk>
* ms-excel-read.c (biff_get_rk): Improve precision ever so
......
This diff is collapsed.
......@@ -51,6 +51,9 @@
#include <libgnome/gnome-i18n.h>
#include <locale.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnumeric:read"
#define N_BYTES_BETWEEN_PROGRESS_UPDATES 0x1000
/* #define NO_DEBUG_EXCEL */
......@@ -2492,7 +2495,6 @@ ms_excel_workbook_new (MsBiffVersion ver)
ans->global_string_max = 0;
ans->read_drawing_group = 0;
ans->warn_unsupported_images = TRUE;
ans->warn_unsupported_graphs = TRUE;
return ans;
}
......
......@@ -98,7 +98,6 @@ typedef struct _ExcelWorkbook
char **global_strings;
guint32 global_string_max;
gboolean warn_unsupported_images : 1;
gboolean warn_unsupported_graphs : 1;
/**
......
......@@ -457,13 +457,23 @@ excel_iconv_open_for_import (guint codepage)
#ifndef HAVE_ICONV
return (excel_iconv_t)(-1);
#else
char* src_charset;
iconv_t iconv_handle;
src_charset = g_strdup_printf ("CP%d",codepage);
iconv_handle = iconv_open (get_locale_charset_name (), src_charset);
g_free(src_charset);
return iconv_handle;
/* What the hell ?
* this makes no sense. UCS2 is a 2 byte encoding.
* We only use this for 1 byte strings. What does it mean
* to say that all strings are 2 byte, then store them a 1 byte.
* Make a big big guess and just assume 8859-1
*/
if (codepage != 1200) {
char* src_charset = g_strdup_printf ("CP%d", codepage);
iconv_handle = iconv_open ("UTF-8", src_charset);
g_free (src_charset);
if (iconv_handle != (excel_iconv_t)(-1))
return iconv_handle;
g_warning ("Unknown codepage %d", codepage);
}
return iconv_open ("UTF-8", "ISO-8859-1");
#endif
}
......
......@@ -6,9 +6,8 @@
* Copyright (C) 2000 Jody Goldberg (jody@gnome.org)
*
* 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.
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
......
......@@ -4,7 +4,6 @@
* Author:
* Miguel de Icaza 1999 (miguel@kernel.org)
*
* g_unichar_to_utf8: Copyright Red Hat, Inc
* i18n of printing: Copyright 2001 by Vlad Harchev <hvv@hippo.ru>
*/
#include <gnumeric-config.h>
......@@ -57,51 +56,6 @@ print_hline (GnomePrintContext *context,
gnome_print_stroke (context);
}
#ifndef _PROPER_I18N
/*
* print_show_iso8859_1
*
* Like gnome_print_show, but expects an ISO 8859.1 string.
*
* NOTE: This function got introduced when gnome-print switched to UTF-8,
* and will disappear again once Gnumeric makes the switch. Deprecated at
* birth!
*/
int
print_show_iso8859_1 (GnomePrintContext *pc, char const *text)
{
gchar *p, *utf, *udyn, ubuf[4096];
gint len, ret, i;
g_return_val_if_fail (pc && text, -1);
if (!*text)
return 0;
/* We need only length * 2, because iso-8859-1 is encoded in 1-2 bytes */
len = strlen (text);
if (len * 2 > sizeof (ubuf)) {
udyn = g_new (gchar, len * 2);
utf = udyn;
} else {
udyn = NULL;
utf = ubuf;
}
p = utf;
for (i = 0; i < len; i++) {
p += g_unichar_to_utf8 (((guchar *) text)[i], p);
}
ret = gnome_print_show_sized (pc, utf, p - utf);
if (udyn)
g_free (udyn);
return ret;
}
#endif
int
print_show (GnomePrintContext *pc, char const *text)
{
......
......@@ -42,6 +42,13 @@ typedef struct {
static SheetObjectClass *sheet_object_image_parent_class;
/**
* sheet_object_image_new :
* @type :
* @data :
* @data_len
* @copy_data :
*/
SheetObject *
sheet_object_image_new (char const *type,
guint8 *data,
......@@ -133,7 +140,9 @@ soi_get_pixbuf (SheetObjectImage *soi, double scale)
#warning Add optional use of libwmf here to handle wmf
loader = gdk_pixbuf_loader_new ();
if (!gdk_pixbuf_loader_write (loader, soi->data, soi->data_len, &err)) {
if (!strcmp (soi->type, "emf") ||
!strcmp (soi->type, "wmf") ||
!gdk_pixbuf_loader_write (loader, soi->data, soi->data_len, &err)) {
if (!soi->dumped) {
static int count = 0;
......
......@@ -1123,19 +1123,14 @@ static void
wbcg_progress_message_set (CommandContext *cc, gchar const *msg)
{
WorkbookControlGUI *wbcg = WORKBOOK_CONTROL_GUI (cc);
GtkProgress *progress;
GtkProgressBar *progress;
#ifdef ENABLE_BONOBO
progress = GTK_PROGRESS (wbcg->progress_bar);
progress = GTK_PROGRESS_BAR (wbcg->progress_bar);
#else
progress = gnome_appbar_get_progress (wbcg->appbar);
#endif
if (msg != NULL) {
gtk_progress_set_format_string (progress, msg);
gtk_progress_set_show_text (progress, TRUE);
} else {
gtk_progress_set_show_text (progress, FALSE);
}
gtk_progress_bar_set_text (progress, msg);
}
static void
......@@ -3121,7 +3116,7 @@ static GnomeUIInfo workbook_menu_data [] = {
};
static GnomeUIInfo workbook_menu_help [] = {
GNOMEUIINFO_HELP ("gnumeric"),
GNOMEUIINFO_HELP ((char *)"gnumeric"),
GNOMEUIINFO_MENU_ABOUT_ITEM (cb_help_about, NULL),
GNOMEUIINFO_END
};
......
......@@ -438,15 +438,13 @@ wbcg_set_entry (WorkbookControlGUI *wbcg, GnumericExprEntry *entry)
}
static void
guru_set_focus (GtkWidget *window, GtkWidget *focus_widget,
WorkbookControlGUI *wbcg)
cb_guru_set_focus (GtkWidget *window, GtkWidget *focus_widget,
WorkbookControlGUI *wbcg)
{
if (focus_widget != NULL && IS_GNUMERIC_EXPR_ENTRY (focus_widget->parent)) {
wbcg_set_entry (wbcg,
GNUMERIC_EXPR_ENTRY (focus_widget->parent));
} else {
wbcg_set_entry (wbcg, NULL);
}
GnumericExprEntry *gee = NULL;
if (focus_widget != NULL && IS_GNUMERIC_EXPR_ENTRY (focus_widget->parent))
gee = GNUMERIC_EXPR_ENTRY (focus_widget->parent);
wbcg_set_entry (wbcg, gee);
}
void
......@@ -470,7 +468,7 @@ wbcg_edit_attach_guru (WorkbookControlGUI *wbcg, GtkWidget *guru)
g_signal_connect (G_OBJECT (guru),
"set-focus",
G_CALLBACK (guru_set_focus), wbcg);
G_CALLBACK (cb_guru_set_focus), wbcg);
}
void
......
......@@ -6,9 +6,8 @@
* Copyright (C) 2000 Jody Goldberg (jody@gnome.org)
*
* 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.
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment