diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-10 18:54:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-10 18:54:57 +0200 |
commit | c97c898f65196292e7084bcad696c666adb9149f (patch) | |
tree | df8624d61118aab1ffcd9c59a076ac31556f9b96 /sc/source/ui/vba | |
parent | a7ce813f4898d99084f2b2929823acc9a2747ad4 (diff) |
Clean up uses of Any::getValue() in sc
Change-Id: Ic272f616533021ee2148adaf28eed68301aa4602
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r-- | sc/source/ui/vba/vbarange.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaworkbook.cxx | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index c7ad99222ee2..40921ee5c382 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -23,6 +23,7 @@ #include <comphelper/unwrapargs.hxx> #include <comphelper/processfactory.hxx> +#include <o3tl/any.hxx> #include <sfx2/objsh.hxx> #include <com/sun/star/script/ArrayWrapper.hpp> @@ -950,7 +951,7 @@ protected: ValueGetter& mValueGetter; void processValue( sal_Int32 x, sal_Int32 y, const uno::Any& aValue ) { - uno::Sequence< uno::Sequence< uno::Any > >& aMatrix = *const_cast<css::uno::Sequence<css::uno::Sequence<css::uno::Any>> *>(static_cast<uno::Sequence< uno::Sequence< uno::Any > > const *>(maValue.getValue())); + uno::Sequence< uno::Sequence< uno::Any > >& aMatrix = const_cast<css::uno::Sequence<css::uno::Sequence<css::uno::Any>> &>(*o3tl::doAccess<uno::Sequence<uno::Sequence<uno::Any>>>(maValue)); aMatrix[x][y] = aValue; } diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index ba6c992c6fcf..6b97d3b7bb90 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -82,7 +82,7 @@ ScVbaWorkbook::ResetColors( ) throw (::script::BasicErrorException, ::uno::Runt ScVbaWorkbook::Colors( const ::uno::Any& Index ) throw (::script::BasicErrorException, ::uno::RuntimeException, std::exception) { uno::Any aRet; - if ( Index.getValue() ) + if ( Index.hasValue() ) { sal_Int32 nIndex = 0; Index >>= nIndex; |