summaryrefslogtreecommitdiff
path: root/include/com
diff options
context:
space:
mode:
Diffstat (limited to 'include/com')
-rw-r--r--include/com/sun/star/uno/Sequence.h4
-rw-r--r--include/com/sun/star/uno/Sequence.hxx8
2 files changed, 10 insertions, 2 deletions
diff --git a/include/com/sun/star/uno/Sequence.h b/include/com/sun/star/uno/Sequence.h
index 39caf8ff768f..cc2c515f1322 100644
--- a/include/com/sun/star/uno/Sequence.h
+++ b/include/com/sun/star/uno/Sequence.h
@@ -185,12 +185,14 @@ public:
*/
inline E * SAL_CALL getArray();
+#if !defined LIBO_INTERNAL_ONLY
/** This function allows to use Sequence in standard algorithms, like std::find
and others.
@since LibreOffice 4.2
*/
inline E * begin();
+#endif
/** This function allows to use Sequence in standard algorithms, like std::find
and others.
@@ -199,12 +201,14 @@ public:
*/
inline E const * begin() const;
+#if !defined LIBO_INTERNAL_ONLY
/** This function allows to use Sequence in standard algorithms, like std::find
and others.
@since LibreOffice 4.2
*/
inline E * end();
+#endif
/** This function allows to use Sequence in standard algorithms, like std::find
and others.
diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx
index 08a74d73789f..5356872b1378 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -166,12 +166,16 @@ inline E * Sequence< E >::getArray()
return reinterpret_cast< E * >( _pSequence->elements );
}
+#if !defined LIBO_INTERNAL_ONLY
template<class E> E * Sequence<E>::begin() { return getArray(); }
+#endif
template<class E> E const * Sequence<E>::begin() const
{ return getConstArray(); }
+#if !defined LIBO_INTERNAL_ONLY
template<class E> E * Sequence<E>::end() { return begin() + getLength(); }
+#endif
template<class E> E const * Sequence<E>::end() const
{ return begin() + getLength(); }
@@ -279,7 +283,7 @@ inline std::basic_ostream<charT, traits> &operator<<(std::basic_ostream<charT, t
return os;
}
-template <class E> inline auto toNonConstRange(css::uno::Sequence<E>& s)
+template <class E> inline auto asNonConstRange(css::uno::Sequence<E>& s)
{
// Two iterators [begin, end] representing the non-const range of the Sequence.
// It only calls Sequence::getArray once, to avoid the second COW overhead when
@@ -292,7 +296,7 @@ template <class E> inline auto toNonConstRange(css::uno::Sequence<E>& s)
E* begin() { return std::pair<E*, E*>::first; }
E* end() { return std::pair<E*, E*>::second; }
};
- return SequenceRange(s.begin(), s.getLength());
+ return SequenceRange(s.getArray(), s.getLength());
};
/// @endcond