diff options
author | Sven Jacobi <sj@openoffice.org> | 2009-10-20 11:37:58 +0000 |
---|---|---|
committer | Sven Jacobi <sj@openoffice.org> | 2009-10-20 11:37:58 +0000 |
commit | 4a8256a93d4bb2bda592c525613a2fc9cacdb28c (patch) | |
tree | afedf460e1d59fe1486ddf25af26fe431c1f5efd /svx | |
parent | ab33e14647ada2a32624fa39ec0ddbbbdc694df5 (diff) |
#i102257# fixed gpf when loading some types of pict graphics
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/msfilter/msdffimp.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 0e751e3181e7..087e13e88f3c 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -4954,16 +4954,16 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r ApplyAttributes( rSt, aSet, aObjData ); pRet->SetMergedItemSet(aSet); } - else if ( aObjData.eShapeType == mso_sptLine )
- {
- basegfx::B2DPolygon aPoly;
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
- pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
- pRet->SetModel( pSdrModel );
- ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetMergedItemSet(aSet);
- }
+ else if ( aObjData.eShapeType == mso_sptLine ) + { + basegfx::B2DPolygon aPoly; + aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top())); + aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom())); + pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly)); + pRet->SetModel( pSdrModel ); + ApplyAttributes( rSt, aSet, aObjData ); + pRet->SetMergedItemSet(aSet); + } else { if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) ) @@ -7037,6 +7037,8 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect aZCodec.Decompress( rBLIPStream, *pOut ); aZCodec.EndCompression(); pOut->Seek( STREAM_SEEK_TO_BEGIN ); + pOut->SetResizeOffset( 0 ); // sj: #i102257# setting ResizeOffset of 0 prevents from seeking + // behind the stream end (allocating too much memory) pGrStream = pOut; } |