Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / embed / XEmbedObjectCreator.idl
blob268805bc895d6b52dfd99ff41a2c6e0ecd5167ce
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_XEmbedObjectCreator_idl__
20 #define __com_sun_star_embed_XEmbedObjectCreator_idl__
22 #include <com/sun/star/uno/XInterface.idl>
23 #include <com/sun/star/embed/XStorage.idl>
24 #include <com/sun/star/io/IOException.idl>
25 #include <com/sun/star/embed/WrongStateException.idl>
26 #include <com/sun/star/lang/IllegalArgumentException.idl>
27 #include <com/sun/star/beans/PropertyValue.idl>
30 module com { module sun { module star { module embed {
32 /** allows to create and initialize a new embedded object.
34 <p>
35 This interface contains methods that can help to create and initialize
36 an embedded object.
37 </p>
39 published interface XEmbedObjectCreator: com::sun::star::uno::XInterface
41 /** creates a new object and initializes it as a new one.
43 <p> In case specified entry exists it's contents are ignored and
44 will be overwritten on storing.
45 </p>
47 @param aClassID
48 the class id of the new object
50 @param sClassName
51 the class name of the new object
53 @param xStorage
54 a parent storage the entry should be created/opened in
56 @param sEntryName
57 a name for the entry
59 @param aObjectArgs
60 optional parameters for the object persistence initialization
61 see also
62 EmbeddedObjectDescriptor
64 @throws ::com::sun::star::lang::IllegalArgumentException
65 one of arguments is illegal
67 @throws com::sun::star::io::IOException
68 in case of io problems during opening or creation
70 @throws com::sun::star::uno::Exception
71 in case of other problems
73 ::com::sun::star::uno::XInterface createInstanceInitNew(
74 [in] sequence< byte > aClassID,
75 [in] string sClassName,
76 [in] ::com::sun::star::embed::XStorage xStorage,
77 [in] string sEntryName,
78 [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
79 raises( ::com::sun::star::lang::IllegalArgumentException,
80 ::com::sun::star::io::IOException,
81 ::com::sun::star::uno::Exception );
84 /** creates a new object that should be based on specified storage entry.
86 <p> The specified entry must exists and the object should be loaded
87 from the entry. In case a persistent representation of a link is
88 specified, the result object will be a link.
89 </p>
91 @param xStorage
92 a parent storage the entry should be opened in
94 @param sEntryName
95 a name for the entry
97 @param aMediaDescriptor
98 an object of type
99 com::sun::star::document::MediaDescriptor that
100 specifies document related properties; please remember that target
101 related parameters, for example URL, will be ignored since the
102 object should be loaded from storage entry
104 @param aObjectArgs
105 an object of type EmbeddedObjectDescriptor
106 contains object related properties
108 @throws ::com::sun::star::lang::IllegalArgumentException
109 one of arguments is illegal
111 @throws ::com::sun::star::container::NoSuchElementException
112 the specified entry does not exist
114 @throws com::sun::star::io::IOException
115 in case of io problems during opening
117 @throws com::sun::star::uno::Exception
118 in case of other problems
120 ::com::sun::star::uno::XInterface createInstanceInitFromEntry(
121 [in] ::com::sun::star::embed::XStorage xStorage,
122 [in] string sEntryName,
123 [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor,
124 [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
125 raises( ::com::sun::star::lang::IllegalArgumentException,
126 ::com::sun::star::container::NoSuchElementException,
127 ::com::sun::star::io::IOException,
128 ::com::sun::star::uno::Exception );
130 /** creates a new object and initializes it based on
131 com::sun::star::document::MediaDescriptor.
133 <p> In case specified entry exists it's contents are ignored and will
134 be overwritten on storing.
135 </p>
137 @param xStorage
138 a parent storage the entry should be created/opened in
140 @param sEntryName
141 a name for the entry
143 @param aMediaDescriptor
144 an object of type
145 com::sun::star::document::MediaDescriptor that
146 specifies source
148 @param aObjectArgs
149 an object of type EmbeddedObjectDescriptor
150 contains object related properties
152 @throws ::com::sun::star::lang::IllegalArgumentException
153 one of arguments is illegal
155 @throws com::sun::star::io::IOException
156 in case of io problems during opening or creation
158 @throws com::sun::star::uno::Exception
159 in case of other problems
161 ::com::sun::star::uno::XInterface createInstanceInitFromMediaDescriptor(
162 [in] ::com::sun::star::embed::XStorage xStorage,
163 [in] string sEntryName,
164 [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor,
165 [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs )
166 raises( ::com::sun::star::lang::IllegalArgumentException,
167 ::com::sun::star::io::IOException,
168 ::com::sun::star::uno::Exception );
172 }; }; }; };
174 #endif
176 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */