1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #include "vbaseriescollection.hxx" 28 #include <ooo/vba/excel/XSeries.hpp> 29 30 #include "vbaglobals.hxx" 31 32 using namespace ::com::sun::star; 33 using namespace ::ooo::vba; 34 35 ScVbaSeriesCollection::ScVbaSeriesCollection( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext ) : SeriesCollection_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ) 36 { 37 } 38 39 // XEnumerationAccess 40 41 uno::Reference< container::XEnumeration > 42 ScVbaSeriesCollection::createEnumeration() throw (uno::RuntimeException) 43 { 44 uno::Reference< container::XEnumeration > xEnum; 45 return xEnum; 46 } 47 48 // XElementAccess 49 50 uno::Type 51 ScVbaSeriesCollection::getElementType() throw (uno::RuntimeException) 52 { 53 return excel::XSeries::static_type(0); 54 } 55 56 uno::Any 57 ScVbaSeriesCollection::createCollectionObject( const css::uno::Any& rSource ) 58 { 59 return rSource; 60 } 61 62 rtl::OUString& 63 ScVbaSeriesCollection::getServiceImplName() 64 { 65 static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaSeriesCollection") ); 66 return sImplName; 67 } 68 69 css::uno::Sequence<rtl::OUString> 70 ScVbaSeriesCollection::getServiceNames() 71 { 72 static uno::Sequence< rtl::OUString > sNames; 73 if ( sNames.getLength() == 0 ) 74 { 75 sNames.realloc( 1 ); 76 sNames[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.SeriesCollection") ); 77 } 78 return sNames; 79 } 80 81