diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-10 18:54:28 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-10 18:54:28 +0200 |
commit | 80c35d97b9b3b60a091aae77de0ffef38cbf531a (patch) | |
tree | bd562b66960585a3c5d4145abcbd7098acda81e0 /sw/source/filter/xml/xmlexp.cxx | |
parent | b05ab09bccacc8e23685c455e24ab64cbf6e7ae3 (diff) |
Clean up uses of Any::getValue() in sw
Change-Id: Ifaa239ab3e285e8cf998339456ece5ce99008af9
Diffstat (limited to 'sw/source/filter/xml/xmlexp.cxx')
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 58656627fa26..d8e589c1e5db 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/xforms/XFormsSupplier.hpp> +#include <o3tl/any.hxx> #include <sax/tools/converter.hxx> #include <svx/svdmodel.hxx> #include <svx/svdpage.hxx> @@ -122,9 +123,11 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) sAutoTextMode ) ) { Any aAny = rInfoSet->getPropertyValue(sAutoTextMode); - if( aAny.getValueType() == cppu::UnoType<bool>::get() && - *static_cast<const sal_Bool*>(aAny.getValue()) ) - setBlockMode(); + if( auto b = o3tl::tryAccess<bool>(aAny) ) + { + if( *b ) + setBlockMode(); + } } } } @@ -380,8 +383,8 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) const OUString sShowChanges( "ShowChanges" ); if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) ) { - bShowRedlineChanges = *static_cast<sal_Bool const *>(xInfoSet-> - getPropertyValue( sShowChanges ).getValue()); + bShowRedlineChanges = *o3tl::doAccess<bool>(xInfoSet-> + getPropertyValue( sShowChanges )); } } |