summaryrefslogtreecommitdiffstats
path: root/src/xml/node.h
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-04-01 17:00:00 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-04-01 17:00:00 +0000
commit208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch)
tree79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/xml/node.h
parentupdate to trunk (diff)
parentpartial 2geom update: (diff)
downloadinkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz
inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/xml/node.h')
-rw-r--r--src/xml/node.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/xml/node.h b/src/xml/node.h
index e83d8a7b7..c1977b0a8 100644
--- a/src/xml/node.h
+++ b/src/xml/node.h
@@ -19,6 +19,7 @@
#define SEEN_INKSCAPE_XML_NODE_H
#include <glibmm/value.h>
+#include <glibmm/ustring.h>
#include "gc-anchored.h"
#include "util/list.h"
@@ -194,6 +195,7 @@ public:
*/
virtual void setContent(gchar const *value)=0;
+ //@{
/**
* @brief Change an attribute of this node
*
@@ -204,7 +206,19 @@ public:
* @param is_interactive Ignored
*/
virtual void setAttribute(gchar const *key, gchar const *value, bool is_interactive=false)=0;
-
+
+ void setAttribute(char const *key, Glib::ustring const &value, bool is_interactive=false)
+ {
+ setAttribute(key, value.empty() ? NULL : value.c_str(), is_interactive);
+ }
+
+ void setAttribute(Glib::ustring const &key, Glib::ustring const &value, bool is_interactive=false)
+ {
+ setAttribute( key.empty() ? NULL : key.c_str(),
+ value.empty() ? NULL : value.c_str(), is_interactive);
+ }
+ //@}
+
/**
* @brief Directly set the integer GQuark code for the name of the node
*