summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-08-05 22:40:31 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-08-05 22:40:31 +0000
commit900577c7e71534ec32dcb4e0677a509a6e517b12 (patch)
tree8d5b4c6201b0728bff338e89106d1a8c5a0b7fef /src/ui/widget
parentcodedread's patch for bug 254850 (fixes handling of description field in Obje... (diff)
downloadinkscape-900577c7e71534ec32dcb4e0677a509a6e517b12.tar.gz
inkscape-900577c7e71534ec32dcb4e0677a509a6e517b12.zip
NR::Maybe => boost::optional
(bzr r6569)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/object-composite-settings.cpp4
-rw-r--r--src/ui/widget/style-subject.cpp8
-rw-r--r--src/ui/widget/style-subject.h8
3 files changed, 10 insertions, 10 deletions
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index 638f1a70c..d4c1bb705 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -114,7 +114,7 @@ ObjectCompositeSettings::_blendBlurValueChanged()
// FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed; here it results in crash 1580903
sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0);
- NR::Maybe<NR::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX);
+ boost::optional<NR::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX);
double radius;
if (bbox) {
double perimeter = bbox->extent(Geom::X) + bbox->extent(Geom::Y);
@@ -260,7 +260,7 @@ ObjectCompositeSettings::_subjectChanged() {
case QUERY_STYLE_SINGLE:
case QUERY_STYLE_MULTIPLE_AVERAGED:
case QUERY_STYLE_MULTIPLE_SAME:
- NR::Maybe<NR::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX);
+ boost::optional<NR::Rect> bbox = _subject->getBounds(SPItem::GEOMETRIC_BBOX);
if (bbox) {
double perimeter = bbox->extent(Geom::X) + bbox->extent(Geom::Y);
_fe_cb.set_blur_sensitive(true);
diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp
index 46d33abb7..39081b005 100644
--- a/src/ui/widget/style-subject.cpp
+++ b/src/ui/widget/style-subject.cpp
@@ -65,12 +65,12 @@ StyleSubject::iterator StyleSubject::Selection::begin() {
}
}
-NR::Maybe<NR::Rect> StyleSubject::Selection::getBounds(SPItem::BBoxType type) {
+boost::optional<NR::Rect> StyleSubject::Selection::getBounds(SPItem::BBoxType type) {
Inkscape::Selection *selection = _getSelection();
if (selection) {
return selection->bounds(type);
} else {
- return NR::Nothing();
+ return boost::optional<NR::Rect>();
}
}
@@ -143,12 +143,12 @@ StyleSubject::iterator StyleSubject::CurrentLayer::begin() {
return iterator(_getLayerSList());
}
-NR::Maybe<NR::Rect> StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) {
+boost::optional<NR::Rect> StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) {
SPObject *layer = _getLayer();
if (layer && SP_IS_ITEM(layer)) {
return sp_item_bbox_desktop(SP_ITEM(layer), type);
} else {
- return NR::Nothing();
+ return boost::optional<NR::Rect>();
}
}
diff --git a/src/ui/widget/style-subject.h b/src/ui/widget/style-subject.h
index f9c544976..9204a8163 100644
--- a/src/ui/widget/style-subject.h
+++ b/src/ui/widget/style-subject.h
@@ -10,7 +10,7 @@
#define SEEN_INKSCAPE_UI_WIDGET_STYLE_SUBJECT_H
#include "util/glib-list-iterators.h"
-#include "libnr/nr-maybe.h"
+#include <boost/optional.hpp>
#include "libnr/nr-rect.h"
#include "sp-item.h"
#include <sigc++/sigc++.h>
@@ -43,7 +43,7 @@ public:
virtual iterator begin() = 0;
virtual iterator end() { return iterator(NULL); }
- virtual NR::Maybe<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) = 0;
+ virtual boost::optional<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX) = 0;
virtual int queryStyle(SPStyle *query, int property) = 0;
virtual void setCSS(SPCSSAttr *css) = 0;
@@ -66,7 +66,7 @@ public:
~Selection();
virtual iterator begin();
- virtual NR::Maybe<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX);
+ virtual boost::optional<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX);
virtual int queryStyle(SPStyle *query, int property);
virtual void setCSS(SPCSSAttr *css);
@@ -87,7 +87,7 @@ public:
~CurrentLayer();
virtual iterator begin();
- virtual NR::Maybe<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX);
+ virtual boost::optional<NR::Rect> getBounds(SPItem::BBoxType type = SPItem::APPROXIMATE_BBOX);
virtual int queryStyle(SPStyle *query, int property);
virtual void setCSS(SPCSSAttr *css);