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 /sw | |
parent | be44f0e91b6061f6bbe6b4da2f264eed70fb6542 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10
Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 325d0e1a879a..3a1210b8434d 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -674,7 +674,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, rValue >>= m_pImpl->m_sParam1; else if(rPropertyName == UNO_NAME_VALUE) { - if(rValue.getValueType() != ::getCppuType(static_cast<const double*>(0))) + if(rValue.getValueType() != ::cppu::UnoType<double>::get()) throw lang::IllegalArgumentException(); rValue >>= m_pImpl->m_fParam1; } @@ -2209,7 +2209,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, break; case FIELD_PROP_DATE : { - if(rValue.getValueType() != ::getCppuType(static_cast<const util::Date*>(0))) + if(rValue.getValueType() != ::cppu::UnoType<util::Date>::get()) throw lang::IllegalArgumentException(); util::Date aTemp = *(const util::Date*)rValue.getValue(); @@ -2231,7 +2231,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, rValue >>= m_pImpl->m_pProps->nSHORT1; break; case FIELD_PROP_DOUBLE: - if(rValue.getValueType() != ::getCppuType(static_cast<const double*>(0))) + if(rValue.getValueType() != ::cppu::UnoType<double>::get()) throw lang::IllegalArgumentException(); rValue >>= m_pImpl->m_pProps->fDouble; break; @@ -2414,7 +2414,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, aRet.setValue(&m_pImpl->m_pProps->bBool4, ::getCppuBooleanType()); break; case FIELD_PROP_DATE : - aRet.setValue(&m_pImpl->m_pProps->aDate, ::getCppuType(static_cast<const util::Date*>(0))); + aRet.setValue(&m_pImpl->m_pProps->aDate, ::cppu::UnoType<util::Date>::get()); break; case FIELD_PROP_USHORT1: aRet <<= static_cast<sal_Int16>(m_pImpl->m_pProps->nUSHORT1); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index fb8fce715e7f..b1e315fe146b 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2134,7 +2134,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) awt::Size aTmp; aTmp.Width = convertTwipToMm100(aActSize.Width()); aTmp.Height = convertTwipToMm100(aActSize.Height()); - aAny.setValue(&aTmp, ::getCppuType(static_cast<const awt::Size*>(0))); + aAny.setValue(&aTmp, ::cppu::UnoType<awt::Size>::get()); } } else if(FN_PARAM_LINK_DISPLAY_NAME == pEntry->nWID) @@ -3116,7 +3116,7 @@ awt::Size SwXFrame::getSize(void) throw( uno::RuntimeException, std::exception ) void SwXFrame::setSize(const awt::Size& aSize) throw( beans::PropertyVetoException, uno::RuntimeException, std::exception ) { - const ::uno::Any aVal(&aSize, ::getCppuType(static_cast<const awt::Size*>(0))); + const ::uno::Any aVal(&aSize, ::cppu::UnoType<awt::Size>::get()); setPropertyValue("Size", aVal); } |