diff options
| author | Andrew Higginson <at.higginson@gmail.com> | 2011-12-27 21:04:47 +0000 |
|---|---|---|
| committer | Andrew <at.higginson@gmail.com> | 2011-12-27 21:04:47 +0000 |
| commit | 80960b623a99aae1402ab651b2974ef544ed3b03 (patch) | |
| tree | ba49d42c2789e9e11f805e2d5263e10f9fedeef8 /src/sp-metadata.cpp | |
| parent | try to fix bug (diff) | |
| parent | GDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff) | |
| download | inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip | |
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'src/sp-metadata.cpp')
| -rw-r--r-- | src/sp-metadata.cpp | 56 |
1 files changed, 25 insertions, 31 deletions
diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp index 21410d4fd..3f2d3b584 100644 --- a/src/sp-metadata.cpp +++ b/src/sp-metadata.cpp @@ -1,5 +1,3 @@ -#define __SP_METADATA_C__ - /* * SVG <metadata> implementation * @@ -20,6 +18,7 @@ #include "document.h" #include "sp-item-group.h" +#include "sp-root.h" #define noDEBUG_METADATA #ifdef DEBUG_METADATA @@ -102,14 +101,14 @@ void strip_ids_recursively(Inkscape::XML::Node *node) { } -/* - * \brief Reads the Inkscape::XML::Node, and initializes SPMetadata variables. - * For this to get called, our name must be associated with - * a repr via "sp_object_type_register". Best done through - * sp-object-repr.cpp's repr_name_entries array. +/** + * Reads the Inkscape::XML::Node, and initializes SPMetadata variables. + * + * For this to get called, our name must be associated with + * a repr via "sp_object_type_register". Best done through + * sp-object-repr.cpp's repr_name_entries array. */ -static void -sp_metadata_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) +static void sp_metadata_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) { using Inkscape::XML::NodeSiblingIterator; @@ -128,25 +127,23 @@ sp_metadata_build (SPObject *object, SPDocument *document, Inkscape::XML::Node * ((SPObjectClass *) metadata_parent_class)->build (object, document, repr); } -/* - * \brief Drops any allocated memory +/** + * Drops any allocated memory. */ -static void -sp_metadata_release (SPObject *object) +static void sp_metadata_release(SPObject *object) { debug("0x%08x",(unsigned int)object); - /* handle ourself */ + // handle ourself if (((SPObjectClass *) metadata_parent_class)->release) ((SPObjectClass *) metadata_parent_class)->release (object); } -/* - * \brief Sets a specific value in the SPMetadata +/** + * Sets a specific value in the SPMetadata. */ -static void -sp_metadata_set (SPObject *object, unsigned int key, const gchar *value) +static void sp_metadata_set(SPObject *object, unsigned int key, const gchar *value) { debug("0x%08x %s(%u): '%s'",(unsigned int)object, sp_attribute_name(key),key,value); @@ -159,11 +156,10 @@ sp_metadata_set (SPObject *object, unsigned int key, const gchar *value) ((SPObjectClass *) metadata_parent_class)->set (object, key, value); } -/* - * \brief Receives update notifications +/** + * Receives update notifications. */ -static void -sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags) +static void sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags) { debug("0x%08x",(unsigned int)object); //SPMetadata *metadata = SP_METADATA(object); @@ -179,11 +175,10 @@ sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags) ((SPObjectClass *) metadata_parent_class)->update(object, ctx, flags); } -/* - * \brief Writes it's settings to an incoming repr object, if any +/** + * Writes it's settings to an incoming repr object, if any. */ -static Inkscape::XML::Node * -sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) +static Inkscape::XML::Node *sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) { debug("0x%08x",(unsigned int)object); //SPMetadata *metadata = SP_METADATA(object); @@ -203,17 +198,16 @@ sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML: return repr; } -/* - * \brief Retrieves the metadata object associated with a document +/** + * Retrieves the metadata object associated with a document. */ -SPMetadata * -sp_document_metadata (SPDocument *document) +SPMetadata *sp_document_metadata(SPDocument *document) { SPObject *nv; g_return_val_if_fail (document != NULL, NULL); - nv = sp_item_group_get_child_by_name ((SPGroup *) document->root, NULL, + nv = sp_item_group_get_child_by_name( document->getRoot(), NULL, "metadata"); g_assert (nv != NULL); |
