summaryrefslogtreecommitdiffstats
path: root/src/sp-guide.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-04-07 23:42:04 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-04-07 23:42:04 +0000
commit945ce419c806c73d70203dec33ececafbe108a92 (patch)
treecfcdb59bf47e9db7f9e01f7eebb59924bdeaea94 /src/sp-guide.cpp
parentMerge from trunk (again) (diff)
parentExtensions. SVG+media fix (see Bug #400356). (diff)
downloadinkscape-945ce419c806c73d70203dec33ececafbe108a92.tar.gz
inkscape-945ce419c806c73d70203dec33ececafbe108a92.zip
Merge from trunk
(bzr r9508.1.73)
Diffstat (limited to 'src/sp-guide.cpp')
-rw-r--r--src/sp-guide.cpp13
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());
}
/*