summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-06 08:59:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-06 07:47:30 +0000
commit7662e92c64ec194a2089f633a363d9dc45a4aa9d (patch)
tree1086154f31c0c9c6386b44ab83bd382f5308df8c /sd
parent823a8f3117a8be1de92168226f561ed804db3e93 (diff)
loplugin:redundantcast find cstyle double casts
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx14
-rw-r--r--sd/source/core/EffectMigration.cxx6
-rw-r--r--sd/source/filter/eppt/epptso.cxx8
-rw-r--r--sd/source/filter/eppt/pptx-stylesheet.cxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx18
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx2
9 files changed, 29 insertions, 29 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index aada2ef1acd8..86e7fd18bfb1 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -958,14 +958,14 @@ Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const
}
else
{
- aBegin <<= (double)0.0;
+ aBegin <<= 0.0;
}
xAnimate->setBegin( aBegin );
xAnimate->setTo( aTo );
xAnimate->setAttributeName( aAttributeName );
- xAnimate->setDuration( makeAny( (double)0.001 ) );
+ xAnimate->setDuration( makeAny( 0.001 ) );
xAnimate->setFill( AnimationFill::HOLD );
xAnimate->setTarget( maTarget );
@@ -1853,7 +1853,7 @@ void EffectSequenceHelper::implRebuild()
// must not have INDEFINITE begin but start at 0s
bFirst = false;
if( pEffect->getNodeType() != EffectNodeType::ON_CLICK )
- aBegin <<= (double)0.0;
+ aBegin <<= 0.0;
}
xOnClickContainer->setBegin( aBegin );
@@ -1911,7 +1911,7 @@ void EffectSequenceHelper::implRebuild()
{
// empty sequence, set duration to 0.0 explicitly
// (otherwise, this sequence will never end)
- mxSequenceRoot->setDuration( makeAny((double)0.0) );
+ mxSequenceRoot->setDuration( makeAny(0.0) );
}
}
catch( Exception& )
@@ -2002,7 +2002,7 @@ void stl_process_after_effect_node_func(AfterEffectNode& rNode)
// this does not yet have a child container, create one
xNextContainer.set( ParallelTimeContainer::create(xContext), UNO_QUERY_THROW );
- xNextContainer->setBegin( makeAny( (double)0.0 ) );
+ xNextContainer->setBegin( makeAny( 0.0 ) );
xNextClickContainer->appendChild( xNextContainer );
}
DBG_ASSERT( xNextContainer.is(), "ppt::stl_process_after_effect_node_func::operator(), could not find/create container!" );
@@ -2026,7 +2026,7 @@ void stl_process_after_effect_node_func(AfterEffectNode& rNode)
DBG_ASSERT( xNextContainer.is(), "ppt::stl_process_after_effect_node_func::operator(), could not create container!" );
if( xNextContainer.is() )
{
- xNextContainer->setBegin( makeAny( (double)0.0 ) );
+ xNextContainer->setBegin( makeAny( 0.0 ) );
xNewClickContainer->appendChild( xNextContainer );
}
}
@@ -3027,7 +3027,7 @@ void MainSequence::createMainSequence()
// empty sequence until now, set duration to 0.0
// explicitly (otherwise, this sequence will never
// end)
- mxSequenceRoot->setDuration( makeAny((double)0.0) );
+ mxSequenceRoot->setDuration( makeAny(0.0) );
Reference< XAnimationNode > xMainSequenceNode( mxSequenceRoot, UNO_QUERY_THROW );
mxTimingRootNode->appendChild( xMainSequenceNode );
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 47f4a2c43574..1f9f60c6c351 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -1306,7 +1306,7 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S
Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW);
// set begin
- xOuterSeqTimeContainer->setBegin(Any((double)0.0));
+ xOuterSeqTimeContainer->setBegin(Any(0.0));
// set fill
xOuterSeqTimeContainer->setFill(AnimationFill::HOLD);
@@ -1324,7 +1324,7 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S
Reference< XAnimationNode > xAnimateSetForLast(xMsf->createInstance("com.sun.star.animations.AnimateSet"), UNO_QUERY_THROW);
// set begin
- xAnimateSetForLast->setBegin(Any((double)0.0));
+ xAnimateSetForLast->setBegin(Any(0.0));
// set duration
xAnimateSetForLast->setDuration(Any(fDuration));
@@ -1384,7 +1384,7 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage)
Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW);
// set begin
- xOuterSeqTimeContainer->setBegin(Any((double)(0.0)));
+ xOuterSeqTimeContainer->setBegin(Any(0.0));
// prepare parent container
Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW);
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index d8a00d5ea2bf..27f9e64565fd 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1870,10 +1870,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
css::awt::Size aSize( mXShape->getSize() );
css::awt::Point aStart, aEnd, aCenter;
::tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) );
- aStart.X = (sal_Int32)( ( cos( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) );
- aStart.Y = - (sal_Int32)( ( sin( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) );
- aEnd.X = (sal_Int32)( ( cos( (double)( nEndAngle * F_PI18000 ) ) * 100.0 ) );
- aEnd.Y = - (sal_Int32)( ( sin( (double)( nEndAngle * F_PI18000 ) ) * 100.0 ) );
+ aStart.X = (sal_Int32)( ( cos( nStartAngle * F_PI18000 ) * 100.0 ) );
+ aStart.Y = - (sal_Int32)( ( sin( nStartAngle * F_PI18000 ) * 100.0 ) );
+ aEnd.X = (sal_Int32)( ( cos( nEndAngle * F_PI18000 ) * 100.0 ) );
+ aEnd.Y = - (sal_Int32)( ( sin( nEndAngle * F_PI18000 ) * 100.0 ) );
aCenter.X = aPoint.X + ( aSize.Width / 2 );
aCenter.Y = aPoint.Y + ( aSize.Height / 2 );
aStart.X += aCenter.X;
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx
index eb0327aa3031..065b723dc860 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -252,7 +252,7 @@ void PPTExParaSheet::SetStyleSheet( const css::uno::Reference< css::beans::XProp
{
const FontCollectionEntry* pDesc = rFontCollection.GetById( rCharLevel.mnFont );
if ( pDesc )
- nLineSpacing = (sal_Int16)( (double)100.0 * pDesc->Scaling + 0.5 );
+ nLineSpacing = (sal_Int16)( 100.0 * pDesc->Scaling + 0.5 );
else
nLineSpacing = 100;
}
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 74491b321742..3c1f76523a72 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -905,7 +905,7 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim
Any aDuration;
if( rNode.mnDuration > 0 )
{
- aDuration <<= (double)(rNode.mnDuration / 1000.0);
+ aDuration <<= rNode.mnDuration / 1000.0;
}
else if( rNode.mnDuration < 0 )
{
@@ -2632,7 +2632,7 @@ void AnimationImporter::importAnimationEvents( const Atom* pAtom, const Referenc
}
if( (nBegin != 0) || (aEvent.Trigger == EventTrigger::NONE) )
- aEvent.Offset = (nBegin == -1) ? makeAny( Timing_INDEFINITE ) : makeAny( (double)(nBegin / 1000.0) );
+ aEvent.Offset = (nBegin == -1) ? makeAny( Timing_INDEFINITE ) : makeAny( nBegin / 1000.0 );
}
break;
case DFF_msofbtAnimateTargetElement:
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index bdf409161d80..32e74d1f01f5 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -481,7 +481,7 @@ void CharHeightPropertyBox::setValue( const Any& rValue, const OUString& )
Any CharHeightPropertyBox::getValue()
{
- return makeAny( (double)((double)mpMetric->GetValue() / 100.0) );
+ return makeAny( (double)mpMetric->GetValue() / 100.0 );
}
Control* CharHeightPropertyBox::getControl()
@@ -581,7 +581,7 @@ void TransparencyPropertyBox::setValue( const Any& rValue, const OUString& )
Any TransparencyPropertyBox::getValue()
{
- return makeAny( (double)((double)mpMetric->GetValue()) / 100.0 );
+ return makeAny( ((double)mpMetric->GetValue()) / 100.0 );
}
Control* TransparencyPropertyBox::getControl()
@@ -702,7 +702,7 @@ void RotationPropertyBox::setValue( const Any& rValue, const OUString& )
Any RotationPropertyBox::getValue()
{
- return makeAny( (double)((double)mpMetric->GetValue()) );
+ return makeAny( (double)mpMetric->GetValue() );
}
Control* RotationPropertyBox::getControl()
@@ -849,7 +849,7 @@ void ScalePropertyBox::setValue( const Any& rValue, const OUString& )
Any ScalePropertyBox::getValue()
{
- double fValue1 = (double)((double)mpMetric->GetValue() / 100.0);
+ double fValue1 = (double)mpMetric->GetValue() / 100.0;
double fValue2 = fValue1;
if( mnDirection == 1 )
@@ -2227,11 +2227,11 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet()
pSet->setPropertyDefaultValue( nHandleAfterEffectOnNextEffect, makeAny( false ) );
pSet->setPropertyDefaultValue( nHandleDimColor, aEmpty );
pSet->setPropertyDefaultValue( nHandleIterateType, makeAny( (sal_Int16)0 ) );
- pSet->setPropertyDefaultValue( nHandleIterateInterval, makeAny( (double)0.0 ) );
+ pSet->setPropertyDefaultValue( nHandleIterateInterval, makeAny( 0.0 ) );
pSet->setPropertyDefaultValue( nHandleStart, makeAny( (sal_Int16)EffectNodeType::ON_CLICK ) );
- pSet->setPropertyDefaultValue( nHandleBegin, makeAny( (double)0.0 ) );
- pSet->setPropertyDefaultValue( nHandleDuration, makeAny( (double)2.0 ) );
+ pSet->setPropertyDefaultValue( nHandleBegin, makeAny( 0.0 ) );
+ pSet->setPropertyDefaultValue( nHandleDuration, makeAny( 2.0 ) );
pSet->setPropertyDefaultValue( nHandleRepeat, aEmpty );
pSet->setPropertyDefaultValue( nHandleRewind, makeAny( AnimationFill::HOLD ) );
@@ -2251,13 +2251,13 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet()
pSet->setPropertyDefaultValue( nHandleHasVisibleShape, makeAny( false ) );
pSet->setPropertyDefaultValue( nHandleTextGrouping, makeAny( (sal_Int32)-1 ) );
pSet->setPropertyDefaultValue( nHandleAnimateForm, makeAny( true ) );
- pSet->setPropertyDefaultValue( nHandleTextGroupingAuto, makeAny( (double)-1.0 ) );
+ pSet->setPropertyDefaultValue( nHandleTextGroupingAuto, makeAny( -1.0 ) );
pSet->setPropertyDefaultValue( nHandleTextReverse, makeAny( false ) );
pSet->setPropertyDefaultValue( nHandleCurrentPage, aEmpty );
pSet->setPropertyDefaultValue( nHandleSoundURL, aEmpty );
- pSet->setPropertyDefaultValue( nHandleSoundVolumne, makeAny( (double)1.0) );
+ pSet->setPropertyDefaultValue( nHandleSoundVolumne, makeAny( 1.0) );
pSet->setPropertyDefaultValue( nHandleSoundEndAfterSlide, makeAny( (sal_Int32)0 ) );
pSet->setPropertyDefaultValue( nHandleCommand, makeAny( (sal_Int16)0 ) );
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index a2ac3a0cc5ff..e446748f2b5c 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1210,7 +1210,7 @@ STLPropertySet* CustomAnimationPane::createSelectionSet()
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() : (double)-1.0 ) );
+ addValue( pSet, nHandleTextGroupingAuto, makeAny( pTextGroup.get() ? pTextGroup->getTextGroupingAuto() : -1.0 ) );
addValue( pSet, nHandleTextReverse, makeAny( pTextGroup.get() && pTextGroup->getTextReverse() ) );
if( pEffectSequence->getSequenceType() == EffectNodeType::INTERACTIVE_SEQUENCE )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index e2a7e0dddf85..0a104ae0f69c 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -815,7 +815,7 @@ bool SlideshowImpl::startPreview(
Sequence< beans::PropertyValue > aProperties(nPropertyCount);
aProperties[0].Name = "AutomaticAdvancement";
- aProperties[0].Value <<= (double)1.0; // one second timeout
+ aProperties[0].Value <<= 1.0; // one second timeout
if( mxPreviewAnimationNode.is() )
{
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 82e147a83658..70f0ec899ee1 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1084,7 +1084,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aAny <<= (sal_Int32)( GetPage()->GetTime() + .5 );
break;
case WID_PAGE_HIGHRESDURATION:
- aAny <<= (double)( GetPage()->GetTime() );
+ aAny <<= GetPage()->GetTime();
break;
case WID_PAGE_LDNAME:
{