LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/chart2/source/tools - WeakListenerAdapter.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 20 50.0 %
Date: 2013-07-09 Functions: 4 8 50.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             : 
      21             : #include "WeakListenerAdapter.hxx"
      22             : 
      23             : using namespace ::com::sun::star;
      24             : 
      25             : using ::com::sun::star::uno::Reference;
      26             : using ::com::sun::star::uno::Sequence;
      27             : 
      28             : namespace chart
      29             : {
      30             : 
      31       10940 : WeakModifyListenerAdapter::WeakModifyListenerAdapter(
      32             :     const uno::WeakReference< util::XModifyListener > & xListener ) :
      33       10940 :         WeakListenerAdapter< ::com::sun::star::util::XModifyListener >( xListener )
      34       10940 : {}
      35             : 
      36       21880 : WeakModifyListenerAdapter::~WeakModifyListenerAdapter()
      37       21880 : {}
      38             : 
      39       19032 : void SAL_CALL WeakModifyListenerAdapter::modified( const lang::EventObject& aEvent )
      40             :     throw (uno::RuntimeException)
      41             : {
      42       19032 :     Reference< util::XModifyListener > xModListener( getListener() );
      43       19032 :     if( xModListener.is())
      44       19032 :         xModListener->modified( aEvent );
      45       19032 : }
      46             : 
      47             : // --------------------------------------------------------------------------------
      48             : 
      49           0 : WeakSelectionChangeListenerAdapter::WeakSelectionChangeListenerAdapter(
      50             :     const Reference< view::XSelectionChangeListener > & xListener ) :
      51           0 :         WeakListenerAdapter< ::com::sun::star::view::XSelectionChangeListener >( xListener )
      52           0 : {}
      53             : 
      54           0 : WeakSelectionChangeListenerAdapter::~WeakSelectionChangeListenerAdapter()
      55           0 : {}
      56             : 
      57           0 : void SAL_CALL WeakSelectionChangeListenerAdapter::selectionChanged( const lang::EventObject& aEvent )
      58             :     throw (uno::RuntimeException)
      59             : {
      60           0 :     Reference< view::XSelectionChangeListener > xSelChgListener( getListener() );
      61           0 :     if( xSelChgListener.is())
      62           0 :         xSelChgListener->selectionChanged( aEvent );
      63           0 : }
      64             : 
      65             : } //  namespace chart
      66             : 
      67             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10