diff -ur ooo_SRC680_m156_src.orig/xmloff/inc/xmluconv.hxx ooo_SRC680_m156_src/xmloff/inc/xmluconv.hxx
--- ooo_SRC680_m156_src.orig/xmloff/inc/xmluconv.hxx	2006-02-15 18:51:20.000000000 +0100
+++ ooo_SRC680_m156_src/xmloff/inc/xmluconv.hxx	2006-02-15 18:51:29.000000000 +0100
@@ -186,8 +186,8 @@
 	/** convert string to measure using optional min and max values*/
 	sal_Bool convertMeasure( sal_Int32& rValue,
 						 const ::rtl::OUString& rString,
-						 sal_Int32 nMin = LONG_MIN,
-						 sal_Int32 nMax = LONG_MAX ) const;
+						 sal_Int32 nMin = SAL_MIN_INT32,
+						 sal_Int32 nMax = SAL_MAX_INT32) const;
 
 	/** convert measure to string */
 	void convertMeasure( ::rtl::OUStringBuffer& rBuffer,
@@ -203,8 +203,8 @@
 	static sal_Bool convertMeasure( sal_Int32& rVal,
 								const ::rtl::OUString& rString,
 								MapUnit eDstUnit,
-								sal_Int32 nMin = LONG_MIN,
-								sal_Int32 nMax = LONG_MAX );
+								sal_Int32 nMin = SAL_MIN_INT32,
+								sal_Int32 nMax = SAL_MAX_INT32);
 
 	/** convert measure in given unit to string with given unit */
 	static void convertMeasure( ::rtl::OUStringBuffer& rBuffer,
@@ -282,8 +282,8 @@
 	/** convert string to number with optional min and max values */
 	static sal_Bool convertNumber( sal_Int32& rValue,
 							   const ::rtl::OUString& rString,
-							   sal_Int32 nMin = LONG_MIN,
-							   sal_Int32 nMax = LONG_MAX );
+							   sal_Int32 nMin = SAL_MIN_INT32,
+							   sal_Int32 nMax = SAL_MAX_INT32);
 
 	/** convert double number to string (using ::rtl::math) and DO
 		convert to export MapUnit */
diff -ur ooo_SRC680_m156_src.orig/xmloff/source/core/xmlehelp.cxx ooo_SRC680_m156_src/xmloff/source/core/xmlehelp.cxx
--- ooo_SRC680_m156_src.orig/xmloff/source/core/xmlehelp.cxx	2006-02-15 18:51:20.000000000 +0100
+++ ooo_SRC680_m156_src/xmloff/source/core/xmlehelp.cxx	2006-02-15 18:51:29.000000000 +0100
@@ -182,7 +182,7 @@
 
 	long nLongVal;
 	BOOL bOutLongVal = TRUE;
-	if( nValue > LONG_MAX / nMul )
+	if( nValue > SAL_MAX_INT32 / nMul )
 	{
 		// A big int is required for calculation
 		BigInt nBigVal( nValue );
diff -ur ooo_SRC680_m156_src.orig/xmloff/source/core/xmluconv.cxx ooo_SRC680_m156_src/xmloff/source/core/xmluconv.cxx
--- ooo_SRC680_m156_src.orig/xmloff/source/core/xmluconv.cxx	2006-02-15 18:51:20.000000000 +0100
+++ ooo_SRC680_m156_src/xmloff/source/core/xmluconv.cxx	2006-02-15 18:51:29.000000000 +0100
@@ -946,7 +946,7 @@
             bDone = sal_True;
         else if ( sal_Unicode('0') <= c && sal_Unicode('9') >= c )
         {
-            if ( nTemp >= LONG_MAX / 10 )
+            if ( nTemp >= SAL_MAX_INT32 / 10 )
                 bSuccess = sal_False;
             else
             {
@@ -2192,7 +2192,7 @@
         {
             if ( bFractional )
             {
-                if ( nSecondsFraction >= LONG_MAX / 10 )
+                if ( nSecondsFraction >= SAL_MAX_INT32 / 10 )
                     bSuccess = false;
                 else
                 {
@@ -2202,7 +2202,7 @@
             }
             else
             {
-                if ( nTemp >= LONG_MAX / 10 )
+                if ( nTemp >= SAL_MAX_INT32 / 10 )
                     bSuccess = false;
                 else
                 {
diff -ur ooo_SRC680_m156_src.orig/xmloff/source/style/xmlnumi.cxx ooo_SRC680_m156_src/xmloff/source/style/xmlnumi.cxx
--- ooo_SRC680_m156_src.orig/xmloff/source/style/xmlnumi.cxx	2006-02-15 18:51:20.000000000 +0100
+++ ooo_SRC680_m156_src/xmloff/source/style/xmlnumi.cxx	2006-02-15 18:51:29.000000000 +0100
@@ -757,11 +757,11 @@
 			sVerticalRel = rValue;
 			break;
 		case XML_TOK_STYLE_ATTRIBUTES_ATTR_WIDTH:
-			if( rUnitConv.convertMeasure( nVal, rValue, 0, LONG_MAX ) )
+			if( rUnitConv.convertMeasure( nVal, rValue, 0, SAL_MAX_INT32) )
 				rListLevel.SetImageWidth( nVal );
 			break;
 		case XML_TOK_STYLE_ATTRIBUTES_ATTR_HEIGHT:
-			if( rUnitConv.convertMeasure( nVal, rValue, 0, LONG_MAX ) )
+			if( rUnitConv.convertMeasure( nVal, rValue, 0, SAL_MAX_INT32) )
 				rListLevel.SetImageHeight( nVal );
 			break;
 		case XML_TOK_STYLE_ATTRIBUTES_ATTR_COLOR:
