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_filter.hxx"
26 
27 #include "registration.hxx"
28 
29 //_______________________________________________
30 // includes
31 
32 #ifdef _FILTER_CONFIG_CONSTANT_HXX_
33 #  error "Already included constant.hxx"
34 #else
35 #  define PROPNAME_IMPL_DECL
36 #  include "constant.hxx"
37 #endif
38 #include <stdio.h>
39 #include "typedetection.hxx"
40 #include "filterfactory.hxx"
41 #include "contenthandlerfactory.hxx"
42 #include "frameloaderfactory.hxx"
43 #include "configflush.hxx"
44 
45 //_______________________________________________
46 // namespace
47 
48 namespace filter{
49     namespace config{
50 
51 namespace css = ::com::sun::star;
52 
53 //_______________________________________________
54 // definitions
55 
56 rtl::OUString pFilterStrings[19];
57 static bool bInitialized = false;
58 
InitConstants()59 static void InitConstants()
60 {
61 	if (!bInitialized)
62 	{
63 		::osl::MutexGuard aGuard(::osl::Mutex::getGlobalMutex());
64 		if (!bInitialized)
65 		{
66 			PROPNAME_NAME;
67 			PROPNAME_UINAME;
68 			PROPNAME_UINAMES;
69 			PROPNAME_PREFERRED;
70 			PROPNAME_PREFERREDFILTER;
71 			PROPNAME_DETECTSERVICE;
72 			PROPNAME_MEDIATYPE;
73 			PROPNAME_CLIPBOARDFORMAT;
74 			PROPNAME_URLPATTERN;
75 			PROPNAME_EXTENSIONS;
76 			PROPNAME_TYPE;
77 			PROPNAME_DOCUMENTSERVICE;
78 			PROPNAME_FILTERSERVICE;
79 			PROPNAME_UICOMPONENT;
80 			PROPNAME_FLAGS;
81 			PROPNAME_USERDATA;
82 			PROPNAME_TEMPLATENAME;
83 			PROPNAME_FILEFORMATVERSION;
84 			PROPNAME_TYPES;
85 			bInitialized = true;
86 		}
87 	}
88 }
89 
90 // extern "C" component_getImplementationEnvironment()
91 _COMPHELPER_COMPONENT_GETIMPLEMENTATIONENVIRONMENT
92 
93 // extern "C" component_getFactory()
94 _COMPHELPER_COMPONENT_GETFACTORY
95 (
96 	{ InitConstants(); },
97     _COMPHELPER_MULTIINSTANCEFACTORY( TypeDetection::impl_getImplementationName()   ,
98                                       TypeDetection::impl_getSupportedServiceNames(),
99                                       TypeDetection::impl_createInstance            )
100 
101     _COMPHELPER_MULTIINSTANCEFACTORY( FilterFactory::impl_getImplementationName()   ,
102                                       FilterFactory::impl_getSupportedServiceNames(),
103                                       FilterFactory::impl_createInstance            )
104 
105     _COMPHELPER_MULTIINSTANCEFACTORY( ContentHandlerFactory::impl_getImplementationName()   ,
106                                       ContentHandlerFactory::impl_getSupportedServiceNames(),
107                                       ContentHandlerFactory::impl_createInstance            )
108 
109     _COMPHELPER_MULTIINSTANCEFACTORY( FrameLoaderFactory::impl_getImplementationName()   ,
110                                       FrameLoaderFactory::impl_getSupportedServiceNames(),
111                                       FrameLoaderFactory::impl_createInstance            )
112 
113     _COMPHELPER_ONEINSTANCEFACTORY( ConfigFlush::impl_getImplementationName()   ,
114                                     ConfigFlush::impl_getSupportedServiceNames(),
115                                     ConfigFlush::impl_createInstance            )
116 )
117 
118     } // namespace config
119 } // namespace filter
120