diff options
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index a0df92cabe90..ab2cfec23670 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -1145,6 +1145,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper, { // if no object was inserted, insert a picture InsertMetaFile( aDataHelper, rPos, pImageMap, true ); + bReturn = true; } } else if( ( !bLink || pPickObj ) && CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_SVXB ) ) @@ -1211,7 +1212,29 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper, { BitmapEx aBmpEx; - if( aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx ) ) + // get basic Bitmap data + aDataHelper.GetBitmapEx(FORMAT_BITMAP, aBmpEx); + + if(aBmpEx.IsEmpty()) + { + // if this did not work, try to get graphic formats and convert these to bitmap + Graphic aGraphic; + + if(aDataHelper.GetGraphic(FORMAT_GDIMETAFILE, aGraphic)) + { + aBmpEx = aGraphic.GetBitmapEx(); + } + else if(aDataHelper.GetGraphic(SOT_FORMATSTR_ID_SVXB, aGraphic)) + { + aBmpEx = aGraphic.GetBitmapEx(); + } + else if(aDataHelper.GetGraphic(FORMAT_BITMAP, aGraphic)) + { + aBmpEx = aGraphic.GetBitmapEx(); + } + } + + if(!aBmpEx.IsEmpty()) { Point aInsertPos( rPos ); |