summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/text-tool.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-05-08 17:26:29 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-05-08 17:26:29 +0000
commitf31b2c75e1313ccceeb6d33cc14aa545d4d370f9 (patch)
tree444b38fe397f34ee5c298ed0efd5cc9f49afb7cf /src/ui/tools/text-tool.cpp
parentMore helper/geom.h pruning. (diff)
parentcmake: Bring cmake installation in line with autotools (bug #1451481) (diff)
downloadinkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.tar.gz
inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.zip
Merge from trunk
(bzr r14059.2.11)
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 a2c0c81ae..1888551cf 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -1461,7 +1461,7 @@ int TextTool::_styleQueried(SPStyle *style, int property)
}
sp_text_context_validate_cursor_iterators(this);
- GSList *styles_list = NULL;
+ std::vector<SPItem*> styles_list;
Inkscape::Text::Layout::iterator begin_it, end_it;
if (this->text_sel_start < this->text_sel_end) {
@@ -1477,7 +1477,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)) {
@@ -1487,12 +1487,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.insert(styles_list.begin(),(SPItem*)pos_obj);
}
int result = sp_desktop_query_style_from_list (styles_list, style, property);
- g_slist_free(styles_list);
return result;
}