xref: /aoo42x/main/sw/source/ui/uno/swdetect.hxx (revision 1d2dbeb0)
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 #ifndef _SW_TYPEDETECT_HXX
24 #define _SW_TYPEDETECT_HXX
25 
26 #include <rtl/ustring.hxx>
27 #include <tools/debug.hxx>
28 #include <com/sun/star/document/XExtendedFilterDetection.hpp>
29 #include <com/sun/star/uno/Exception.hpp>
30 #include <com/sun/star/uno/Reference.h>
31 #include <cppuhelper/implbase2.hxx>
32 
33 #include <com/sun/star/lang/XServiceInfo.hpp>
34 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
35 #include <cppuhelper/factory.hxx>
36 #include <tools/link.hxx>
37 #include <tools/string.hxx>
38 
39 class SfxMedium;
40 
41 namespace com
42 {
43     namespace sun
44     {
45         namespace star
46         {
47             namespace uno
48             {
49                 class Any;
50             }
51             namespace lang
52             {
53                 class XMultiServiceFactory;
54             }
55             namespace frame
56             {
57                 class XFrame;
58             }
59             namespace beans
60             {
61                 struct PropertyValue;
62             }
63         }
64     }
65 }
66 
67 #include <sfx2/sfxuno.hxx>
68 class SfxMedium;
69 class SfxFilter;
70 
71 #define REFERENCE ::com::sun::star::uno::Reference
72 #define SEQUENCE ::com::sun::star::uno::Sequence
73 #define RUNTIME_EXCEPTION ::com::sun::star::uno::RuntimeException
74 
75 class SwFilterDetect : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo >
76 {
77 	static sal_uLong	DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
78 	static sal_uLong	GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
79 public:
80                             SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
81     virtual                 ~SwFilterDetect();
82 
83     SFX_DECL_XSERVICEINFO
84 
85 	//----------------------------------------------------------------------------------
86     // XExtendedFilterDetect
87 	//----------------------------------------------------------------------------------
88     virtual ::rtl::OUString SAL_CALL detect( SEQUENCE< ::com::sun::star::beans::PropertyValue >& lDescriptor ) throw( RUNTIME_EXCEPTION );
89 };
90 
91 #endif
92