Author: hdu
Date: Fri Apr 26 14:30:18 2013
New Revision: 1476225

URL: http://svn.apache.org/r1476225
Log:
fix narrowing conversions in testtool

Modified:
    openoffice/trunk/main/testtools/source/bridgetest/bridgetest.cxx
    openoffice/trunk/main/testtools/source/bridgetest/cppobj.cxx

Modified: openoffice/trunk/main/testtools/source/bridgetest/bridgetest.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/testtools/source/bridgetest/bridgetest.cxx?rev=1476225&r1=1476224&r2=1476225&view=diff
==============================================================================
--- openoffice/trunk/main/testtools/source/bridgetest/bridgetest.cxx (original)
+++ openoffice/trunk/main/testtools/source/bridgetest/bridgetest.cxx Fri Apr 26 
14:30:18 2013
@@ -639,11 +639,11 @@ static sal_Bool performTest(
         sal_Int8 _arByte[] = { 1, 2, -1 };
         sal_Int16 _arShort[] = { -0x8000, 1, 0x7FFF };
         sal_uInt16 _arUShort[] = { 0 , 1, 0xFFFF };
-        sal_Int32 _arLong[] = { 0x80000000, 1, 0x7FFFFFFF };
+        sal_Int32 _arLong[] = { -0x7FFFFFFF, 1, 0x7FFFFFFF };
         sal_uInt32 _arULong[] = { 0, 1, 0xFFFFFFFF };
         sal_Int64 _arHyper[] = {
-            SAL_CONST_INT64(0x8000000000000000), 1,
-            SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF) };
+            SAL_CONST_INT64(-0x7FFFFFFFFFFFFFFF), 1,
+            SAL_CONST_INT64(+0x7FFFFFFFFFFFFFFF) };
         sal_uInt64 _arUHyper[] = { 0, 1, SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF) 
};
         float _arFloat[] = { 1.1f, 2.2f, 3.3f };
         double _arDouble[] = { 1.11, 2.22, 3.33 };

Modified: openoffice/trunk/main/testtools/source/bridgetest/cppobj.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/testtools/source/bridgetest/cppobj.cxx?rev=1476225&r1=1476224&r2=1476225&view=diff
==============================================================================
--- openoffice/trunk/main/testtools/source/bridgetest/cppobj.cxx (original)
+++ openoffice/trunk/main/testtools/source/bridgetest/cppobj.cxx Fri Apr 26 
14:30:18 2013
@@ -486,7 +486,7 @@ Any Test_Impl::transportAny( const Any &
 
//__________________________________________________________________________________________________
 void Test_Impl::call( sal_Int32 nCallId , sal_Int32 nWaitMUSEC ) 
throw(::com::sun::star::uno::RuntimeException)
 {
-       TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 };
+       TimeValue value = { static_cast<unsigned>(nWaitMUSEC / 1000000), 
static_cast<unsigned>(nWaitMUSEC * 1000) };
        osl_waitThread( &value );
        if( m_bFirstCall )
        {
@@ -502,7 +502,7 @@ void Test_Impl::call( sal_Int32 nCallId 
 
//__________________________________________________________________________________________________
 void Test_Impl::callOneway( sal_Int32 nCallId , sal_Int32 nWaitMUSEC ) throw 
(::com::sun::star::uno::RuntimeException)
 {
-       TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 };
+       TimeValue value = { static_cast<unsigned>(nWaitMUSEC / 1000000), 
static_cast<unsigned>(nWaitMUSEC * 1000) };
        osl_waitThread( &value );
        m_bSequenceOfCallTestPassed = m_bSequenceOfCallTestPassed && (nCallId > 
m_nLastCallId);
        m_nLastCallId = nCallId;


Reply via email to