W dniu 17 marca 2012 21:55 użytkownik Romain de Bossoreille <romain2boss@...48...> napisał:
Hi,
A 200% code question, thanks to the one (or two, or three... !) who will give me an answer!
I'm looking very closely to the clipboard implementation to follow understanding its behaviour (cf. http://wiki.inkscape.org/wiki/index.php/Clipboard), an amazing work have been done but I've a question (in src/ui/clipboard.cpp):
Inkscape::XML::Node *ClipboardManagerImpl::_copyNode(Inkscape::XML::Node *node, Inkscape::XML::Document *target_doc, Inkscape::XML::Node *parent) void ClipboardManagerImpl::_pasteDocument(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) void ClipboardManagerImpl::_pasteDefs(SPDesktop *desktop, SPDocument *clipdoc) SPCSSAttr *ClipboardManagerImpl::_parseColor(const Glib::ustring &text)
On my understanding, those functions should not be implemented in the Clipboard class because 1) they are not using any functions dedicated to the Clipboard and so 2) they are codes that could be needed for other puposes than clipboard (and I wonder whether some are duplicated elsewhere in the project).
Yes, these functions could be moved to somewhere else and unified with the code for importing (in file.cpp). I wrote this a long time ago when I knew a lot less about Inkscape code, so it's not perfect.
Regards, Krzysztof