LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/svl - intitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 33 43 76.7 %
Date: 2012-08-25 Functions: 26 32 81.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 9 24 37.5 %

           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                 :            :  * 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                 :            : #ifndef _SFXINTITEM_HXX
      21                 :            : #define _SFXINTITEM_HXX
      22                 :            : 
      23                 :            : #include "svl/svldllapi.h"
      24                 :            : #include <svl/cintitem.hxx>
      25                 :            : 
      26                 :            : //============================================================================
      27         [ -  + ]:       7072 : class SVL_DLLPUBLIC SfxByteItem: public CntByteItem
      28                 :            : {
      29                 :            : public:
      30                 :            :     TYPEINFO();
      31                 :            : 
      32                 :       1450 :     SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0):
      33                 :       1450 :         CntByteItem(which, nValue) {}
      34                 :            : 
      35                 :            :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
      36                 :            : 
      37                 :          0 :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
      38         [ #  # ]:          0 :     { return new SfxByteItem(*this); }
      39                 :            : };
      40                 :            : 
      41                 :            : //============================================================================
      42                 :            : DBG_NAMEEX_VISIBILITY(SfxInt16Item, SVL_DLLPUBLIC)
      43                 :            : 
      44                 :            : class SVL_DLLPUBLIC SfxInt16Item: public SfxPoolItem
      45                 :            : {
      46                 :            :     sal_Int16 m_nValue;
      47                 :            : 
      48                 :            : public:
      49                 :            :     TYPEINFO();
      50                 :            : 
      51                 :     595485 :     SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0):
      52                 :     595485 :         SfxPoolItem(which), m_nValue(nTheValue)
      53                 :     595485 :     { DBG_CTOR(SfxInt16Item, 0); }
      54                 :            : 
      55                 :            :     SfxInt16Item(sal_uInt16 nWhich, SvStream & rStream);
      56                 :            : 
      57                 :      41979 :     SfxInt16Item(const SfxInt16Item & rItem):
      58                 :      41979 :         SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
      59                 :      41979 :     { DBG_CTOR(SfxInt16Item, 0); }
      60                 :            : 
      61         [ -  + ]:     660304 :     virtual ~SfxInt16Item() { DBG_DTOR(SfxInt16Item, 0); }
      62                 :            : 
      63                 :            :     virtual int operator ==(const SfxPoolItem & rItem) const;
      64                 :            : 
      65                 :            :     using SfxPoolItem::Compare;
      66                 :            :     virtual int Compare(const SfxPoolItem & rWith) const;
      67                 :            : 
      68                 :            :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
      69                 :            :                                                 SfxMapUnit, SfxMapUnit,
      70                 :            :                                                 XubString & rText,
      71                 :            :                                                 const IntlWrapper * = 0)
      72                 :            :         const;
      73                 :            : 
      74                 :            :     virtual bool QueryValue( com::sun::star::uno::Any& rVal,
      75                 :            :                              sal_uInt8 nMemberId = 0 ) const;
      76                 :            : 
      77                 :            :     virtual bool PutValue( const com::sun::star::uno::Any& rVal,
      78                 :            :                            sal_uInt8 nMemberId = 0 );
      79                 :            : 
      80                 :            :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
      81                 :            : 
      82                 :            :     virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
      83                 :            : 
      84                 :            :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
      85                 :            : 
      86                 :            :     virtual sal_Int16 GetMin() const;
      87                 :            : 
      88                 :            :     virtual sal_Int16 GetMax() const;
      89                 :            : 
      90                 :            :     virtual SfxFieldUnit GetUnit() const;
      91                 :            : 
      92                 :    2635384 :     sal_Int16 GetValue() const { return m_nValue; }
      93                 :            : 
      94                 :            :     inline void SetValue(sal_Int16 nTheValue);
      95                 :            : };
      96                 :            : 
      97                 :      26758 : inline void SfxInt16Item::SetValue(sal_Int16 nTheValue)
      98                 :            : {
      99                 :            :     DBG_ASSERT(GetRefCount() == 0, "SfxInt16Item::SetValue(); Pooled item");
     100                 :      26758 :     m_nValue = nTheValue;
     101                 :      26758 : }
     102                 :            : 
     103                 :            : //============================================================================
     104         [ -  + ]:    1135935 : class SVL_DLLPUBLIC SfxUInt16Item: public CntUInt16Item
     105                 :            : {
     106                 :            : public:
     107                 :            :     TYPEINFO();
     108                 :            : 
     109                 :     396722 :     SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
     110                 :     396722 :         CntUInt16Item(which, nValue) {}
     111                 :            : 
     112                 :          0 :     SfxUInt16Item(sal_uInt16 which, SvStream & rStream):
     113                 :          0 :         CntUInt16Item(which, rStream) {}
     114                 :            : 
     115                 :          0 :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
     116         [ #  # ]:          0 :     { return new SfxUInt16Item(Which(), rStream); }
     117                 :            : 
     118                 :      49521 :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
     119         [ +  - ]:      49521 :     { return new SfxUInt16Item(*this); }
     120                 :            : };
     121                 :            : 
     122                 :            : //============================================================================
     123         [ -  + ]:     453418 : class SVL_DLLPUBLIC SfxInt32Item: public CntInt32Item
     124                 :            : {
     125                 :            : public:
     126                 :            :     TYPEINFO();
     127                 :            : 
     128                 :     326301 :     SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0):
     129                 :     326301 :         CntInt32Item(which, nValue) {}
     130                 :            : 
     131                 :        256 :     SfxInt32Item(sal_uInt16 which, SvStream & rStream):
     132                 :        256 :         CntInt32Item(which, rStream) {}
     133                 :            : 
     134                 :        256 :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
     135         [ +  - ]:        256 :     { return new SfxInt32Item(Which(), rStream); }
     136                 :            : 
     137                 :        999 :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
     138         [ +  - ]:        999 :     { return new SfxInt32Item(*this); }
     139                 :            : 
     140                 :            : };
     141                 :            : 
     142                 :            : //============================================================================
     143         [ -  + ]:      53062 : class SVL_DLLPUBLIC SfxUInt32Item: public CntUInt32Item
     144                 :            : {
     145                 :            : public:
     146                 :            :     TYPEINFO();
     147                 :            : 
     148                 :      34037 :     SfxUInt32Item(sal_uInt16 which = 0, sal_uInt32 nValue = 0):
     149                 :      34037 :         CntUInt32Item(which, nValue) {}
     150                 :            : 
     151                 :          0 :     SfxUInt32Item(sal_uInt16 which, SvStream & rStream):
     152                 :          0 :         CntUInt32Item(which, rStream) {}
     153                 :            : 
     154                 :          0 :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
     155         [ #  # ]:          0 :     { return new SfxUInt32Item(Which(), rStream); }
     156                 :            : 
     157                 :       5383 :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
     158         [ +  - ]:       5383 :     { return new SfxUInt32Item(*this); }
     159                 :            : };
     160                 :            : 
     161                 :            : #endif // _SFXINTITEM_HXX
     162                 :            : 
     163                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10