diff options
author | Noel Power <noel.power@novell.com> | 2011-08-15 20:09:32 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-08-15 20:09:32 +0100 |
commit | 02d95370561c0b87e63ade341881c4e9dbe33e84 (patch) | |
tree | 96a9eece5b46e3563482603c0b59ec3a78a47942 /sc | |
parent | 3ef3fbbe62c2faa653fe70fd7a255099caf36734 (diff) |
fix for bnc#684784 - more conservative graphic replacemement
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 13 | ||||
-rw-r--r-- | sc/source/filter/inc/xiescher.hxx | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 396c171bc196..9123142997f5 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -2856,6 +2856,19 @@ SdrObject* XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const // try to create an OLE object or form control SdrObjectPtr xSdrObj( rDffConv.CreateSdrObject( *this, rAnchorRect ) ); + // insert a graphic replacement for unsupported ole object ( if none already + // exists ) Hmm ok, it's possibly that there has been some imported + // graphic at a base level but unlikely, normally controls have a valid + // preview in the IMGDATA record ( see below ) + // It might be possible to push such an imported graphic up to this + // XclImpPictureObj instance but there are somany layers of indirection I + // don't see an easy way. This way at least ensures that we can + // avoid a 'blank' shape that can result from a failed control import + if ( !xSdrObj && IsOcxControl() && maGraphic.GetType() == GRAPHIC_NONE ) + { + Graphic aReplacement( SdrOle2Obj::GetEmtyOLEReplacementBitmap() ); + const_cast< XclImpPictureObj* >( this )->maGraphic = aReplacement; + } // no OLE - create a plain picture from IMGDATA record data if( !xSdrObj && (maGraphic.GetType() != GRAPHIC_NONE) ) { diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index 7c05346b26ef..c187e647bced 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -871,6 +871,7 @@ public: virtual String GetObjName() const; /** Returns the graphic imported from the IMGDATA record. */ inline const Graphic& GetGraphic() const { return maGraphic; } + /** Returns the visible area of the imported graphic. */ inline const Rectangle& GetVisArea() const { return maVisArea; } |