summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-css.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2011-09-28 13:18:38 +0000
committertavmjong-free <tavmjong@free.fr>2011-09-28 13:18:38 +0000
commit278bc7c50017df7bf9ae28e639c3aecc072fa3df (patch)
treed40550ffa816ce962d337f12741e840601a900b0 /src/xml/repr-css.cpp
parentcmake: aspell/gtkspell/poppler-cairo/libwpg (diff)
downloadinkscape-278bc7c50017df7bf9ae28e639c3aecc072fa3df.tar.gz
inkscape-278bc7c50017df7bf9ae28e639c3aecc072fa3df.zip
Fixed problem with font names that contain spaces.
(bzr r10649)
Diffstat (limited to 'src/xml/repr-css.cpp')
-rw-r--r--src/xml/repr-css.cpp11
1 files changed, 8 insertions, 3 deletions
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);