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 #ifndef RPTXML_DBLOADER2_HXX
25 #define RPTXML_DBLOADER2_HXX
26 
27 #include <toolkit/helper/vclunohelper.hxx>
28 #include <tools/urlobj.hxx>
29 #include <toolkit/awt/vclxwindow.hxx>
30 #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
31 #include <com/sun/star/task/XStatusIndicator.hpp>
32 #include <com/sun/star/frame/XController.hpp>
33 #include <com/sun/star/frame/XFrame.hpp>
34 #include <com/sun/star/frame/XFrameLoader.hpp>
35 #include <com/sun/star/document/XEventListener.hpp>
36 #include <com/sun/star/sdb/XDocumentDataSource.hpp>
37 #include <com/sun/star/frame/XLoadEventListener.hpp>
38 #include <com/sun/star/embed/XStorage.hpp>
39 #include <com/sun/star/embed/ElementModes.hpp>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
41 #include <com/sun/star/beans/NamedValue.hpp>
42 #include <com/sun/star/beans/XPropertySet.hpp>
43 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
44 #include <com/sun/star/io/XInputStream.hpp>
45 #include <com/sun/star/frame/XModel.hpp>
46 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
47 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
48 #include <com/sun/star/container/XSet.hpp>
49 #include <com/sun/star/document/XFilter.hpp>
50 #include <com/sun/star/util/XURLTransformer.hpp>
51 #include <com/sun/star/registry/XRegistryKey.hpp>
52 #include <com/sun/star/document/XExtendedFilterDetection.hpp>
53 #include <cppuhelper/implbase2.hxx>
54 #include <com/sun/star/lang/XInitialization.hpp>
55 #include <vcl/svapp.hxx>
56 #include <ucbhelper/content.hxx>
57 #include <ucbhelper/commandenvironment.hxx>
58 #include <comphelper/processfactory.hxx>
59 #include <comphelper/documentconstants.hxx>
60 #include <comphelper/types.hxx>
61 #include <comphelper/sequenceashashmap.hxx>
62 #include <osl/file.hxx>
63 #include <ucbhelper/contentbroker.hxx>
64 #include <sfx2/docfile.hxx>
65 #include <unotools/moduleoptions.hxx>
66 #include <comphelper/stl_types.hxx>
67 #include <comphelper/storagehelper.hxx>
68 #include <com/sun/star/task/XJobExecutor.hpp>
69 #include <vcl/msgbox.hxx>
70 
71 // -------------------------------------------------------------------------
72 namespace rptxml
73 {
74 
75     class ORptTypeDetection : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo>
76 {
77 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
78 public:
79 	ORptTypeDetection(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
80 
81 	// XServiceInfo
82 	::rtl::OUString					                    SAL_CALL getImplementationName() throw(  );
83 	sal_Bool 						                    SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(  );
84 	::com::sun::star::uno::Sequence< ::rtl::OUString > 	SAL_CALL getSupportedServiceNames(void) throw(  );
85 
86 	// static methods
getImplementationName_Static(void)87 	static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException )
88 	{
89 		return ::rtl::OUString::createFromAscii("com.sun.star.comp.report.ORptTypeDetection");
90 	}
91 	static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
92 	static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
93     create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
94 
95 	virtual ::rtl::OUString SAL_CALL detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Descriptor ) throw (::com::sun::star::uno::RuntimeException);
96 };
97 }
98 #endif
99