diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-15 18:19:47 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-15 18:23:35 +0200 |
commit | f3121049828596b369e3ea844355d61666e49795 (patch) | |
tree | 89dca766b999674508df2142d02353f0feaa7de6 /include/oox | |
parent | b99a4b81f53aa406a98e167fc9b8e1f1347fa970 (diff) |
use index as real index and not token, tdf#90511
At least in calc a theme index is a zero based index into the clrScheme.
A map is unsiutable for that task so let us use a vector and still allow
to get them by their tokens.
Change-Id: I09d56acaf22c3ed16387aae95c36382302c5a17e
Diffstat (limited to 'include/oox')
-rw-r--r-- | include/oox/drawingml/clrscheme.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/oox/drawingml/clrscheme.hxx b/include/oox/drawingml/clrscheme.hxx index b4c12cfe8998..00bf1499e660 100644 --- a/include/oox/drawingml/clrscheme.hxx +++ b/include/oox/drawingml/clrscheme.hxx @@ -42,12 +42,15 @@ typedef std::shared_ptr< ClrMap > ClrMapPtr; class OOX_DLLPUBLIC ClrScheme { - std::map < sal_Int32, sal_Int32 > maClrScheme; + std::vector< std::pair<sal_Int32, sal_Int32> > maClrScheme; public: bool getColor( sal_Int32 nSchemeClrToken, sal_Int32& rColor ) const; void setColor( sal_Int32 nSchemeClrToken, sal_Int32 nColor ); + + bool getColorByIndex(size_t nIndex, + sal_Int32& rColor) const; }; typedef std::shared_ptr< ClrScheme > ClrSchemePtr; |