summaryrefslogtreecommitdiffstats
path: root/src/sp-tref.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:07:14 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:07:14 +0000
commite77956b4dbd029c9f6949f81fe083606f995c624 (patch)
tree74adda4df8986d65f70efb341c6235277361fd35 /src/sp-tref.cpp
parentupdated code to work on 0.92 code (diff)
parentLatvian translation update (diff)
downloadinkscape-e77956b4dbd029c9f6949f81fe083606f995c624.tar.gz
inkscape-e77956b4dbd029c9f6949f81fe083606f995c624.zip
update to trunk
(bzr r12588.1.39)
Diffstat (limited to 'src/sp-tref.cpp')
-rw-r--r--src/sp-tref.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 0f6eb106f..aef18462a 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -16,10 +16,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include <glibmm/i18n.h>
#include "attributes.h"
@@ -35,14 +31,6 @@
#include "xml/node.h"
#include "xml/repr.h"
-namespace {
- SPObject* createTRef() {
- return new SPTRef();
- }
-
- bool trefRegistered = SPFactory::instance().registerObject("svg:tref", createTRef);
-}
-
//#define DEBUG_TREF
#ifdef DEBUG_TREF
# define debug(f, a...) { g_message("%s(%d) %s:", \
@@ -413,7 +401,7 @@ void sp_tref_update_text(SPTRef *tref)
Inkscape::XML::Document *xml_doc = tref->document->getReprDoc();
Inkscape::XML::Node *newStringRepr = xml_doc->createTextNode(charData.c_str());
- tref->stringChild = SPFactory::instance().createObject(NodeTraits::get_type_string(*newStringRepr));
+ tref->stringChild = SPFactory::createObject(NodeTraits::get_type_string(*newStringRepr));
// Add this SPString as a child of the tref
tref->attach(tref->stringChild, tref->lastChild());
@@ -492,12 +480,8 @@ sp_tref_convert_to_tspan(SPObject *obj)
//SPObject * new_string_child = document->getObjectByRepr(new_string_repr);
// Merge style from the tref
- SPStyle *new_tspan_sty = new_tspan->style;
- SPStyle const *tref_sty = tref->style;
- sp_style_merge_from_dying_parent(new_tspan_sty, tref_sty);
- sp_style_merge_from_parent(new_tspan_sty, new_tspan->parent->style);
-
-
+ new_tspan->style->merge( tref->style );
+ new_tspan->style->cascade( new_tspan->parent->style );
new_tspan->updateRepr();
// Hold onto our SPObject and repr for now.