diff options
Diffstat (limited to 'src/sp-guide.cpp')
| -rw-r--r-- | src/sp-guide.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index f92d79116..7d36df4a3 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -23,6 +23,7 @@ #include <cstring> #include <string> #include "desktop-handles.h" +#include "display/sp-canvas.h" #include "display/guideline.h" #include "svg/svg.h" #include "svg/stringstream.h" @@ -221,7 +222,7 @@ static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value) guide->point_on_line = Geom::Point(newx, newy); } else if (success == 1) { // before 0.46 style guideline definition. - const gchar *attr = SP_OBJECT_REPR(object)->attribute("orientation"); + const gchar *attr = object->getRepr()->attribute("orientation"); if (attr && !strcmp(attr, "horizontal")) { guide->point_on_line = Geom::Point(0, newx); } else { @@ -344,7 +345,7 @@ double SPGuide::getDistanceFrom(Geom::Point const &pt) const * true indicates a "committing" version: in response to button release event after * dragging a guideline, or clicking OK in guide editing dialog. */ -void sp_guide_moveto(SPGuide const &guide, Geom::Point const point_on_line, bool const commit) +void sp_guide_moveto(SPGuide &guide, Geom::Point const point_on_line, bool const commit) { g_assert(SP_IS_GUIDE(&guide)); @@ -356,7 +357,7 @@ void sp_guide_moveto(SPGuide const &guide, Geom::Point const point_on_line, bool case, so that the guide's new position is available for sp_item_rm_unsatisfied_cns. */ if (commit) { //XML Tree being used here directly while it shouldn't be. - sp_repr_set_point(SP_OBJECT(&guide)->getRepr(), "position", point_on_line); + sp_repr_set_point(guide.getRepr(), "position", point_on_line); } /* DISABLED CODE BECAUSE SPGuideAttachment IS NOT USE AT THE MOMENT (johan) @@ -375,7 +376,7 @@ void sp_guide_moveto(SPGuide const &guide, Geom::Point const point_on_line, bool * true indicates a "committing" version: in response to button release event after * dragging a guideline, or clicking OK in guide editing dialog. */ -void sp_guide_set_normal(SPGuide const &guide, Geom::Point const normal_to_line, bool const commit) +void sp_guide_set_normal(SPGuide &guide, Geom::Point const normal_to_line, bool const commit) { g_assert(SP_IS_GUIDE(&guide)); @@ -387,7 +388,7 @@ void sp_guide_set_normal(SPGuide const &guide, Geom::Point const normal_to_line, case, so that the guide's new position is available for sp_item_rm_unsatisfied_cns. */ if (commit) { //XML Tree being used directly while it shouldn't be - sp_repr_set_point(SP_OBJECT(&guide)->getRepr(), "orientation", normal_to_line); + sp_repr_set_point(guide.getRepr(), "orientation", normal_to_line); } /* DISABLED CODE BECAUSE SPGuideAttachment IS NOT USE AT THE MOMENT (johan) @@ -458,7 +459,7 @@ void sp_guide_remove(SPGuide *guide) guide->attached_items.clear(); //XML Tree being used directly while it shouldn't be. - sp_repr_unparent(SP_OBJECT(guide)->getRepr()); + sp_repr_unparent(guide->getRepr()); } /* |
