[Libreoffice-commits] core.git: binaryurp/source chart2/source connectivity/source odk/examples sw/source

Stephan Bergmann sbergman at redhat.com
Wed Apr 1 01:43:32 PDT 2015


 binaryurp/source/bridge.cxx                                            |    3 --
 binaryurp/source/reader.cxx                                            |    3 --
 chart2/source/controller/main/ChartController_Window.cxx               |    8 ++---
 connectivity/source/commontools/dbtools.cxx                            |    4 +-
 connectivity/source/drivers/firebird/StatementCommonBase.cxx           |    6 ++--
 odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx |   14 +++++-----
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx    |    6 ++--
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx    |    6 ++--
 sw/source/core/access/acctable.cxx                                     |   10 +++----
 9 files changed, 29 insertions(+), 31 deletions(-)

New commits:
commit 31e24f487e5a4e917bb35fd396cf9f3ad84982a8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 1 10:42:11 2015 +0200

    Remove redundant Reference<> from within UnoType<> uses
    
    Change-Id: I1aeb9c73c284e39f371e49ded98e8dba0d055056

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 1037fe2..54214c3 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -864,8 +864,7 @@ css::uno::Reference< css::uno::XInterface > Bridge::getInstance(
                 " character");
         }
     }
-    css::uno::TypeDescription ifc(
-        cppu::UnoType< css::uno::Reference< css::uno::XInterface > >::get());
+    css::uno::TypeDescription ifc(cppu::UnoType<css::uno::XInterface>::get());
     typelib_TypeDescription * p = ifc.get();
     std::vector< BinaryAny > inArgs;
     inArgs.push_back(
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 880b1ad..99ad7c4 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -215,8 +215,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
     css::uno::UnoInterfaceReference cc;
     if (ccMode) {
         css::uno::TypeDescription t(
-            cppu::UnoType< css::uno::Reference< css::uno::XCurrentContext > >::
-            get());
+            cppu::UnoType<css::uno::XCurrentContext>::get());
         cc.set(
             *static_cast< uno_Interface ** >(
                 unmarshal.readValue(t).getValue(t)));
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 23724f428..59cbae5 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1598,7 +1598,7 @@ sal_Bool SAL_CALL ChartController::select( const uno::Any& rSelection )
                 bSuccess = true;
             }
         }
-        else if ( rType == cppu::UnoType< uno::Reference< drawing::XShape > >::get() )
+        else if ( rType == cppu::UnoType<drawing::XShape>::get() )
         {
             uno::Reference< drawing::XShape > xShape;
             if ( ( rSelection >>= xShape ) && m_aSelection.setSelection( xShape ) )
@@ -1664,7 +1664,7 @@ sal_Bool SAL_CALL ChartController::select( const uno::Any& rSelection )
         return; //behave passive if already disposed or suspended
 
     //--add listener
-    m_aLifeTimeManager.m_aListenerContainer.addInterface( cppu::UnoType< uno::Reference< view::XSelectionChangeListener > >::get(), xListener );
+    m_aLifeTimeManager.m_aListenerContainer.addInterface( cppu::UnoType<view::XSelectionChangeListener>::get(), xListener );
 }
 
         void SAL_CALL ChartController
@@ -1677,14 +1677,14 @@ sal_Bool SAL_CALL ChartController::select( const uno::Any& rSelection )
         return; //behave passive if already disposed or suspended
 
     //--remove listener
-    m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType< uno::Reference< view::XSelectionChangeListener > >::get(), xListener );
+    m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType<view::XSelectionChangeListener>::get(), xListener );
 }
 
         void ChartController
 ::impl_notifySelectionChangeListeners()
 {
     ::cppu::OInterfaceContainerHelper* pIC = m_aLifeTimeManager.m_aListenerContainer
-        .getContainer( cppu::UnoType< uno::Reference< view::XSelectionChangeListener > >::get() );
+        .getContainer( cppu::UnoType<view::XSelectionChangeListener>::get() );
     if( pIC )
     {
         uno::Reference< view::XSelectionSupplier > xSelectionSupplier(this);
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 4815a57..4f5e395 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1522,7 +1522,7 @@ bool implUpdateObject(const Reference< XRowUpdate >& _rxUpdatedObject,
             break;
 
         case TypeClass_INTERFACE:
-            if (_rValue.getValueType() == cppu::UnoType<Reference< XInputStream> >::get())
+            if (_rValue.getValueType() == cppu::UnoType<XInputStream>::get())
             {
                 Reference< XInputStream >  xStream;
                 _rValue >>= xStream;
@@ -1629,7 +1629,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters,
             break;
 
         case TypeClass_INTERFACE:
-            if (_rValue.getValueType() == cppu::UnoType<Reference< XInputStream> >::get())
+            if (_rValue.getValueType() == cppu::UnoType<XInputStream>::get())
             {
                 Reference< XInputStream >  xStream;
                 _rValue >>= xStream;
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index b642539..6f83c85 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -90,9 +90,9 @@ Any SAL_CALL OStatementCommonBase::queryInterface( const Type & rType ) throw(Ru
 Sequence< Type > SAL_CALL OStatementCommonBase::getTypes(  ) throw(RuntimeException, std::exception)
 {
     ::cppu::OTypeCollection aTypes(
-        ::cppu::UnoType< uno::Reference< XMultiPropertySet > >::get(),
-        ::cppu::UnoType< uno::Reference< XFastPropertySet > >::get(),
-        ::cppu::UnoType< uno::Reference< XPropertySet > >::get());
+        ::cppu::UnoType<XMultiPropertySet>::get(),
+        ::cppu::UnoType<XFastPropertySet>::get(),
+        ::cppu::UnoType<XPropertySet>::get());
 
     return concatSequences(aTypes.getTypes(),OStatementCommonBase_Base::getTypes());
 }
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index 20649fc..b9cf6f1 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -111,7 +111,7 @@ public:
 Any MyService1Impl::queryInterface( Type const & type )
     throw (RuntimeException)
 {
-    if (type.equals(::cppu::UnoType< Reference< XInterface > >::get()))
+    if (type.equals(::cppu::UnoType<XInterface>::get()))
     {
         // return XInterface interface
         // (resolve ambiguity by casting to lang::XTypeProvider)
@@ -119,21 +119,21 @@ Any MyService1Impl::queryInterface( Type const & type )
             static_cast< lang::XTypeProvider * >( this ) );
         return makeAny( x );
     }
-    if (type.equals(::cppu::UnoType< Reference< lang::XTypeProvider > >::get()))
+    if (type.equals(::cppu::UnoType<lang::XTypeProvider>::get()))
     {
         // return XInterface interface
         Reference< XInterface > x(
             static_cast< lang::XTypeProvider * >( this ) );
         return makeAny( x );
     }
-    if (type.equals(::cppu::UnoType< Reference< lang::XServiceInfo > >::get()))
+    if (type.equals(::cppu::UnoType<lang::XServiceInfo>::get()))
     {
         // return XServiceInfo interface
         Reference< lang::XServiceInfo > x(
             static_cast< lang::XServiceInfo * >( this ) );
         return makeAny( x );
     }
-    if (type.equals(::cppu::UnoType< Reference< ::my_module::XSomething > >::get()))
+    if (type.equals(::cppu::UnoType<my_module::XSomething>::get()))
     {
         // return sample interface
         Reference< ::my_module::XSomething > x(
@@ -166,9 +166,9 @@ Sequence< Type > MyService1Impl::getTypes()
     throw (RuntimeException)
 {
     Sequence< Type > seq( 3 );
-    seq[ 0 ] = ::cppu::UnoType< Reference< lang::XTypeProvider > >::get();
-    seq[ 1 ] = ::cppu::UnoType< Reference< lang::XServiceInfo > >::get();
-    seq[ 2 ] = ::cppu::UnoType< Reference< ::my_module::XSomething > >::get();
+    seq[ 0 ] = ::cppu::UnoType<lang::XTypeProvider>::get();
+    seq[ 1 ] = ::cppu::UnoType<lang::XServiceInfo>::get();
+    seq[ 2 ] = ::cppu::UnoType<my_module::XSomething>::get();
     return seq;
 }
 
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
index 86f103e..c4847fe 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
@@ -109,9 +109,9 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep
  Sequence<  Type > SAL_CALL OResultSet::getTypes(  ) throw( RuntimeException)
 {
     OTypeCollection aTypes(
-        ::cppu::UnoType< Reference< ::com::sun::star::beans::XMultiPropertySet > >::get(),
-        ::cppu::UnoType< Reference< ::com::sun::star::beans::XFastPropertySet > >::get(),
-        ::cppu::UnoType< Reference< ::com::sun::star::beans::XPropertySet > >::get());
+        ::cppu::UnoType<css::beans::XMultiPropertySet>::get(),
+        ::cppu::UnoType<css::beans::XFastPropertySet>::get(),
+        ::cppu::UnoType<css::beans::XPropertySet>::get());
 
     return concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes());
 }
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
index f3b1b59..bc84cc4 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
@@ -110,9 +110,9 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime
 Sequence< Type > SAL_CALL OStatement_Base::getTypes(  ) throw(RuntimeException)
 {
     ::cppu::OTypeCollection aTypes(
-        ::cppu::UnoType< Reference< XMultiPropertySet > >::get(),
-        ::cppu::UnoType< Reference< XFastPropertySet > >::get(),
-        ::cppu::UnoType< Reference< XPropertySet > >::get());
+        ::cppu::UnoType<XMultiPropertySet>::get(),
+        ::cppu::UnoType<XFastPropertySet>::get(),
+        ::cppu::UnoType<XPropertySet>::get());
 
     return concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes());
 }
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 3582962..763479b 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -851,17 +851,17 @@ uno::Any SwAccessibleTable::queryInterface( const uno::Type& rType )
     throw (uno::RuntimeException, std::exception)
 {
     uno::Any aRet;
-    if ( rType == cppu::UnoType< uno::Reference< XAccessibleTable > >::get() )
+    if ( rType == cppu::UnoType<XAccessibleTable>::get() )
     {
         uno::Reference<XAccessibleTable> xThis( this );
            aRet <<= xThis;
     }
-    else if ( rType == cppu::UnoType< uno::Reference< XAccessibleSelection > >::get() )
+    else if ( rType == cppu::UnoType<XAccessibleSelection>::get() )
     {
         uno::Reference<XAccessibleSelection> xSelection( this );
         aRet <<= xSelection;
     }
-    else if ( rType == cppu::UnoType< uno::Reference<XAccessibleTableSelection> >::get() )
+    else if ( rType == cppu::UnoType<XAccessibleTableSelection>::get() )
     {
         uno::Reference<XAccessibleTableSelection> xTableExtent( this );
         aRet <<= xTableExtent;
@@ -884,8 +884,8 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleTable::getTypes()
     aTypes.realloc( nIndex + 2 );
 
     uno::Type* pTypes = aTypes.getArray();
-    pTypes[nIndex++] = cppu::UnoType< uno::Reference< XAccessibleSelection > >::get();
-    pTypes[nIndex++] = cppu::UnoType< uno::Reference< XAccessibleTable >  >::get();
+    pTypes[nIndex++] = cppu::UnoType<XAccessibleSelection>::get();
+    pTypes[nIndex++] = cppu::UnoType<XAccessibleTable>::get();
 
     return aTypes;
 }


More information about the Libreoffice-commits mailing list