LCOV - code coverage report
Current view: top level - tools/inc/tools - helpers.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 4 100.0 %
Date: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 6 6 100.0 %

           Branch data     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                 :            : #ifndef _TOOLS_HELPERS_HXX
      10                 :            : #define _TOOLS_HELPERS_HXX
      11                 :            : 
      12                 :      14433 : inline long MinMax( long nVal, long nMin, long nMax )
      13                 :            : {
      14 [ +  + ][ +  + ]:      14433 :     return nVal >= nMin ? ( nVal <= nMax ? nVal : nMax ) : nMin;
      15                 :            : }
      16                 :            : 
      17                 :            : inline long AlignedWidth4Bytes( long nWidthBits )
      18                 :            : {
      19                 :            :     return ( ( nWidthBits + 31 ) >> 5 ) << 2;
      20                 :            : }
      21                 :            : 
      22                 :    6838912 : inline long FRound( double fVal )
      23                 :            : {
      24         [ +  + ]:    6838912 :     return fVal > 0.0 ? static_cast<long>( fVal + 0.5 ) : -static_cast<long>( -fVal + 0.5 );
      25                 :            : }
      26                 :            : 
      27                 :            : #endif
      28                 :            : 
      29                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10