From d2ff3d0675addcea3929ed868cf6b47d6cfe553d Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 24 Sep 2014 19:49:52 +0200 Subject: [PATCH] Always fill the additional-css XSLT parameter --- src/ag-chart.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/ag-chart.c b/src/ag-chart.c index 36d2ce8..374db08 100644 --- a/src/ag-chart.c +++ b/src/ag-chart.c @@ -1739,17 +1739,9 @@ ag_chart_create_svg(AgChart *chart, params = g_new0(gchar *, 5); params[0] = "rendering"; params[1] = (rendering) ? "'yes'" : "'no'"; + params[2] = "additional-css"; css = ag_display_theme_to_css(theme); - - // This seems to be a dirty hack, but it should do for a while - if (strlen(css) == 0) { - params[2] = NULL; - params[3] = NULL; - } else { - params[2] = "additional-css"; - params[3] = g_strdup_printf("\"%s\"", css); - } - + params[3] = g_strdup_printf("\"%s\"", css); g_free(css); // libxml2 messes up the output, as it prints decimal floating point