summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-07-26 14:24:43 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-07-26 14:24:43 +0200
commit5b0560d780f8575376d89f6282d620eec9255a8c (patch)
tree13e2e365e7915dee4d7154ae8a70deabd0755c40
parent309883a4e8ab3b3d7f207902db5ff148c1177f38 (diff)
reuse m_currentShapeLevel for stylesheets too
-rw-r--r--src/lib/VSDXStylesCollector.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/VSDXStylesCollector.cpp b/src/lib/VSDXStylesCollector.cpp
index 6df5bb3..077ac9c 100644
--- a/src/lib/VSDXStylesCollector.cpp
+++ b/src/lib/VSDXStylesCollector.cpp
@@ -267,6 +267,8 @@ void libvisio::VSDXStylesCollector::collectName(unsigned /*id*/, unsigned level,
void libvisio::VSDXStylesCollector::collectStyleSheet(unsigned id, unsigned level, unsigned lineStyleParent, unsigned fillStyleParent, unsigned textStyleParent)
{
_handleLevelChange(level);
+ // reusing the shape level for style sheet to avoid another variable
+ m_currentShapeLevel = level;
m_lineStyle = 0;
m_fillStyle = 0;
m_textBlockStyle = 0;
@@ -401,11 +403,9 @@ void libvisio::VSDXStylesCollector::_handleLevelChange(unsigned level)
{
if (m_currentLevel == level)
return;
- // if (level <= m_currentShapeLevel+1)
- if (level < 3)
+ if (level <= m_currentShapeLevel+1)
_flushShapeList();
- // if (level <= m_currentShapeLevel)
- if (level < 2)
+ if (level <= m_currentShapeLevel)
{
m_isShapeStarted = false;
if (m_isStyleStarted)