Branch data 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 : :
20 : :
21 : : #include "DataSource.hxx"
22 : : #include "LabeledDataSequence.hxx"
23 : :
24 : : using ::rtl::OUString;
25 : : using ::osl::MutexGuard;
26 : : using ::com::sun::star::uno::Sequence;
27 : : using ::com::sun::star::uno::Reference;
28 : : using ::com::sun::star::uno::RuntimeException;
29 : : using ::com::sun::star::uno::Any;
30 : :
31 : : using namespace ::com::sun::star;
32 : :
33 : : namespace
34 : : {
35 : 16 : static const ::rtl::OUString lcl_aServiceName(
36 : : RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.DataSource" ));
37 : : } // anonymous namespace
38 : :
39 : : namespace chart
40 : : {
41 : :
42 : 27 : DataSource::DataSource(
43 [ + - ]: 27 : const Reference< uno::XComponentContext > & /*xContext*/ )
44 : 27 : {}
45 : :
46 : 5360 : DataSource::DataSource(
47 : : const Sequence< Reference< chart2::data::XLabeledDataSequence > > & rSequences ) :
48 [ + - ]: 5360 : m_aDataSeq( rSequences )
49 : 5360 : {}
50 : :
51 [ + - ]: 5387 : DataSource::~DataSource()
52 [ - + ]: 10774 : {}
53 : :
54 : : // ____ XDataSource ____
55 : 5478 : Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSource::getDataSequences()
56 : : throw (uno::RuntimeException)
57 : : {
58 : 5478 : return m_aDataSeq;
59 : : }
60 : :
61 : : // ____ XDataSink ____
62 : 27 : void SAL_CALL DataSource::setData( const Sequence< Reference< chart2::data::XLabeledDataSequence > >& aData )
63 : : throw (uno::RuntimeException)
64 : : {
65 : 27 : m_aDataSeq = aData;
66 : 27 : }
67 : :
68 : : // ================================================================================
69 : :
70 : 5 : Sequence< OUString > DataSource::getSupportedServiceNames_Static()
71 : : {
72 : 5 : Sequence< OUString > aServices( 1 );
73 [ + - ][ + - ]: 5 : aServices[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.data.DataSource" ));
74 : 5 : return aServices;
75 : : }
76 : :
77 : : // ================================================================================
78 : :
79 [ # # ][ # # ]: 30 : APPHELPER_XSERVICEINFO_IMPL( DataSource, lcl_aServiceName );
[ # # ][ # # ]
[ # # ]
80 : :
81 [ + - ][ + - ]: 48 : } // namespace chart
82 : :
83 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|