diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-30 08:34:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-30 16:02:18 +0100 |
commit | 026e2f437e969d75209ed05211e7f02349035b98 (patch) | |
tree | 3a567141feaf520acca03b473e571e6502dd3fa1 /chart2/source/inc/CloneHelper.hxx | |
parent | 85cc59ba11f9334e0ed5f277607f5d9d63302856 (diff) |
use more concrete types in chart2, RegressionCurveModel
Change-Id: Ib4a5198f425577307ba437c73c61408b88d83dc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129160
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/inc/CloneHelper.hxx')
-rw-r--r-- | chart2/source/inc/CloneHelper.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx index d9771a2681f2..c0896efb5c7b 100644 --- a/chart2/source/inc/CloneHelper.hxx +++ b/chart2/source/inc/CloneHelper.hxx @@ -19,7 +19,7 @@ #pragma once #include <com/sun/star/util/XCloneable.hpp> - +#include <rtl/ref.hxx> #include <algorithm> #include <iterator> #include <vector> @@ -54,6 +54,15 @@ template< class Interface > CreateRefClone< Interface >()); } +template< class T > + void CloneRefVector( + const std::vector< rtl::Reference< T > > & rSource, + std::vector< rtl::Reference< T > > & rDestination ) +{ + for (const auto & rSourceItem : rSource) + rDestination.push_back(static_cast<T*>(rSourceItem->createClone().get())); +} + /// clones a UNO-sequence of UNO-References template< class Interface > void CloneRefSequence( |