blob: fd35225219b7237f9e4802aaf450e30ad158a149 [file] [log] [blame]
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*************************************************************/
#ifndef __com_sun_star_document_ImportFilter_idl__
#define __com_sun_star_document_ImportFilter_idl__
#ifndef __com_sun_star_document_XImporter_idl__
#include <com/sun/star/document/XImporter.idl>
#endif
#ifndef __com_sun_star_document_XFilter_idl__
#include <com/sun/star/document/XFilter.idl>
#endif
#ifndef __com_sun_star_lang_XInitialization_idl__
#include <com/sun/star/lang/XInitialization.idl>
#endif
#ifndef __com_sun_star_container_XNamed_idl__
#include <com/sun/star/container/XNamed.idl>
#endif
//=============================================================================
module com { module sun { module star { module document {
//=============================================================================
/** filter for imports
<p>
Such filters can be used for importing a content.
Of course it's possible to combine it with the service <type>ExportFilter</type>
if export functionality should be available at same implementation too.
</p>
@see ExportFilter
*/
published service ImportFilter
{
//-------------------------------------------------------------------------
/** set target(!) document for this filter
<p>
The document must be used as the target of the filter.
Any external content will be written there.
</p>
*/
interface XImporter;
//-------------------------------------------------------------------------
/** filter interface
<p>
It's used to filter a document at loading time.
The target document should be already setted by using another interface
<member>ImportFilter::XImporter</member> which is supported by this service too.
</p>
<p>
Tip:<br>
If same implementation provides the service <type>ExportFilter</type> too,
code must distinguish between filtering into a target document (for import) or
filtering from a source document (for export). This can be recognized by saving
state of used interfaces <type>XExporter</type> or <type>XImporter</type>!
Otherwise it's not clear which action is required here.
</p>
*/
interface XFilter;
//-------------------------------------------------------------------------
/** support initialization of filter with its own configuration
<p>
A filter object must be created by global service <type>FilterFactory</type>.
If filter supports this optional interface, he will be initialized by the factory directly
after creation. The factory will pass follow informations to this new instance:
<ul>
<li>first item will be a set of configuration data of the filter</li>
<li>after that will follow may given optional parameters of call
<member scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments()</member>
of service <type>FilterFactory</type>.
</li>
</ul>
See description of service <member>FilterFactory::XNameContainer</member> for a description of
possible configuration data.
</p>
*/
[optional] interface com::sun::star::lang::XInitialization;
//-------------------------------------------------------------------------
/** provides access to the internal name of this filter
<p>
This internal filter name can be used on service <type>FilterFactory</type>
to get further informations about it (e.g. his registration for mime types or extensions etc.)
It's important that returned string is the "internal name" of the filter which must be
unambigous against all other registered filter in current instalation.
</p>
<p>
<strong>Attention!</strong><br>
Supported method setName() sould be ignored or forwarded to the FilterFactory.
It's not allowed to set it directly to the configuration. Because it depends
from real implementation of the FilterFactory if it will be allowed or not!
</p>
*/
[optional] interface com::sun::star::container::XNamed;
};
//=============================================================================
}; }; }; };
#endif