diff options
Diffstat (limited to 'filter/source/graphicfilter/epict/epict.cxx')
-rw-r--r-- | filter/source/graphicfilter/epict/epict.cxx | 446 |
1 files changed, 223 insertions, 223 deletions
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 53bdfbdad6ff..dac202b6ee1c 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -78,8 +78,8 @@ class PictWriter { private: - BOOL bStatus; - ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. + sal_Bool bStatus; + sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; SvStream * pPict; @@ -95,29 +95,29 @@ private: PictWriterAttrStackMember * pAttrStack; // Aktuelle Attribute im Ziel-Metafile, und ob sie gueltig sind - BOOL bDstBkPatVisible; BOOL bDstBkPatValid; - BYTE nDstTxFace; BOOL bDstTxFaceValid; - RasterOp eDstTxMode; BOOL bDstTxModeValid; - USHORT nDstPnSize; BOOL bDstPnSizeValid; - RasterOp eDstPnMode; BOOL bDstPnModeValid; - PictPattern aDstPnPat; BOOL bDstPnPatValid; - BOOL bDstFillPatVisible; BOOL bDstFillPatValid; - USHORT nDstTxSize; BOOL bDstTxSizeValid; - Color aDstFgCol; BOOL bDstFgColValid; - Color aDstBkCol; BOOL bDstBkColValid; - Point aDstPenPosition; BOOL bDstPenPositionValid; - Point aDstTextPosition; BOOL bDstTextPositionValid; - String aDstFontName; USHORT nDstFontNameId; BOOL bDstFontNameValid; - - ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile - ULONG nNumberOfBitmaps; // Anzahl der Bitmaps - ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Opcodes - ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps - ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. + sal_Bool bDstBkPatVisible; sal_Bool bDstBkPatValid; + sal_uInt8 nDstTxFace; sal_Bool bDstTxFaceValid; + RasterOp eDstTxMode; sal_Bool bDstTxModeValid; + sal_uInt16 nDstPnSize; sal_Bool bDstPnSizeValid; + RasterOp eDstPnMode; sal_Bool bDstPnModeValid; + PictPattern aDstPnPat; sal_Bool bDstPnPatValid; + sal_Bool bDstFillPatVisible; sal_Bool bDstFillPatValid; + sal_uInt16 nDstTxSize; sal_Bool bDstTxSizeValid; + Color aDstFgCol; sal_Bool bDstFgColValid; + Color aDstBkCol; sal_Bool bDstBkColValid; + Point aDstPenPosition; sal_Bool bDstPenPositionValid; + Point aDstTextPosition; sal_Bool bDstTextPositionValid; + String aDstFontName; sal_uInt16 nDstFontNameId; sal_Bool bDstFontNameValid; + + sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile + sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps + sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Opcodes + sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps + sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. void MayCallback(); // Berechnet anhand der obigen 5 Parameter eine Prozentzahl - // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen + // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen // moechte. void CountActionsAndBitmaps(const GDIMetaFile & rMTF); @@ -136,22 +136,22 @@ private: void WritePolygon(const Polygon & rPoly); void WriteArcAngles(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); - void ConvertLinePattern(PictPattern & rPat, BOOL bVisible); - void ConvertFillPattern(PictPattern & rPat, BOOL bVisible); + void ConvertLinePattern(PictPattern & rPat, sal_Bool bVisible); + void ConvertFillPattern(PictPattern & rPat, sal_Bool bVisible); void WriteOpcode_TxFace(const Font & rFont); void WriteOpcode_TxMode(RasterOp eMode); - void WriteOpcode_PnSize(USHORT nSize); + void WriteOpcode_PnSize(sal_uInt16 nSize); void WriteOpcode_PnMode(RasterOp eMode); - void WriteOpcode_PnLinePat(BOOL bVisible); - void WriteOpcode_PnFillPat(BOOL bVisible); + void WriteOpcode_PnLinePat(sal_Bool bVisible); + void WriteOpcode_PnFillPat(sal_Bool bVisible); void WriteOpcode_OvSize(const Size & rSize); - void WriteOpcode_TxSize(USHORT nSize); + void WriteOpcode_TxSize(sal_uInt16 nSize); void WriteOpcode_RGBFgCol(const Color & rColor); void WriteOpcode_RGBBkCol(const Color & rColor); void WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt); void WriteOpcode_LineFrom(const Point & rNewPt); - void WriteOpcode_Text(const Point & rPoint, const String& rString, BOOL bDelta); + void WriteOpcode_Text(const Point & rPoint, const String& rString, sal_Bool bDelta); void WriteOpcode_FontName(const Font & rFont); void WriteOpcode_ClipRect( const Rectangle& rRect ); void WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect); @@ -182,7 +182,7 @@ private: public: - BOOL WritePict( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem ); + sal_Bool WritePict( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem ); }; @@ -193,7 +193,7 @@ void PictWriter::MayCallback() { if ( xStatusIndicator.is() ) { - ULONG nPercent; + sal_uLong nPercent; nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions) *100 /((nNumberOfBitmaps<<14)+nNumberOfActions); @@ -209,7 +209,7 @@ void PictWriter::MayCallback() void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF) { - ULONG nAction, nActionCount; + sal_uLong nAction, nActionCount; const MetaAction* pMA; nActionCount = rMTF.GetActionCount(); @@ -237,7 +237,7 @@ void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF) Polygon PictWriter::PolyPolygonToPolygon(const PolyPolygon & rPolyPoly) { - USHORT nCount,nSize1,nSize2,np,i1,i2,i3,nBestIdx1,nBestIdx2; + sal_uInt16 nCount,nSize1,nSize2,np,i1,i2,i3,nBestIdx1,nBestIdx2; long nDistSqr,nBestDistSqr, nCountdownTests; Point aP1,aPRel; Polygon aPoly1, aPoly2, aPoly3; @@ -316,9 +316,9 @@ void PictWriter::WriteSize(const Size & rSize) void PictWriter::WriteRGBColor(const Color & rColor) { - const UINT16 nR = ( (UINT16) rColor.GetRed() << 8 ) | (UINT16) rColor.GetRed(); - const UINT16 nG = ( (UINT16) rColor.GetGreen() << 8 ) | (UINT16) rColor.GetGreen(); - const UINT16 nB = ( (UINT16) rColor.GetBlue() << 8 ) | (UINT16) rColor.GetBlue(); + const sal_uInt16 nR = ( (sal_uInt16) rColor.GetRed() << 8 ) | (sal_uInt16) rColor.GetRed(); + const sal_uInt16 nG = ( (sal_uInt16) rColor.GetGreen() << 8 ) | (sal_uInt16) rColor.GetGreen(); + const sal_uInt16 nB = ( (sal_uInt16) rColor.GetBlue() << 8 ) | (sal_uInt16) rColor.GetBlue(); *pPict << nR << nG << nB; } @@ -326,13 +326,13 @@ void PictWriter::WriteRGBColor(const Color & rColor) void PictWriter::WriteString( const String & rString ) { - USHORT i,nLen; + sal_uInt16 i,nLen; ByteString aByteString( rString, gsl_getSystemTextEncoding() ); nLen = aByteString.Len(); if ( nLen > 255 ) nLen = 255; - *pPict << ( (BYTE)nLen ); + *pPict << ( (sal_uInt8)nLen ); for ( i = 0; i < nLen; i++ ) *pPict << aByteString.GetChar( i ); } @@ -357,7 +357,7 @@ void PictWriter::WriteRectangle(const Rectangle & rRect) void PictWriter::WritePolygon(const Polygon & rPoly) { - USHORT nDataSize,i,nSize; + sal_uInt16 nDataSize,i,nSize; short nMinX = 0, nMinY = 0, nMaxX = 0, nMaxY = 0; short nx,ny; Polygon aPoly(rPoly); @@ -440,7 +440,7 @@ void PictWriter::WriteArcAngles(const Rectangle & rRect, const Point & rStartPt, } -void PictWriter::ConvertLinePattern(PictPattern & rPat, BOOL bVisible) +void PictWriter::ConvertLinePattern(PictPattern & rPat, sal_Bool bVisible) { if( bVisible ) { @@ -454,7 +454,7 @@ void PictWriter::ConvertLinePattern(PictPattern & rPat, BOOL bVisible) } } -void PictWriter::ConvertFillPattern(PictPattern & rPat, BOOL bVisible) +void PictWriter::ConvertFillPattern(PictPattern & rPat, sal_Bool bVisible) { if( bVisible ) { @@ -471,7 +471,7 @@ void PictWriter::ConvertFillPattern(PictPattern & rPat, BOOL bVisible) void PictWriter::WriteOpcode_TxFace(const Font & rFont) { - BYTE nFace; + sal_uInt8 nFace; FontWeight eWeight; nFace=0; @@ -482,127 +482,127 @@ void PictWriter::WriteOpcode_TxFace(const Font & rFont) eWeight==WEIGHT_BLACK) nFace|=0x01; if (rFont.GetItalic()!=ITALIC_NONE) nFace|=0x02; if (rFont.GetUnderline()!=UNDERLINE_NONE) nFace|=0x04; - if (rFont.IsOutline()==TRUE) nFace|=0x08; - if (rFont.IsShadow()==TRUE) nFace|=0x10; + if (rFont.IsOutline()==sal_True) nFace|=0x08; + if (rFont.IsShadow()==sal_True) nFace|=0x10; - if (bDstTxFaceValid==FALSE || nDstTxFace!=nFace) { - *pPict << (USHORT)0x0004 << nFace << (BYTE)0; + if (bDstTxFaceValid==sal_False || nDstTxFace!=nFace) { + *pPict << (sal_uInt16)0x0004 << nFace << (sal_uInt8)0; nDstTxFace=nFace; - bDstTxFaceValid=TRUE; + bDstTxFaceValid=sal_True; } } void PictWriter::WriteOpcode_TxMode(RasterOp eMode) { - USHORT nVal; + sal_uInt16 nVal; - if (bDstTxModeValid==FALSE || eDstTxMode!=eMode) { + if (bDstTxModeValid==sal_False || eDstTxMode!=eMode) { switch (eMode) { case ROP_INVERT: nVal=0x000c; break; case ROP_XOR: nVal=0x000a; break; default: nVal=0x0008; } - *pPict << (USHORT)0x0005 << nVal; + *pPict << (sal_uInt16)0x0005 << nVal; eDstTxMode=eMode; - bDstTxModeValid=TRUE; + bDstTxModeValid=sal_True; } } -void PictWriter::WriteOpcode_PnSize(USHORT nSize) +void PictWriter::WriteOpcode_PnSize(sal_uInt16 nSize) { if (nSize==0) nSize=1; - if (bDstPnSizeValid==FALSE || nDstPnSize!=nSize) { - *pPict << (USHORT)0x0007 << nSize << nSize; + if (bDstPnSizeValid==sal_False || nDstPnSize!=nSize) { + *pPict << (sal_uInt16)0x0007 << nSize << nSize; nDstPnSize=nSize; - bDstPnSizeValid=TRUE; + bDstPnSizeValid=sal_True; } } void PictWriter::WriteOpcode_PnMode(RasterOp eMode) { - USHORT nVal; + sal_uInt16 nVal; - if (bDstPnModeValid==FALSE || eDstPnMode!=eMode) { + if (bDstPnModeValid==sal_False || eDstPnMode!=eMode) { switch (eMode) { case ROP_INVERT: nVal=0x000c; break; case ROP_XOR: nVal=0x000a; break; default: nVal=0x0008; } - *pPict << (USHORT)0x0008 << nVal; + *pPict << (sal_uInt16)0x0008 << nVal; eDstPnMode=eMode; - bDstPnModeValid=TRUE; + bDstPnModeValid=sal_True; } } -void PictWriter::WriteOpcode_PnLinePat(BOOL bVisible) +void PictWriter::WriteOpcode_PnLinePat(sal_Bool bVisible) { PictPattern aPat; ConvertLinePattern(aPat,bVisible); - if (bDstPnPatValid==FALSE || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { - *pPict << (USHORT)0x0009 << aPat.nHi << aPat.nLo; + if (bDstPnPatValid==sal_False || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { + *pPict << (sal_uInt16)0x0009 << aPat.nHi << aPat.nLo; aDstPnPat=aPat; - bDstPnPatValid=TRUE; + bDstPnPatValid=sal_True; } } -void PictWriter::WriteOpcode_PnFillPat(BOOL bVisible) +void PictWriter::WriteOpcode_PnFillPat(sal_Bool bVisible) { PictPattern aPat; ConvertFillPattern(aPat,bVisible); - if (bDstPnPatValid==FALSE || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { - *pPict << (USHORT)0x0009 << aPat.nHi << aPat.nLo; + if (bDstPnPatValid==sal_False || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { + *pPict << (sal_uInt16)0x0009 << aPat.nHi << aPat.nLo; aDstPnPat=aPat; - bDstPnPatValid=TRUE; + bDstPnPatValid=sal_True; } } void PictWriter::WriteOpcode_OvSize(const Size & rSize) { - *pPict << (USHORT)0x000b; + *pPict << (sal_uInt16)0x000b; WriteSize(rSize); } -void PictWriter::WriteOpcode_TxSize(USHORT nSize) +void PictWriter::WriteOpcode_TxSize(sal_uInt16 nSize) { - if (bDstTxSizeValid==FALSE || nDstTxSize!=nSize) { + if (bDstTxSizeValid==sal_False || nDstTxSize!=nSize) { - nDstTxSize = (USHORT) OutputDevice::LogicToLogic( Size( 0, nSize ), + nDstTxSize = (sal_uInt16) OutputDevice::LogicToLogic( Size( 0, nSize ), aSrcMapMode, aTargetMapMode ).Height(); - *pPict << (USHORT)0x000d << nDstTxSize; - bDstTxSizeValid=TRUE; + *pPict << (sal_uInt16)0x000d << nDstTxSize; + bDstTxSizeValid=sal_True; } } void PictWriter::WriteOpcode_RGBFgCol(const Color & rColor) { - if (bDstFgColValid==FALSE || aDstFgCol!=rColor) { - *pPict << (USHORT)0x001a; + if (bDstFgColValid==sal_False || aDstFgCol!=rColor) { + *pPict << (sal_uInt16)0x001a; WriteRGBColor(rColor); aDstFgCol=rColor; - bDstFgColValid=TRUE; + bDstFgColValid=sal_True; } } void PictWriter::WriteOpcode_RGBBkCol(const Color & rColor) { - if (bDstBkColValid==FALSE || aDstBkCol!=rColor) { - *pPict << (USHORT)0x001b; + if (bDstBkColValid==sal_False || aDstBkCol!=rColor) { + *pPict << (sal_uInt16)0x001b; WriteRGBColor(rColor); aDstBkCol=rColor; - bDstBkColValid=TRUE; + bDstBkColValid=sal_True; } } @@ -621,18 +621,18 @@ void PictWriter::WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt) dv=aNewPt.Y()-aLocPt.Y(); if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128) { // ShortLine - *pPict << (USHORT)0x0022; + *pPict << (sal_uInt16)0x0022; WritePoint(rLocPt); *pPict << (char)dh << (char)dv; } else { - *pPict << (USHORT)0x0020; + *pPict << (sal_uInt16)0x0020; WritePoint(rLocPt); WritePoint(rNewPt); } aDstPenPosition=rNewPt; - bDstPenPositionValid=TRUE; + bDstPenPositionValid=sal_True; } @@ -648,61 +648,61 @@ void PictWriter::WriteOpcode_LineFrom(const Point & rNewPt) if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128) { // ShortLine - *pPict << (USHORT)0x0023; + *pPict << (sal_uInt16)0x0023; *pPict << (char)dh << (char)dv; } else { - *pPict << (USHORT)0x0021; + *pPict << (sal_uInt16)0x0021; WritePoint(rNewPt); } aDstPenPosition=rNewPt; - bDstPenPositionValid=TRUE; + bDstPenPositionValid=sal_True; } -void PictWriter::WriteOpcode_Text(const Point & rPoint, const String& rString, BOOL bDelta) +void PictWriter::WriteOpcode_Text(const Point & rPoint, const String& rString, sal_Bool bDelta) { Point aPoint = OutputDevice::LogicToLogic( rPoint, aSrcMapMode, aTargetMapMode ); long dh,dv; - ULONG nPos; + sal_uLong nPos; nPos = pPict->Tell(); dh = aPoint.X()-aDstTextPosition.X(); dv = aPoint.Y()-aDstTextPosition.Y(); - if (bDstTextPositionValid==FALSE || dh<0 || dh>255 || dv<0 || dv>0 || bDelta==FALSE) + if (bDstTextPositionValid==sal_False || dh<0 || dh>255 || dv<0 || dv>0 || bDelta==sal_False) { - *pPict << (USHORT)0x0028; + *pPict << (sal_uInt16)0x0028; WritePoint(rPoint); } else if (dv==0) { - *pPict << (USHORT)0x0029 << (BYTE)dh; + *pPict << (sal_uInt16)0x0029 << (sal_uInt8)dh; } else if (dh==0) { - *pPict << (USHORT)0x002a << (BYTE)dv; + *pPict << (sal_uInt16)0x002a << (sal_uInt8)dv; } else { - *pPict << (USHORT)0x002b << (BYTE)dh << (BYTE)dv; + *pPict << (sal_uInt16)0x002b << (sal_uInt8)dh << (sal_uInt8)dv; } WriteString( rString ); if (((pPict->Tell()-nPos)&1)!=0) - *pPict << (BYTE)0; + *pPict << (sal_uInt8)0; aDstTextPosition = aPoint; - bDstTextPositionValid=TRUE; + bDstTextPositionValid=sal_True; } void PictWriter::WriteOpcode_FontName(const Font & rFont) { - USHORT nDataLen,nFontId; + sal_uInt16 nDataLen,nFontId; switch (rFont.GetFamily()) { case FAMILY_MODERN: nFontId=22; break; @@ -711,22 +711,22 @@ void PictWriter::WriteOpcode_FontName(const Font & rFont) default: nFontId=1; } - if (bDstFontNameValid==FALSE || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetName()) + if (bDstFontNameValid==sal_False || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetName()) { ByteString aByteString( rFont.GetName(), gsl_getSystemTextEncoding() ); sal_uInt16 nFontNameLen = aByteString.Len(); if ( nFontNameLen ) { nDataLen = 3 + nFontNameLen; - *pPict << (USHORT)0x002c << nDataLen << nFontId; + *pPict << (sal_uInt16)0x002c << nDataLen << nFontId; WriteString( rFont.GetName() ); if ( ( nFontNameLen & 1 ) == 0 ) - *pPict << (BYTE)0; + *pPict << (sal_uInt8)0; } - *pPict << (USHORT)0x0003 << nFontId; + *pPict << (sal_uInt16)0x0003 << nFontId; aDstFontName=rFont.GetName(); nDstFontNameId=nFontId; - bDstFontNameValid=TRUE; + bDstFontNameValid=sal_True; } } @@ -744,7 +744,7 @@ void PictWriter::WriteOpcode_ClipRect( const Rectangle& rRect ) void PictWriter::WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0030; break; case PDM_PAINT: oc=0x0031; break; @@ -760,7 +760,7 @@ void PictWriter::WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & r void PictWriter::WriteOpcode_SameRect(PictDrawingMethod eMethod) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0038; break; case PDM_PAINT: oc=0x0039; break; @@ -775,7 +775,7 @@ void PictWriter::WriteOpcode_SameRect(PictDrawingMethod eMethod) void PictWriter::WriteOpcode_RRect(PictDrawingMethod eMethod, const Rectangle & rRect) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0040; break; case PDM_PAINT: oc=0x0041; break; @@ -791,7 +791,7 @@ void PictWriter::WriteOpcode_RRect(PictDrawingMethod eMethod, const Rectangle & void PictWriter::WriteOpcode_SameRRect(PictDrawingMethod eMethod) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0048; break; case PDM_PAINT: oc=0x0049; break; @@ -806,7 +806,7 @@ void PictWriter::WriteOpcode_SameRRect(PictDrawingMethod eMethod) void PictWriter::WriteOpcode_Oval(PictDrawingMethod eMethod, const Rectangle & rRect) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0050; break; case PDM_PAINT: oc=0x0051; break; @@ -822,7 +822,7 @@ void PictWriter::WriteOpcode_Oval(PictDrawingMethod eMethod, const Rectangle & r void PictWriter::WriteOpcode_SameOval(PictDrawingMethod eMethod) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0058; break; case PDM_PAINT: oc=0x0059; break; @@ -838,7 +838,7 @@ void PictWriter::WriteOpcode_SameOval(PictDrawingMethod eMethod) void PictWriter::WriteOpcode_Arc(PictDrawingMethod eMethod, const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0060; break; case PDM_PAINT: oc=0x0061; break; @@ -856,7 +856,7 @@ void PictWriter::WriteOpcode_Arc(PictDrawingMethod eMethod, const Rectangle & rR void PictWriter::WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt) { - USHORT oc; + sal_uInt16 oc; switch (eMethod) { case PDM_FRAME: oc=0x0068; break; case PDM_PAINT: oc=0x0069; break; @@ -872,7 +872,7 @@ void PictWriter::WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle void PictWriter::WriteOpcode_Poly(PictDrawingMethod eMethod, const Polygon & rPoly) { - USHORT oc; + sal_uInt16 oc; if (rPoly.GetSize()<3) return; switch (eMethod) { @@ -893,12 +893,12 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, BitmapReadAccess* pAcc = NULL; Bitmap aBitmap( rBitmap ); - ULONG nWidth, nHeight, nDstRowBytes, nx, nc, ny, nCount, nColTabSize, i; - ULONG nDstRowPos, nSrcRowBytes, nEqu3, nPos, nDstMapPos; - USHORT nBitsPerPixel, nPackType; - BYTE *pComp[4], *pPix, *pTemp; - BYTE nEquData = 0; - BYTE nFlagCounterByte, nRed, nGreen, nBlue; + sal_uLong nWidth, nHeight, nDstRowBytes, nx, nc, ny, nCount, nColTabSize, i; + sal_uLong nDstRowPos, nSrcRowBytes, nEqu3, nPos, nDstMapPos; + sal_uInt16 nBitsPerPixel, nPackType; + sal_uInt8 *pComp[4], *pPix, *pTemp; + sal_uInt8 nEquData = 0; + sal_uInt8 nFlagCounterByte, nRed, nGreen, nBlue; SetAttrForPaint(); @@ -906,7 +906,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nActBitmapPercent=30; MayCallback(); - if ( bStatus == FALSE ) + if ( bStatus == sal_False ) return; if ( ( pAcc = aBitmap.AcquireReadAccess() ) == NULL ) return; @@ -929,7 +929,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nDstRowBytes = nWidth * 4; // Opcode und BaseAddr (?) schreiben: - *pPict << (USHORT)0x009a << (sal_uInt32)0x000000ff; + *pPict << (sal_uInt16)0x009a << (sal_uInt32)0x000000ff; // Normalerweise wollen wir den Packing-Type 4 (Run length encoding // for 32-Bit Pixels) erzeugen. Wenn aber RowBytes<8 gilt, sind die Daten @@ -943,36 +943,36 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPackType = 4; // PixMap-Struktur schreiben: - *pPict << (USHORT)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist - << (USHORT)0x0000 // Y1-Position der Bitmap in der Quelle - << (USHORT)0x0000 // X1-Position der Bitmap in der Quelle - << (USHORT)nHeight // Y2-Position der Bitmap in der Quelle - << (USHORT)nWidth // X2-Position der Bitmap in der Quelle - << (USHORT)0x0000 // Version - << (USHORT)nPackType // Packing type + *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist + << (sal_uInt16)0x0000 // Y1-Position der Bitmap in der Quelle + << (sal_uInt16)0x0000 // X1-Position der Bitmap in der Quelle + << (sal_uInt16)nHeight // Y2-Position der Bitmap in der Quelle + << (sal_uInt16)nWidth // X2-Position der Bitmap in der Quelle + << (sal_uInt16)0x0000 // Version + << (sal_uInt16)nPackType // Packing type << (sal_uInt32) 0x00000000 // Packing size (?) << (sal_uInt32) 0x00480000 // H-Res << (sal_uInt32) 0x00480000 // V-Res - << (USHORT)0x0010 // Pixel type (?) - << (USHORT)0x0020 // Pixel size: 32 bit - << (USHORT)0x0004 // CmpCount: 4 Komponenten - << (USHORT)0x0008 // CmpSize: 8 Bits + << (sal_uInt16)0x0010 // Pixel type (?) + << (sal_uInt16)0x0020 // Pixel size: 32 bit + << (sal_uInt16)0x0004 // CmpCount: 4 Komponenten + << (sal_uInt16)0x0008 // CmpSize: 8 Bits << (sal_uInt32) 0x00000000 // PlaneBytes (?) << (sal_uInt32) 0x00000000 // (?) << (sal_uInt32) 0x00000000; // (?) // Source-Rectangle schreiben: - *pPict << (USHORT)0x0000 // Y1-Position auf der Bitmap - << (USHORT)0x0000 // X1-Position auf der Bitmap - << (USHORT)nHeight // Y2-Position auf der Bitmap - << (USHORT)nWidth; // X2-Position auf der Bitmap + *pPict << (sal_uInt16)0x0000 // Y1-Position auf der Bitmap + << (sal_uInt16)0x0000 // X1-Position auf der Bitmap + << (sal_uInt16)nHeight // Y2-Position auf der Bitmap + << (sal_uInt16)nWidth; // X2-Position auf der Bitmap // Destination-Rectangle schreiben: WritePoint( rPoint ); WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) ); // Transfer mode schreiben: - *pPict << (USHORT)0x0000; // (?) + *pPict << (sal_uInt16)0x0000; // (?) // Position der Map-Daten in Ziel merken: nDstMapPos=pPict->Tell(); @@ -981,10 +981,10 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, { // nicht packen for ( ny = 0; ny < nHeight; ny++ ) { - *pPict << (BYTE)0; - *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetRed(); - *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetGreen(); - *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetBlue(); + *pPict << (sal_uInt8)0; + *pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetRed(); + *pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetGreen(); + *pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetBlue(); // Prozente zaehlen, Callback, Fehler pruefen: nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus) MayCallback(); @@ -994,7 +994,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, { // Speicher fuer Zeilen-Zwischen-Datenstruktur allozieren: for ( nc = 0; nc < 4; nc++ ) - pComp[ nc ] = new BYTE[ nWidth ]; + pComp[ nc ] = new sal_uInt8[ nWidth ]; // Schleife ueber Zeilen: for ( ny = 0; ny < nHeight; ny++ ) @@ -1003,9 +1003,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, for ( nx = 0; nx < nWidth; nx++ ) { - pComp[ 1 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetRed(); - pComp[ 2 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetGreen(); - pComp[ 3 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetBlue(); + pComp[ 1 ][ nx ] = (sal_uInt8)pAcc->GetPixel( ny, nx ) .GetRed(); + pComp[ 2 ][ nx ] = (sal_uInt8)pAcc->GetPixel( ny, nx ) .GetGreen(); + pComp[ 3 ][ nx ] = (sal_uInt8)pAcc->GetPixel( ny, nx ) .GetBlue(); pComp[ 0 ][ nx ] = 0; } @@ -1014,9 +1014,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, // ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt): if ( nDstRowBytes > 250 ) - *pPict << (USHORT)0; + *pPict << (sal_uInt16)0; else - *pPict << (BYTE)0; + *pPict << (sal_uInt8)0; // Schleife ueber Componenten: for ( nc = 0; nc < 4; nc++ ) @@ -1048,7 +1048,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nCount = nEqu3 - nx; if ( nCount > 128 ) nCount=128; - nFlagCounterByte = (BYTE)(nCount-1); + nFlagCounterByte = (sal_uInt8)(nCount-1); *pPict << nFlagCounterByte; do { @@ -1071,7 +1071,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nCount++; } // nCount gleiche Bytes komprimiert schreiben: - nFlagCounterByte = (BYTE)( 1 - (long)nCount ); + nFlagCounterByte = (sal_uInt8)( 1 - (long)nCount ); *pPict << nFlagCounterByte << nEquData; nx += nCount; } @@ -1081,9 +1081,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPos = pPict->Tell(); pPict->Seek( nDstRowPos ); if ( nDstRowBytes > 250 ) - *pPict << ( (USHORT)( nPos - nDstRowPos - 2 ) ); + *pPict << ( (sal_uInt16)( nPos - nDstRowPos - 2 ) ); else - *pPict << ( (BYTE)( nPos - nDstRowPos - 1 ) ); + *pPict << ( (sal_uInt8)( nPos - nDstRowPos - 1 ) ); pPict->Seek( nPos ); // Prozente zaehlen, Callback, Fehler pruefen: @@ -1116,7 +1116,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nSrcRowBytes = ( nDstRowBytes + 3 ) & 0xfffffffc; // Opcode schreiben: - *pPict << (USHORT)0x0098; + *pPict << (sal_uInt16)0x0098; // Normalerweise wollen wir den Packing-Type 0 (default Packing) erzeugen. // Wenn aber RowBytes<8 gilt, sind die Daten grundsaetzlich ungepackt, @@ -1129,48 +1129,48 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPackType = 0; // PixMap-Struktur schreiben: - *pPict << (USHORT)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist - << (USHORT)0x0000 // Y1-Position der Bitmap in der Quelle - << (USHORT)0x0000 // X1-Position der Bitmap in der Quelle - << (USHORT)nHeight // Y2-Position der Bitmap in der Quelle - << (USHORT)nWidth // X2-Position der Bitmap in der Quelle - << (USHORT)0x0000 // Version - << (USHORT)nPackType // Packing type + *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist + << (sal_uInt16)0x0000 // Y1-Position der Bitmap in der Quelle + << (sal_uInt16)0x0000 // X1-Position der Bitmap in der Quelle + << (sal_uInt16)nHeight // Y2-Position der Bitmap in der Quelle + << (sal_uInt16)nWidth // X2-Position der Bitmap in der Quelle + << (sal_uInt16)0x0000 // Version + << (sal_uInt16)nPackType // Packing type << (sal_uInt32) 0x00000000 // Packing size (?) << (sal_uInt32) 0x00480000 // H-Res << (sal_uInt32) 0x00480000 // V-Res - << (USHORT)0x0000 // Pixel type (?) - << (USHORT)nBitsPerPixel // Pixel size - << (USHORT)0x0001 // CmpCount: 1 Komponente - << (USHORT)nBitsPerPixel // CmpSize + << (sal_uInt16)0x0000 // Pixel type (?) + << (sal_uInt16)nBitsPerPixel // Pixel size + << (sal_uInt16)0x0001 // CmpCount: 1 Komponente + << (sal_uInt16)nBitsPerPixel // CmpSize << (sal_uInt32) 0x00000000 // PlaneBytes (?) << (sal_uInt32) 0x00000000 // (?) << (sal_uInt32) 0x00000000; // (?) // Palette lesen und schreiben: nColTabSize = pAcc->GetPaletteEntryCount(); - *pPict << (sal_uInt32)0 << (USHORT)0x8000 << (USHORT)( nColTabSize - 1 ); + *pPict << (sal_uInt32)0 << (sal_uInt16)0x8000 << (sal_uInt16)( nColTabSize - 1 ); for ( i = 0; i < nColTabSize; i++ ) { - nRed = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetRed(); - nGreen = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetGreen(); - nBlue = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetBlue(); - *pPict << (UINT16)0 << nRed << nRed << nGreen << nGreen << nBlue << nBlue; + nRed = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetRed(); + nGreen = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetGreen(); + nBlue = (sal_uInt8)pAcc->GetPaletteColor( (sal_uInt16)i ).GetBlue(); + *pPict << (sal_uInt16)0 << nRed << nRed << nGreen << nGreen << nBlue << nBlue; } // Source-Rectangle schreiben: - *pPict << (USHORT)0 << (USHORT)0 << (USHORT)nHeight << (USHORT)nWidth; + *pPict << (sal_uInt16)0 << (sal_uInt16)0 << (sal_uInt16)nHeight << (sal_uInt16)nWidth; // Destination-Rectangle schreiben: WritePoint( rPoint ); WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) ); // Transfer mode schreiben: - *pPict << (USHORT)0; // (?) + *pPict << (sal_uInt16)0; // (?) // Speicher fuer eine Zeile allozieren: - pPix = new BYTE[ nSrcRowBytes ]; + pPix = new sal_uInt8[ nSrcRowBytes ]; // Position der Map-Daten in Ziel merken: nDstMapPos=pPict->Tell(); @@ -1185,19 +1185,19 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, { case 1 : for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ ) - *pTemp++ = (BYTE)0; + *pTemp++ = (sal_uInt8)0; for ( i = 0; i < nWidth; i++ ) - pPix[ ( i >> 3 ) ] |= (BYTE)( pAcc->GetPixel( ny, i ) & 1 ) << ( ( i & 7 ) ^ 7 ); + pPix[ ( i >> 3 ) ] |= (sal_uInt8)( pAcc->GetPixel( ny, i ) & 1 ) << ( ( i & 7 ) ^ 7 ); break; case 4 : for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ ) - *pTemp++ = (BYTE)0; + *pTemp++ = (sal_uInt8)0; for ( i = 0; i < nWidth; i++ ) - pPix[ ( i >> 1 ) ] |= (BYTE)( pAcc->GetPixel( ny, i ) & 15 ) << ( ( i & 1 ) << 2 ) ; + pPix[ ( i >> 1 ) ] |= (sal_uInt8)( pAcc->GetPixel( ny, i ) & 15 ) << ( ( i & 1 ) << 2 ) ; break; case 8 : for ( i = 0; i < nWidth; i++ ) - pPix[ i ] = (BYTE)pAcc->GetPixel( ny, i ); + pPix[ i ] = (sal_uInt8)pAcc->GetPixel( ny, i ); break; } @@ -1213,9 +1213,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, // ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt): if ( nDstRowBytes > 250 ) - *pPict << (USHORT)0; + *pPict << (sal_uInt16)0; else - *pPict << (BYTE)0; + *pPict << (sal_uInt8)0; // Schleife ueber Bytes der Zeile: nx=0; @@ -1244,7 +1244,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nCount = nEqu3 - nx; if ( nCount > 128 ) nCount = 128; - nFlagCounterByte = (BYTE)( nCount - 1 ); + nFlagCounterByte = (sal_uInt8)( nCount - 1 ); *pPict << nFlagCounterByte; do { @@ -1266,7 +1266,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nCount++; } // nCount gleiche Bytes komprimiert schreiben: - nFlagCounterByte = (BYTE)( 1 - (long)nCount ); + nFlagCounterByte = (sal_uInt8)( 1 - (long)nCount ); *pPict << nFlagCounterByte << nEquData; nx += nCount; } @@ -1276,9 +1276,9 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nPos = pPict->Tell(); pPict->Seek( nDstRowPos ); if ( nDstRowBytes > 250 ) - *pPict << ( (USHORT)( nPos - nDstRowPos - 2 ) ); + *pPict << ( (sal_uInt16)( nPos - nDstRowPos - 2 ) ); else - *pPict << ( (BYTE)( nPos - nDstRowPos - 1 ) ); + *pPict << ( (sal_uInt8)( nPos - nDstRowPos - 1 ) ); pPict->Seek( nPos ); } @@ -1286,7 +1286,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, nActBitmapPercent =( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus) MayCallback(); if ( pPict->GetError() ) - bStatus = FALSE; + bStatus = sal_False; } // Aufraeumen: delete[] pPix; @@ -1294,7 +1294,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, // Map-Daten muessen gerade Anzahl von Bytes sein: if ( ( ( pPict->Tell() - nDstMapPos ) & 1 ) != 0 ) - *pPict << (BYTE)0; + *pPict << (sal_uInt8)0; // Bitmaps zaehlen: nWrittenBitmaps++; @@ -1305,7 +1305,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, void PictWriter::WriteOpcode_EndOfFile() { - *pPict << (USHORT)0x00ff; + *pPict << (sal_uInt16)0x00ff; } @@ -1331,9 +1331,9 @@ void PictWriter::SetAttrForText() { WriteOpcode_RGBFgCol(aSrcFont.GetColor()); WriteOpcode_RGBBkCol(aSrcFont.GetFillColor()); - WriteOpcode_PnLinePat(TRUE); + WriteOpcode_PnLinePat(sal_True); WriteOpcode_FontName(aSrcFont); - WriteOpcode_TxSize((USHORT)(aSrcFont.GetSize().Height())); + WriteOpcode_TxSize((sal_uInt16)(aSrcFont.GetSize().Height())); WriteOpcode_TxMode(eSrcRasterOp); WriteOpcode_TxFace(aSrcFont); } @@ -1341,16 +1341,16 @@ void PictWriter::SetAttrForText() void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal_Int32 * pDXAry) { - USHORT i,nLen; + sal_uInt16 i,nLen; sal_Unicode c; - BOOL bDelta; + sal_Bool bDelta; Point aPt; if ( pDXAry == NULL ) - WriteOpcode_Text( rPoint, rString, FALSE ); + WriteOpcode_Text( rPoint, rString, sal_False ); else { - bDelta = FALSE; + bDelta = sal_False; nLen = rString.Len(); for ( i = 0; i < nLen; i++ ) { @@ -1362,7 +1362,7 @@ void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal aPt.X() += pDXAry[ i - 1 ]; WriteOpcode_Text( aPt, String( c ), bDelta ); - bDelta = TRUE; + bDelta = sal_True; } } } @@ -1430,7 +1430,7 @@ void PictWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) { - ULONG nA, nACount; + sal_uLong nA, nACount; const MetaAction* pMA; if( !bStatus) @@ -1450,7 +1450,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) WriteOpcode_PnMode(eSrcRasterOp); WriteOpcode_PnSize(1); WriteOpcode_RGBFgCol(pA->GetColor()); - WriteOpcode_PnLinePat(TRUE); + WriteOpcode_PnLinePat(sal_True); WriteOpcode_Line(pA->GetPoint(),pA->GetPoint()); } break; @@ -1648,7 +1648,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) else aSimplePoly = rPoly; - const USHORT nSize = aSimplePoly.GetSize(); + const sal_uInt16 nSize = aSimplePoly.GetSize(); Point aLast; if ( nSize ) @@ -1656,7 +1656,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) SetAttrForFrame(); aLast = aSimplePoly[0]; - for ( USHORT i = 1; i < nSize; i++ ) + for ( sal_uInt16 i = 1; i < nSize; i++ ) { WriteOpcode_Line( aLast, aSimplePoly[i] ); aLast = aSimplePoly[i]; @@ -1722,7 +1722,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) if (aLineColor!=Color( COL_TRANSPARENT )) { - USHORT nCount,i; + sal_uInt16 nCount,i; SetAttrForFrame(); nCount = aSimplePolyPoly.Count(); for ( i = 0; i < nCount; i++ ) @@ -1748,7 +1748,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) SetAttrForText(); String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() ); - WriteOpcode_Text( aPt, aStr, FALSE ); + WriteOpcode_Text( aPt, aStr, sal_False ); } break; @@ -1780,7 +1780,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) VirtualDevice aVirDev; sal_Int32* pDXAry = new sal_Int32[ aStr.Len() ]; sal_Int32 nNormSize( aVirDev.GetTextArray( aStr,pDXAry ) ); - USHORT i; + sal_uInt16 i; if (aSrcFont.GetAlign()!=ALIGN_BASELINE) { @@ -1862,8 +1862,8 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) const MetaEPSAction* pA = (const MetaEPSAction*)pMA; const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); - INT32 nCount = aGDIMetaFile.GetActionCount(); - for ( INT32 i = 0; i < nCount; i++ ) + sal_Int32 nCount = aGDIMetaFile.GetActionCount(); + for ( sal_Int32 i = 0; i < nCount; i++ ) { const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i ); if ( pMetaAct->GetType() == META_BMPSCALE_ACTION ) @@ -2117,7 +2117,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) if (aLineColor!=Color( COL_TRANSPARENT )) { SetAttrForFrame(); - for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) + for( sal_uInt16 i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) WriteOpcode_Poly( PDM_FRAME, rPolyPoly.GetObject( i ) ); } } @@ -2156,9 +2156,9 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) MayCallback(); if (pPict->GetError()) - bStatus=FALSE; + bStatus=sal_False; - if (bStatus==FALSE) + if (bStatus==sal_False) break; } } @@ -2166,7 +2166,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) void PictWriter::WriteHeader(const GDIMetaFile & rMTF) { - USHORT i; + sal_uInt16 i; Size aSize( rMTF.GetPrefSize() ); Point aPoint; Rectangle aRect( aPoint, aSize ); @@ -2175,7 +2175,7 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF) for (i=0;i<128;i++) *pPict << (sal_uInt32)0; // Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell: - *pPict << (USHORT)0; // wird spaeter durch UpdateHeader() berichtigt + *pPict << (sal_uInt16)0; // wird spaeter durch UpdateHeader() berichtigt // Das Bounding-Rectangle (y1,x1,y2,x2 !): WriteRectangle( aRect ); @@ -2184,9 +2184,9 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF) *pPict << (sal_uInt32)0x001102ff; // Extended-Version-2-Header: - *pPict << (USHORT)0x0c00 // Opcode - << (USHORT)0xfffe // Version (?) - << (USHORT)0x0000 // Reserved + *pPict << (sal_uInt16)0x0c00 // Opcode + << (sal_uInt16)0xfffe // Version (?) + << (sal_uInt16)0x0000 // Reserved << (sal_uInt32) 0x00480000 // hRes << (sal_uInt32) 0x00480000; WriteRectangle( aRect ); @@ -2201,23 +2201,23 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF) void PictWriter::UpdateHeader() { - ULONG nPos; + sal_uLong nPos; // Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell berichtigen: nPos=pPict->Tell(); pPict->Seek(512); - *pPict << (USHORT)((nPos-512)&0x0000ffff); + *pPict << (sal_uInt16)((nPos-512)&0x0000ffff); pPict->Seek(nPos); } -BOOL PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem ) +sal_Bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem ) { PictWriterAttrStackMember* pAt; MapMode aMap72( MAP_INCH ); Fraction aDPIFrac( 1, 72 ); - bStatus=TRUE; + bStatus=sal_True; nLastPercent=0; if ( pFilterConfigItem ) @@ -2245,19 +2245,19 @@ BOOL PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F pAttrStack=NULL; - bDstBkPatValid=FALSE; - bDstTxFaceValid=FALSE; - bDstTxModeValid=FALSE; - bDstPnSizeValid=FALSE; - bDstPnModeValid=FALSE; - bDstPnPatValid=FALSE; - bDstFillPatValid=FALSE; - bDstTxSizeValid=FALSE; - bDstFgColValid=FALSE; - bDstBkColValid=FALSE; - bDstPenPositionValid=FALSE; - bDstTextPositionValid=FALSE; - bDstFontNameValid=FALSE; + bDstBkPatValid=sal_False; + bDstTxFaceValid=sal_False; + bDstTxModeValid=sal_False; + bDstPnSizeValid=sal_False; + bDstPnModeValid=sal_False; + bDstPnPatValid=sal_False; + bDstFillPatValid=sal_False; + bDstTxSizeValid=sal_False; + bDstFgColValid=sal_False; + bDstBkColValid=sal_False; + bDstPenPositionValid=sal_False; + bDstTextPositionValid=sal_False; + bDstFontNameValid=sal_False; nNumberOfActions=0; nNumberOfBitmaps=0; @@ -2286,7 +2286,7 @@ BOOL PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F //================== GraphicExport - die exportierte Funktion ================ -extern "C" BOOL __LOADONCALLAPI GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, BOOL) +extern "C" sal_Bool __LOADONCALLAPI GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool) { PictWriter aPictWriter; |