LCOV - code coverage report
Current view: top level - chart2/source/controller/dialogs - dlg_ChartType_UNO.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 42 4.8 %
Date: 2012-08-25 Functions: 1 14 7.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 50 0.0 %

           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 "dlg_ChartType_UNO.hxx"
      22                 :            : #include "dlg_ChartType.hxx"
      23                 :            : #include "servicenames.hxx"
      24                 :            : #include <osl/mutex.hxx>
      25                 :            : 
      26                 :            : //.............................................................................
      27                 :            : namespace chart
      28                 :            : {
      29                 :            : //.............................................................................
      30                 :            : using namespace ::com::sun::star;
      31                 :            : uno::Reference< uno::XInterface >
      32                 :          0 :             SAL_CALL ChartTypeUnoDlg::Create(const uno::Reference< uno::XComponentContext >& _xContext)
      33                 :            : {
      34         [ #  # ]:          0 :     return *(new ChartTypeUnoDlg(_xContext));
      35                 :            : }
      36                 :            : // -----------------------------------------------------------------------------
      37                 :          0 : ChartTypeUnoDlg::ChartTypeUnoDlg( const uno::Reference< uno::XComponentContext >& _xContext )
      38         [ #  # ]:          0 :                     : ChartTypeUnoDlg_BASE( _xContext )
      39                 :            : {
      40                 :          0 : }
      41                 :            : // -----------------------------------------------------------------------------
      42         [ #  # ]:          0 : ChartTypeUnoDlg::~ChartTypeUnoDlg()
      43                 :            : {
      44                 :            :     // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor,
      45                 :            :     // so this virtual-method-call the base class does does not work, we're already dead then ...
      46         [ #  # ]:          0 :     if (m_pDialog)
      47                 :            :     {
      48         [ #  # ]:          0 :         ::osl::MutexGuard aGuard(m_aMutex);
      49         [ #  # ]:          0 :         if (m_pDialog)
      50 [ #  # ][ #  # ]:          0 :             destroyDialog();
      51                 :            :     }
      52         [ #  # ]:          0 : }
      53                 :            : //-------------------------------------------------------------------------
      54                 :            : // lang::XServiceInfo
      55                 :            : //-------------------------------------------------------------------------
      56                 :          0 : ::rtl::OUString SAL_CALL ChartTypeUnoDlg::getImplementationName() throw(uno::RuntimeException)
      57                 :            : {
      58                 :          0 :     return getImplementationName_Static();
      59                 :            : }
      60                 :            : 
      61                 :            : //-------------------------------------------------------------------------
      62                 :         32 : ::rtl::OUString ChartTypeUnoDlg::getImplementationName_Static() throw(uno::RuntimeException)
      63                 :            : {
      64                 :         32 :     return CHART_TYPE_DIALOG_SERVICE_IMPLEMENTATION_NAME;
      65                 :            : }
      66                 :            : 
      67                 :            : //-------------------------------------------------------------------------
      68                 :          0 : ::comphelper::StringSequence SAL_CALL ChartTypeUnoDlg::getSupportedServiceNames() throw(uno::RuntimeException)
      69                 :            : {
      70                 :          0 :     return getSupportedServiceNames_Static();
      71                 :            : }
      72                 :            : 
      73                 :            : //-------------------------------------------------------------------------
      74                 :            : 
      75                 :          0 : uno::Sequence< rtl::OUString > ChartTypeUnoDlg::getSupportedServiceNames_Static()
      76                 :            : {
      77                 :          0 :     uno::Sequence< rtl::OUString > aSNS( 1 );
      78 [ #  # ][ #  # ]:          0 :     aSNS.getArray()[ 0 ] = CHART_TYPE_DIALOG_SERVICE_NAME;
      79                 :          0 :     return aSNS;
      80                 :            : }
      81                 :            : //-------------------------------------------------------------------------
      82                 :          0 : uno::Sequence< sal_Int8 > SAL_CALL ChartTypeUnoDlg::getImplementationId( void ) throw( uno::RuntimeException )
      83                 :            : {
      84 [ #  # ][ #  # ]:          0 :     static ::cppu::OImplementationId aId;
      85                 :          0 :     return aId.getImplementationId();
      86                 :            : }
      87                 :            : //------------------------------------------------------------------------------
      88                 :          0 : void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue)
      89                 :            : {
      90                 :          0 :     beans::PropertyValue aProperty;
      91 [ #  # ][ #  # ]:          0 :     if (_rValue >>= aProperty)
      92                 :            :     {
      93         [ #  # ]:          0 :         if (0 == aProperty.Name.compareToAscii("ChartModel"))
      94         [ #  # ]:          0 :             m_xChartModel.set(aProperty.Value,uno::UNO_QUERY);
      95                 :            :         else
      96         [ #  # ]:          0 :             ChartTypeUnoDlg_BASE::implInitialize(_rValue);
      97                 :            :     }
      98                 :            :     else
      99         [ #  # ]:          0 :         ChartTypeUnoDlg_BASE::implInitialize(_rValue);
     100                 :          0 : }
     101                 :            : //------------------------------------------------------------------------------
     102                 :          0 : Dialog* ChartTypeUnoDlg::createDialog(Window* _pParent)
     103                 :            : {
     104 [ #  # ][ #  # ]:          0 :     return new ChartTypeDialog( _pParent, m_xChartModel, m_aContext.getUNOContext() );
     105                 :            : }
     106                 :            : //-------------------------------------------------------------------------
     107                 :            : //-------------------------------------------------------------------------
     108                 :          0 : uno::Reference<beans::XPropertySetInfo>  SAL_CALL ChartTypeUnoDlg::getPropertySetInfo() throw(uno::RuntimeException)
     109                 :            : {
     110                 :          0 :     return createPropertySetInfo( getInfoHelper() );
     111                 :            : }
     112                 :            : 
     113                 :            : //-------------------------------------------------------------------------
     114                 :          0 : ::cppu::IPropertyArrayHelper& ChartTypeUnoDlg::getInfoHelper()
     115                 :            : {
     116                 :          0 :     return *const_cast<ChartTypeUnoDlg*>(this)->getArrayHelper();
     117                 :            : }
     118                 :            : 
     119                 :            : //------------------------------------------------------------------------------
     120                 :          0 : ::cppu::IPropertyArrayHelper* ChartTypeUnoDlg::createArrayHelper( ) const
     121                 :            : {
     122         [ #  # ]:          0 :     uno::Sequence< beans::Property > aProps;
     123         [ #  # ]:          0 :     describeProperties(aProps);
     124 [ #  # ][ #  # ]:          0 :     return new ::cppu::OPropertyArrayHelper(aProps);
     125                 :            : }
     126                 :            : 
     127                 :            : //.............................................................................
     128                 :            : } //namespace chart
     129                 :            : //.............................................................................
     130                 :            : 
     131                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10