1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_drawinglayer.hxx"
30 
31 #include <drawinglayer/primitive2d/texthierarchyprimitive2d.hxx>
32 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
33 
34 //////////////////////////////////////////////////////////////////////////////
35 
36 using namespace com::sun::star;
37 
38 //////////////////////////////////////////////////////////////////////////////
39 
40 namespace drawinglayer
41 {
42 	namespace primitive2d
43 	{
44 		TextHierarchyLinePrimitive2D::TextHierarchyLinePrimitive2D(const Primitive2DSequence& rChildren)
45 		:	GroupPrimitive2D(rChildren)
46 		{
47 		}
48 
49 		// provide unique ID
50 		ImplPrimitrive2DIDBlock(TextHierarchyLinePrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYLINEPRIMITIVE2D)
51 
52     } // end of namespace primitive2d
53 } // end of namespace drawinglayer
54 
55 //////////////////////////////////////////////////////////////////////////////
56 
57 namespace drawinglayer
58 {
59 	namespace primitive2d
60 	{
61 		TextHierarchyParagraphPrimitive2D::TextHierarchyParagraphPrimitive2D(const Primitive2DSequence& rChildren)
62 		:	GroupPrimitive2D(rChildren)
63 		{
64 		}
65 
66 		// provide unique ID
67 		ImplPrimitrive2DIDBlock(TextHierarchyParagraphPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYPARAGRAPHPRIMITIVE2D)
68 
69     } // end of namespace primitive2d
70 } // end of namespace drawinglayer
71 
72 //////////////////////////////////////////////////////////////////////////////
73 
74 namespace drawinglayer
75 {
76 	namespace primitive2d
77 	{
78 		TextHierarchyBulletPrimitive2D::TextHierarchyBulletPrimitive2D(const Primitive2DSequence& rChildren)
79 		:	GroupPrimitive2D(rChildren)
80 		{
81 		}
82 
83 		// provide unique ID
84 		ImplPrimitrive2DIDBlock(TextHierarchyBulletPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYBULLETPRIMITIVE2D)
85 
86     } // end of namespace primitive2d
87 } // end of namespace drawinglayer
88 
89 //////////////////////////////////////////////////////////////////////////////
90 
91 namespace drawinglayer
92 {
93 	namespace primitive2d
94 	{
95 		TextHierarchyBlockPrimitive2D::TextHierarchyBlockPrimitive2D(const Primitive2DSequence& rChildren)
96 		:	GroupPrimitive2D(rChildren)
97 		{
98 		}
99 
100 		// provide unique ID
101 		ImplPrimitrive2DIDBlock(TextHierarchyBlockPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYBLOCKPRIMITIVE2D)
102 
103     } // end of namespace primitive2d
104 } // end of namespace drawinglayer
105 
106 //////////////////////////////////////////////////////////////////////////////
107 
108 namespace drawinglayer
109 {
110 	namespace primitive2d
111 	{
112 		TextHierarchyFieldPrimitive2D::TextHierarchyFieldPrimitive2D(
113 			const Primitive2DSequence& rChildren,
114 			const FieldType& rFieldType,
115             const rtl::OUString& rString)
116 		:	GroupPrimitive2D(rChildren),
117 			meType(rFieldType),
118 			maString(rString)
119 		{
120 		}
121 
122 		bool TextHierarchyFieldPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
123 		{
124 			if(GroupPrimitive2D::operator==(rPrimitive))
125 			{
126 				const TextHierarchyFieldPrimitive2D& rCompare = (TextHierarchyFieldPrimitive2D&)rPrimitive;
127 
128 				return (getType() == rCompare.getType()
129                     &&  getString() == rCompare.getString());
130 			}
131 
132 			return false;
133 		}
134 
135 		// provide unique ID
136 		ImplPrimitrive2DIDBlock(TextHierarchyFieldPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYFIELDPRIMITIVE2D)
137 	} // end of namespace primitive2d
138 } // end of namespace drawinglayer
139 
140 //////////////////////////////////////////////////////////////////////////////
141 
142 namespace drawinglayer
143 {
144 	namespace primitive2d
145 	{
146 		TextHierarchyEditPrimitive2D::TextHierarchyEditPrimitive2D(const Primitive2DSequence& rChildren)
147 		:	GroupPrimitive2D(rChildren)
148 		{
149 		}
150 
151 		// provide unique ID
152 		ImplPrimitrive2DIDBlock(TextHierarchyEditPrimitive2D, PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D)
153 
154     } // end of namespace primitive2d
155 } // end of namespace drawinglayer
156 
157 //////////////////////////////////////////////////////////////////////////////
158 // eof
159