summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-07 10:57:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-08 07:09:17 +0100
commit06ec8a95c37a475b35100c9599ef56c1e179dc23 (patch)
treeb1f4ff06e634673476abfbb6e60c02f176be1b1d
parent162a472d55cf9fb9aaa6d5eae625b3da2273a516 (diff)
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 <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--accessibility/source/extended/accessibletabbar.cxx2
-rw-r--r--accessibility/source/standard/accessiblemenucomponent.cxx2
-rw-r--r--include/com/sun/star/uno/Reference.h10
3 files changed, 12 insertions, 2 deletions
diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx
index b511fd9463a5..812149d7ba0e 100644
--- a/accessibility/source/extended/accessibletabbar.cxx
+++ b/accessibility/source/extended/accessibletabbar.cxx
@@ -471,7 +471,7 @@ namespace accessibility
else
aFont = m_pTabBar->GetFont();
VCLXFont* pVCLXFont = new VCLXFont;
- pVCLXFont->Init( *xDev.get(), aFont );
+ pVCLXFont->Init( *xDev, aFont );
xFont = pVCLXFont;
}
}
diff --git a/accessibility/source/standard/accessiblemenucomponent.cxx b/accessibility/source/standard/accessiblemenucomponent.cxx
index 95ab74d2a8b8..d8ec0900d994 100644
--- a/accessibility/source/standard/accessiblemenucomponent.cxx
+++ b/accessibility/source/standard/accessiblemenucomponent.cxx
@@ -310,7 +310,7 @@ Reference< awt::XFont > OAccessibleMenuComponent::getFont( )
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
VCLXFont* pVCLXFont = new VCLXFont;
- pVCLXFont->Init( *xDev.get(), rStyleSettings.GetMenuFont() );
+ pVCLXFont->Init( *xDev, rStyleSettings.GetMenuFont() );
xFont = pVCLXFont;
}
}
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