Code

Merge GSoC2009 Connectors into trunk
[inkscape.git] / src / graphlayout / graphlayout.cpp
index 87ec60695ab6e37722819aeee6d75693f581fdbd..81ea590598397ba993e4163abb4b6e456dcad680 100644 (file)
@@ -31,6 +31,7 @@
 #include "style.h"
 #include "conn-avoid-ref.h"
 #include "libavoid/connector.h"
+#include "libavoid/router.h"
 #include "libavoid/geomtypes.h"
 #include "libcola/cola.h"
 #include "libvpsc/generate-constraints.h"
@@ -66,9 +67,9 @@ struct CheckProgress : TestConvergence {
             SPItem *u=*it;
             if(!isConnector(u)) {
                 Rectangle* r=rs[nodelookup[u->id]];
-                NR::Rect const item_box(sp_item_bbox_desktop(u));
-                NR::Point const curr(item_box.midpoint());
-                NR::Point const dest(r->getCentreX(),r->getCentreY());
+                Geom::Rect const item_box(sp_item_bbox_desktop(u));
+                Geom::Point const curr(item_box.midpoint());
+                Geom::Point const dest(r->getCentreX(),r->getCentreY());
                 sp_item_move_rel(u, Geom::Translate(dest - curr));
             }
         }
@@ -125,7 +126,7 @@ void graphlayout(GSList const *const items) {
                ++i)
        {
                SPItem *u=*i;
-               boost::optional<Geom::Rect> const item_box(sp_item_bbox_desktop(u));
+               Geom::OptRect const item_box(sp_item_bbox_desktop(u));
         if(item_box) {
             Geom::Point ll(item_box->min());
             Geom::Point ur(item_box->max());
@@ -227,7 +228,7 @@ void graphlayout(GSList const *const items) {
                        map<string,unsigned>::iterator i=nodelookup.find(u->id);
                        if(i!=nodelookup.end()) {
                 Rectangle* r=rs[i->second];
-                boost::optional<Geom::Rect> item_box(sp_item_bbox_desktop(u));
+                Geom::OptRect item_box(sp_item_bbox_desktop(u));
                 if(item_box) {
                     Geom::Point const curr(item_box->midpoint());
                     Geom::Point const dest(r->getCentreX(),r->getCentreY());