From: John Darrington Date: Mon, 13 Aug 2007 06:34:25 +0000 (+0000) Subject: Fixed bug pasting from the clipboard, where the wrong columns limit was X-Git-Tag: v0.6.0~308 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da5e3e3750f16a5dd108daa6b8bd003cf2957e06;p=pspp-builds.git Fixed bug pasting from the clipboard, where the wrong columns limit was being used. --- diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index 80c3ae97..d3aee623 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,8 @@ +2007-08-13 John Darrington + + * clipboard.c (clip_to_html clip_to_text): Fixed bug --- use the + variable count instead of the value count for the columns limit. + 2007-08-12 John Darrington Ben Pfaff diff --git a/src/ui/gui/clipboard.c b/src/ui/gui/clipboard.c index b115a04a..b7ed1334 100644 --- a/src/ui/gui/clipboard.c +++ b/src/ui/gui/clipboard.c @@ -166,6 +166,7 @@ clip_to_text (void) const size_t val_cnt = casereader_get_value_cnt (clip_datasheet); const casenumber case_cnt = casereader_get_case_cnt (clip_datasheet); + const size_t var_cnt = dict_get_var_cnt (clip_dict); string = g_string_sized_new (10 * val_cnt * case_cnt); @@ -179,7 +180,7 @@ clip_to_text (void) break; } - for (c = 0 ; c < val_cnt ; ++c) + for (c = 0 ; c < var_cnt ; ++c) { const struct variable *v = dict_get_var (clip_dict, c); data_out_g_string (string, v, &cc); @@ -205,6 +206,8 @@ clip_to_html (void) const size_t val_cnt = casereader_get_value_cnt (clip_datasheet); const casenumber case_cnt = casereader_get_case_cnt (clip_datasheet); + const size_t var_cnt = dict_get_var_cnt (clip_dict); + /* Guestimate the size needed */ string = g_string_sized_new (20 * val_cnt * case_cnt); @@ -221,7 +224,7 @@ clip_to_html (void) } g_string_append (string, "\n"); - for (c = 0 ; c < val_cnt ; ++c) + for (c = 0 ; c < var_cnt ; ++c) { const struct variable *v = dict_get_var (clip_dict, c); g_string_append (string, "");