fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / sdr / primitive2d / sdrcustomshapeprimitive2d.hxx
blobb70b8e7057a9ccb72313dfaafd78e4ad8e4eb5a2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SDR_PRIMITIVE2D_SDCUSTOMSHAPEPRIMITIVE2D_HXX
21 #define INCLUDED_SDR_PRIMITIVE2D_SDCUSTOMSHAPEPRIMITIVE2D_HXX
23 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
24 #include <basegfx/matrix/b2dhommatrix.hxx>
25 #include <svx/sdr/attribute/sdrshadowtextattribute.hxx>
27 //////////////////////////////////////////////////////////////////////////////
28 // predefines
30 //////////////////////////////////////////////////////////////////////////////
32 namespace drawinglayer
34 namespace primitive2d
36 class SdrCustomShapePrimitive2D : public BufferedDecompositionPrimitive2D
38 private:
39 attribute::SdrShadowTextAttribute maSdrSTAttribute;
40 Primitive2DSequence maSubPrimitives;
41 basegfx::B2DHomMatrix maTextBox;
43 // bitfield
44 // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means
45 // that the text needs to be block formatted
46 unsigned mbWordWrap : 1;
48 // defines that the object contains/is a 3D AutoShape. Needed for
49 // making exceptions with shadow generation
50 unsigned mb3DShape : 1;
52 // #SJ# Allow text clipping against TextBox in special cases (used for SC)
53 unsigned mbForceTextClipToTextRange : 1;
55 protected:
56 // local decomposition.
57 virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const;
59 public:
60 SdrCustomShapePrimitive2D(
61 const attribute::SdrShadowTextAttribute& rSdrSTAttribute,
62 const Primitive2DSequence& rSubPrimitives,
63 const basegfx::B2DHomMatrix& rTextBox,
64 bool bWordWrap,
65 bool b3DShape,
66 bool bForceTextClipToTextRange);
68 // data access
69 const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; }
70 const Primitive2DSequence& getSubPrimitives() const { return maSubPrimitives; }
71 const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; }
72 bool getWordWrap() const { return mbWordWrap; }
73 bool get3DShape() const { return mb3DShape; }
74 bool isForceTextClipToTextRange() const { return mbForceTextClipToTextRange; }
76 // compare operator
77 virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
79 // provide unique ID
80 DeclPrimitive2DIDBlock()
82 } // end of namespace primitive2d
83 } // end of namespace drawinglayer
85 //////////////////////////////////////////////////////////////////////////////
87 #endif //INCLUDED_SDR_PRIMITIVE2D_SDCUSTOMSHAPEPRIMITIVE2D_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */