From 278bc7c50017df7bf9ae28e639c3aecc072fa3df Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 28 Sep 2011 15:18:38 +0200 Subject: Fixed problem with font names that contain spaces. (bzr r10649) --- src/xml/repr-css.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/xml/repr-css.cpp') diff --git a/src/xml/repr-css.cpp b/src/xml/repr-css.cpp index 7db1e8b86..a0b45a42e 100644 --- a/src/xml/repr-css.cpp +++ b/src/xml/repr-css.cpp @@ -232,6 +232,7 @@ sp_repr_css_write_string(SPCSSAttr *css) } } else { buffer.append(iter->value); // unquoted + g_warning("sp_repr_css_write_string: %s %s", g_quark_to_string(iter->key), iter->value.pointer() ); } if (rest(iter)) { @@ -309,13 +310,17 @@ sp_repr_css_merge_from_decl(SPCSSAttr *css, CRDeclaration const *const decl) std::stringstream ss( value_unquoted ); double number; std::string characters; + std::string temp; bool number_valid = !(ss >> number).fail(); if( !number_valid ) ss.clear(); - bool character_valid = !(ss >> characters).fail(); + while( !(ss >> temp).eof() ) { + characters += temp; + characters += " "; + } + characters += temp; Inkscape::CSSOStringStream os; if( number_valid ) os << number; - if( character_valid ) os << characters; - + os << characters; ((Node *) css)->setAttribute(decl->property->stryng->str, os.str().c_str(), false); g_free(value_unquoted); g_free(str_value); -- cgit v1.2.3