summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-21 22:34:10 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-21 22:34:10 +0200
commit85bd5303215df29f798e561f345914ccdf67bcdb (patch)
treefaf8df2a6a9be93815b9a65383c80e27942ada35
parent35be22a86d0cf1c2384cd1730350e0934cba0897 (diff)
a:srgbClr does not have # in the beginning of the hex
-rw-r--r--src/lib/VSDXMLHelper.cpp9
-rw-r--r--src/lib/VSDXTheme.cpp3
-rw-r--r--src/lib/VSDXTheme.h1
3 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/VSDXMLHelper.cpp b/src/lib/VSDXMLHelper.cpp
index 2f13255..7ff7db6 100644
--- a/src/lib/VSDXMLHelper.cpp
+++ b/src/lib/VSDXMLHelper.cpp
@@ -124,8 +124,11 @@ libvisio::Colour libvisio::xmlStringToColour(const xmlChar *s)
}
else
{
- VSD_DEBUG_MSG(("Throwing XmlParserException\n"));
- throw XmlParserException();
+ if (str.length() != 6)
+ {
+ VSD_DEBUG_MSG(("Throwing XmlParserException\n"));
+ throw XmlParserException();
+ }
}
std::istringstream istr(str);
@@ -217,8 +220,6 @@ bool libvisio::xmlStringToBool(const xmlChar *s)
}
-
-
// VSDXRelationship
libvisio::VSDXRelationship::VSDXRelationship(xmlTextReaderPtr reader)
diff --git a/src/lib/VSDXTheme.cpp b/src/lib/VSDXTheme.cpp
index 9110173..2f7b46d 100644
--- a/src/lib/VSDXTheme.cpp
+++ b/src/lib/VSDXTheme.cpp
@@ -27,9 +27,8 @@
* instead of those above.
*/
-#include "VSDXMLHelper.h"
-#include "VSDXMLTokenMap.h"
#include "VSDXTheme.h"
+#include "VSDXMLTokenMap.h"
libvisio::VSDXTheme::VSDXTheme()
{
diff --git a/src/lib/VSDXTheme.h b/src/lib/VSDXTheme.h
index 41e806c..cb4b485 100644
--- a/src/lib/VSDXTheme.h
+++ b/src/lib/VSDXTheme.h
@@ -31,6 +31,7 @@
#define __VSDXTHEME_H__
#include <libwpd-stream/libwpd-stream.h>
+#include "VSDXMLHelper.h"
namespace libvisio
{