diff options
Diffstat (limited to 'src/lib/VSDContentCollector.cpp')
-rw-r--r-- | src/lib/VSDContentCollector.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index aee5456..e66984a 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -272,6 +272,7 @@ void libvisio::VSDContentCollector::_flushCurrentPath() m_shapeOutputDrawing->addStyle(fillPathProps); librevenge::RVNGPropertyList propList; propList.insert("svg:d", path); + _appendVisibleAndPrintable(propList); m_shapeOutputDrawing->addPath(propList); } } @@ -355,6 +356,7 @@ void libvisio::VSDContentCollector::_flushCurrentPath() m_shapeOutputDrawing->addStyle(linePathProps); librevenge::RVNGPropertyList propList; propList.insert("svg:d", path); + _appendVisibleAndPrintable(propList); m_shapeOutputDrawing->addPath(propList); } } @@ -439,6 +441,8 @@ void libvisio::VSDContentCollector::_flushText() m_paraFormats[iPara].charCount = numCharsInText; } + _appendVisibleAndPrintable(textBlockProps); + m_shapeOutputText->addStartTextObject(textBlockProps); unsigned int charIndex = 0; @@ -670,6 +674,8 @@ void libvisio::VSDContentCollector::_flushCurrentForeignData() if (angle != 0.0) m_currentForeignProps.insert("librevenge:rotate", angle * 180 / M_PI, librevenge::RVNG_GENERIC); + _appendVisibleAndPrintable(m_currentForeignProps); + if (m_currentForeignData.size() && m_currentForeignProps["librevenge:mime-type"] && m_foreignWidth != 0.0 && m_foreignHeight != 0.0) { m_shapeOutputDrawing->addStyle(styleProps); @@ -3019,4 +3025,19 @@ void libvisio::VSDContentCollector::collectLayer(unsigned id, unsigned level, co m_currentLayerList.addLayer(id, layer); } +void libvisio::VSDContentCollector::_appendVisibleAndPrintable(librevenge::RVNGPropertyList &propList) +{ + bool visible = m_currentLayerList.getVisible(m_currentLayerMem); + bool printable = m_currentLayerList.getPrintable(m_currentLayerMem); + + if (visible && printable) + return; + else if (!visible && !printable) + propList.insert("draw:display", "none"); + else if (!visible && printable) + propList.insert("draw:display", "printer"); + else if (visible && !printable) + propList.insert("draw:display", "screen"); +} + /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |