diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-01-21 13:49:22 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-01-21 13:49:22 +0100 |
commit | d5d854cc42815ff0bbe0347be4e28c8896048b8d (patch) | |
tree | 29000ef0d8c19f47b31d81dbca2fa3205e0ad3c7 /svx/source/unodraw | |
parent | d668e9b58922429c5e16abc698520efdc32c7af8 (diff) | |
parent | 3b3e144c13a85b21b32904f245f44256c63e10e5 (diff) |
resync to DEV300_m70
Diffstat (limited to 'svx/source/unodraw')
-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 | 19 |
3 files changed, 15 insertions, 12 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index d5257e82a35f..5be15a1c6a68 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 1ed781f8b097..64baf56eee63 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 296018d80ed9..d68eb053ede1 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -98,6 +98,7 @@ #include "unomaster.hxx" #include <editeng/outlobj.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/matrix/b2dhommatrixtools.hxx> #include <vector> @@ -700,7 +701,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 @@ -2536,10 +2539,7 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); - - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( aPoint.X(), aPoint.Y() ); - aNewPolyPolygon.transform( aMatrix ); + aNewPolyPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix(aPoint.X(), aPoint.Y())); } pEdgeObj->SetEdgeTrackPath( aNewPolyPolygon ); return true; @@ -2972,10 +2972,7 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); - - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( -aPoint.X(), -aPoint.Y() ); - aPolyPoly.transform( aMatrix ); + aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aPoint.X(), -aPoint.Y())); } drawing::PolyPolygonBezierCoords aRetval; SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval); @@ -3147,7 +3144,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; } } |