21#include <com/sun/star/util/XCloneable.hpp>
31template<
class Interface >
34 css::uno::Reference<Interface>
operator() (
const css::uno::Reference<Interface> & xOther )
36 css::uno::Reference<Interface> xResult;
37 css::uno::Reference< css::util::XCloneable >
38 xCloneable( xOther, css::uno::UNO_QUERY );
40 xResult.set( xCloneable->createClone(), css::uno::UNO_QUERY );
47template<
class Interface >
49 const std::vector< css::uno::Reference< Interface > > & rSource,
50 std::vector< css::uno::Reference< Interface > > & rDestination )
52 std::transform( rSource.begin(), rSource.end(),
53 std::back_inserter( rDestination ),
62 for (
const auto & rSourceItem : rSource)
63 rDestination.push_back(
static_cast<T*
>(rSourceItem->createClone().get()));
67template<
class Interface >
69 const css::uno::Sequence< css::uno::Reference<Interface> > & rSource,
70 css::uno::Sequence< css::uno::Reference<Interface> > & rDestination )
72 rDestination.realloc( rSource.getLength());
73 std::transform( rSource.begin(), rSource.end(),
74 rDestination.getArray(),
void CloneRefSequence(const css::uno::Sequence< css::uno::Reference< Interface > > &rSource, css::uno::Sequence< css::uno::Reference< Interface > > &rDestination)
clones a UNO-sequence of UNO-References
void CloneRefVector(const std::vector< css::uno::Reference< Interface > > &rSource, std::vector< css::uno::Reference< Interface > > &rDestination)
clones a vector of UNO-References
functor that clones a UNO-Reference
css::uno::Reference< Interface > operator()(const css::uno::Reference< Interface > &xOther)