Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / embed / XLinkageSupport.idl
blobbe99765b70d47001b08a04bf866ed965da81267e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_embed_XLinkageSupport_idl__
20 #define __com_sun_star_embed_XLinkageSupport_idl__
22 #include <com/sun/star/uno/XInterface.idl>
23 #include <com/sun/star/embed/XStorage.idl>
24 #include <com/sun/star/embed/XCommonEmbedPersist.idl>
25 #include <com/sun/star/beans/PropertyValue.idl>
26 #include <com/sun/star/embed/WrongStateException.idl>
29 module com { module sun { module star { module embed {
31 /** specifies an additional implementation for linked embedded object support.
33 published interface XLinkageSupport: XCommonEmbedPersist
35 /** breaks the link and provides the object with a parent storage and a
36 name for object's entry
38 <p>
39 This method can be used only for links implementations that implement
40 the whole set of embedded object interfaces. Usually the sets of
41 interfaces are the same for links and objects. An example of exception
42 from this are OOo links that do not implement
43 XEmbedPersist interface. For such cases the method will
44 throw an exception.
45 </p>
47 <p>
48 The link will be broken and the linked object will become a normal
49 embedded object.
50 </p>
52 <p>
53 An entry with the specified name should be created or opened inside
54 provided storage. This entry will be used for the object persistence.
55 If the entry exists already all its contents will be ignored.
56 </p>
58 @param xStorage
59 a parent storage the entry should be created or opened in
61 @param sEntryName
62 a name for the entry
64 @throws ::com::sun::star::lang::IllegalArgumentException
65 one of arguments is illegal
67 @throws com::sun::star::embed::WrongStateException
68 the object is in wrong state or not a linked object
70 @throws com::sun::star::io::IOException
71 in case object has not persistence or other io problems
73 @throws com::sun::star::uno::Exception
74 in case of other problems
76 @see also XEmbedPersist::setPersistentEntry
78 void breakLink( [in] ::com::sun::star::embed::XStorage xStorage,
79 [in] string sEntryName )
80 raises( ::com::sun::star::lang::IllegalArgumentException,
81 ::com::sun::star::embed::WrongStateException,
82 ::com::sun::star::io::IOException,
83 ::com::sun::star::uno::Exception );
86 /** allows to detect whether the object is a linked one.
87 <p>
88 Most of embedded objects will not support this interface, but some
89 of them can do it, to allow conversion from link to object. After
90 the conversion the object does not change, so interface set stays the
91 same, but the object is not a link any more.
92 </p>
94 @return
95 `TRUE` - the object is a linked one.
96 `FALSE` - otherwise
98 @throws com::sun::star::embed::WrongStateException
99 the object is in wrong state
101 boolean isLink()
102 raises( ::com::sun::star::embed::WrongStateException );
104 /** returns the URL of the link object.
106 @throws com::sun::star::embed::WrongStateException
107 the object is in wrong state or is not a link
109 string getLinkURL()
110 raises( ::com::sun::star::embed::WrongStateException,
111 ::com::sun::star::uno::Exception );
115 }; }; }; };
117 #endif
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */