summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-22 11:08:06 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-11-22 12:13:21 +0000
commitc90f5c66512f35025d7ecc6ad5eae9ccef6c1290 (patch)
tree192bdb941b5b057b5c5c3e32bcbebe5b0bf273d2
parent0a14f43e69112073dd093ad26520527754feb9de (diff)
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
-rw-r--r--cppuhelper/inc/cppuhelper/weakagg.hxx1
-rw-r--r--sal/inc/sal/types.h15
-rw-r--r--solenv/gbuild/gbuild.mk5
3 files changed, 21 insertions, 0 deletions
diff --git a/cppuhelper/inc/cppuhelper/weakagg.hxx b/cppuhelper/inc/cppuhelper/weakagg.hxx
index 094e178ec222..f4ae380a7218 100644
--- a/cppuhelper/inc/cppuhelper/weakagg.hxx
+++ b/cppuhelper/inc/cppuhelper/weakagg.hxx
@@ -79,6 +79,7 @@ public:
@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 )
throw(::com::sun::star::uno::RuntimeException);
/** Called by the delegator or queryInterface. Re-implement this method instead of
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 2c7a2cf42ce9..3e3dc7c3cdcd 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -445,6 +445,21 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) {
#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:
SAL_WNODEPRECATED_DECLARATIONS_PUSH
\::std::auto_ptr<X> ...
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 521d4bd38e57..b9f8d750b626 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -231,6 +231,11 @@ gb_GLOBALDEFS := \
$(gb_COMPILERDEFS) \
$(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))
gb_GLOBALDEFS += -DDBG_UTIL \