Commit 81452586 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Fix prototype. (ms_excel_read_cleanup): New function.

2001-04-01  Morten Welinder  <terra@diku.dk>

	* ms-excel-read.c (ms_excel_default_palette): Fix prototype.
	(ms_excel_read_cleanup): New function.

	* ms-excel-util.c (destroy_xl_font_widths): New function.

	* boot.c (plugin_cleanup): New function.
parent cc2fff08
2001-04-01 Morten Welinder <terra@diku.dk>
* ms-excel-read.c (ms_excel_default_palette): Fix prototype.
(ms_excel_read_cleanup): New function.
* ms-excel-util.c (destroy_xl_font_widths): New function.
* boot.c (plugin_cleanup): New function.
2001-03-31 Zbigniew Chyla <cyba@gnome.pl>
* .cvsignore: Added *.lo and *.la.
......
......@@ -24,6 +24,8 @@
#include "excel.h"
#include "ms-summary.h"
#include "boot.h"
#include "ms-excel-util.h"
#include "ms-excel-read.h"
GNUMERIC_MODULE_PLUGIN_INFO_DECL;
......@@ -53,8 +55,9 @@ MsExcelReadGbFn ms_excel_read_gb = NULL;
gboolean excel_file_probe (FileOpener const *fo, const char *filename);
void excel_file_open (FileOpener const *fo, IOContext *context, WorkbookView *new_wb_view, const char *filename);
void excel98_file_save (FileSaver const *fs, IOContext *context, WorkbookView *wb_view, const char *filename);
void excel97_file_save (FileSaver const *fs, IOContext *context, WorkbookView *wb_view, const char *filename);
void excel95_file_save (FileSaver const *fs, IOContext *context, WorkbookView *wb_view, const char *filename);
void plugin_cleanup (void);
gboolean
excel_file_probe (FileOpener const *fo, const char *filename)
......@@ -185,3 +188,15 @@ excel95_file_save (FileSaver const *fs, IOContext *context,
{
excel_save (context, wb_view, filename, MS_BIFF_V7);
}
/*
* Cleanup allocations made by this plugin.
* (Called right before we are unloaded.)
*/
void
plugin_cleanup (void)
{
destroy_xl_font_widths ();
ms_excel_read_cleanup ();
}
......@@ -919,7 +919,7 @@ EXCEL_PALETTE_ENTRY const excel_default_palette[EXCEL_DEF_PAL_LEN] = {
};
static ExcelPalette *
ms_excel_default_palette ()
ms_excel_default_palette (void)
{
static ExcelPalette *pal = NULL;
......@@ -4323,3 +4323,10 @@ ms_excel_read_workbook (IOContext *context, WorkbookView *wb_view,
gnumeric_io_error_read (context, _("Unable to locate valid MS Excel workbook"));
}
void
ms_excel_read_cleanup (void)
{
ms_excel_palette_destroy (ms_excel_default_palette ());
}
......@@ -127,4 +127,6 @@ extern void ms_excel_unexpected_biff (BiffQuery *q,
char const *state,
int debug_level);
void ms_excel_read_cleanup (void);
#endif
......@@ -273,6 +273,16 @@ init_xl_font_widths (void)
(gpointer)(widths+i));
}
void
destroy_xl_font_widths (void)
{
if (xl_font_width_hash) {
g_hash_table_destroy (xl_font_width_hash);
xl_font_width_hash = NULL;
}
}
double
lookup_font_base_char_width_new (char const * const name, double size_pts,
gboolean const is_default)
......
......@@ -52,4 +52,6 @@ double
lookup_font_base_char_width_new (char const * const name, double size_pts,
gboolean const is_default);
void destroy_xl_font_widths (void);
#endif
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