LCOV - code coverage report
Current view: top level - libreoffice/chart2/source/tools - DataSource.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 20 50.0 %
Date: 2012-12-27 Functions: 7 13 53.8 %
Legend: Lines: hit not hit

          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           1 : 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           0 : DataSource::DataSource(
      43           0 :     const Reference< uno::XComponentContext > & /*xContext*/ )
      44           0 : {}
      45             : 
      46         368 : DataSource::DataSource(
      47             :     const Sequence< Reference< chart2::data::XLabeledDataSequence > > & rSequences ) :
      48         368 :         m_aDataSeq( rSequences )
      49         368 : {}
      50             : 
      51         736 : DataSource::~DataSource()
      52         736 : {}
      53             : 
      54             : // ____ XDataSource ____
      55         368 : Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSource::getDataSequences()
      56             :     throw (uno::RuntimeException)
      57             : {
      58         368 :     return m_aDataSeq;
      59             : }
      60             : 
      61             : // ____ XDataSink ____
      62           0 : void SAL_CALL DataSource::setData( const Sequence< Reference< chart2::data::XLabeledDataSequence > >& aData )
      63             :     throw (uno::RuntimeException)
      64             : {
      65           0 :     m_aDataSeq = aData;
      66           0 : }
      67             : 
      68             : // ================================================================================
      69             : 
      70           0 : Sequence< OUString > DataSource::getSupportedServiceNames_Static()
      71             : {
      72           0 :     Sequence< OUString > aServices( 1 );
      73           0 :     aServices[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.data.DataSource" ));
      74           0 :     return aServices;
      75             : }
      76             : 
      77             : // ================================================================================
      78             : 
      79           3 : APPHELPER_XSERVICEINFO_IMPL( DataSource, lcl_aServiceName );
      80             : 
      81           3 : } // namespace chart
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10