From b853aa1b54cc3290ee7cb13014ff8d481f312f47 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Wed, 8 Dec 2010 14:39:25 +0100 Subject: impress207: #i115993# do not insert objects as presentation objects on master pages(cherry picked from commit 056b298538918df97390c645a1a0fb690a89468e) --- sd/source/ui/view/sdview4.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sd/source/ui/view/sdview4.cxx') diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index c649f4d958a6..0ef9417fed4e 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -100,6 +100,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, SdrGrafObj* pNewGrafObj = NULL; SdrPageView* pPV = GetSdrPageView(); SdrObject* pPickObj = pObj; + const bool bOnMaster = pPV && pPV->GetPage() && pPV->GetPage()->IsMasterPage(); if(pPV && this->ISA(::sd::slidesorter::view::SlideSorterView)) { @@ -116,7 +117,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, if( mnAction == DND_ACTION_LINK && pPickObj && pPV ) { const bool bIsGraphic = pPickObj->ISA( SdrGrafObj ); - if( bIsGraphic || pObj->IsEmptyPresObj() ) + if( bIsGraphic || (pObj->IsEmptyPresObj() && !bOnMaster) ) { if( IsUndoEnabled() ) BegUndo(String(SdResId(STR_INSERTGRAPHIC))); -- cgit