summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-12-01 14:34:05 +0100
committerArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-12-01 14:34:05 +0100
commita48c816527cf9f534b8a3492ddf9ccaf1ccdc362 (patch)
tree1ad2bc61fa3af7bb97e1bdb90eebd88329773ea4 /drawinglayer
parent7f2b90a903fb4159c62dcbced97342974dff951a (diff)
awo78: changed MetaFile index to something more sophisticated for security reasons
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 94e642d06469..2fb3d119d4bd 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -1630,9 +1630,9 @@ namespace
{
const sal_uInt32 nCount(rMetaFile.GetActionCount());
- for(sal_uInt32 a(0); a < nCount; a++)
+ for(sal_uInt32 nAction(0); nAction < nCount; nAction++)
{
- MetaAction* pAction = rMetaFile.GetAction(a);
+ MetaAction* pAction = rMetaFile.GetAction(nAction);
switch(pAction->GetType())
{
@@ -1647,7 +1647,7 @@ namespace
std::vector< basegfx::B2DPoint > aPositions;
Color aLastColor(COL_BLACK);
- while(META_PIXEL_ACTION == pAction->GetType() && a < nCount)
+ while(META_PIXEL_ACTION == pAction->GetType() && nAction < nCount)
{
const MetaPixelAction* pA = (const MetaPixelAction*)pAction;
@@ -1664,10 +1664,10 @@ namespace
const Point& rPoint = pA->GetPoint();
aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y()));
- a++; if(a < nCount) pAction = rMetaFile.GetAction(a);
+ nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction);
}
- a--;
+ nAction--;
if(aPositions.size())
{
@@ -1683,15 +1683,15 @@ namespace
{
std::vector< basegfx::B2DPoint > aPositions;
- while(META_POINT_ACTION == pAction->GetType() && a < nCount)
+ while(META_POINT_ACTION == pAction->GetType() && nAction < nCount)
{
const MetaPointAction* pA = (const MetaPointAction*)pAction;
const Point& rPoint = pA->GetPoint();
aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y()));
- a++; if(a < nCount) pAction = rMetaFile.GetAction(a);
+ nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction);
}
- a--;
+ nAction--;
if(aPositions.size())
{
@@ -1709,7 +1709,7 @@ namespace
basegfx::B2DPolygon aLinePolygon;
LineInfo aLineInfo;
- while(META_LINE_ACTION == pAction->GetType() && a < nCount)
+ while(META_LINE_ACTION == pAction->GetType() && nAction < nCount)
{
const MetaLineAction* pA = (const MetaLineAction*)pAction;
const Point& rStartPoint = pA->GetStartPoint();
@@ -1741,10 +1741,10 @@ namespace
aLinePolygon.append(aEnd);
}
- a++; if(a < nCount) pAction = rMetaFile.GetAction(a);
+ nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction);
}
- a--;
+ nAction--;
if(aLinePolygon.count())
{
@@ -1937,7 +1937,7 @@ namespace
if(aPolygonOutline.count() > 1 && !aPolygonOutline.isClosed())
{
aPolygonOutline.setClosed(true);
- aPolyPolygonOutline.setB2DPolygon(a, aPolygonOutline);
+ aPolyPolygonOutline.setB2DPolygon(b, aPolygonOutline);
}
}
@@ -2923,7 +2923,7 @@ namespace
// better to use this info
const MetaGradientExAction* pMetaGradientExAction = 0;
bool bDone(false);
- sal_uInt32 b(a + 1);
+ sal_uInt32 b(nAction + 1);
for(; !bDone && b < nCount; b++)
{
@@ -2945,7 +2945,7 @@ namespace
if(bDone && pMetaGradientExAction)
{
// consume actions and skip forward
- a = b - 1;
+ nAction = b - 1;
// get geometry data
basegfx::B2DPolyPolygon aPolyPolygon(pMetaGradientExAction->GetPolyPolygon().getB2DPolyPolygon());