summaryrefslogtreecommitdiffstats
path: root/src/widgets
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/widgets
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/widgets')
-rw-r--r--src/widgets/font-selector.cpp2
-rw-r--r--src/widgets/icon.cpp2
-rw-r--r--src/widgets/select-toolbar.cpp4
-rw-r--r--src/widgets/toolbox.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index 1faf7005f..20b105614 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -671,7 +671,7 @@ static gint sp_font_preview_expose(GtkWidget *widget, GdkEventExpose *event)
hpos[len] = base_pt[0];
len++;
if ( curF ) {
- NR::Maybe<NR::Rect> nbbox = curF->BBox(str_text->glyph_text[i].gl);
+ boost::optional<NR::Rect> nbbox = curF->BBox(str_text->glyph_text[i].gl);
if (nbbox) {
bbox.x0 = MIN(bbox.x0, base_pt[Geom::X] + theSize * (nbbox->min())[0]);
bbox.y0 = MIN(bbox.y0, base_pt[Geom::Y] - theSize * (nbbox->max())[1]);
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index d89a85eaa..b460258ed 100644
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -623,7 +623,7 @@ sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
if (object && SP_IS_ITEM(object)) {
/* Find bbox in document */
Geom::Matrix const i2doc(sp_item_i2doc_affine(SP_ITEM(object)));
- NR::Maybe<Geom::Rect> dbox = SP_ITEM(object)->getBounds(i2doc);
+ boost::optional<Geom::Rect> dbox = SP_ITEM(object)->getBounds(i2doc);
if ( SP_OBJECT_PARENT(object) == NULL )
{
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 5a2adc8d2..e413aa39e 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -68,7 +68,7 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel)
int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0);
SPItem::BBoxType bbox_type = (prefs_bbox ==0)?
SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX;
- NR::Maybe<NR::Rect> const bbox(sel->bounds(bbox_type));
+ boost::optional<NR::Rect> const bbox(sel->bounds(bbox_type));
if ( bbox && !bbox->isEmpty() ) {
UnitTracker *tracker = reinterpret_cast<UnitTracker*>(g_object_get_data(G_OBJECT(spw), "tracker"));
SPUnit const &unit = *tracker->getActiveUnit();
@@ -158,7 +158,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
int prefs_bbox = prefs_get_int_attribute("tools", "bounding_box", 0);
SPItem::BBoxType bbox_type = (prefs_bbox ==0)?
SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX;
- NR::Maybe<NR::Rect> bbox = selection->bounds(bbox_type);
+ boost::optional<NR::Rect> bbox = selection->bounds(bbox_type);
if ( !bbox || bbox->isEmpty() ) {
g_object_set_data(G_OBJECT(spw), "update", GINT_TO_POINTER(FALSE));
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 9ca705189..07b388d14 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -1107,8 +1107,8 @@ sp_node_toolbox_coord_changed(gpointer /*shape_editor*/, GObject *tbl)
gtk_adjustment_set_value(yadj, sp_pixels_get_units(sel_node[Geom::Y], *unit));
}
} else {
- NR::Maybe<Geom::Coord> x = sp_node_selected_common_coord(nodepath, Geom::X);
- NR::Maybe<Geom::Coord> y = sp_node_selected_common_coord(nodepath, Geom::Y);
+ boost::optional<Geom::Coord> x = sp_node_selected_common_coord(nodepath, Geom::X);
+ boost::optional<Geom::Coord> y = sp_node_selected_common_coord(nodepath, Geom::Y);
if ((x && ((*x) != oldx)) || (y && ((*y) != oldy))) {
/* Note: Currently x and y will always have a value, even if the coordinates of the
selected nodes don't coincide (in this case we use the coordinates of the center