From 8ee6651e13e1bab54ef8aead77ed338cb565db23 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Thu, 17 Jun 2004 12:52:31 +0000 Subject: INTEGRATION: CWS ooo64bit01 (1.3.140); FILE MERGED 2004/03/31 16:48:57 fa 1.3.140.2: Back out of changes since 2004-03-24, focus on smaller, more integratable changes 2004/03/29 00:30:09 fa 1.3.140.1: More 64-bit changes. 'rsc' still broken, but not as much as before. --- unotools/source/streaming/streamhelper.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'unotools/source/streaming') diff --git a/unotools/source/streaming/streamhelper.cxx b/unotools/source/streaming/streamhelper.cxx index 140c46f6806c..5170d5392fe0 100644 --- a/unotools/source/streaming/streamhelper.cxx +++ b/unotools/source/streaming/streamhelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: streamhelper.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: hr $ $Date: 2001-09-27 11:17:08 $ + * last change: $Author: rt $ $Date: 2004-06-17 13:52:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,9 +91,10 @@ sal_Int32 SAL_CALL OInputStreamHelper::readBytes(staruno::Sequence< sal_Int8 >& ::osl::MutexGuard aGuard( m_aMutex ); aData.realloc(nBytesToRead); - sal_uInt32 nRead; + sal_Size nRead; ErrCode nError = m_xLockBytes->ReadAt(m_nActPos, (void*)aData.getArray(), nBytesToRead, &nRead); - m_nActPos += nRead; + // FIXME nRead could be truncated on 64-bit arches + m_nActPos += (sal_uInt32)nRead; if (nError != ERRCODE_NONE) throw stario::IOException(::rtl::OUString(), static_cast(this)); @@ -193,9 +194,10 @@ void SAL_CALL OOutputStreamHelper::writeBytes(const staruno::Sequence< sal_Int8 if (!m_xLockBytes.Is()) throw stario::NotConnectedException(::rtl::OUString(), static_cast(this)); - ULONG nWritten; + sal_Size nWritten; ErrCode nError = m_xLockBytes->WriteAt( m_nActPos, aData.getConstArray(), aData.getLength(), &nWritten ); - m_nActPos += nWritten; + // FIXME nWritten could be truncated on 64-bit arches + m_nActPos += (sal_uInt32)nWritten; if (nError != ERRCODE_NONE || nWritten != aData.getLength()) -- cgit v1.2.3