Kaydet (Commit) 02d95370 authored tarafından Noel Power's avatar Noel Power

fix for bnc#684784 - more conservative graphic replacemement

üst 3ef3fbbe
......@@ -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) )
{
......
......@@ -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; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment