1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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
>
38 #ifndef __com_sun_star_awt_Point_idl__
39 #include
<com
/sun
/star
/awt
/Point.idl
>
42 #ifndef __com_sun_star_awt_Size_idl__
43 #include
<com
/sun
/star
/awt
/Size.idl
>
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
50 //=============================================================================
52 module com
{ module sun
{ module star
{ module awt
{
54 //=============================================================================
56 /** allows converting between different measurement units
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
65 A given <type>Point</type> in a well known type
67 A type from <type scope="com::sun::star::util">MeasureUnit</type> in which the Point will convert to.
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
78 A given Point in the SourceUnit type
80 The type from <type scope="com::sun::star::util">MeasureUnit</type> of the Point.
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
92 A given <type>Size</type> in a well known type
94 A type from <type scope="com::sun::star::util">MeasureUnit</type> in which the Size will convert to.
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
105 A given <type>Size</type> in a well known type
107 The type from <type scope="com::sun::star::util">MeasureUnit</type> of the Size.
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 //=============================================================================