merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / embed / XLinkageSupport.idl
bloba4a53c36e7a8e3a91be0992d47bfb07b323f7e73
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_XLinkageSupport_idl__
28 #define __com_sun_star_embed_XLinkageSupport_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_embed_XStorage_idl__
35 #include <com/sun/star/embed/XStorage.idl>
36 #endif
38 #ifndef __com_sun_star_embed_XCommonEmbedPersist_idl__
39 #include <com/sun/star/embed/XCommonEmbedPersist.idl>
40 #endif
42 #ifndef __com_sun_star_beans_PropertyValue_idl__
43 #include <com/sun/star/beans/PropertyValue.idl>
44 #endif
46 #ifndef __com_sun_star_embed_WrongStateException_idl__
47 #include <com/sun/star/embed/WrongStateException.idl>
48 #endif
50 //============================================================================
52 module com { module sun { module star { module embed {
54 //============================================================================
55 /** specifies an additional implementation for linked embedded object support.
57 published interface XLinkageSupport: XCommonEmbedPersist
59 //------------------------------------------------------------------------
60 /** breaks the link and provides the object with a parent storage and a
61 name for object's entry
63 <p>
64 This method can be used only for links implementations that implement
65 the whole set of embedded object interfaces. Usually the sets of
66 interfaces are the same for links and objects. An example of exception
67 from this are OOo links that do not implement
68 <type>XEmbedPersist</type> interface. For such cases the method will
69 throw an exception.
70 </p>
72 <p>
73 The link will be broken and the linked object will become a normal
74 embedded object.
75 </p>
77 <p>
78 An entry with the specified name should be created\opened inside
79 provided storage. This entry will be used for the object persistence.
80 If the entry exists already all it's contents will be ignored.
81 </p>
83 @param xStorage
84 a parent storage the entry should be created\opened in
86 @param sEntryName
87 a name for the entry
89 @throws ::com::sun::star::lang::IllegalArgumentException
90 one of arguments is illegal
92 @throws com::sun::star::embed::WrongStateException
93 the object is in wrong state or not a linked object
95 @throws com::sun::star::io::IOException
96 in case object has not persistence or other io problems
98 @throws com::sun::star::uno::Exception
99 in case of other problems
101 @see also XEmbedPersist::setPersistentEntry
103 void breakLink( [in] ::com::sun::star::embed::XStorage xStorage,
104 [in] string sEntryName )
105 raises( ::com::sun::star::lang::IllegalArgumentException,
106 ::com::sun::star::embed::WrongStateException,
107 ::com::sun::star::io::IOException,
108 ::com::sun::star::uno::Exception );
111 //------------------------------------------------------------------------
112 /** allows to detect whether the object is a linked one.
114 Most of embedded objects will not support this interface, but some
115 of them can do it, to allow conversion from link to object. After
116 the conversion the object does not change, so interface set staies the
117 same, but the object is not a link any more.
118 </p>
120 @return
121 <TRUE/> - the object is a linked one.
122 <FALSE/> - otherwise
124 @throws com::sun::star::embed::WrongStateException
125 the object is in wrong state
127 boolean isLink()
128 raises( ::com::sun::star::embed::WrongStateException );
130 //------------------------------------------------------------------------
131 /** returns the URL of the link object.
133 @throws com::sun::star::embed::WrongStateException
134 the object is in wrong state or is not a link
136 string getLinkURL()
137 raises( ::com::sun::star::embed::WrongStateException,
138 ::com::sun::star::uno::Exception );
141 //============================================================================
143 }; }; }; };
145 #endif