diff options
author | Ćukasz Hryniuk <lukasz.hryniuk@wp.pl> | 2015-01-04 22:50:05 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-07 06:47:04 +0000 |
commit | 9fd89a5952a48b473cee03a2681eb5d4cd6d1742 (patch) | |
tree | 1fbf98ba46e86989826adf5d559f51c82d59a5e5 /filter/source | |
parent | Resolves fdo#87789: show groups in collected addresses (diff) | |
download | core-9fd89a5952a48b473cee03a2681eb5d4cd6d1742.tar.gz core-9fd89a5952a48b473cee03a2681eb5d4cd6d1742.zip |
fdo#39440 reduce scope of local variables
Beside scope changes, it fixes lack of initialization in a few places.
Change-Id: Ia09fdb9845d8ac17256330a5ec5168401c84f0f2
Reviewed-on: https://gerrit.libreoffice.org/13755
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/graphicfilter/epict/epict.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 4d33b4e8663e..aa8d045fbf41 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -335,7 +335,6 @@ void PictWriter::WritePolygon(const Polygon & rPoly) { sal_uInt16 nDataSize,i,nSize; short nMinX = 0, nMinY = 0, nMaxX = 0, nMaxY = 0; - short nx,ny; Polygon aPoly(rPoly); nSize=aPoly.GetSize(); @@ -354,8 +353,8 @@ void PictWriter::WritePolygon(const Polygon & rPoly) aSrcMapMode, aTargetMapMode ); - nx = (short) aPoint.X(); - ny = (short) aPoint.Y(); + short nx = (short) aPoint.X(); + short ny = (short) aPoint.Y(); if ( i==0 || nMinX>nx ) nMinX=nx; @@ -1308,21 +1307,18 @@ void PictWriter::SetAttrForText() void PictWriter::WriteTextArray(Point & rPoint, const OUString& rString, const long* pDXAry) { - bool bDelta; - Point aPt; - if ( pDXAry == NULL ) WriteOpcode_Text( rPoint, rString, false ); else { - bDelta = false; + bool bDelta = false; sal_Int32 nLen = rString.getLength(); for ( sal_Int32 i = 0; i < nLen; i++ ) { sal_Unicode c = rString[ i ]; if ( c && ( c != 0x20 ) ) { - aPt = rPoint; + Point aPt = rPoint; if ( i > 0 ) aPt.X() += pDXAry[ i - 1 ]; |