Commit 7398e325 authored by Arturo Espinosa's avatar Arturo Espinosa

Text export filter from Takashi Matsuda.



Text export filter from Takashi Matsuda.
parent a6f880c3
......@@ -129,6 +129,7 @@ plugins/perl/ext/Makefile.PL
plugins/stat/Makefile
plugins/guile/Makefile
plugins/ff-csv/Makefile
plugins/text/Makefile
intl/Makefile
po/Makefile.in
macros/Makefile
......
......@@ -17,4 +17,4 @@ else
GUILE_DIR =
endif
SUBDIRS = sample stat excel $(PYTHON) $(PERL) $(GUILE_DIR)
SUBDIRS = sample stat excel ff-csv text $(PYTHON) $(PERL) $(GUILE_DIR)
......@@ -985,7 +985,7 @@ cell_get_horizontal_align (Cell *cell)
{
g_return_val_if_fail (cell != NULL, HALIGN_LEFT);
if (cell->style->halign == HALIGN_GENERAL)
if (cell->style->halign == HALIGN_GENERAL){
if (cell->value){
if (cell->value->type== VALUE_FLOAT ||
cell->value->type == VALUE_INTEGER)
......@@ -994,7 +994,7 @@ cell_get_horizontal_align (Cell *cell)
return HALIGN_LEFT;
} else
return HALIGN_RIGHT;
else
} else
return cell->style->halign;
}
......
......@@ -2,15 +2,15 @@
#define GNUMERIC_CLIPBOARD_H
enum {
PASTE_VALUES = 0,
PASTE_FORMULAS = 1,
PASTE_FORMATS = 2,
PASTE_VALUES = 1 << 0,
PASTE_FORMULAS = 1 << 1,
PASTE_FORMATS = 1 << 2,
/* Operations that can be performed at paste time on a cell */
PASTE_OPER_ADD = 4,
PASTE_OPER_SUB = 8,
PASTE_OPER_MULT = 16,
PASTE_OPER_DIV = 32
PASTE_OPER_ADD = 1 << 3,
PASTE_OPER_SUB = 1 << 4,
PASTE_OPER_MULT = 1 << 5,
PASTE_OPER_DIV = 1 << 6
};
#define PASTE_ALL_TYPES (PASTE_FORMULAS | PASTE_VALUES | PASTE_FORMATS)
......
......@@ -791,7 +791,7 @@ static void
apply_coloring_format (Style *style, Sheet *sheet, CellList *cells)
{
double rd, gd, bd, ad;
gushort fore_change, back_change;
gushort fore_change = FALSE, back_change = FALSE;
gushort fore_red=0, fore_green=0, fore_blue=0;
gushort back_red=0xff, back_green=0xff, back_blue=0xff;
......
......@@ -791,7 +791,7 @@ static void
apply_coloring_format (Style *style, Sheet *sheet, CellList *cells)
{
double rd, gd, bd, ad;
gushort fore_change, back_change;
gushort fore_change = FALSE, back_change = FALSE;
gushort fore_red=0, fore_green=0, fore_blue=0;
gushort back_red=0xff, back_green=0xff, back_blue=0xff;
......
......@@ -7,6 +7,7 @@
#include <config.h>
#include <gnome.h>
#include "gnumeric.h"
#include "gnumeric-util.h"
#include "dialogs.h"
#include "xml-io.h"
#include "file.h"
......@@ -285,7 +286,7 @@ workbook_save_as (Workbook *wb)
current_saver = insure_saver (current_saver);
if (!current_saver)
gnumeric_notice (_("Sorry, there are no file savers loaded, I can not save"));
gnumeric_notice (wb, GNOME_MESSAGE_BOX_ERROR, _("Sorry, there are no file savers loaded, I can not save"));
else {
if (strchr (base, '.') == NULL){
name = g_strconcat (name, current_saver->extension, NULL);
......
......@@ -737,6 +737,8 @@ gnumeric_sheet_key_mode_sheet (GnumericSheet *gsheet, GdkEventKey *event)
text = cell_get_text (cell);
sheet_fill_selection_with (sheet, text);
g_free (text);
} else {
gtk_widget_grab_focus (gsheet->entry);
}
return 1;
}
......
......@@ -737,6 +737,8 @@ gnumeric_sheet_key_mode_sheet (GnumericSheet *gsheet, GdkEventKey *event)
text = cell_get_text (cell);
sheet_fill_selection_with (sheet, text);
g_free (text);
} else {
gtk_widget_grab_focus (gsheet->entry);
}
return 1;
}
......
......@@ -356,8 +356,8 @@ Workbook *workbook_new (void);
void workbook_destroy (Workbook *wb);
Workbook *workbook_new_with_sheets (int sheet_count);
void workbook_set_filename (Workbook *, char *);
void workbook_set_title (Workbook *, char *);
void workbook_set_filename (Workbook *, const char *);
void workbook_set_title (Workbook *, const char *);
Workbook *workbook_read (const char *filename);
void workbook_save_as (Workbook *);
......
......@@ -113,7 +113,7 @@ style_font_new_simple (char *font_name, int units)
if (!font){
GdkFont *gdk_font;
gdk_font = gdk_font_load (font_name);
gdk_font = gdk_fontset_load (font_name);
if (!gdk_font)
return NULL;
......@@ -121,7 +121,7 @@ style_font_new_simple (char *font_name, int units)
font = g_new0 (StyleFont, 1);
font->font_name = g_strdup (font_name);
font->units = units;
font->font = gdk_font_load (font_name);
font->font = gdk_font;
font_compute_hints (font);
......
......@@ -895,6 +895,7 @@ workbook_setup_sheets (Workbook *wb)
GTK_SIGNAL_FUNC(do_focus_sheet), wb);
gtk_notebook_set_tab_pos (GTK_NOTEBOOK (wb->notebook), GTK_POS_BOTTOM);
gtk_notebook_set_tab_border (GTK_NOTEBOOK (wb->notebook), 0);
gtk_table_attach (GTK_TABLE (wb->table), wb->notebook,
0, WB_COLS, WB_EA_SHEETS, WB_EA_SHEETS+1,
......@@ -1834,7 +1835,7 @@ workbook_feedback_set (Workbook *workbook, WorkbookFeedbackType type, void *data
* Sets the toplelve window title of @wb to be @title
*/
void
workbook_set_title (Workbook *wb, char *title)
workbook_set_title (Workbook *wb, const char *title)
{
char *full_title;
......@@ -1857,7 +1858,7 @@ workbook_set_title (Workbook *wb, char *title)
* of this file.
*/
void
workbook_set_filename (Workbook *wb, char *name)
workbook_set_filename (Workbook *wb, const char *name)
{
g_return_if_fail (wb != NULL);
g_return_if_fail (name != NULL);
......
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