From 6f05665abf781f0fb1c1baf5f6ac6662abf6ecfe Mon Sep 17 00:00:00 2001 From: David Mathog Date: Wed, 19 Mar 2014 19:08:48 +0100 Subject: EMF import: fix clipPath definition: move transform attribute into the element (bug #1294713) Fixed bugs: - https://launchpad.net/bugs/1294713 (bzr r13166) --- src/extension/internal/emf-inout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp index bbbce46e7..a4d204472 100644 --- a/src/extension/internal/emf-inout.cpp +++ b/src/extension/internal/emf-inout.cpp @@ -2163,9 +2163,9 @@ std::cout << "BEFORE DRAW" tmp_rectangle << "\n x=\"" << dx << "\" "; tmp_rectangle << "\n y=\"" << dy << "\" "; tmp_rectangle << "\n width=\"" << dw << "\" "; - tmp_rectangle << "\n height=\"" << dh << "\" />"; + tmp_rectangle << "\n height=\"" << dh << "\" "; tmp_rectangle << "\n transform=" << current_matrix(d, dx, dy, 1); // calculate appropriate offset - tmp_rectangle << "\n"; + tmp_rectangle << "/>\n"; *(d->outdef) += tmp_rectangle.str().c_str(); *(d->path) = ""; -- cgit v1.2.3 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(-) 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 0: + hpglInit += ';FS%d' % self.options.force + if self.options.speed > 0: + hpglInit += ';VS%d' % self.options.speed + self.hpgl = hpglInit + self.hpgl + ';PU0,0;SP0;IN;' def output(self): # print to file -- cgit v1.2.3 From 0d4514bf37d03f92d6e690eb7bdc9799f4a3e77c Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 20 Mar 2014 21:49:46 +0100 Subject: change more warnings into errors. eventually, we can better move to -Werror together with a short list of -Wno-error=... (bzr r13170) --- build.xml | 2 +- configure.ac | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.xml b/build.xml index 1e8341777..11c03b17f 100644 --- a/build.xml +++ b/build.xml @@ -351,7 +351,7 @@ - -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch + -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Werror=switch -Werror=return-type -O2 -mms-bitfields diff --git a/configure.ac b/configure.ac index 56bd68e15..d2454da06 100644 --- a/configure.ac +++ b/configure.ac @@ -89,11 +89,14 @@ if test "$GCC" = "yes"; then # enforced in Gtk+ 3, so it is important to check this in Gtk+ 2 builds CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS" + # Unfortunately, we cannot (yet) build with -Werror, so we have to manually + # change a ton of warnings into errors. + # After some more work on fixing warning-inducing code, we can change this set into + # it's complement and use -Wno-error=... # Test for -Werror=... (introduced some time post-4.0) - # If we hit a format error -- it should be fatal. - AC_MSG_CHECKING([compiler support for -Werror=format-security]) + AC_MSG_CHECKING([compiler support for -Werror=...]) ink_svd_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-Werror=format-security $CPPFLAGS" + CPPFLAGS="-Werror=format-security -Werror=switch -Werror=return-type $CPPFLAGS" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [ink_opt_ok=yes], [ink_opt_ok=no]) AC_MSG_RESULT([$ink_opt_ok]) if test "x$ink_opt_ok" != "xyes"; then -- cgit v1.2.3