[Libreoffice-commits] .: 3 commits - cppcanvas/source sal/qa sc/source svtools/source unusedcode.easy
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Sep 1 08:42:38 PDT 2011
cppcanvas/source/mtfrenderer/emfplus.cxx | 82 +++++++++++++-------------
cppcanvas/source/mtfrenderer/implrenderer.cxx | 8 +-
sal/qa/osl/security/osl_Security.cxx | 2
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
unusedcode.easy | 8 +-
8 files changed, 67 insertions(+), 64 deletions(-)
New commits:
commit 9db9812dc131641d8898b256e20a3ca7249f383c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 1 16:41:22 2011 +0100
resync list
diff --git a/unusedcode.easy b/unusedcode.easy
index 7e7f321..539bccf 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -777,6 +777,7 @@ SfxChildWindowContext::GetAlignment() const
SfxContentHelper::IsDocument(String const&)
SfxControllerItem::GetCoreMetric() const
SfxControllerItem::UpdateSlot()
+SfxDateTimeItem::SfxDateTimeItem(unsigned short)
SfxDockingWrapper::GetChildWindowId()
SfxFilterContainer::GetFilter4ClipBoardId(unsigned int, unsigned long, unsigned long) const
SfxFilterContainer::GetFilter4Mime(String const&, unsigned long, unsigned long) const
@@ -1454,6 +1455,8 @@ WP3ResourceFork::getResourcesByType(unsigned int) const
WP3StylesListener::insertCell()
WP3StylesListener::insertRow()
WP3SubDocument::WP3SubDocument(unsigned char*, unsigned int)
+WP42DefineColumnsGroup::WP42DefineColumnsGroup(WPXInputStream*, WPXEncryption*, unsigned char)
+WP42ExtendedCharacterGroup::WP42ExtendedCharacterGroup(WPXInputStream*, WPXEncryption*, unsigned char)
WP42SubDocument::WP42SubDocument(unsigned char*, unsigned int)
WP6SubDocument::WP6SubDocument(WPXInputStream*, WPXEncryption*, unsigned int)
WPGTextDataHandler::endSubDocument()
@@ -2058,10 +2061,12 @@ binfilter::SwDestroyList::Remove(unsigned short, unsigned short)
binfilter::SwInsHardBlankSoftHyph::~SwInsHardBlankSoftHyph()
binfilter::SwLayAction::SwLayAction(binfilter::SwRootFrm*, binfilter::SwViewImp*)
binfilter::SwLayAction::~SwLayAction()
+binfilter::SwLayouter::SwLayouter()
binfilter::SwOLELRUCache::Remove(binfilter::SwOLEObj&)
binfilter::SwOutlineNodes::Insert(binfilter::SwNode* const&, unsigned short&)
binfilter::SwOutlineNodes::Insert(binfilter::SwNode* const*, unsigned short)
binfilter::SwOutlineNodes::Insert(binfilter::SwOutlineNodes const*, unsigned short, unsigned short)
+binfilter::SwRects::Insert(binfilter::SwRects const*, unsigned short, unsigned short, unsigned short)
binfilter::SwRects::Replace(binfilter::SwRect const&, unsigned short)
binfilter::SwRects::Replace(binfilter::SwRect const*, unsigned short, unsigned short)
binfilter::SwRects::_ForEach(unsigned short, unsigned short, unsigned char (*)(binfilter::SwRect const&, void*), void*)
@@ -2650,12 +2655,11 @@ layoutimpl::WidgetFactory::sfx2CreateWindow(VCLXWindow**, Window*, rtl::OUString
layoutimpl::getParent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>)
layoutimpl::prophlp::getProperty(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&)
libvisio::VSDXCharacterList::getElement(unsigned int)
-libvisio::VSDXGeometryList::getElement(unsigned int)
libvisio::VSDXOutputElementList::addEllipse(WPXPropertyList const&)
libvisio::VSDXOutputElementList::addEndLayer()
libvisio::VSDXOutputElementList::addStartLayer(WPXPropertyList const&)
libvisio::VSDXOutputElementList::clear()
-libvisio::VSDXStyles::getTextStyle(unsigned int) const
+libvisio::VSDXPage::VSDXPage(double, double, unsigned int, unsigned int, libvisio::VSDXOutputElementList const&)
libvisio::VisioDocument::generateSVG(WPXInputStream*, WPXString&)
libwpg::WPGDashArray::at(unsigned int) const
libwpg::WPGraphics::generateSVG(unsigned char const*, unsigned long, WPXString&, libwpg::WPGFileFormat)
commit cdc4b3803490dd275547efb38dc1fe7bfca7c0ec
Author: Gabor Jenei <jengab at elte.hu>
Date: Thu Sep 1 16:18:52 2011 +0100
fix warnings
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 7639468..b8e0a5c 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);
@@ -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;
@@ -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;
@@ -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 )
@@ -1127,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);
@@ -1181,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) {
@@ -1192,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));
@@ -1210,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:
@@ -1230,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);
}
@@ -1245,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) {
@@ -1307,7 +1307,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);
@@ -1349,7 +1349,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];
@@ -1387,7 +1387,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
@@ -1399,7 +1399,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;
@@ -1453,7 +1453,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"));
@@ -1551,10 +1551,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];
@@ -1563,12 +1563,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 9e2eaea..d176be6 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 ) );
}
commit f2b9160f099805e50607e71e93d8344bfe073b48
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 1 15:35:59 2011 +0100
humour me, and sync this with osl/w32/security.c
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index ea59027..afd441b 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -523,7 +523,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
psia=GetSidIdentifierAuthority(pSid);
/* obtain sidsubauthority count */
- dwSubAuthorities=*GetSidSubAuthorityCount(pSid)<=5?*GetSidSubAuthorityCount(pSid):5;
+ dwSubAuthorities=min(*GetSidSubAuthorityCount(pSid), 5);
/* buffer length: S-SID_REVISION- + identifierauthority- + subauthorities- + NULL */
Ident=(sal_Char * )malloc(88*sizeof(sal_Char));
More information about the Libreoffice-commits
mailing list