summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-12-04 15:56:38 +0100
committerRadek Doulik <rodo@novell.com>2012-12-04 16:00:44 +0100
commit869031d702639852cac51cdb8306ff31420b3f3f (patch)
tree0a8312afb6074e52a6085b834719cd5c9f9c0899 /sd/source/ui
parent8e3282344a19932e6dd3f919d2ff1be67adce9ed (diff)
changed behavior of insert picture
- when single graphic object shape is selected, replace the graphic with inserted picture - otherwise proceed as before Change-Id: I767c3ab81abf26c34b612d6aac1f282aa0a53f6c
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/func/fuinsert.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index d7cf3e2d11d3..fd72ccc737a4 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -129,8 +129,9 @@ void FuInsertGraphic::DoExecute( SfxRequest& )
if( mpViewShell && mpViewShell->ISA(DrawViewShell))
{
sal_Int8 nAction = DND_ACTION_COPY;
- SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC );
- if( pPickObj )
+ SdrObject* pPickObj;
+
+ if( ( pPickObj = mpView->GetSelectedSingleObject( mpView->GetPage() ) ) || ( pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC ) ) )
nAction = DND_ACTION_LINK;
Point aPos;