LibreOffice Module chart2 (master) 1
DataSource.cxx
Go to the documentation of this file.
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#include <DataSource.hxx>
23
24namespace com::sun::star::uno { class XComponentContext; }
25
26using ::com::sun::star::uno::Sequence;
27using ::com::sun::star::uno::Reference;
28
29using namespace ::com::sun::star;
30
31
32namespace chart
33{
34
36{}
37
40 m_aDataSeq( rSequences )
41{}
42
44 const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & rSequences )
45{
46 m_aDataSeq = comphelper::containerToSequence< Reference< chart2::data::XLabeledDataSequence > >(rSequences);
47}
48
50{}
51
52// ____ XDataSource ____
54{
55 return m_aDataSeq;
56}
57
58// ____ XDataSink ____
60{
62}
63
65{
66 return "com.sun.star.comp.chart.DataSource";
67}
68
69sal_Bool SAL_CALL DataSource::supportsService( const OUString& rServiceName )
70{
71 return cppu::supportsService(this, rServiceName);
72}
73
74css::uno::Sequence< OUString > SAL_CALL DataSource::getSupportedServiceNames()
75{
76 return { "com.sun.star.chart2.data.DataSource" };
77}
78
79} // namespace chart
80
81extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
83 css::uno::Sequence<css::uno::Any> const &)
84{
85 return cppu::acquire(new ::chart::DataSource);
86}
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart_DataSource_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: DataSource.cxx:82
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: DataSource.cxx:69
virtual ~DataSource() override
Definition: DataSource.cxx:49
virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override
Definition: DataSource.cxx:53
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: DataSource.cxx:74
virtual void SAL_CALL setData(const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > &aData) override
Definition: DataSource.cxx:59
virtual OUString SAL_CALL getImplementationName() override
declare XServiceInfo methods
Definition: DataSource.cxx:64
css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > m_aDataSeq
Definition: DataSource.hxx:61
constexpr OUStringLiteral aData
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
unsigned char sal_Bool