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
>
34 #ifndef __com_sun_star_awt_Size_idl__
35 #include
<com
/sun
/star
/awt
/Size.idl
>
38 #ifndef __com_sun_star_embed_VisualRepresentation_idl__
39 #include
<com
/sun
/star
/embed
/VisualRepresentation.idl
>
42 #ifndef __com_sun_star_embed_WrongStateException_idl__
43 #include
<com
/sun
/star
/embed
/WrongStateException.idl
>
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
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.
64 The size must be provided in logical units according to map mode the
65 object communicates in.
69 If an object is inplace- or ui-active the method must not initiate
74 the aspect specifying the form of object representation.
75 Can take values from <type>Aspects</type> constant set.
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.
99 The size must be provided in logical units according to map mode the
100 object communicates in.
104 the aspect specifying the form of object representation.
105 Can take values from <type>Aspects</type> constant set.
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.
130 the aspect the representation is requested for.
131 Can take values from <type>Aspects</type> constant set.
134 the visual representation of the object in the default format and
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
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.
157 the aspect the map mode is requested for.
158 Can take values from <type>Aspects</type> constant set.
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
170 long getMapUnit
( [in] hyper nAspect
)
171 raises
( ::com
::sun
::star
::uno
::Exception
);
174 //=============================================================================