LCOV - code coverage report
Current view: top level - framework/source/helper - statusindicator.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 33 40 82.5 %
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 <config_features.h>
      21             : 
      22             : #include <helper/statusindicator.hxx>
      23             : 
      24             : namespace framework{
      25             : 
      26        2057 : StatusIndicator::StatusIndicator(StatusIndicatorFactory* pFactory)
      27        2057 :     : m_xFactory         (pFactory)
      28             : {
      29        2057 : }
      30             : 
      31        4108 : StatusIndicator::~StatusIndicator()
      32             : {
      33        4108 : }
      34             : 
      35        1328 : void SAL_CALL StatusIndicator::start(const OUString& sText ,
      36             :                                            sal_Int32        nRange)
      37             :     throw(css::uno::RuntimeException, std::exception)
      38             : {
      39             : #if !HAVE_FEATURE_DESKTOP
      40             :     (void) sText;
      41             :     (void) nRange;
      42             : #else
      43        1328 :     css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
      44        1328 :     if (xFactory.is())
      45             :     {
      46        1328 :         StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
      47        1328 :         pFactory->start(this, sText, nRange);
      48        1328 :     }
      49             : #endif
      50        1328 : }
      51             : 
      52         546 : void SAL_CALL StatusIndicator::end()
      53             :     throw(css::uno::RuntimeException, std::exception)
      54             : {
      55             : #if HAVE_FEATURE_DESKTOP
      56         546 :     css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
      57         546 :     if (xFactory.is())
      58             :     {
      59         546 :         StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
      60         546 :         pFactory->end(this);
      61         546 :     }
      62             : #endif
      63         546 : }
      64             : 
      65         168 : void SAL_CALL StatusIndicator::reset()
      66             :     throw(css::uno::RuntimeException, std::exception)
      67             : {
      68             : #if HAVE_FEATURE_DESKTOP
      69         168 :     css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
      70         168 :     if (xFactory.is())
      71             :     {
      72         168 :         StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
      73         168 :         pFactory->reset(this);
      74         168 :     }
      75             : #endif
      76         168 : }
      77             : 
      78           0 : void SAL_CALL StatusIndicator::setText(const OUString& sText)
      79             :     throw(css::uno::RuntimeException, std::exception)
      80             : {
      81             : #if !HAVE_FEATURE_DESKTOP
      82             :     (void) sText;
      83             : #else
      84           0 :     css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
      85           0 :     if (xFactory.is())
      86             :     {
      87           0 :         StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
      88           0 :         pFactory->setText(this, sText);
      89           0 :     }
      90             : #endif
      91           0 : }
      92             : 
      93       20890 : void SAL_CALL StatusIndicator::setValue(sal_Int32 nValue)
      94             :     throw(css::uno::RuntimeException, std::exception)
      95             : {
      96             : #if !HAVE_FEATURE_DESKTOP
      97             :     (void) nValue;
      98             : #else
      99       20890 :     css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
     100       20890 :     if (xFactory.is())
     101             :     {
     102       20890 :         StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
     103       20890 :         pFactory->setValue(this, nValue);
     104       20890 :     }
     105             : #endif
     106       20890 : }
     107             : 
     108             : } // namespace framework
     109             : 
     110             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10