1*f6e50924SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*f6e50924SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f6e50924SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f6e50924SAndrew Rist * distributed with this work for additional information 6*f6e50924SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f6e50924SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f6e50924SAndrew Rist * "License"); you may not use this file except in compliance 9*f6e50924SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*f6e50924SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*f6e50924SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f6e50924SAndrew Rist * software distributed under the License is distributed on an 15*f6e50924SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f6e50924SAndrew Rist * KIND, either express or implied. See the License for the 17*f6e50924SAndrew Rist * specific language governing permissions and limitations 18*f6e50924SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*f6e50924SAndrew Rist *************************************************************/ 21*f6e50924SAndrew Rist 22*f6e50924SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_svx.hxx" 26cdf0e10cSrcweir #include <svx/sdr/contact/viewcontactofsdrpage.hxx> 27cdf0e10cSrcweir #include <svx/sdr/contact/viewobjectcontact.hxx> 28cdf0e10cSrcweir #include <svx/svdpage.hxx> 29cdf0e10cSrcweir #include <svx/sdr/contact/displayinfo.hxx> 30cdf0e10cSrcweir #include <svx/sdr/contact/viewobjectcontactofsdrpage.hxx> 31cdf0e10cSrcweir #include <basegfx/polygon/b2dpolygontools.hxx> 32cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx> 33cdf0e10cSrcweir #include <svx/svdpagv.hxx> 34cdf0e10cSrcweir #include <svx/svdview.hxx> 35cdf0e10cSrcweir #include <vcl/svapp.hxx> 36cdf0e10cSrcweir #include <svx/sdr/contact/objectcontact.hxx> 37cdf0e10cSrcweir #include <drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx> 38cdf0e10cSrcweir #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> 39cdf0e10cSrcweir #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> 40cdf0e10cSrcweir #include <basegfx/polygon/b2dpolygon.hxx> 41cdf0e10cSrcweir #include <svx/sdr/primitive2d/sdrattributecreator.hxx> 42cdf0e10cSrcweir #include <svx/sdr/primitive2d/sdrdecompositiontools.hxx> 43cdf0e10cSrcweir #include <vcl/lazydelete.hxx> 44cdf0e10cSrcweir #include <svx/svdstr.hrc> 45cdf0e10cSrcweir #include <svx/svdglob.hxx> 46cdf0e10cSrcweir #include <drawinglayer/primitive2d/discreteshadowprimitive2d.hxx> 47cdf0e10cSrcweir #include <drawinglayer/attribute/sdrfillattribute.hxx> 48cdf0e10cSrcweir 49cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 50cdf0e10cSrcweir 51cdf0e10cSrcweir #define PAPER_SHADOW(SIZE) (SIZE >> 8) 52cdf0e10cSrcweir 53cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 54cdf0e10cSrcweir 55cdf0e10cSrcweir namespace sdr 56cdf0e10cSrcweir { 57cdf0e10cSrcweir namespace contact 58cdf0e10cSrcweir { 59cdf0e10cSrcweir ViewContactOfPageSubObject::ViewContactOfPageSubObject(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 60cdf0e10cSrcweir : mrParentViewContactOfSdrPage(rParentViewContactOfSdrPage) 61cdf0e10cSrcweir { 62cdf0e10cSrcweir } 63cdf0e10cSrcweir 64cdf0e10cSrcweir ViewContactOfPageSubObject::~ViewContactOfPageSubObject() 65cdf0e10cSrcweir { 66cdf0e10cSrcweir } 67cdf0e10cSrcweir 68cdf0e10cSrcweir ViewContact* ViewContactOfPageSubObject::GetParentContact() const 69cdf0e10cSrcweir { 70cdf0e10cSrcweir return &mrParentViewContactOfSdrPage; 71cdf0e10cSrcweir } 72cdf0e10cSrcweir 73cdf0e10cSrcweir const SdrPage& ViewContactOfPageSubObject::getPage() const 74cdf0e10cSrcweir { 75cdf0e10cSrcweir return mrParentViewContactOfSdrPage.GetSdrPage(); 76cdf0e10cSrcweir } 77cdf0e10cSrcweir } // end of namespace contact 78cdf0e10cSrcweir } // end of namespace sdr 79cdf0e10cSrcweir 80cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 81cdf0e10cSrcweir 82cdf0e10cSrcweir namespace sdr 83cdf0e10cSrcweir { 84cdf0e10cSrcweir namespace contact 85cdf0e10cSrcweir { 86cdf0e10cSrcweir ViewObjectContact& ViewContactOfPageBackground::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 87cdf0e10cSrcweir { 88cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfPageBackground(rObjectContact, *this); 89cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 90cdf0e10cSrcweir 91cdf0e10cSrcweir return *pRetval; 92cdf0e10cSrcweir } 93cdf0e10cSrcweir 94cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageBackground::createViewIndependentPrimitive2DSequence() const 95cdf0e10cSrcweir { 96cdf0e10cSrcweir // We have only the page information, not the view information. Use the 97cdf0e10cSrcweir // svtools::DOCCOLOR color for initialisation 98cdf0e10cSrcweir const svtools::ColorConfig aColorConfig; 99cdf0e10cSrcweir const Color aInitColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); 100cdf0e10cSrcweir const basegfx::BColor aRGBColor(aInitColor.getBColor()); 101cdf0e10cSrcweir const drawinglayer::primitive2d::Primitive2DReference xReference( 102cdf0e10cSrcweir new drawinglayer::primitive2d::BackgroundColorPrimitive2D(aRGBColor)); 103cdf0e10cSrcweir 104cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); 105cdf0e10cSrcweir } 106cdf0e10cSrcweir 107cdf0e10cSrcweir ViewContactOfPageBackground::ViewContactOfPageBackground(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 108cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage) 109cdf0e10cSrcweir { 110cdf0e10cSrcweir } 111cdf0e10cSrcweir 112cdf0e10cSrcweir ViewContactOfPageBackground::~ViewContactOfPageBackground() 113cdf0e10cSrcweir { 114cdf0e10cSrcweir } 115cdf0e10cSrcweir } // end of namespace contact 116cdf0e10cSrcweir } // end of namespace sdr 117cdf0e10cSrcweir 118cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 119cdf0e10cSrcweir 120cdf0e10cSrcweir namespace sdr 121cdf0e10cSrcweir { 122cdf0e10cSrcweir namespace contact 123cdf0e10cSrcweir { 124cdf0e10cSrcweir ViewObjectContact& ViewContactOfPageShadow::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 125cdf0e10cSrcweir { 126cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfPageShadow(rObjectContact, *this); 127cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 128cdf0e10cSrcweir 129cdf0e10cSrcweir return *pRetval; 130cdf0e10cSrcweir } 131cdf0e10cSrcweir 132cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageShadow::createViewIndependentPrimitive2DSequence() const 133cdf0e10cSrcweir { 134cdf0e10cSrcweir static bool bUseOldPageShadow(false); 135cdf0e10cSrcweir const SdrPage& rPage = getPage(); 136cdf0e10cSrcweir basegfx::B2DHomMatrix aPageMatrix; 137cdf0e10cSrcweir aPageMatrix.set(0, 0, (double)rPage.GetWdt()); 138cdf0e10cSrcweir aPageMatrix.set(1, 1, (double)rPage.GetHgt()); 139cdf0e10cSrcweir 140cdf0e10cSrcweir if(bUseOldPageShadow) 141cdf0e10cSrcweir { 142cdf0e10cSrcweir // create page shadow polygon 143cdf0e10cSrcweir const double fPageBorderFactor(1.0 / 256.0); 144cdf0e10cSrcweir basegfx::B2DPolygon aPageShadowPolygon; 145cdf0e10cSrcweir aPageShadowPolygon.append(basegfx::B2DPoint(1.0, fPageBorderFactor)); 146cdf0e10cSrcweir aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, fPageBorderFactor)); 147cdf0e10cSrcweir aPageShadowPolygon.append(basegfx::B2DPoint(1.0 + fPageBorderFactor, 1.0 + fPageBorderFactor)); 148cdf0e10cSrcweir aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0 + fPageBorderFactor)); 149cdf0e10cSrcweir aPageShadowPolygon.append(basegfx::B2DPoint(fPageBorderFactor, 1.0)); 150cdf0e10cSrcweir aPageShadowPolygon.append(basegfx::B2DPoint(1.0, 1.0)); 151cdf0e10cSrcweir aPageShadowPolygon.setClosed(true); 152cdf0e10cSrcweir aPageShadowPolygon.transform(aPageMatrix); 153cdf0e10cSrcweir 154cdf0e10cSrcweir // We have only the page information, not the view information. Use the 155cdf0e10cSrcweir // svtools::FONTCOLOR color for initialisation 156cdf0e10cSrcweir const svtools::ColorConfig aColorConfig; 157cdf0e10cSrcweir const Color aShadowColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); 158cdf0e10cSrcweir const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor()); 159cdf0e10cSrcweir const drawinglayer::primitive2d::Primitive2DReference xReference( 160cdf0e10cSrcweir new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( 161cdf0e10cSrcweir basegfx::B2DPolyPolygon(aPageShadowPolygon), 162cdf0e10cSrcweir aRGBShadowColor)); 163cdf0e10cSrcweir 164cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); 165cdf0e10cSrcweir } 166cdf0e10cSrcweir else 167cdf0e10cSrcweir { 168cdf0e10cSrcweir static vcl::DeleteOnDeinit<drawinglayer::primitive2d::DiscreteShadow> 169cdf0e10cSrcweir aDiscreteShadow(new drawinglayer::primitive2d::DiscreteShadow( 170cdf0e10cSrcweir BitmapEx(ResId(SIP_SA_PAGESHADOW35X35, *ImpGetResMgr())))); 171cdf0e10cSrcweir if (aDiscreteShadow.get() != NULL) 172cdf0e10cSrcweir { 173cdf0e10cSrcweir const drawinglayer::primitive2d::Primitive2DReference xReference( 174cdf0e10cSrcweir new drawinglayer::primitive2d::DiscreteShadowPrimitive2D( 175cdf0e10cSrcweir aPageMatrix, 176cdf0e10cSrcweir *aDiscreteShadow.get())); 177cdf0e10cSrcweir 178cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); 179cdf0e10cSrcweir } 180cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(); 181cdf0e10cSrcweir } 182cdf0e10cSrcweir } 183cdf0e10cSrcweir 184cdf0e10cSrcweir ViewContactOfPageShadow::ViewContactOfPageShadow(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 185cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage) 186cdf0e10cSrcweir { 187cdf0e10cSrcweir } 188cdf0e10cSrcweir 189cdf0e10cSrcweir ViewContactOfPageShadow::~ViewContactOfPageShadow() 190cdf0e10cSrcweir { 191cdf0e10cSrcweir } 192cdf0e10cSrcweir } // end of namespace contact 193cdf0e10cSrcweir } // end of namespace sdr 194cdf0e10cSrcweir 195cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 196cdf0e10cSrcweir 197cdf0e10cSrcweir namespace sdr 198cdf0e10cSrcweir { 199cdf0e10cSrcweir namespace contact 200cdf0e10cSrcweir { 201cdf0e10cSrcweir ViewObjectContact& ViewContactOfMasterPage::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 202cdf0e10cSrcweir { 203cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfMasterPage(rObjectContact, *this); 204cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 205cdf0e10cSrcweir 206cdf0e10cSrcweir return *pRetval; 207cdf0e10cSrcweir } 208cdf0e10cSrcweir 209cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfMasterPage::createViewIndependentPrimitive2DSequence() const 210cdf0e10cSrcweir { 211cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence xRetval; 212cdf0e10cSrcweir 213cdf0e10cSrcweir // this class is used when the page is a MasterPage and is responsible to 214cdf0e10cSrcweir // create a visualisation for the MPBGO, if exists. This needs to be suppressed 215cdf0e10cSrcweir // when a SdrPage which uses a MasterPage creates it's output. Suppression 216cdf0e10cSrcweir // is done in the corresponding VOC since DisplayInfo data is needed 217cdf0e10cSrcweir const SdrPage& rPage = getPage(); 218cdf0e10cSrcweir 219cdf0e10cSrcweir if(rPage.IsMasterPage()) 220cdf0e10cSrcweir { 221cdf0e10cSrcweir if(0 == rPage.GetPageNum()) 222cdf0e10cSrcweir { 223cdf0e10cSrcweir // #i98063# 224cdf0e10cSrcweir // filter MasterPage 0 since it's the HandoutPage. Thus, it's a 225cdf0e10cSrcweir // MasterPage, but has no MPBGO, so there is nothing to do here. 226cdf0e10cSrcweir } 227cdf0e10cSrcweir else 228cdf0e10cSrcweir { 229cdf0e10cSrcweir drawinglayer::attribute::SdrFillAttribute aFill; 230cdf0e10cSrcweir 231cdf0e10cSrcweir // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets, 232cdf0e10cSrcweir // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all 233cdf0e10cSrcweir // MasterPages should have a StyleSheet excactly for this reason, but historically 234cdf0e10cSrcweir // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others). 235cdf0e10cSrcweir if(rPage.getSdrPageProperties().GetStyleSheet()) 236cdf0e10cSrcweir { 237cdf0e10cSrcweir // create page fill attributes with correct properties 238cdf0e10cSrcweir aFill = drawinglayer::primitive2d::createNewSdrFillAttribute( 239cdf0e10cSrcweir rPage.getSdrPageProperties().GetItemSet()); 240cdf0e10cSrcweir } 241cdf0e10cSrcweir 242cdf0e10cSrcweir if(!aFill.isDefault()) 243cdf0e10cSrcweir { 244cdf0e10cSrcweir // direct model data is the page size, get and use it 245cdf0e10cSrcweir const basegfx::B2DRange aInnerRange( 246cdf0e10cSrcweir rPage.GetLftBorder(), rPage.GetUppBorder(), 247cdf0e10cSrcweir rPage.GetWdt() - rPage.GetRgtBorder(), rPage.GetHgt() - rPage.GetLwrBorder()); 248cdf0e10cSrcweir const basegfx::B2DPolygon aInnerPolgon(basegfx::tools::createPolygonFromRect(aInnerRange)); 249cdf0e10cSrcweir const basegfx::B2DHomMatrix aEmptyTransform; 250cdf0e10cSrcweir const drawinglayer::primitive2d::Primitive2DReference xReference( 251cdf0e10cSrcweir drawinglayer::primitive2d::createPolyPolygonFillPrimitive( 252cdf0e10cSrcweir basegfx::B2DPolyPolygon(aInnerPolgon), 253cdf0e10cSrcweir aEmptyTransform, 254cdf0e10cSrcweir aFill, 255cdf0e10cSrcweir drawinglayer::attribute::FillGradientAttribute())); 256cdf0e10cSrcweir 257cdf0e10cSrcweir xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); 258cdf0e10cSrcweir } 259cdf0e10cSrcweir } 260cdf0e10cSrcweir } 261cdf0e10cSrcweir 262cdf0e10cSrcweir return xRetval; 263cdf0e10cSrcweir } 264cdf0e10cSrcweir 265cdf0e10cSrcweir ViewContactOfMasterPage::ViewContactOfMasterPage(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 266cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage) 267cdf0e10cSrcweir { 268cdf0e10cSrcweir } 269cdf0e10cSrcweir 270cdf0e10cSrcweir ViewContactOfMasterPage::~ViewContactOfMasterPage() 271cdf0e10cSrcweir { 272cdf0e10cSrcweir } 273cdf0e10cSrcweir } // end of namespace contact 274cdf0e10cSrcweir } // end of namespace sdr 275cdf0e10cSrcweir 276cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 277cdf0e10cSrcweir 278cdf0e10cSrcweir namespace sdr 279cdf0e10cSrcweir { 280cdf0e10cSrcweir namespace contact 281cdf0e10cSrcweir { 282cdf0e10cSrcweir ViewObjectContact& ViewContactOfPageFill::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 283cdf0e10cSrcweir { 284cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfPageFill(rObjectContact, *this); 285cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 286cdf0e10cSrcweir 287cdf0e10cSrcweir return *pRetval; 288cdf0e10cSrcweir } 289cdf0e10cSrcweir 290cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageFill::createViewIndependentPrimitive2DSequence() const 291cdf0e10cSrcweir { 292cdf0e10cSrcweir const SdrPage& rPage = getPage(); 293cdf0e10cSrcweir const basegfx::B2DRange aPageFillRange(0.0, 0.0, (double)rPage.GetWdt(), (double)rPage.GetHgt()); 294cdf0e10cSrcweir const basegfx::B2DPolygon aPageFillPolygon(basegfx::tools::createPolygonFromRect(aPageFillRange)); 295cdf0e10cSrcweir 296cdf0e10cSrcweir // We have only the page information, not the view information. Use the 297cdf0e10cSrcweir // svtools::DOCCOLOR color for initialisation 298cdf0e10cSrcweir const svtools::ColorConfig aColorConfig; 299cdf0e10cSrcweir const Color aPageFillColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); 300cdf0e10cSrcweir 301cdf0e10cSrcweir // create and add primitive 302cdf0e10cSrcweir const basegfx::BColor aRGBColor(aPageFillColor.getBColor()); 303cdf0e10cSrcweir const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPageFillPolygon), aRGBColor)); 304cdf0e10cSrcweir 305cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); 306cdf0e10cSrcweir } 307cdf0e10cSrcweir 308cdf0e10cSrcweir ViewContactOfPageFill::ViewContactOfPageFill(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 309cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage) 310cdf0e10cSrcweir { 311cdf0e10cSrcweir } 312cdf0e10cSrcweir 313cdf0e10cSrcweir ViewContactOfPageFill::~ViewContactOfPageFill() 314cdf0e10cSrcweir { 315cdf0e10cSrcweir } 316cdf0e10cSrcweir } // end of namespace contact 317cdf0e10cSrcweir } // end of namespace sdr 318cdf0e10cSrcweir 319cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 320cdf0e10cSrcweir 321cdf0e10cSrcweir namespace sdr 322cdf0e10cSrcweir { 323cdf0e10cSrcweir namespace contact 324cdf0e10cSrcweir { 325cdf0e10cSrcweir ViewObjectContact& ViewContactOfOuterPageBorder::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 326cdf0e10cSrcweir { 327cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfOuterPageBorder(rObjectContact, *this); 328cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 329cdf0e10cSrcweir 330cdf0e10cSrcweir return *pRetval; 331cdf0e10cSrcweir } 332cdf0e10cSrcweir 333cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfOuterPageBorder::createViewIndependentPrimitive2DSequence() const 334cdf0e10cSrcweir { 335cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence xRetval; 336cdf0e10cSrcweir const SdrPage& rPage = getPage(); 337cdf0e10cSrcweir const basegfx::B2DRange aPageBorderRange(0.0, 0.0, (double)rPage.GetWdt(), (double)rPage.GetHgt()); 338cdf0e10cSrcweir 339cdf0e10cSrcweir // Changed to 0x949599 for renaissance, before svtools::FONTCOLOR was used. 340cdf0e10cSrcweir // Added old case as fallback for HighContrast. 341cdf0e10cSrcweir basegfx::BColor aRGBBorderColor(0x94 / (double)0xff, 0x95 / (double)0xff, 0x99 / (double)0xff); 342cdf0e10cSrcweir 343cdf0e10cSrcweir if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) 344cdf0e10cSrcweir { 345cdf0e10cSrcweir const svtools::ColorConfig aColorConfig; 346cdf0e10cSrcweir const Color aBorderColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); 347cdf0e10cSrcweir 348cdf0e10cSrcweir aRGBBorderColor = aBorderColor.getBColor(); 349cdf0e10cSrcweir } 350cdf0e10cSrcweir 351cdf0e10cSrcweir if(rPage.getPageBorderOnlyLeftRight()) 352cdf0e10cSrcweir { 353cdf0e10cSrcweir // #i93597# for Report Designer, the page border shall be only displayed right and left, 354cdf0e10cSrcweir // but not top and bottom. Create simplified geometry. 355cdf0e10cSrcweir basegfx::B2DPolygon aLeft, aRight; 356cdf0e10cSrcweir 357cdf0e10cSrcweir aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMinY())); 358cdf0e10cSrcweir aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMaxY())); 359cdf0e10cSrcweir 360cdf0e10cSrcweir aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMinY())); 361cdf0e10cSrcweir aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMaxY())); 362cdf0e10cSrcweir 363cdf0e10cSrcweir xRetval.realloc(2); 364cdf0e10cSrcweir xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aLeft, aRGBBorderColor)); 365cdf0e10cSrcweir xRetval[1] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRight, aRGBBorderColor)); 366cdf0e10cSrcweir } 367cdf0e10cSrcweir else 368cdf0e10cSrcweir { 369cdf0e10cSrcweir xRetval.realloc(1); 370cdf0e10cSrcweir const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); 371cdf0e10cSrcweir xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor)); 372cdf0e10cSrcweir } 373cdf0e10cSrcweir 374cdf0e10cSrcweir return xRetval; 375cdf0e10cSrcweir } 376cdf0e10cSrcweir 377cdf0e10cSrcweir ViewContactOfOuterPageBorder::ViewContactOfOuterPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 378cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage) 379cdf0e10cSrcweir { 380cdf0e10cSrcweir } 381cdf0e10cSrcweir 382cdf0e10cSrcweir ViewContactOfOuterPageBorder::~ViewContactOfOuterPageBorder() 383cdf0e10cSrcweir { 384cdf0e10cSrcweir } 385cdf0e10cSrcweir } // end of namespace contact 386cdf0e10cSrcweir } // end of namespace sdr 387cdf0e10cSrcweir 388cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 389cdf0e10cSrcweir 390cdf0e10cSrcweir namespace sdr 391cdf0e10cSrcweir { 392cdf0e10cSrcweir namespace contact 393cdf0e10cSrcweir { 394cdf0e10cSrcweir ViewObjectContact& ViewContactOfInnerPageBorder::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 395cdf0e10cSrcweir { 396cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfInnerPageBorder(rObjectContact, *this); 397cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 398cdf0e10cSrcweir 399cdf0e10cSrcweir return *pRetval; 400cdf0e10cSrcweir } 401cdf0e10cSrcweir 402cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfInnerPageBorder::createViewIndependentPrimitive2DSequence() const 403cdf0e10cSrcweir { 404cdf0e10cSrcweir const SdrPage& rPage = getPage(); 405cdf0e10cSrcweir const basegfx::B2DRange aPageBorderRange( 406cdf0e10cSrcweir (double)rPage.GetLftBorder(), (double)rPage.GetUppBorder(), 407cdf0e10cSrcweir (double)(rPage.GetWdt() - rPage.GetRgtBorder()), (double)(rPage.GetHgt() - rPage.GetLwrBorder())); 408cdf0e10cSrcweir const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); 409cdf0e10cSrcweir 410cdf0e10cSrcweir // We have only the page information, not the view information. Use the 411cdf0e10cSrcweir // svtools::FONTCOLOR or svtools::DOCBOUNDARIES color for initialisation 412cdf0e10cSrcweir const svtools::ColorConfig aColorConfig; 413cdf0e10cSrcweir Color aBorderColor; 414cdf0e10cSrcweir 415cdf0e10cSrcweir if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) 416cdf0e10cSrcweir { 417cdf0e10cSrcweir aBorderColor = aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor; 418cdf0e10cSrcweir } 419cdf0e10cSrcweir else 420cdf0e10cSrcweir { 421cdf0e10cSrcweir aBorderColor = aColorConfig.GetColorValue(svtools::DOCBOUNDARIES).nColor; 422cdf0e10cSrcweir } 423cdf0e10cSrcweir 424cdf0e10cSrcweir // create page outer border primitive 425cdf0e10cSrcweir const basegfx::BColor aRGBBorderColor(aBorderColor.getBColor()); 426cdf0e10cSrcweir const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPageBorderPolygon, aRGBBorderColor)); 427cdf0e10cSrcweir 428cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); 429cdf0e10cSrcweir } 430cdf0e10cSrcweir 431cdf0e10cSrcweir ViewContactOfInnerPageBorder::ViewContactOfInnerPageBorder(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 432cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage) 433cdf0e10cSrcweir { 434cdf0e10cSrcweir } 435cdf0e10cSrcweir 436cdf0e10cSrcweir ViewContactOfInnerPageBorder::~ViewContactOfInnerPageBorder() 437cdf0e10cSrcweir { 438cdf0e10cSrcweir } 439cdf0e10cSrcweir } // end of namespace contact 440cdf0e10cSrcweir } // end of namespace sdr 441cdf0e10cSrcweir 442cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 443cdf0e10cSrcweir 444cdf0e10cSrcweir namespace sdr 445cdf0e10cSrcweir { 446cdf0e10cSrcweir namespace contact 447cdf0e10cSrcweir { 448cdf0e10cSrcweir ViewObjectContact& ViewContactOfPageHierarchy::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 449cdf0e10cSrcweir { 450cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfPageHierarchy(rObjectContact, *this); 451cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 452cdf0e10cSrcweir 453cdf0e10cSrcweir return *pRetval; 454cdf0e10cSrcweir } 455cdf0e10cSrcweir 456cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageHierarchy::createViewIndependentPrimitive2DSequence() const 457cdf0e10cSrcweir { 458cdf0e10cSrcweir // collect sub-hierarchy 459cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence xRetval; 460cdf0e10cSrcweir const sal_uInt32 nObjectCount(GetObjectCount()); 461cdf0e10cSrcweir 462cdf0e10cSrcweir // collect all sub-primitives 463cdf0e10cSrcweir for(sal_uInt32 a(0); a < nObjectCount; a++) 464cdf0e10cSrcweir { 465cdf0e10cSrcweir const ViewContact& rCandidate(GetViewContact(a)); 466cdf0e10cSrcweir const drawinglayer::primitive2d::Primitive2DSequence aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence()); 467cdf0e10cSrcweir 468cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, aCandSeq); 469cdf0e10cSrcweir } 470cdf0e10cSrcweir 471cdf0e10cSrcweir return xRetval; 472cdf0e10cSrcweir } 473cdf0e10cSrcweir 474cdf0e10cSrcweir ViewContactOfPageHierarchy::ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage) 475cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage) 476cdf0e10cSrcweir { 477cdf0e10cSrcweir } 478cdf0e10cSrcweir 479cdf0e10cSrcweir ViewContactOfPageHierarchy::~ViewContactOfPageHierarchy() 480cdf0e10cSrcweir { 481cdf0e10cSrcweir } 482cdf0e10cSrcweir 483cdf0e10cSrcweir sal_uInt32 ViewContactOfPageHierarchy::GetObjectCount() const 484cdf0e10cSrcweir { 485cdf0e10cSrcweir return getPage().GetObjCount(); 486cdf0e10cSrcweir } 487cdf0e10cSrcweir 488cdf0e10cSrcweir ViewContact& ViewContactOfPageHierarchy::GetViewContact(sal_uInt32 nIndex) const 489cdf0e10cSrcweir { 490cdf0e10cSrcweir SdrObject* pObj = getPage().GetObj(nIndex); 491cdf0e10cSrcweir DBG_ASSERT(pObj, "ViewContactOfPageHierarchy::GetViewContact: Corrupt SdrObjList (!)"); 492cdf0e10cSrcweir return pObj->GetViewContact(); 493cdf0e10cSrcweir } 494cdf0e10cSrcweir } // end of namespace contact 495cdf0e10cSrcweir } // end of namespace sdr 496cdf0e10cSrcweir 497cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 498cdf0e10cSrcweir 499cdf0e10cSrcweir namespace sdr 500cdf0e10cSrcweir { 501cdf0e10cSrcweir namespace contact 502cdf0e10cSrcweir { 503cdf0e10cSrcweir ViewObjectContact& ViewContactOfGrid::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 504cdf0e10cSrcweir { 505cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfPageGrid(rObjectContact, *this); 506cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 507cdf0e10cSrcweir 508cdf0e10cSrcweir return *pRetval; 509cdf0e10cSrcweir } 510cdf0e10cSrcweir 511cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfGrid::createViewIndependentPrimitive2DSequence() const 512cdf0e10cSrcweir { 513cdf0e10cSrcweir // We have only the page information, not the view information and thus no grid settings. Create empty 514cdf0e10cSrcweir // default. For the view-dependent implementation, see ViewObjectContactOfPageGrid::createPrimitive2DSequence 515cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(); 516cdf0e10cSrcweir } 517cdf0e10cSrcweir 518cdf0e10cSrcweir ViewContactOfGrid::ViewContactOfGrid(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront) 519cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage), 520cdf0e10cSrcweir mbFront(bFront) 521cdf0e10cSrcweir { 522cdf0e10cSrcweir } 523cdf0e10cSrcweir 524cdf0e10cSrcweir ViewContactOfGrid::~ViewContactOfGrid() 525cdf0e10cSrcweir { 526cdf0e10cSrcweir } 527cdf0e10cSrcweir } // end of namespace contact 528cdf0e10cSrcweir } // end of namespace sdr 529cdf0e10cSrcweir 530cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 531cdf0e10cSrcweir 532cdf0e10cSrcweir namespace sdr 533cdf0e10cSrcweir { 534cdf0e10cSrcweir namespace contact 535cdf0e10cSrcweir { 536cdf0e10cSrcweir ViewObjectContact& ViewContactOfHelplines::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 537cdf0e10cSrcweir { 538cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfPageHelplines(rObjectContact, *this); 539cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 540cdf0e10cSrcweir 541cdf0e10cSrcweir return *pRetval; 542cdf0e10cSrcweir } 543cdf0e10cSrcweir 544cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfHelplines::createViewIndependentPrimitive2DSequence() const 545cdf0e10cSrcweir { 546cdf0e10cSrcweir // We have only the page information, not the view information and thus no helplines. Create empty 547cdf0e10cSrcweir // default. For the view-dependent implementation, see ViewObjectContactOfPageHelplines::createPrimitive2DSequence 548cdf0e10cSrcweir return drawinglayer::primitive2d::Primitive2DSequence(); 549cdf0e10cSrcweir } 550cdf0e10cSrcweir 551cdf0e10cSrcweir ViewContactOfHelplines::ViewContactOfHelplines(ViewContactOfSdrPage& rParentViewContactOfSdrPage, bool bFront) 552cdf0e10cSrcweir : ViewContactOfPageSubObject(rParentViewContactOfSdrPage), 553cdf0e10cSrcweir mbFront(bFront) 554cdf0e10cSrcweir { 555cdf0e10cSrcweir } 556cdf0e10cSrcweir 557cdf0e10cSrcweir ViewContactOfHelplines::~ViewContactOfHelplines() 558cdf0e10cSrcweir { 559cdf0e10cSrcweir } 560cdf0e10cSrcweir } // end of namespace contact 561cdf0e10cSrcweir } // end of namespace sdr 562cdf0e10cSrcweir 563cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 564cdf0e10cSrcweir 565cdf0e10cSrcweir namespace sdr 566cdf0e10cSrcweir { 567cdf0e10cSrcweir namespace contact 568cdf0e10cSrcweir { 569cdf0e10cSrcweir // Create a Object-Specific ViewObjectContact, set ViewContact and 570cdf0e10cSrcweir // ObjectContact. Always needs to return something. 571cdf0e10cSrcweir ViewObjectContact& ViewContactOfSdrPage::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) 572cdf0e10cSrcweir { 573cdf0e10cSrcweir ViewObjectContact* pRetval = new ViewObjectContactOfSdrPage(rObjectContact, *this); 574cdf0e10cSrcweir DBG_ASSERT(pRetval, "ViewContact::CreateObjectSpecificViewObjectContact() failed (!)"); 575cdf0e10cSrcweir 576cdf0e10cSrcweir return *pRetval; 577cdf0e10cSrcweir } 578cdf0e10cSrcweir 579cdf0e10cSrcweir ViewContactOfSdrPage::ViewContactOfSdrPage(SdrPage& rPage) 580cdf0e10cSrcweir : ViewContact(), 581cdf0e10cSrcweir mrPage(rPage), 582cdf0e10cSrcweir maViewContactOfPageBackground(*this), 583cdf0e10cSrcweir maViewContactOfPageShadow(*this), 584cdf0e10cSrcweir maViewContactOfPageFill(*this), 585cdf0e10cSrcweir maViewContactOfMasterPage(*this), 586cdf0e10cSrcweir maViewContactOfOuterPageBorder(*this), 587cdf0e10cSrcweir maViewContactOfInnerPageBorder(*this), 588cdf0e10cSrcweir maViewContactOfGridBack(*this, false), 589cdf0e10cSrcweir maViewContactOfHelplinesBack(*this, false), 590cdf0e10cSrcweir maViewContactOfPageHierarchy(*this), 591cdf0e10cSrcweir maViewContactOfGridFront(*this, true), 592cdf0e10cSrcweir maViewContactOfHelplinesFront(*this, true) 593cdf0e10cSrcweir { 594cdf0e10cSrcweir } 595cdf0e10cSrcweir 596cdf0e10cSrcweir ViewContactOfSdrPage::~ViewContactOfSdrPage() 597cdf0e10cSrcweir { 598cdf0e10cSrcweir } 599cdf0e10cSrcweir 600cdf0e10cSrcweir // Access to possible sub-hierarchy 601cdf0e10cSrcweir sal_uInt32 ViewContactOfSdrPage::GetObjectCount() const 602cdf0e10cSrcweir { 603cdf0e10cSrcweir // Fixed count of content. It contains PageBackground (Wiese), PageShadow, PageFill, 604cdf0e10cSrcweir // then - depending on if the page has a MasterPage - either MasterPage Hierarchy 605cdf0e10cSrcweir // or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of Grid and Helplines 606cdf0e10cSrcweir // (for front and back) which internally are visible or not depending on the current 607cdf0e10cSrcweir // front/back setting for those. 608cdf0e10cSrcweir return 11; 609cdf0e10cSrcweir } 610cdf0e10cSrcweir 611cdf0e10cSrcweir ViewContact& ViewContactOfSdrPage::GetViewContact(sal_uInt32 nIndex) const 612cdf0e10cSrcweir { 613cdf0e10cSrcweir switch(nIndex) 614cdf0e10cSrcweir { 615cdf0e10cSrcweir case 0: return (ViewContact&)maViewContactOfPageBackground; 616cdf0e10cSrcweir case 1: return (ViewContact&)maViewContactOfPageShadow; 617cdf0e10cSrcweir case 2: return (ViewContact&)maViewContactOfPageFill; 618cdf0e10cSrcweir case 3: 619cdf0e10cSrcweir { 620cdf0e10cSrcweir const SdrPage& rPage = GetSdrPage(); 621cdf0e10cSrcweir 622cdf0e10cSrcweir if(rPage.TRG_HasMasterPage()) 623cdf0e10cSrcweir { 624cdf0e10cSrcweir return rPage.TRG_GetMasterPageDescriptorViewContact(); 625cdf0e10cSrcweir } 626cdf0e10cSrcweir else 627cdf0e10cSrcweir { 628cdf0e10cSrcweir return (ViewContact&)maViewContactOfMasterPage; 629cdf0e10cSrcweir } 630cdf0e10cSrcweir } 631cdf0e10cSrcweir case 4: return (ViewContact&)maViewContactOfOuterPageBorder; 632cdf0e10cSrcweir case 5: return (ViewContact&)maViewContactOfInnerPageBorder; 633cdf0e10cSrcweir case 6: return (ViewContact&)maViewContactOfGridBack; 634cdf0e10cSrcweir case 7: return (ViewContact&)maViewContactOfHelplinesBack; 635cdf0e10cSrcweir case 8: return (ViewContact&)maViewContactOfPageHierarchy; 636cdf0e10cSrcweir case 9: return (ViewContact&)maViewContactOfGridFront; 637cdf0e10cSrcweir default: return (ViewContact&)maViewContactOfHelplinesFront; 638cdf0e10cSrcweir } 639cdf0e10cSrcweir } 640cdf0e10cSrcweir 641cdf0e10cSrcweir // React on changes of the object of this ViewContact 642cdf0e10cSrcweir void ViewContactOfSdrPage::ActionChanged() 643cdf0e10cSrcweir { 644cdf0e10cSrcweir // call parent 645cdf0e10cSrcweir ViewContact::ActionChanged(); 646cdf0e10cSrcweir 647cdf0e10cSrcweir // apply to local viewContacts, they all rely on page information. Exception 648cdf0e10cSrcweir // is the sub hierarchy; this will not be influenced by the change 649cdf0e10cSrcweir maViewContactOfPageBackground.ActionChanged(); 650cdf0e10cSrcweir maViewContactOfPageShadow.ActionChanged(); 651cdf0e10cSrcweir maViewContactOfPageFill.ActionChanged(); 652cdf0e10cSrcweir 653cdf0e10cSrcweir const SdrPage& rPage = GetSdrPage(); 654cdf0e10cSrcweir 655cdf0e10cSrcweir if(rPage.TRG_HasMasterPage()) 656cdf0e10cSrcweir { 657cdf0e10cSrcweir rPage.TRG_GetMasterPageDescriptorViewContact().ActionChanged(); 658cdf0e10cSrcweir } 659cdf0e10cSrcweir else if(rPage.IsMasterPage()) 660cdf0e10cSrcweir { 661cdf0e10cSrcweir maViewContactOfMasterPage.ActionChanged(); 662cdf0e10cSrcweir } 663cdf0e10cSrcweir 664cdf0e10cSrcweir maViewContactOfOuterPageBorder.ActionChanged(); 665cdf0e10cSrcweir maViewContactOfInnerPageBorder.ActionChanged(); 666cdf0e10cSrcweir maViewContactOfGridBack.ActionChanged(); 667cdf0e10cSrcweir maViewContactOfHelplinesBack.ActionChanged(); 668cdf0e10cSrcweir maViewContactOfGridFront.ActionChanged(); 669cdf0e10cSrcweir maViewContactOfHelplinesFront.ActionChanged(); 670cdf0e10cSrcweir } 671cdf0e10cSrcweir 672cdf0e10cSrcweir // overload for acessing the SdrPage 673cdf0e10cSrcweir SdrPage* ViewContactOfSdrPage::TryToGetSdrPage() const 674cdf0e10cSrcweir { 675cdf0e10cSrcweir return &GetSdrPage(); 676cdf0e10cSrcweir } 677cdf0e10cSrcweir 678cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrPage::createViewIndependentPrimitive2DSequence() const 679cdf0e10cSrcweir { 680cdf0e10cSrcweir drawinglayer::primitive2d::Primitive2DSequence xRetval; 681cdf0e10cSrcweir 682cdf0e10cSrcweir // collect all sub-sequences including sub hierarchy. 683cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageBackground.getViewIndependentPrimitive2DSequence()); 684cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageShadow.getViewIndependentPrimitive2DSequence()); 685cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageFill.getViewIndependentPrimitive2DSequence()); 686cdf0e10cSrcweir 687cdf0e10cSrcweir const SdrPage& rPage = GetSdrPage(); 688cdf0e10cSrcweir 689cdf0e10cSrcweir if(rPage.TRG_HasMasterPage()) 690cdf0e10cSrcweir { 691cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, 692cdf0e10cSrcweir rPage.TRG_GetMasterPageDescriptorViewContact().getViewIndependentPrimitive2DSequence()); 693cdf0e10cSrcweir } 694cdf0e10cSrcweir else if(rPage.IsMasterPage()) 695cdf0e10cSrcweir { 696cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, 697cdf0e10cSrcweir maViewContactOfMasterPage.getViewIndependentPrimitive2DSequence()); 698cdf0e10cSrcweir } 699cdf0e10cSrcweir 700cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfOuterPageBorder.getViewIndependentPrimitive2DSequence()); 701cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfInnerPageBorder.getViewIndependentPrimitive2DSequence()); 702cdf0e10cSrcweir drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageHierarchy.getViewIndependentPrimitive2DSequence()); 703cdf0e10cSrcweir 704cdf0e10cSrcweir // Only add front versions of grid and helplines since no visibility test is done, 705cdf0e10cSrcweir // so adding the back incarnations is not necessary. This makes the Front 706cdf0e10cSrcweir // visualisation the default when no visibility tests are done. 707cdf0e10cSrcweir // 708cdf0e10cSrcweir // Since we have no view here, no grid and helpline definitions are available currently. The used 709cdf0e10cSrcweir // methods at ViewContactOfHelplines and ViewContactOfGrid return only empty sequences and 710cdf0e10cSrcweir // do not need to be called ATM. This may change later if grid or helpline info gets 711cdf0e10cSrcweir // model data (it should not). Keeping the lines commented to hold this hint. 712cdf0e10cSrcweir // 713cdf0e10cSrcweir // drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfGridFront.getViewIndependentPrimitive2DSequence()); 714cdf0e10cSrcweir // drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfHelplinesFront.getViewIndependentPrimitive2DSequence()); 715cdf0e10cSrcweir 716cdf0e10cSrcweir return xRetval; 717cdf0e10cSrcweir } 718cdf0e10cSrcweir } // end of namespace contact 719cdf0e10cSrcweir } // end of namespace sdr 720cdf0e10cSrcweir 721cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////// 722cdf0e10cSrcweir // eof 723