cppcheck: redundantAssignment

Change-Id: I657ae67890a7266aa2655c366665ead61a744da6
This commit is contained in:
Thomas Arnhold 2014-05-24 15:12:13 +02:00
parent f9b5115200
commit d5cbe62742

View File

@ -4168,14 +4168,12 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aObjData.aChildAnchor = Rectangle( l, o, r, u ); aObjData.aChildAnchor = Rectangle( l, o, r, u );
if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() ) if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() )
{ {
double fl = l;
double fo = o;
double fWidth = r - l; double fWidth = r - l;
double fHeight= u - o; double fHeight= u - o;
double fXScale = (double)rClientRect.GetWidth() / (double)rGlobalChildRect.GetWidth(); double fXScale = (double)rClientRect.GetWidth() / (double)rGlobalChildRect.GetWidth();
double fYScale = (double)rClientRect.GetHeight() / (double)rGlobalChildRect.GetHeight(); double fYScale = (double)rClientRect.GetHeight() / (double)rGlobalChildRect.GetHeight();
fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left(); double fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left();
fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top(); double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
fWidth *= fXScale; fWidth *= fXScale;
fHeight *= fYScale; fHeight *= fYScale;
aObjData.aChildAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) ); aObjData.aChildAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );
@ -4857,14 +4855,12 @@ void SvxMSDffManager::GetGroupAnchors( const DffRecordHeader& rHd, SvStream& rSt
{ {
if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() ) if ( !rGlobalChildRect.IsEmpty() && !rClientRect.IsEmpty() && rGlobalChildRect.GetWidth() && rGlobalChildRect.GetHeight() )
{ {
double fl = l;
double fo = o;
double fWidth = r - l; double fWidth = r - l;
double fHeight= u - o; double fHeight= u - o;
double fXScale = (double)rClientRect.GetWidth() / (double)rGlobalChildRect.GetWidth(); double fXScale = (double)rClientRect.GetWidth() / (double)rGlobalChildRect.GetWidth();
double fYScale = (double)rClientRect.GetHeight() / (double)rGlobalChildRect.GetHeight(); double fYScale = (double)rClientRect.GetHeight() / (double)rGlobalChildRect.GetHeight();
fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left(); double fl = ( ( l - rGlobalChildRect.Left() ) * fXScale ) + rClientRect.Left();
fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top(); double fo = ( ( o - rGlobalChildRect.Top() ) * fYScale ) + rClientRect.Top();
fWidth *= fXScale; fWidth *= fXScale;
fHeight *= fYScale; fHeight *= fYScale;
rGroupClientAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) ); rGroupClientAnchor = Rectangle( Point( (sal_Int32)fl, (sal_Int32)fo ), Size( (sal_Int32)( fWidth + 1 ), (sal_Int32)( fHeight + 1 ) ) );