diff options
| author | Ted Gould <ted@gould.cx> | 2008-11-21 05:24:08 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-11-21 05:24:08 +0000 |
| commit | 44a3a78fb6a3863c0c7f3c1193837337e68a67e4 (patch) | |
| tree | 1722ee5ec6f88c881cd4124923354b3c1311501b /src/selection.cpp | |
| parent | Merge from trunk (diff) | |
| download | inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.tar.gz inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.zip | |
Merge from fe-moved
(bzr r6891)
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 4ed6c0842..ea1c0053f 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -383,11 +383,11 @@ NRRect *Selection::bounds(NRRect *bbox, SPItem::BBoxType type) const return bbox; } -boost::optional<Geom::Rect> Selection::bounds(SPItem::BBoxType type) const +Geom::OptRect Selection::bounds(SPItem::BBoxType type) const { GSList const *items = const_cast<Selection *>(this)->itemList(); - boost::optional<Geom::Rect> bbox; + Geom::OptRect bbox; for ( GSList const *i = items ; i != NULL ; i = i->next ) { bbox = unify(bbox, sp_item_bbox_desktop(SP_ITEM(i->data), type)); } @@ -415,7 +415,7 @@ NRRect *Selection::boundsInDocument(NRRect *bbox, SPItem::BBoxType type) const { return bbox; } -boost::optional<Geom::Rect> Selection::boundsInDocument(SPItem::BBoxType type) const { +Geom::OptRect Selection::boundsInDocument(SPItem::BBoxType type) const { NRRect r; return to_2geom(boundsInDocument(&r, type)->upgrade()); } @@ -430,7 +430,7 @@ boost::optional<Geom::Point> Selection::center() const { return first->getCenter(); } } - boost::optional<Geom::Rect> bbox = bounds(); + Geom::OptRect bbox = bounds(); if (bbox) { return bounds()->midpoint(); } else { @@ -479,7 +479,7 @@ std::vector<Geom::Point> Selection::getSnapPointsConvexHull(SnapPreferences cons cvh.add(*i); } - boost::optional<Geom::Rect> rHull = cvh.bounds(); + Geom::OptRect rHull = cvh.bounds(); if (rHull) { for ( unsigned i = 0 ; i < 4 ; ++i ) { pHull.push_back(rHull->corner(i)); |
