summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl/unomodel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/unoidl/unomodel.cxx')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx30
1 files changed, 6 insertions, 24 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 47f3818f6ddc..5b0594ba58b0 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -455,23 +455,9 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if( hasEventListeners() )
{
-
- bool bBackgroundShape = false;
-
- // the background shape itself has no api representation, so filter all notifies for it
- const SdrObject* pSdrObj = pSdrHint->GetObject();
- if( pSdrObj && (pSdrObj->GetObjInventor() == SdrInventor) && (pSdrObj->GetObjIdentifier() == OBJ_RECT) )
- {
- SdPage* pPage = (SdPage*)pSdrObj->GetPage();
- bBackgroundShape = pPage && (pPage->GetPresObjKind(const_cast<SdrObject*>(pSdrObj)) == PRESOBJ_BACKGROUND);
- }
-
- if( !bBackgroundShape )
- {
- document::EventObject aEvent;
- if( SvxUnoDrawMSFactory::createEvent( mpDoc, pSdrHint, aEvent ) )
- notifyEvent( aEvent );
- }
+ document::EventObject aEvent;
+ if( SvxUnoDrawMSFactory::createEvent( mpDoc, pSdrHint, aEvent ) )
+ notifyEvent( aEvent );
}
if( pSdrHint->GetKind() == HINT_MODELCLEARED )
@@ -2743,13 +2729,9 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
pMPage->SetLayoutName( aLayoutName );
mpDoc->InsertMasterPage(pMPage, (USHORT)nInsertPos);
- { // insert background object
- Point aBackgroundPos ( pMPage->GetLftBorder(), pMPage->GetUppBorder() );
- Size aBackgroundSize ( pMPage->GetSize() );
- aBackgroundSize.Width() -= pMPage->GetLftBorder() + pMPage->GetRgtBorder() - 1;
- aBackgroundSize.Height() -= pMPage->GetUppBorder() + pMPage->GetLwrBorder() - 1;
- Rectangle aBackgroundRect (aBackgroundPos, aBackgroundSize);
- pMPage->CreatePresObj(PRESOBJ_BACKGROUND, FALSE, aBackgroundRect, sal_True );
+ {
+ // ensure default MasterPage fill
+ pMPage->EnsureMasterPageDefaultBackground();
}
xDrawPage = uno::Reference< drawing::XDrawPage >::query( pMPage->getUnoPage() );