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 SC_FILTUNO_HXX 25 #define SC_FILTUNO_HXX 26 27 #include <com/sun/star/beans/XPropertyAccess.hpp> 28 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> 29 #include <com/sun/star/document/XImporter.hpp> 30 #include <com/sun/star/document/XExporter.hpp> 31 #include <com/sun/star/lang/XServiceInfo.hpp> 32 #include <cppuhelper/implbase5.hxx> 33 #include "scdllapi.h" 34 35 namespace com { namespace sun { namespace star { namespace io { 36 class XInputStream; 37 } } } } 38 39 40 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL 41 ScFilterOptionsObj_CreateInstance( 42 const ::com::sun::star::uno::Reference< 43 ::com::sun::star::lang::XMultiServiceFactory >& ); 44 45 46 class ScFilterOptionsObj : public ::cppu::WeakImplHelper5< 47 ::com::sun::star::beans::XPropertyAccess, 48 ::com::sun::star::ui::dialogs::XExecutableDialog, 49 ::com::sun::star::document::XImporter, 50 ::com::sun::star::document::XExporter, 51 ::com::sun::star::lang::XServiceInfo > 52 { 53 private: 54 ::rtl::OUString aFileName; 55 ::rtl::OUString aFilterName; 56 ::rtl::OUString aFilterOptions; 57 ::com::sun::star::uno::Reference< 58 ::com::sun::star::io::XInputStream > xInputStream; 59 sal_Bool bExport; 60 61 public: 62 ScFilterOptionsObj(); 63 virtual ~ScFilterOptionsObj(); 64 65 static ::rtl::OUString getImplementationName_Static(); 66 static ::com::sun::star::uno::Sequence< ::rtl::OUString> getSupportedServiceNames_Static(); 67 68 // XPropertyAccess 69 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > 70 SAL_CALL getPropertyValues(); 71 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< 72 ::com::sun::star::beans::PropertyValue >& aProps ); 73 74 // XExecutableDialog 75 virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ); 76 virtual sal_Int16 SAL_CALL execute(); 77 78 // XImporter 79 virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< 80 ::com::sun::star::lang::XComponent >& xDoc ); 81 82 // XExporter 83 virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< 84 ::com::sun::star::lang::XComponent >& xDoc ); 85 86 // XServiceInfo 87 virtual ::rtl::OUString SAL_CALL getImplementationName(); 88 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ); 89 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(); 90 }; 91 92 93 #endif 94