diff options
author | Christian Lippka ORACLE <christian.lippka@oracle.com> | 2010-12-08 14:39:25 +0100 |
---|---|---|
committer | Christian Lippka ORACLE <christian.lippka@oracle.com> | 2010-12-08 14:39:25 +0100 |
commit | f47680bc0f25ce214637ae7e0b0ce4d4df110ec3 (patch) | |
tree | 53f525eb4b2629c585e5ee58886ef3b7c56e1f26 | |
parent | 00a326249f7bb4e7ded9c743836d9d572d3a9d7f (diff) |
impress207: #i115993# do not insert objects as presentation objects on master pages
-rwxr-xr-x | sd/source/ui/view/sdview4.cxx | 3 | ||||
-rwxr-xr-x | 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() ) |