Need help: SVG import

Christina Roßmanith ChrRossmanith at gmx.de
Tue Apr 24 13:15:49 PDT 2012


Hi,

I'm still trying to understand how SVG import works. What I've found out 
so far is:

svgreader.cxx: SVGReader::parseAndConvert() calls  
uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder()->parse()

The latter can be found in documentbuilder.cxx:
Reference< XDocument > SAL_CALL CDocumentBuilder::parse(const Reference< 
XInputStream >& is)

In that method finally a CDocument is created which leads us to 
document.cxx:
CDocument::CDocument(xmlDocPtr const pDoc)
         : CDocument_Base(*this, m_Mutex,
                 NodeType_DOCUMENT_NODE, reinterpret_cast<xmlNodePtr>(pDoc))
         , m_aDocPtr(pDoc)
         , m_streamListeners()
         , m_pEventDispatcher(new events::CEventDispatcher())
     {
     }

At this point I'm stuck and need some help. Where can I find the code 
which translates libxml2's result into a LibO data structure? I've 
already tried a dumper from libxml2 and my two small test files give 
reasonable output but are rendered differently though should be 
identically. That let's me assume that there is a problem with the 
conversion from libxml2 -> LibO.

<svg> <text> lala </text> </svg>   vs.
<svg> <text x="0" y="0"> lala </text> </svg>

Christina


More information about the LibreOffice mailing list