update dev300-m58
[ooovba.git] / offapi / com / sun / star / text / XTextContent.idl
blobdd4d152722e30a1e88e91dd0e6413b50e1c2b710
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: XTextContent.idl,v $
10 * $Revision: 1.12 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_text_XTextContent_idl__
31 #define __com_sun_star_text_XTextContent_idl__
33 #ifndef __com_sun_star_lang_XComponent_idl__
34 #include <com/sun/star/lang/XComponent.idl>
35 #endif
37 #ifndef __com_sun_star_text_XTextRange_idl__
38 #include <com/sun/star/text/XTextRange.idl>
39 #endif
41 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
42 #include <com/sun/star/lang/IllegalArgumentException.idl>
43 #endif
46 //=============================================================================
48 module com { module sun { module star { module text {
50 //=============================================================================
52 /** enables objects to be inserted into a text and to provide their
53 location in a text once they are inserted into it.
55 published interface XTextContent: com::sun::star::lang::XComponent
57 //-------------------------------------------------------------------------
59 /** is called when this object gets embedded in a text.
63 <p>This acts like a multi-phase construction, thus the object may be
64 invalid until it is attached to a text position. In general, this method
65 is called from within
72 </p>
73 <p>Both text objects and text content objects may only be connected
74 to each other if they are created by the same component. When
75 implementing new components, this behaviour is deprecated.</p>
77 void attach( [in] com::sun::star::text::XTextRange xTextRange )
78 raises( com::sun::star::lang::IllegalArgumentException );
80 //-------------------------------------------------------------------------
82 /** @returns
83 the text range to which the content is attached.
85 <p>Note: The anchor of the actual implementation for text tables
86 does not have a position in the text. Thus that anchor can not be
87 used for some operation like <member>attach</member> for example or
88 <member scope="com::sun::star::text">insertTextContent</member>
89 or other function that require the object to have a position in the text.</p>
91 <p>The reason why a text table still needs an anchor is that for example
92 tables should be insertable via <member scope="com::sun::star::text">insertTextContent</member>
93 and that interface uses a parameter of that type.</p>
95 com::sun::star::text::XTextRange getAnchor();
99 //=============================================================================
101 }; }; }; };
103 #endif