[Libreoffice-commits] libvisio.git: src/lib

Fridrich Štrba fridrich.strba at bluewin.ch
Mon Feb 6 10:37:25 UTC 2017


 src/lib/VDXParser.cpp           |    8 ++--
 src/lib/VSD5Parser.cpp          |    6 +--
 src/lib/VSD6Parser.cpp          |    2 -
 src/lib/VSDCollector.h          |   11 +++--
 src/lib/VSDContentCollector.cpp |   22 ++++++-----
 src/lib/VSDContentCollector.h   |   11 +++--
 src/lib/VSDParser.cpp           |   13 +++----
 src/lib/VSDStyles.h             |   74 +++++++++++++++++++++++-----------------
 src/lib/VSDStylesCollector.cpp  |   10 +++--
 src/lib/VSDStylesCollector.h    |   11 +++--
 src/lib/VSDXMLParserBase.cpp    |    5 +-
 src/lib/VSDXParser.cpp          |   48 ++++++++++++++++---------
 src/lib/tokens.txt              |    8 ++++
 13 files changed, 138 insertions(+), 91 deletions(-)

New commits:
commit 90bdec7116f35886a4a3bb687945e3ebbf9a9433
Author: Fridrich Štrba <fridrich.strba at bluewin.ch>
Date:   Mon Feb 6 11:36:58 2017 +0100

    Some more reading of theme references
    
    Change-Id: Ic9dd48b086eef11e82ecac6b19b66669aea07844

diff --git a/src/lib/VDXParser.cpp b/src/lib/VDXParser.cpp
index cfdb1f1..e81ef0c 100644
--- a/src/lib/VDXParser.cpp
+++ b/src/lib/VDXParser.cpp
@@ -372,9 +372,9 @@ void libvisio::VDXParser::readLine(xmlTextReaderPtr reader)
   while ((XML_LINE != tokenId || XML_READER_TYPE_END_ELEMENT != tokenType) && 1 == ret && (!m_watcher || !m_watcher->isError()));
 
   if (m_isInStyles)
-    m_collector->collectLineStyle(level, strokeWidth, colour, linePattern, startMarker, endMarker, lineCap, rounding);
+    m_collector->collectLineStyle(level, strokeWidth, colour, linePattern, startMarker, endMarker,lineCap, rounding, -1, -1);
   else
-    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, colour, linePattern, startMarker, endMarker, lineCap, rounding));
+    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, colour, linePattern, startMarker, endMarker, lineCap, rounding, -1, -1));
 }
 
 void libvisio::VDXParser::readFillAndShadow(xmlTextReaderPtr reader)
@@ -453,7 +453,7 @@ void libvisio::VDXParser::readFillAndShadow(xmlTextReaderPtr reader)
 
   if (m_isInStyles)
     m_collector->collectFillStyle(level, fillColourFG, fillColourBG, fillPattern, fillFGTransparency,
-                                  fillBGTransparency, shadowPattern, shadowColourFG, shadowOffsetX, shadowOffsetY, -1, -1);
+                                  fillBGTransparency, shadowPattern, shadowColourFG, shadowOffsetX, shadowOffsetY, -1, -1, -1);
   else
   {
     if (m_isStencilStarted)
@@ -461,7 +461,7 @@ void libvisio::VDXParser::readFillAndShadow(xmlTextReaderPtr reader)
       VSD_DEBUG_MSG(("Found stencil fill\n"));
     }
     m_shape.m_fillStyle.override(VSDOptionalFillStyle(fillColourFG, fillColourBG, fillPattern, fillFGTransparency, fillBGTransparency,
-                                                      shadowColourFG, shadowPattern, shadowOffsetX, shadowOffsetY, -1, -1));
+                                                      shadowColourFG, shadowPattern, shadowOffsetX, shadowOffsetY, -1, -1, 1));
   }
 }
 
diff --git a/src/lib/VSD5Parser.cpp b/src/lib/VSD5Parser.cpp
index 94dbbed..3d9edcf 100644
--- a/src/lib/VSD5Parser.cpp
+++ b/src/lib/VSD5Parser.cpp
@@ -213,9 +213,9 @@ void libvisio::VSD5Parser::readLine(librevenge::RVNGInputStream *input)
   unsigned char lineCap = readU8(input);
 
   if (m_isInStyles)
-    m_collector->collectLineStyle(m_header.level, strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding);
+    m_collector->collectLineStyle(m_header.level, strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding, -1, -1);
   else
-    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding));
+    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding, -1, -1));
 }
 
 void libvisio::VSD5Parser::readParaIX(librevenge::RVNGInputStream *input)
@@ -356,7 +356,7 @@ void libvisio::VSD5Parser::readFillAndShadow(librevenge::RVNGInputStream *input)
     }
     m_shape.m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, 0.0,
                                                       0.0, shfgc, shadowPattern, shadowOffsetX,
-                                                      shadowOffsetY, -1, -1));
+                                                      shadowOffsetY, -1, -1, -1));
   }
 }
 
diff --git a/src/lib/VSD6Parser.cpp b/src/lib/VSD6Parser.cpp
index 9979895..745de2f 100644
--- a/src/lib/VSD6Parser.cpp
+++ b/src/lib/VSD6Parser.cpp
@@ -305,7 +305,7 @@ void libvisio::VSD6Parser::readFillAndShadow(librevenge::RVNGInputStream *input)
     }
     m_shape.m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, fillFGTransparency,
                                                       fillBGTransparency, shadowFG, shadowPattern,
-                                                      shadowOffsetX, shadowOffsetY, -1, -1));
+                                                      shadowOffsetX, shadowOffsetY, -1, -1, -1));
   }
 }
 
diff --git a/src/lib/VSDCollector.h b/src/lib/VSDCollector.h
index 4012d37..7286d1c 100644
--- a/src/lib/VSDCollector.h
+++ b/src/lib/VSDCollector.h
@@ -31,12 +31,13 @@ public:
   virtual void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop) = 0;
   virtual void collectLine(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
                            const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
-                           const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding) = 0;
+                           const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding,
+                           const boost::optional<long> &qsLineColour, const boost::optional<long> &qsLineMatrix) = 0;
   virtual void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                                     const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                                     const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
                                     const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY,
-                                    const boost::optional<long> &qsFc, const boost::optional<long> &qsSc) = 0;
+                                    const boost::optional<long> &qsFc, const boost::optional<long> &qsSc, const boost::optional<long> &qsLm) = 0;
   virtual void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                                     const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                                     const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
@@ -116,12 +117,14 @@ public:
   virtual void collectStyleSheet(unsigned id, unsigned level,unsigned parentLineStyle, unsigned parentFillStyle, unsigned parentTextStyle) = 0;
   virtual void collectLineStyle(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
                                 const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
-                                const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding) = 0;
+                                const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding,
+                                const boost::optional<long> &qsLineColour, const boost::optional<long> &qsLineMatrix) = 0;
   virtual void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                                 const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                                 const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
                                 const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY,
-                                const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour) = 0;
+                                const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour,
+                                const boost::optional<long> &qsFillMatrix) = 0;
   virtual void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                                 const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                                 const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index 56cf440..b4db6fe 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -1611,20 +1611,21 @@ void libvisio::VSDContentCollector::collectRelQuadBezTo(unsigned /* id */, unsig
 
 void libvisio::VSDContentCollector::collectLine(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
                                                 const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker, const boost::optional<unsigned char> &lineCap,
-                                                const boost::optional<double> &rounding)
+                                                const boost::optional<double> &rounding, const boost::optional<long> &qsLineColour, const boost::optional<long> &qsLineMatrix)
 {
   _handleLevelChange(level);
-  m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding), m_documentTheme);
+  m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding, qsLineColour, qsLineMatrix), m_documentTheme);
 }
 
 void libvisio::VSDContentCollector::collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                                                          const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency, const boost::optional<double> &fillBGTransparency,
                                                          const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX,
-                                                         const boost::optional<double> &shadowOffsetY, const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour)
+                                                         const boost::optional<double> &shadowOffsetY, const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour,
+                                                         const boost::optional<long> &qsFillMatrix)
 {
   _handleLevelChange(level);
   m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shfgc,
-                                            shadowPattern, shadowOffsetX, shadowOffsetY, qsFillColour, qsShadowColour), m_documentTheme);
+                                            shadowPattern, shadowOffsetX, shadowOffsetY, qsFillColour, qsShadowColour, qsFillMatrix), m_documentTheme);
 }
 
 void libvisio::VSDContentCollector::collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
@@ -1632,7 +1633,7 @@ void libvisio::VSDContentCollector::collectFillAndShadow(unsigned level, const b
                                                          const boost::optional<double> &fillBGTransparency,
                                                          const boost::optional<unsigned char> &shadowPattern, const boost::optional<Colour> &shfgc)
 {
-  collectFillAndShadow(level, colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shadowPattern, shfgc, m_shadowOffsetX, m_shadowOffsetY, -1, -1);
+  collectFillAndShadow(level, colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shadowPattern, shfgc, m_shadowOffsetX, m_shadowOffsetY, -1, -1, -1);
 }
 
 void libvisio::VSDContentCollector::collectForeignData(unsigned level, const librevenge::RVNGBinaryData &binaryData)
@@ -2791,9 +2792,10 @@ void libvisio::VSDContentCollector::collectStyleSheet(unsigned id, unsigned leve
 void libvisio::VSDContentCollector::collectLineStyle(unsigned /* level */, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c,
                                                      const boost::optional<unsigned char> &linePattern, const boost::optional<unsigned char> &startMarker,
                                                      const boost::optional<unsigned char> &endMarker, const boost::optional<unsigned char> &lineCap,
-                                                     const boost::optional<double> &rounding)
+                                                     const boost::optional<double> &rounding, const boost::optional<long> &qsLineColour,
+                                                     const boost::optional<long> &qsLineMatrix)
 {
-  VSDOptionalLineStyle lineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding);
+  VSDOptionalLineStyle lineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding, qsLineColour, qsLineMatrix);
   m_styles.addLineStyle(m_currentStyleSheet, lineStyle);
 }
 
@@ -2802,10 +2804,10 @@ void libvisio::VSDContentCollector::collectFillStyle(unsigned /* level */, const
                                                      const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
                                                      const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX,
                                                      const boost::optional<double> &shadowOffsetY, const boost::optional<long> &qsFillColour,
-                                                     const boost::optional<long> &qsShadowColour)
+                                                     const boost::optional<long> &qsShadowColour, const boost::optional<long> &qsFillMatrix)
 {
   VSDOptionalFillStyle fillStyle(colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shfgc, shadowPattern,
-                                 shadowOffsetX, shadowOffsetY, qsFillColour, qsShadowColour);
+                                 shadowOffsetX, shadowOffsetY, qsFillColour, qsShadowColour, qsFillMatrix);
   m_styles.addFillStyle(m_currentStyleSheet, fillStyle);
 
 }
@@ -2816,7 +2818,7 @@ void libvisio::VSDContentCollector::collectFillStyle(unsigned level, const boost
                                                      const boost::optional<Colour> &shfgc)
 {
   collectFillStyle(level, colourFG, colourBG, fillPattern, fillFGTransparency, fillBGTransparency, shadowPattern, shfgc,
-                   m_shadowOffsetX, m_shadowOffsetY, -1, -1);
+                   m_shadowOffsetX, m_shadowOffsetY, -1, -1, -1);
 }
 
 void libvisio::VSDContentCollector::collectParaIXStyle(unsigned /* id */, unsigned /* level */, unsigned charCount,
diff --git a/src/lib/VSDContentCollector.h b/src/lib/VSDContentCollector.h
index 55655eb..d40b72f 100644
--- a/src/lib/VSDContentCollector.h
+++ b/src/lib/VSDContentCollector.h
@@ -50,12 +50,13 @@ public:
   void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop);
   void collectLine(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
                    const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
-                   const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding);
+                   const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding,
+                   const boost::optional<long> &qsLineColour, const boost::optional<long> &qsLineMatrix);
   void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                             const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                             const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
                             const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY,
-                            const boost::optional<long> &qsFc, const boost::optional<long> &qsSc);
+                            const boost::optional<long> &qsFc, const boost::optional<long> &qsSc, const boost::optional<long> &qsLm);
   void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                             const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                             const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
@@ -136,12 +137,14 @@ public:
   void collectStyleSheet(unsigned id, unsigned level, unsigned parentLineStyle, unsigned parentFillStyle, unsigned parentTextStyle);
   void collectLineStyle(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
                         const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
-                        const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding);
+                        const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding,
+                        const boost::optional<long> &qsLineColour, const boost::optional<long> &qsLineMatrix);
   void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                         const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                         const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
                         const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY,
-                        const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour);
+                        const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour,
+                        const boost::optional<long> &qsFillMatrix);
   void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                         const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                         const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp
index 822090c..8ac21eb 100644
--- a/src/lib/VSDParser.cpp
+++ b/src/lib/VSDParser.cpp
@@ -631,12 +631,13 @@ void libvisio::VSDParser::_flushShape()
     m_collector->collectTxtXForm(m_currentShapeLevel+2, *(m_shape.m_txtxform));
 
   m_collector->collectLine(m_currentShapeLevel+2, m_shape.m_lineStyle.width, m_shape.m_lineStyle.colour, m_shape.m_lineStyle.pattern,
-                           m_shape.m_lineStyle.startMarker, m_shape.m_lineStyle.endMarker, m_shape.m_lineStyle.cap, m_shape.m_lineStyle.rounding);
+                           m_shape.m_lineStyle.startMarker, m_shape.m_lineStyle.endMarker, m_shape.m_lineStyle.cap, m_shape.m_lineStyle.rounding,
+                           m_shape.m_lineStyle.qsLineColour, m_shape.m_lineStyle.qsLineMatrix);
 
   m_collector->collectFillAndShadow(m_currentShapeLevel+2, m_shape.m_fillStyle.fgColour, m_shape.m_fillStyle.bgColour, m_shape.m_fillStyle.pattern,
                                     m_shape.m_fillStyle.fgTransparency, m_shape.m_fillStyle.bgTransparency, m_shape.m_fillStyle.shadowPattern,
                                     m_shape.m_fillStyle.shadowFgColour, m_shape.m_fillStyle.shadowOffsetX, m_shape.m_fillStyle.shadowOffsetY,
-                                    m_shape.m_fillStyle.qsFillColour, m_shape.m_fillStyle.qsShadowColour);
+                                    m_shape.m_fillStyle.qsFillColour, m_shape.m_fillStyle.qsShadowColour, m_shape.m_fillStyle.qsFillMatrix);
 
   m_collector->collectTextBlock(m_currentShapeLevel+2, m_shape.m_textBlockStyle.leftMargin, m_shape.m_textBlockStyle.rightMargin,
                                 m_shape.m_textBlockStyle.topMargin, m_shape.m_textBlockStyle.bottomMargin, m_shape.m_textBlockStyle.verticalAlign,
@@ -862,9 +863,9 @@ void libvisio::VSDParser::readLine(librevenge::RVNGInputStream *input)
   unsigned char lineCap = readU8(input);
 
   if (m_isInStyles)
-    m_collector->collectLineStyle(m_header.level, strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding);
+    m_collector->collectLineStyle(m_header.level, strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding, -1, -1);
   else
-    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding));
+    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, c, linePattern, startMarker, endMarker, lineCap, rounding, -1, -1));
 }
 
 void libvisio::VSDParser::readTextBlock(librevenge::RVNGInputStream *input)
@@ -2090,7 +2091,7 @@ void libvisio::VSDParser::readFillAndShadow(librevenge::RVNGInputStream *input)
   if (m_isInStyles)
     m_collector->collectFillStyle(m_header.level, colourFG, colourBG, fillPattern,
                                   fillFGTransparency, fillBGTransparency, shadowPattern, shadowFG,
-                                  shadowOffsetX, shadowOffsetY, -1, -1);
+                                  shadowOffsetX, shadowOffsetY, -1, -1, -1);
   else
   {
     if (m_isStencilStarted)
@@ -2099,7 +2100,7 @@ void libvisio::VSDParser::readFillAndShadow(librevenge::RVNGInputStream *input)
     }
     m_shape.m_fillStyle.override(VSDOptionalFillStyle(colourFG, colourBG, fillPattern, fillFGTransparency,
                                                       fillBGTransparency, shadowFG, shadowPattern,
-                                                      shadowOffsetX, shadowOffsetY, -1, -1));
+                                                      shadowOffsetX, shadowOffsetY, -1, -1, -1));
   }
 }
 
diff --git a/src/lib/VSDStyles.h b/src/lib/VSDStyles.h
index f50946e..5bc020b 100644
--- a/src/lib/VSDStyles.h
+++ b/src/lib/VSDStyles.h
@@ -23,15 +23,19 @@ namespace libvisio
 struct VSDOptionalLineStyle
 {
   VSDOptionalLineStyle() :
-    width(), colour(), pattern(), startMarker(), endMarker(), cap(), rounding() {}
+    width(), colour(), pattern(), startMarker(), endMarker(), cap(), rounding(),
+    qsLineColour(), qsLineMatrix() {}
   VSDOptionalLineStyle(const boost::optional<double> &w, const boost::optional<Colour> &col,
                        const boost::optional<unsigned char> &p, const boost::optional<unsigned char> &sm,
                        const boost::optional<unsigned char> &em, const boost::optional<unsigned char> &c,
-                       const boost::optional<double> &r) :
-    width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c), rounding(r) {}
+                       const boost::optional<double> &r, const boost::optional<long> &qlc,
+                       const boost::optional<long> &qlm) :
+    width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c), rounding(r),
+    qsLineColour(qlc), qsLineMatrix(qlm) {}
   VSDOptionalLineStyle(const VSDOptionalLineStyle &style) :
     width(style.width), colour(style.colour), pattern(style.pattern), startMarker(style.startMarker),
-    endMarker(style.endMarker), cap(style.cap), rounding(style.rounding) {}
+    endMarker(style.endMarker), cap(style.cap), rounding(style.rounding), qsLineColour(style.qsLineColour),
+    qsLineMatrix(style.qsLineMatrix) {}
   ~VSDOptionalLineStyle() {}
   void override(const VSDOptionalLineStyle &style)
   {
@@ -42,6 +46,8 @@ struct VSDOptionalLineStyle
     ASSIGN_OPTIONAL(style.endMarker, endMarker);
     ASSIGN_OPTIONAL(style.cap, cap);
     ASSIGN_OPTIONAL(style.rounding, rounding);
+    ASSIGN_OPTIONAL(style.qsLineColour, qsLineColour);
+    ASSIGN_OPTIONAL(style.qsLineMatrix, qsLineMatrix);
   }
 
   boost::optional<double> width;
@@ -51,18 +57,23 @@ struct VSDOptionalLineStyle
   boost::optional<unsigned char> endMarker;
   boost::optional<unsigned char> cap;
   boost::optional<double> rounding;
+  boost::optional<long> qsLineColour;
+  boost::optional<long> qsLineMatrix;
 };
 
 struct VSDLineStyle
 {
   VSDLineStyle() :
-    width(0.01), colour(), pattern(1), startMarker(0), endMarker(0), cap(0), rounding(0.0) {}
+    width(0.01), colour(), pattern(1), startMarker(0), endMarker(0), cap(0), rounding(0.0),
+    qsLineColour(-1), qsLineMatrix(-1) {}
   VSDLineStyle(double w, Colour col, unsigned char p, unsigned char sm,
-               unsigned char em, unsigned char c, double r) :
-    width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c), rounding(r) {}
+               unsigned char em, unsigned char c, double r, long qlc, long qlm) :
+    width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c), rounding(r),
+    qsLineColour(qlc), qsLineMatrix(qlm) {}
   VSDLineStyle(const VSDLineStyle &style) :
     width(style.width), colour(style.colour), pattern(style.pattern), startMarker(style.startMarker),
-    endMarker(style.endMarker), cap(style.cap), rounding(style.rounding) {}
+    endMarker(style.endMarker), cap(style.cap), rounding(style.rounding), qsLineColour(style.qsLineColour),
+    qsLineMatrix(style.qsLineMatrix) {}
   ~VSDLineStyle() {}
   void override(const VSDOptionalLineStyle &style, const VSDXTheme *theme)
   {
@@ -72,14 +83,14 @@ struct VSDLineStyle
     ASSIGN_OPTIONAL(style.endMarker, endMarker);
     ASSIGN_OPTIONAL(style.cap, cap);
     ASSIGN_OPTIONAL(style.rounding, rounding);
-    if (!theme)
-    {
-      ASSIGN_OPTIONAL(style.colour, colour);
-    }
-    else
+    ASSIGN_OPTIONAL(style.qsLineColour, qsLineColour);
+    ASSIGN_OPTIONAL(style.qsLineMatrix, qsLineMatrix);
+    if (theme)
     {
-      ASSIGN_OPTIONAL(style.colour, colour);
+      if (!!style.qsLineColour && style.qsLineColour.get() >= 0)
+        ASSIGN_OPTIONAL(theme->getThemeColour(style.qsLineColour.get()), colour);
     }
+    ASSIGN_OPTIONAL(style.colour, colour);
   }
 
   double width;
@@ -89,27 +100,30 @@ struct VSDLineStyle
   unsigned char endMarker;
   unsigned char cap;
   double rounding;
+  long qsLineColour;
+  long qsLineMatrix;
 };
 
 struct VSDOptionalFillStyle
 {
   VSDOptionalFillStyle() :
     fgColour(), bgColour(), pattern(), fgTransparency(), bgTransparency(), shadowFgColour(),
-    shadowPattern(), shadowOffsetX(), shadowOffsetY(), qsFillColour(), qsShadowColour() {}
+    shadowPattern(), shadowOffsetX(), shadowOffsetY(), qsFillColour(), qsShadowColour(),
+    qsFillMatrix() {}
   VSDOptionalFillStyle(const boost::optional<Colour> &fgc, const boost::optional<Colour> &bgc,
                        const boost::optional<unsigned char> &p, const boost::optional<double> &fga,
                        const boost::optional<double> &bga, const boost::optional<Colour> &sfgc,
                        const boost::optional<unsigned char> &shp, const boost::optional<double> &shX,
                        const boost::optional<double> &shY, const boost::optional<long> &qsFc,
-                       const boost::optional<long> &qsSc) :
+                       const boost::optional<long> &qsSc, const boost::optional<long> &qsFm) :
     fgColour(fgc), bgColour(bgc), pattern(p), fgTransparency(fga), bgTransparency(bga),
     shadowFgColour(sfgc), shadowPattern(shp), shadowOffsetX(shX), shadowOffsetY(shY),
-    qsFillColour(qsFc), qsShadowColour(qsSc) {}
+    qsFillColour(qsFc), qsShadowColour(qsSc), qsFillMatrix(qsFm) {}
   VSDOptionalFillStyle(const VSDOptionalFillStyle &style) :
     fgColour(style.fgColour), bgColour(style.bgColour), pattern(style.pattern), fgTransparency(style.fgTransparency),
     bgTransparency(style.bgTransparency), shadowFgColour(style.shadowFgColour), shadowPattern(style.shadowPattern),
     shadowOffsetX(style.shadowOffsetX), shadowOffsetY(style.shadowOffsetY), qsFillColour(style.qsFillColour),
-    qsShadowColour(style.qsShadowColour) {}
+    qsShadowColour(style.qsShadowColour), qsFillMatrix(style.qsFillMatrix) {}
   ~VSDOptionalFillStyle() {}
   void override(const VSDOptionalFillStyle &style)
   {
@@ -121,6 +135,7 @@ struct VSDOptionalFillStyle
     ASSIGN_OPTIONAL(style.shadowOffsetY, shadowOffsetY);
     ASSIGN_OPTIONAL(style.qsFillColour, qsFillColour);
     ASSIGN_OPTIONAL(style.qsShadowColour, qsShadowColour);
+    ASSIGN_OPTIONAL(style.qsFillMatrix, qsFillMatrix);
     ASSIGN_OPTIONAL(style.fgColour, fgColour);
     ASSIGN_OPTIONAL(style.bgColour, bgColour);
     ASSIGN_OPTIONAL(style.shadowFgColour, shadowFgColour);
@@ -137,23 +152,24 @@ struct VSDOptionalFillStyle
   boost::optional<double> shadowOffsetY;
   boost::optional<long> qsFillColour;
   boost::optional<long> qsShadowColour;
+  boost::optional<long> qsFillMatrix;
 };
 
 struct VSDFillStyle
 {
   VSDFillStyle()
     : fgColour(), bgColour(0xff, 0xff, 0xff, 0), pattern(0), fgTransparency(0), bgTransparency(0), shadowFgColour(),
-      shadowPattern(0), shadowOffsetX(0), shadowOffsetY(0), qsFillColour(-1), qsShadowColour(-1) {}
+      shadowPattern(0), shadowOffsetX(0), shadowOffsetY(0), qsFillColour(-1), qsShadowColour(-1), qsFillMatrix(-1) {}
   VSDFillStyle(const Colour &fgc, const Colour &bgc, unsigned char p, double fga, double bga, const Colour &sfgc,
-               unsigned char shp, double shX, double shY, long qsFc, long qsSc)
+               unsigned char shp, double shX, double shY, long qsFc, long qsSc, long qsFm)
     : fgColour(fgc), bgColour(bgc), pattern(p), fgTransparency(fga), bgTransparency(bga),
       shadowFgColour(sfgc), shadowPattern(shp), shadowOffsetX(shX), shadowOffsetY(shY),
-      qsFillColour(qsFc), qsShadowColour(qsSc) {}
+      qsFillColour(qsFc), qsShadowColour(qsSc), qsFillMatrix(qsFm) {}
   VSDFillStyle(const VSDFillStyle &style) :
     fgColour(style.fgColour), bgColour(style.bgColour), pattern(style.pattern), fgTransparency(style.fgTransparency),
     bgTransparency(style.bgTransparency), shadowFgColour(style.shadowFgColour), shadowPattern(style.shadowPattern),
     shadowOffsetX(style.shadowOffsetX), shadowOffsetY(style.shadowOffsetY), qsFillColour(style.qsFillColour),
-    qsShadowColour(style.qsShadowColour) {}
+    qsShadowColour(style.qsShadowColour), qsFillMatrix(style.qsFillMatrix) {}
   ~VSDFillStyle() {}
   void override(const VSDOptionalFillStyle &style, const VSDXTheme *theme)
   {
@@ -166,26 +182,21 @@ struct VSDFillStyle
     ASSIGN_OPTIONAL(style.shadowOffsetY, shadowOffsetY);
     ASSIGN_OPTIONAL(style.qsFillColour, qsFillColour);
     ASSIGN_OPTIONAL(style.qsShadowColour, qsShadowColour);
+    ASSIGN_OPTIONAL(style.qsFillMatrix, qsFillMatrix);
     if (theme)
     {
       if (!!style.qsFillColour && style.qsFillColour.get() >= 0)
         ASSIGN_OPTIONAL(theme->getThemeColour(style.qsFillColour.get()), fgColour);
-      ASSIGN_OPTIONAL(style.fgColour, fgColour);
 
       if (!!style.qsFillColour && style.qsFillColour.get() >= 0)
         ASSIGN_OPTIONAL(theme->getThemeColour(style.qsFillColour.get()), bgColour);
-      ASSIGN_OPTIONAL(style.bgColour, bgColour);
 
       if (!!style.qsShadowColour && style.qsShadowColour.get() >= 0)
         ASSIGN_OPTIONAL(theme->getThemeColour(style.qsShadowColour.get()), shadowFgColour);
-      ASSIGN_OPTIONAL(style.shadowFgColour, shadowFgColour);
-    }
-    else
-    {
-      ASSIGN_OPTIONAL(style.fgColour, fgColour);
-      ASSIGN_OPTIONAL(style.bgColour, bgColour);
-      ASSIGN_OPTIONAL(style.shadowFgColour, shadowFgColour);
     }
+    ASSIGN_OPTIONAL(style.fgColour, fgColour);
+    ASSIGN_OPTIONAL(style.bgColour, bgColour);
+    ASSIGN_OPTIONAL(style.shadowFgColour, shadowFgColour);
   }
 
   Colour fgColour;
@@ -199,6 +210,7 @@ struct VSDFillStyle
   double shadowOffsetY;
   long qsFillColour;
   long qsShadowColour;
+  long qsFillMatrix;
 };
 
 struct VSDOptionalCharStyle
diff --git a/src/lib/VSDStylesCollector.cpp b/src/lib/VSDStylesCollector.cpp
index 2ba74d0..c7ff44d 100644
--- a/src/lib/VSDStylesCollector.cpp
+++ b/src/lib/VSDStylesCollector.cpp
@@ -55,7 +55,8 @@ void libvisio::VSDStylesCollector::collectEllipse(unsigned /* id */, unsigned le
 void libvisio::VSDStylesCollector::collectLine(unsigned level, const boost::optional<double> & /* strokeWidth */,
                                                const boost::optional<Colour> & /* c */, const boost::optional<unsigned char> & /* linePattern */,
                                                const boost::optional<unsigned char> & /* startMarker */, const boost::optional<unsigned char> & /* endMarker */,
-                                               const boost::optional<unsigned char> & /* lineCap */, const boost::optional<double> & /* rounding */)
+                                               const boost::optional<unsigned char> & /* lineCap */, const boost::optional<double> & /* rounding */,
+                                               const boost::optional<long> & /* qsLineColour */, const boost::optional<long> & /* qsLineMatrix */)
 {
   _handleLevelChange(level);
 }
@@ -65,7 +66,7 @@ void libvisio::VSDStylesCollector::collectFillAndShadow(unsigned level, const bo
                                                         const boost::optional<double> & /* fillBGTransparency */, const boost::optional<unsigned char> & /* shadowPattern */,
                                                         const boost::optional<Colour> & /* shfgc */, const boost::optional<double> & /* shadowOffsetX */,
                                                         const boost::optional<double> & /* shadowOffsetY */, const boost::optional<long> & /* qsFillColour */,
-                                                        const boost::optional<long> & /* qsShadowColour */)
+                                                        const boost::optional<long> & /* qsShadowColour */, const boost::optional<long> & /* qsFillMatrix */)
 {
   _handleLevelChange(level);
 }
@@ -339,7 +340,8 @@ void libvisio::VSDStylesCollector::collectStyleSheet(unsigned /* id */, unsigned
 void libvisio::VSDStylesCollector::collectLineStyle(unsigned level, const boost::optional<double> & /* strokeWidth */, const boost::optional<Colour> & /* c */,
                                                     const boost::optional<unsigned char> & /* linePattern */, const boost::optional<unsigned char> & /* startMarker */,
                                                     const boost::optional<unsigned char> & /* endMarker */, const boost::optional<unsigned char> & /* lineCap */,
-                                                    const boost::optional<double> & /* rounding */)
+                                                    const boost::optional<double> & /* rounding */, const boost::optional<long> & /* qsLineColour */,
+                                                    const boost::optional<long> & /* qsLineMatrix */)
 {
   _handleLevelChange(level);
 }
@@ -349,7 +351,7 @@ void libvisio::VSDStylesCollector::collectFillStyle(unsigned level, const boost:
                                                     const boost::optional<double> & /* fillBGTransparency */, const boost::optional<unsigned char> & /* shadowPattern */,
                                                     const boost::optional<Colour> & /* shfgc */, const boost::optional<double> & /* shadowOffsetX */,
                                                     const boost::optional<double> & /* shadowOffsetY */, const boost::optional<long> & /* qsFillColour */,
-                                                    const boost::optional<long> & /* qsShadowColour */)
+                                                    const boost::optional<long> & /* qsShadowColour */, const boost::optional<long> & /* qsFillMatrix */)
 {
   _handleLevelChange(level);
 }
diff --git a/src/lib/VSDStylesCollector.h b/src/lib/VSDStylesCollector.h
index 1c2458c..16cf00d 100644
--- a/src/lib/VSDStylesCollector.h
+++ b/src/lib/VSDStylesCollector.h
@@ -42,12 +42,13 @@ public:
   void collectEllipse(unsigned id, unsigned level, double cx, double cy, double xleft, double yleft, double xtop, double ytop);
   void collectLine(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
                    const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
-                   const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding);
+                   const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding,
+                   const boost::optional<long> &qsLineColour, const boost::optional<long> &qsLineMatrix);
   void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                             const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                             const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
                             const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY,
-                            const boost::optional<long> &qsFc, const boost::optional<long> &qsSc);
+                            const boost::optional<long> &qsFc, const boost::optional<long> &qsSc, const boost::optional<long> &qsLm);
   void collectFillAndShadow(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                             const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                             const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
@@ -129,12 +130,14 @@ public:
   void collectStyleSheet(unsigned id, unsigned level,unsigned parentLineStyle, unsigned parentFillStyle, unsigned parentTextStyle);
   void collectLineStyle(unsigned level, const boost::optional<double> &strokeWidth, const boost::optional<Colour> &c, const boost::optional<unsigned char> &linePattern,
                         const boost::optional<unsigned char> &startMarker, const boost::optional<unsigned char> &endMarker,
-                        const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding);
+                        const boost::optional<unsigned char> &lineCap, const boost::optional<double> &rounding,
+                        const boost::optional<long> &qsLineColour, const boost::optional<long> &qsLineMatrix);
   void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                         const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                         const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
                         const boost::optional<Colour> &shfgc, const boost::optional<double> &shadowOffsetX, const boost::optional<double> &shadowOffsetY,
-                        const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour);
+                        const boost::optional<long> &qsFillColour, const boost::optional<long> &qsShadowColour,
+                        const boost::optional<long> &qsFillMatrix);
   void collectFillStyle(unsigned level, const boost::optional<Colour> &colourFG, const boost::optional<Colour> &colourBG,
                         const boost::optional<unsigned char> &fillPattern, const boost::optional<double> &fillFGTransparency,
                         const boost::optional<double> &fillBGTransparency, const boost::optional<unsigned char> &shadowPattern,
diff --git a/src/lib/VSDXMLParserBase.cpp b/src/lib/VSDXMLParserBase.cpp
index f6c531a..e06e3af 100644
--- a/src/lib/VSDXMLParserBase.cpp
+++ b/src/lib/VSDXMLParserBase.cpp
@@ -1763,12 +1763,13 @@ void libvisio::VSDXMLParserBase::_flushShape()
     m_collector->collectTxtXForm(m_currentShapeLevel+2, *(m_shape.m_txtxform));
 
   m_collector->collectLine(m_currentShapeLevel+2, m_shape.m_lineStyle.width, m_shape.m_lineStyle.colour, m_shape.m_lineStyle.pattern,
-                           m_shape.m_lineStyle.startMarker, m_shape.m_lineStyle.endMarker, m_shape.m_lineStyle.cap, m_shape.m_lineStyle.rounding);
+                           m_shape.m_lineStyle.startMarker, m_shape.m_lineStyle.endMarker, m_shape.m_lineStyle.cap, m_shape.m_lineStyle.rounding,
+                           m_shape.m_lineStyle.qsLineColour, m_shape.m_lineStyle.qsLineMatrix);
 
   m_collector->collectFillAndShadow(m_currentShapeLevel+2, m_shape.m_fillStyle.fgColour, m_shape.m_fillStyle.bgColour, m_shape.m_fillStyle.pattern,
                                     m_shape.m_fillStyle.fgTransparency, m_shape.m_fillStyle.bgTransparency, m_shape.m_fillStyle.shadowPattern,
                                     m_shape.m_fillStyle.shadowFgColour, m_shape.m_fillStyle.shadowOffsetX, m_shape.m_fillStyle.shadowOffsetY,
-                                    m_shape.m_fillStyle.qsFillColour, m_shape.m_fillStyle.qsShadowColour);
+                                    m_shape.m_fillStyle.qsFillColour, m_shape.m_fillStyle.qsShadowColour, m_shape.m_fillStyle.qsFillMatrix);
 
   m_collector->collectTextBlock(m_currentShapeLevel+2, m_shape.m_textBlockStyle.leftMargin, m_shape.m_textBlockStyle.rightMargin,
                                 m_shape.m_textBlockStyle.topMargin, m_shape.m_textBlockStyle.bottomMargin, m_shape.m_textBlockStyle.verticalAlign,
diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
index f9d5d61..26916b5 100644
--- a/src/lib/VSDXParser.cpp
+++ b/src/lib/VSDXParser.cpp
@@ -718,6 +718,8 @@ void libvisio::VSDXParser::readStyleProperties(xmlTextReaderPtr reader)
   boost::optional<unsigned char> startMarker;
   boost::optional<unsigned char> endMarker;
   boost::optional<unsigned char> lineCap;
+  boost::optional<long> qsLineColour;
+  boost::optional<long> qsLineMatrix;
 
   // Fill and shadow properties
   boost::optional<Colour> fillColourFG;
@@ -732,6 +734,7 @@ void libvisio::VSDXParser::readStyleProperties(xmlTextReaderPtr reader)
   boost::optional<double> shadowOffsetY;
   boost::optional<long> qsFillColour;
   boost::optional<long> qsShadowColour;
+  boost::optional<long> qsFillMatrix;
 
   // Text block properties
   boost::optional<double> leftMargin;
@@ -871,12 +874,11 @@ void libvisio::VSDXParser::readStyleProperties(xmlTextReaderPtr reader)
       break;
     case XML_QUICKSTYLELINECOLOR:
       if (XML_READER_TYPE_ELEMENT == tokenType)
-      {
-        long tmpValue;
-        ret = readLongData(tmpValue, reader);
-        if (!strokeColour)
-          strokeColour = m_currentTheme.getThemeColour((unsigned)tmpValue);
-      }
+        ret = readLongData(qsLineColour, reader);
+      break;
+    case XML_QUICKSTYLELINEMATRIX:
+      if (XML_READER_TYPE_ELEMENT == tokenType)
+        ret = readLongData(qsLineMatrix, reader);
       break;
     case XML_QUICKSTYLEFILLCOLOR:
       if (XML_READER_TYPE_ELEMENT == tokenType)
@@ -886,6 +888,10 @@ void libvisio::VSDXParser::readStyleProperties(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readLongData(qsShadowColour, reader);
       break;
+    case XML_QUICKSTYLEFILLMATRIX:
+      if (XML_READER_TYPE_ELEMENT == tokenType)
+        ret = readLongData(qsFillMatrix, reader);
+      break;
     default:
       break;
     }
@@ -907,18 +913,21 @@ void libvisio::VSDXParser::readStyleProperties(xmlTextReaderPtr reader)
 
   if (m_isInStyles)
   {
-    m_collector->collectLineStyle(level, strokeWidth, strokeColour, linePattern, startMarker, endMarker, lineCap, rounding);
+    m_collector->collectLineStyle(level, strokeWidth, strokeColour, linePattern, startMarker, endMarker, lineCap,
+                                  rounding, qsLineColour, qsLineMatrix);
     m_collector->collectFillStyle(level, fillColourFG, fillColourBG, fillPattern, fillFGTransparency,
-                                  fillBGTransparency, shadowPattern, shadowColourFG, shadowOffsetX, shadowOffsetY,
-                                  qsFillColour, qsShadowColour);
+                                  fillBGTransparency, shadowPattern, shadowColourFG, shadowOffsetX,
+                                  shadowOffsetY, qsFillColour, qsShadowColour, qsFillMatrix);
     m_collector->collectTextBlockStyle(level, leftMargin, rightMargin, topMargin, bottomMargin,
                                        verticalAlign, bgClrId, bgColour, defaultTabStop, textDirection);
   }
   else
   {
-    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, strokeColour, linePattern, startMarker, endMarker, lineCap, rounding));
-    m_shape.m_fillStyle.override(VSDOptionalFillStyle(fillColourFG, fillColourBG, fillPattern, fillFGTransparency, fillBGTransparency, shadowColourFG,
-                                                      shadowPattern, shadowOffsetX, shadowOffsetY, qsFillColour, qsShadowColour));
+    m_shape.m_lineStyle.override(VSDOptionalLineStyle(strokeWidth, strokeColour, linePattern, startMarker, endMarker, lineCap, rounding,
+                                                      qsLineColour, qsLineMatrix));
+    m_shape.m_fillStyle.override(VSDOptionalFillStyle(fillColourFG, fillColourBG, fillPattern, fillFGTransparency, fillBGTransparency,
+                                                      shadowColourFG, shadowPattern, shadowOffsetX, shadowOffsetY,
+                                                      qsFillColour, qsShadowColour, qsFillMatrix));
     m_shape.m_textBlockStyle.override(VSDOptionalTextBlockStyle(leftMargin, rightMargin, topMargin, bottomMargin, verticalAlign, !!bgClrId, bgColour,
                                                                 defaultTabStop, textDirection));
   }
@@ -1256,12 +1265,11 @@ void libvisio::VSDXParser::readShapeProperties(xmlTextReaderPtr reader)
       break;
     case XML_QUICKSTYLELINECOLOR:
       if (XML_READER_TYPE_ELEMENT == tokenType)
-      {
-        long tmpValue;
-        ret = readLongData(tmpValue, reader);
-        if (!m_shape.m_lineStyle.colour)
-          m_shape.m_lineStyle.colour = m_currentTheme.getThemeColour((unsigned)tmpValue);
-      }
+        ret = readLongData(m_shape.m_lineStyle.qsLineColour, reader);
+      break;
+    case XML_QUICKSTYLELINEMATRIX:
+      if (XML_READER_TYPE_ELEMENT == tokenType)
+        ret = readLongData(m_shape.m_lineStyle.qsLineMatrix, reader);
       break;
     case XML_QUICKSTYLEFILLCOLOR:
       if (XML_READER_TYPE_ELEMENT == tokenType)
@@ -1271,6 +1279,10 @@ void libvisio::VSDXParser::readShapeProperties(xmlTextReaderPtr reader)
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readLongData(m_shape.m_fillStyle.qsShadowColour, reader);
       break;
+    case XML_QUICKSTYLEFILLMATRIX:
+      if (XML_READER_TYPE_ELEMENT == tokenType)
+        ret = readLongData(m_shape.m_fillStyle.qsFillMatrix, reader);
+      break;
     case XML_LAYERMEMBER:
       if (XML_READER_TYPE_ELEMENT == tokenType)
         ret = readStringData(m_shape.m_layerMem, reader);
diff --git a/src/lib/tokens.txt b/src/lib/tokens.txt
index 70d7042..661093c 100644
--- a/src/lib/tokens.txt
+++ b/src/lib/tokens.txt
@@ -69,7 +69,9 @@ Character
 Color
 ColorEntry
 Colors
+ColorSchemeIndex
 Company
+ConnectorSchemeIndex
 cp
 cp:category
 cp:coreProperties
@@ -89,8 +91,10 @@ DefaultTabStop
 DoubleStrikethrough
 DrawingScale
 E
+EffectSchemeIndex
 Ellipse
 EllipticalArcTo
+EmbellishmentIndex
 EndArrow
 EndTrigger
 EndX
@@ -108,6 +112,7 @@ FlipX
 FlipY
 Font
 FontScale
+FontSchemeIndex
 Foreign
 ForeignData
 Geom
@@ -213,6 +218,7 @@ TextBlock
 TextDirection
 TextPosAfterBullet
 TextXForm
+ThemeIndex
 TopMargin
 tp
 TxtAngle
@@ -222,6 +228,8 @@ TxtLocPinY
 TxtPinX
 TxtPinY
 TxtWidth
+VariationColorIndex
+VariationStyleIndex
 VerticalAlign
 Visible
 vt:bkgnd


More information about the Libreoffice-commits mailing list