Simplifiy unnecessary uses of int2enum
Change-Id: Ic811eac425717f7eac018dfd90c46bd72267c697
This commit is contained in:
@@ -3977,7 +3977,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
|
|||||||
if (nVersion > 1)
|
if (nVersion > 1)
|
||||||
{
|
{
|
||||||
sal_Int32 nCycle = _rxInStream->readShort();
|
sal_Int32 nCycle = _rxInStream->readShort();
|
||||||
m_aCycle = ::cppu::int2enum(nCycle, cppu::UnoType<TabulatorCycle>::get());
|
m_aCycle <<= TabulatorCycle(nCycle);
|
||||||
m_eNavigation = (NavigationBarMode)_rxInStream->readShort();
|
m_eNavigation = (NavigationBarMode)_rxInStream->readShort();
|
||||||
|
|
||||||
_rxInStream >> sAggregateProp;
|
_rxInStream >> sAggregateProp;
|
||||||
@@ -3995,7 +3995,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
|
|||||||
if (nAnyMask & CYCLE)
|
if (nAnyMask & CYCLE)
|
||||||
{
|
{
|
||||||
sal_Int32 nCycle = _rxInStream->readShort();
|
sal_Int32 nCycle = _rxInStream->readShort();
|
||||||
m_aCycle = ::cppu::int2enum(nCycle, cppu::UnoType<TabulatorCycle>::get());
|
m_aCycle <<= TabulatorCycle(nCycle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_aCycle.clear();
|
m_aCycle.clear();
|
||||||
|
@@ -1041,10 +1041,13 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
|
|||||||
aAny <<= (sal_Int32)( GetPage()->GetSize().getHeight() );
|
aAny <<= (sal_Int32)( GetPage()->GetSize().getHeight() );
|
||||||
break;
|
break;
|
||||||
case WID_PAGE_ORIENT:
|
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;
|
break;
|
||||||
case WID_PAGE_EFFECT:
|
case WID_PAGE_EFFECT:
|
||||||
aAny = ::cppu::int2enum( (sal_Int32)GetPage()->GetFadeEffect(), ::cppu::UnoType<presentation::FadeEffect>::get() );
|
aAny <<= presentation::FadeEffect(GetPage()->GetFadeEffect());
|
||||||
break;
|
break;
|
||||||
case WID_PAGE_CHANGE:
|
case WID_PAGE_CHANGE:
|
||||||
aAny <<= (sal_Int32)( GetPage()->GetPresChange() );
|
aAny <<= (sal_Int32)( GetPage()->GetPresChange() );
|
||||||
@@ -1052,7 +1055,8 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
|
|||||||
case WID_PAGE_SPEED:
|
case WID_PAGE_SPEED:
|
||||||
{
|
{
|
||||||
const double fDuration = GetPage()->getTransitionDuration();
|
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;
|
break;
|
||||||
case WID_PAGE_LAYOUT:
|
case WID_PAGE_LAYOUT:
|
||||||
|
Reference in New Issue
Block a user