1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_FILTUNO_HXX 29 #define SC_FILTUNO_HXX 30 31 #include <com/sun/star/beans/XPropertyAccess.hpp> 32 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> 33 #include <com/sun/star/document/XImporter.hpp> 34 #include <com/sun/star/document/XExporter.hpp> 35 #include <com/sun/star/lang/XServiceInfo.hpp> 36 #include <cppuhelper/implbase5.hxx> 37 #include "scdllapi.h" 38 39 namespace com { namespace sun { namespace star { namespace io { 40 class XInputStream; 41 } } } } 42 43 44 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 45 ScFilterOptionsObj_CreateInstance( 46 const ::com::sun::star::uno::Reference< 47 ::com::sun::star::lang::XMultiServiceFactory >& ); 48 49 50 class ScFilterOptionsObj : public ::cppu::WeakImplHelper5< 51 ::com::sun::star::beans::XPropertyAccess, 52 ::com::sun::star::ui::dialogs::XExecutableDialog, 53 ::com::sun::star::document::XImporter, 54 ::com::sun::star::document::XExporter, 55 ::com::sun::star::lang::XServiceInfo > 56 { 57 private: 58 ::rtl::OUString aFileName; 59 ::rtl::OUString aFilterName; 60 ::rtl::OUString aFilterOptions; 61 ::com::sun::star::uno::Reference< 62 ::com::sun::star::io::XInputStream > xInputStream; 63 sal_Bool bExport; 64 65 public: 66 ScFilterOptionsObj(); 67 virtual ~ScFilterOptionsObj(); 68 69 static ::rtl::OUString getImplementationName_Static(); 70 static ::com::sun::star::uno::Sequence< ::rtl::OUString> getSupportedServiceNames_Static(); 71 72 // XPropertyAccess 73 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > 74 SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException); 75 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< 76 ::com::sun::star::beans::PropertyValue >& aProps ) 77 throw (::com::sun::star::beans::UnknownPropertyException, 78 ::com::sun::star::beans::PropertyVetoException, 79 ::com::sun::star::lang::IllegalArgumentException, 80 ::com::sun::star::lang::WrappedTargetException, 81 ::com::sun::star::uno::RuntimeException); 82 83 // XExecutableDialog 84 virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) 85 throw (::com::sun::star::uno::RuntimeException); 86 virtual sal_Int16 SAL_CALL execute() throw (::com::sun::star::uno::RuntimeException); 87 88 // XImporter 89 virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< 90 ::com::sun::star::lang::XComponent >& xDoc ) 91 throw (::com::sun::star::lang::IllegalArgumentException, 92 ::com::sun::star::uno::RuntimeException); 93 94 // XExporter 95 virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< 96 ::com::sun::star::lang::XComponent >& xDoc ) 97 throw (::com::sun::star::lang::IllegalArgumentException, 98 ::com::sun::star::uno::RuntimeException); 99 100 // XServiceInfo 101 virtual ::rtl::OUString SAL_CALL getImplementationName() 102 throw(::com::sun::star::uno::RuntimeException); 103 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) 104 throw(::com::sun::star::uno::RuntimeException); 105 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 106 throw(::com::sun::star::uno::RuntimeException); 107 }; 108 109 110 #endif 111 112