diff options
author | osnola <alonso@loria.fr> | 2019-03-31 08:51:22 +0200 |
---|---|---|
committer | Laurent Alonso(fr) <alonso.laurent@gmail.com> | 2019-03-31 09:19:51 +0200 |
commit | 46523ce012db705a411ff402b1198c9481f9fba0 (patch) | |
tree | 9e85a99a8ab3fa57070e06f9558db5b92cc7ef28 /src/lib/NUMCollector.cpp | |
parent | de5bdcb8d25c17ed89c14019cac3774d178919f3 (diff) |
number[xml]: retrieve some sticky notes...
Change-Id: Id597db500f208cc7570be28476d7c31e94927aaf
Reviewed-on: https://gerrit.libreoffice.org/69991
Reviewed-by: Laurent Alonso(fr) <alonso.laurent@gmail.com>
Tested-by: Laurent Alonso(fr) <alonso.laurent@gmail.com>
Diffstat (limited to 'src/lib/NUMCollector.cpp')
-rw-r--r-- | src/lib/NUMCollector.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/NUMCollector.cpp b/src/lib/NUMCollector.cpp index 4e11951..16dc5bf 100644 --- a/src/lib/NUMCollector.cpp +++ b/src/lib/NUMCollector.cpp @@ -11,6 +11,7 @@ #include "IWORKDocumentInterface.h" #include "IWORKLanguageManager.h" +#include "IWORKProperties.h" #include "IWORKTable.h" #include "IWORKText.h" @@ -172,6 +173,21 @@ void NUMCollector::fillShapeProperties(librevenge::RVNGPropertyList &/*props*/) // TODO: implement me } +void NUMCollector::collectStickyNote() +{ + assert(!m_levelStack.empty()); + + auto style=m_levelStack.top().m_graphicStyle; + if (!style || !style->has<property::Fill>()) + { + // force shape background to be yellow if it is unknown + IWORKPropertyMap props; + props.put<property::Fill>(IWORKColor(1,1,0,1)); + m_levelStack.top().m_graphicStyle=std::make_shared<IWORKStyle>(props, boost::none, style); + } + collectShape(); +} + void NUMCollector::drawTextBox(const IWORKTextPtr_t &text, const glm::dmat3 &trafo, const IWORKGeometryPtr_t &boundingBox, const librevenge::RVNGPropertyList &style) { if (!bool(text) || text->empty()) |