diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index 67538fb7728e0618384aa0f39732966f336cc007..ac9064713e07cf599f51fa827ffe2d935ee43973 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
*/
+#include <cstring>
+#include <string>
#include "sp-item.h"
#include "conn-avoid-ref.h"
-#include "libnr/nr-rect-ops.h"
#include "libavoid/polyutil.h"
#include "libavoid/router.h"
#include "libavoid/connector.h"
-#include "xml/simple-node.cpp"
+#include "xml/simple-node.h"
#include "document.h"
-#include "prefs-utils.h"
-
#include "desktop.h"
#include "desktop-handles.h"
#include "sp-namedview.h"
// by the sp_*_update functions, e.g., text.
sp_document_ensure_up_to_date(item->document);
- NR::Maybe<NR::Rect> rHull = item->getBounds(sp_item_i2doc_affine(item));
+ boost::optional<Geom::Rect> rHull = item->getBounds(sp_item_i2doc_affine(item));
if (!rHull) {
return Avoid::newPoly(0);
}
double spacing = desktop->namedview->connector_spacing;
// Add a little buffer around the edge of each object.
- NR::Rect rExpandedHull = NR::expand(*rHull, -spacing);
+ Geom::Rect rExpandedHull = *rHull;
+ rExpandedHull.expandBy(-spacing);
poly = Avoid::newPoly(4);
for (unsigned n = 0; n < 4; ++n) {
- NR::Point hullPoint = rExpandedHull.corner(n);
- poly.ps[n].x = hullPoint[NR::X];
- poly.ps[n].y = hullPoint[NR::Y];
+ Geom::Point hullPoint = rExpandedHull.corner(n);
+ poly.ps[n].x = hullPoint[Geom::X];
+ poly.ps[n].y = hullPoint[Geom::Y];
}
return poly;
}
-void avoid_item_move(NR::Matrix const *mp, SPItem *moved_item)
+void avoid_item_move(Geom::Matrix const */*mp*/, SPItem *moved_item)
{
Avoid::ShapeRef *shapeRef = moved_item->avoidRef->shapeRef;
g_assert(shapeRef);