LibreOffice Module svx (master)  1
sdrframeborderprimitive2d.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_SDRFRAMEBORDERPRIMITIVE2D_HXX
21 #define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRFRAMEBORDERPRIMITIVE2D_HXX
22 
24 #include <svx/framelink.hxx>
25 
26 // predefines
27 
28 namespace drawinglayer
29 {
30  namespace primitive2d
31  {
33  {
34  private:
40 
42  {
43  private:
47 
48  public:
50  const svx::frame::Style& rStyle,
51  const basegfx::B2DVector& rNormalizedPerpendicular,
52  bool bStyleMirrored);
53 
54  const svx::frame::Style& getStyle() const { return maStyle; }
55  const basegfx::B2DVector& getNormalizedPerpendicular() const { return maNormalizedPerpendicular; }
56  bool getStyleMirrored() const { return mbStyleMirrored; }
57  bool operator==(const SdrConnectStyleData& rCompare) const;
58  };
59 
60  std::vector<SdrConnectStyleData> maStart;
61  std::vector<SdrConnectStyleData> maEnd;
62 
63  public:
65  const basegfx::B2DPoint& rOrigin,
66  const basegfx::B2DVector& rX,
67  const svx::frame::Style& rStyle,
68  const Color* pForceColor);
69 
70  void addSdrConnectStyleData(
71  bool bStart,
72  const svx::frame::Style& rStyle,
73  const basegfx::B2DVector& rNormalizedPerpendicular,
74  bool bStyleMirrored);
75 
76  void create2DDecomposition(
77  Primitive2DContainer& rContainer,
78  double fMinDiscreteUnit) const;
79 
80  double getMinimalNonZeroBorderWidth() const;
81  bool operator==(const SdrFrameBorderData& rCompare) const;
82  };
83 
84  typedef std::vector<SdrFrameBorderData> SdrFrameBorderDataVector;
85 
86  } // end of namespace primitive2d
87 } // end of namespace drawinglayer
88 
89 namespace drawinglayer
90 {
91  namespace primitive2d
92  {
94  {
95  private:
96  std::shared_ptr<SdrFrameBorderDataVector> maFrameBorders;
100 
101  // local decomposition.
102  virtual void create2DDecomposition(
103  Primitive2DContainer& rContainer,
104  const geometry::ViewInformation2D& aViewInformation) const override;
105 
106  public:
108  std::shared_ptr<SdrFrameBorderDataVector>& rFrameBorders,
109  bool bForceToSingleDiscreteUnit);
110 
111  // compare operator
112  virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
113 
114  // override to get view-dependent
115  virtual void get2DDecomposition(
117  const geometry::ViewInformation2D& rViewInformation) const override;
118 
119  // data access
120  const std::shared_ptr<SdrFrameBorderDataVector>& getFrameBorders() const { return maFrameBorders; }
121  bool doForceToSingleDiscreteUnit() const { return mbForceToSingleDiscreteUnit; }
122 
123  // provide unique ID
124  virtual sal_uInt32 getPrimitive2DID() const override;
125  };
126  } // end of namespace primitive2d
127 } // end of namespace drawinglayer
128 
129 
130 #endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRFRAMEBORDERPRIMITIVE2D_HXX
131 
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< SdrFrameBorderData > SdrFrameBorderDataVector
const std::shared_ptr< SdrFrameBorderDataVector > & getFrameBorders() const
std::shared_ptr< SdrFrameBorderDataVector > maFrameBorders
basegfx::B2DVector maX
start point of borderline
svx::frame::Style maStyle
X-Axis of borderline with length.
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35
Contains the widths of primary and secondary line of a frame style.
Definition: framelink.hxx:101
bool operator==(const ScCsvLayoutData &rData1, const ScCsvLayoutData &rData2)