1*f580d42cSArmin Le Grand /**************************************************************
2*f580d42cSArmin Le Grand  *
3*f580d42cSArmin Le Grand  * Licensed to the Apache Software Foundation (ASF) under one
4*f580d42cSArmin Le Grand  * or more contributor license agreements.  See the NOTICE file
5*f580d42cSArmin Le Grand  * distributed with this work for additional information
6*f580d42cSArmin Le Grand  * regarding copyright ownership.  The ASF licenses this file
7*f580d42cSArmin Le Grand  * to you under the Apache License, Version 2.0 (the
8*f580d42cSArmin Le Grand  * "License"); you may not use this file except in compliance
9*f580d42cSArmin Le Grand  * with the License.  You may obtain a copy of the License at
10*f580d42cSArmin Le Grand  *
11*f580d42cSArmin Le Grand  *   http://www.apache.org/licenses/LICENSE-2.0
12*f580d42cSArmin Le Grand  *
13*f580d42cSArmin Le Grand  * Unless required by applicable law or agreed to in writing,
14*f580d42cSArmin Le Grand  * software distributed under the License is distributed on an
15*f580d42cSArmin Le Grand  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f580d42cSArmin Le Grand  * KIND, either express or implied.  See the License for the
17*f580d42cSArmin Le Grand  * specific language governing permissions and limitations
18*f580d42cSArmin Le Grand  * under the License.
19*f580d42cSArmin Le Grand  *
20*f580d42cSArmin Le Grand  *************************************************************/
21*f580d42cSArmin Le Grand 
22*f580d42cSArmin Le Grand 
23*f580d42cSArmin Le Grand 
24*f580d42cSArmin Le Grand // MARKER(update_precomp.py): autogen include statement, do not remove
25*f580d42cSArmin Le Grand #include "precompiled_drawinglayer.hxx"
26*f580d42cSArmin Le Grand 
27*f580d42cSArmin Le Grand #include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx>
28*f580d42cSArmin Le Grand #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
29*f580d42cSArmin Le Grand 
30*f580d42cSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
31*f580d42cSArmin Le Grand 
32*f580d42cSArmin Le Grand using namespace com::sun::star;
33*f580d42cSArmin Le Grand 
34*f580d42cSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
35*f580d42cSArmin Le Grand 
36*f580d42cSArmin Le Grand namespace drawinglayer
37*f580d42cSArmin Le Grand {
38*f580d42cSArmin Le Grand 	namespace primitive2d
39*f580d42cSArmin Le Grand 	{
ObjectInfoPrimitive2D(const Primitive2DSequence & rChildren,const rtl::OUString & rName,const rtl::OUString & rTitle,const rtl::OUString & rDesc)40*f580d42cSArmin Le Grand 		ObjectInfoPrimitive2D::ObjectInfoPrimitive2D(
41*f580d42cSArmin Le Grand             const Primitive2DSequence& rChildren,
42*f580d42cSArmin Le Grand             const rtl::OUString& rName,
43*f580d42cSArmin Le Grand             const rtl::OUString& rTitle,
44*f580d42cSArmin Le Grand             const rtl::OUString& rDesc)
45*f580d42cSArmin Le Grand 		:	GroupPrimitive2D(rChildren),
46*f580d42cSArmin Le Grand             maName(rName),
47*f580d42cSArmin Le Grand             maTitle(rTitle),
48*f580d42cSArmin Le Grand             maDesc(rDesc)
49*f580d42cSArmin Le Grand 		{
50*f580d42cSArmin Le Grand 		}
51*f580d42cSArmin Le Grand 
operator ==(const BasePrimitive2D & rPrimitive) const52*f580d42cSArmin Le Grand 		bool ObjectInfoPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
53*f580d42cSArmin Le Grand 		{
54*f580d42cSArmin Le Grand 			if(GroupPrimitive2D::operator==(rPrimitive))
55*f580d42cSArmin Le Grand 			{
56*f580d42cSArmin Le Grand 				const ObjectInfoPrimitive2D& rCompare = (ObjectInfoPrimitive2D&)rPrimitive;
57*f580d42cSArmin Le Grand 
58*f580d42cSArmin Le Grand 				return (getName() == rCompare.getName()
59*f580d42cSArmin Le Grand                     && getTitle() == rCompare.getTitle()
60*f580d42cSArmin Le Grand                     && getDesc() == rCompare.getDesc());
61*f580d42cSArmin Le Grand 			}
62*f580d42cSArmin Le Grand 
63*f580d42cSArmin Le Grand 			return false;
64*f580d42cSArmin Le Grand 		}
65*f580d42cSArmin Le Grand 
66*f580d42cSArmin Le Grand         // provide unique ID
67*f580d42cSArmin Le Grand 		ImplPrimitrive2DIDBlock(ObjectInfoPrimitive2D, PRIMITIVE2D_ID_OBJECTINFOPRIMITIVE2D)
68*f580d42cSArmin Le Grand 
69*f580d42cSArmin Le Grand     } // end of namespace primitive2d
70*f580d42cSArmin Le Grand } // end of namespace drawinglayer
71*f580d42cSArmin Le Grand 
72*f580d42cSArmin Le Grand //////////////////////////////////////////////////////////////////////////////
73*f580d42cSArmin Le Grand // eof
74