summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-05-03 12:22:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-15 16:40:34 +0100
commit6daec0854455b50b7f4318dce2ec6afd92aad324 (patch)
treeddec24727488a0c3e7ec9bb92dda129ce746c83d /sd
parentResolves: #i122216# Ensure FormControls get printed/PDFed (diff)
downloadcore-6daec0854455b50b7f4318dce2ec6afd92aad324.tar.gz
core-6daec0854455b50b7f4318dce2ec6afd92aad324.zip
Resolves: #i122215# Avoid double paste, allow paste of WMF/EMF as bitmap
(cherry picked from commit 5ffd11cb81aa2206fd523dab461c5bdbd6a00bcc) Change-Id: Ib0d0ff7d12cf67bde2379b57bc4e695779eef727
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/sdview3.cxx25
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 );