diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-05-22 17:58:22 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-05-22 18:46:16 +0200 |
commit | 12bea6c897822964ad4705418da54411cb15749e (patch) | |
tree | d07c30e4b9828e18b8de6abbc7a597cb5706592f /oox/inc | |
parent | 78156a0fa2c23977dae99b29302c316dce3951f8 (diff) |
smartart import: handle multiple <a:schemeClr> in <dgm:fillClrLst>
The TODO in the ColorFragmentHandler ctor was right: we only handled the
last <a:schemeClr> child, but there can be multiple one.
Use them based on the index of a shape in a <dgm:forEach> loop.
Move the TODO to the only place which still assumes a single color in
the color list.
Change-Id: I1c5c4f82e621f1110ef06b0490ff79f82f60f214
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94697
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'oox/inc')
-rw-r--r-- | oox/inc/drawingml/colorchoicecontext.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/oox/inc/drawingml/colorchoicecontext.hxx b/oox/inc/drawingml/colorchoicecontext.hxx index 433c94b3addb..093c832cb1e6 100644 --- a/oox/inc/drawingml/colorchoicecontext.hxx +++ b/oox/inc/drawingml/colorchoicecontext.hxx @@ -22,6 +22,8 @@ #include <oox/core/contexthandler2.hxx> +#include <vector> + namespace oox { namespace drawingml { @@ -65,6 +67,19 @@ private: Color& mrColor; }; +/// Same as ColorContext, but handles multiple colors. +class ColorsContext : public ::oox::core::ContextHandler2 +{ +public: + explicit ColorsContext(::oox::core::ContextHandler2Helper const& rParent, + std::vector<Color>& rColors); + + virtual ::oox::core::ContextHandlerRef + onCreateContext(sal_Int32 nElement, const ::oox::AttributeList& rAttribs) override; + +private: + std::vector<Color>& mrColors; +}; } // namespace drawingml } // namespace oox |