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 25#ifndef __com_sun_star_datatransfer_XDataFormatTranslator_idl__ 26#define __com_sun_star_datatransfer_XDataFormatTranslator_idl__ 27 28#ifndef __com_sun_star_uno_XInterface_idl__ 29#include <com/sun/star/uno/XInterface.idl> 30#endif 31 32#ifndef __com_sun_star_datatransfer_DataFlavor_idl__ 33#include <com/sun/star/datatransfer/DataFlavor.idl> 34#endif 35 36module com { module sun { module star { module datatransfer { 37 38//============================================================================= 39/** Interface to be implemented by objects used to translate a <type>DataFlavor</type> to 40 a system dependent data transfer type and vice versa. 41 42 <p>Different platforms use different types to describe data formats available 43 during data exchange operations like clipboard or drag&drop. Windows for instance 44 uses integer values to describe an available clipboard or drag&drop format, Unix 45 X11 uses so called Atoms etc.</p> 46*/ 47 48published interface XDataFormatTranslator : com::sun::star::uno::XInterface 49{ 50 //------------------------------------------------------------------------- 51 /** Converts a <type>DataFlavor</type> to system dependend data type. 52 53 @param aDataFlavor 54 Describes the format for which a system dependent data types is requested. 55 56 @returns 57 A system dependent data transfer type for the given <type>DataFlavor</type> 58 if there is one available. 59 <p>If the is no system dependent data type for a given <type>DataFlavor</type> 60 the returned any is empty.</p> 61 */ 62 any getSystemDataTypeFromDataFlavor( [in] DataFlavor aDataFlavor ); 63 64 //------------------------------------------------------------------------- 65 /** Converts a system dependent data type to a <type>DataFlavor</type>. 66 67 @param aSysDataType 68 A system dependent data type. If aSysDataType is empty so is the returned <type>DataFlavor</type>. 69 70 @returns 71 A <type>DataFlavor</type> for the given system dependent data transfer type. 72 <p>If there is no appropriate mapping for a sytem dependent data type, the returned <type>DataFlavor</type> will be empty.</p> 73 */ 74 DataFlavor getDataFlavorFromSystemDataType( [in] any aSysDataType ); 75}; 76 77}; }; }; }; 78 79#endif 80 81