From f47680bc0f25ce214637ae7e0b0ce4d4df110ec3 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 --- sd/source/ui/view/sdview4.cxx | 3 ++- sd/source/ui/view/sdview5.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 9fbe223c276a..9932628c4f86 100755 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -99,6 +99,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)) { @@ -115,7 +116,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))); diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx index 156544c235ab..c84f098b3269 100755 --- a/sd/source/ui/view/sdview5.cxx +++ b/sd/source/ui/view/sdview5.cxx @@ -60,7 +60,7 @@ SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind ) if( pPV ) { SdPage* pPage = static_cast< SdPage* >( pPV->GetPage() ); - if( pPage ) + if( pPage && !pPage->IsMasterPage() ) { // first try selected shape if ( AreObjectsMarked() ) -- cgit