Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / awt / XUnitConversion.idl
blob0ba57b630eb1de71a7f4e028a02abe37e101576c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_awt_XUnitConversion_idl__
29 #define __com_sun_star_awt_XUnitConversion_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #include <com/sun/star/awt/Point.idl>
33 #include <com/sun/star/awt/Size.idl>
34 #include <com/sun/star/lang/IllegalArgumentException.idl>
36 //=============================================================================
38 module com { module sun { module star { module awt {
40 //=============================================================================
42 /** allows converting between different measurement units
44 @since OOo 3.0
46 interface XUnitConversion: com::sun::star::uno::XInterface
48 /** converts the given <type>Point</type>, which is specified in pixels, into the given logical unit
50 @param Point
51 A given <type>Point</type> in a well known type
52 @param TargetUnit
53 A type from <type scope="com::sun::star::util">MeasureUnit</type> in which the Point will convert to.
55 @return
56 Returns a new <type>Point</type> in the TargetUnit type format.
58 com::sun::star::awt::Point convertPointToLogic( [in] com::sun::star::awt::Point Point, [in] short TargetUnit )
59 raises ( com::sun::star::lang::IllegalArgumentException );
61 /** converts the given <type>Point</type>, which is specified in the given logical unit, into pixels
63 @param Point
64 A given Point in the SourceUnit type
65 @param SourceUnit
66 The type from <type scope="com::sun::star::util">MeasureUnit</type> of the Point.
68 @return
69 Return a new <type>Point</type> in Pixel type format.
71 com::sun::star::awt::Point convertPointToPixel( [in] com::sun::star::awt::Point aPoint, [in] short SourceUnit )
72 raises ( com::sun::star::lang::IllegalArgumentException );
75 /** converts the given <type>Size</type>, which is specified in pixels, into the given logical unit
77 @param aSize
78 A given <type>Size</type> in a well known type
79 @param TargetUnit
80 A type from <type scope="com::sun::star::util">MeasureUnit</type> in which the Size will convert to.
82 @return
83 Returns a new <type>Size</type> in the TargetUnit type format.
85 com::sun::star::awt::Size convertSizeToLogic( [in] com::sun::star::awt::Size aSize, [in] short TargetUnit )
86 raises ( com::sun::star::lang::IllegalArgumentException );
88 /** converts the given <type>Size</type>, which is specified in the given logical unit, into pixels
90 @param Size
91 A given <type>Size</type> in a well known type
92 @param TargetUnit
93 The type from <type scope="com::sun::star::util">MeasureUnit</type> of the Size.
95 @return
96 Returns a new <type>Size</type> in the TargetUnit type format.
98 com::sun::star::awt::Size convertSizeToPixel( [in] com::sun::star::awt::Size aSize, [in] short SourceUnit )
99 raises ( com::sun::star::lang::IllegalArgumentException );
104 //=============================================================================
106 }; }; }; };
108 #endif
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */