[Libreoffice-commits] core.git: sd/source
Armin Le Grand
alg at apache.org
Sat Jun 15 08:42:24 PDT 2013
sd/source/ui/view/sdview3.cxx | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
New commits:
commit 6daec0854455b50b7f4318dce2ec6afd92aad324
Author: Armin Le Grand <alg at apache.org>
Date: Fri May 3 12:22:53 2013 +0000
Resolves: #i122215# Avoid double paste, allow paste of WMF/EMF as bitmap
(cherry picked from commit 5ffd11cb81aa2206fd523dab461c5bdbd6a00bcc)
Change-Id: Ib0d0ff7d12cf67bde2379b57bc4e695779eef727
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index a0df92c..ab2cfec2 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 );
More information about the Libreoffice-commits
mailing list