diff --git a/basebmp/source/intconversion.hxx b/basebmp/source/intconversion.hxx index d18a88cfe912..407948e80c28 100644 --- a/basebmp/source/intconversion.hxx +++ b/basebmp/source/intconversion.hxx @@ -57,11 +57,18 @@ namespace basebmp } }; + //Current c++0x draft (apparently) has std::identity, but not operator() + template struct SGI_identity : public std::unary_function + { + T& operator()(T& x) const { return x; } + const T& operator()(const T& x) const { return x; } + }; + /// Get converter from given data type to sal_uInt32 template< typename DataType > struct uInt32Converter { - typedef std::identity to; - typedef std::identity from; + typedef SGI_identity to; + typedef SGI_identity from; }; template< unsigned int RedIndex, unsigned int GreenIndex, diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index b307f955cc2a..c44285220dd2 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -918,7 +918,13 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType, // draw upper half in off state const_cast(aValue).setTristateVal( BUTTONVALUE_OFF ); XLIB_Region aRegion = XCreateRegion(); - XRectangle aXRect = { aCtrlRect.Left(), aCtrlRect.Top(), aCtrlRect.GetWidth(), aCtrlRect.GetHeight() }; + XRectangle aXRect = + { + static_cast(aCtrlRect.Left()), + static_cast(aCtrlRect.Top()), + static_cast(aCtrlRect.GetWidth()), + static_cast(aCtrlRect.GetHeight()) + }; const unsigned short nH = aXRect.height/2; aXRect.height -= nH; XUnionRectWithRegion( &aXRect, aRegion, aRegion );