LibreOffice Module svx (master)  1
viewcontactofmasterpagedescriptor.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
22 #include <svx/svdpage.hxx>
24 #include <svx/svdobj.hxx>
26 #include <vcl/timer.hxx>
27 #include <svx/svdpagv.hxx>
28 #include <svx/svdview.hxx>
38 
39 
40 namespace sdr
41 {
42  namespace contact
43  {
45  {
46  return *(new ViewObjectContactOfMasterPageDescriptor(rObjectContact, *this));
47  }
48 
50  {
54 
55  if(pCorrectProperties)
56  {
57  // create page fill attributes when correct properties were identified
59  }
60 
61  if(!aFill.isDefault())
62  {
63  // direct model data is the page size, get and use it
64  const SdrPage& rOwnerPage = GetMasterPageDescriptor().GetOwnerPage();
65  const basegfx::B2DRange aInnerRange(
66  rOwnerPage.GetLeftBorder(), rOwnerPage.GetUpperBorder(),
67  rOwnerPage.GetWidth() - rOwnerPage.GetRightBorder(),
68  rOwnerPage.GetHeight() - rOwnerPage.GetLowerBorder());
69  const basegfx::B2DPolygon aInnerPolgon(basegfx::utils::createPolygonFromRect(aInnerRange));
72  basegfx::B2DPolyPolygon(aInnerPolgon),
73  aFill,
75 
77  }
78 
79  return xRetval;
80  }
81 
82  // basic constructor
84  : ViewContact(),
85  mrMasterPageDescriptor(rDescriptor)
86  {
87  }
88 
89  // The destructor.
91  {
92  }
93 
95  {
97  }
98 
100  {
102  }
103 
105  {
107  }
108  } // end of namespace contact
109 } // end of namespace sdr
110 
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 GetHeight() const
Definition: svdpage.cxx:1417
virtual ViewContact & GetViewContact(sal_uInt32 nIndex) const override
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:773
sal_Int32 GetRightBorder() const
Definition: svdpage.cxx:1502
size_t GetObjCount() const
Definition: svdpage.cxx:767
attribute::SdrFillAttribute createNewSdrFillAttribute(const SfxItemSet &rSet)
sal_Int32 GetLowerBorder() const
Definition: svdpage.cxx:1507
sal_Int32 GetLeftBorder() const
Definition: svdpage.cxx:1492
sdr::contact::ViewContact & GetViewContact() const
Definition: svdobj.cxx:271
Primitive2DReference createPolyPolygonFillPrimitive(const basegfx::B2DPolyPolygon &rPolyPolygon, const attribute::SdrFillAttribute &rFill, const attribute::FillGradientAttribute &rFillGradient)
virtual ViewObjectContact & CreateObjectSpecificViewObjectContact(ObjectContact &rObjectContact) override
const SdrPageProperties * getCorrectSdrPageProperties() const
sal_Int32 GetUpperBorder() const
Definition: svdpage.cxx:1497
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
const SfxItemSet & GetItemSet() const
Definition: svdpage.hxx:335
virtual drawinglayer::primitive2d::Primitive2DContainer createViewIndependentPrimitive2DSequence() const override
const sdr::contact::ViewContact & GetViewContact() const
Definition: svdpage.cxx:1124
css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:366
sal_Int32 GetWidth() const
Definition: svdpage.cxx:1391
ViewContactOfMasterPageDescriptor(sdr::MasterPageDescriptor &rDescriptor)