summaryrefslogtreecommitdiff
path: root/sd/source/ui/animations
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/animations')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx50
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx8
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx2
4 files changed, 31 insertions, 31 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 28f96d559121..dad89d8f8ffe 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -232,7 +232,7 @@ void ColorPropertyBox::setValue( const Any& rValue, const OUString& )
Any ColorPropertyBox::getValue()
{
- return makeAny( (sal_Int32)mpControl->GetSelectEntryColor().GetRGBColor() );
+ return makeAny( static_cast<sal_Int32>(mpControl->GetSelectEntryColor().GetRGBColor()) );
}
Control* ColorPropertyBox::getControl()
@@ -467,13 +467,13 @@ void CharHeightPropertyBox::setValue( const Any& rValue, const OUString& )
{
double fValue = 0.0;
rValue >>= fValue;
- mpMetric->SetValue( (long)(fValue * 100.0) );
+ mpMetric->SetValue( static_cast<long>(fValue * 100.0) );
}
}
Any CharHeightPropertyBox::getValue()
{
- return makeAny( (double)mpMetric->GetValue() / 100.0 );
+ return makeAny( static_cast<double>(mpMetric->GetValue()) / 100.0 );
}
Control* CharHeightPropertyBox::getControl()
@@ -564,7 +564,7 @@ void TransparencyPropertyBox::setValue( const Any& rValue, const OUString& )
{
double fValue = 0.0;
rValue >>= fValue;
- long nValue = (long)(fValue * 100);
+ long nValue = static_cast<long>(fValue * 100);
mpMetric->SetValue( nValue );
updateMenu();
}
@@ -572,7 +572,7 @@ void TransparencyPropertyBox::setValue( const Any& rValue, const OUString& )
Any TransparencyPropertyBox::getValue()
{
- return makeAny( ((double)mpMetric->GetValue()) / 100.0 );
+ return makeAny( static_cast<double>(mpMetric->GetValue()) / 100.0 );
}
Control* TransparencyPropertyBox::getControl()
@@ -683,7 +683,7 @@ void RotationPropertyBox::setValue( const Any& rValue, const OUString& )
{
double fValue = 0.0;
rValue >>= fValue;
- long nValue = (long)fValue;
+ long nValue = static_cast<long>(fValue);
mpMetric->SetValue( nValue );
updateMenu();
}
@@ -691,7 +691,7 @@ void RotationPropertyBox::setValue( const Any& rValue, const OUString& )
Any RotationPropertyBox::getValue()
{
- return makeAny( (double)mpMetric->GetValue() );
+ return makeAny( static_cast<double>(mpMetric->GetValue()) );
}
Control* RotationPropertyBox::getControl()
@@ -839,9 +839,9 @@ void ScalePropertyBox::setValue( const Any& rValue, const OUString& )
long nValue;
if( fValue1 )
- nValue = (long)(fValue1 * 100.0);
+ nValue = static_cast<long>(fValue1 * 100.0);
else
- nValue = (long)(fValue2 * 100.0);
+ nValue = static_cast<long>(fValue2 * 100.0);
mpMetric->SetValue( nValue );
updateMenu();
}
@@ -849,7 +849,7 @@ void ScalePropertyBox::setValue( const Any& rValue, const OUString& )
Any ScalePropertyBox::getValue()
{
- double fValue1 = (double)mpMetric->GetValue() / 100.0;
+ double fValue1 = static_cast<double>(mpMetric->GetValue()) / 100.0;
// Shrink animation is represented by value < 1 (< 100%)
// Shrink factor is calculated as (1 + $fValue)
@@ -1187,7 +1187,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
{
double fIterateInterval = 0.0;
pSet->getPropertyValue( nHandleIterateInterval ) >>= fIterateInterval;
- mpMFTextDelay->SetValue( (long)(fIterateInterval*10) );
+ mpMFTextDelay->SetValue( static_cast<long>(fIterateInterval*10) );
}
}
else
@@ -1222,14 +1222,14 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
OUString aString = maSoundList[ i ];
if( aString == aSoundURL )
{
- nPos = (sal_Int32)i+2;
+ nPos = static_cast<sal_Int32>(i)+2;
break;
}
}
if( nPos == 0 )
{
- nPos = (sal_Int32)maSoundList.size()+2;
+ nPos = static_cast<sal_Int32>(maSoundList.size())+2;
maSoundList.push_back( aSoundURL );
INetURLObject aURL( aSoundURL );
nPos = mpLBSound->InsertEntry( aURL.GetBase(), nPos );
@@ -1381,7 +1381,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
if( nPos == 1 )
{
Color aSelectedColor = mpCLBDimColor->GetSelectEntryColor();
- aDimColor <<= (sal_Int32)aSelectedColor.GetRGBColor();
+ aDimColor <<= static_cast<sal_Int32>(aSelectedColor.GetRGBColor());
}
if( (mpSet->getPropertyState( nHandleDimColor ) == STLPropertyState::Ambiguous) ||
@@ -1434,7 +1434,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
nPos = mpLBSound->GetSelectedEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- Any aNewSoundURL, aOldSoundURL( makeAny( (sal_Int32) 0 ) );
+ Any aNewSoundURL, aOldSoundURL( makeAny( sal_Int32(0) ) );
if( nPos == 0 )
{
@@ -1642,7 +1642,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
{
double fBegin = 0.0;
pSet->getPropertyValue( nHandleBegin ) >>= fBegin;
- mpMFStartDelay->SetValue( (long)(fBegin*10) );
+ mpMFStartDelay->SetValue( static_cast<long>(fBegin*10) );
}
if( pSet->getPropertyState( nHandleDuration ) != STLPropertyState::Ambiguous )
@@ -1752,7 +1752,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(vcl::Window* pPar
OUString aDescription( getShapeDescription( xShape, true ) );
sal_Int32 nPos = mpLBTrigger->InsertEntry( aDescription );
- mpLBTrigger->SetEntryData( nPos, reinterpret_cast<void*>((sal_IntPtr)nShape) );
+ mpLBTrigger->SetEntryData( nPos, reinterpret_cast<void*>(static_cast<sal_IntPtr>(nShape)) );
if( xShape == xTrigger )
mpLBTrigger->SelectEntryPos( nPos );
}
@@ -1936,7 +1936,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
nPos = mpLBTrigger->GetSelectedEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- sal_Int32 nShape = (sal_Int32)reinterpret_cast<sal_IntPtr>(mpLBTrigger->GetEntryData( nPos ));
+ sal_Int32 nShape = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(mpLBTrigger->GetEntryData( nPos )));
Reference< XDrawPage > xCurrentPage;
mpSet->getPropertyValue( nHandleCurrentPage ) >>= xCurrentPage;
@@ -2015,7 +2015,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(vcl::Window* pPar
{
maCBXGroupAuto->Check( fTextGroupingAuto >= 0.0 );
if( fTextGroupingAuto >= 0.0 )
- maMFGroupAuto->SetValue( (long)(fTextGroupingAuto*10) );
+ maMFGroupAuto->SetValue( static_cast<long>(fTextGroupingAuto*10) );
}
}
else
@@ -2230,15 +2230,15 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet()
Any aEmpty;
STLPropertySet* pSet = new STLPropertySet();
- pSet->setPropertyDefaultValue( nHandleMaxParaDepth, makeAny( (sal_Int32)-1 ) );
+ pSet->setPropertyDefaultValue( nHandleMaxParaDepth, makeAny( sal_Int32(-1) ) );
pSet->setPropertyDefaultValue( nHandleHasAfterEffect, makeAny( false ) );
pSet->setPropertyDefaultValue( nHandleAfterEffectOnNextEffect, makeAny( false ) );
pSet->setPropertyDefaultValue( nHandleDimColor, aEmpty );
- pSet->setPropertyDefaultValue( nHandleIterateType, makeAny( (sal_Int16)0 ) );
+ pSet->setPropertyDefaultValue( nHandleIterateType, makeAny( sal_Int16(0) ) );
pSet->setPropertyDefaultValue( nHandleIterateInterval, makeAny( 0.0 ) );
- pSet->setPropertyDefaultValue( nHandleStart, makeAny( (sal_Int16)EffectNodeType::ON_CLICK ) );
+ pSet->setPropertyDefaultValue( nHandleStart, makeAny( sal_Int16(EffectNodeType::ON_CLICK) ) );
pSet->setPropertyDefaultValue( nHandleBegin, makeAny( 0.0 ) );
pSet->setPropertyDefaultValue( nHandleDuration, makeAny( 2.0 ) );
pSet->setPropertyDefaultValue( nHandleRepeat, aEmpty );
@@ -2258,7 +2258,7 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet()
pSet->setPropertyDefaultValue( nHandleHasText, makeAny( false ) );
pSet->setPropertyDefaultValue( nHandleHasVisibleShape, makeAny( false ) );
- pSet->setPropertyDefaultValue( nHandleTextGrouping, makeAny( (sal_Int32)-1 ) );
+ pSet->setPropertyDefaultValue( nHandleTextGrouping, makeAny( sal_Int32(-1) ) );
pSet->setPropertyDefaultValue( nHandleAnimateForm, makeAny( true ) );
pSet->setPropertyDefaultValue( nHandleTextGroupingAuto, makeAny( -1.0 ) );
pSet->setPropertyDefaultValue( nHandleTextReverse, makeAny( false ) );
@@ -2267,9 +2267,9 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet()
pSet->setPropertyDefaultValue( nHandleSoundURL, aEmpty );
pSet->setPropertyDefaultValue( nHandleSoundVolumne, makeAny( 1.0) );
- pSet->setPropertyDefaultValue( nHandleSoundEndAfterSlide, makeAny( (sal_Int32)0 ) );
+ pSet->setPropertyDefaultValue( nHandleSoundEndAfterSlide, makeAny( sal_Int32(0) ) );
- pSet->setPropertyDefaultValue( nHandleCommand, makeAny( (sal_Int16)0 ) );
+ pSet->setPropertyDefaultValue( nHandleCommand, makeAny( sal_Int16(0) ) );
return pSet;
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index c00aedf6c607..17ed3f4b0b36 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1158,11 +1158,11 @@ STLPropertySet* CustomAnimationPane::createSelectionSet()
// convert absolute time to percentage value
// This calculation is done in float to avoid some rounding artifacts.
- float fIterateInterval = (float)pEffect->getIterateInterval();
+ float fIterateInterval = static_cast<float>(pEffect->getIterateInterval());
if( pEffect->getDuration() )
- fIterateInterval = (float)(fIterateInterval / pEffect->getDuration() );
+ fIterateInterval = static_cast<float>(fIterateInterval / pEffect->getDuration() );
fIterateInterval *= 100.0;
- addValue( pSet, nHandleIterateInterval, makeAny( (double)fIterateInterval ) );
+ addValue( pSet, nHandleIterateInterval, makeAny( static_cast<double>(fIterateInterval) ) );
addValue( pSet, nHandleBegin, makeAny( pEffect->getBegin() ) );
addValue( pSet, nHandleDuration, makeAny( pEffect->getDuration() ) );
@@ -1196,7 +1196,7 @@ STLPropertySet* CustomAnimationPane::createSelectionSet()
if( nGroupId != -1 )
pTextGroup = pEffectSequence->findGroup( nGroupId );
- addValue( pSet, nHandleTextGrouping, makeAny( pTextGroup.get() ? pTextGroup->getTextGrouping() : (sal_Int32)-1 ) );
+ addValue( pSet, nHandleTextGrouping, makeAny( pTextGroup.get() ? pTextGroup->getTextGrouping() : sal_Int32(-1) ) );
addValue( pSet, nHandleAnimateForm, makeAny( pTextGroup.get() == nullptr || pTextGroup->getAnimateForm() ) );
addValue( pSet, nHandleTextGroupingAuto, makeAny( pTextGroup.get() ? pTextGroup->getTextGroupingAuto() : -1.0 ) );
addValue( pSet, nHandleTextReverse, makeAny( pTextGroup.get() && pTextGroup->getTextReverse() ) );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index fc01f7b7547e..5204d0f3a8ff 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -307,7 +307,7 @@ OUString lcl_getSoundFileURL(
// the first three entries are no actual sounds
if( nPos >= 3 )
{
- DBG_ASSERT( (sal_uInt32)(rListBox->GetEntryCount() - 3) == rSoundList.size(),
+ DBG_ASSERT( static_cast<sal_uInt32>(rListBox->GetEntryCount() - 3) == rSoundList.size(),
"Sound list-box is not synchronized to sound list" );
nPos -= 3;
if( rSoundList.size() > static_cast<size_t>(nPos) )
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index cdc7dac65b24..688a15873920 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -511,7 +511,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
if( pHdl && !rMEvt.IsRight() )
{
mrView.BrkAction();
- const sal_uInt16 nDrgLog = (sal_uInt16)pOut->PixelToLogic(Size(DRGPIX,0)).Width();
+ const sal_uInt16 nDrgLog = static_cast<sal_uInt16>(pOut->PixelToLogic(Size(DRGPIX,0)).Width());
rtl::Reference< MotionPathTag > xTag( this );
SdrDragMethod* pDragMethod;