LCOV - code coverage report
Current view: top level - include/svl - nranges.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 6 6 100.0 %
Date: 2014-11-03 Functions: 3 3 100.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             : #ifdef MACOSX
      20             : // We need an empty block in here. Otherwise, if the #ifndef INCLUDED_SVL_NRANGES_HXX
      21             : // line is the first line, the Mac OS X version of the gcc preprocessor will
      22             : // incorrectly optimize the inclusion process and will never include this file
      23             : // a second time
      24             : #endif
      25             : 
      26             : #ifndef INCLUDED_SVL_NRANGES_HXX
      27             : #define INCLUDED_SVL_NRANGES_HXX
      28             : 
      29             : class SfxUShortRanges
      30             : {
      31             :     sal_uInt16*                 _pRanges; // 0-terminated array of sal_uInt16-pairs
      32             : 
      33             : public:
      34             :                                 SfxUShortRanges() : _pRanges( 0 ) {}
      35             :                                 SfxUShortRanges( const SfxUShortRanges &rOrig );
      36             :                                 SfxUShortRanges( sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
      37             :                                 SfxUShortRanges( const sal_uInt16* nNumTable );
      38      102080 :                                 ~SfxUShortRanges()
      39      102080 :                                 { delete [] _pRanges; }
      40             : 
      41             :     bool                        operator == ( const SfxUShortRanges & ) const;
      42             :     bool                        operator != ( const SfxUShortRanges & rRanges ) const
      43             :                                 { return !( *this == rRanges ); }
      44             : 
      45             :     SfxUShortRanges&            operator = ( const SfxUShortRanges & );
      46             : 
      47             :     SfxUShortRanges&            operator += ( const SfxUShortRanges & );
      48             :     SfxUShortRanges&            operator -= ( const SfxUShortRanges & );
      49             :     SfxUShortRanges&            operator /= ( const SfxUShortRanges & );
      50             : 
      51             :     sal_uInt16                  Count() const;
      52      102080 :     bool                        IsEmpty() const
      53      102080 :                                 { return !_pRanges || 0 == *_pRanges; }
      54             : 
      55       51040 :                                 operator const sal_uInt16* () const
      56       51040 :                                 { return _pRanges; }
      57             : };
      58             : 
      59             : #endif
      60             : 
      61             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10