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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_drawinglayer.hxx"
26 
27 #include <drawinglayer/primitive2d/texthierarchyprimitive2d.hxx>
28 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
29 
30 //////////////////////////////////////////////////////////////////////////////
31 
32 using namespace com::sun::star;
33 
34 //////////////////////////////////////////////////////////////////////////////
35 
36 namespace drawinglayer
37 {
38 	namespace primitive2d
39 	{
TextHierarchyLinePrimitive2D(const Primitive2DSequence & rChildren)40 		TextHierarchyLinePrimitive2D::TextHierarchyLinePrimitive2D(const Primitive2DSequence& rChildren)
41 		:	GroupPrimitive2D(rChildren)
42 		{
43 		}
44 
45 		// provide unique ID
46 		ImplPrimitrive2DIDBlock(TextHierarchyLinePrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYLINEPRIMITIVE2D)
47 
48     } // end of namespace primitive2d
49 } // end of namespace drawinglayer
50 
51 //////////////////////////////////////////////////////////////////////////////
52 
53 namespace drawinglayer
54 {
55 	namespace primitive2d
56 	{
TextHierarchyParagraphPrimitive2D(const Primitive2DSequence & rChildren)57 		TextHierarchyParagraphPrimitive2D::TextHierarchyParagraphPrimitive2D(const Primitive2DSequence& rChildren)
58 		:	GroupPrimitive2D(rChildren)
59 		{
60 		}
61 
62 		// provide unique ID
63 		ImplPrimitrive2DIDBlock(TextHierarchyParagraphPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYPARAGRAPHPRIMITIVE2D)
64 
65     } // end of namespace primitive2d
66 } // end of namespace drawinglayer
67 
68 //////////////////////////////////////////////////////////////////////////////
69 
70 namespace drawinglayer
71 {
72 	namespace primitive2d
73 	{
TextHierarchyBulletPrimitive2D(const Primitive2DSequence & rChildren)74 		TextHierarchyBulletPrimitive2D::TextHierarchyBulletPrimitive2D(const Primitive2DSequence& rChildren)
75 		:	GroupPrimitive2D(rChildren)
76 		{
77 		}
78 
79 		// provide unique ID
80 		ImplPrimitrive2DIDBlock(TextHierarchyBulletPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYBULLETPRIMITIVE2D)
81 
82     } // end of namespace primitive2d
83 } // end of namespace drawinglayer
84 
85 //////////////////////////////////////////////////////////////////////////////
86 
87 namespace drawinglayer
88 {
89 	namespace primitive2d
90 	{
TextHierarchyBlockPrimitive2D(const Primitive2DSequence & rChildren)91 		TextHierarchyBlockPrimitive2D::TextHierarchyBlockPrimitive2D(const Primitive2DSequence& rChildren)
92 		:	GroupPrimitive2D(rChildren)
93 		{
94 		}
95 
96 		// provide unique ID
97 		ImplPrimitrive2DIDBlock(TextHierarchyBlockPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYBLOCKPRIMITIVE2D)
98 
99     } // end of namespace primitive2d
100 } // end of namespace drawinglayer
101 
102 //////////////////////////////////////////////////////////////////////////////
103 
104 namespace drawinglayer
105 {
106 	namespace primitive2d
107 	{
TextHierarchyFieldPrimitive2D(const Primitive2DSequence & rChildren,const FieldType & rFieldType,const rtl::OUString & rString)108 		TextHierarchyFieldPrimitive2D::TextHierarchyFieldPrimitive2D(
109 			const Primitive2DSequence& rChildren,
110 			const FieldType& rFieldType,
111             const rtl::OUString& rString)
112 		:	GroupPrimitive2D(rChildren),
113 			meType(rFieldType),
114 			maString(rString)
115 		{
116 		}
117 
operator ==(const BasePrimitive2D & rPrimitive) const118 		bool TextHierarchyFieldPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
119 		{
120 			if(GroupPrimitive2D::operator==(rPrimitive))
121 			{
122 				const TextHierarchyFieldPrimitive2D& rCompare = (TextHierarchyFieldPrimitive2D&)rPrimitive;
123 
124 				return (getType() == rCompare.getType()
125                     &&  getString() == rCompare.getString());
126 			}
127 
128 			return false;
129 		}
130 
131 		// provide unique ID
132 		ImplPrimitrive2DIDBlock(TextHierarchyFieldPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYFIELDPRIMITIVE2D)
133 	} // end of namespace primitive2d
134 } // end of namespace drawinglayer
135 
136 //////////////////////////////////////////////////////////////////////////////
137 
138 namespace drawinglayer
139 {
140 	namespace primitive2d
141 	{
TextHierarchyEditPrimitive2D(const Primitive2DSequence & rChildren)142 		TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(const Primitive2DSequence& rChildren)
143 		:	GroupPrimitive2D(rChildren)
144 		{
145 		}
146 
147 		// provide unique ID
148 		ImplPrimitrive2DIDBlock(TextHierarchyEditPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D)
149 
150     } // end of namespace primitive2d
151 } // end of namespace drawinglayer
152 
153 //////////////////////////////////////////////////////////////////////////////
154 // eof
155