update dev300-m58
[ooovba.git] / offapi / com / sun / star / embed / XLinkageSupport.idl
blob6311e8a274023ea8139dc5a3709895d2997752f5
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: XLinkageSupport.idl,v $
10 * $Revision: 1.7 $
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_embed_XLinkageSupport_idl__
31 #define __com_sun_star_embed_XLinkageSupport_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_embed_XStorage_idl__
38 #include <com/sun/star/embed/XStorage.idl>
39 #endif
41 #ifndef __com_sun_star_embed_XCommonEmbedPersist_idl__
42 #include <com/sun/star/embed/XCommonEmbedPersist.idl>
43 #endif
45 #ifndef __com_sun_star_beans_PropertyValue_idl__
46 #include <com/sun/star/beans/PropertyValue.idl>
47 #endif
49 #ifndef __com_sun_star_embed_WrongStateException_idl__
50 #include <com/sun/star/embed/WrongStateException.idl>
51 #endif
53 //============================================================================
55 module com { module sun { module star { module embed {
57 //============================================================================
58 /** specifies an additional implementation for linked embedded object support.
60 interface XLinkageSupport: XCommonEmbedPersist
62 //------------------------------------------------------------------------
63 /** breaks the link and provides the object with a parent storage and a
64 name for object's entry
66 <p>
67 This method can be used only for links implementations that implement
68 the whole set of embedded object interfaces. Usually the sets of
69 interfaces are the same for links and objects. An example of exception
70 from this are OOo links that do not implement
71 <type>XEmbedPersist</type> interface. For such cases the method will
72 throw an exception.
73 </p>
75 <p>
76 The link will be broken and the linked object will become a normal
77 embedded object.
78 </p>
80 <p>
81 An entry with the specified name should be created\opened inside
82 provided storage. This entry will be used for the object persistence.
83 If the entry exists already all it's contents will be ignored.
84 </p>
86 @param xStorage
87 a parent storage the entry should be created\opened in
89 @param sEntryName
90 a name for the entry
92 @throws ::com::sun::star::lang::IllegalArgumentException
93 one of arguments is illegal
95 @throws com::sun::star::embed::WrongStateException
96 the object is in wrong state or not a linked object
98 @throws com::sun::star::io::IOException
99 in case object has not persistence or other io problems
101 @throws com::sun::star::uno::Exception
102 in case of other problems
104 @see also XEmbedPersist::setPersistentEntry
106 void breakLink( [in] ::com::sun::star::embed::XStorage xStorage,
107 [in] string sEntryName )
108 raises( ::com::sun::star::lang::IllegalArgumentException,
109 ::com::sun::star::embed::WrongStateException,
110 ::com::sun::star::io::IOException,
111 ::com::sun::star::uno::Exception );
114 //------------------------------------------------------------------------
115 /** allows to detect whether the object is a linked one.
117 Most of embedded objects will not support this interface, but some
118 of them can do it, to allow conversion from link to object. After
119 the conversion the object does not change, so interface set staies the
120 same, but the object is not a link any more.
121 </p>
123 @return
124 <TRUE/> - the object is a linked one.
125 <FALSE/> - otherwise
127 @throws com::sun::star::embed::WrongStateException
128 the object is in wrong state
130 boolean isLink()
131 raises( ::com::sun::star::embed::WrongStateException );
133 //------------------------------------------------------------------------
134 /** returns the URL of the link object.
136 @throws com::sun::star::embed::WrongStateException
137 the object is in wrong state or is not a link
139 string getLinkURL()
140 raises( ::com::sun::star::embed::WrongStateException,
141 ::com::sun::star::uno::Exception );
144 //============================================================================
146 }; }; }; };
148 #endif