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

Generated by: LCOV version 1.10