summaryrefslogtreecommitdiff
path: root/unotools/source/streaming
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 13:09:03 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 13:09:03 +0000
commitc9d92801cdafc11a1c6c649dd4353dbc7c315f99 (patch)
tree3ce52e42640bd793d13182cc580fb0fa0a18db9f /unotools/source/streaming
parent3b4b87532b946e23997e6632b72fc381b1082db6 (diff)
INTEGRATION: CWS warnings01 (1.5.16); FILE MERGED
2005/10/27 10:51:17 pl 1.5.16.2: #i55991# removed warnings for solaris platform 2005/10/21 09:49:00 dbo 1.5.16.1: #i53898# warning free code
Diffstat (limited to 'unotools/source/streaming')
-rw-r--r--unotools/source/streaming/streamhelper.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/unotools/source/streaming/streamhelper.cxx b/unotools/source/streaming/streamhelper.cxx
index 95059b4c07cb..b9009eb137f6 100644
--- a/unotools/source/streaming/streamhelper.cxx
+++ b/unotools/source/streaming/streamhelper.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: streamhelper.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 09:49:44 $
+ * last change: $Author: hr $ $Date: 2006-06-19 14:09:03 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -83,7 +83,9 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(staruno::Sequence< sal_Int8 >&
void SAL_CALL OInputStreamHelper::seek( sal_Int64 location ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- m_nActPos = location;
+ // cast is truncating, but position would be truncated as soon as
+ // put into SvLockBytes anyway
+ m_nActPos = sal::static_int_cast<sal_uInt32>(location);
}
sal_Int64 SAL_CALL OInputStreamHelper::getPosition( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
@@ -174,7 +176,7 @@ void SAL_CALL OOutputStreamHelper::writeBytes(const staruno::Sequence< sal_Int8
m_nActPos += (sal_uInt32)nWritten;
if (nError != ERRCODE_NONE ||
- nWritten != aData.getLength())
+ sal::static_int_cast<sal_Int32>(nWritten) != aData.getLength())
{
throw stario::IOException(::rtl::OUString(),static_cast<staruno::XWeak*>(this));
}