1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_embeddedobj.hxx" 30*cdf0e10cSrcweir #include <com/sun/star/embed/ElementModes.hpp> 31*cdf0e10cSrcweir #include <com/sun/star/embed/EntryInitModes.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/embed/Aspects.hpp> 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir #include <rtl/logfile.hxx> 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir 40*cdf0e10cSrcweir #include "xolefactory.hxx" 41*cdf0e10cSrcweir #include "oleembobj.hxx" 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir using namespace ::com::sun::star; 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir // TODO: do not create OLE objects that represent OOo documents 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir //------------------------------------------------------------------------- 49*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > SAL_CALL OleEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() 50*cdf0e10cSrcweir { 51*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aRet(2); 52*cdf0e10cSrcweir aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.OLEEmbeddedObjectFactory"); 53*cdf0e10cSrcweir aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); 54*cdf0e10cSrcweir return aRet; 55*cdf0e10cSrcweir } 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir //------------------------------------------------------------------------- 58*cdf0e10cSrcweir ::rtl::OUString SAL_CALL OleEmbeddedObjectFactory::impl_staticGetImplementationName() 59*cdf0e10cSrcweir { 60*cdf0e10cSrcweir return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); 61*cdf0e10cSrcweir } 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir //------------------------------------------------------------------------- 64*cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::impl_staticCreateSelfInstance( 65*cdf0e10cSrcweir const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) 66*cdf0e10cSrcweir { 67*cdf0e10cSrcweir return uno::Reference< uno::XInterface >( *new OleEmbeddedObjectFactory( xServiceManager ) ); 68*cdf0e10cSrcweir } 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir //------------------------------------------------------------------------- 71*cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInstanceInitFromEntry( 72*cdf0e10cSrcweir const uno::Reference< embed::XStorage >& xStorage, 73*cdf0e10cSrcweir const ::rtl::OUString& sEntName, 74*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& aMedDescr, 75*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& lObjArgs ) 76*cdf0e10cSrcweir throw ( lang::IllegalArgumentException, 77*cdf0e10cSrcweir container::NoSuchElementException, 78*cdf0e10cSrcweir io::IOException, 79*cdf0e10cSrcweir uno::Exception, 80*cdf0e10cSrcweir uno::RuntimeException) 81*cdf0e10cSrcweir { 82*cdf0e10cSrcweir RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromEntry" ); 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir if ( !xStorage.is() ) 85*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), 86*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 87*cdf0e10cSrcweir 1 ); 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir if ( !sEntName.getLength() ) 90*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), 91*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 92*cdf0e10cSrcweir 2 ); 93*cdf0e10cSrcweir 94*cdf0e10cSrcweir uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY ); 95*cdf0e10cSrcweir if ( !xNameAccess.is() ) 96*cdf0e10cSrcweir throw uno::RuntimeException(); //TODO 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir // detect entry existence 99*cdf0e10cSrcweir if ( !xNameAccess->hasByName( sEntName ) ) 100*cdf0e10cSrcweir throw container::NoSuchElementException(); 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir if ( !xStorage->isStreamElement( sEntName ) ) 103*cdf0e10cSrcweir { 104*cdf0e10cSrcweir // if it is not an OLE object throw an exception 105*cdf0e10cSrcweir throw io::IOException(); // TODO: 106*cdf0e10cSrcweir } 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir uno::Reference< uno::XInterface > xResult( 109*cdf0e10cSrcweir static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, sal_False ) ), 110*cdf0e10cSrcweir uno::UNO_QUERY ); 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY ); 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir if ( !xPersist.is() ) 115*cdf0e10cSrcweir throw uno::RuntimeException(); // TODO: the interface must be supported by own document objects 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir xPersist->setPersistentEntry( xStorage, 118*cdf0e10cSrcweir sEntName, 119*cdf0e10cSrcweir embed::EntryInitModes::DEFAULT_INIT, 120*cdf0e10cSrcweir aMedDescr, 121*cdf0e10cSrcweir lObjArgs ); 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) 124*cdf0e10cSrcweir { 125*cdf0e10cSrcweir if ( lObjArgs[nInd].Name.equalsAscii( "CloneFrom" ) ) 126*cdf0e10cSrcweir { 127*cdf0e10cSrcweir try 128*cdf0e10cSrcweir { 129*cdf0e10cSrcweir uno::Reference < embed::XEmbeddedObject > xObj; 130*cdf0e10cSrcweir uno::Reference < embed::XEmbeddedObject > xNew( xResult, uno::UNO_QUERY ); 131*cdf0e10cSrcweir lObjArgs[nInd].Value >>= xObj; 132*cdf0e10cSrcweir if ( xObj.is() ) 133*cdf0e10cSrcweir xNew->setVisualAreaSize( embed::Aspects::MSOLE_CONTENT, xObj->getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ) ); 134*cdf0e10cSrcweir } 135*cdf0e10cSrcweir catch ( uno::Exception& ) {}; 136*cdf0e10cSrcweir break; 137*cdf0e10cSrcweir } 138*cdf0e10cSrcweir } 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir return xResult; 141*cdf0e10cSrcweir } 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir //------------------------------------------------------------------------- 144*cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor( 145*cdf0e10cSrcweir const uno::Reference< embed::XStorage >& xStorage, 146*cdf0e10cSrcweir const ::rtl::OUString& sEntName, 147*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& aMediaDescr, 148*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& lObjArgs ) 149*cdf0e10cSrcweir throw ( lang::IllegalArgumentException, 150*cdf0e10cSrcweir io::IOException, 151*cdf0e10cSrcweir uno::Exception, 152*cdf0e10cSrcweir uno::RuntimeException) 153*cdf0e10cSrcweir { 154*cdf0e10cSrcweir RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitFromMediaDescriptor" ); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir if ( !xStorage.is() ) 157*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), 158*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 159*cdf0e10cSrcweir 1 ); 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir if ( !sEntName.getLength() ) 162*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), 163*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 164*cdf0e10cSrcweir 2 ); 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir uno::Reference< uno::XInterface > xResult( 167*cdf0e10cSrcweir static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, sal_False ) ), 168*cdf0e10cSrcweir uno::UNO_QUERY ); 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY ); 171*cdf0e10cSrcweir 172*cdf0e10cSrcweir if ( !xPersist.is() ) 173*cdf0e10cSrcweir throw uno::RuntimeException(); // TODO: the interface must be supported ( what about applets? ) 174*cdf0e10cSrcweir 175*cdf0e10cSrcweir xPersist->setPersistentEntry( xStorage, 176*cdf0e10cSrcweir sEntName, 177*cdf0e10cSrcweir embed::EntryInitModes::MEDIA_DESCRIPTOR_INIT, 178*cdf0e10cSrcweir aMediaDescr, 179*cdf0e10cSrcweir lObjArgs ); 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir return xResult; 182*cdf0e10cSrcweir } 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir //------------------------------------------------------------------------- 185*cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInstanceInitNew( 186*cdf0e10cSrcweir const uno::Sequence< sal_Int8 >& aClassID, 187*cdf0e10cSrcweir const ::rtl::OUString& aClassName, 188*cdf0e10cSrcweir const uno::Reference< embed::XStorage >& xStorage, 189*cdf0e10cSrcweir const ::rtl::OUString& sEntName, 190*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& lObjArgs ) 191*cdf0e10cSrcweir throw ( lang::IllegalArgumentException, 192*cdf0e10cSrcweir io::IOException, 193*cdf0e10cSrcweir uno::Exception, 194*cdf0e10cSrcweir uno::RuntimeException) 195*cdf0e10cSrcweir { 196*cdf0e10cSrcweir RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceInitNew" ); 197*cdf0e10cSrcweir 198*cdf0e10cSrcweir if ( !xStorage.is() ) 199*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), 200*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 201*cdf0e10cSrcweir 3 ); 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir if ( !sEntName.getLength() ) 204*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), 205*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 206*cdf0e10cSrcweir 4 ); 207*cdf0e10cSrcweir 208*cdf0e10cSrcweir uno::Reference< uno::XInterface > xResult( 209*cdf0e10cSrcweir static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, aClassID, aClassName ) ), 210*cdf0e10cSrcweir uno::UNO_QUERY ); 211*cdf0e10cSrcweir 212*cdf0e10cSrcweir uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY ); 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir if ( !xPersist.is() ) 215*cdf0e10cSrcweir throw uno::RuntimeException(); // TODO: the interface must be supported by own document objects 216*cdf0e10cSrcweir 217*cdf0e10cSrcweir xPersist->setPersistentEntry( xStorage, 218*cdf0e10cSrcweir sEntName, 219*cdf0e10cSrcweir embed::EntryInitModes::TRUNCATE_INIT, 220*cdf0e10cSrcweir uno::Sequence< beans::PropertyValue >(), 221*cdf0e10cSrcweir lObjArgs ); 222*cdf0e10cSrcweir 223*cdf0e10cSrcweir return xResult; 224*cdf0e10cSrcweir } 225*cdf0e10cSrcweir 226*cdf0e10cSrcweir //------------------------------------------------------------------------- 227*cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInstanceLink( 228*cdf0e10cSrcweir const uno::Reference< embed::XStorage >& xStorage, 229*cdf0e10cSrcweir const ::rtl::OUString& sEntName, 230*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& aMediaDescr, 231*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& lObjArgs ) 232*cdf0e10cSrcweir throw ( lang::IllegalArgumentException, 233*cdf0e10cSrcweir io::IOException, 234*cdf0e10cSrcweir uno::Exception, 235*cdf0e10cSrcweir uno::RuntimeException ) 236*cdf0e10cSrcweir { 237*cdf0e10cSrcweir RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceLink" ); 238*cdf0e10cSrcweir 239*cdf0e10cSrcweir if ( !xStorage.is() ) 240*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), 241*cdf0e10cSrcweir uno::Reference< uno::XInterface >( 242*cdf0e10cSrcweir static_cast< ::cppu::OWeakObject* >(this) ), 243*cdf0e10cSrcweir 1 ); 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir if ( !sEntName.getLength() ) 246*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), 247*cdf0e10cSrcweir uno::Reference< uno::XInterface >( 248*cdf0e10cSrcweir static_cast< ::cppu::OWeakObject* >(this) ), 249*cdf0e10cSrcweir 2 ); 250*cdf0e10cSrcweir 251*cdf0e10cSrcweir uno::Reference< uno::XInterface > xResult( 252*cdf0e10cSrcweir static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, sal_True ) ), 253*cdf0e10cSrcweir uno::UNO_QUERY ); 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY ); 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir if ( !xPersist.is() ) 258*cdf0e10cSrcweir throw uno::RuntimeException(); // TODO: the interface must be supported by own document objects 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir xPersist->setPersistentEntry( xStorage, 261*cdf0e10cSrcweir sEntName, 262*cdf0e10cSrcweir embed::EntryInitModes::MEDIA_DESCRIPTOR_INIT, 263*cdf0e10cSrcweir aMediaDescr, 264*cdf0e10cSrcweir lObjArgs ); 265*cdf0e10cSrcweir 266*cdf0e10cSrcweir return xResult; 267*cdf0e10cSrcweir } 268*cdf0e10cSrcweir 269*cdf0e10cSrcweir //------------------------------------------------------------------------- 270*cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInstanceUserInit( 271*cdf0e10cSrcweir const uno::Sequence< sal_Int8 >& aClassID, 272*cdf0e10cSrcweir const ::rtl::OUString& aClassName, 273*cdf0e10cSrcweir const uno::Reference< embed::XStorage >& xStorage, 274*cdf0e10cSrcweir const ::rtl::OUString& sEntName, 275*cdf0e10cSrcweir sal_Int32 /*nEntryConnectionMode*/, 276*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& /*lArguments*/, 277*cdf0e10cSrcweir const uno::Sequence< beans::PropertyValue >& lObjArgs ) 278*cdf0e10cSrcweir throw ( lang::IllegalArgumentException, 279*cdf0e10cSrcweir io::IOException, 280*cdf0e10cSrcweir uno::Exception, 281*cdf0e10cSrcweir uno::RuntimeException ) 282*cdf0e10cSrcweir { 283*cdf0e10cSrcweir RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObjectFactory::createInstanceUserInit" ); 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir // the initialization is completelly controlled by user 286*cdf0e10cSrcweir if ( !xStorage.is() ) 287*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "No parent storage is provided!\n" ), 288*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 289*cdf0e10cSrcweir 1 ); 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir if ( !sEntName.getLength() ) 292*cdf0e10cSrcweir throw lang::IllegalArgumentException( ::rtl::OUString::createFromAscii( "Empty element name is provided!\n" ), 293*cdf0e10cSrcweir uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 294*cdf0e10cSrcweir 2 ); 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir uno::Reference< uno::XInterface > xResult( 297*cdf0e10cSrcweir static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, aClassID, aClassName ) ), 298*cdf0e10cSrcweir uno::UNO_QUERY ); 299*cdf0e10cSrcweir 300*cdf0e10cSrcweir uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY ); 301*cdf0e10cSrcweir if ( xPersist.is() ) 302*cdf0e10cSrcweir { 303*cdf0e10cSrcweir xPersist->setPersistentEntry( xStorage, 304*cdf0e10cSrcweir sEntName, 305*cdf0e10cSrcweir embed::EntryInitModes::DEFAULT_INIT, 306*cdf0e10cSrcweir uno::Sequence< beans::PropertyValue >(), 307*cdf0e10cSrcweir lObjArgs ); 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir } 310*cdf0e10cSrcweir else 311*cdf0e10cSrcweir throw uno::RuntimeException(); // TODO: 312*cdf0e10cSrcweir 313*cdf0e10cSrcweir return xResult; 314*cdf0e10cSrcweir } 315*cdf0e10cSrcweir 316*cdf0e10cSrcweir //------------------------------------------------------------------------- 317*cdf0e10cSrcweir ::rtl::OUString SAL_CALL OleEmbeddedObjectFactory::getImplementationName() 318*cdf0e10cSrcweir throw ( uno::RuntimeException ) 319*cdf0e10cSrcweir { 320*cdf0e10cSrcweir return impl_staticGetImplementationName(); 321*cdf0e10cSrcweir } 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir //------------------------------------------------------------------------- 324*cdf0e10cSrcweir sal_Bool SAL_CALL OleEmbeddedObjectFactory::supportsService( const ::rtl::OUString& ServiceName ) 325*cdf0e10cSrcweir throw ( uno::RuntimeException ) 326*cdf0e10cSrcweir { 327*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aSeq = impl_staticGetSupportedServiceNames(); 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) 330*cdf0e10cSrcweir if ( ServiceName.compareTo( aSeq[nInd] ) == 0 ) 331*cdf0e10cSrcweir return sal_True; 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir return sal_False; 334*cdf0e10cSrcweir } 335*cdf0e10cSrcweir 336*cdf0e10cSrcweir //------------------------------------------------------------------------- 337*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > SAL_CALL OleEmbeddedObjectFactory::getSupportedServiceNames() 338*cdf0e10cSrcweir throw ( uno::RuntimeException ) 339*cdf0e10cSrcweir { 340*cdf0e10cSrcweir return impl_staticGetSupportedServiceNames(); 341*cdf0e10cSrcweir } 342*cdf0e10cSrcweir 343