LCOV - code coverage report
Current view: top level - framework/source/uielement - statusindicatorinterfacewrapper.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 37 45 82.2 %
Date: 2014-04-11 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        2077 : StatusIndicatorInterfaceWrapper::StatusIndicatorInterfaceWrapper(
      35             :     const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& rStatusIndicatorImpl ) :
      36        2077 :     m_xStatusIndicatorImpl( rStatusIndicatorImpl )
      37             : {
      38        2077 : }
      39             : 
      40        4128 : StatusIndicatorInterfaceWrapper::~StatusIndicatorInterfaceWrapper()
      41             : {
      42        4128 : }
      43             : 
      44        1533 : void SAL_CALL StatusIndicatorInterfaceWrapper::start(
      45             :     const OUString& sText,
      46             :     sal_Int32              nRange )
      47             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      48             : {
      49        1533 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
      50        1533 :     if ( xComp.is() )
      51             :     {
      52        1533 :         ProgressBarWrapper* pProgressBar = (ProgressBarWrapper*)xComp.get();
      53        1533 :         if ( pProgressBar )
      54        1533 :             pProgressBar->start( sText, nRange );
      55        1533 :     }
      56        1533 : }
      57             : 
      58         751 : void SAL_CALL StatusIndicatorInterfaceWrapper::end()
      59             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      60             : {
      61         751 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
      62         751 :     if ( xComp.is() )
      63             :     {
      64         751 :         ProgressBarWrapper* pProgressBar = (ProgressBarWrapper*)xComp.get();
      65         751 :         if ( pProgressBar )
      66         751 :             pProgressBar->end();
      67         751 :     }
      68         751 : }
      69             : 
      70         373 : void SAL_CALL StatusIndicatorInterfaceWrapper::reset()
      71             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      72             : {
      73         373 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
      74         373 :     if ( xComp.is() )
      75             :     {
      76         373 :         ProgressBarWrapper* pProgressBar = (ProgressBarWrapper*)xComp.get();
      77         373 :         if ( pProgressBar )
      78         373 :             pProgressBar->reset();
      79         373 :     }
      80         373 : }
      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 = (ProgressBarWrapper*)xComp.get();
      90           0 :         if ( pProgressBar )
      91           0 :             pProgressBar->setText( sText );
      92           0 :     }
      93           0 : }
      94             : 
      95       20827 : void SAL_CALL StatusIndicatorInterfaceWrapper::setValue(
      96             :     sal_Int32 nValue )
      97             : throw( ::com::sun::star::uno::RuntimeException, std::exception )
      98             : {
      99       20827 :     Reference< XComponent > xComp( m_xStatusIndicatorImpl );
     100       20827 :     if ( xComp.is() )
     101             :     {
     102       20827 :         ProgressBarWrapper* pProgressBar = (ProgressBarWrapper*)xComp.get();
     103       20827 :         if ( pProgressBar )
     104       20827 :             pProgressBar->setValue( nValue );
     105       20827 :     }
     106       20827 : }
     107             : 
     108             : } // namespace framework
     109             : 
     110             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10