summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdview3.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-01-09 14:49:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-07 20:41:54 +0100
commit501e0246bc72783f2dc830ea6b29f4a9e7c3045f (patch)
tree283b53959976bad6dc3233b814956994765d47a1 /sd/source/ui/view/sdview3.cxx
parent13ef16423e78d3ea825172594f08c47d2f9bfd09 (diff)
Resolves: #i121603# corrected D&D on existing shapes (CTRL+SHIFT pressed)
(cherry picked from commit 5f81e1134607ae67d7c598f695bd0997cd9c9284) Conflicts: sd/source/ui/view/sdview3.cxx sd/source/ui/view/sdview4.cxx svx/source/svdraw/svdoole2.cxx Change-Id: I91634de52a23ebe897f2d38a6cca763aed19dfc0
Diffstat (limited to 'sd/source/ui/view/sdview3.cxx')
-rw-r--r--sd/source/ui/view/sdview3.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 123a3f4629a1..38079c51e968 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -53,7 +53,6 @@
#include <vcl/metaact.hxx>
#include <svx/svxids.hrc>
#include <toolkit/helper/vclunohelper.hxx>
-
#include "DrawDocShell.hxx"
#include "fupoor.hxx"
#include "Window.hxx"
@@ -68,13 +67,13 @@
#include "strmname.h"
#include "unomodel.hxx"
#include "ViewClipboard.hxx"
-
#include <sfx2/ipclient.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/processfactory.hxx>
#include <tools/stream.hxx>
#include <vcl/cvtgrf.hxx>
#include <svx/sdrhittesthelper.hxx>
+#include <svx/xbtmpit.hxx>
// --------------
// - Namespaces -
@@ -731,6 +730,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
BegUndo( String( SdResId( STR_UNDO_DRAGDROP ) ) );
AddUndo( mrDoc.GetSdrUndoFactory().CreateUndoAttrObject( *pPickObj ) );
}
+
aSet.Put( pObj->GetMergedItemSet() );
/* Do not take over corner radius. There are
@@ -739,6 +739,16 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
object. */
aSet.ClearItem( SDRATTR_ECKENRADIUS );
+ const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
+
+ if(pSdrGrafObj)
+ {
+ // If we have a graphic as source object, use it's graphic
+ // content as fill style
+ aSet.Put(XFillStyleItem(XFILL_BITMAP));
+ aSet.Put(XFillBitmapItem(&mrDoc.GetPool(), pSdrGrafObj->GetGraphic()));
+ }
+
pPickObj->SetMergedItemSetAndBroadcast( aSet );
if( pPickObj->ISA( E3dObject ) && pObj->ISA( E3dObject ) )