diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-24 01:28:21 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-24 01:28:21 +0000 |
| commit | 718f5323cdab58042763107010fafbdc697c3c4f (patch) | |
| tree | 164e442357777ac1714464415943e6869b901a8a /src/sp-text.cpp | |
| parent | Fixing Krzysztof review (diff) | |
| parent | "Backport" some Krzysztof review parts of mirror symmetry LPE also hapens on ... (diff) | |
| download | inkscape-718f5323cdab58042763107010fafbdc697c3c4f.tar.gz inkscape-718f5323cdab58042763107010fafbdc697c3c4f.zip | |
update to trunk
(bzr r13682.1.37)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 7d4348d19..da92ad8d4 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -302,6 +302,15 @@ Inkscape::XML::Node *SPText::write(Inkscape::XML::Document *xml_doc, Inkscape::X this->attributes.writeTo(repr); this->rebuildLayout(); // copied from update(), see LP Bug 1339305 + // deprecated attribute, but keep it around for backwards compatibility + if (this->style->line_height.set && !this->style->line_height.inherit && !this->style->line_height.normal && this->style->line_height.unit == SP_CSS_UNIT_PERCENT) { + Inkscape::SVGOStringStream os; + os << (this->style->line_height.value * 100.0) << "%"; + this->getRepr()->setAttribute("sodipodi:linespacing", os.str().c_str()); + } else { + this->getRepr()->setAttribute("sodipodi:linespacing", NULL); + } + // SVG 2 Auto-wrapped text if( this->width.computed > 0.0 ) { sp_repr_set_svg_double(repr, "width", this->width.computed); |
