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 _SWXFILTEROPTIONS_HXX 24 #define _SWXFILTEROPTIONS_HXX 25 26 #include <com/sun/star/beans/XPropertyAccess.hpp> 27 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> 28 #include <com/sun/star/document/XImporter.hpp> 29 #include <com/sun/star/document/XExporter.hpp> 30 #include <com/sun/star/lang/XServiceInfo.hpp> 31 #include <cppuhelper/implbase5.hxx> 32 33 namespace com { namespace sun { namespace star { namespace io { 34 class XInputStream; 35 } } } } 36 37 38 /* -----------------------------2002/06/21 12:07------------------------------ 39 40 ---------------------------------------------------------------------------*/ 41 class SwXFilterOptions : public ::cppu::WeakImplHelper5< 42 ::com::sun::star::beans::XPropertyAccess, 43 ::com::sun::star::ui::dialogs::XExecutableDialog, 44 ::com::sun::star::document::XImporter, 45 ::com::sun::star::document::XExporter, 46 ::com::sun::star::lang::XServiceInfo > 47 { 48 ::rtl::OUString sFilterName; 49 ::rtl::OUString sFilterOptions; 50 51 ::com::sun::star::uno::Reference< 52 ::com::sun::star::io::XInputStream > xInputStream; 53 ::com::sun::star::uno::Reference< 54 ::com::sun::star::lang::XComponent > xModel; 55 sal_Bool bExport; 56 57 public: 58 SwXFilterOptions(); 59 virtual ~SwXFilterOptions(); 60 61 static ::rtl::OUString getImplementationName_Static(); 62 static ::com::sun::star::uno::Sequence< ::rtl::OUString> getSupportedServiceNames_Static(); 63 64 // XPropertyAccess 65 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > 66 SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException); 67 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< 68 ::com::sun::star::beans::PropertyValue >& aProps ) 69 throw (::com::sun::star::beans::UnknownPropertyException, 70 ::com::sun::star::beans::PropertyVetoException, 71 ::com::sun::star::lang::IllegalArgumentException, 72 ::com::sun::star::lang::WrappedTargetException, 73 ::com::sun::star::uno::RuntimeException); 74 75 // XExecutableDialog 76 virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) 77 throw (::com::sun::star::uno::RuntimeException); 78 virtual sal_Int16 SAL_CALL execute() throw (::com::sun::star::uno::RuntimeException); 79 80 // XImporter 81 virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< 82 ::com::sun::star::lang::XComponent >& xDoc ) 83 throw (::com::sun::star::lang::IllegalArgumentException, 84 ::com::sun::star::uno::RuntimeException); 85 86 // XExporter 87 virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< 88 ::com::sun::star::lang::XComponent >& xDoc ) 89 throw (::com::sun::star::lang::IllegalArgumentException, 90 ::com::sun::star::uno::RuntimeException); 91 92 // XServiceInfo 93 virtual ::rtl::OUString SAL_CALL getImplementationName() 94 throw(::com::sun::star::uno::RuntimeException); 95 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 96 throw(::com::sun::star::uno::RuntimeException); 97 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 98 throw(::com::sun::star::uno::RuntimeException); 99 100 }; 101 102 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 103 SwXFilterOptions_createInstance( 104 const ::com::sun::star::uno::Reference< 105 ::com::sun::star::lang::XMultiServiceFactory >& ); 106 107 #endif 108 109 110