From 7308f9e1e734fc54661b3d79c4ff8e8fbeb84867 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sun, 3 Nov 2019 20:02:46 +0100 Subject: refactor: Eliminate SPIString::value_default - eliminate value_default - make value private (-> _value) - add value() method --- src/object/sp-text.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/object/sp-text.cpp') diff --git a/src/object/sp-text.cpp b/src/object/sp-text.cpp index 3cfae54cb..714ebe1d2 100644 --- a/src/object/sp-text.cpp +++ b/src/object/sp-text.cpp @@ -352,7 +352,7 @@ gchar* SPText::description() const { SPStyle *style = this->style; - char *n = xml_quote_strdup( style->font_family.value ); + char *n = xml_quote_strdup(style->font_family.value()); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT); @@ -1024,7 +1024,7 @@ Inkscape::XML::Node* SPText::get_first_rectangle() Inkscape::XML::Node *our_ref = getRepr(); - if (style->shape_inside.set && style->shape_inside.value) { + if (style->shape_inside.set) { std::vector shapes = get_shapes(); @@ -1047,11 +1047,11 @@ Inkscape::XML::Node* SPText::get_first_rectangle() std::vector SPText::get_shapes() const { std::vector shapes; - if (style->shape_inside.set && style->shape_inside.value) { - + char const *val; + if (style->shape_inside.set && (val = style->shape_inside.value())) { static Glib::RefPtr regex = Glib::Regex::create("url\\(#([A-z0-9#]*)\\)"); Glib::MatchInfo matchInfo; - regex->match(style->shape_inside.value, matchInfo); + regex->match(val, matchInfo); while (matchInfo.matches()) { shapes.push_back(matchInfo.fetch(1)); -- cgit v1.2.3