summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/text-tool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/tools/text-tool.cpp')
-rw-r--r--src/ui/tools/text-tool.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index df0583d67..a4370256d 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -1470,7 +1470,7 @@ int TextTool::_styleQueried(SPStyle *style, int property)
}
sp_text_context_validate_cursor_iterators(this);
- GSList *styles_list = NULL;
+ SelContainer styles_list;
Inkscape::Text::Layout::iterator begin_it, end_it;
if (this->text_sel_start < this->text_sel_end) {
@@ -1486,7 +1486,7 @@ int TextTool::_styleQueried(SPStyle *style, int property)
}
}
for (Inkscape::Text::Layout::iterator it = begin_it ; it < end_it ; it.nextStartOfSpan()) {
- SPObject const *pos_obj = 0;
+ SPObject *pos_obj = 0;
void *rawptr = 0;
layout->getSourceOfCharacter(it, &rawptr);
if (!rawptr || !SP_IS_OBJECT(rawptr)) {
@@ -1496,12 +1496,11 @@ int TextTool::_styleQueried(SPStyle *style, int property)
while (SP_IS_STRING(pos_obj) && pos_obj->parent) {
pos_obj = pos_obj->parent; // SPStrings don't have style
}
- styles_list = g_slist_prepend(styles_list, (gpointer)pos_obj);
+ styles_list.push_front(pos_obj);
}
int result = sp_desktop_query_style_from_list (styles_list, style, property);
- g_slist_free(styles_list);
return result;
}