LCOV - code coverage report
Current view: top level - libreoffice/oox/source/drawingml/chart - datasourceconverter.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 24 4.2 %
Date: 2012-12-27 Functions: 2 10 20.0 %
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             : #include "oox/drawingml/chart/datasourceconverter.hxx"
      21             : 
      22             : #include <com/sun/star/chart2/XChartDocument.hpp>
      23             : #include "oox/drawingml/chart/chartconverter.hxx"
      24             : #include "oox/drawingml/chart/datasourcemodel.hxx"
      25             : #include "oox/token/properties.hxx"
      26             : 
      27             : namespace oox {
      28             : namespace drawingml {
      29             : namespace chart {
      30             : 
      31             : // ============================================================================
      32             : 
      33             : using namespace ::com::sun::star::chart2::data;
      34             : using namespace ::com::sun::star::uno;
      35             : 
      36             : // ============================================================================
      37             : 
      38           0 : DataSequenceConverter::DataSequenceConverter( const ConverterRoot& rParent, DataSequenceModel& rModel ) :
      39           0 :     ConverterBase< DataSequenceModel >( rParent, rModel )
      40             : {
      41           0 : }
      42             : 
      43           0 : DataSequenceConverter::~DataSequenceConverter()
      44             : {
      45           0 : }
      46             : 
      47           0 : Reference< XDataSequence > DataSequenceConverter::createDataSequence( const OUString& rRole )
      48             : {
      49             :     // create data sequence from data source model (virtual call at chart converter)
      50           0 :     Reference< XDataSequence > xDataSeq;
      51           0 :     if( getChartConverter() )
      52             :     {
      53           0 :         xDataSeq = getChartConverter()->createDataSequence( getChartDocument()->getDataProvider(), mrModel );
      54             : 
      55             :         // set sequen   ce role
      56           0 :         PropertySet aSeqProp( xDataSeq );
      57           0 :         aSeqProp.setProperty( PROP_Role, rRole );
      58             :     }
      59           0 :     return xDataSeq;
      60             : }
      61             : 
      62             : // ============================================================================
      63             : 
      64           0 : DataSourceConverter::DataSourceConverter( const ConverterRoot& rParent, DataSourceModel& rModel ) :
      65           0 :     ConverterBase< DataSourceModel >( rParent, rModel )
      66             : {
      67           0 : }
      68             : 
      69           0 : DataSourceConverter::~DataSourceConverter()
      70             : {
      71           0 : }
      72             : 
      73           0 : Reference< XDataSequence > DataSourceConverter::createDataSequence( const OUString& rRole )
      74             : {
      75           0 :     Reference< XDataSequence > xDataSeq;
      76           0 :     if( mrModel.mxDataSeq.is() )
      77             :     {
      78           0 :         DataSequenceConverter aDataSeqConv( *this, *mrModel.mxDataSeq );
      79           0 :         xDataSeq = aDataSeqConv.createDataSequence( rRole );
      80             :     }
      81           0 :     return xDataSeq;
      82             : }
      83             : 
      84             : // ============================================================================
      85             : 
      86             : } // namespace chart
      87             : } // namespace drawingml
      88          51 : } // namespace oox
      89             : 
      90             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10