summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-10-27 22:32:55 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-10-28 14:08:33 +0100
commit8e369625a442324d5a639fefc2481d421cd9b706 (patch)
treedc21792a54b67458ad02372da5ff7e8f8796d507 /tools
parent90cdd9eea8be5ed44d17f34b2276e5f3b7542835 (diff)
Avoid intermediate cast to sal_uIntPtr
Change-Id: Ia7b5f519e381318f1d1cd6d0f982d22e8bbdffa7
Diffstat (limited to 'tools')
-rw-r--r--tools/source/datetime/datetime.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/source/datetime/datetime.cxx b/tools/source/datetime/datetime.cxx
index 8399415cd802..b56d20c6e85e 100644
--- a/tools/source/datetime/datetime.cxx
+++ b/tools/source/datetime/datetime.cxx
@@ -265,10 +265,12 @@ DateTime DateTime::CreateFromWin32FileDateTime( const sal_uInt32 & rLower, const
Date _aDate(
(sal_uInt16)( nDays + 1 ), nMonths,
sal::static_int_cast< sal_uInt16 >(nYears + 1601) );
- tools::Time _aTime( sal_uIntPtr( ( aTime / ( a100nPerSecond * 60 * 60 ) ) % sal_Int64( 24 ) ),
- sal_uIntPtr( ( aTime / ( a100nPerSecond * 60 ) ) % sal_Int64( 60 ) ),
- sal_uIntPtr( ( aTime / ( a100nPerSecond ) ) % sal_Int64( 60 ) ),
- (aTime % a100nPerSecond) * 100 );
+ tools::Time _aTime(
+ static_cast<sal_uInt32>( ( aTime / ( a100nPerSecond * 60 * 60 ) ) % sal_Int64( 24 ) ),
+ static_cast<sal_uInt32>( ( aTime / ( a100nPerSecond * 60 ) ) % sal_Int64( 60 ) ),
+ static_cast<sal_uInt32>( ( aTime / ( a100nPerSecond ) ) % sal_Int64( 60 ) ),
+ static_cast<sal_uInt64>(aTime % a100nPerSecond) * 100
+ );
return DateTime( _aDate, _aTime );
}