summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-21 15:48:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-23 16:48:15 +0200
commit4809fedd7cd3443100fba1c776267e2d87eb3f95 (patch)
treeead8e748678a1fa70b9d89861119fdea805c93e4 /include
parentc7c27b9b191291cf36e4940aef3e3e7371855797 (diff)
Clean up uses of Any::getValue() in svl
Change-Id: I2005ce59d6211181ed039eaff60ffd31084e1d40
Diffstat (limited to 'include')
-rw-r--r--include/svl/poolitem.hxx15
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;