Commit 7298d131 authored by Arturo Espinosa's avatar Arturo Espinosa
Browse files

Duh. Make it compile -migueebug

parent af515e2c
......@@ -9,6 +9,7 @@
#include <config.h>
#include <gnome.h>
#include "gnumeric.h"
#include "gnumeric-util.h"
#include "clipboard.h"
#include "eval.h"
......@@ -120,6 +121,15 @@ clipboard_paste_region (CellRegion *region, Sheet *dest_sheet, int dest_col, int
}
}
if (!paste_formulas){
char *rendered;
rendered = value_string (new_cell->value);
string_unref (new_cell->entered_text);
new_cell->entered_text = string_get (rendered);
g_free (rendered);
}
sheet_redraw_cell_region (dest_sheet,
target_col, target_row,
target_col, target_row);
......@@ -239,6 +249,7 @@ dialog_paste_special (void)
result = 0;
i = gtk_radio_group_get_selected (group_type);
printf ("Seleccion: %d\n", i);
switch (i){
case 0: /* all */
result = PASTE_ALL_TYPES;
......
......@@ -28,15 +28,21 @@ gnumeric_notice (char *str)
int
gtk_radio_group_get_selected (GSList *radio_group)
{
int i;
GSList *l;
int i, c;
g_return_val_if_fail (radio_group != NULL, 0);
c = g_slist_length (radio_group);
for (i = 0, l = radio_group; l; l = l->next, i++){
for (i = 0; radio_group; radio_group = radio_group->next, i++){
GtkRadioButton *button = radio_group->data;
if (GTK_TOGGLE_BUTTON (button)->active){
return i;
return c - i - 1;
}
}
return 0;
}
......@@ -28,15 +28,21 @@ gnumeric_notice (char *str)
int
gtk_radio_group_get_selected (GSList *radio_group)
{
int i;
GSList *l;
int i, c;
g_return_val_if_fail (radio_group != NULL, 0);
c = g_slist_length (radio_group);
for (i = 0, l = radio_group; l; l = l->next, i++){
for (i = 0; radio_group; radio_group = radio_group->next, i++){
GtkRadioButton *button = radio_group->data;
if (GTK_TOGGLE_BUTTON (button)->active){
return i;
return c - i - 1;
}
}
return 0;
}
......@@ -60,7 +60,15 @@ cut_cmd (GtkWidget *widget, Workbook *wb)
static void
paste_special_cmd (GtkWidget *widget, Workbook *wb)
{
dialog_paste_special ();
GnumericSheet *gsheet;
Sheet *sheet;
int flags;
sheet = workbook_get_current_sheet (wb);
gsheet = GNUMERIC_SHEET (sheet->sheet_view);
flags = dialog_paste_special ();
sheet_selection_paste (sheet, gsheet->cursor_col, gsheet->cursor_row, flags);
}
static void
......
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