summaryrefslogtreecommitdiff
path: root/svx/source/sdr/contact/viewcontactofsdrpage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr/contact/viewcontactofsdrpage.cxx')
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpage.cxx55
1 files changed, 32 insertions, 23 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index a8d767968a..c150681efb 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -197,36 +197,45 @@ namespace sdr
if(rPage.IsMasterPage())
{
- OSL_ENSURE(0 != rPage.GetObjCount(), "MasterPage without MPBGO detected (!)");
-
- if(rPage.GetObjCount())
+ if(0 == rPage.GetPageNum())
+ {
+ // #i98063#
+ // filter MasterPage 0 since it's the HandoutPage. Thus, it's a
+ // MasterPage, but has no MPBGO, so there is nothing to do here.
+ }
+ else
{
- SdrObject* pObject = rPage.GetObj(0);
- OSL_ENSURE(pObject && pObject->IsMasterPageBackgroundObject(), "MasterPage with wrong MPBGO detected (!)");
+ OSL_ENSURE(0 != rPage.GetObjCount(), "MasterPage without MPBGO detected (!)");
- if(pObject && pObject->IsMasterPageBackgroundObject())
+ if(rPage.GetObjCount())
{
- // build primitive from pObject's attributes
- const SfxItemSet& rFillProperties = pObject->GetMergedItemSet();
- drawinglayer::attribute::SdrFillAttribute* pFill = drawinglayer::primitive2d::createNewSdrFillAttribute(rFillProperties);
+ SdrObject* pObject = rPage.GetObj(0);
+ OSL_ENSURE(pObject && pObject->IsMasterPageBackgroundObject(), "MasterPage with wrong MPBGO detected (!)");
- if(pFill)
+ if(pObject && pObject->IsMasterPageBackgroundObject())
{
- if(pFill->isVisible())
+ // build primitive from pObject's attributes
+ const SfxItemSet& rFillProperties = pObject->GetMergedItemSet();
+ drawinglayer::attribute::SdrFillAttribute* pFill = drawinglayer::primitive2d::createNewSdrFillAttribute(rFillProperties);
+
+ if(pFill)
{
- // direct model data is the page size, get and use it
- const basegfx::B2DRange aInnerRange(
- rPage.GetLftBorder(), rPage.GetUppBorder(),
- rPage.GetWdt() - rPage.GetRgtBorder(), rPage.GetHgt() - rPage.GetLwrBorder());
- const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange));
- const basegfx::B2DHomMatrix aEmptyTransform;
- const drawinglayer::primitive2d::Primitive2DReference xReference(drawinglayer::primitive2d::createPolyPolygonFillPrimitive(
- basegfx::B2DPolyPolygon(aInnerPolgon), aEmptyTransform, *pFill));
-
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ if(pFill->isVisible())
+ {
+ // direct model data is the page size, get and use it
+ const basegfx::B2DRange aInnerRange(
+ rPage.GetLftBorder(), rPage.GetUppBorder(),
+ rPage.GetWdt() - rPage.GetRgtBorder(), rPage.GetHgt() - rPage.GetLwrBorder());
+ const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange));
+ const basegfx::B2DHomMatrix aEmptyTransform;
+ const drawinglayer::primitive2d::Primitive2DReference xReference(drawinglayer::primitive2d::createPolyPolygonFillPrimitive(
+ basegfx::B2DPolyPolygon(aInnerPolgon), aEmptyTransform, *pFill));
+
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+
+ delete pFill;
}
-
- delete pFill;
}
}
}