LibreOffice Module svx (master)  1
sdrcustomshapeprimitive2d.hxx
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 
20 #ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
21 #define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
22 
26 
27 
28 // predefines
29 
30 
32  {
34  {
35  private:
39 
40  // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means
41  // that the text needs to be block formatted
42  bool mbWordWrap : 1;
43 
44  // defines that the object contains/is a 3D AutoShape. Needed for
45  // making exceptions with shadow generation
46  bool mb3DShape : 1;
47 
49 
50  protected:
51  // local decomposition.
52  virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override;
53 
54  public:
56  const attribute::SdrEffectsTextAttribute& rSdrSTAttribute,
57  const Primitive2DContainer& rSubPrimitives,
58  const basegfx::B2DHomMatrix& rTextBox,
59  bool bWordWrap,
60  bool b3DShape,
61  const basegfx::B2DHomMatrix& rObjectMatrix);
62 
63  // data access
66  const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; }
67  bool getWordWrap() const { return mbWordWrap; }
68  bool get3DShape() const { return mb3DShape; }
69 
70  // compare operator
71  virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
72 
73  // provide unique ID
74  virtual sal_uInt32 getPrimitive2DID() const override;
75  };
76 } // end of namespace drawinglayer::primitive2d
77 
78 
79 #endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
80 
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_uInt32 getPrimitive2DID() const override
const attribute::SdrEffectsTextAttribute & getSdrSTAttribute() const
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
SdrCustomShapePrimitive2D(const attribute::SdrEffectsTextAttribute &rSdrSTAttribute, const Primitive2DContainer &rSubPrimitives, const basegfx::B2DHomMatrix &rTextBox, bool bWordWrap, bool b3DShape, const basegfx::B2DHomMatrix &rObjectMatrix)
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &aViewInformation) const override