diff options
Diffstat (limited to 'include/svl')
-rw-r--r-- | include/svl/poolitem.hxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index f2f9f2947f68..986c6e0cf0f2 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -50,18 +50,11 @@ enum SfxItemKind { inline bool Any2Bool( const css::uno::Any&rValue ) { bool bValue = false; - if( rValue.hasValue() ) + if( !(rValue >>= bValue) ) { - if( rValue.getValueType() == cppu::UnoType<bool>::get() ) - { - bValue = *static_cast<sal_Bool const *>(rValue.getValue()); - } - else - { - sal_Int32 nNum = 0; - if( rValue >>= nNum ) - bValue = nNum != 0; - } + sal_Int32 nNum = 0; + if( rValue >>= nNum ) + bValue = nNum != 0; } return bValue; |