fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / inc / DataSource.hxx
blob6f55fec23dea16747320740da4aa79258598b442
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_INC_DATASOURCE_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_DATASOURCE_HXX
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/chart2/data/XDataSource.hpp>
24 #include <com/sun/star/chart2/data/XDataSink.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <cppuhelper/implbase3.hxx>
27 #include <comphelper/uno3.hxx>
29 namespace chart
32 class DataSource : public
33 ::cppu::WeakImplHelper3<
34 ::com::sun::star::lang::XServiceInfo,
35 ::com::sun::star::chart2::data::XDataSource,
36 ::com::sun::star::chart2::data::XDataSink >
38 public:
39 explicit DataSource(
40 const ::com::sun::star::uno::Reference<
41 ::com::sun::star::uno::XComponentContext > & xContext );
42 explicit DataSource(
43 const ::com::sun::star::uno::Sequence<
44 ::com::sun::star::uno::Reference<
45 ::com::sun::star::chart2::data::XLabeledDataSequence > > & rSequences );
47 virtual ~DataSource();
49 /// establish methods for factory instatiation
50 static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext)
51 throw(css::uno::Exception)
53 return (::cppu::OWeakObject *)new DataSource( xContext );
55 /// declare XServiceInfo methods
56 virtual OUString SAL_CALL getImplementationName()
57 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
58 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
59 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
60 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
61 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
63 static OUString getImplementationName_Static();
64 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
66 protected:
67 // ____ XDataSource ____
68 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL
69 getDataSequences()
70 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
72 // ____ XDataSink ____
73 virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > >& aData )
74 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
76 private:
77 ::com::sun::star::uno::Sequence<
78 ::com::sun::star::uno::Reference<
79 ::com::sun::star::chart2::data::XLabeledDataSequence > >
80 m_aDataSeq;
83 } // namespace chart
85 // INCLUDED_CHART2_SOURCE_INC_DATASOURCE_HXX
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */