From a7f2b2ba3f13ceb60376802f4a31e104153839e8 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 17 Feb 2015 03:00:37 +0100 Subject: At first, I was thinking "I just have to go to the selection file, and change that GSList* with a std::list, then resolve the few problems" So, i tried that. And I will continue tomorrow, and the days after, on and on. (bzr r13922.1.1) --- src/sp-object.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/sp-object.h') diff --git a/src/sp-object.h b/src/sp-object.h index ff80eaefc..858587611 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -47,11 +47,14 @@ class SPObject; #define SP_OBJECT_WRITE_ALL (1 << 2) #define SP_OBJECT_WRITE_NO_CHILDREN (1 << 3) + + #include #include #include #include #include +#include #include "version.h" #include "util/forward-pointer-iterator.h" @@ -60,6 +63,11 @@ class SPCSSAttr; class SPStyle; typedef struct _GSList GSList; +//should be in selection.h +typedef std::list SelContainer; + + + namespace Inkscape { namespace XML { class Node; @@ -330,7 +338,7 @@ public: * Retrieves the children as a GSList object, optionally ref'ing the children * in the process, if add_ref is specified. */ - GSList *childList(bool add_ref, Action action = ActionGeneral); + SelContainer childList(bool add_ref, Action action = ActionGeneral); /** * Append repr as child of this object. -- cgit v1.2.3 From 7e4b6f793d31d3245bd8afbf6f10aa255ac3e7ae Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 19 Feb 2015 20:20:09 +0100 Subject: added a set to the Selection (bzr r13922.1.6) --- src/sp-object.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/sp-object.h') diff --git a/src/sp-object.h b/src/sp-object.h index 858587611..1f3032a52 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -55,6 +55,7 @@ class SPObject; #include #include #include +#include #include "version.h" #include "util/forward-pointer-iterator.h" @@ -335,10 +336,10 @@ public: enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow }; /** - * Retrieves the children as a GSList object, optionally ref'ing the children + * Retrieves the children as a std vector object, optionally ref'ing the children * in the process, if add_ref is specified. */ - SelContainer childList(bool add_ref, Action action = ActionGeneral); + std::vector childList(bool add_ref, Action action = ActionGeneral); /** * Append repr as child of this object. -- cgit v1.2.3 From 9dbabead3d9565e1fd666f1ca8a7b6ddd2e167ff Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Mon, 23 Feb 2015 22:41:06 +0100 Subject: Removed eclipse files, added removed pot file (bzr r13922.1.7) --- src/sp-object.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/sp-object.h') diff --git a/src/sp-object.h b/src/sp-object.h index 1f3032a52..7c189b01b 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -64,9 +64,6 @@ class SPCSSAttr; class SPStyle; typedef struct _GSList GSList; -//should be in selection.h -typedef std::list SelContainer; - namespace Inkscape { -- cgit v1.2.3 From 9a7fa4d1899d30ec745107823f307b2a0bf3172f Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 03:10:36 +0100 Subject: corrected the casts (hopefully) (bzr r13922.1.10) --- src/sp-object.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/sp-object.h') diff --git a/src/sp-object.h b/src/sp-object.h index 8651258bd..df773fea7 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -47,8 +47,6 @@ class SPObject; #define SP_OBJECT_WRITE_ALL (1 << 2) #define SP_OBJECT_WRITE_NO_CHILDREN (1 << 3) - - #include #include #include @@ -64,8 +62,6 @@ class SPCSSAttr; class SPStyle; typedef struct _GSList GSList; - - namespace Inkscape { namespace XML { class Node; -- cgit v1.2.3 From 60bdd590969d1c32c392a8fed15f4ceac4a678d2 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Mon, 27 Apr 2015 01:12:03 +0200 Subject: Just reread the entire diff against trunk. Given the diff size, i must have forgotten things, but hopefully, there are only very few changes of semantics: ->childList is now in the intuitive order (childList()[0] is now firstChild) -> sp_selection_paste_impl is now in the opposite order (change is local to selection-chemistry.cpp, and simplify a few things) -> selection.setReprList now takes the list in the opposite order. It was always the case (the list was always reversed before handing to it) -> a few comparison functions now work "the c++ way": the C way was to return -1 if ab, now they return (bool)(a #include #include -#include #include #include "version.h" -- cgit v1.2.3 From 280053e5ddfcdf158f62d2d6a72681b3092d2168 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 2 May 2015 03:47:39 +0200 Subject: Fixed comparison function used in sorts (bzr r14085) --- src/sp-object.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sp-object.h') diff --git a/src/sp-object.h b/src/sp-object.h index f5d47be05..7bc02fad5 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -876,6 +876,7 @@ public: * -1 first object's position is less than the second \endverbatim */ int sp_object_compare_position(SPObject const *first, SPObject const *second); +bool sp_object_compare_position_bool(SPObject const *first, SPObject const *second); #endif // SP_OBJECT_H_SEEN -- cgit v1.2.3