1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_embed_XEmbedObjectCreator_idl__ 24*b1cdbd2cSJim Jagielski#define __com_sun_star_embed_XEmbedObjectCreator_idl__ 25*b1cdbd2cSJim Jagielski 26*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_uno_XInterface_idl__ 27*b1cdbd2cSJim Jagielski#include <com/sun/star/uno/XInterface.idl> 28*b1cdbd2cSJim Jagielski#endif 29*b1cdbd2cSJim Jagielski 30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_embed_XStorage_idl__ 31*b1cdbd2cSJim Jagielski#include <com/sun/star/embed/XStorage.idl> 32*b1cdbd2cSJim Jagielski#endif 33*b1cdbd2cSJim Jagielski 34*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_io_IOException_idl__ 35*b1cdbd2cSJim Jagielski#include <com/sun/star/io/IOException.idl> 36*b1cdbd2cSJim Jagielski#endif 37*b1cdbd2cSJim Jagielski 38*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_embed_WrongStateException_idl__ 39*b1cdbd2cSJim Jagielski#include <com/sun/star/embed/WrongStateException.idl> 40*b1cdbd2cSJim Jagielski#endif 41*b1cdbd2cSJim Jagielski 42*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 43*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IllegalArgumentException.idl> 44*b1cdbd2cSJim Jagielski#endif 45*b1cdbd2cSJim Jagielski 46*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_beans_PropertyValue_idl__ 47*b1cdbd2cSJim Jagielski#include <com/sun/star/beans/PropertyValue.idl> 48*b1cdbd2cSJim Jagielski#endif 49*b1cdbd2cSJim Jagielski 50*b1cdbd2cSJim Jagielski//============================================================================ 51*b1cdbd2cSJim Jagielski 52*b1cdbd2cSJim Jagielski module com { module sun { module star { module embed { 53*b1cdbd2cSJim Jagielski 54*b1cdbd2cSJim Jagielski//============================================================================ 55*b1cdbd2cSJim Jagielski/** allows to create and initialize a new embedded object. 56*b1cdbd2cSJim Jagielski 57*b1cdbd2cSJim Jagielski <p> 58*b1cdbd2cSJim Jagielski This interface contains methods that can help to create and initialize 59*b1cdbd2cSJim Jagielski an embedded object. 60*b1cdbd2cSJim Jagielski </p> 61*b1cdbd2cSJim Jagielski */ 62*b1cdbd2cSJim Jagielskipublished interface XEmbedObjectCreator: com::sun::star::uno::XInterface 63*b1cdbd2cSJim Jagielski{ 64*b1cdbd2cSJim Jagielski // ----------------------------------------------------------------------- 65*b1cdbd2cSJim Jagielski /** creates a new object and initializes it as a new one. 66*b1cdbd2cSJim Jagielski 67*b1cdbd2cSJim Jagielski <p> In case specified entry exists it's contents are ignored and 68*b1cdbd2cSJim Jagielski will be overwritten on storing. 69*b1cdbd2cSJim Jagielski </p> 70*b1cdbd2cSJim Jagielski 71*b1cdbd2cSJim Jagielski @param aClassID 72*b1cdbd2cSJim Jagielski the class id of the new object 73*b1cdbd2cSJim Jagielski 74*b1cdbd2cSJim Jagielski @param sClassName 75*b1cdbd2cSJim Jagielski the class name of the new object 76*b1cdbd2cSJim Jagielski 77*b1cdbd2cSJim Jagielski @param xStorage 78*b1cdbd2cSJim Jagielski a parent storage the entry should be created/opened in 79*b1cdbd2cSJim Jagielski 80*b1cdbd2cSJim Jagielski @param sEntryName 81*b1cdbd2cSJim Jagielski a name for the entry 82*b1cdbd2cSJim Jagielski 83*b1cdbd2cSJim Jagielski @param aObjectArgs 84*b1cdbd2cSJim Jagielski optional parameters for the object persistence initialization 85*b1cdbd2cSJim Jagielski see also 86*b1cdbd2cSJim Jagielski <type>EmbeddedObjectDescriptor</type> 87*b1cdbd2cSJim Jagielski 88*b1cdbd2cSJim Jagielski @throws ::com::sun::star::lang::IllegalArgumentException 89*b1cdbd2cSJim Jagielski one of arguments is illegal 90*b1cdbd2cSJim Jagielski 91*b1cdbd2cSJim Jagielski @throws com::sun::star::io::IOException 92*b1cdbd2cSJim Jagielski in case of io problems during opening\creation 93*b1cdbd2cSJim Jagielski 94*b1cdbd2cSJim Jagielski @throws com::sun::star::uno::Exception 95*b1cdbd2cSJim Jagielski in case of other problems 96*b1cdbd2cSJim Jagielski */ 97*b1cdbd2cSJim Jagielski ::com::sun::star::uno::XInterface createInstanceInitNew( 98*b1cdbd2cSJim Jagielski [in] sequence< byte > aClassID, 99*b1cdbd2cSJim Jagielski [in] string sClassName, 100*b1cdbd2cSJim Jagielski [in] ::com::sun::star::embed::XStorage xStorage, 101*b1cdbd2cSJim Jagielski [in] string sEntryName, 102*b1cdbd2cSJim Jagielski [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) 103*b1cdbd2cSJim Jagielski raises( ::com::sun::star::lang::IllegalArgumentException, 104*b1cdbd2cSJim Jagielski ::com::sun::star::io::IOException, 105*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Exception ); 106*b1cdbd2cSJim Jagielski 107*b1cdbd2cSJim Jagielski 108*b1cdbd2cSJim Jagielski // ----------------------------------------------------------------------- 109*b1cdbd2cSJim Jagielski /** creates a new object that should be based on specified storage entry. 110*b1cdbd2cSJim Jagielski 111*b1cdbd2cSJim Jagielski <p> The specified entry must exists and the object should be loaded 112*b1cdbd2cSJim Jagielski from the entry. In case a persistent representation of a link is 113*b1cdbd2cSJim Jagielski specified, the result object will be a link. 114*b1cdbd2cSJim Jagielski </p> 115*b1cdbd2cSJim Jagielski 116*b1cdbd2cSJim Jagielski @param xStorage 117*b1cdbd2cSJim Jagielski a parent storage the entry should be opened in 118*b1cdbd2cSJim Jagielski 119*b1cdbd2cSJim Jagielski @param sEntryName 120*b1cdbd2cSJim Jagielski a name for the entry 121*b1cdbd2cSJim Jagielski 122*b1cdbd2cSJim Jagielski @param aMediaDescriptor 123*b1cdbd2cSJim Jagielski an object of type 124*b1cdbd2cSJim Jagielski <type scope="com::sun::star::document">MediaDescriptor</type> that 125*b1cdbd2cSJim Jagielski specifies document related properties; please remember that target 126*b1cdbd2cSJim Jagielski related parameters, for example URL, will be ignored since the 127*b1cdbd2cSJim Jagielski object should be loaded from storage entry 128*b1cdbd2cSJim Jagielski 129*b1cdbd2cSJim Jagielski @param aObjectArgs 130*b1cdbd2cSJim Jagielski an object of type <type>EmbeddedObjectDescriptor</type> 131*b1cdbd2cSJim Jagielski contains object related properties 132*b1cdbd2cSJim Jagielski 133*b1cdbd2cSJim Jagielski @thrown ::com::sun::star::lang::IllegalArgumentException 134*b1cdbd2cSJim Jagielski one of arguments is illegal 135*b1cdbd2cSJim Jagielski 136*b1cdbd2cSJim Jagielski @thrown ::com::sun::star::container::NoSuchElementException 137*b1cdbd2cSJim Jagielski the specified entry does not exist 138*b1cdbd2cSJim Jagielski 139*b1cdbd2cSJim Jagielski @throws com::sun::star::io::IOException 140*b1cdbd2cSJim Jagielski in case of io problems during opening 141*b1cdbd2cSJim Jagielski 142*b1cdbd2cSJim Jagielski @throws com::sun::star::uno::Exception 143*b1cdbd2cSJim Jagielski in case of other problems 144*b1cdbd2cSJim Jagielski */ 145*b1cdbd2cSJim Jagielski ::com::sun::star::uno::XInterface createInstanceInitFromEntry( 146*b1cdbd2cSJim Jagielski [in] ::com::sun::star::embed::XStorage xStorage, 147*b1cdbd2cSJim Jagielski [in] string sEntryName, 148*b1cdbd2cSJim Jagielski [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor, 149*b1cdbd2cSJim Jagielski [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) 150*b1cdbd2cSJim Jagielski raises( ::com::sun::star::lang::IllegalArgumentException, 151*b1cdbd2cSJim Jagielski ::com::sun::star::container::NoSuchElementException, 152*b1cdbd2cSJim Jagielski ::com::sun::star::io::IOException, 153*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Exception ); 154*b1cdbd2cSJim Jagielski 155*b1cdbd2cSJim Jagielski // ----------------------------------------------------------------------- 156*b1cdbd2cSJim Jagielski /** creates a new object and initializes it based on 157*b1cdbd2cSJim Jagielski <type scope="com::sun::star::document">MediaDescriptor</type>. 158*b1cdbd2cSJim Jagielski 159*b1cdbd2cSJim Jagielski <p> In case specified entry exists it's contents are ignored and will 160*b1cdbd2cSJim Jagielski be overwritten on storing. 161*b1cdbd2cSJim Jagielski </p> 162*b1cdbd2cSJim Jagielski 163*b1cdbd2cSJim Jagielski @param xStorage 164*b1cdbd2cSJim Jagielski a parent storage the entry should be created/opened in 165*b1cdbd2cSJim Jagielski 166*b1cdbd2cSJim Jagielski @param sEntryName 167*b1cdbd2cSJim Jagielski a name for the entry 168*b1cdbd2cSJim Jagielski 169*b1cdbd2cSJim Jagielski @param aMediaDescriptor 170*b1cdbd2cSJim Jagielski an object of type 171*b1cdbd2cSJim Jagielski <type scope="com::sun::star::document">MediaDescriptor</type> that 172*b1cdbd2cSJim Jagielski specifies source 173*b1cdbd2cSJim Jagielski 174*b1cdbd2cSJim Jagielski @param aObjectArgs 175*b1cdbd2cSJim Jagielski an object of type <type>EmbeddedObjectDescriptor</type> 176*b1cdbd2cSJim Jagielski contains object related properties 177*b1cdbd2cSJim Jagielski 178*b1cdbd2cSJim Jagielski @thrown ::com::sun::star::lang::IllegalArgumentException 179*b1cdbd2cSJim Jagielski one of arguments is illegal 180*b1cdbd2cSJim Jagielski 181*b1cdbd2cSJim Jagielski @throws com::sun::star::io::IOException 182*b1cdbd2cSJim Jagielski in case of io problems during opening\creation 183*b1cdbd2cSJim Jagielski 184*b1cdbd2cSJim Jagielski @throws com::sun::star::uno::Exception 185*b1cdbd2cSJim Jagielski in case of other problems 186*b1cdbd2cSJim Jagielski */ 187*b1cdbd2cSJim Jagielski ::com::sun::star::uno::XInterface createInstanceInitFromMediaDescriptor( 188*b1cdbd2cSJim Jagielski [in] ::com::sun::star::embed::XStorage xStorage, 189*b1cdbd2cSJim Jagielski [in] string sEntryName, 190*b1cdbd2cSJim Jagielski [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor, 191*b1cdbd2cSJim Jagielski [in] sequence< ::com::sun::star::beans::PropertyValue > aObjectArgs ) 192*b1cdbd2cSJim Jagielski raises( ::com::sun::star::lang::IllegalArgumentException, 193*b1cdbd2cSJim Jagielski ::com::sun::star::io::IOException, 194*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Exception ); 195*b1cdbd2cSJim Jagielski}; 196*b1cdbd2cSJim Jagielski 197*b1cdbd2cSJim Jagielski//============================================================================ 198*b1cdbd2cSJim Jagielski 199*b1cdbd2cSJim Jagielski}; }; }; }; 200*b1cdbd2cSJim Jagielski 201*b1cdbd2cSJim Jagielski#endif 202*b1cdbd2cSJim Jagielski 203