Clipboard: code cleaning proposal

Bug #964852 reported by Codain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Codain

Bug Description

Here is not a bug but a proposal after a discussion on the developper mailinglist.

After a deep overview, I've found 4 functions in ClipboardManagerImpl which are not dedicated to (but are used by) the clipboard and could, sometimes, duplicate some already existing functions.

Finally I will keep one of those 4 function in place (_copyNode) because moving it in the Node class creates two much warnings for the moment.

I will post a patch wich will does following things :

Function void ClipboardManagerImpl::_pasteDocument(SPDesktop *desktop, SPDocument *clipdoc, bool in_place)
will become sp_import_document(SPDocument *clipdoc) in file.cpp
(TODO: look for a merge with file_import() in same file)

Function void ClipboardManagerImpl::_pasteDefs(SPDesktop *desktop, SPDocument *clipdoc)
will become SPDocument::importDefs(SPDocument *source)
(no existing function found)

Function SPCSSAttr *ClipboardManagerImpl::_parseColor(const Glib::ustring &text)
will become SPCSSAttr *sp_repr_css_attr_parse_color_to_fill() in xml/reps-css.cpp
(no existing function found)

Tags: clipboard
Codain (codain)
Changed in inkscape:
assignee: nobody → Romain (romain2boss)
Revision history for this message
Codain (codain) wrote :
Changed in inkscape:
status: New → In Progress
jazzynico (jazzynico)
tags: added: clipboard
Revision history for this message
Kris (kris-degussem) wrote :

Thanks for the patch, Romain.
Committed in trunk revision 11153.
If you wish to work further on the merge of sp_import_document, feel free to reopen this report and add the patch.

Changed in inkscape:
status: In Progress → Fix Committed
milestone: none → 0.49
Revision history for this message
Codain (codain) wrote :

Thanks Kris!

Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.