From 06ec8a95c37a475b35100c9599ef56c1e179dc23 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Jan 2019 10:57:34 +0200 Subject: add operator* to uno::Reference like the other smart pointer types Change-Id: I3ac1888c84fc1411cdfc3357b005afbb3b7d8bbe Reviewed-on: https://gerrit.libreoffice.org/65926 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- include/com/sun/star/uno/Reference.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/com') diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h index a44831b6c360..6b4977e88518 100644 --- a/include/com/sun/star/uno/Reference.h +++ b/include/com/sun/star/uno/Reference.h @@ -421,6 +421,16 @@ public: return castFromXInterface(_pInterface); } + /** Indirection operator. + + @since LibreOffice 6.3 + @return UNacquired interface reference + */ + interface_type & SAL_CALL operator * () const { + assert(_pInterface != NULL); + return *castFromXInterface(_pInterface); + } + /** Gets interface pointer. This call does not acquire the interface. @return UNacquired interface pointer -- cgit