From 47ccee249363ab2106aa0a07a669efdaea06a34f Mon Sep 17 00:00:00 2001 From: David Mathog Date: Wed, 19 Mar 2014 23:03:52 +0100 Subject: WMF support: last piece of the code cleanup from bug #1248753 Fixed bugs: - https://launchpad.net/bugs/1248753 (bzr r13167) --- src/extension/internal/wmf-inout.cpp | 113 +++++++++++++++-------------------- 1 file changed, 49 insertions(+), 64 deletions(-) (limited to 'src') diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index 906c40301..9980d9d6d 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -445,9 +445,9 @@ int Wmf::in_images(PWMF_CALLBACK_DATA d, char *test){ uint32_t Wmf::add_dib_image(PWMF_CALLBACK_DATA d, const char *dib, uint32_t iUsage){ uint32_t idx; - char imagename[64]; // big enough - char xywh[64]; // big enough - int dibparams; + char imagename[64]; // big enough + char xywh[64]; // big enough + int dibparams = U_BI_UNKNOWN; // type of image not yet determined MEMPNG mempng; // PNG in memory comes back in this mempng.buffer = NULL; @@ -480,6 +480,7 @@ uint32_t Wmf::add_dib_image(PWMF_CALLBACK_DATA d, const char *dib, uint32_t iUsa } } } + gchar *base64String=NULL; if(dibparams == U_BI_JPEG || dibparams==U_BI_PNG){ // image was binary png or jpg in source file base64String = g_base64_encode((guchar*) px, numCt ); @@ -1248,13 +1249,11 @@ void Wmf::common_dib_to_image(PWMF_CALLBACK_DATA d, const char *dib, double dx, double dy, double dw, double dh, int sx, int sy, int sw, int sh, uint32_t iUsage){ SVGOStringStream tmp_image; - int dibparams; + int dibparams = U_BI_UNKNOWN; // type of image not yet determined tmp_image << "\n\t