diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-27 13:28:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-27 13:28:08 +0200 |
commit | 0e4ca9b0cfe015f7ab3b964d1b90de7c2cba42de (patch) | |
tree | 2b828c395e15fed4e2169e52850488cc6a3ba431 /ucb | |
parent | ed5bcef57b678cb92c68bf842a72e50f4dd1e2ea (diff) |
Clean up uses of Any::getValue() in ucb
Change-Id: Ifeae43257ce9c2ba8513652c21b512bcffd87841
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/cacher/cachedcontentresultset.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index ddc0ab2b9a39..9f8b48df3caa 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/sdbc/ResultSetType.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <rtl/ustring.hxx> +#include <o3tl/any.hxx> #include <osl/diagnose.h> #include <comphelper/processfactory.hxx> #include <cppuhelper/exc_hlp.hxx> @@ -286,13 +287,12 @@ const Any& SAL_CALL CachedContentResultSet::CCRS_Cache else m_xContentIdentifierMapping.clear(); } - const Sequence< Any >& rRow = - (* static_cast< const Sequence< Any > * > - (getRowAny( nRow ).getValue() )); + auto & rowAny = getRowAny(nRow); + auto rRow = o3tl::doAccess<Sequence<Any>>(rowAny); - if( nColumnIndex > rRow.getLength() ) + if( nColumnIndex > rRow->getLength() ) throw SQLException(); - return rRow[nColumnIndex-1]; + return (*rRow)[nColumnIndex-1]; } const OUString& SAL_CALL CachedContentResultSet::CCRS_Cache @@ -309,8 +309,7 @@ const OUString& SAL_CALL CachedContentResultSet::CCRS_Cache rRow <<= m_xContentIdentifierMapping->mapContentIdentifierString( aValue ); remindMapped( nRow ); } - return (* static_cast< const OUString * > - (getRowAny( nRow ).getValue() )); + return *o3tl::doAccess<OUString>(getRowAny(nRow)); } catch(const SQLException&) { @@ -332,8 +331,7 @@ const Reference< XContentIdentifier >& SAL_CALL CachedContentResultSet::CCRS_Cac rRow <<= m_xContentIdentifierMapping->mapContentIdentifier( aValue ); remindMapped( nRow ); } - return (* static_cast< const Reference< XContentIdentifier > * > - (getRowAny( nRow ).getValue() )); + return *o3tl::doAccess<Reference<XContentIdentifier>>(getRowAny(nRow)); } catch(const SQLException&) { @@ -355,8 +353,7 @@ const Reference< XContent >& SAL_CALL CachedContentResultSet::CCRS_Cache rRow <<= m_xContentIdentifierMapping->mapContent( aValue ); remindMapped( nRow ); } - return (* static_cast< const Reference< XContent > * > - (getRowAny( nRow ).getValue() )); + return *o3tl::doAccess<Reference<XContent>>(getRowAny(nRow)); } catch (const SQLException&) { |