summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-01-15 15:13:13 +0100
committerKurt Zenker <kz@openoffice.org>2010-01-15 15:13:13 +0100
commit3894ee4d0cd901835d9147bc11093f47f4b10292 (patch)
treec8187838c033a530516316510e5beaabd3b1a15c /svx/source/unodraw
parent36f7b64c6c83a8023e0525ae3c527613243a9056 (diff)
parent8da0b34d6ee5201d3601e16673f78e9ad3638d31 (diff)
CWS-TOOLING: integrate CWS fwk120
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/unoshap2.cxx4
-rw-r--r--svx/source/unodraw/unoshap4.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx8
3 files changed, 12 insertions, 4 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index e6d7e1821435..815f4d8850c2 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 674cb8fdb24d..7130a2d2f960 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 be445143fbd5..bd1d71d36612 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -681,7 +681,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
@@ -3122,7 +3124,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;
}
}