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

We can now make distcheck

Requires a GAL update, and a gtk+ update

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

	* src/item-cursor.c (item_cursor_tip_setlabel) : enable now that the
	  canvas bug is fixed.

	* src/sheet-control-gui.c (cb_hscrollbar_adjust_bounds) : new.
	(cb_vscrollbar_adjust_bounds) : new.

	* src/gui-util.c (gtk_button_stock_alignment_set) : new.
	(gnumeric_init_help_button) : new.

	* src/gnumeric-canvas.h : Move declaration of
	  GnumericCanvasSlideHandler here.

	* src/gnumeric-canvas.c (gnm_canvas_guru_key) : forward to the entry,
	  not the GnumericExprEntry wrapper.
	(gnm_canvas_key_mode_sheet) : ditto.

	* src/formats.c (cell_format_classify) : handle general.

	* src/file-priv.h : Inherit from GObject.

	* src/complete-sheet.c (complete_sheet_finalize) : call class_peek
	  here to avoid potential reference problems.

	* src/commands.c (cmd_set_text) : doh!  fix multi-line text.
	(cmd_autoformat) : const.

	* src/cell.c (cell_relocate) : const.
	* src/clipboard.c (paste_cell_with_operation) : const.
	(paste_cell) : ditto.

	* src/application.c (application_init) : add jimmac's expr-entry icon.

	* src/Makefile.am : distribute the marshaller.list

	s/GtkType/GType/
	s/GtkSignalFunc/GCallback/
	s/gtk_signal_connect/g_signal_connect/  + reformating.
	s/GTK_CHECK_CAST/G_TYPE_CHECK_INSTANCE_CAST/
	s/GTK_CHECK_TYPE/G_TYPE_CHECK_CLASS_CAST/
	s/GTK_CHECK_CLASS_CAST/G_TYPE_CHECK_INSTANCE_TYPE/
	s/GTK_CHECK_CLASS_TYPE/G_TYPE_CHECK_CLASS_TYPE/

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

	* src/stf.c (stf_init) : Make the names of the text import/export
	  clearer.
parent e4029a66
......@@ -7,18 +7,17 @@ release, and longer term bugs.
Release Critical
----------------
1.2 Targets
-----------
Pending Patches
---------------
Yukihiro's IM support
Yukihiro's IM support (broken in the context of gnome2)
Long term breakage
------------------
- gnumeric_editable_enters the arguments are backwards. This is being called
on the editable, not the dialog.
- Auto-format (the "style on a range" kind) assumes a certain data layout,
such as a final "Total" row. I would like an extension that would allow
me to ignore the final line of the template. This could probably be
......@@ -36,9 +35,6 @@ Long term breakage
- Audit all fixed-length buffers. Most non-time-critical can be replaced
by proper usage of g_strdup_printf.
- Fix user visible strings "Foo :" to be "Foo:". (The former is a French
habit that we should let the French l10n team handle.)
- Fix "-geometry" handling:
: When an anchor is specified (e.g., "+0+0"), the window manager should
not be asked to place the window. (Under twx, for example, the user
......
2002-02-15 Jody Goldberg <jody@gnome.org>
* src/item-cursor.c (item_cursor_tip_setlabel) : enable now that the
canvas bug is fixed.
* src/sheet-control-gui.c (cb_hscrollbar_adjust_bounds) : new.
(cb_vscrollbar_adjust_bounds) : new.
* src/gui-util.c (gtk_button_stock_alignment_set) : new.
(gnumeric_init_help_button) : new.
* src/gnumeric-canvas.h : Move declaration of
GnumericCanvasSlideHandler here.
* src/gnumeric-canvas.c (gnm_canvas_guru_key) : forward to the entry,
not the GnumericExprEntry wrapper.
(gnm_canvas_key_mode_sheet) : ditto.
* src/formats.c (cell_format_classify) : handle general.
* src/file-priv.h : Inherit from GObject.
* src/complete-sheet.c (complete_sheet_finalize) : call class_peek
here to avoid potential reference problems.
* src/commands.c (cmd_set_text) : doh! fix multi-line text.
(cmd_autoformat) : const.
* src/cell.c (cell_relocate) : const.
* src/clipboard.c (paste_cell_with_operation) : const.
(paste_cell) : ditto.
* src/application.c (application_init) : add jimmac's expr-entry icon.
* src/Makefile.am : distribute the marshaller.list
s/GtkType/GType/
s/GtkSignalFunc/GCallback/
s/gtk_signal_connect/g_signal_connect/ + reformating.
s/GTK_CHECK_CAST/G_TYPE_CHECK_INSTANCE_CAST/
s/GTK_CHECK_TYPE/G_TYPE_CHECK_CLASS_CAST/
s/GTK_CHECK_CLASS_CAST/G_TYPE_CHECK_INSTANCE_TYPE/
s/GTK_CHECK_CLASS_TYPE/G_TYPE_CHECK_CLASS_TYPE/
2002-02-11 Jody Goldberg <jody@gnome.org>
* src/stf.c (stf_init) : Make the names of the text import/export
clearer.
2002-02-12 Morten Welinder <terra@diku.dk>
* src/io-context.c (value_io_progress_update): Correct assertion.
......
......@@ -31,6 +31,7 @@ Jody:
* move libole2 req into excel plugin, and make it optional.
* guruify autoformat dialog, and update autoformat code.
* move format from cell -> value.
* add an icon to the expr-entry (thanks Jacub)
Jon Kåre:
* More correct import of "automatic" colors from Excel
......
2002-02-15 Jody Goldberg <jody@gnome.org>
* src/item-cursor.c (item_cursor_tip_setlabel) : enable now that the
canvas bug is fixed.
* src/sheet-control-gui.c (cb_hscrollbar_adjust_bounds) : new.
(cb_vscrollbar_adjust_bounds) : new.
* src/gui-util.c (gtk_button_stock_alignment_set) : new.
(gnumeric_init_help_button) : new.
* src/gnumeric-canvas.h : Move declaration of
GnumericCanvasSlideHandler here.
* src/gnumeric-canvas.c (gnm_canvas_guru_key) : forward to the entry,
not the GnumericExprEntry wrapper.
(gnm_canvas_key_mode_sheet) : ditto.
* src/formats.c (cell_format_classify) : handle general.
* src/file-priv.h : Inherit from GObject.
* src/complete-sheet.c (complete_sheet_finalize) : call class_peek
here to avoid potential reference problems.
* src/commands.c (cmd_set_text) : doh! fix multi-line text.
(cmd_autoformat) : const.
* src/cell.c (cell_relocate) : const.
* src/clipboard.c (paste_cell_with_operation) : const.
(paste_cell) : ditto.
* src/application.c (application_init) : add jimmac's expr-entry icon.
* src/Makefile.am : distribute the marshaller.list
s/GtkType/GType/
s/GtkSignalFunc/GCallback/
s/gtk_signal_connect/g_signal_connect/ + reformating.
s/GTK_CHECK_CAST/G_TYPE_CHECK_INSTANCE_CAST/
s/GTK_CHECK_TYPE/G_TYPE_CHECK_CLASS_CAST/
s/GTK_CHECK_CLASS_CAST/G_TYPE_CHECK_INSTANCE_TYPE/
s/GTK_CHECK_CLASS_TYPE/G_TYPE_CHECK_CLASS_TYPE/
2002-02-11 Jody Goldberg <jody@gnome.org>
* src/stf.c (stf_init) : Make the names of the text import/export
clearer.
2002-02-12 Morten Welinder <terra@diku.dk>
* src/io-context.c (value_io_progress_update): Correct assertion.
......
2002-02-15 Jody Goldberg <jody@gnome.org>
* src/item-cursor.c (item_cursor_tip_setlabel) : enable now that the
canvas bug is fixed.
* src/sheet-control-gui.c (cb_hscrollbar_adjust_bounds) : new.
(cb_vscrollbar_adjust_bounds) : new.
* src/gui-util.c (gtk_button_stock_alignment_set) : new.
(gnumeric_init_help_button) : new.
* src/gnumeric-canvas.h : Move declaration of
GnumericCanvasSlideHandler here.
* src/gnumeric-canvas.c (gnm_canvas_guru_key) : forward to the entry,
not the GnumericExprEntry wrapper.
(gnm_canvas_key_mode_sheet) : ditto.
* src/formats.c (cell_format_classify) : handle general.
* src/file-priv.h : Inherit from GObject.
* src/complete-sheet.c (complete_sheet_finalize) : call class_peek
here to avoid potential reference problems.
* src/commands.c (cmd_set_text) : doh! fix multi-line text.
(cmd_autoformat) : const.
* src/cell.c (cell_relocate) : const.
* src/clipboard.c (paste_cell_with_operation) : const.
(paste_cell) : ditto.
* src/application.c (application_init) : add jimmac's expr-entry icon.
* src/Makefile.am : distribute the marshaller.list
s/GtkType/GType/
s/GtkSignalFunc/GCallback/
s/gtk_signal_connect/g_signal_connect/ + reformating.
s/GTK_CHECK_CAST/G_TYPE_CHECK_INSTANCE_CAST/
s/GTK_CHECK_TYPE/G_TYPE_CHECK_CLASS_CAST/
s/GTK_CHECK_CLASS_CAST/G_TYPE_CHECK_INSTANCE_TYPE/
s/GTK_CHECK_CLASS_TYPE/G_TYPE_CHECK_CLASS_TYPE/
2002-02-11 Jody Goldberg <jody@gnome.org>
* src/stf.c (stf_init) : Make the names of the text import/export
clearer.
2002-02-12 Morten Welinder <terra@diku.dk>
* src/io-context.c (value_io_progress_update): Correct assertion.
......
......@@ -31,6 +31,7 @@ libbonoboui-2.0 >= 1.106.0
libgnomeprint-2.0 >= 1.106.0
libgnomeprintui-2.0 >= 1.106.0
libglade-2.0 >= 1.99.4
libgnomecanvas-2.0 >= 1.110.0
libxml-2.0 >= 2.4.12
])
AC_SUBST(GNUMERIC_LIBS)
......@@ -395,6 +396,8 @@ gnumeric_datadir="${datadir}/gnumeric/${gnumeric_version}"
gnumeric_libdir="${libdir}/gnumeric/${gnumeric_version}"
gnumeric_plugindir="${gnumeric_libdir}/plugins"
gnumeric_gladedir="${gnumeric_datadir}/glade"
gnumeric_icondir="${datadir}/pixmaps/gnumeric"
gnumeric_autoformatdir="${gnumeric_datadir}/autoformat-templates"
dnl Export to gnumeric-config.h
......@@ -408,6 +411,7 @@ AC_SUBST(gnumeric_version)
AC_SUBST(gnumeric_libdir)
AC_SUBST(gnumeric_plugindir)
AC_SUBST(gnumeric_gladedir)
AC_SUBST(gnumeric_icondir)
AC_SUBST(gnumeric_autoformatdir)
AC_SUBST(gnumeric_bonobo_enabled)
......
......@@ -7,7 +7,7 @@ gnumeric_plugin_applixdir = $(gnumeric_plugindir)/applix
xmldir = $(gnumeric_plugin_applixdir)
gnumeric_plugin_applix_LTLIBRARIES = applix.la
applix_la_LDFLAGS = -module -avoid-version
applix_la_SOURCES = boot.c applix.h applix-read.c
applix_la_SOURCES = boot.c applix.h applix-read.c applix-write.c
xml_in_files = plugin.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
......
/* vim: set sw=8: */
/*
* applix.c : Routines to read applix version 4 spreadsheets.
* applix-read.c : Routines to read applix version 4 spreadsheets.
*
* I have no docs or specs for this format that are useful.
* This is a guess based on some sample sheets.
*
* Copyright (C) 2000-2001 Jody Goldberg (jody@gnome.org)
* Copyright (C) 2000-2002 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
......@@ -25,7 +25,6 @@
*/
#include <gnumeric-config.h>
#include <gnumeric.h>
#include <libgnome/libgnome.h>
#include "applix.h"
#include "application.h"
#include "expr.h"
......@@ -49,8 +48,7 @@
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
static int debug_applix_read = 1;
#include <libgnome/gnome-i18n.h>
typedef struct {
FILE *file;
......@@ -68,11 +66,19 @@ typedef struct {
int zoom;
} ApplixReadState;
/* #define NO_DEBUG_APPLIX */
#ifndef NO_DEBUG_APPLIX
#define d(level, code) do { if (debug_applix_read > level) { code } } while (0)
static int debug_applix_read = 0;
#else
#define d(level, code)
#endif
/* The maximum numer of character potentially involved in a new line */
#define MAX_END_OF_LINE_SLOP 16
static int applix_parse_error (ApplixReadState *,
char const *format, ...) G_GNUC_PRINTF (2, 3);
static int applix_parse_error (ApplixReadState *, char const *format, ...)
G_GNUC_PRINTF (2, 3);
static int
applix_parse_error (ApplixReadState *state, char const *format, ...)
......@@ -82,7 +88,7 @@ applix_parse_error (ApplixReadState *state, char const *format, ...)
if (state->parse_error == NULL)
state->parse_error = error_info_new_str (
_("Parse error while reading Applix file."));
_("Parse error while reading Applix file."));
va_start (args, format);
err = g_strdup_vprintf (format, args);
......@@ -1131,11 +1137,9 @@ applix_read_impl (ApplixReadState *state)
ungetc ((unsigned char)'C', state->file); /* restore the leading 'C' */
}
#ifndef NO_APPLIX_DEBUG
if (debug_applix_read > 0)
printf ("Applix load '%s' : Saved with revision %d.%d\n",
real_name, major_rev, minor_rev);
#endif
d (0, printf ("Applix load '%s' : Saved with revision %d.%d\n",
real_name, major_rev, minor_rev););
if (applix_read_colormap (state))
return applix_parse_error (state, "invalid colormap");
if (applix_read_typefaces (state))
......
......@@ -6,6 +6,7 @@
#include <stdio.h>
gboolean applix_read_header (FILE *file);
void applix_read (IOContext *io_context, WorkbookView *wb_view, FILE *file);
void applix_read (IOContext *io_context, WorkbookView *wb_view, FILE *file);
void applix_write (IOContext *io_context, WorkbookView *wb_view, FILE *file);
#endif /* PLUGIN_APPLIX_H */
......@@ -4,7 +4,7 @@
* boot.c : Installation and bootstraping routines to
* register the applix plugin.
*
* Copyright (C) 2000-2001 Jody Goldberg (jody@gnome.org)
* Copyright (C) 2000-2002 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
......@@ -33,45 +33,48 @@
#include <stdio.h>
#include <string.h>
#include <gnome.h>
GNUMERIC_MODULE_PLUGIN_INFO_DECL;
gboolean applix_file_probe (GnumFileOpener const *fo, const gchar *file_name,
gboolean applix_file_probe (GnumFileOpener const *fo, char const *file_name,
FileProbeLevel pl);
void applix_file_open (GnumFileOpener const *fo, IOContext *io_context,
WorkbookView *wb_view, const char *filename);
WorkbookView *wb_view, char const *filename);
gboolean
applix_file_probe (GnumFileOpener const *fo, const gchar *file_name, FileProbeLevel pl)
applix_file_probe (GnumFileOpener const *fo, char const *file_name, FileProbeLevel pl)
{
FILE *file;
gboolean res;
file = fopen (file_name, "r");
gboolean res = FALSE;
FILE *file = fopen (file_name, "r");
if (file == NULL) {
res = FALSE;
} else {
res = applix_read_header (file);
fclose (file);
}
return res;
}
void
applix_file_open (GnumFileOpener const *fo, IOContext *io_context,
WorkbookView *wb_view, const char *filename)
WorkbookView *wb_view, char const *filename)
{
FILE *file;
ErrorInfo *error;
file = gnumeric_fopen_error_info (filename, "r", &error);
if (file == NULL) {
gnumeric_io_error_info_set (io_context, error);
} else {
FILE *file = gnumeric_fopen_error_info (filename, "r", &error);
if (file != NULL) {
applix_read (io_context, wb_view, file);
fclose (file);
}
} else
gnumeric_io_error_info_set (io_context, error);
}
void
applix_file_save (GnumFileSaver const *fs, IOContext *io_context,
WorkbookView *wb_view, char const *filename)
{
ErrorInfo *error;
FILE *file = gnumeric_fopen_error_info (filename, "w", &error);
if (file != NULL) {
applix_write (io_context, wb_view, file);
fclose (file);
} else
gnumeric_io_error_info_set (io_context, error);
}
......@@ -57,7 +57,7 @@ static Value *
func_opt_bs_call (FunctionEvalInfo *ei, Value *argv [])
{
gnum_float S, X, stddev, t, r;
gnum_float d1, d2, C;
X = value_get_as_float (argv[0]);
......@@ -147,7 +147,7 @@ func_opt_bs_call_theta (FunctionEvalInfo *ei, Value *argv[])
d2 = calc_d2 (X, S, stddev, t, r);
theta = -(S * stddev * calc_Np (d1)) / (2.0 * sqrt (t))
-(r * X * calc_N (d2) * exp (-r * t));
return value_new_float (theta);
}
......
......@@ -43,7 +43,7 @@ typedef struct {
gint line_no;
gchar *line;
gint line_len, alloc_line_len;
Sheet *sheet;
} DifInputContext;
......
......@@ -204,7 +204,7 @@ ms_biff_put_len_next (BiffPut *bp, guint16 opcode, guint32 len)
bp->data = g_new (guint8, len);
bp->data_malloced = 1;
}
return bp->data;
}
void
......
......@@ -300,7 +300,7 @@ BC_R(ai)(ExcelChartHandler const *handle,
/* Rest are 0 */
if (flags&0x01) {
StyleFormat *fmt = ms_container_get_fmt (&s->container,
StyleFormat *fmt = ms_container_get_fmt (&s->container,
MS_OLE_GET_GUINT16 (q->data + 4));
d (2, puts ("Has Custom number format"););
if (fmt != NULL) {
......@@ -986,7 +986,7 @@ BC_R(defaulttext)(ExcelChartHandler const *handle,
ExcelChartReadState *s, BiffQuery *q)
{
guint16 const tmp = MS_OLE_GET_GUINT16 (q->data);
d (2, printf ("applicability = %hd\n", tmp););
/*
......@@ -1123,7 +1123,7 @@ static gboolean
BC_R(ifmt)(ExcelChartHandler const *handle,
ExcelChartReadState *s, BiffQuery *q)
{
StyleFormat *fmt = ms_container_get_fmt (&s->container,
StyleFormat *fmt = ms_container_get_fmt (&s->container,
MS_OLE_GET_GUINT16 (q->data));
if (fmt != NULL) {
......@@ -1468,7 +1468,7 @@ BC_R(pie)(ExcelChartHandler const *handle,
radians = MS_OLE_GET_GUINT16 (q->data);
radians = (radians * 2. * M_PI / 360.);
tmp = xmlNewChild (fmt, fmt->ns, (xmlChar *)"radians_of_first_pie", NULL);
xml_node_set_double (fmt, NULL, radians, -1);
xml_node_set_double (fmt, NULL, radians, -1);
if (s->container.ver >= MS_BIFF_V8) {
guint16 const flags = MS_OLE_GET_GUINT16 (q->data+4);
......
......@@ -727,7 +727,7 @@ ms_escher_read_ClientAnchor (MSEscherState *state, MSEscherHeader *h)
guint8 *anchor = g_malloc (MS_ANCHOR_SIZE);
memcpy (anchor, data, MS_ANCHOR_SIZE);
ms_escher_header_add_attr (h,
ms_escher_header_add_attr (h,
ms_object_attr_new_ptr (MS_OBJ_ATTR_ANCHOR,
anchor));
......@@ -1772,10 +1772,10 @@ ms_escher_read_OPT (MSEscherState *state, MSEscherHeader *h)
}
if (id & MS_OBJ_ATTR_IS_INT_MASK)
ms_escher_header_add_attr (h,
ms_escher_header_add_attr (h,
ms_object_attr_new_uint (id, val));
else if (id != MS_OBJ_ATTR_NONE)
ms_escher_header_add_attr (h,
ms_escher_header_add_attr (h,
ms_object_attr_new_flag (id));
}
if (needs_free)
......
......@@ -1211,7 +1211,7 @@ ms_excel_get_style_from_xf (ExcelSheet *esheet, guint16 xfidx)
else
font_color = ms_excel_palette_get (esheet->wb->palette,
font_index);
switch (back_index) {
case 0:
back_color = style_color_white ();
......@@ -3486,7 +3486,7 @@ ms_excel_read_cf (BiffQuery *q, ExcelSheet *esheet)
* uint8 : 0x04 = font | 0x10 = border | 0x20 = colour
* 0x02 : ?
* 0x00 : ?
*
*
* font == 118
* border == 8
* colour == 4
......@@ -3554,7 +3554,7 @@ ms_excel_read_condfmt (BiffQuery *q, ExcelSheet *esheet)
Range region;
unsigned i;
guint8 const *data;
g_return_if_fail (q->length >= 14);
num_fmts = MS_OLE_GET_GUINT16 (q->data + 0);
......@@ -3700,12 +3700,12 @@ ms_excel_read_dv (BiffQuery *q, ExcelSheet *esheet)
expr2 = ms_sheet_parse_expr_internal (esheet,
expr2_dat, expr2_len);
d (1, printf ("style = %d, type = %d, op = %d\n",
d (1, printf ("style = %d, type = %d, op = %d\n",
style, type, op););
mstyle = mstyle_new ();
mstyle_set_validation (mstyle,
validation_new (style, type, op, error_title, error_msg,
validation_new (style, type, op, error_title, error_msg,
expr1, expr2, options & 0x0100, options & 0x0200));
for (ptr = ranges; ptr != NULL ; ptr = ptr->next) {
......@@ -4282,11 +4282,11 @@ ms_excel_read_window1 (BiffQuery *q, WorkbookView *wb_view)
/* In 1/20ths of a point */
guint16 const xPos = MS_OLE_GET_GUINT16 (q->data + 0);
guint16 const yPos = MS_OLE_GET_GUINT16 (q->data + 2);
#endif
#endif
guint16 const width = MS_OLE_GET_GUINT16 (q->data + 4);
guint16 const height = MS_OLE_GET_GUINT16 (q->data + 6);
guint16 const options = MS_OLE_GET_GUINT16 (q->data + 8);
#if 0
#if 0
guint16 const selTab = MS_OLE_GET_GUINT16 (q->data + 10);
guint16 const firstTab= MS_OLE_GET_GUINT16 (q->data + 12);
guint16 const tabsSel = MS_OLE_GET_GUINT16 (q->data + 14);
......
......@@ -533,11 +533,11 @@ excel_wcstombs (char *outbuf, wchar_t *wcs, size_t length)
(excel_iconv_t)(-1);
#else
iconv_open (get_locale_charset_name (), "utf8");
#endif
#endif
for(i = 0; i < length; i++) {
wchar_t wc = wcs[i];
#ifdef HAVE_ICONV
#ifdef HAVE_ICONV
if (cd != (excel_iconv_t)(-1)) {
char utf8buf[9];
size_t out_len = 10;
......@@ -548,18 +548,18 @@ excel_wcstombs (char *outbuf, wchar_t *wcs, size_t length)
* and names for UCS2. Utf8 is known to every one.
*/
size_t inbuf_len = g_unichar_to_utf8((gint)wc, (gchar*)utf8buf);
iconv((iconv_t)cd,&inbuf_ptr,&inbuf_len,&outbuf,&out_len);
if (!inbuf_len)
continue;
}
/* find a replacement for wc*/
/* find a replacement for wc*/
if (wc < 128) /* very strange - why can't convert? */
*(outbuf++) = (char)wc;
#else
if (wc < 256) /* assume it's ISO-8869-1*/
if (wc < 256) /* assume it's ISO-8869-1*/
*(outbuf++) = (unsigned char)wc;
#endif
#endif
else {
const char* str;
switch (wc) {
......
......@@ -54,12 +54,12 @@ lookup_font_base_char_width_new (char const * const name, double size_pts,
gboolean const is_default);
/* a group of iconv_* - like functions, with safe fallbacks if iconv is
/* a group of iconv_* - like functions, with safe fallbacks if iconv is
* unavailable. Sorry for stupid prefix - Vlad Harchev <hvv@hippo.ru>
*/
typedef void* excel_iconv_t; /*can't be NULL or (-1) */
/*
/*
* this returns code of the codepage that should be used when exporting
* .xls files (it's guessed by looking at language name). Fallback is 1252.
*/
......@@ -77,11 +77,11 @@ void excel_iconv_close (excel_iconv_t handle);
* now, return value is not meaningfull at all - 0 is always returned.
*/
size_t excel_iconv (excel_iconv_t handle, char const **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
char **outbuf, size_t *outbytesleft);
/* Same as wcstombs(3), but tries to convert as much characters as possible,
* replacing the ones it can't convert with '?' or something resembling
* original character (e.g. "(C)" for copyright sign).
* replacing the ones it can't convert with '?' or something resembling
* original character (e.g. "(C)" for copyright sign).
*/
size_t excel_wcstombs(char* outbuf,wchar_t* wc,size_t length);
......
......@@ -133,7 +133,7 @@ biff_put_text (BiffPut *bp, const char *txt, MsBiffVersion ver,
for (lp = 0; lp < len; lp++) {
MS_OLE_SET_GUINT16 (data, wcbuf[lp]);
ms_biff_put_var_write (bp, data, 2);
}
}
g_free(wcbuf);
lp *= 2;
} else {
......@@ -143,12 +143,12 @@ biff_put_text (BiffPut *bp, const char *txt, MsBiffVersion ver,
char const * inbufptr = txt;
guint32 retlen;
excel_iconv (current_workbook_iconv, &inbufptr, &inbufleft,
excel_iconv (current_workbook_iconv, &inbufptr, &inbufleft,
&outbufptr, &outbufleft);
retlen = outbufptr - mbbuf;
for (lp = 0; lp < retlen; lp++) {
MS_OLE_SET_GUINT8 (data, mbbuf[lp]);