Need help: SVG import
noelgrandin at gmail.com
Tue Apr 24 13:58:13 PDT 2012
Most of the code looks to be in svgreader.cxx.
It walks the DOM tree, starting with the writeShapes method, and it
looks like it processes text nodes at around line 1471.
On Tue, Apr 24, 2012 at 22:15, Christina Roßmanith <ChrRossmanith at gmx.de> wrote:
> 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
> 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>
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
More information about the LibreOffice