Fix #8070 - merging in svgtopdf stuff
[pear] / XML / SvgToPdf / Tspan.php
old mode 100644 (file)
new mode 100755 (executable)
index 5d364e4..a54ac3b
@@ -11,28 +11,14 @@ class XML_SvgToPDF_Tspan extends XML_SvgToPDF_Base {
     var $x = false;
     var $y = false;
     var $args = array(); // arguments..
+    var $id;
     var $role;
     
-    function fromXmlNode($node)
-    {
+    function fromXmlNode($node) {
         parent::fromXmlNode($node);
-        $this->content = $node->textContent;
-
-        $this->parse();
-    }
-    
-    function fromNode($node)
-    {
-        parent::fromNode($node);
-        
-        $this->content = $node->content;
-
-        $this->parse();
-    }    
-    function parse()
-    {
         $this->x = false;
         $this->y = false;
+        $this->content = $node->textContent;
         /*
         if (isset($this->x)) {
                unset($this->x); 
@@ -46,7 +32,7 @@ class XML_SvgToPDF_Tspan extends XML_SvgToPDF_Base {
             $trans = array_flip(get_html_translation_table(HTML_ENTITIES));
         }
         
-        if (!empty($this->content) && strlen($this->content)) {
+        if (strlen($this->content)) {
             // convert & etc. 
             if (strpos($this->content,'&') !== false) {
                 $this->content = strtr($this->content, $trans);
@@ -81,7 +67,7 @@ class XML_SvgToPDF_Tspan extends XML_SvgToPDF_Base {
     }
     
     
-    function shift($x,$y) // disable shifting on text
+    function shift($x, $y) // disable shifting on text
     {
         return;
     }