After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 380396 - gsf_xml_gvalue_from_str() doesn't deal with enums/flags correctly
gsf_xml_gvalue_from_str() doesn't deal with enums/flags correctly
Status: RESOLVED FIXED
Product: libgsf
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2006-11-29 07:09 UTC by Christian Neumair
Modified: 2006-12-01 18:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libgsf patch (1.61 KB, patch)
2006-11-29 07:09 UTC, Christian Neumair
committed Details | Review
goffice patch (1.38 KB, patch)
2006-11-29 07:10 UTC, Christian Neumair
committed Details | Review

Description Christian Neumair 2006-11-29 07:09:15 UTC
From the Gnumeric list [1]:

The attached patch fixes the G_TYPE_ENUM/G_TYPE_FLAGS saving/restoring
to/from XML streams. Previously, the libgsf routines
glade_enum_from_string and glade_flags_from_string were unable to
determine the enum/flags type, which is required to look up strings like
"FOO_FLAGS_BAR" against the "FooFlags" type.

Not passing fundamental types to the libgsf helper in goffice didn't
have any negative consequences for me so far, and it shouldn't unless we
have non-GObject, non-flags and non-enum (i.e. weird) types that are not
fundamentals. I've added some debugging code for the purpose of
determining such issues.

[1] http://mail.gnome.org/archives/gnumeric-list/2006-November/msg00019.html
Comment 1 Christian Neumair 2006-11-29 07:09:46 UTC
Created attachment 77323 [details] [review]
libgsf patch
Comment 2 Christian Neumair 2006-11-29 07:10:20 UTC
Created attachment 77324 [details] [review]
goffice patch
Comment 3 Jody Goldberg 2006-12-01 13:42:11 UTC
Comment on attachment 77323 [details] [review]
libgsf patch

Good catch.
Please commit
Comment 4 Jody Goldberg 2006-12-01 13:42:35 UTC
Comment on attachment 77324 [details] [review]
goffice patch

ditto.
Comment 5 Christian Neumair 2006-12-01 18:23:03 UTC
Committed, closing.