[Libreoffice-commits] core.git: include/com

Stephan Bergmann sbergman at redhat.com
Tue May 3 21:52:35 UTC 2016


 include/com/sun/star/uno/Any.h   |    6 ++++++
 include/com/sun/star/uno/Any.hxx |    2 ++
 2 files changed, 8 insertions(+)

New commits:
commit dcfc07842be6ef540845413f17739747359ef1f8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 3 22:07:58 2016 +0200

    Enable Any functions on sal_uInt16 for LIBO_INTERNAL_ONLY
    
    ...where sal_uInt16 no longer clashes with sal_Unicode after
    e16fa715c43dcdf836ce8c400b6d54eae87b627d "Handle wchar_t as native C++11 type on
    windows".  This allows to consistently use Any ctor instead of makeAny,
    regardless of argument type, in LIBO_INTERNAL_ONLY code.
    
    Change-Id: I9acdcc48be71a90d17013959c8275454e8fa01a0
    Reviewed-on: https://gerrit.libreoffice.org/24620
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/com/sun/star/uno/Any.h b/include/com/sun/star/uno/Any.h
index 8367eca..7ed67e2 100644
--- a/include/com/sun/star/uno/Any.h
+++ b/include/com/sun/star/uno/Any.h
@@ -267,17 +267,21 @@ public:
     inline bool SAL_CALL operator != ( const Any & rAny ) const;
 
 private:
+#if !defined LIBO_INTERNAL_ONLY
     /// @cond INTERNAL
     // Forbid use with ambiguous type (sal_Unicode, sal_uInt16):
     explicit Any(sal_uInt16) SAL_DELETED_FUNCTION;
     /// @endcond
+#endif
 };
 
+#if !defined LIBO_INTERNAL_ONLY
 /// @cond INTERNAL
 // Forbid use with ambiguous type (sal_Unicode, sal_uInt16):
 template<> sal_uInt16 Any::get<sal_uInt16>() const SAL_DELETED_FUNCTION;
 template<> bool Any::has<sal_uInt16>() const SAL_DELETED_FUNCTION;
 /// @endcond
+#endif
 
 /** Template function to generically construct an any from a C++ value.
 
@@ -293,7 +297,9 @@ template<> bool Any::has<sal_uInt16>() const SAL_DELETED_FUNCTION;
 template< class C >
 inline Any SAL_CALL makeAny( const C & value );
 
+#if !defined LIBO_INTERNAL_ONLY
 template<> inline Any SAL_CALL makeAny(sal_uInt16 const & value);
+#endif
 
 template<> Any SAL_CALL makeAny(Any const &) SAL_DELETED_FUNCTION;
 
diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx
index d0a4506..8859fa7 100644
--- a/include/com/sun/star/uno/Any.hxx
+++ b/include/com/sun/star/uno/Any.hxx
@@ -191,8 +191,10 @@ inline Any SAL_CALL makeAny( const C & value )
     return Any(value);
 }
 
+#if !defined LIBO_INTERNAL_ONLY
 template<> Any makeAny(sal_uInt16 const & value)
 { return Any(&value, cppu::UnoType<cppu::UnoUnsignedShortType>::get()); }
+#endif
 
 template<typename T> Any toAny(T const & value) { return makeAny(value); }
 


More information about the Libreoffice-commits mailing list