diff options
| author | Ralf Stephan <ralf@ark.in-berlin.de> | 2006-05-30 09:18:46 +0000 |
|---|---|---|
| committer | rwst <rwst@users.sourceforge.net> | 2006-05-30 09:18:46 +0000 |
| commit | 1795843b2790d31843b172508b2f422f61815b7f (patch) | |
| tree | 54b658ca902023bd1c234dab3471406f2ea97cd0 /src/text-context.cpp | |
| parent | fixing "`msgid' and `msgstr' entries do not both end with '\n'" errors (diff) | |
| download | inkscape-1795843b2790d31843b172508b2f422f61815b7f.tar.gz inkscape-1795843b2790d31843b172508b2f422f61815b7f.zip | |
revert patch 12062:12063, deemed unsafe, with better alternatives
(bzr r1081)
Diffstat (limited to 'src/text-context.cpp')
| -rw-r--r-- | src/text-context.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp index 9bfc21d1e..641d8bce2 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -1356,13 +1356,12 @@ sp_text_context_style_query(SPStyle *style, int property, SPTextContext *tc) if (!begin_it.prevCharacter()) end_it.nextCharacter(); for (Inkscape::Text::Layout::iterator it = begin_it ; it < end_it ; it.nextStartOfSpan()) { - union { SPObject const *op; void *vp; } pos_obj; - pos_obj.vp = NULL; - layout->getSourceOfCharacter(it, &pos_obj.vp); - if (pos_obj.vp == NULL) continue; - while (SP_OBJECT_STYLE(pos_obj.op) == NULL && SP_OBJECT_PARENT(pos_obj.op)) - pos_obj.op = SP_OBJECT_PARENT(pos_obj.op); // SPStrings don't have style - styles_list = g_slist_prepend(styles_list, (gpointer)pos_obj.op); + SPObject const *pos_obj = NULL; + layout->getSourceOfCharacter(it, (void**)&pos_obj); + if (pos_obj == NULL) continue; + while (SP_OBJECT_STYLE(pos_obj) == NULL && SP_OBJECT_PARENT(pos_obj)) + pos_obj = SP_OBJECT_PARENT(pos_obj); // SPStrings don't have style + styles_list = g_slist_prepend(styles_list, (gpointer)pos_obj); } int result = sp_desktop_query_style_from_list (styles_list, style, property); |
