summaryrefslogtreecommitdiffstats
path: root/src/style-internal.h
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-04-28 14:13:36 +0000
committertavmjong-free <tavmjong@free.fr>2014-04-28 14:13:36 +0000
commit3466681abbcf33b09fada54e74cf55915714e2b2 (patch)
treebf2cebd6226b3b6a5f1db7656c521ef72de2cac7 /src/style-internal.h
parentchanged default unit for hpgl importer to real world unit mm (diff)
downloadinkscape-3466681abbcf33b09fada54e74cf55915714e2b2.tar.gz
inkscape-3466681abbcf33b09fada54e74cf55915714e2b2.zip
Clean up of style code: Add default to SPIString for use with 'font-family'.
(bzr r13315)
Diffstat (limited to 'src/style-internal.h')
-rw-r--r--src/style-internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/style-internal.h b/src/style-internal.h
index 131b77b77..d1a331acf 100644
--- a/src/style-internal.h
+++ b/src/style-internal.h
@@ -385,13 +385,15 @@ class SPIString : public SPIBase {
public:
SPIString() :
SPIBase( "anonymous_string" ), value(NULL) {};
- SPIString( Glib::ustring name ) :
- SPIBase( name ) , value(NULL) {};
+ SPIString( Glib::ustring name, gchar* value_default_in = NULL ) :
+ SPIBase( name ) , value(NULL) , value_default(NULL) {
+ value_default = value_default_in?g_strdup(value_default_in):NULL;
+ };
virtual ~SPIString() { g_free(value); };
virtual void read( gchar const *str );
virtual const Glib::ustring write( guint const flags = SP_STYLE_FLAG_IFSET,
SPIBase const *const base = NULL ) const;
- virtual void clear() { SPIBase::clear(); g_free( value ); value = NULL; };
+ virtual void clear();
virtual void cascade( const SPIBase* const parent );
virtual void merge( const SPIBase* const parent );
@@ -407,6 +409,7 @@ class SPIString : public SPIBase {
// To do: make private, convert value to Glib::ustring
public:
gchar *value;
+ gchar *value_default;
};
/// Color type interal to SPStyle, FIXME Add string value to store SVG named color.