summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-12 09:09:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-12 10:11:19 +0200
commit7adac063f88842c5f4f7c1d44ed41fa6ab5d819e (patch)
tree9690e4f8d8c350d97bff5970ef1ade707d465a86 /sd/source/ui
parent34698034dbfe59bf444709fcf54d01f8a6f03f83 (diff)
convert STLPropertyState constants to scoped enum
Change-Id: I88313ade1774330c394f0d1b993b2f98ef40ea9f
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx88
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx52
-rw-r--r--sd/source/ui/animations/STLPropertySet.cxx8
-rw-r--r--sd/source/ui/animations/STLPropertySet.hxx18
4 files changed, 84 insertions, 82 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 31d98f2d191b..a0b826dd405b 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1100,14 +1100,14 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
mpCLBDimColor->SetUpdateMode( true );
// only show settings if all selected effects have the same preset-id
- if( pSet->getPropertyState( nHandlePresetId ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandlePresetId ) != STLPropertyState::Ambiguous )
{
OUString aPresetId;
pSet->getPropertyValue( nHandlePresetId ) >>= aPresetId;
// property 1
- if( pSet->getPropertyState( nHandleProperty1Type ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleProperty1Type ) != STLPropertyState::Ambiguous )
{
sal_Int32 nType = 0;
pSet->getPropertyValue( nHandleProperty1Type ) >>= nType;
@@ -1135,7 +1135,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
// accelerate & decelerate
- if( pSet->getPropertyState( nHandleAccelerate ) == STLPropertyState_DIRECT )
+ if( pSet->getPropertyState( nHandleAccelerate ) == STLPropertyState::Direct )
{
mpCBSmoothStart->Show();
mpCBSmoothEnd->Show();
@@ -1154,9 +1154,9 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
mpLBAfterEffect->SetSelectHdl( LINK( this, CustomAnimationEffectTabPage, implSelectHdl ) );
mpLBTextAnim->SetSelectHdl( LINK( this, CustomAnimationEffectTabPage, implSelectHdl ) );
- if( (pSet->getPropertyState( nHandleHasAfterEffect ) != STLPropertyState_AMBIGUOUS) &&
- (pSet->getPropertyState( nHandleAfterEffectOnNextEffect ) != STLPropertyState_AMBIGUOUS) &&
- (pSet->getPropertyState( nHandleDimColor ) != STLPropertyState_AMBIGUOUS))
+ if( (pSet->getPropertyState( nHandleHasAfterEffect ) != STLPropertyState::Ambiguous) &&
+ (pSet->getPropertyState( nHandleAfterEffectOnNextEffect ) != STLPropertyState::Ambiguous) &&
+ (pSet->getPropertyState( nHandleDimColor ) != STLPropertyState::Ambiguous))
{
bool bHasAfterEffect = false;
pSet->getPropertyValue( nHandleHasAfterEffect ) >>= bHasAfterEffect;
@@ -1193,12 +1193,12 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
mpLBAfterEffect->SelectEntryPos( nPos );
}
- if( pSet->getPropertyState( nHandleHasText ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleHasText ) != STLPropertyState::Ambiguous )
pSet->getPropertyValue( nHandleHasText ) >>= mbHasText;
if( mbHasText )
{
- if( pSet->getPropertyState( nHandleIterateType ) != STLPropertyState_AMBIGUOUS)
+ if( pSet->getPropertyState( nHandleIterateType ) != STLPropertyState::Ambiguous)
{
sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
@@ -1214,7 +1214,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
mpLBTextAnim->SelectEntryPos( nPos );
}
- if( pSet->getPropertyState( nHandleIterateInterval ) )
+ if( pSet->getPropertyState( nHandleIterateInterval ) != STLPropertyState::Default )
{
double fIterateInterval = 0.0;
pSet->getPropertyValue( nHandleIterateInterval ) >>= fIterateInterval;
@@ -1230,7 +1230,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
}
- if( pSet->getPropertyState( nHandleSoundURL ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleSoundURL ) != STLPropertyState::Ambiguous )
{
sal_Int32 nPos = 0;
@@ -1368,7 +1368,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
{
Any aNewValue( mpLBProperty1->getSubControl()->getValue() );
Any aOldValue;
- if( mpSet->getPropertyState( nHandleProperty1Value ) != STLPropertyState_AMBIGUOUS)
+ if( mpSet->getPropertyState( nHandleProperty1Value ) != STLPropertyState::Ambiguous)
aOldValue = mpSet->getPropertyValue( nHandleProperty1Value );
if( aOldValue != aNewValue )
@@ -1382,7 +1382,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
double fTemp = mpCBSmoothStart->IsChecked() ? 0.5 : 0.0;
double fOldTemp = 0.0;
- if(mpSet->getPropertyState( nHandleAccelerate ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleAccelerate ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleAccelerate ) >>= fOldTemp;
else
fOldTemp = -2.0;
@@ -1393,7 +1393,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
// set selected value for decelerate if different then in original set
fTemp = mpCBSmoothEnd->IsChecked() ? 0.5 : 0.0;
- if(mpSet->getPropertyState( nHandleDecelerate ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleDecelerate ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleDecelerate ) >>= fOldTemp;
else
fOldTemp = -2.0;
@@ -1409,7 +1409,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
bool bOldAfterEffect = false;
- if(mpSet->getPropertyState( nHandleHasAfterEffect ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleHasAfterEffect ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleHasAfterEffect ) >>= bOldAfterEffect;
else
bOldAfterEffect = !bAfterEffect;
@@ -1427,14 +1427,14 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
aDimColor = makeAny( (sal_Int32)aSelectedColor.GetRGBColor() );
}
- if( (mpSet->getPropertyState( nHandleDimColor ) == STLPropertyState_AMBIGUOUS) ||
+ if( (mpSet->getPropertyState( nHandleDimColor ) == STLPropertyState::Ambiguous) ||
(mpSet->getPropertyValue( nHandleDimColor ) != aDimColor) )
pSet->setPropertyValue( nHandleDimColor, aDimColor );
bool bAfterEffectOnNextEffect = nPos != 2;
bool bOldAfterEffectOnNextEffect = !bAfterEffectOnNextEffect;
- if( mpSet->getPropertyState( nHandleAfterEffectOnNextEffect ) != STLPropertyState_AMBIGUOUS)
+ if( mpSet->getPropertyState( nHandleAfterEffectOnNextEffect ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleAfterEffectOnNextEffect ) >>= bOldAfterEffectOnNextEffect;
if( bAfterEffectOnNextEffect != bOldAfterEffectOnNextEffect )
@@ -1456,7 +1456,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
sal_Int16 nOldIterateType = nIterateType-1;
- if(mpSet->getPropertyState( nHandleIterateType ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleIterateType ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleIterateType ) >>= nOldIterateType;
if( nIterateType != nOldIterateType )
@@ -1467,7 +1467,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
double fIterateInterval = static_cast< double >( mpMFTextDelay->GetValue() ) / 10;
double fOldIterateInterval = -1.0;
- if( mpSet->getPropertyState( nHandleIterateInterval ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleIterateInterval ) != STLPropertyState::Ambiguous )
mpSet->getPropertyValue( nHandleIterateInterval ) >>= fOldIterateInterval;
if( fIterateInterval != fOldIterateInterval )
@@ -1494,7 +1494,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
aNewSoundURL = makeAny( aSoundURL );
}
- if( mpSet->getPropertyState( nHandleSoundURL ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleSoundURL ) != STLPropertyState::Ambiguous )
mpSet->getPropertyValue( nHandleSoundURL ) >>= aOldSoundURL;
if( aNewSoundURL != aOldSoundURL )
@@ -1668,7 +1668,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
mpLBTrigger->SetSelectHdl( LINK( this, CustomAnimationDurationTabPage, implControlHdl ) );
mpCBXDuration->SetModifyHdl(LINK( this, CustomAnimationDurationTabPage, DurationModifiedHdl));
- if( pSet->getPropertyState( nHandleStart ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleStart ) != STLPropertyState::Ambiguous )
{
sal_Int16 nStart = 0;
pSet->getPropertyValue( nHandleStart ) >>= nStart;
@@ -1681,14 +1681,14 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
mpLBStart->SelectEntryPos( nPos );
}
- if( pSet->getPropertyState( nHandleBegin ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleBegin ) != STLPropertyState::Ambiguous )
{
double fBegin = 0.0;
pSet->getPropertyValue( nHandleBegin ) >>= fBegin;
mpMFStartDelay->SetValue( (long)(fBegin*10) );
}
- if( pSet->getPropertyState( nHandleDuration ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleDuration ) != STLPropertyState::Ambiguous )
{
double fDuration = 0.0;
pSet->getPropertyValue( nHandleDuration ) >>= fDuration;
@@ -1707,7 +1707,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
}
}
- if( pSet->getPropertyState( nHandleRepeat ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleRepeat ) != STLPropertyState::Ambiguous )
{
Any aRepeatCount( pSet->getPropertyValue( nHandleRepeat ) );
if( (aRepeatCount.getValueType() == ::cppu::UnoType<double>::get()) || !aRepeatCount.hasValue() )
@@ -1739,14 +1739,14 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
else if( aRepeatCount.getValueType() == ::cppu::UnoType<Timing>::get() )
{
Any aEnd;
- if( pSet->getPropertyState( nHandleEnd ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleEnd ) != STLPropertyState::Ambiguous )
aEnd = pSet->getPropertyValue( nHandleEnd );
mpCBRepeat->SelectEntryPos( aEnd.hasValue() ? 6 : 7 );
}
}
- if( pSet->getPropertyState( nHandleRewind ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleRewind ) != STLPropertyState::Ambiguous )
{
sal_Int16 nFill = 0;
if( pSet->getPropertyValue( nHandleRewind ) >>= nFill )
@@ -1761,7 +1761,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
Reference< XShape > xTrigger;
- if( pSet->getPropertyState( nHandleTrigger ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleTrigger ) != STLPropertyState::Ambiguous )
{
pSet->getPropertyValue( nHandleTrigger ) >>= xTrigger;
@@ -1871,7 +1871,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
nStart = EffectNodeType::ON_CLICK; break;
}
- if(mpSet->getPropertyState( nHandleStart ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleStart ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleStart ) >>= nOldStart;
if( nStart != nOldStart )
@@ -1882,7 +1882,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
double fBegin = static_cast<double>( mpMFStartDelay->GetValue()) / 10.0;
double fOldBegin = -1.0;
- if( mpSet->getPropertyState( nHandleBegin ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleBegin ) != STLPropertyState::Ambiguous )
mpSet->getPropertyValue( nHandleBegin ) >>= fOldBegin;
if( fBegin != fOldBegin )
@@ -1920,14 +1920,14 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
}
Any aOldRepeatCount( aRepeatCount );
- if( mpSet->getPropertyState( nHandleRepeat ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleRepeat ) != STLPropertyState::Ambiguous )
aOldRepeatCount = mpSet->getPropertyValue( nHandleRepeat );
if( aRepeatCount != aOldRepeatCount )
pSet->setPropertyValue( nHandleRepeat, aRepeatCount );
Any aOldEnd( aEnd );
- if( mpSet->getPropertyState( nHandleEnd ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleEnd ) != STLPropertyState::Ambiguous )
aOldEnd = mpSet->getPropertyValue( nHandleEnd );
if( aEnd != aOldEnd )
@@ -1948,7 +1948,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
{
double fOldDuration = -1;
- if( mpSet->getPropertyState( nHandleDuration ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleDuration ) != STLPropertyState::Ambiguous )
mpSet->getPropertyValue( nHandleDuration ) >>= fOldDuration;
if( fDuration != fOldDuration )
@@ -1961,7 +1961,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
bool bSet = true;
- if( mpSet->getPropertyState( nHandleRewind ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleRewind ) != STLPropertyState::Ambiguous )
{
sal_Int16 nOldFill = 0;
mpSet->getPropertyValue( nHandleRewind ) >>= nOldFill;
@@ -1994,7 +1994,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
Any aNewValue( makeAny( xTrigger ) );
Any aOldValue;
- if( mpSet->getPropertyState( nHandleTrigger ) != STLPropertyState_AMBIGUOUS )
+ if( mpSet->getPropertyState( nHandleTrigger ) != STLPropertyState::Ambiguous )
aOldValue = mpSet->getPropertyValue( nHandleTrigger );
if( aNewValue != aOldValue )
@@ -2041,17 +2041,17 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(vcl::Window* pPar
maLBGroupText->SetSelectHdl( LINK( this, CustomAnimationTextAnimTabPage, implSelectHdl ) );
- if( pSet->getPropertyState( nHandleTextGrouping ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleTextGrouping ) != STLPropertyState::Ambiguous )
{
sal_Int32 nTextGrouping = 0;
if( pSet->getPropertyValue( nHandleTextGrouping ) >>= nTextGrouping )
maLBGroupText->SelectEntryPos( nTextGrouping + 1 );
}
- if( pSet->getPropertyState( nHandleHasVisibleShape ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleHasVisibleShape ) != STLPropertyState::Ambiguous )
pSet->getPropertyValue( nHandleHasVisibleShape ) >>= mbHasVisibleShapes;
- if( pSet->getPropertyState( nHandleTextGroupingAuto ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleTextGroupingAuto ) != STLPropertyState::Ambiguous )
{
double fTextGroupingAuto = 0.0;
if( pSet->getPropertyValue( nHandleTextGroupingAuto ) >>= fTextGroupingAuto )
@@ -2067,7 +2067,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(vcl::Window* pPar
}
maCBXAnimateForm->SetState( TRISTATE_INDET );
- if( pSet->getPropertyState( nHandleAnimateForm ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleAnimateForm ) != STLPropertyState::Ambiguous )
{
bool bAnimateForm = false;
if( pSet->getPropertyValue( nHandleAnimateForm ) >>= bAnimateForm )
@@ -2081,7 +2081,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(vcl::Window* pPar
}
maCBXReverse->SetState( TRISTATE_INDET );
- if( pSet->getPropertyState( nHandleTextReverse ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleTextReverse ) != STLPropertyState::Ambiguous )
{
bool bTextReverse = false;
if( pSet->getPropertyValue( nHandleTextReverse ) >>= bTextReverse )
@@ -2090,7 +2090,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(vcl::Window* pPar
}
}
- if( pSet->getPropertyState( nHandleMaxParaDepth ) == STLPropertyState_DIRECT )
+ if( pSet->getPropertyState( nHandleMaxParaDepth ) == STLPropertyState::Direct )
{
sal_Int32 nMaxParaDepth = 0;
pSet->getPropertyValue( nHandleMaxParaDepth ) >>= nMaxParaDepth;
@@ -2131,7 +2131,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
sal_Int32 nTextGrouping = nPos - 1;
sal_Int32 nOldGrouping = -2;
- if(mpSet->getPropertyState( nHandleTextGrouping ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleTextGrouping ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleTextGrouping ) >>= nOldGrouping;
if( nTextGrouping != nOldGrouping )
@@ -2143,7 +2143,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
bool bTextReverse = maCBXReverse->IsChecked();
bool bOldTextReverse = !bTextReverse;
- if(mpSet->getPropertyState( nHandleTextReverse ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleTextReverse ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleTextReverse ) >>= bOldTextReverse;
if( bTextReverse != bOldTextReverse )
@@ -2154,7 +2154,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
double fTextGroupingAuto = maCBXGroupAuto->IsChecked() ? maMFGroupAuto->GetValue() / 10.0 : -1.0;
double fOldTextGroupingAuto = -2.0;
- if(mpSet->getPropertyState( nHandleTextGroupingAuto ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleTextGroupingAuto ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleTextGroupingAuto ) >>= fOldTextGroupingAuto;
if( fTextGroupingAuto != fOldTextGroupingAuto )
@@ -2169,7 +2169,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
bool bAnimateForm = maCBXAnimateForm->IsChecked();
bool bOldAnimateForm = !bAnimateForm;
- if(mpSet->getPropertyState( nHandleAnimateForm ) != STLPropertyState_AMBIGUOUS)
+ if(mpSet->getPropertyState( nHandleAnimateForm ) != STLPropertyState::Ambiguous)
mpSet->getPropertyValue( nHandleAnimateForm ) >>= bOldAnimateForm;
if( bAnimateForm != bOldAnimateForm )
@@ -2218,7 +2218,7 @@ CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, STLPropertySe
mpTabControl->SetTabPage( nTimingId, mpDurationTabPage );
bool bHasText = false;
- if( pSet->getPropertyState( nHandleHasText ) != STLPropertyState_AMBIGUOUS )
+ if( pSet->getPropertyState( nHandleHasText ) != STLPropertyState::Ambiguous )
pSet->getPropertyValue( nHandleHasText ) >>= bHasText;
if( bHasText )
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 6c363c9ee778..ef3db270b6f3 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -921,15 +921,15 @@ void addValue( STLPropertySet* pSet, sal_Int32 nHandle, const Any& rValue )
{
switch( pSet->getPropertyState( nHandle ) )
{
- case STLPropertyState_AMBIGUOUS:
+ case STLPropertyState::Ambiguous:
// value is already ambiguous, do nothing
break;
- case STLPropertyState_DIRECT:
+ case STLPropertyState::Direct:
// set to ambiguous if existing value is different
if( rValue != pSet->getPropertyValue( nHandle ) )
- pSet->setPropertyState( nHandle, STLPropertyState_AMBIGUOUS );
+ pSet->setPropertyState( nHandle, STLPropertyState::Ambiguous );
break;
- case STLPropertyState_DEFAULT:
+ case STLPropertyState::Default:
// just set new value
pSet->setPropertyValue( nHandle, rValue );
break;
@@ -1260,7 +1260,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
continue;
double fDuration = 0.0; // we might need this for iterate-interval
- if( pResultSet->getPropertyState( nHandleDuration ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleDuration ) == STLPropertyState::Direct )
{
pResultSet->getPropertyValue( nHandleDuration ) >>= fDuration;
}
@@ -1269,7 +1269,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
fDuration = pEffect->getDuration();
}
- if( pResultSet->getPropertyState( nHandleIterateType ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleIterateType ) == STLPropertyState::Direct )
{
sal_Int16 nIterateType = 0;
pResultSet->getPropertyValue( nHandleIterateType ) >>= nIterateType;
@@ -1282,7 +1282,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
if( pEffect->getIterateType() )
{
- if( pResultSet->getPropertyState( nHandleIterateInterval ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleIterateInterval ) == STLPropertyState::Direct )
{
double fIterateInterval = 0.0;
pResultSet->getPropertyValue( nHandleIterateInterval ) >>= fIterateInterval;
@@ -1295,7 +1295,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleBegin ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleBegin ) == STLPropertyState::Direct )
{
double fBegin = 0.0;
pResultSet->getPropertyValue( nHandleBegin ) >>= fBegin;
@@ -1306,7 +1306,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleDuration ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleDuration ) == STLPropertyState::Direct )
{
if( pEffect->getDuration() != fDuration )
{
@@ -1315,7 +1315,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleStart ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleStart ) == STLPropertyState::Direct )
{
sal_Int16 nNodeType = 0;
pResultSet->getPropertyValue( nHandleStart ) >>= nNodeType;
@@ -1326,7 +1326,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleRepeat ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleRepeat ) == STLPropertyState::Direct )
{
Any aRepeatCount( pResultSet->getPropertyValue( nHandleRepeat ) );
if( aRepeatCount != pEffect->getRepeatCount() )
@@ -1336,7 +1336,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleEnd ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleEnd ) == STLPropertyState::Direct )
{
Any aEndValue( pResultSet->getPropertyValue( nHandleEnd ) );
if( pEffect->getEnd() != aEndValue )
@@ -1346,7 +1346,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleRewind ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleRewind ) == STLPropertyState::Direct )
{
sal_Int16 nFill = 0;
pResultSet->getPropertyValue( nHandleRewind ) >>= nFill;
@@ -1357,7 +1357,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleHasAfterEffect ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleHasAfterEffect ) == STLPropertyState::Direct )
{
bool bHasAfterEffect = false;
if( pResultSet->getPropertyValue( nHandleHasAfterEffect ) >>= bHasAfterEffect )
@@ -1370,7 +1370,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleAfterEffectOnNextEffect ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleAfterEffectOnNextEffect ) == STLPropertyState::Direct )
{
bool bAfterEffectOnNextEffect = false;
if( (pResultSet->getPropertyValue( nHandleAfterEffectOnNextEffect ) >>= bAfterEffectOnNextEffect)
@@ -1381,7 +1381,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleDimColor ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleDimColor ) == STLPropertyState::Direct )
{
Any aDimColor( pResultSet->getPropertyValue( nHandleDimColor ) );
if( pEffect->getDimColor() != aDimColor )
@@ -1391,7 +1391,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleAccelerate ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleAccelerate ) == STLPropertyState::Direct )
{
double fAccelerate = 0.0;
pResultSet->getPropertyValue( nHandleAccelerate ) >>= fAccelerate;
@@ -1402,7 +1402,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleDecelerate ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleDecelerate ) == STLPropertyState::Direct )
{
double fDecelerate = 0.0;
pResultSet->getPropertyValue( nHandleDecelerate ) >>= fDecelerate;
@@ -1413,7 +1413,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleAutoReverse ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleAutoReverse ) == STLPropertyState::Direct )
{
bool bAutoReverse = false;
pResultSet->getPropertyValue( nHandleAutoReverse ) >>= bAutoReverse;
@@ -1424,7 +1424,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleProperty1Value ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleProperty1Value ) == STLPropertyState::Direct )
{
sal_Int32 nType = 0;
pOldSet->getPropertyValue( nHandleProperty1Type ) >>= nType;
@@ -1432,7 +1432,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
bChanged |= setProperty1Value( nType, pEffect, pResultSet->getPropertyValue( nHandleProperty1Value ) );
}
- if( pResultSet->getPropertyState( nHandleSoundURL ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleSoundURL ) == STLPropertyState::Direct )
{
const Any aSoundSource( pResultSet->getPropertyValue( nHandleSoundURL ) );
@@ -1473,7 +1473,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- if( pResultSet->getPropertyState( nHandleTrigger ) == STLPropertyState_DIRECT )
+ if( pResultSet->getPropertyState( nHandleTrigger ) == STLPropertyState::Direct )
{
Reference< XShape > xTriggerShape;
pResultSet->getPropertyValue( nHandleTrigger ) >>= xTriggerShape;
@@ -1481,10 +1481,10 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
- const bool bHasTextGrouping = pResultSet->getPropertyState( nHandleTextGrouping ) == STLPropertyState_DIRECT;
- const bool bHasAnimateForm = pResultSet->getPropertyState( nHandleAnimateForm ) == STLPropertyState_DIRECT;
- const bool bHasTextGroupingAuto = pResultSet->getPropertyState( nHandleTextGroupingAuto ) == STLPropertyState_DIRECT;
- const bool bHasTextReverse = pResultSet->getPropertyState( nHandleTextReverse ) == STLPropertyState_DIRECT;
+ const bool bHasTextGrouping = pResultSet->getPropertyState( nHandleTextGrouping ) == STLPropertyState::Direct;
+ const bool bHasAnimateForm = pResultSet->getPropertyState( nHandleAnimateForm ) == STLPropertyState::Direct;
+ const bool bHasTextGroupingAuto = pResultSet->getPropertyState( nHandleTextGroupingAuto ) == STLPropertyState::Direct;
+ const bool bHasTextReverse = pResultSet->getPropertyState( nHandleTextReverse ) == STLPropertyState::Direct;
if( bHasTextGrouping || bHasAnimateForm || bHasTextGroupingAuto || bHasTextReverse )
{
diff --git a/sd/source/ui/animations/STLPropertySet.cxx b/sd/source/ui/animations/STLPropertySet.cxx
index dd4a112e2eb1..60357bcfacfa 100644
--- a/sd/source/ui/animations/STLPropertySet.cxx
+++ b/sd/source/ui/animations/STLPropertySet.cxx
@@ -47,7 +47,7 @@ void STLPropertySet::setPropertyValue( sal_Int32 nHandle, const Any& rValue )
PropertyMapIter aIter;
if( findProperty( nHandle, aIter ) )
{
- (*aIter).second.mnState = STLPropertyState_DIRECT;
+ (*aIter).second.mnState = STLPropertyState::Direct;
(*aIter).second.maValue = rValue;
}
else
@@ -72,7 +72,7 @@ Any STLPropertySet::getPropertyValue( sal_Int32 nHandle ) const
}
}
-sal_Int32 STLPropertySet::getPropertyState( sal_Int32 nHandle ) const
+STLPropertyState STLPropertySet::getPropertyState( sal_Int32 nHandle ) const
{
PropertyMapConstIter aIter;
if( findProperty( nHandle, aIter ) )
@@ -82,11 +82,11 @@ sal_Int32 STLPropertySet::getPropertyState( sal_Int32 nHandle ) const
else
{
OSL_FAIL( "sd::STLPropertySet::setPropertyState(), unknown property!" );
- return STLPropertyState_AMBIGUOUS;
+ return STLPropertyState::Ambiguous;
}
}
-void STLPropertySet::setPropertyState( sal_Int32 nHandle, sal_Int32 nState )
+void STLPropertySet::setPropertyState( sal_Int32 nHandle, STLPropertyState nState )
{
PropertyMapIter aIter;
if( findProperty( nHandle, aIter ) )
diff --git a/sd/source/ui/animations/STLPropertySet.hxx b/sd/source/ui/animations/STLPropertySet.hxx
index 34050c087c57..1d6008b4daa5 100644
--- a/sd/source/ui/animations/STLPropertySet.hxx
+++ b/sd/source/ui/animations/STLPropertySet.hxx
@@ -28,19 +28,21 @@
namespace sd
{
-const sal_Int32 STLPropertyState_DEFAULT = 0;
-const sal_Int32 STLPropertyState_DIRECT = 1;
-const sal_Int32 STLPropertyState_AMBIGUOUS = 3;
+enum class STLPropertyState {
+ Default = 0,
+ Direct = 1,
+ Ambiguous = 3
+};
struct STLPropertyMapEntry
{
css::uno::Any maValue;
- sal_Int32 mnState;
+ STLPropertyState mnState;
STLPropertyMapEntry()
- : mnState( STLPropertyState_AMBIGUOUS ) {}
+ : mnState( STLPropertyState::Ambiguous ) {}
explicit STLPropertyMapEntry(css::uno::Any aValue)
- : maValue( aValue ), mnState( STLPropertyState_DEFAULT ) {}
+ : maValue( aValue ), mnState( STLPropertyState::Default ) {}
};
@@ -58,8 +60,8 @@ public:
void setPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue );
css::uno::Any getPropertyValue( sal_Int32 nHandle ) const;
- sal_Int32 getPropertyState( sal_Int32 nHandle ) const;
- void setPropertyState( sal_Int32 nHandle, sal_Int32 nState );
+ STLPropertyState getPropertyState( sal_Int32 nHandle ) const;
+ void setPropertyState( sal_Int32 nHandle, STLPropertyState nState );
private:
bool findProperty( sal_Int32 nHandle, PropertyMapIter& rIter );