summaryrefslogtreecommitdiff
path: root/sw/source/core/para
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-10 18:54:28 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-10 18:54:28 +0200
commit80c35d97b9b3b60a091aae77de0ffef38cbf531a (patch)
treebd562b66960585a3c5d4145abcbd7098acda81e0 /sw/source/core/para
parentb05ab09bccacc8e23685c455e24ab64cbf6e7ae3 (diff)
Clean up uses of Any::getValue() in sw
Change-Id: Ifaa239ab3e285e8cf998339456ece5ce99008af9
Diffstat (limited to 'sw/source/core/para')
-rw-r--r--sw/source/core/para/paratr.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index 44abc86f09f1..f24c529d518b 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/text/SizeType.hpp>
#include <com/sun/star/text/VertOrientationFormat.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
+#include <o3tl/any.hxx>
#include <unostyle.hxx>
#include <SwStyleNameMapper.hxx>
#include "paratr.hxx"
@@ -188,7 +189,7 @@ bool SwFormatDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
if(rVal.getValueType() == ::cppu::UnoType<style::DropCapFormat>::get())
{
- const style::DropCapFormat* pDrop = static_cast<const style::DropCapFormat*>(rVal.getValue());
+ auto pDrop = o3tl::doAccess<style::DropCapFormat>(rVal);
nLines = pDrop->Lines;
nChars = pDrop->Count;
nDistance = convertMm100ToTwip(pDrop->Distance);
@@ -198,7 +199,7 @@ bool SwFormatDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
break;
case MID_DROPCAP_WHOLE_WORD:
- bWholeWord = *static_cast<sal_Bool const *>(rVal.getValue());
+ bWholeWord = *o3tl::doAccess<bool>(rVal);
break;
case MID_DROPCAP_CHAR_STYLE_NAME :
OSL_FAIL("char format cannot be set in PutValue()!");