xref: /aoo4110/main/sd/source/core/sdobjfac.cxx (revision b1cdbd2c)
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_sd.hxx"
26 
27 
28 #include <basic/sbx.hxx>
29 
30 #include <app.hxx>
31 #include "sdpage.hxx"
32 #include "sdobjfac.hxx"
33 #include "glob.hxx"
34 #include "anminfo.hxx"
35 #include "imapinfo.hxx"
36 #include "drawdoc.hxx"
37 
38 
39 SdObjectFactory aSdObjectFactory;
40 
41 /*************************************************************************
42 |*
43 |* void SdObjectFactory::MakeUserData()
44 |*
45 \************************************************************************/
46 
IMPL_LINK(SdObjectFactory,MakeUserData,SdrObjFactory *,pObjFactory)47 IMPL_LINK( SdObjectFactory, MakeUserData, SdrObjFactory *, pObjFactory )
48 {
49 	if ( pObjFactory->nInventor == SdUDInventor )
50 	{
51 		switch( pObjFactory->nIdentifier )
52 		{
53 			case( SD_ANIMATIONINFO_ID ):
54 				pObjFactory->pNewData = new SdAnimationInfo( *pObjFactory->pObj );
55 			break;
56 
57 			case( SD_IMAPINFO_ID ):
58 				pObjFactory->pNewData = new SdIMapInfo;
59 			break;
60 
61 			default:
62 			break;
63 		}
64 	}
65 
66 	if ( pObjFactory->pNewData )
67 		return 0;
68 
69 	if( aOldMakeUserDataLink.IsSet() )
70 		aOldMakeUserDataLink.Call( this );
71 
72 	return 0;
73 }
74 
75 
76