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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 8 06:09:44 UTC 2019


 accessibility/source/extended/accessibletabbar.cxx        |    2 +-
 accessibility/source/standard/accessiblemenucomponent.cxx |    2 +-
 include/com/sun/star/uno/Reference.h                      |   10 ++++++++++
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 06ec8a95c37a475b35100c9599ef56c1e179dc23
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jan 7 10:57:34 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jan 8 07:09:17 2019 +0100

    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 at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

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


More information about the Libreoffice-commits mailing list