Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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@gmail.com>
An: "Christina Roßmanith" <ChrRossmanith@gmx.de>
CC: libreoffice@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@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@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.