LCOV - code coverage report
Current view: top level - framework/source/uielement - statusindicatorinterfacewrapper.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 37 45 82.2 %
Date: 2015-06-13 12:38:46 Functions: 7 8 87.5 %
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 <uielement/statusindicatorinterfacewrapper.hxx>
      21             : #include <uielement/progressbarwrapper.hxx>
      22             : 
      23             : #include <vcl/svapp.hxx>
      24             : #include <osl/mutex.hxx>
      25             : 
      26             : using namespace cppu;
      27             : using namespace com::sun::star::uno;
      28             : using namespace com::sun::star::lang;
      29             : using namespace com::sun::star::beans;
      30             : 
      31             : namespace framework
      32             : {
      33             : 
      34        3282 : StatusIndicatorInterfaceWrapper::StatusIndicatorInterfaceWrapper(
      35             :     const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rStatusIndicatorImpl ) :
      36        3282 :     m_xStatusIndicatorImpl( rStatusIndicatorImpl )
      37             : {
      38        3282 : }
      39             : 
      40        6546 : StatusIndicatorInterfaceWrapper::~StatusIndicatorInterfaceWrapper()
      41             : {
      42        6546 : }
      43             : 
      44        2776 : void SAL_CALL StatusIndicatorInterfaceWrapper::start(
      45             :     const OUString& sText,
      46             :     sal_Int32              nRange )
      47             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      48             : {
      49        2776 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
      50        2776 :     if ( xComp.is() )
      51             :     {
      52        2776 :         ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
      53        2776 :         if ( pProgressBar )
      54        2776 :             pProgressBar->start( sText, nRange );
      55        2776 :     }
      56        2776 : }
      57             : 
      58        2896 : void SAL_CALL StatusIndicatorInterfaceWrapper::end()
      59             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      60             : {
      61        2896 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
      62        2896 :     if ( xComp.is() )
      63             :     {
      64        2896 :         ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
      65        2896 :         if ( pProgressBar )
      66        2896 :             pProgressBar->end();
      67        2896 :     }
      68        2896 : }
      69             : 
      70         721 : void SAL_CALL StatusIndicatorInterfaceWrapper::reset()
      71             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      72             : {
      73         721 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
      74         721 :     if ( xComp.is() )
      75             :     {
      76         721 :         ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
      77         721 :         if ( pProgressBar )
      78         721 :             pProgressBar->reset();
      79         721 :     }
      80         721 : }
      81             : 
      82           0 : void SAL_CALL StatusIndicatorInterfaceWrapper::setText(
      83             :     const OUString& sText )
      84             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      85             : {
      86           0 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
      87           0 :     if ( xComp.is() )
      88             :     {
      89           0 :         ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
      90           0 :         if ( pProgressBar )
      91           0 :             pProgressBar->setText( sText );
      92           0 :     }
      93           0 : }
      94             : 
      95       34482 : void SAL_CALL StatusIndicatorInterfaceWrapper::setValue(
      96             :     sal_Int32 nValue )
      97             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      98             : {
      99       34482 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
     100       34482 :     if ( xComp.is() )
     101             :     {
     102       34482 :         ProgressBarWrapper* pProgressBar = static_cast<ProgressBarWrapper*>(xComp.get());
     103       34482 :         if ( pProgressBar )
     104       34482 :             pProgressBar->setValue( nValue );
     105       34482 :     }
     106       34482 : }
     107             : 
     108             : } // namespace framework
     109             : 
     110             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11