Kaydet (Commit) 44e0bbee authored tarafından Caolán McNamara's avatar Caolán McNamara

improve scoping

Change-Id: Ibb1625ff974cc1a35e5547b6ce88bf13d186d4bb
üst 07679362
......@@ -2301,14 +2301,13 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nDataLen]);
pOS2MET->ReadBytes(pBuf.get(), nDataLen);
if (p->nBitsPerPixel==24) {
sal_uLong i, j, nAlign, nBytesPerLine;
sal_uInt8 nTemp;
nBytesPerLine=(p->nWidth*3+3)&0xfffffffc;
nAlign=p->nMapPos-(p->nMapPos % nBytesPerLine);
i=0;
sal_uLong nBytesPerLine = (p->nWidth * 3 + 3) & 0xfffffffc;
sal_uLong nAlign = p->nMapPos - (p->nMapPos % nBytesPerLine);
sal_uLong i=0;
while (nAlign+i+2<p->nMapPos+nDataLen) {
if (nAlign+i>=p->nMapPos) {
j=nAlign+i-p->nMapPos;
sal_uLong j = nAlign + i - p->nMapPos;
nTemp=pBuf[j]; pBuf[j]=pBuf[j+2]; pBuf[j+2]=nTemp;
}
i+=3; if (i+2>=nBytesPerLine) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment