diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-11 10:09:04 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-11 10:16:42 +0200 |
commit | bd596286207adf06936939a3ef8018efc1055591 (patch) | |
tree | dc8e079155868ffbc5d023f04620c83f402dc6c2 /cppuhelper | |
parent | be44f0e91b6061f6bbe6b4da2f264eed70fb6542 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10
Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx | 6 | ||||
-rw-r--r-- | cppuhelper/test/testpropshlp.cxx | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx index 9455752824d0..88f843acf061 100644 --- a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx @@ -376,14 +376,14 @@ void Test::testFull( CPPUNIT_ASSERT_EQUAL( rtl::OUString("First"), prop.Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), prop.Handle); - CPPUNIT_ASSERT_EQUAL(getCppuType(static_cast< sal_Int32 * >(0)), prop.Type); + CPPUNIT_ASSERT_EQUAL(cppu::UnoType<sal_Int32>::get(), prop.Type); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int16 >(0), prop.Attributes); prop = info->getPropertyByName( rtl::OUString("Second")); CPPUNIT_ASSERT_EQUAL( rtl::OUString("Second"), prop.Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(1), prop.Handle); - CPPUNIT_ASSERT_EQUAL(getCppuType(static_cast< sal_Int32 * >(0)), prop.Type); + CPPUNIT_ASSERT_EQUAL(cppu::UnoType<sal_Int32>::get(), prop.Type); CPPUNIT_ASSERT_EQUAL( static_cast< sal_Int16 >( css::beans::PropertyAttribute::MAYBEVOID @@ -403,7 +403,7 @@ void Test::testFull( CPPUNIT_ASSERT_EQUAL( rtl::OUString("Fourth"), prop.Name); CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(3), prop.Handle); - CPPUNIT_ASSERT_EQUAL(getCppuType(static_cast< sal_Int32 * >(0)), prop.Type); + CPPUNIT_ASSERT_EQUAL(cppu::UnoType<sal_Int32>::get(), prop.Type); CPPUNIT_ASSERT_EQUAL( static_cast< sal_Int16 >(css::beans::PropertyAttribute::OPTIONAL), prop.Attributes); diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx index 0919146b51fa..af2bcadb80c7 100644 --- a/cppuhelper/test/testpropshlp.cxx +++ b/cppuhelper/test/testpropshlp.cxx @@ -56,7 +56,7 @@ static Property * getPropertyTable1() PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //OUString Property( OUString("b"), 1, getCppuCharType( ) , PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //Char - Property( OUString("c"), 2, getCppuType( (sal_Int32*)0) , + Property( OUString("c"), 2, cppu::UnoType<sal_Int32>::get()0) , PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //sal_Int32 Property( OUString("d"), 5, getCppuType( (double*)0) , PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //double @@ -89,7 +89,7 @@ static Property * getPropertyTable2() PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString Property( OUString("d"), 5, getCppuType( (double*)0) , PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Double - Property( OUString("c"), 2, getCppuType( (sal_Int32*)0), + Property( OUString("c"), 2, cppu::UnoType<sal_Int32>::get()0), PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // sal_Int32 Property( OUString("e"), 7, getCppuBooleanType() , PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Bool @@ -411,8 +411,8 @@ Property * getBasicProps() Property( OUString("BOOL") , PROPERTY_BOOL , getCppuBooleanType(), PropertyAttribute::READONLY ), Property( OUString("INT16") , PROPERTY_INT16, getCppuType( (sal_Int16*)0 ), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ), - Property( OUString("INT32") , PROPERTY_INT32, getCppuType( (sal_Int32*)0 ), PropertyAttribute::BOUND ), - Property( OUString("TEST") , 55 , getCppuType( (sal_Int32*)0), PropertyAttribute::BOUND ) + Property( OUString("INT32") , PROPERTY_INT32, cppu::UnoType<sal_Int32>::get()0 ), PropertyAttribute::BOUND ), + Property( OUString("TEST") , 55 , cppu::UnoType<sal_Int32>::get()0), PropertyAttribute::BOUND ) }; pTable = aBasicProps; } |