LCOV - code coverage report
Current view: top level - chart2/source/controller/dialogs - dlg_ChartType_UNO.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 2 41 4.9 %
Date: 2014-04-11 Functions: 1 14 7.1 %
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 "dlg_ChartType_UNO.hxx"
      21             : #include "dlg_ChartType.hxx"
      22             : #include "servicenames.hxx"
      23             : #include <osl/mutex.hxx>
      24             : 
      25             : namespace chart
      26             : {
      27             : using namespace ::com::sun::star;
      28             : uno::Reference< uno::XInterface >
      29           0 :             SAL_CALL ChartTypeUnoDlg::Create(const uno::Reference< uno::XComponentContext >& _xContext)
      30             : {
      31           0 :     return *(new ChartTypeUnoDlg(_xContext));
      32             : }
      33           0 : ChartTypeUnoDlg::ChartTypeUnoDlg( const uno::Reference< uno::XComponentContext >& _xContext )
      34           0 :                     : ChartTypeUnoDlg_BASE( _xContext )
      35             : {
      36           0 : }
      37           0 : ChartTypeUnoDlg::~ChartTypeUnoDlg()
      38             : {
      39             :     // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor,
      40             :     // so this virtual-method-call the base class does does not work, we're already dead then ...
      41           0 :     if (m_pDialog)
      42             :     {
      43           0 :         ::osl::MutexGuard aGuard(m_aMutex);
      44           0 :         if (m_pDialog)
      45           0 :             destroyDialog();
      46             :     }
      47           0 : }
      48             : // lang::XServiceInfo
      49           0 : OUString SAL_CALL ChartTypeUnoDlg::getImplementationName() throw(uno::RuntimeException, std::exception)
      50             : {
      51           0 :     return getImplementationName_Static();
      52             : }
      53             : 
      54          23 : OUString ChartTypeUnoDlg::getImplementationName_Static() throw(uno::RuntimeException)
      55             : {
      56          23 :     return CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME;
      57             : }
      58             : 
      59           0 : ::comphelper::StringSequence SAL_CALL ChartTypeUnoDlg::getSupportedServiceNames() throw(uno::RuntimeException, std::exception)
      60             : {
      61           0 :     return getSupportedServiceNames_Static();
      62             : }
      63             : 
      64           0 : uno::Sequence< OUString > ChartTypeUnoDlg::getSupportedServiceNames_Static()
      65             : {
      66           0 :     uno::Sequence< OUString > aSNS( 1 );
      67           0 :     aSNS.getArray()[ 0 ] = CHART_TYPE_DIALOG_SERVICE_NAME;
      68           0 :     return aSNS;
      69             : }
      70           0 : uno::Sequence< sal_Int8 > SAL_CALL ChartTypeUnoDlg::getImplementationId( void ) throw( uno::RuntimeException, std::exception )
      71             : {
      72           0 :     return css::uno::Sequence<sal_Int8>();
      73             : }
      74           0 : void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue)
      75             : {
      76           0 :     beans::PropertyValue aProperty;
      77           0 :     if (_rValue >>= aProperty)
      78             :     {
      79           0 :         if (aProperty.Name.equalsAscii("ChartModel"))
      80           0 :             m_xChartModel.set(aProperty.Value,uno::UNO_QUERY);
      81             :         else
      82           0 :             ChartTypeUnoDlg_BASE::implInitialize(_rValue);
      83             :     }
      84             :     else
      85           0 :         ChartTypeUnoDlg_BASE::implInitialize(_rValue);
      86           0 : }
      87           0 : Dialog* ChartTypeUnoDlg::createDialog(Window* _pParent)
      88             : {
      89           0 :     return new ChartTypeDialog( _pParent, m_xChartModel, m_aContext );
      90             : }
      91           0 : uno::Reference<beans::XPropertySetInfo>  SAL_CALL ChartTypeUnoDlg::getPropertySetInfo() throw(uno::RuntimeException, std::exception)
      92             : {
      93           0 :     return createPropertySetInfo( getInfoHelper() );
      94             : }
      95             : 
      96           0 : ::cppu::IPropertyArrayHelper& ChartTypeUnoDlg::getInfoHelper()
      97             : {
      98           0 :     return *const_cast<ChartTypeUnoDlg*>(this)->getArrayHelper();
      99             : }
     100             : 
     101           0 : ::cppu::IPropertyArrayHelper* ChartTypeUnoDlg::createArrayHelper( ) const
     102             : {
     103           0 :     uno::Sequence< beans::Property > aProps;
     104           0 :     describeProperties(aProps);
     105           0 :     return new ::cppu::OPropertyArrayHelper(aProps);
     106             : }
     107             : 
     108             : } //namespace chart
     109             : 
     110             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10