Kaydet (Commit) c90f5c66 authored tarafından Michael Meeks's avatar Michael Meeks

create SAL_DEPRECATED_INTERNAL for annotating API

It flags methods that we don't want used externally, but havn't
finished removing internally.

Change-Id: I818ee0ea2bf5294be816256a0e7f1868f26806b8
üst 0a14f43e
...@@ -79,6 +79,7 @@ public: ...@@ -79,6 +79,7 @@ public:
@param Delegator the object that delegate its queryInterface to this aggregate. @param Delegator the object that delegate its queryInterface to this aggregate.
*/ */
SAL_DEPRECATED_INTERNAL("do not use XAggregation")
virtual void SAL_CALL setDelegator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Delegator ) virtual void SAL_CALL setDelegator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Delegator )
throw(::com::sun::star::uno::RuntimeException); throw(::com::sun::star::uno::RuntimeException);
/** Called by the delegator or queryInterface. Re-implement this method instead of /** Called by the delegator or queryInterface. Re-implement this method instead of
......
...@@ -444,6 +444,21 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { ...@@ -444,6 +444,21 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) {
# define SAL_DEPRECATED(message) # define SAL_DEPRECATED(message)
#endif #endif
/**
This macro is used to tag interfaces that are deprecated for both
internal and external API users, but where we are still writing
out the internal usage. Ultimately these should be replaced by
SAL_DEPRECATED, and then removed.
Use as follows:
SAL_DEPRECATED_INTERNAL("Dont use, its evil.") void doit(int nPara);
*/
#ifdef LIBO_INTERNAL_ONLY
# define SAL_DEPRECATED_INTERNAL(message)
#else
# define SAL_DEPRECATED_INTERNAL(message) SAL_DEPRECATED(message)
#endif
/** /**
Use as follows: Use as follows:
SAL_WNODEPRECATED_DECLARATIONS_PUSH SAL_WNODEPRECATED_DECLARATIONS_PUSH
......
...@@ -231,6 +231,11 @@ gb_GLOBALDEFS := \ ...@@ -231,6 +231,11 @@ gb_GLOBALDEFS := \
$(gb_COMPILERDEFS) \ $(gb_COMPILERDEFS) \
$(gb_CPUDEFS) \ $(gb_CPUDEFS) \
# This is used to tag deprecation for API we want to
# ensure is not used at all externally while we clean
# out our internal usage.
gb_GLOBALDEFS += \
-DLIBO_INTERNAL_ONLY \
ifeq ($(gb_ENABLE_DBGUTIL),$(true)) ifeq ($(gb_ENABLE_DBGUTIL),$(true))
gb_GLOBALDEFS += -DDBG_UTIL \ gb_GLOBALDEFS += -DDBG_UTIL \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment