From 4809fedd7cd3443100fba1c776267e2d87eb3f95 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 21 Jun 2016 15:48:59 +0200 Subject: Clean up uses of Any::getValue() in svl Change-Id: I2005ce59d6211181ed039eaff60ffd31084e1d40 --- include/svl/poolitem.hxx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'include') 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::get() ) - { - bValue = *static_cast(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; -- cgit