1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX
25 #define INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX
26 
27 #include <sal/types.h>
28 #include <svx/svxdllapi.h>
29 
30 //////////////////////////////////////////////////////////////////////////////
31 // predefines
32 class SfxItemSet;
33 class SdrText;
34 
35 namespace drawinglayer { namespace attribute {
36 	class SdrLineAttribute;
37 	class SdrLineStartEndAttribute;
38 	class SdrShadowAttribute;
39 	class SdrFillAttribute;
40 	class SdrTextAttribute;
41 	class FillGradientAttribute;
42 	class SdrFillGraphicAttribute;
43 	class SdrShadowTextAttribute;
44 	class SdrLineShadowTextAttribute;
45 	class SdrLineFillShadowTextAttribute;
46 	class SdrLineFillShadowAttribute3D;
47 	class SdrSceneAttribute;
48 	class SdrLightingAttribute;
49 	class SdrFillTextAttribute;
50 }}
51 
52 namespace basegfx {
53 	class B2DRange;
54 }
55 
56 //////////////////////////////////////////////////////////////////////////////
57 
58 namespace drawinglayer
59 {
60 	namespace primitive2d
61 	{
62 		// SdrAttribute creators
63 		attribute::SdrLineAttribute SVX_DLLPUBLIC createNewSdrLineAttribute(
64 			const SfxItemSet& rSet);
65 
66 		attribute::SdrLineStartEndAttribute SVX_DLLPUBLIC createNewSdrLineStartEndAttribute(
67 			const SfxItemSet& rSet,
68 			double fWidth);
69 
70 		attribute::SdrShadowAttribute createNewSdrShadowAttribute(
71 			const SfxItemSet& rSet);
72 
73 		attribute::SdrFillAttribute createNewSdrFillAttribute(
74 			const SfxItemSet& rSet);
75 
76 		// #i101508# Support handing over given text-to-border distances
77 		attribute::SdrTextAttribute createNewSdrTextAttribute(
78 			const SfxItemSet& rSet,
79 			const SdrText& rText,
80 			const sal_Int32* pLeft = 0,
81 			const sal_Int32* pUpper = 0,
82 			const sal_Int32* pRight = 0,
83 			const sal_Int32* pLower = 0);
84 
85 		attribute::FillGradientAttribute createNewTransparenceGradientAttribute(
86 			const SfxItemSet& rSet);
87 
88 		attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute(
89 			const SfxItemSet& rSet);
90 
91 		attribute::SdrShadowTextAttribute createNewSdrShadowTextAttribute(
92             const SfxItemSet& rSet,
93             const SdrText* pText,
94             bool bSuppressText); // #i98072# added option to suppress text on demand
95 
96 		attribute::SdrLineShadowTextAttribute createNewSdrLineShadowTextAttribute(
97 			const SfxItemSet& rSet,
98 			const SdrText* pText);
99 
100 		attribute::SdrLineFillShadowTextAttribute createNewSdrLineFillShadowTextAttribute(
101 			const SfxItemSet& rSet,
102 			const SdrText* pText,
103             bool bHasContent); // used from OLE and graphic
104 
105 		attribute::SdrLineFillShadowAttribute3D createNewSdrLineFillShadowAttribute(
106 			const SfxItemSet& rSet,
107 			bool bSuppressFill);
108 
109 		attribute::SdrSceneAttribute createNewSdrSceneAttribute(
110 			const SfxItemSet& rSet);
111 
112 		attribute::SdrLightingAttribute createNewSdrLightingAttribute(
113 			const SfxItemSet& rSet);
114 
115 		// #i101508# Support handing over given text-to-border distances
116 		attribute::SdrFillTextAttribute createNewSdrFillTextAttribute(
117 			const SfxItemSet& rSet,
118 			const SdrText* pSdrText,
119 			const sal_Int32* pLeft = 0,
120 			const sal_Int32* pUpper = 0,
121 			const sal_Int32* pRight = 0,
122 			const sal_Int32* pLower = 0);
123 
124 		// helpers
125 		void calculateRelativeCornerRadius(
126 			sal_Int32 nRadius,
127 			const ::basegfx::B2DRange& rObjectRange,
128 			double& rfCornerRadiusX,
129 			double& rfCornerRadiusY);
130 
131 	} // end of namespace primitive2d
132 } // end of namespace drawinglayer
133 
134 //////////////////////////////////////////////////////////////////////////////
135 
136 #endif //INCLUDED_SDR_PRIMITIVE2D_SDRATTRIBUTECREATOR_HXX
137 
138 // eof
139