1*172c67b2SArmin Le Grand /**************************************************************
2*172c67b2SArmin Le Grand  *
3*172c67b2SArmin Le Grand  * Licensed to the Apache Software Foundation (ASF) under one
4*172c67b2SArmin Le Grand  * or more contributor license agreements.  See the NOTICE file
5*172c67b2SArmin Le Grand  * distributed with this work for additional information
6*172c67b2SArmin Le Grand  * regarding copyright ownership.  The ASF licenses this file
7*172c67b2SArmin Le Grand  * to you under the Apache License, Version 2.0 (the
8*172c67b2SArmin Le Grand  * "License"); you may not use this file except in compliance
9*172c67b2SArmin Le Grand  * with the License.  You may obtain a copy of the License at
10*172c67b2SArmin Le Grand  *
11*172c67b2SArmin Le Grand  *   http://www.apache.org/licenses/LICENSE-2.0
12*172c67b2SArmin Le Grand  *
13*172c67b2SArmin Le Grand  * Unless required by applicable law or agreed to in writing,
14*172c67b2SArmin Le Grand  * software distributed under the License is distributed on an
15*172c67b2SArmin Le Grand  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*172c67b2SArmin Le Grand  * KIND, either express or implied.  See the License for the
17*172c67b2SArmin Le Grand  * specific language governing permissions and limitations
18*172c67b2SArmin Le Grand  * under the License.
19*172c67b2SArmin Le Grand  *
20*172c67b2SArmin Le Grand  *************************************************************/
21*172c67b2SArmin Le Grand 
22*172c67b2SArmin Le Grand 
23*172c67b2SArmin Le Grand 
24*172c67b2SArmin Le Grand // MARKER(update_precomp.py): autogen include statement, do not remove
25*172c67b2SArmin Le Grand #include "precompiled_drawinglayer.hxx"
26*172c67b2SArmin Le Grand 
27*172c67b2SArmin Le Grand #include <drawinglayer/processor2d/objectinfoextractor2d.hxx>
28*172c67b2SArmin Le Grand #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
29*172c67b2SArmin Le Grand #include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx>
30*172c67b2SArmin Le Grand 
31*172c67b2SArmin Le Grand //////////////////////////////////////////////////////////////////////////////
32*172c67b2SArmin Le Grand 
33*172c67b2SArmin Le Grand using namespace com::sun::star;
34*172c67b2SArmin Le Grand 
35*172c67b2SArmin Le Grand //////////////////////////////////////////////////////////////////////////////
36*172c67b2SArmin Le Grand 
37*172c67b2SArmin Le Grand namespace drawinglayer
38*172c67b2SArmin Le Grand {
39*172c67b2SArmin Le Grand 	namespace processor2d
40*172c67b2SArmin Le Grand 	{
processBasePrimitive2D(const primitive2d::BasePrimitive2D & rCandidate)41*172c67b2SArmin Le Grand         void ObjectInfoPrimitiveExtractor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate)
42*172c67b2SArmin Le Grand         {
43*172c67b2SArmin Le Grand             if(!mpFound)
44*172c67b2SArmin Le Grand             {
45*172c67b2SArmin Le Grand 			    switch(rCandidate.getPrimitive2DID())
46*172c67b2SArmin Le Grand 			    {
47*172c67b2SArmin Le Grand 				    case PRIMITIVE2D_ID_OBJECTINFOPRIMITIVE2D :
48*172c67b2SArmin Le Grand                     {
49*172c67b2SArmin Le Grand                         mpFound = dynamic_cast< const primitive2d::ObjectInfoPrimitive2D* >(&rCandidate);
50*172c67b2SArmin Le Grand                         break;
51*172c67b2SArmin Le Grand                     }
52*172c67b2SArmin Le Grand 				    default :
53*172c67b2SArmin Le Grand 				    {
54*172c67b2SArmin Le Grand 					    // process recursively
55*172c67b2SArmin Le Grand 					    process(rCandidate.get2DDecomposition(getViewInformation2D()));
56*172c67b2SArmin Le Grand 					    break;
57*172c67b2SArmin Le Grand 				    }
58*172c67b2SArmin Le Grand 			    }
59*172c67b2SArmin Le Grand             }
60*172c67b2SArmin Le Grand         }
61*172c67b2SArmin Le Grand 
ObjectInfoPrimitiveExtractor2D(const geometry::ViewInformation2D & rViewInformation)62*172c67b2SArmin Le Grand 		ObjectInfoPrimitiveExtractor2D::ObjectInfoPrimitiveExtractor2D(const geometry::ViewInformation2D& rViewInformation)
63*172c67b2SArmin Le Grand         :   BaseProcessor2D(rViewInformation),
64*172c67b2SArmin Le Grand             mpFound(0)
65*172c67b2SArmin Le Grand         {
66*172c67b2SArmin Le Grand         }
67*172c67b2SArmin Le Grand 
~ObjectInfoPrimitiveExtractor2D()68*172c67b2SArmin Le Grand 		ObjectInfoPrimitiveExtractor2D::~ObjectInfoPrimitiveExtractor2D()
69*172c67b2SArmin Le Grand         {
70*172c67b2SArmin Le Grand         }
71*172c67b2SArmin Le Grand 	} // end of namespace processor2d
72*172c67b2SArmin Le Grand } // end of namespace drawinglayer
73*172c67b2SArmin Le Grand 
74*172c67b2SArmin Le Grand //////////////////////////////////////////////////////////////////////////////
75*172c67b2SArmin Le Grand // eof
76