libgsf r1049 - in trunk: . doc/tmpl gsf tests
- From: jody svn gnome org
- To: svn-commits-list gnome org
- Subject: libgsf r1049 - in trunk: . doc/tmpl gsf tests
- Date: Sun, 12 Apr 2009 01:39:32 +0000 (UTC)
Author: jody
Date: Sun Apr 12 01:39:32 2009
New Revision: 1049
URL: http://svn.gnome.org/viewvc/libgsf?rev=1049&view=rev
Log:
2009-04-11 Jody Goldberg <jody gnome org>
* gsf/gsf-libxml.c (lookup_child) : handle namespace uri being
declared as both default and explict prefix.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/doc/tmpl/utils.sgml
trunk/gsf/gsf-clip-data.c
trunk/gsf/gsf-input.c
trunk/gsf/gsf-libxml.c
trunk/gsf/gsf-timestamp.h
trunk/gsf/gsf-utils.c
trunk/tests/test-msole1.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sun Apr 12 01:39:32 2009
@@ -9,6 +9,7 @@
* Handle small-block files that are not block aligned. [#572290]
* Deprecate gsf_timestamp_parse and replace it with gsf_timestamp_from_string.
* Gtk-Doc fixes.
+ * Fix handling of namespace declared default and prefix. (SpreadsheetML-2003)
Morten:
* Handle malformed xml better. [#568994]
Modified: trunk/doc/tmpl/utils.sgml
==============================================================================
--- trunk/doc/tmpl/utils.sgml (original)
+++ trunk/doc/tmpl/utils.sgml Sun Apr 12 01:39:32 2009
@@ -587,6 +587,16 @@
@Returns:
+<!-- ##### FUNCTION gsf_timestamp_from_string ##### -->
+<para>
+
+</para>
+
+ spec:
+ stamp:
+ Returns:
+
+
<!-- ##### FUNCTION gsf_timestamp_hash ##### -->
<para>
Modified: trunk/gsf/gsf-clip-data.c
==============================================================================
--- trunk/gsf/gsf-clip-data.c (original)
+++ trunk/gsf/gsf-clip-data.c Sun Apr 12 01:39:32 2009
@@ -181,6 +181,12 @@
}
/**
+ * check_format_windows:
+ * @format : #GsfClipFormatWindows
+ * @format_name : const char *
+ * @blob_size : #gsize
+ * @error :#GError
+ *
* Checks that the specified blob size matches the expected size for the format.
*
* Returns: the same format if the size is correct, or
Modified: trunk/gsf/gsf-input.c
==============================================================================
--- trunk/gsf/gsf-input.c (original)
+++ trunk/gsf/gsf-input.c Sun Apr 12 01:39:32 2009
@@ -561,12 +561,12 @@
* gsf_input_uncompress: maybe uncompress stream.
* @src: stream to be uncompressed.
*
- * Returns: A stream equivalent to the source stream, but uncompressed if
- * the source was compressed.
- *
* This functions takes ownership of the incoming reference and yields a
* new one as its output.
- */
+ *
+ * Returns: A stream equivalent to the source stream, but uncompressed if
+ * the source was compressed.
+ **/
GsfInput *
gsf_input_uncompress (GsfInput *src)
{
Modified: trunk/gsf/gsf-libxml.c
==============================================================================
--- trunk/gsf/gsf-libxml.c (original)
+++ trunk/gsf/gsf-libxml.c Sun Apr 12 01:39:32 2009
@@ -615,24 +615,23 @@
for (ptr = groups ; ptr != NULL ; ptr = ptr->next) {
group = ptr->data;
- /* does the namespace match */
- if (group->ns_id >= 0 && group->ns_id != default_ns_id) {
-
- if ((int)state->ns_by_id->len <= group->ns_id)
- continue;
-
- inst = g_ptr_array_index (state->ns_by_id, group->ns_id);
- if (inst == NULL || 0 != strncmp (name, inst->tag, inst->taglen))
- continue;
+ /* Is the node explicitly namespaced ? */
+ if (group->ns_id >= 0 &&
+ group->ns_id < (int)state->ns_by_id->len &&
+ NULL != (inst = g_ptr_array_index (state->ns_by_id, group->ns_id)) &&
+ 0 == strncmp (name, inst->tag, inst->taglen))
tmp = name + inst->taglen;
- } else {
+ else if (group->ns_id < 0 || /* target is unqualified */
+ group->ns_id == default_ns_id) { /* target is in default ns */
#if 0
g_return_val_if_fail ((int)state->ns_by_id->len > group->ns_id, FALSE);
inst = g_ptr_array_index (state->ns_by_id, group->ns_id);
g_warning ("accepted ns = '%s' looking for '%s'", inst->tag, name);
#endif
tmp = name;
- }
+ } else
+ continue;
+
for (elem = group->elem ; elem != NULL ; elem = elem->next) {
node = elem->data;
if (node->name == NULL || !strcmp (tmp, node->name)) {
Modified: trunk/gsf/gsf-timestamp.h
==============================================================================
--- trunk/gsf/gsf-timestamp.h (original)
+++ trunk/gsf/gsf-timestamp.h Sun Apr 12 01:39:32 2009
@@ -44,7 +44,7 @@
GsfTimestamp *gsf_timestamp_copy (GsfTimestamp const *stamp);
void gsf_timestamp_free (GsfTimestamp *stamp);
-int gsf_timestamp_parse (char const *spec, GsfTimestamp *stamp);
+int gsf_timestamp_from_string (char const *spec, GsfTimestamp *stamp);
char *gsf_timestamp_as_string (GsfTimestamp const *stamp);
guint gsf_timestamp_hash (GsfTimestamp const *stamp);
gboolean gsf_timestamp_equal (GsfTimestamp const *a,
@@ -52,6 +52,9 @@
void gsf_value_set_timestamp (GValue *value, GsfTimestamp const *stamp);
+/* Deprecated */
+int gsf_timestamp_parse (char const *spec, GsfTimestamp *stamp);
+
G_END_DECLS
#endif /* GSF_TIMESTAMP_H */
Modified: trunk/gsf/gsf-utils.c
==============================================================================
--- trunk/gsf/gsf-utils.c (original)
+++ trunk/gsf/gsf-utils.c Sun Apr 12 01:39:32 2009
@@ -834,7 +834,7 @@
/**
- * gsf_base64_decode_step: decode a chunk of base64 encoded data
+ * gsf_base64_decode_step:
* @in: input stream
* @len: max length of data to decode
* @out: output stream
@@ -946,7 +946,7 @@
/* Largely a copy of g_object_new_valist. */
/**
- * gsf_property_settings_collect_valist: collect property setting from a va_list.
+ * gsf_property_settings_collect_valist:
* @object_type: the GType for which the properties are being set.
* @p_n_params: a pointer to the number of properties collected. (Used for
* both input and output.)
Modified: trunk/tests/test-msole1.c
==============================================================================
--- trunk/tests/test-msole1.c (original)
+++ trunk/tests/test-msole1.c Sun Apr 12 01:39:32 2009
@@ -146,7 +146,7 @@
"Book", "BOOK", "book"
};
- GsfInput *input, *stream;
+ GsfInput *input, *stream, *pcache_dir;
GsfInfile *infile;
GError *err = NULL;
unsigned i, j;
@@ -241,6 +241,25 @@
}
}
+#ifdef DUMP_CONTENT
+ pcache_dir = gsf_infile_child_by_name (infile, "_SX_DB_CUR"); /* Excel 97 */
+ if (NULL == pcache_dir)
+ pcache_dir = gsf_infile_child_by_name (infile, "_SX_DB"); /* Excel 95 */
+ if (NULL != pcache_dir) {
+ int i, n = gsf_infile_num_children (infile);
+ for (i = 0 ; i < n ; i++) {
+ stream = gsf_infile_child_by_index (GSF_INFILE (pcache_dir), i);
+ if (stream != NULL) {
+ printf ("=================================================\nPivot cache '%04hX'\n\n", i);
+
+ dump_biff_stream (stream);
+ g_object_unref (G_OBJECT (stream));
+ }
+ }
+ g_object_unref (G_OBJECT (pcache_dir));
+ }
+#endif
+
g_object_unref (G_OBJECT (infile));
g_object_unref (G_OBJECT (input));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]