merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / embed / XVisualObject.idl
blob158c49851a6f532fd880c5204b6b710a7a14070f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_embed_XVisualObject_idl__
28 #define __com_sun_star_embed_XVisualObject_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_awt_Size_idl__
35 #include <com/sun/star/awt/Size.idl>
36 #endif
38 #ifndef __com_sun_star_embed_VisualRepresentation_idl__
39 #include <com/sun/star/embed/VisualRepresentation.idl>
40 #endif
42 #ifndef __com_sun_star_embed_WrongStateException_idl__
43 #include <com/sun/star/embed/WrongStateException.idl>
44 #endif
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include <com/sun/star/lang/IllegalArgumentException.idl>
48 #endif
51 //=============================================================================
53 module com { module sun { module star { module embed {
55 //=============================================================================
56 /** represents common visualisation functionality for embedded objects.
58 published interface XVisualObject: ::com::sun::star::uno::XInterface
60 //-------------------------------------------------------------------------
61 /** sets the size of object's visual area.
63 <p>
64 The size must be provided in logical units according to map mode the
65 object communicates in.
66 </p>
68 <p>
69 If an object is inplace- or ui-active the method must not initiate
70 repainting itself.
71 </p>
73 @param nAspect
74 the aspect specifying the form of object representation.
75 Can take values from <type>Aspects</type> constant set.
77 @param aSize
78 the new size of the visual area
80 @throws ::com::sun::star::lang::IllegalArgumentException
81 one of arguments is illegal
83 @throws ::com::sun::star::embed::WrongStateException
84 the object is in wrong state
86 @throws ::com::sun::star::uno::Exception
87 the object failed to resize
89 void setVisualAreaSize( [in] hyper nAspect,
90 [in] ::com::sun::star::awt::Size aSize )
91 raises( ::com::sun::star::lang::IllegalArgumentException,
92 ::com::sun::star::embed::WrongStateException,
93 ::com::sun::star::uno::Exception );
95 //-------------------------------------------------------------------------
96 /** gets the size of object's visual area.
98 <p>
99 The size must be provided in logical units according to map mode the
100 object communicates in.
101 </p>
103 @param nAspect
104 the aspect specifying the form of object representation.
105 Can take values from <type>Aspects</type> constant set.
107 @return
108 the size of visual area
110 @throws ::com::sun::star::lang::IllegalArgumentException
111 one of arguments is illegal
113 @throws ::com::sun::star::embed::WrongStateException
114 the object is in wrong state
116 ::com::sun::star::awt::Size getVisualAreaSize( [in] hyper nAspect )
117 raises( ::com::sun::star::lang::IllegalArgumentException,
118 ::com::sun::star::embed::WrongStateException,
119 ::com::sun::star::uno::Exception );
121 //------------------------------------------------------------------------
122 /** retrieves visual representation of the object in preferable format.
125 If the object persistance entry contains cached visual representation
126 then it can be retrieved by using this method even in loaded state.
127 </p>
129 @param nAspect
130 the aspect the representation is requested for.
131 Can take values from <type>Aspects</type> constant set.
133 @return
134 the visual representation of the object in the default format and
135 the format
137 @throws ::com::sun::star::lang::IllegalArgumentException
138 one of arguments is illegal
140 @throws ::com::sun::star::embed::WrongStateException
141 the object is in wrong state
143 @throws ::com::sun::star::uno::Exception
144 in case of problems
147 VisualRepresentation getPreferredVisualRepresentation( [in] hyper nAspect )
148 raises( ::com::sun::star::lang::IllegalArgumentException,
149 ::com::sun::star::embed::WrongStateException,
150 ::com::sun::star::uno::Exception );
153 //-------------------------------------------------------------------------
154 /** retrieves map mode the object communicates in.
156 @param nAspect
157 the aspect the map mode is requested for.
158 Can take values from <type>Aspects</type> constant set.
160 @return
161 the map mode the object communicates in, it can take values from
162 <type>EmbedMapUnits</type> constant
164 @throws ::com::sun::star::embed::WrongStateException
165 the object is in wrong state
167 @throws ::com::sun::star::uno::Exception
168 in case of problems
170 long getMapUnit( [in] hyper nAspect )
171 raises( ::com::sun::star::uno::Exception );
174 //=============================================================================
176 }; }; }; };
178 #endif