summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-11-29 15:05:20 +0100
committerDavid Tardon <dtardon@redhat.com>2016-11-29 15:05:20 +0100
commita3cf2c6d02c29e0a69794ead64dd932fa9e3f24b (patch)
tree69b3891fa8e83deb6bf87e187f41fd31f0629aeb
parent10f1e175b2dc83cc486614ac5a7a3b286eea7c0a (diff)
fix parsing of text block bg color in some cases
It appears that if the color index is 0xff, no color should be set. Change-Id: I0dcea16ed5d61292d84e82904b863c1ccafd9d7a
-rw-r--r--src/lib/VSDParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 26b1d9c..680e14b 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -877,7 +877,8 @@ void libvisio::VSDParser::readTextBlock(librevenge::RVNGInputStream *input)
input->seek(1, librevenge::RVNG_SEEK_CUR);
double bottomMargin = readDouble(input);
unsigned char verticalAlign = readU8(input);
- bool isBgFilled = (!!readU8(input));
+ const unsigned char bgColourIdx = readU8(input);
+ const bool isBgFilled = bgColourIdx != 0 && bgColourIdx != 0xff;
Colour c;
c.r = readU8(input);
c.g = readU8(input);