Need help: SVG import

Marco Cecchetti mrcekets at
Wed Apr 25 04:23:21 PDT 2012

After giving a better look, I could have found where the problem is:
look at the begin of visitElements routine (line 101):

     if( xElem->hasAttributes() )

The function called in case the element has at least one
attribute or no atribute at all are different.

In the first case ShapeWritingVisitor method:
void operator()( const uno::Reference<xml::dom::XElement>&      xElem,
                  const uno::Reference<xml::dom::XNamedNodeMap>&  
xAttributes );
is called

in the second case the method invoked is:

void operator()( const uno::Reference<xml::dom::XElement>& )

that has an empty body (line 1204), so when your example is processed
nothing happens.

The rationale should be that an element without any attribute does
not bring any info to parse. But for a <text> or <tspan> element is
different because of the characters included between the start and
the end tag.

-- Marco

On Wed, 25 Apr 2012 13:03:08 +0200, Marco Cecchetti <mrcekets at>  

> That's odd, saxbuilder should be completely agnostic
>  from a element name point of view.
> Did you try to print element names xElem->getNodeName() (line 1227)
> for the broken example ?
> -- Marco
> On Wed, 25 Apr 2012 11:48:10 +0200, Noel Grandin <noelgrandin at>  
> wrote:
>> Looks like the code in
>>     unoxml/source/dom/saxbuilder.cxx
>> converts the SAX event stream into a DOM tree.
>> On 2012-04-25 08:34, Christina Rossmanith wrote:
>>> for the example without "x" and "y" attribute the "case XML_TEXT"  
>>> block is never reached. That's why I'd like to understand where and  
>>> how the tree is built.
>> _______________________________________________
>> LibreOffice mailing list
>> LibreOffice at

Using Opera's revolutionary e-mail client:

More information about the LibreOffice mailing list