diff options
-rw-r--r-- | src/lib/VSDXTheme.cpp | 21 | ||||
-rw-r--r-- | src/lib/VSDXTheme.h | 1 | ||||
-rw-r--r-- | src/lib/tokens.txt | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/VSDXTheme.cpp b/src/lib/VSDXTheme.cpp index a3f1ba8..126d16f 100644 --- a/src/lib/VSDXTheme.cpp +++ b/src/lib/VSDXTheme.cpp @@ -88,5 +88,26 @@ boost::optional<libvisio::Colour> libvisio::VSDXTheme::readSrgbClr(xmlTextReader return retVal; } +boost::optional<libvisio::Colour> libvisio::VSDXTheme::readSysClr(xmlTextReaderPtr reader) +{ + boost::optional<libvisio::Colour> retVal; + if (XML_A_SYSCLR == VSDXMLTokenMap::getTokenId(xmlTextReaderConstName(reader))) + { + xmlChar *lastClr = xmlTextReaderGetAttribute(reader, BAD_CAST("lastClr")); + if (lastClr) + { + try + { + retVal = xmlStringToColour(lastClr); + } + catch (const XmlParserException &) + { + } + xmlFree(lastClr); + } + } + return retVal; +} + /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff --git a/src/lib/VSDXTheme.h b/src/lib/VSDXTheme.h index 908f318..30ac216 100644 --- a/src/lib/VSDXTheme.h +++ b/src/lib/VSDXTheme.h @@ -51,6 +51,7 @@ private: VSDXTheme &operator=(const VSDXTheme &); boost::optional<Colour> readSrgbClr(xmlTextReaderPtr reader); + boost::optional<Colour> readSysClr(xmlTextReaderPtr reader); }; } // namespace libvisio diff --git a/src/lib/tokens.txt b/src/lib/tokens.txt index ead1950..7c4a966 100644 --- a/src/lib/tokens.txt +++ b/src/lib/tokens.txt @@ -46,6 +46,7 @@ a:schemeClr a:shade a:solidFill a:srgbClr +a:sysClr a:theme a:themeElements a:tint |