Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / awt / XUnitConversion.idl
blob9b5807217a6781d13c58070e42011139d877b835
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XUnitConversion.idl,v $
11 * $Revision: 1.2.54.1 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
31 #ifndef __com_sun_star_awt_XUnitConversion_idl__
32 #define __com_sun_star_awt_XUnitConversion_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include <com/sun/star/uno/XInterface.idl>
36 #endif
38 #ifndef __com_sun_star_awt_Point_idl__
39 #include <com/sun/star/awt/Point.idl>
40 #endif
42 #ifndef __com_sun_star_awt_Size_idl__
43 #include <com/sun/star/awt/Size.idl>
44 #endif
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include <com/sun/star/lang/IllegalArgumentException.idl>
48 #endif
50 //=============================================================================
52 module com { module sun { module star { module awt {
54 //=============================================================================
56 /** allows converting between different measurement units
58 @since OOo 3.0
60 interface XUnitConversion: com::sun::star::uno::XInterface
62 /** converts the given <type>Point</type>, which is specified in pixels, into the given logical unit
64 @param Point
65 A given <type>Point</type> in a well known type
66 @param TargetUnit
67 A type from <type scope="com::sun::star::util">MeasureUnit</type> in which the Point will convert to.
69 @return
70 Returns a new <type>Point</type> in the TargetUnit type format.
72 com::sun::star::awt::Point convertPointToLogic( [in] com::sun::star::awt::Point Point, [in] short TargetUnit )
73 raises ( com::sun::star::lang::IllegalArgumentException );
75 /** converts the given <type>Point</type>, which is specified in the given logical unit, into pixels
77 @param Point
78 A given Point in the SourceUnit type
79 @param SourceUnit
80 The type from <type scope="com::sun::star::util">MeasureUnit</type> of the Point.
82 @return
83 Return a new <type>Point</type> in Pixel type format.
85 com::sun::star::awt::Point convertPointToPixel( [in] com::sun::star::awt::Point aPoint, [in] short SourceUnit )
86 raises ( com::sun::star::lang::IllegalArgumentException );
89 /** converts the given <type>Size</type>, which is specified in pixels, into the given logical unit
91 @param aSize
92 A given <type>Size</type> in a well known type
93 @param TargetUnit
94 A type from <type scope="com::sun::star::util">MeasureUnit</type> in which the Size will convert to.
96 @return
97 Returns a new <type>Size</type> in the TargetUnit type format.
99 com::sun::star::awt::Size convertSizeToLogic( [in] com::sun::star::awt::Size aSize, [in] short TargetUnit )
100 raises ( com::sun::star::lang::IllegalArgumentException );
102 /** converts the given <type>Size</type>, which is specified in the given logical unit, into pixels
104 @param Size
105 A given <type>Size</type> in a well known type
106 @param TargetUnit
107 The type from <type scope="com::sun::star::util">MeasureUnit</type> of the Size.
109 @return
110 Returns a new <type>Size</type> in the TargetUnit type format.
112 com::sun::star::awt::Size convertSizeToPixel( [in] com::sun::star::awt::Size aSize, [in] short SourceUnit )
113 raises ( com::sun::star::lang::IllegalArgumentException );
118 //=============================================================================
120 }; }; }; };
122 #endif