Hi, I'm not sure whether I understood you problem.
SPDocument* doc ...;
Inkscape::XML::Node* dnode = doc->rdoc->duplicate(NULL); Inkscape::XML::Document* doc2 = dynamic_castInkscape::XML::Document*(dnode);
std::cout << doc2 << std::endl;
This outputs non-null pointers so the dynamic_cast succeeded.
Regards, Markus
-----Ursprüngliche Nachricht----- Von: Martin Owens [mailto:doctormo@...400...] Gesendet: Freitag, 4. April 2014 06:49 An: Inkscape-Devel Betreff: [Inkscape-devel] XML duplicate document
Hey devs,
In fixing bug lp:419266 I noticed that we don't have a document node duplicate function that returns a document. Running duplicate on a document node at the moment will return a normal node (and requires a document as input, which explodes if you try and do anything with it)
My attempts at adding a document duplicate function have failed. I just don't know enough about C++ inheritence which is used extensively between Node, SimpleNode and Document, SimpleDocument.
If you do know this, I think it should be a quick addition and it would help clear up another bug (1059244) if you could add this function to our xml code.
Best Regards, Martin Owens
[1] https://bugs.launchpad.net/inkscape/+bug/419266 [2] https://bugs.launchpad.net/inkscape/+bug/1059244
---------------------------------------------------------------------------- -- _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel