diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-07 12:32:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-07 18:28:05 +0100 |
commit | d9ff5556e7b24c7548a476862726b4bd54425047 (patch) | |
tree | 9ff52d13e4a937e2eaccf45b46f0e9a2fde0f12f /chart2/source/inc/CommonConverters.hxx | |
parent | 3ff7f9e50bda9e6416d0df5f3b935aae34efbb8f (diff) |
use more concrete types in chart2, DataSeries
Change-Id: If92f6ff6f90d53a9dc6211fd9f071d4d3fce2997
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129535
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/inc/CommonConverters.hxx')
-rw-r--r-- | chart2/source/inc/CommonConverters.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx index d10bf91984c8..682290b44e16 100644 --- a/chart2/source/inc/CommonConverters.hxx +++ b/chart2/source/inc/CommonConverters.hxx @@ -202,6 +202,26 @@ css::uno::Sequence< T > return aResult; } +template< typename T > +std::vector< T > + FlattenSequence( const std::vector< std::vector< T > > & aSeqSeq ) +{ + sal_Int32 nOuter, nInner, nCount = 0, + nResultSize = 0; + const sal_Int32 nOuterSize = aSeqSeq.size(); + for( nOuter=0; nOuter<nOuterSize; ++nOuter ) + nResultSize += aSeqSeq[nOuter].size(); + std::vector< T > aResult( nResultSize ); + + for( nOuter=0; nOuter<nOuterSize; ++nOuter ) + { + const sal_Int32 nInnerSize = aSeqSeq[nOuter].size(); + for( nInner=0; nInner<nInnerSize; ++nInner, ++nCount ) + aResult[nCount] = aSeqSeq[nOuter][nInner]; + } + return aResult; +} + OOO_DLLPUBLIC_CHARTTOOLS bool hasDoubleValue( const css::uno::Any& rAny ); |