diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-23 22:11:27 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-23 22:11:52 +0200 |
commit | ac76cc7e605b1bc9c0ff8e24d0b9995a8247074e (patch) | |
tree | 797df8cc9387fa70a0c09e574f49714ce4dc6710 /winaccessibility | |
parent | 3191d7d1302dbde2445b9f300b3eb853120ede65 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/UAccCOM/AccEditableText.cxx | 16 | ||||
-rw-r--r-- | winaccessibility/source/UAccCOM/MAccessible.cxx | 6 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx index 2515c65fd81e..054c3c9e9449 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.cxx +++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx @@ -274,14 +274,14 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : // Convert to int. // NOTE: CharFontPitch is not implemented in java file. sal_Int32 nValue = ouValue.toInt32(); - rAny.setValue(&nValue, getCppuType((sal_Int32 *)0)); + rAny.setValue(&nValue, cppu::UnoType<sal_Int32>::get()); } else if(ouName.compareTo(L"CharShadowed") == 0 || ouName.compareTo(L"CharContoured") == 0) { // Convert to boolean. boolean nValue = (boolean)ouValue.toBoolean(); - rAny.setValue(&nValue, getCppuType((sal_Bool *)sal_False)); + rAny.setValue(&nValue, cppu::UnoType<sal_Bool>::get() ); } else if(ouName.compareTo(L"CharEscapement") == 0 || ouName.compareTo(L"CharStrikeout") == 0 || @@ -290,25 +290,25 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : { // Convert to short. short nValue = (short)ouValue.toInt32(); - rAny.setValue(&nValue, getCppuType((short *)0)); + rAny.setValue(&nValue, cppu::UnoType<short>::get()); } else if(ouName.compareTo(L"CharHeight") == 0 || ouName.compareTo(L"CharWeight") == 0) { // Convert to float. float fValue = ouValue.toFloat(); - rAny.setValue(&fValue, getCppuType((float *)0)); + rAny.setValue(&fValue, cppu::UnoType<float>::get()); } else if(ouName.compareTo(L"CharFontName") == 0) { // Convert to string. - rAny.setValue(&ouValue, getCppuType((::rtl::OUString *)0)); + rAny.setValue(&ouValue, cppu::UnoType<rtl::OUString>::get()); } else if(ouName.compareTo(L"CharPosture") == 0) { // Convert to FontSlant. ::com::sun::star::awt::FontSlant fontSlant = (::com::sun::star::awt::FontSlant)ouValue.toInt32(); - rAny.setValue(&fontSlant, getCppuType((::com::sun::star::awt::FontSlant*)0)); + rAny.setValue(&fontSlant, cppu::UnoType<com::sun::star::awt::FontSlant>::get()); } else if(ouName.compareTo(L"ParaTabStops") == 0) { @@ -461,13 +461,13 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : } // Convert to Any object. - rAny.setValue(&lineSpacing, getCppuType((::com::sun::star::style::LineSpacing* )0)); + rAny.setValue(&lineSpacing, cppu::UnoType<com::sun::star::style::LineSpacing>::get()); } else { // Do nothing. sal_Int32 nDefault = 0; - rAny.setValue(&nDefault, getCppuType((sal_Int32 *)0)); + rAny.setValue(&nDefault, cppu::UnoType<sal_Int32>::get()); } } diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index c067cbdd27a0..81e0d53507e1 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2860,7 +2860,7 @@ void CMAccessible::get_OLECHARFromAny(Any& pAny, OLECHAR* pChar) } case TypeClass_ENUM: { - if (pAny.getValueType() == getCppuType( (::com::sun::star::awt::FontSlant* )0 ) ) + if (pAny.getValueType() == cppu::UnoType<com::sun::star::awt::FontSlant>::get()) { com::sun::star::awt::FontSlant val; pAny >>= val; @@ -2869,13 +2869,13 @@ void CMAccessible::get_OLECHARFromAny(Any& pAny, OLECHAR* pChar) } case TypeClass_STRUCT: { - if (pAny.getValueType() == getCppuType( (::com::sun::star::style::LineSpacing* )0 ) ) + if (pAny.getValueType() == cppu::UnoType<com::sun::star::style::LineSpacing>::get()) { com::sun::star::style::LineSpacing val; pAny >>= val; swprintf( pChar, L"Mode=%ld,Height=%ld,", val.Mode, val.Height); } - else if (pAny.getValueType() == getCppuType( (com::sun::star::accessibility::TextSegment *)0 ) ) + else if (pAny.getValueType() == cppu::UnoType<com::sun::star::accessibility::TextSegment>::get()) { com::sun::star::accessibility::TextSegment val; pAny >>= val; diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 63db986a069b..eb5bcb05ce87 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -427,7 +427,7 @@ void AccObject::SetValue( Any pAny ) if(NULL == m_pIMAcc) return strValue; - if(pAny.getValueType() == getCppuType( (sal_uInt16 *)0 ) ) + if(pAny.getValueType() == cppu::UnoType<cppu::UnoUnsignedShortType>::get() ) { sal_uInt16 val; if (pAny >>= val) @@ -436,7 +436,7 @@ void AccObject::SetValue( Any pAny ) } } - else if(pAny.getValueType() == getCppuType( (::rtl::OUString *)0 ) ) + else if(pAny.getValueType() == cppu::UnoType<rtl::OUString>::get()) { pAny >>= strValue ; @@ -457,7 +457,7 @@ void AccObject::SetValue( Any pAny ) } } - else if(pAny.getValueType() == getCppuType( (double *)0 ) ) + else if(pAny.getValueType() == cppu::UnoType<double>::get()) { double val; if (pAny >>= val) @@ -465,7 +465,7 @@ void AccObject::SetValue( Any pAny ) strValue=::rtl::OUString::number(val); } } - else if(pAny.getValueType() == getCppuType( (sal_Int32 *)0 ) ) + else if(pAny.getValueType() == cppu::UnoType<sal_Int32>::get()) { sal_Int32 val; if (pAny >>= val) @@ -473,7 +473,7 @@ void AccObject::SetValue( Any pAny ) strValue=::rtl::OUString::number(val); } } - else if (pAny.getValueType() == getCppuType( (com::sun::star::accessibility::TextSegment *)0 ) ) + else if (pAny.getValueType() == cppu::UnoType<com::sun::star::accessibility::TextSegment>::get()) { com::sun::star::accessibility::TextSegment val; if (pAny >>= val) |