Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef SC_VBA_CHARTOBJECTS_HXX
20 : #define SC_VBA_CHARTOBJECTS_HXX
21 : #include <ooo/vba/excel/XChartObjects.hpp>
22 : #include <ooo/vba/excel/XChartObject.hpp>
23 : #include <cppuhelper/implbase1.hxx>
24 : #include <com/sun/star/uno/XComponentContext.hpp>
25 : #include <com/sun/star/table/XTableCharts.hpp>
26 : #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
27 : #include <com/sun/star/container/XEnumerationAccess.hpp>
28 : #include <vbahelper/vbacollectionimpl.hxx>
29 : #include "excelvbahelper.hxx"
30 : #include <boost/unordered_map.hpp>
31 :
32 : typedef CollTestImplHelper< ov::excel::XChartObjects > ChartObjects_BASE;
33 : /* #TODO see if this hash table is 'really' necessary
34 : typedef ::boost::unordered_map< ::rtl::OUString,
35 : css::uno::Reference< ov::excel::XChartObject >,
36 : ::rtl::OUStringHash,
37 : ::std::equal_to< ::rtl::OUString > > aHashTable;
38 : */
39 :
40 0 : class ScVbaChartObjects : public ChartObjects_BASE
41 : {
42 :
43 : css::uno::Reference< css::table::XTableCharts > xTableCharts;
44 : css::uno::Reference< css::drawing::XDrawPageSupplier > xDrawPageSupplier;
45 : // method associated with populating the hashmap ( I'm not convinced this is necessary )
46 : //css::uno::Reference< ov::excel::XChartObject > putByPersistName( const rtl:::OUString& _sPersistChartName );
47 : public:
48 : 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 );
49 :
50 : css::uno::Sequence< rtl::OUString > getChartObjectNames() throw( css::script::BasicErrorException );
51 : void removeByName(const rtl::OUString& _sChartName);
52 :
53 : // XChartObjects
54 : virtual ::com::sun::star::uno::Any SAL_CALL Add( double Left, double Top, double Width, double Height ) throw (::com::sun::star::script::BasicErrorException);
55 : virtual void SAL_CALL Delete( ) throw (::com::sun::star::script::BasicErrorException);
56 : // XEnumerationAccess
57 : virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException);
58 : // XElementAccess
59 : virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException);
60 : // ScVbaCollectionBaseImpl
61 : virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource );
62 : // ChartObjects_BASE
63 : virtual rtl::OUString getServiceImplName();
64 : virtual css::uno::Sequence<rtl::OUString> getServiceNames();
65 : };
66 :
67 : #endif //SC_VBA_WINDOW_HXX
68 :
69 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|