summaryrefslogtreecommitdiff
path: root/ucb/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-09-08 15:10:12 +0000
committerOliver Bolte <obo@openoffice.org>2004-09-08 15:10:12 +0000
commit9d9bf28e8c8ebd90dc8474b21cff0b9cf9a17593 (patch)
tree46f678ff11181e7b8f655d552e45ff23f1509928 /ucb/source
parent3ee1595cf16900d3f2fbef7efc652bfbc39ddcd5 (diff)
INTEGRATION: CWS getfilesize1 (1.6.120); FILE MERGED
2004/08/24 13:21:31 cmc 1.6.120.1: #i33340# use osl_getFileSize instead of seeking to end and back to get length
Diffstat (limited to 'ucb/source')
-rw-r--r--ucb/source/ucp/file/filinpstr.cxx19
1 files changed, 2 insertions, 17 deletions
diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx
index c0b8aa48b952..40e3b9093cb6 100644
--- a/ucb/source/ucp/file/filinpstr.cxx
+++ b/ucb/source/ucp/file/filinpstr.cxx
@@ -259,23 +259,8 @@ XInputStream_impl::getLength(
throw( io::IOException,
uno::RuntimeException )
{
- osl::FileBase::RC err;
- sal_uInt64 uCurrentPos, uEndPos;
-
- err = m_aFile.getPos( uCurrentPos );
- if( err != osl::FileBase::E_None )
- throw io::IOException();
-
- err = m_aFile.setPos( Pos_End, 0 );
- if( err != osl::FileBase::E_None )
- throw io::IOException();
-
- err = m_aFile.getPos( uEndPos );
- if( err != osl::FileBase::E_None )
- throw io::IOException();
-
- err = m_aFile.setPos( Pos_Absolut, uCurrentPos );
- if( err != osl::FileBase::E_None )
+ sal_uInt64 uEndPos;
+ if ( m_aFile.getSize(uEndPos) != osl::FileBase::E_None )
throw io::IOException();
else
return sal_Int64( uEndPos );