Need help: SVG import
Christina Rossmanith
ChrRossmanith at gmx.de
Tue Apr 24 23:34:31 PDT 2012
Hi,
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.
Christina
-------- Original-Nachricht --------
> Datum: Tue, 24 Apr 2012 22:58:13 +0200
> Von: Noel Grandin <noelgrandin at gmail.com>
> An: "Christina Roßmanith" <ChrRossmanith at gmx.de>
> CC: libreoffice at lists.freedesktop.org
> Betreff: Re: Need help: SVG import
> 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:
> > 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
> > _______________________________________________
> > LibreOffice mailing list
> > LibreOffice at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libreoffice
--
Christina Rossmanith
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
More information about the LibreOffice
mailing list