From 9f749722c869cbdbab91d935fb626886058c12b0 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 4 Jun 2016 17:21:05 +0200 Subject: Fix reading of 'stroke-dasharray' when there is a trailing blank. Also fixes reading a value when there is no digit before a decimal point. Fixed bugs: - https://launchpad.net/bugs/1485197 (bzr r14950) --- src/style-internal.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index b425a1c80..62b0de52d 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -1810,9 +1810,11 @@ SPIDashArray::read( gchar const *str ) { return; } + // std::vector tokens = Glib::Regex::split_simple("[,\\s]+", str ); + gchar *e = NULL; bool LineSolid = true; - while (e != str) { + while (e != str && *str != '\0') { /* TODO: Should allow rather than just a unitless (px) number. */ double number = g_ascii_strtod(str, (char **) &e); values.push_back( number ); @@ -1821,7 +1823,7 @@ SPIDashArray::read( gchar const *str ) { if (e != str) { str = e; } - while (str && *str && !isalnum(*str)) str += 1; + while (str && *str && !(isalnum(*str) || *str=='.')) str += 1; } if (LineSolid) { -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/style-internal.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 62b0de52d..136a522f8 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -23,16 +23,14 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include "style-internal.h" -#include "style-enums.h" #include "style.h" #include "svg/svg.h" #include "svg/svg-color.h" -#include "svg/svg-icc-color.h" #include "streq.h" #include "strneq.h" @@ -42,9 +40,6 @@ #include "svg/css-ostringstream.h" #include "util/units.h" -#include -#include - #include // TODO REMOVE OR MAKE MEMBER FUNCTIONS -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/style-internal.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 136a522f8..62b0de52d 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -23,14 +23,16 @@ */ #ifdef HAVE_CONFIG_H -#include +# include "config.h" #endif #include "style-internal.h" +#include "style-enums.h" #include "style.h" #include "svg/svg.h" #include "svg/svg-color.h" +#include "svg/svg-icc-color.h" #include "streq.h" #include "strneq.h" @@ -40,6 +42,9 @@ #include "svg/css-ostringstream.h" #include "util/units.h" +#include +#include + #include // TODO REMOVE OR MAKE MEMBER FUNCTIONS -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/style-internal.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 62b0de52d..136a522f8 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -23,16 +23,14 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include #endif #include "style-internal.h" -#include "style-enums.h" #include "style.h" #include "svg/svg.h" #include "svg/svg-color.h" -#include "svg/svg-icc-color.h" #include "streq.h" #include "strneq.h" @@ -42,9 +40,6 @@ #include "svg/css-ostringstream.h" #include "util/units.h" -#include -#include - #include // TODO REMOVE OR MAKE MEMBER FUNCTIONS -- cgit v1.2.3