Update ooo320-m1
[ooovba.git] / sc / source / ui / vba / vbachartobjects.hxx
blobb22f2a76cf71a9aa7f5c97aeb0f6dc3e55da671d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vbachartobjects.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VBA_CHARTOBJECTS_HXX
31 #define SC_VBA_CHARTOBJECTS_HXX
32 #include <ooo/vba/excel/XChartObjects.hpp>
33 #include <ooo/vba/excel/XChartObject.hpp>
34 #include <cppuhelper/implbase1.hxx>
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <com/sun/star/table/XTableCharts.hpp>
37 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
38 #include <com/sun/star/container/XEnumerationAccess.hpp>
39 #include <vbahelper/vbacollectionimpl.hxx>
40 #include "excelvbahelper.hxx"
41 #include <hash_map>
43 typedef CollTestImplHelper< ov::excel::XChartObjects > ChartObjects_BASE;
44 /* #TODO see if this hash table is 'really' necessary
45 typedef ::std::hash_map< ::rtl::OUString,
46 css::uno::Reference< ov::excel::XChartObject >,
47 ::rtl::OUStringHash,
48 ::std::equal_to< ::rtl::OUString > > aHashTable;
51 class ScVbaChartObjects : public ChartObjects_BASE
54 css::uno::Reference< css::table::XTableCharts > xTableCharts;
55 css::uno::Reference< css::drawing::XDrawPageSupplier > xDrawPageSupplier;
56 // method associated with populating the hashmap ( I'm not convinced this is necessary )
57 //css::uno::Reference< ov::excel::XChartObject > putByPersistName( const rtl:::OUString& _sPersistChartName );
58 public:
59 ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier );
61 css::uno::Sequence< rtl::OUString > getChartObjectNames() throw( css::script::BasicErrorException );
62 void removeByName(const rtl::OUString& _sChartName);
64 // XChartObjects
65 virtual ::com::sun::star::uno::Any SAL_CALL Add( double Left, double Top, double Width, double Height ) throw (::com::sun::star::script::BasicErrorException);
66 virtual void SAL_CALL Delete( ) throw (::com::sun::star::script::BasicErrorException);
67 // XEnumerationAccess
68 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
69 // XElementAccess
70 virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
71 // ScVbaCollectionBaseImpl
72 virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
73 // ChartObjects_BASE
74 virtual rtl::OUString& getServiceImplName();
75 virtual css::uno::Sequence<rtl::OUString> getServiceNames();
78 #endif //SC_VBA_WINDOW_HXX