From 013e92537296f6ba2434e29a96d18eeb353d9560 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 3 Aug 2013 23:30:12 +0200 Subject: reduce scope of variables (bzr r12463) --- src/object-snapper.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index e6f6d87db..77ba3040f 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -106,12 +106,11 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, if (it == NULL || i == it->end()) { SPItem *item = SP_ITEM(o); if (item) { - SPObject *obj = NULL; if (!clip_or_mask) { // cannot clip or mask more than once // The current item is not a clipping path or a mask, but might // still be the subject of clipping or masking itself ; if so, then // we should also consider that path or mask for snapping to - obj = SP_OBJECT(item->clip_ref ? item->clip_ref->getObject() : NULL); + SPObject *obj = SP_OBJECT(item->clip_ref ? item->clip_ref->getObject() : NULL); if (obj && _snapmanager->snapprefs.isTargetSnappable(SNAPTARGET_PATH_CLIP)) { _findCandidates(obj, it, false, bbox_to_snap, true, item->i2doc_affine()); } -- cgit v1.2.3 From 2f017d2ef4974eba04515b9a155656ce9f2f7822 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 24 Sep 2013 23:32:23 +0200 Subject: Refactored SPUse. (bzr r11608.1.128) --- src/object-snapper.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 77ba3040f..3f3f0c1bf 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -194,7 +194,7 @@ void Inkscape::ObjectSnapper::_collectNodes(SnapSourceType const &t, //Geom::Affine i2doc(Geom::identity()); SPItem *root_item = (*i).item; if (SP_IS_USE((*i).item)) { - root_item = sp_use_root(SP_USE((*i).item)); + root_item = SP_USE((*i).item)->root(); } g_return_if_fail(root_item); @@ -382,8 +382,8 @@ void Inkscape::ObjectSnapper::_collectPaths(Geom::Point /*p*/, SPItem *root_item = NULL; /* We might have a clone at hand, so make sure we get the root item */ if (SP_IS_USE((*i).item)) { - i2doc = sp_use_get_root_transform(SP_USE((*i).item)); - root_item = sp_use_root(SP_USE((*i).item)); + i2doc = SP_USE((*i).item)->get_root_transform(); + root_item = SP_USE((*i).item)->root(); g_return_if_fail(root_item); } else { i2doc = (*i).item->i2doc_affine(); @@ -770,7 +770,7 @@ void Inkscape::ObjectSnapper::_clear_paths() const Geom::PathVector* Inkscape::ObjectSnapper::_getBorderPathv() const { - Geom::Rect const border_rect = Geom::Rect(Geom::Point(0,0), Geom::Point((_snapmanager->getDocument())->getWidth(),(_snapmanager->getDocument())->getHeight())); + Geom::Rect const border_rect = Geom::Rect(Geom::Point(0,0), Geom::Point((_snapmanager->getDocument())->getWidth().value("px"),(_snapmanager->getDocument())->getHeight().value("px"))); return _getPathvFromRect(border_rect); } @@ -787,8 +787,8 @@ Geom::PathVector* Inkscape::ObjectSnapper::_getPathvFromRect(Geom::Rect const re void Inkscape::ObjectSnapper::_getBorderNodes(std::vector *points) const { - Geom::Coord w = (_snapmanager->getDocument())->getWidth(); - Geom::Coord h = (_snapmanager->getDocument())->getHeight(); + Geom::Coord w = (_snapmanager->getDocument())->getWidth().value("px"); + Geom::Coord h = (_snapmanager->getDocument())->getHeight().value("px"); points->push_back(SnapCandidatePoint(Geom::Point(0,0), SNAPSOURCE_UNDEFINED, SNAPTARGET_PAGE_CORNER)); points->push_back(SnapCandidatePoint(Geom::Point(0,h), SNAPSOURCE_UNDEFINED, SNAPTARGET_PAGE_CORNER)); points->push_back(SnapCandidatePoint(Geom::Point(w,h), SNAPSOURCE_UNDEFINED, SNAPTARGET_PAGE_CORNER)); -- cgit v1.2.3 From 30422af227381c9aa900690586d25adec4fa262f Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Wed, 9 Oct 2013 21:09:49 +0200 Subject: Documentation/Translation. Fix for Bug #1236382 (Typos in comments and message, localization context needed) by Yuri Chornoivan. Fixed bugs: - https://launchpad.net/bugs/1236382 (bzr r12673) --- src/object-snapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 3f3f0c1bf..de50f0dd8 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -538,7 +538,7 @@ void Inkscape::ObjectSnapper::_snapPaths(IntermSnapResults &isr, * - Linking the individual nodes of the SPPath we have here, to the nodes of the NodePath::SubPath class as being * used in sp_nodepath_selected_nodes_move. This class has a member variable called "selected". For this the nodes * should be in the exact same order for both classes, so we can index them - * - Replacing the SPPath being used here by the the NodePath::SubPath class; but how? + * - Replacing the SPPath being used here by the NodePath::SubPath class; but how? */ } -- cgit v1.2.3