diff options
Diffstat (limited to 'chart2/source/inc/CloneHelper.hxx')
-rw-r--r-- | chart2/source/inc/CloneHelper.hxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx index d9771a2681f2..cabcdb58366f 100644 --- a/chart2/source/inc/CloneHelper.hxx +++ b/chart2/source/inc/CloneHelper.hxx @@ -19,8 +19,7 @@ #pragma once #include <com/sun/star/util/XCloneable.hpp> - -#include <algorithm> +#include <rtl/ref.hxx> #include <iterator> #include <vector> @@ -54,6 +53,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( |