diff options
author | Michael Stahl <mst@openoffice.org> | 2009-11-02 19:08:00 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2009-11-02 19:08:00 +0100 |
commit | effbb4ce63a590f21f1ccccab4a1c0640c7be5a0 (patch) | |
tree | 4a5c5bff441b2d5a2e1d1952e662d46a25fa0f59 | |
parent | 0ce66983d67f1dc8a4bf4a793821affbf5262dda (diff) |
#i105745#: tools/stream.hxx: API change:
make SvMemoryStream::GetSize() private
introduce new public SvMemoryStream::GetEndOfData()
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 8 |
4 files changed, 15 insertions, 5 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 4bf2a95cc4..0e99e05705 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -801,7 +801,9 @@ IMPL_LINK( FileDialogHelper_Impl, TimeOutHdl_Impl, Timer*, EMPTYARG ) aData << aBmp; - Sequence < sal_Int8 > aBuffer( (sal_Int8*) aData.GetData(), aData.GetSize() ); + const Sequence < sal_Int8 > aBuffer( + static_cast< const sal_Int8* >(aData.GetData()), + aData.GetEndOfData() ); aAny <<= aBuffer; } diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 1d3b94ebe9..52a4967a46 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1820,7 +1820,9 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); rValue <<= aSeq; } break; diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 96c2caec15..977a11442e 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -315,7 +315,9 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx } SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); rValue <<= aSeq; } } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 8e4cd15b1c..9f0c3b515f 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -680,7 +680,9 @@ uno::Any SvxShape::GetBitmap( sal_Bool bMetaFile /* = sal_False */ ) const throw { SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); aAny.setValue( &aSeq, ::getCppuType((const uno::Sequence< sal_Int8 >*)0) ); } else @@ -3127,7 +3129,9 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper } SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); rValue <<= aSeq; } } |