diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-13 12:10:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-13 12:10:27 +0200 |
commit | fb7b701c189a1b479dde6cc5a30c612825ce4bf7 (patch) | |
tree | 3f5ea3d52e7925d883bc35272fc5547e4e905ed7 /editeng/source/uno | |
parent | a6353d61d396b5b62cb82f4f28cc8399742c9772 (diff) |
Clean up uses of Any::getValue() in editeng
Change-Id: I2bce1aba3e01e5c8d67d47b88cddca1f7ad37a93
Diffstat (limited to 'editeng/source/uno')
-rw-r--r-- | editeng/source/uno/unoipset.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index 40677da3d197..3fd6de0310ab 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -26,6 +26,7 @@ #include <editeng/editids.hrc> #include <editeng/editeng.hxx> #include <svl/itempool.hxx> +#include <o3tl/any.hxx> #include <osl/diagnose.h> #include <algorithm> @@ -286,19 +287,19 @@ void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, uno::Any & rMetric ) th switch( rMetric.getValueTypeClass() ) { case uno::TypeClass_BYTE: - rMetric <<= (sal_Int8)(TWIPS_TO_MM(*static_cast<sal_Int8 const *>(rMetric.getValue()))); + rMetric <<= (sal_Int8)(TWIPS_TO_MM(*o3tl::forceAccess<sal_Int8>(rMetric))); break; case uno::TypeClass_SHORT: - rMetric <<= (sal_Int16)(TWIPS_TO_MM(*static_cast<sal_Int16 const *>(rMetric.getValue()))); + rMetric <<= (sal_Int16)(TWIPS_TO_MM(*o3tl::forceAccess<sal_Int16>(rMetric))); break; case uno::TypeClass_UNSIGNED_SHORT: - rMetric <<= (sal_uInt16)(TWIPS_TO_MM(*static_cast<sal_uInt16 const *>(rMetric.getValue()))); + rMetric <<= (sal_uInt16)(TWIPS_TO_MM(*o3tl::forceAccess<sal_uInt16>(rMetric))); break; case uno::TypeClass_LONG: - rMetric <<= (sal_Int32)(TWIPS_TO_MM(*static_cast<sal_Int32 const *>(rMetric.getValue()))); + rMetric <<= (sal_Int32)(TWIPS_TO_MM(*o3tl::forceAccess<sal_Int32>(rMetric))); break; case uno::TypeClass_UNSIGNED_LONG: - rMetric <<= (sal_uInt32)(TWIPS_TO_MM(*static_cast<sal_uInt32 const *>(rMetric.getValue()))); + rMetric <<= (sal_uInt32)(TWIPS_TO_MM(*o3tl::forceAccess<sal_uInt32>(rMetric))); break; default: OSL_FAIL("AW: Missing unit translation to 100th mm!"); @@ -323,19 +324,19 @@ void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, uno::Any & rMetr switch( rMetric.getValueTypeClass() ) { case uno::TypeClass_BYTE: - rMetric <<= (sal_Int8)(MM_TO_TWIPS(*static_cast<sal_Int8 const *>(rMetric.getValue()))); + rMetric <<= (sal_Int8)(MM_TO_TWIPS(*o3tl::forceAccess<sal_Int8>(rMetric))); break; case uno::TypeClass_SHORT: - rMetric <<= (sal_Int16)(MM_TO_TWIPS(*static_cast<sal_Int16 const *>(rMetric.getValue()))); + rMetric <<= (sal_Int16)(MM_TO_TWIPS(*o3tl::forceAccess<sal_Int16>(rMetric))); break; case uno::TypeClass_UNSIGNED_SHORT: - rMetric <<= (sal_uInt16)(MM_TO_TWIPS(*static_cast<sal_uInt16 const *>(rMetric.getValue()))); + rMetric <<= (sal_uInt16)(MM_TO_TWIPS(*o3tl::forceAccess<sal_uInt16>(rMetric))); break; case uno::TypeClass_LONG: - rMetric <<= (sal_Int32)(MM_TO_TWIPS(*static_cast<sal_Int32 const *>(rMetric.getValue()))); + rMetric <<= (sal_Int32)(MM_TO_TWIPS(*o3tl::forceAccess<sal_Int32>(rMetric))); break; case uno::TypeClass_UNSIGNED_LONG: - rMetric <<= (sal_uInt32)(MM_TO_TWIPS(*static_cast<sal_uInt32 const *>(rMetric.getValue()))); + rMetric <<= (sal_uInt32)(MM_TO_TWIPS(*o3tl::forceAccess<sal_uInt32>(rMetric))); break; default: OSL_FAIL("AW: Missing unit translation to 100th mm!"); |