summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-30 18:30:40 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-30 18:30:40 +0200
commitd8545e78e7d27bb704cef9befa3cc0ff65c68bb3 (patch)
tree0c7acff448599e2722158582982c9320b451984a /sd
parentac5fd13937a6eb708c45064948219b0ade040641 (diff)
Simplifiy unnecessary uses of int2enum
Change-Id: Ic811eac425717f7eac018dfd90c46bd72267c697
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 4db7930b7531..cd550d81b5d6 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1041,10 +1041,13 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aAny <<= (sal_Int32)( GetPage()->GetSize().getHeight() );
break;
case WID_PAGE_ORIENT:
- aAny = ::cppu::int2enum( (sal_Int32)((GetPage()->GetOrientation() == ORIENTATION_PORTRAIT)? view::PaperOrientation_PORTRAIT: view::PaperOrientation_LANDSCAPE), ::cppu::UnoType<view::PaperOrientation>::get() );
+ aAny <<= view::PaperOrientation(
+ GetPage()->GetOrientation() == ORIENTATION_PORTRAIT
+ ? view::PaperOrientation_PORTRAIT
+ : view::PaperOrientation_LANDSCAPE);
break;
case WID_PAGE_EFFECT:
- aAny = ::cppu::int2enum( (sal_Int32)GetPage()->GetFadeEffect(), ::cppu::UnoType<presentation::FadeEffect>::get() );
+ aAny <<= presentation::FadeEffect(GetPage()->GetFadeEffect());
break;
case WID_PAGE_CHANGE:
aAny <<= (sal_Int32)( GetPage()->GetPresChange() );
@@ -1052,7 +1055,8 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
case WID_PAGE_SPEED:
{
const double fDuration = GetPage()->getTransitionDuration();
- aAny = ::cppu::int2enum( fDuration < 2.0 ? 2 : (fDuration > 2.0 ? 0 : 1), ::cppu::UnoType<presentation::AnimationSpeed>::get() );
+ aAny <<= presentation::AnimationSpeed(
+ fDuration < 2.0 ? 2 : fDuration > 2.0 ? 0 : 1);
}
break;
case WID_PAGE_LAYOUT: