#i105745#: tools/stream.hxx: API change:
make SvMemoryStream::GetSize() private introduce new public SvMemoryStream::GetEndOfData()
This commit is contained in:
parent
ff9f90cf28
commit
b7362dfa44
6 changed files with 11 additions and 7 deletions
|
@ -1104,7 +1104,7 @@ StgTmpStrm::~StgTmpStrm()
|
|||
}
|
||||
}
|
||||
|
||||
ULONG StgTmpStrm::GetSize()
|
||||
ULONG StgTmpStrm::GetSize() const
|
||||
{
|
||||
ULONG n;
|
||||
if( pStrm )
|
||||
|
|
|
@ -167,8 +167,7 @@ public:
|
|||
~StgTmpStrm();
|
||||
BOOL Copy( StgTmpStrm& );
|
||||
void SetSize( ULONG );
|
||||
using SvMemoryStream::GetSize;
|
||||
ULONG GetSize();
|
||||
ULONG GetSize() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -471,7 +471,8 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
|
|||
|
||||
// Groesse des verbleibenden Puffers ermitteln
|
||||
if ( bLinked )
|
||||
nMax = ( (SvMemoryStream&) rStm ).GetSize() - 16;
|
||||
nMax = static_cast< SvMemoryStream& >(rStm).GetEndOfData()
|
||||
- 16;
|
||||
else
|
||||
nMax = DATA_SIZE - 16;
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ ImpSvNumMultipleReadHeader::ImpSvNumMultipleReadHeader(SvStream& rNewStream) :
|
|||
|
||||
ImpSvNumMultipleReadHeader::~ImpSvNumMultipleReadHeader()
|
||||
{
|
||||
DBG_ASSERT( pMemStream->Tell() == pMemStream->GetSize(),
|
||||
DBG_ASSERT( pMemStream->Tell() == pMemStream->GetEndOfData(),
|
||||
"Sizes nicht vollstaendig gelesen" );
|
||||
delete pMemStream;
|
||||
delete [] pBuf;
|
||||
|
|
|
@ -776,6 +776,9 @@ class TOOLS_DLLPUBLIC SvMemoryStream : public SvStream
|
|||
SvMemoryStream (const SvMemoryStream&);
|
||||
SvMemoryStream & operator= (const SvMemoryStream&);
|
||||
|
||||
friend class SvCacheStream;
|
||||
sal_Size GetSize() const { return nSize; }
|
||||
|
||||
protected:
|
||||
sal_Size nSize;
|
||||
sal_Size nResize;
|
||||
|
@ -817,7 +820,7 @@ public:
|
|||
|
||||
virtual void ResetError();
|
||||
|
||||
sal_Size GetSize() const { return nSize; }
|
||||
sal_Size GetEndOfData() const { return nEndOfData; }
|
||||
const void* GetData() { Flush(); return pBuf; }
|
||||
operator const void*() { Flush(); return pBuf; }
|
||||
virtual sal_uInt16 IsA() const;
|
||||
|
|
|
@ -192,7 +192,8 @@ BmpTransporter::BmpTransporter( const Bitmap& rBM )
|
|||
m_aSize.Height = rBM.GetSizePixel().Height();
|
||||
SvMemoryStream aStream;
|
||||
rBM.Write( aStream, FALSE, TRUE );
|
||||
m_aBM = Sequence<sal_Int8>((const sal_Int8*)aStream.GetData(), aStream.GetSize() );
|
||||
m_aBM = Sequence<sal_Int8>(static_cast<const sal_Int8*>(aStream.GetData()),
|
||||
aStream.GetEndOfData());
|
||||
}
|
||||
|
||||
BmpTransporter::~BmpTransporter()
|
||||
|
|
Loading…
Reference in a new issue