diff options
| author | Stephen Silver <sasilver@yahoo.com> | 2008-06-30 12:22:10 +0000 |
|---|---|---|
| committer | sasilver <sasilver@users.sourceforge.net> | 2008-06-30 12:22:10 +0000 |
| commit | d592e23254943e7406ce83f66dab1c2af09b6b03 (patch) | |
| tree | c5af65eebc2a4f44dc46cc8f0853c9b2b9d61e1c /src/xml/repr-util.cpp | |
| parent | Approximately closed test for path parsing now looks at the absolute coordina... (diff) | |
| download | inkscape-d592e23254943e7406ce83f66dab1c2af09b6b03.tar.gz inkscape-d592e23254943e7406ce83f66dab1c2af09b6b03.zip | |
Prevent 'title', 'desc' and 'metadata' elements being moved to 'defs' when ungrouping (fixes bug 243720).
(bzr r6098)
Diffstat (limited to 'src/xml/repr-util.cpp')
| -rw-r--r-- | src/xml/repr-util.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp index 97676bebe..193c1125c 100644 --- a/src/xml/repr-util.cpp +++ b/src/xml/repr-util.cpp @@ -446,6 +446,22 @@ sp_repr_lookup_name( Inkscape::XML::Node *repr, gchar const *name, gint maxdepth } /** + * Determine if the node is a 'title', 'desc' or 'metadata' element. + */ +bool +sp_repr_is_meta_element(const Inkscape::XML::Node *node) +{ + if (node == NULL) return false; + if (node->type() != Inkscape::XML::ELEMENT_NODE) return false; + gchar const *name = node->name(); + if (name == NULL) return false; + if (!std::strcmp(name, "svg:title")) return true; + if (!std::strcmp(name, "svg:desc")) return true; + if (!std::strcmp(name, "svg:metadata")) return true; + return false; +} + +/** * Parses the boolean value of an attribute "key" in repr and sets val accordingly, or to FALSE if * the attr is not set. * |
