diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-07-04 09:44:01 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-07-04 09:44:01 +0000 |
| commit | 0df291b7bdfe888cb07e35a75eab2c5eb183fef1 (patch) | |
| tree | ac677c227c943adc6cdb1459c8f34f5799da0751 /src/extension/internal/cairo-render-context.cpp | |
| parent | Export links to pdf. Fixes https://gitlab.com/inkscape/inbox/issues/583 (diff) | |
| download | inkscape-0df291b7bdfe888cb07e35a75eab2c5eb183fef1.tar.gz inkscape-0df291b7bdfe888cb07e35a75eab2c5eb183fef1.zip | |
Fix link export code
Diffstat (limited to 'src/extension/internal/cairo-render-context.cpp')
| -rw-r--r-- | src/extension/internal/cairo-render-context.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 99f667813..c801821c8 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -753,15 +753,17 @@ CairoRenderContext::popLayer() } } void CairoRenderContext::tagBegin(const char* l){ - char link[1000] = "uri='"; - if(strlen(l)<990) - strcat(link, l); - strcat(link, "'"); +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 4) + char* link = g_strdup_printf("uri='%s'", l); cairo_tag_begin(_cr, CAIRO_TAG_LINK, link); + g_free(link); +#endif } void CairoRenderContext::tagEnd(){ +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 4) cairo_tag_end(_cr, CAIRO_TAG_LINK); +#endif } |
