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 #ifndef SVGDIALOG_HXX 23 #define SVGDIALOG_HXX 24 25 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_ 26 #include <com/sun/star/beans/XPropertyAccess.hpp> 27 #endif 28 #ifndef _COM_SUN_STAR_DOCUMENT_XEXPORTER_HPP_ 29 #include <com/sun/star/document/XExporter.hpp> 30 #endif 31 32 #include <svtools/genericunodialog.hxx> 33 #include <memory> 34 35 // ------------- 36 // - SVGDialog - 37 // ------------- 38 39 class ResMgr; 40 41 class SVGDialog : public ::svt::OGenericUnoDialog, 42 public ::comphelper::OPropertyArrayUsageHelper< SVGDialog >, 43 public ::com::sun::star::beans::XPropertyAccess, 44 public ::com::sun::star::document::XExporter 45 { 46 private: 47 48 ::std::auto_ptr< ResMgr > mapResMgr; 49 com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > maMediaDescriptor; 50 com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > maFilterData; 51 com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mxSrcDoc; 52 53 protected: 54 55 // XInterface 56 virtual com::sun::star::uno::Any SAL_CALL queryInterface( const com::sun::star::uno::Type& aType ) throw (com::sun::star::uno::RuntimeException); 57 virtual void SAL_CALL acquire() throw (); 58 virtual void SAL_CALL release() throw (); 59 60 // OGenericUnoDialog 61 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(com::sun::star::uno::RuntimeException); 62 virtual rtl::OUString SAL_CALL getImplementationName() throw (com::sun::star::uno::RuntimeException); 63 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException); 64 virtual Dialog* createDialog( Window* pParent ); 65 virtual void executedDialog( sal_Int16 nExecutionResult ); 66 virtual com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException); 67 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); 68 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; 69 70 // XPropertyAccess 71 using cppu::OPropertySetHelper::getPropertyValues; 72 virtual com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues( ) throw (com::sun::star::uno::RuntimeException); 73 using cppu::OPropertySetHelper::setPropertyValues; 74 virtual void SAL_CALL setPropertyValues( const com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps ) throw (com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException, com::sun::star::uno::RuntimeException); 75 76 // XExporter 77 virtual void SAL_CALL setSourceDocument( const com::sun::star::uno::Reference< com::sun::star::lang::XComponent >& xDoc ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException); 78 79 public: 80 81 SVGDialog( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxMSF ); 82 virtual ~SVGDialog(); 83 }; 84 85 // ----------------------------------------------------------------------------- 86 87 ::rtl::OUString SVGDialog_getImplementationName () 88 throw ( ::com::sun::star::uno::RuntimeException ); 89 90 // ----------------------------------------------------------------------------- 91 92 sal_Bool SAL_CALL SVGDialog_supportsService( const ::rtl::OUString& ServiceName ) 93 throw ( ::com::sun::star::uno::RuntimeException ); 94 95 // ----------------------------------------------------------------------------- 96 97 ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SVGDialog_getSupportedServiceNames( ) 98 throw ( ::com::sun::star::uno::RuntimeException ); 99 100 // ----------------------------------------------------------------------------- 101 102 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > 103 SAL_CALL SVGDialog_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) 104 throw ( ::com::sun::star::uno::Exception ); 105 106 #endif // SVGDialog_HXX 107