--- a/svgtopt/SVG/SVGEngine/src/SVGEngineInterfaceImpl.cpp Fri Apr 16 15:55:53 2010 +0300
+++ b/svgtopt/SVG/SVGEngine/src/SVGEngineInterfaceImpl.cpp Mon May 03 13:22:17 2010 +0300
@@ -1055,67 +1055,36 @@
TInt aX,aY;
// Check in Left direction
aX = 1; aY = 0;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
+ //Coverity fixes
+ if ( bound.iX >= zero )
aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
- aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- left = EFalse;
- else
- left = ETrue;
+ left = ((aY)||(aX));
// Check in Right direction
aX = -1; aY = 0;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
+ if ( xmax <= clipWidth )
aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
- aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- right = EFalse;
- else
- right = ETrue;
+ right = ((aY)||(aX));
// Check in Up direction
aX = 0; aY = 1;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
- aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
+ if ( bound.iY >= zero )
aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- up = EFalse;
- else
- up = ETrue;
+ up = ((aY)||(aX));
// Check in down direction
aX = 0; aY = -1;
- if ( xmax <= clipWidth && aX < 0 )
- aX = 0;
- if ( bound.iX >= zero && aX > 0 )
- aX = 0;
- if ( ymax <= clipHeight && aY < 0 )
+ if ( ymax <= clipHeight )
aY = 0;
- if ( bound.iY >= zero && aY > 0 )
- aY = 0;
+
// Do panning
- if ( ( aY == 0 ) && ( aX == 0 ) )
- down = EFalse;
- else
- down = ETrue;
+ down = ((aY)||(aX));
}
// --------------------------------------------------------------------------
@@ -1219,19 +1188,11 @@
{
bbSize.iWidth = ((TReal32)bbSize.iWidth) * percentWidth / 100.0;
}
- else
- {
- bbSize.iWidth = bbSize.iWidth;
- }
if( svgElement->iHeightInPercentage )
{
bbSize.iHeight = ((TReal32)bbSize.iHeight) * percentHeight / 100.0;
}
- else
- {
- bbSize.iHeight = bbSize.iHeight;
- }
return bbSize;
}
}
@@ -3102,10 +3063,9 @@
TSvgFourPointRect fourPointRect;
//updates CTM from root
- aTextElementHandle->UpdateCTM();
-
if (aTextElementHandle)
{
+ aTextElementHandle->UpdateCTM();
aTextElementHandle->GetFourPointBBox(fourPointRect);
}