summaryrefslogtreecommitdiff
path: root/sd
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:04:47 +0100
commit4fb4ffcc6e13b2544e0ac5578e1b52030e85a295 (patch)
treef71327daa0384621c325932a0648ab207d60dd81 /sd
parent8aee959c430113639685d99285974da87d251d2c (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')
-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 7c53bb32d199..93333801ba88 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -138,8 +138,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;