Kaydet (Commit) e7944dab authored tarafından Jan Holesovsky's avatar Jan Holesovsky

pct import: Add logging.

Change-Id: Ia3fe1ff0075434d0b6903bf978c16499e07d699d
üst a5a17ccd
......@@ -371,8 +371,11 @@ Point PictReader::ReadPoint()
pPict->ReadInt16( ny ).ReadInt16( nx );
return Point( (long)nx - aBoundingRect.Left(),
Point aPoint( (long)nx - aBoundingRect.Left(),
(long)ny - aBoundingRect.Top() );
SAL_INFO("filter.pict", "ReadPoint: " << aPoint);
return aPoint;
}
Point PictReader::ReadDeltaH(Point aBase)
......@@ -458,6 +461,8 @@ void PictReader::ReadRectangle(Rectangle & rRect)
aTopLeft=ReadPoint();
aBottomRight=ReadPoint();
rRect=Rectangle(aTopLeft,aBottomRight);
SAL_INFO("filter.pict", "ReadRectangle: " << rRect);
}
......@@ -1198,6 +1203,38 @@ void PictReader::ReadHeader()
pPict->SetError(SVSTREAM_FILEFORMAT_ERROR);
}
#if OSL_DEBUG_LEVEL > 0
static const char* operationName(sal_uInt16 nOpcode)
{
// add here whatever makes the debugging easier for you, otherwise you'll
// see only the operation's opcode
switch (nOpcode)
{
case 0x0001: return "Clip";
case 0x0003: return "TxFont";
case 0x0004: return "TxFace";
case 0x0008: return "PnMode";
case 0x0009: return "PnPat";
case 0x000d: return "TxSize";
case 0x001a: return "RGBFgCol";
case 0x001d: return "HiliteColor";
case 0x0020: return "Line";
case 0x0022: return "ShortLine";
case 0x0028: return "LongText";
case 0x0029: return "DHText";
case 0x002a: return "DVText";
case 0x002c: return "fontName";
case 0x002e: return "glyphState";
case 0x0031: return "paintRect";
case 0x0038: return "frameSameRect";
case 0x0070: return "framePoly";
case 0x0071: return "paintPoly";
case 0x00a1: return "LongComment";
default: return "";
}
}
#endif
sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
{
sal_uInt16 nUSHORT;
......@@ -1213,6 +1250,10 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
default: break;
}
#if OSL_DEBUG_LEVEL > 0
SAL_INFO("filter.pict", "Operation: 0x" << OUString::number(nOpcode, 16) << " [" << operationName(nOpcode) << "]");
#endif
switch(nOpcode) {
case 0x0000: // NOP
......@@ -1235,8 +1276,8 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
break;
}
case 0x0002: // BkPat
nDataSize=eActBackPattern.read(*pPict);
eActMethod=PDM_UNDEFINED;
nDataSize = eActBackPattern.read(*pPict);
eActMethod = PDM_UNDEFINED;
break;
case 0x0003: // TxFont
......
......@@ -172,6 +172,7 @@ certain functionality.
@li @c filter.ms - escher import/export
@li @c filter.odfflatxml
@li @c filter.os2met
@li @c filter.pict
@li @c filter.tiff
@li @c filter.xslt - xslt import/export
@li @c oox.cscode - see oox/source/drawingml/customshapes/README
......
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