diff options
Diffstat (limited to 'sc/inc/miscuno.hxx')
-rw-r--r-- | sc/inc/miscuno.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx index de953af08cc7..646d2613d294 100644 --- a/sc/inc/miscuno.hxx +++ b/sc/inc/miscuno.hxx @@ -188,6 +188,15 @@ public: any <<= rVal; SetOptionalPropertyValue(rPropSet, pPropName, any); } + + template<typename ValueType> + static com::sun::star::uno::Sequence<ValueType> VectorToSequence( const std::vector<ValueType>& rVector ) + { + if (rVector.empty()) + return com::sun::star::uno::Sequence<ValueType>(); + + return com::sun::star::uno::Sequence<ValueType>(&rVector[0], static_cast<sal_Int32>(rVector.size())); + } }; |