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 __com_sun_star_document_ImportFilter_idl__ 25#define __com_sun_star_document_ImportFilter_idl__ 26 27#ifndef __com_sun_star_document_XImporter_idl__ 28#include <com/sun/star/document/XImporter.idl> 29#endif 30 31#ifndef __com_sun_star_document_XFilter_idl__ 32#include <com/sun/star/document/XFilter.idl> 33#endif 34 35#ifndef __com_sun_star_lang_XInitialization_idl__ 36#include <com/sun/star/lang/XInitialization.idl> 37#endif 38 39#ifndef __com_sun_star_container_XNamed_idl__ 40#include <com/sun/star/container/XNamed.idl> 41#endif 42 43//============================================================================= 44 45module com { module sun { module star { module document { 46 47//============================================================================= 48/** filter for imports 49 50 <p> 51 Such filters can be used for importing a content. 52 Of course it's possible to combine it with the service <type>ExportFilter</type> 53 if export functionality should be available at same implementation too. 54 </p> 55 56 @see ExportFilter 57 */ 58published service ImportFilter 59{ 60 //------------------------------------------------------------------------- 61 /** set target(!) document for this filter 62 63 <p> 64 The document must be used as the target of the filter. 65 Any external content will be written there. 66 </p> 67 */ 68 interface XImporter; 69 70 //------------------------------------------------------------------------- 71 /** filter interface 72 73 <p> 74 It's used to filter a document at loading time. 75 The target document should be already set by using another interface 76 <member>ImportFilter::XImporter</member> which is supported by this service too. 77 </p> 78 79 <p> 80 Tip:<br> 81 If same implementation provides the service <type>ExportFilter</type> too, 82 code must distinguish between filtering into a target document (for import) or 83 filtering from a source document (for export). This can be recognized by saving 84 state of used interfaces <type>XExporter</type> or <type>XImporter</type>! 85 Otherwise it's not clear which action is required here. 86 </p> 87 */ 88 interface XFilter; 89 90 //------------------------------------------------------------------------- 91 /** support initialization of filter with its own configuration 92 93 <p> 94 A filter object must be created by global service <type>FilterFactory</type>. 95 If filter supports this optional interface, he will be initialized by the factory directly 96 after creation. The factory will pass follow informations to this new instance: 97 <ul> 98 <li>first item will be a set of configuration data of the filter</li> 99 <li>after that will follow may given optional parameters of call 100 <member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments()</member> 101 of service <type>FilterFactory</type>. 102 </li> 103 </ul> 104 See description of service <member>FilterFactory::XNameContainer</member> for a description of 105 possible configuration data. 106 </p> 107 */ 108 [optional] interface com::sun::star::lang::XInitialization; 109 110 //------------------------------------------------------------------------- 111 /** provides access to the internal name of this filter 112 113 <p> 114 This internal filter name can be used on service <type>FilterFactory</type> 115 to get further informations about it (e.g. his registration for mime types or extensions etc.) 116 It's important that returned string is the "internal name" of the filter which must be 117 unambiguous against all other registered filter in current installation. 118 </p> 119 <p> 120 <strong>Attention!</strong><br> 121 Supported method setName() should be ignored or forwarded to the FilterFactory. 122 It's not allowed to set it directly to the configuration. Because it depends 123 from real implementation of the FilterFactory if it will be allowed or not! 124 </p> 125 */ 126 [optional] interface com::sun::star::container::XNamed; 127}; 128 129//============================================================================= 130 131}; }; }; }; 132 133#endif 134