From 16e8ae5b0d5a3a26450bbc9e6afc6e0984e173ea Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 3 Mar 2019 11:10:40 +0100 Subject: Make additional OTypeCollection::getTypes overload LIBO_INTERNAL_ONLY (added recently with d559c28e9e65f3be415ec2e36ee90aa147e65b84 "expand out IMPL_XTYPEPROVIDER_START macro"), for extra compatibility safety. (At least MSVC exports non-inline versions of such CPPUHELPER_DLLPUBLIC inline functions from the cppuhelper DLL.) The original getTypes (added back now with "revert ABI change from 'expand out IMPL_XTYPEPROVIDER_START macro'") had been a non-const member function ever since at least b525a3115f54576017a576ff842dede5e2e3545d "initial import", presumably by accident. (Whether or not to return a reference is an orthogonal issue. With the newly added overload being LIBO_INTERNAL_ONLY, it is presumably fine to have it return a reference for now and see whether that causes any issues with lifetimes of temporary OTypeCollection instances.) Change-Id: If6abcf53b46b972204598774fed7cdd34d78440b Reviewed-on: https://gerrit.libreoffice.org/68637 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/cppuhelper/typeprovider.hxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/cppuhelper/typeprovider.hxx b/include/cppuhelper/typeprovider.hxx index 3902396248e1..48528fb921b4 100644 --- a/include/cppuhelper/typeprovider.hxx +++ b/include/cppuhelper/typeprovider.hxx @@ -160,8 +160,10 @@ public: */ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() { return _aTypes; } +#if defined LIBO_INTERNAL_ONLY css::uno::Sequence< css::uno::Type > const & SAL_CALL getTypes() const { return _aTypes; } +#endif }; /** Helper class to implement IDs for XUnoTunnel. Construct a static object -- cgit