Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

Here is a patch to avoid compile time warnings, actually most of them are unfortunatelly not in our source but in libraries like OpenSSL, could you tell me why are these libraries compiled? On most of the linux machines it should be already installed, aren't compiled shared libraries enough? And why? I actually don't understand why it's compiled, it should be mentioned only as a dependency, so who doesn't have it shoul look up on apt/rpm.

Gabor
From 1b27ced6fc523886ba748e9a4e3e67fbf6312852 Mon Sep 17 00:00:00 2001
From: Gabor Jenei <jengab@elte.hu>
Date: Thu, 1 Sep 2011 12:30:03 +0200
Subject: [PATCH] fix warnings

---
 cppcanvas/source/mtfrenderer/emfplus.cxx      |  108 ++++++++++++-------------
 cppcanvas/source/mtfrenderer/implrenderer.cxx |    8 +-
 sc/source/core/inc/parclass.hxx               |    2 +-
 sc/source/core/tool/parclass.cxx              |   12 ++--
 svtools/source/filter/wmf/enhwmf.cxx          |   15 ++--
 svtools/source/filter/wmf/winmtf.cxx          |    2 +-
 6 files changed, 72 insertions(+), 75 deletions(-)

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 327fd41..b70f90a 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -270,7 +270,7 @@ namespace cppcanvas
                 s >> header >> parts;
 
                 EMFP_DEBUG (printf ("EMF+\tregion\n"));
-                EMFP_DEBUG (printf ("EMF+\theader: 0x%08x parts: %d\n", header, parts));
+                EMFP_DEBUG (printf ("EMF+\theader: 0x%08x parts: %d\n", (unsigned int)header, 
(int)parts));
 
                 if (parts) {
                     if( parts<0 || sal_uInt32(parts)>SAL_MAX_INT32/sizeof(sal_Int32) )
@@ -280,12 +280,12 @@ namespace cppcanvas
 
                     for (int i = 0; i < parts; i ++) {
                         s >> combineMode [i];
-                        EMFP_DEBUG (printf ("EMF+\tcombine mode [%d]: 0x%08x\n", i, combineMode 
[i]));
+                        EMFP_DEBUG (printf ("EMF+\tcombine mode [%d]: 0x%08x\n", i,(unsigned 
int)combineMode [i]));
                     }
                 }
 
                 s >> initialState;
-                EMFP_DEBUG (printf ("EMF+\tinitial state: 0x%08x\n", initialState));
+                EMFP_DEBUG (printf ("EMF+\tinitial state: 0x%d\n",(int) initialState));
             }
         };
 
@@ -355,7 +355,7 @@ namespace cppcanvas
 
                 s >> header >> type;
 
-                EMFP_DEBUG (printf ("EMF+\tbrush\nEMF+\theader: 0x%08x type: %d\n", header, type));
+                EMFP_DEBUG (printf ("EMF+\tbrush\nEMF+\theader: 0x%08x type: %d\n",(unsigned int) 
header,(int) type));
 
                 switch (type) {
                 case 0:
@@ -364,7 +364,7 @@ namespace cppcanvas
 
                         s >> color;
                         solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color 
8) & 0xff, color & 0xff);
-                        EMFP_DEBUG (printf ("EMF+\tsolid color: 0x%08x\n", color));
+                        EMFP_DEBUG (printf ("EMF+\tsolid color: 0x%08x\n", (unsigned int)color));
 
                         break;
                     }
@@ -373,19 +373,19 @@ namespace cppcanvas
                     {
                         s >> additionalFlags >> wrapMode;
 
-                        EMFP_DEBUG (printf ("EMF+\tpath gradient, additional flags: 0x%02x\n", 
additionalFlags));
+                        EMFP_DEBUG (printf ("EMF+\tpath gradient, additional flags: 
0x%02x\n",(unsigned int) additionalFlags));
 
                         sal_uInt32 color;
 
                         s >> color;
                         solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color 
8) & 0xff, color & 0xff);
-                        EMFP_DEBUG (printf ("EMF+\tcenter color: 0x%08x\n", color));
+                        EMFP_DEBUG (printf ("EMF+\tcenter color: 0x%08x\n",(unsigned int) color));
 
                         s >> areaX >> areaY;
                         EMFP_DEBUG (printf ("EMF+\tcenter point: %f,%f\n", areaX, areaY));
 
                         s >> surroundColorsNumber;
-                        EMFP_DEBUG (printf ("EMF+\tsurround colors: %d\n", surroundColorsNumber));
+                        EMFP_DEBUG (printf ("EMF+\tsurround colors: %d\n",(int) 
surroundColorsNumber));
 
                         if( surroundColorsNumber<0 || 
sal_uInt32(surroundColorsNumber)>SAL_MAX_INT32/sizeof(::Color) )
                             surroundColorsNumber = SAL_MAX_INT32/sizeof(::Color);
@@ -396,14 +396,14 @@ namespace cppcanvas
                             surroundColors[i] = ::Color (0xff - (color >> 24), (color >> 16) & 
0xff, (color >> 8) & 0xff, color & 0xff);
                             if (i == 0)
                                 secondColor = surroundColors [0];
-                            EMFP_DEBUG (printf ("EMF+\tsurround color[%d]: 0x%08x\n", i, color));
+                            EMFP_DEBUG (printf ("EMF+\tsurround color[%d]: 0x%08x\n", i, (unsigned 
int)color));
                         }
 
                         if (additionalFlags & 0x01) {
                             sal_Int32 pathLength;
 
                             s >> pathLength;
-                            EMFP_DEBUG (printf ("EMF+\tpath length: %d\n", pathLength));
+                            EMFP_DEBUG (printf ("EMF+\tpath length: %d\n", (int)pathLength));
 
                             sal_uInt32 pos = s.Tell ();
                             EMFP_DEBUG (dumpWords (s, 32));
@@ -413,7 +413,7 @@ namespace cppcanvas
                             s >> pathHeader >> pathPoints >> pathFlags;
 
                             EMFP_DEBUG (printf ("EMF+\tpath (brush path gradient)\n"));
-                            EMFP_DEBUG (printf ("EMF+\theader: 0x%08x points: %d additional flags: 
0x%08x\n", pathHeader, pathPoints, pathFlags));
+                            EMFP_DEBUG (printf ("EMF+\theader: 0x%08x points: %d additional flags: 
0x%d\n", (unsigned int)pathHeader, (int)pathPoints, (int)pathFlags));
 
                             path = new EMFPPath (pathPoints);
                             path->Read (s, pathFlags, rR);
@@ -428,7 +428,7 @@ namespace cppcanvas
 
 
                         if (additionalFlags & 0x02) {
-                            EMFP_DEBUG (printf ("EMF+\tuse transformation\n", color));
+                            EMFP_DEBUG (printf ("EMF+\tuse transformation\n 
color:0x%08x\n",(unsigned int) color));
                             s >> transformation;
                             hasTransformation = true;
                             EMFP_DEBUG (printf ("EMF+\tm11: %f m12: %f\nEMF+\tm21: %f m22: 
%f\nEMF+\tdx: %f dy: %f\n",
@@ -438,7 +438,7 @@ namespace cppcanvas
                         }
                         if (additionalFlags & 0x08) {
                             s >> blendPoints;
-                            EMFP_DEBUG (printf ("EMF+\tuse blend, points: %d\n", blendPoints));
+                            EMFP_DEBUG (printf ("EMF+\tuse blend, points: %d\n", 
(int)blendPoints));
                             if( blendPoints<0 || 
sal_uInt32(blendPoints)>SAL_MAX_INT32/(2*sizeof(float)) )
                                 blendPoints = SAL_MAX_INT32/(2*sizeof(float));
                             blendPositions = new float [2*blendPoints];
@@ -455,7 +455,7 @@ namespace cppcanvas
 
                         if (additionalFlags & 0x04) {
                             s >> colorblendPoints;
-                            EMFP_DEBUG (printf ("EMF+\tuse color blend, points: %d\n", 
colorblendPoints));
+                            EMFP_DEBUG (printf ("EMF+\tuse color blend, points: %d\n", 
(int)colorblendPoints));
                             if( colorblendPoints<0 || 
sal_uInt32(colorblendPoints)>SAL_MAX_INT32/sizeof(float) )
                                 colorblendPoints = SAL_MAX_INT32/sizeof(float);
                             if( sal_uInt32(colorblendPoints)>SAL_MAX_INT32/sizeof(::Color) )
@@ -469,7 +469,7 @@ namespace cppcanvas
                             for (int i=0; i < colorblendPoints; i ++) {
                                 s >> color;
                                 colorblendColors [i] = ::Color (0xff - (color >> 24), (color >> 
16) & 0xff, (color >> 8) & 0xff, color & 0xff);
-                                EMFP_DEBUG (printf ("EMF+\tcolor[%d]: 0x%08x\n", i, color));
+                                EMFP_DEBUG (printf ("EMF+\tcolor[%d]: 0x%08x\n", i,(unsigned int) 
color));
                             }
                         }
                         } else {
@@ -482,7 +482,7 @@ namespace cppcanvas
                     {
                         s >> additionalFlags >> wrapMode;
 
-                        EMFP_DEBUG (printf ("EMF+\tlinear gradient, additional flags: 0x%02x\n", 
additionalFlags));
+                        EMFP_DEBUG (printf ("EMF+\tlinear gradient, additional flags: 0x%02x\n", 
(unsigned int)additionalFlags));
 
                         s >> areaX >> areaY >> areaWidth >> areaHeight;
 
@@ -492,18 +492,18 @@ namespace cppcanvas
 
                         s >> color;
                         solidColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color 
8) & 0xff, color & 0xff);
-                        EMFP_DEBUG (printf ("EMF+\tfirst color: 0x%08x\n", color));
+                        EMFP_DEBUG (printf ("EMF+\tfirst color: 0x%08x\n", (unsigned int)color));
 
                         s >> color;
                         secondColor = ::Color (0xff - (color >> 24), (color >> 16) & 0xff, (color 
8) & 0xff, color & 0xff);
-                        EMFP_DEBUG (printf ("EMF+\tsecond color: 0x%08x\n", color));
+                        EMFP_DEBUG (printf ("EMF+\tsecond color: 0x%08x\n", (unsigned int)color));
 
                         // repeated colors, unknown meaning, see 
http://www.aces.uiuc.edu/~jhtodd/Metafile/MetafileRecords/ObjectBrush.html
                         s >> color;
                         s >> color;
 
                         if (additionalFlags & 0x02) {
-                            EMFP_DEBUG (printf ("EMF+\tuse transformation\n", color));
+                            EMFP_DEBUG (printf ("EMF+\tuse transformation\ncolor: 0x%08x\n", 
(unsigned int)color));
                             s >> transformation;
                             hasTransformation = true;
                             EMFP_DEBUG (printf ("EMF+\tm11: %f m12: %f\nEMF+\tm21: %f m22: 
%f\nEMF+\tdx: %f dy: %f\n",
@@ -513,7 +513,7 @@ namespace cppcanvas
                         }
                         if (additionalFlags & 0x08) {
                             s >> blendPoints;
-                            EMFP_DEBUG (printf ("EMF+\tuse blend, points: %d\n", blendPoints));
+                            EMFP_DEBUG (printf ("EMF+\tuse blend, points: %d\n", 
(int)blendPoints));
                             if( blendPoints<0 || 
sal_uInt32(blendPoints)>SAL_MAX_INT32/(2*sizeof(float)) )
                                 blendPoints = SAL_MAX_INT32/(2*sizeof(float));
                             blendPositions = new float [2*blendPoints];
@@ -530,7 +530,7 @@ namespace cppcanvas
 
                         if (additionalFlags & 0x04) {
                             s >> colorblendPoints;
-                            EMFP_DEBUG (printf ("EMF+\tuse color blend, points: %d\n", 
colorblendPoints));
+                            EMFP_DEBUG (printf ("EMF+\tuse color blend, points: %d\n", 
(int)colorblendPoints));
                             if( colorblendPoints<0 || 
sal_uInt32(colorblendPoints)>SAL_MAX_INT32/sizeof(float) )
                                 colorblendPoints = SAL_MAX_INT32/sizeof(float);
                             if( sal_uInt32(colorblendPoints)>SAL_MAX_INT32/sizeof(::Color) )
@@ -544,14 +544,14 @@ namespace cppcanvas
                             for (int i=0; i < colorblendPoints; i ++) {
                                 s >> color;
                                 colorblendColors [i] = ::Color (0xff - (color >> 24), (color >> 
16) & 0xff, (color >> 8) & 0xff, color & 0xff);
-                                EMFP_DEBUG (printf ("EMF+\tcolor[%d]: 0x%08x\n", i, color));
+                                EMFP_DEBUG (printf ("EMF+\tcolor[%d]: 0x%08x\n", i, (unsigned 
int)color));
                             }
                         }
 
                         break;
                     }
                 default:
-                    EMFP_DEBUG (printf ("EMF+\tunhandled brush type: %d\n", type));
+                    EMFP_DEBUG (printf ("EMF+\tunhandled brush type: %08x\n", (unsigned int)type));
                 }
             }
         };
@@ -594,7 +594,7 @@ namespace cppcanvas
 
                 s >> header >> unknown >> penFlags >> unknown2 >> width;
 
-                EMFP_DEBUG (printf ("EMF+\tpen\nEMF+\theader: 0x%08x unknown: 0x%08x additional 
flags: 0x%08x unknown: 0x%08x width: %f\n", header, unknown, penFlags, unknown2, width));
+                EMFP_DEBUG (printf ("EMF+\tpen\nEMF+\theader: 0x%08x unknown: 0x%08x additional 
flags: 0x%08x unknown: 0x%08x width: %f\n", (unsigned int)header, (unsigned int)unknown, (unsigned 
int)penFlags,(unsigned int) unknown2, width));
 
                 if (penFlags & 1)
                     s >> transformation;
@@ -699,23 +699,23 @@ namespace cppcanvas
 
                 s >> header >> type;
 
-                EMFP_DEBUG (printf ("EMF+\timage\nEMF+\theader: 0x%08x type: 0x%08x\n", header, 
type));
+                EMFP_DEBUG (printf ("EMF+\timage\nEMF+\theader: 0x%08x type: 0x%08x\n", (unsigned 
int)header, (unsigned int)type));
 
                 if (type == 1) { // bitmap
                     s >> width >> height >> stride >> pixelFormat >> unknown;
-                    EMFP_DEBUG (printf ("EMF+\tbitmap width: %d height: %d stride: %d pixelFormat: 
0x%08x\n", width, height, stride, pixelFormat));
+                    EMFP_DEBUG (printf ("EMF+\tbitmap width: %d height: %d stride: %d pixelFormat: 
0x%d\n", (int)width, (int)height, (int)stride, (int)pixelFormat));
                     if (width == 0) { // non native formats
                         GraphicFilter filter;
 
                         filter.ImportGraphic (graphic, String (), s);
-                        EMFP_DEBUG (printf ("EMF+\tbitmap width: %d height: %d\n", 
graphic.GetBitmap ().GetSizePixel ().Width (), graphic.GetBitmap ().GetSizePixel ().Height ()));
+                        EMFP_DEBUG (printf ("EMF+\tbitmap width: %ld height: %ld\n", 
graphic.GetBitmap ().GetSizePixel ().Width (), graphic.GetBitmap ().GetSizePixel ().Height ()));
                     }
 
                 } else if (type == 2) {
                     sal_Int32 mfType, mfSize;
 
                     s >> mfType >> mfSize;
-                    EMFP_DEBUG (printf ("EMF+\tmetafile type: %d dataSize: %d\n", mfType, mfSize));
+                    EMFP_DEBUG (printf ("EMF+\tmetafile type: %d dataSize: %d\n", (int)mfType, 
(int)mfSize));
 
                     GraphicFilter filter;
                     SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), mfSize, 
STREAM_READ);
@@ -751,8 +751,8 @@ namespace cppcanvas
 
         OSL_ASSERT( ( header >> 12 ) == 0xdbc01 );
 
-                EMFP_DEBUG (printf ("EMF+\tfont\nEMF+\theader: 0x%08x version: 0x%08x size: %f 
unit: 0x%08x\n", header >> 12, header & 0x1fff, emSize, sizeUnit));
-                EMFP_DEBUG (printf ("EMF+\tflags: 0x%08x reserved: 0x%08x length: 0x%08x\n", 
fontFlags, reserved, length));
+                EMFP_DEBUG (printf ("EMF+\tfont\nEMF+\theader: 0x%08x version: 0x%08x size: %f 
unit: 0x%08x\n",(unsigned int) header >> 12, (unsigned int)header & 0x1fff, emSize, (unsigned 
int)sizeUnit));
+                EMFP_DEBUG (printf ("EMF+\tflags: 0x%08x reserved: 0x%08x length: 0x%08x\n", 
(unsigned int)fontFlags, (unsigned int)reserved, (unsigned int)length));
 
         if( length > 0 && length < 0x4000 ) {
             sal_Unicode *chars = (sal_Unicode *) alloca( sizeof( sal_Unicode ) * length );
@@ -899,7 +899,7 @@ namespace cppcanvas
                 rState.isFillColorSet = true;
                 // extract UseBrush
                 EMFPBrush* brush = (EMFPBrush*) aObjects [brushIndexOrColor];
-                EMFP_DEBUG (printf ("EMF+\tbrush fill slot: %d (type: %d)\n", brushIndexOrColor, 
brush->GetType ()));
+                EMFP_DEBUG (printf ("EMF+\tbrush fill slot: %u (type: %u)\n", (unsigned 
int)brushIndexOrColor, (unsigned int)brush->GetType ()));
 
                 // give up in case something wrong happened
                 if( !brush )
@@ -1093,7 +1093,6 @@ namespace cppcanvas
 
         void ImplRenderer::processObjectRecord(SvMemoryStream& rObjectStream, sal_uInt16 flags)
         {
-            EMFP_DEBUG (sal_uInt32 objectLen);
             sal_uInt32 index;
 
             EMFP_DEBUG (printf ("EMF+ Object slot: %hd flags: %hx\n", flags & 0xff, flags & 
0xff00));
@@ -1128,7 +1127,7 @@ namespace cppcanvas
                 rObjectStream >> header >> points >> pathFlags;
 
                 EMFP_DEBUG (printf ("EMF+\tpath\n"));
-                EMFP_DEBUG (printf ("EMF+\theader: 0x%08x points: %d additional flags: 0x%08x\n", 
header, points, pathFlags));
+                EMFP_DEBUG (printf ("EMF+\theader: 0x%08x points: %d additional flags: 0x%08x\n", 
(unsigned int)header, (int)points, (unsigned int)pathFlags));
 
                 EMFPPath *path;
                 aObjects [index] = path = new EMFPPath (points);
@@ -1182,7 +1181,7 @@ namespace cppcanvas
 
                 next = rMF.Tell() + ( size - 12 );
 
-                EMFP_DEBUG (printf ("EMF+ record size: %d type: %04hx flags: %04hx data size: 
%d\n", size, type, flags, dataSize));
+                EMFP_DEBUG (printf ("EMF+ record size: %u type: %04hx flags: %04hx data size: 
%u\n", (unsigned int)size, type, flags, (unsigned int)dataSize));
 
                 if (type == EmfPlusRecordTypeObject && ((mbMultipart && (flags & 0x7fff) == 
(mMFlags & 0x7fff)) || (flags & 0x8000))) {
                     if (!mbMultipart) {
@@ -1193,7 +1192,7 @@ namespace cppcanvas
 
                     // 1st 4 bytes are unknown
                     mMStream.Write (((const char *)rMF.GetData()) + rMF.Tell() + 4, dataSize - 4);
-                    EMFP_DEBUG (printf ("EMF+ read next object part size: %d type: %04hx flags: 
%04hx data size: %d\n", size, type, flags, dataSize));
+                    EMFP_DEBUG (printf ("EMF+ read next object part size: %u type: %04hx flags: 
%04hx data size: %u\n", (unsigned int)size, type, flags, (unsigned int)dataSize));
                 } else {
                     if (mbMultipart) {
                         EMFP_DEBUG (printf ("EMF+ multipart record flags: %04hx\n", mMFlags));
@@ -1211,7 +1210,7 @@ namespace cppcanvas
                     rMF >> header >> version >> nHDPI >> nVDPI;
 
                     EMFP_DEBUG (printf ("EMF+ Header\n"));
-                    EMFP_DEBUG (printf ("EMF+\theader: 0x%08x version: %d horizontal DPI: %d 
vertical DPI: %d dual: %d\n", header, version, nHDPI, nVDPI, flags & 1));
+                    EMFP_DEBUG (printf ("EMF+\theader: 0x%08x version: %u horizontal DPI: %d 
vertical DPI: %d dual: %d\n", (int)header, (unsigned int)version, (int)nHDPI, (int)nVDPI,(int)( 
flags & 1)));
 
                     break;
                 case EmfPlusRecordTypeEndOfFile:
@@ -1231,7 +1230,7 @@ namespace cppcanvas
 
                         rMF >> brushIndexOrColor;
 
-                        EMFP_DEBUG (printf ("EMF+ FillPath slot: %d\n", index));
+                        EMFP_DEBUG (printf ("EMF+ FillPath slot: %u\n", (unsigned int)index));
 
                         EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])->GetPolygon (*this), 
rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
                     }
@@ -1246,7 +1245,7 @@ namespace cppcanvas
 
                         rMF >> brushIndexOrColor >> rectangles;
 
-                        EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : 
"brush index", brushIndexOrColor));
+                        EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : 
"brush index", (unsigned int)brushIndexOrColor));
 
                         for (int i=0; i < rectangles; i++) {
                             if (flags & 0x4000) {
@@ -1285,16 +1284,15 @@ namespace cppcanvas
                     {
                         EMFP_DEBUG (sal_uInt8 index = flags & 0xff);
                         sal_uInt32 brushIndexOrColor;
-                        EMFP_DEBUG (sal_Int32 brushIndex);
                         sal_Int32 points;
-                        EMFP_DEBUG (sal_uInt32 color);
-                        EMFP_DEBUG (sal_uInt16 transparency = 0);
+                        //we must initialize values to avoid warnings and strange errors
+                        EMFP_DEBUG (sal_uInt32 color=0);
 
                         rMF >> brushIndexOrColor;
                         rMF >> points;
 
-                        EMFP_DEBUG (printf ("EMF+ FillPolygon in slot: %d points: %d\n", index, 
points));
-                        EMFP_DEBUG (printf ("EMF+\twith solid color (ARGB): 0x%08X\n", color));
+                        EMFP_DEBUG (printf ("EMF+ FillPolygon in slot: %d points: %d\n", index, 
(int)points));
+                        EMFP_DEBUG (printf ("EMF+\twith solid color (ARGB): 0x%08X\n", (unsigned 
int)color));
 
                         EMFPPath path (points, true);
                         path.Read (rMF, flags, *this);
@@ -1311,7 +1309,7 @@ namespace cppcanvas
 
                         rMF >> points;
 
-                        EMFP_DEBUG (printf ("EMF+ DrawLines in slot: %d points: %d\n", index, 
points));
+                        EMFP_DEBUG (printf ("EMF+ DrawLines in slot: %u points: %u\n", (unsigned 
int)index, (unsigned int)points));
 
                         EMFPPath path (points, true);
                         path.Read (rMF, flags, *this);
@@ -1353,7 +1351,7 @@ namespace cppcanvas
                         rMF >> penIndex;
 
                         EMFP_DEBUG (printf ("EMF+ DrawPath\n"));
-                        EMFP_DEBUG (printf ("EMF+\tpen: %d\n", penIndex));
+                        EMFP_DEBUG (printf ("EMF+\tpen: %u\n", (unsigned int)penIndex));
 
                         EMFPPath* path = (EMFPPath*) aObjects [flags & 0xff];
                         EMFPPen* pen = (EMFPPen*) aObjects [penIndex];
@@ -1391,7 +1389,7 @@ namespace cppcanvas
 
                         rMF >> attrIndex >> sourceUnit;
 
-                        EMFP_DEBUG (printf ("EMF+ DrawImagePoints attributes index: %d source 
unit: %d\n", attrIndex, sourceUnit));
+                        EMFP_DEBUG (printf ("EMF+ DrawImagePoints attributes index: %d source 
unit: %d\n", (int)attrIndex, (int)sourceUnit));
                         EMFP_DEBUG (printf ("EMF+\tTODO: use image attributes\n"));
 
                         if (sourceUnit == 2 && aObjects [flags & 0xff]) { // we handle only 
GraphicsUnit.Pixel now
@@ -1403,7 +1401,7 @@ namespace cppcanvas
 
                             rMF >> unknown;
 
-                            EMFP_DEBUG (printf ("EMF+ DrawImagePoints source rectangle: %f,%f 
%fx%f unknown: 0x%08x\n", sx, sy, sw, sh, unknown));
+                            EMFP_DEBUG (printf ("EMF+ DrawImagePoints source rectangle: %f,%f 
%fx%f unknown: 0x%08x\n", sx, sy, sw, sh, (unsigned int)unknown));
 
                             if (unknown == 3) { // it probably means number of points defining 
destination rectangle
                                 float x1, y1, x2, y2, x3, y3;
@@ -1457,7 +1455,7 @@ namespace cppcanvas
                 case EmfPlusRecordTypeSetRenderingOrigin:
                     rMF >> nOriginX >> nOriginY;
                     EMFP_DEBUG (printf ("EMF+ SetRenderingOrigin\n"));
-                    EMFP_DEBUG (printf ("EMF+\torigin [x,y]: %d,%d\n", nOriginX, nOriginY));
+                    EMFP_DEBUG (printf ("EMF+\torigin [x,y]: %d,%d\n", (int)nOriginX, 
(int)nOriginY));
                     break;
                 case EmfPlusRecordTypeSetTextRenderingHint:
                     EMFP_DEBUG (printf ("EMF+ SetTextRenderingHint\n"));
@@ -1555,10 +1553,10 @@ namespace cppcanvas
 
             rMF >> brushIndexOrColor >> optionFlags >> hasMatrix >> glyphsCount;
 
-            EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", 
brushIndexOrColor));
-            EMFP_DEBUG (printf ("EMF+\toption flags: 0x%08x\n", optionFlags));
-            EMFP_DEBUG (printf ("EMF+\thas matrix: %d\n", hasMatrix));
-            EMFP_DEBUG (printf ("EMF+\tglyphs: %d\n", glyphsCount));
+            EMFP_DEBUG (printf ("EMF+\t%s: 0x%08x\n", (flags & 0x8000) ? "color" : "brush index", 
(unsigned int)brushIndexOrColor));
+            EMFP_DEBUG (printf ("EMF+\toption flags: 0x%08x\n", (unsigned int)optionFlags));
+            EMFP_DEBUG (printf ("EMF+\thas matrix: %u\n", (unsigned int)hasMatrix));
+            EMFP_DEBUG (printf ("EMF+\tglyphs: %u\n", (unsigned int)glyphsCount));
 
             if( ( optionFlags & 1 ) && glyphsCount > 0 ) {
             sal_uInt16 *chars = new sal_uInt16[glyphsCount];
@@ -1567,12 +1565,12 @@ namespace cppcanvas
 
             for( sal_uInt32 i=0; i<glyphsCount; i++) {
                 rMF >> chars[i];
-                EMFP_DEBUG (printf ("EMF+\tglyph[%d]: 0x%04x\n",
-                i, chars[i]));
+                EMFP_DEBUG (printf ("EMF+\tglyph[%u]: 0x%04x\n",
+                (unsigned int)i, chars[i]));
             }
             for( sal_uInt32 i=0; i<glyphsCount; i++) {
                 rMF >> charsPosX[i] >> charsPosY[i];
-                EMFP_DEBUG (printf ("EMF+\tglyphPosition[%d]: %f, %f\n", i, charsPosX[i], 
charsPosY[i]));
+                EMFP_DEBUG (printf ("EMF+\tglyphPosition[%u]: %f, %f\n", (unsigned int)i, 
charsPosX[i], charsPosY[i]));
             }
 
             XForm transform;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 46f3e40..065aae4 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1848,19 +1848,19 @@ namespace cppcanvas
                                     EMFP_DEBUG (printf ("EMF+ records limit: %d\n", limit));
                                 }
                             }
-                            EMFP_DEBUG (printf ("EMF+ passed to canvas mtf renderer, size: %d\n", 
pAct->GetDataSize ()));
+                            EMFP_DEBUG (printf ("EMF+ passed to canvas mtf renderer, size: %u\n", 
(unsigned int)pAct->GetDataSize ()));
                             if (count < limit)
                             processEMFPlus( pAct, rFactoryParms, getState( rStates ), rCanvas );
                             count ++;
                         } else if( pAct->GetComment().Equals( "EMF_PLUS_HEADER_INFO" ) ) {
-                            EMFP_DEBUG (printf ("EMF+ passed to canvas mtf renderer - header info, 
size: %d\n", pAct->GetDataSize ()));
+                            EMFP_DEBUG (printf ("EMF+ passed to canvas mtf renderer - header info, 
size: %u\n", (unsigned int)pAct->GetDataSize ()));
 
                             SvMemoryStream rMF ((void*) pAct->GetData (), pAct->GetDataSize (), 
STREAM_READ);
 
                             rMF >> nFrameLeft >> nFrameTop >> nFrameRight >> nFrameBottom;
-                            EMFP_DEBUG (printf ("EMF+ picture frame: %d,%d - %d,%d\n", nFrameLeft, 
nFrameTop, nFrameRight, nFrameBottom));
+                            EMFP_DEBUG (printf ("EMF+ picture frame: %d,%d - %d,%d\n", 
(int)nFrameLeft, (int)nFrameTop, (int)nFrameRight, (int)nFrameBottom));
                             rMF >> nPixX >> nPixY >> nMmX >> nMmY;
-                            EMFP_DEBUG (printf ("EMF+ ref device pixel size: %dx%d mm size: 
%dx%d\n", nPixX, nPixY, nMmX, nMmY));
+                            EMFP_DEBUG (printf ("EMF+ ref device pixel size: %dx%d mm size: 
%dx%d\n", (int)nPixX, (int)nPixY, (int)nMmX, (int)nMmY));
 
                             rMF >> aBaseTransform;
                             //aWorldTransform.Set (aBaseTransform);
diff --git a/sc/source/core/inc/parclass.hxx b/sc/source/core/inc/parclass.hxx
index 2bd309f..6f2f29e 100644
--- a/sc/source/core/inc/parclass.hxx
+++ b/sc/source/core/inc/parclass.hxx
@@ -104,7 +104,7 @@ private:
 
     struct CommonData
     {
-        const static size_t nMaxParams = 7;
+        const static sal_Int32 nMaxParams = 7;
 
         Type        nParam[nMaxParams];
         bool        bRepeatLast;
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index 8162255..7920646 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -237,7 +237,7 @@ void ScParameterClassification::Init()
             if ( pRun->aData.bRepeatLast )
             {
                 Type eLast = Unknown;
-                for ( size_t j=0; j < CommonData::nMaxParams; ++j )
+                for ( sal_Int32 j=0; j < CommonData::nMaxParams; ++j )
                 {
                     if ( pRun->aData.nParam[j] )
                     {
@@ -250,7 +250,7 @@ void ScParameterClassification::Init()
             }
             else
             {
-                for ( size_t j=0; j < CommonData::nMaxParams; ++j )
+                for ( sal_Int32 j=0; j < CommonData::nMaxParams; ++j )
                 {
                     if ( !pRun->aData.nParam[j] )
                     {
@@ -263,7 +263,7 @@ void ScParameterClassification::Init()
                         pRun->aData.nParam[CommonData::nMaxParams-1] != Bounds)
                     pRun->nMinParams = CommonData::nMaxParams;
             }
-            for ( size_t j=0; j < CommonData::nMaxParams; ++j )
+            for ( sal_Int32 j=0; j < CommonData::nMaxParams; ++j )
             {
                 if ( pRun->aData.nParam[j] == ForceArray || pRun->aData.nParam[j] == 
ReferenceOrForceArray )
                 {
@@ -426,20 +426,20 @@ void ScParameterClassification::MergeArgumentsFromFunctionResource()
             pRun->aData.bRepeatLast = true;
         }
         pRun->nMinParams = static_cast< sal_uInt8 >( nArgs );
-        for ( size_t j=0; j < nArgs; ++j )
+        for ( sal_Int32 j=0; j < nArgs; ++j )
         {
             pRun->aData.nParam[j] = Value;
         }
         if ( pRun->aData.bRepeatLast )
         {
-            for ( size_t j = nArgs; j < CommonData::nMaxParams; ++j )
+            for ( sal_Int32 j = nArgs; j < CommonData::nMaxParams; ++j )
             {
                 pRun->aData.nParam[j] = Value;
             }
         }
         else
         {
-            for ( size_t j = nArgs; j < CommonData::nMaxParams; ++j )
+            for ( sal_Int32 j = nArgs; j < CommonData::nMaxParams; ++j )
             {
                 pRun->aData.nParam[j] = Bounds;
             }
diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index 8f9074d..18ae10c 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -13,7 +13,7 @@
  * it under the terms of the GNU Lesser General Public License version 3
  * only, as published by the Free Software Foundation.
  *
- * OpenOffice.org is distributed in the hope that it will be useful,
+ * OpenOffsaice.org is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Lesser General Public License version 3 for more details
@@ -319,13 +319,12 @@ void EnhWMFReader::ReadGDIComment()
         EMFP_DEBUG(printf ("\t\tBEGINGROUP\n"));
 
         *pWMF >> x >> y >> r >> b;
-        EMFP_DEBUG(printf ("\t\tbounding rectangle: %d,%d x %d,%d\n", x, y, r, b));
+        EMFP_DEBUG(printf ("\t\tbounding rectangle: %d,%d x %d,%d\n", (int)x,(int)y,(int)r,(int) 
b));
 
         sal_uInt32 l;
 
         *pWMF >> l;
-        EMFP_DEBUG(printf ("\t\tdescription length: %d\n", l));
-
+        EMFP_DEBUG(printf ("\t\tdescription length: %d\n", (int)l));
         break;
     }
     case 3: {
@@ -387,21 +386,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 
         bFlag = sal_False;
 
-        EMFP_DEBUG(printf ("0x%04x-0x%04x record type: %d size: %d\n", nNextPos - nRecSize, 
nNextPos, nRecType, nRecSize));
+        EMFP_DEBUG(printf ("0x%04x-0x%04x record type: %d size: %d\n",(unsigned int) (nNextPos - 
nRecSize),(unsigned int) nNextPos, (int)nRecType,(int) nRecSize));
 
         if( bEnableEMFPlus && nRecType == EMR_GDICOMMENT ) {
             sal_uInt32 length;
 
             *pWMF >> length;
 
-            EMFP_DEBUG(printf ("\tGDI comment\n\t\tlength: %d\n", length));
+            EMFP_DEBUG(printf ("\tGDI comment\n\t\tlength: %d\n", (int)length));
 
             if( length >= 4 ) {
                 sal_uInt32 id;
 
                 *pWMF >> id;
 
-                EMFP_DEBUG(printf ("\t\tbegin %c%c%c%c id: 0x%x\n", (char)(id & 0xff), (char)((id 
& 0xff00) >> 8), (char)((id & 0xff0000) >> 16), (char)((id & 0xff000000) >> 24), id));
+                EMFP_DEBUG(printf ("\t\tbegin %c%c%c%c id: 0x%x\n", (char)(id & 0xff), (char)((id 
& 0xff00) >> 8), (char)((id & 0xff0000) >> 16), (char)((id & 0xff000000) >> 24), (unsigned int)id));
 
                 // EMF+ comment (fixme: BE?)
                 if( id == 0x2B464D45 && nRecSize >= 12 )
@@ -410,7 +409,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
                 else if( id == 0x43494447 && nRecSize >= 12 ) {
                     EMFP_DEBUG(ReadGDIComment());
                 } else {
-                    EMFP_DEBUG(printf ("\t\tunknown id: 0x%x\n", id));
+                    EMFP_DEBUG(printf ("\t\tunknown id: 0x%x\n",(unsigned int) id));
         }
             }
         } else if( !bEMFPlus || bHaveDC || nRecType == EMR_EOF )
diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx
index 4c6e739..e4ba6cc 100644
--- a/svtools/source/filter/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -2259,7 +2259,7 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
 
 void WinMtfOutput::PassEMFPlus( void* pBuffer, sal_uInt32 nLength )
 {
-    EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS comment length %d\n", nLength));
+    EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS comment length %04x\n",(unsigned int) nLength));
     mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS", 0, static_cast<const 
sal_uInt8*>(pBuffer), nLength ) );
 }
 
-- 
1.7.2.5


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.