summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/text-tool.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-11-12 01:48:38 +0000
committerMarkus Engel <markus.engel@tum.de>2013-11-12 01:48:38 +0000
commit0d56cd0b0b22de7385f173f0848f1ee71bdf5788 (patch)
tree2388a7841679186599ba85c269072947b456b2d1 /src/ui/tools/text-tool.cpp
parentFix bug in SPSwitch. (diff)
downloadinkscape-0d56cd0b0b22de7385f173f0848f1ee71bdf5788.tar.gz
inkscape-0d56cd0b0b22de7385f173f0848f1ee71bdf5788.zip
Clean up some tool related things.
(bzr r12795)
Diffstat (limited to 'src/ui/tools/text-tool.cpp')
-rw-r--r--src/ui/tools/text-tool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index 0a8b35110..2927606a7 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -415,12 +415,12 @@ static void sp_text_context_setup_text(TextTool *tc)
ToolBase *ec = SP_EVENT_CONTEXT(tc);
/* Create <text> */
- Inkscape::XML::Document *xml_doc = SP_EVENT_CONTEXT_DESKTOP(ec)->doc()->getReprDoc();
+ Inkscape::XML::Document *xml_doc = ec->desktop->doc()->getReprDoc();
Inkscape::XML::Node *rtext = xml_doc->createElement("svg:text");
rtext->setAttribute("xml:space", "preserve"); // we preserve spaces in the text objects we create
/* Set style */
- sp_desktop_apply_style_tool(SP_EVENT_CONTEXT_DESKTOP(ec), rtext, "/tools/text", true);
+ sp_desktop_apply_style_tool(ec->desktop, rtext, "/tools/text", true);
sp_repr_set_svg_double(rtext, "x", tc->pdoc[Geom::X]);
sp_repr_set_svg_double(rtext, "y", tc->pdoc[Geom::Y]);
@@ -1730,7 +1730,7 @@ static void sptc_commit(GtkIMContext */*imc*/, gchar *string, TextTool *tc)
void sp_text_context_place_cursor (TextTool *tc, SPObject *text, Inkscape::Text::Layout::iterator where)
{
- SP_EVENT_CONTEXT_DESKTOP (tc)->selection->set (text);
+ tc->desktop->selection->set (text);
tc->text_sel_start = tc->text_sel_end = where;
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
@@ -1738,7 +1738,7 @@ void sp_text_context_place_cursor (TextTool *tc, SPObject *text, Inkscape::Text:
void sp_text_context_place_cursor_at (TextTool *tc, SPObject *text, Geom::Point const p)
{
- SP_EVENT_CONTEXT_DESKTOP (tc)->selection->set (text);
+ tc->desktop->selection->set (text);
sp_text_context_place_cursor (tc, text, sp_te_get_position_by_coords(tc->text, p));
}