summaryrefslogtreecommitdiff
path: root/sot/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-03 12:22:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-05-03 12:22:29 +0100
commitb36612d4a34e4ab131c904a9e35ab3e2bded76f5 (patch)
tree92bfe6b4848931c78db6c3eeb0096c82c5cf724f /sot/source
parent056b9b45bf94bf5c362d8409c5919a6565d2922d (diff)
Fix sot stream bustage
We want the Tell position of the wrapper stream, not that of the underlying wrapped stream. Change-Id: I5d30192dbc3746104ca2127d9a747ef70b85a136
Diffstat (limited to 'sot/source')
-rw-r--r--sot/source/sdstor/stg.cxx14
-rw-r--r--sot/source/sdstor/storage.cxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx4
3 files changed, 10 insertions, 10 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 4f4e991ae6ec..1f8b5bd66bce 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -234,13 +234,6 @@ sal_uLong StorageStream::Seek( sal_uLong n )
return n;
}
-sal_Size StorageStream::remainingSize()
-{
- if( Validate() )
- return pEntry->GetSize() - Tell();
- return 0;
-}
-
void StorageStream::Flush()
{
// Flushing means committing, since streams are never transacted
@@ -259,6 +252,13 @@ sal_Bool StorageStream::SetSize( sal_uLong nNewSize )
return sal_False;
}
+sal_uLong StorageStream::GetSize() const
+{
+ if( Validate() )
+ return pEntry->GetSize();
+ return 0;
+}
+
sal_Bool StorageStream::Commit()
{
if( !Validate() )
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 67b270f33863..c4120bd488de 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -289,7 +289,7 @@ sal_uInt32 SotStorageStream::GetSize() const
sal_Size SotStorageStream::remainingSize()
{
if (pOwnStm)
- return pOwnStm->remainingSize();
+ return pOwnStm->GetSize() - Tell();
return SvStream::remainingSize();
}
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 2a1a00047221..fd5761a2f384 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1554,9 +1554,9 @@ sal_Bool UCBStorageStream::GetProperty( const String& rName, ::com::sun::star::u
return sal_False;
}
-sal_Size UCBStorageStream::remainingSize()
+sal_uLong UCBStorageStream::GetSize() const
{
- return pImp->GetSize() - Tell();
+ return pImp->GetSize();
}
UCBStorage::UCBStorage( SvStream& rStrm, sal_Bool bDirect )