LCOV - code coverage report
Current view: top level - solver/unxlngi6.pro/inc/svl - cintitem.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 43 43 100.0 %
Date: 2012-08-25 Functions: 20 24 83.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 8 50.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                 :            :  * 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 _SVTOOLS_CINTITEM_HXX
      21                 :            : #define _SVTOOLS_CINTITEM_HXX
      22                 :            : 
      23                 :            : #include "svl/svldllapi.h"
      24                 :            : #include <tools/debug.hxx>
      25                 :            : #include <svl/poolitem.hxx>
      26                 :            : 
      27                 :            : //============================================================================
      28                 :            : DBG_NAMEEX_VISIBILITY(CntByteItem, SVL_DLLPUBLIC)
      29                 :            : 
      30                 :            : class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem
      31                 :            : {
      32                 :            :     sal_uInt8 m_nValue;
      33                 :            : 
      34                 :            : public:
      35                 :            :     TYPEINFO();
      36                 :            : 
      37                 :       1450 :     CntByteItem(sal_uInt16 which = 0, sal_uInt8 nTheValue = 0):
      38                 :       1450 :         SfxPoolItem(which), m_nValue(nTheValue) { DBG_CTOR(CntByteItem, 0); }
      39                 :            : 
      40                 :       2909 :     CntByteItem(const CntByteItem & rItem):
      41                 :       2909 :         SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
      42                 :       2909 :     { DBG_CTOR(CntByteItem, 0); }
      43                 :            : 
      44         [ -  + ]:       4163 :     virtual ~CntByteItem() { DBG_DTOR(CntByteItem, 0); }
      45                 :            : 
      46                 :            :     virtual int operator ==(const SfxPoolItem & rItem) const;
      47                 :            : 
      48                 :            :     using SfxPoolItem::Compare;
      49                 :            :     virtual int Compare(const SfxPoolItem & rWith) const;
      50                 :            : 
      51                 :            :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
      52                 :            :                                                 SfxMapUnit, SfxMapUnit,
      53                 :            :                                                 XubString & rText,
      54                 :            :                                                 const IntlWrapper * = 0)
      55                 :            :         const;
      56                 :            : 
      57                 :            :     virtual bool QueryValue(com::sun::star::uno::Any& rVal,
      58                 :            :                             sal_uInt8 nMemberId = 0) const;
      59                 :            : 
      60                 :            :     virtual bool PutValue(const com::sun::star::uno::Any& rVal,
      61                 :            :                           sal_uInt8 nMemberId = 0);
      62                 :            : 
      63                 :            :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
      64                 :            : 
      65                 :            :     virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
      66                 :            : 
      67                 :            :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
      68                 :            : 
      69                 :            :     virtual sal_uInt8 GetMin() const;
      70                 :            : 
      71                 :            :     virtual sal_uInt8 GetMax() const;
      72                 :            : 
      73                 :            :     virtual SfxFieldUnit GetUnit() const;
      74                 :            : 
      75                 :      14569 :     sal_uInt8 GetValue() const { return m_nValue; }
      76                 :            : 
      77                 :            :     inline void SetValue(sal_uInt8 nTheValue);
      78                 :            : };
      79                 :            : 
      80                 :          4 : inline void CntByteItem::SetValue(sal_uInt8 nTheValue)
      81                 :            : {
      82                 :            :     DBG_ASSERT(GetRefCount() == 0, "CntByteItem::SetValue(): Pooled item");
      83                 :          4 :     m_nValue = nTheValue;
      84                 :          4 : }
      85                 :            : 
      86                 :            : //============================================================================
      87                 :            : DBG_NAMEEX_VISIBILITY(CntUInt16Item, SVL_DLLPUBLIC)
      88                 :            : 
      89                 :            : class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem
      90                 :            : {
      91                 :            :     sal_uInt16 m_nValue;
      92                 :            : 
      93                 :            : public:
      94                 :            :     TYPEINFO();
      95                 :            : 
      96                 :     396722 :     CntUInt16Item(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
      97                 :     396722 :         SfxPoolItem(which), m_nValue(nTheValue)
      98                 :     396722 :     { DBG_CTOR(CntUInt16Item, 0); }
      99                 :            : 
     100                 :            :     CntUInt16Item(sal_uInt16 which, SvStream & rStream);
     101                 :            : 
     102                 :     345423 :     CntUInt16Item(const CntUInt16Item & rItem):
     103                 :     345423 :         SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
     104                 :     345423 :     { DBG_CTOR(CntUInt16Item, 0); }
     105                 :            : 
     106         [ -  + ]:     734178 :     virtual ~CntUInt16Item() { DBG_DTOR(CntUInt16Item, 0); }
     107                 :            : 
     108                 :            :     virtual int operator ==(const SfxPoolItem & rItem) const;
     109                 :            : 
     110                 :            :     using SfxPoolItem::Compare;
     111                 :            :     virtual int Compare(const SfxPoolItem & rWith) const;
     112                 :            : 
     113                 :            :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
     114                 :            :                                                 SfxMapUnit, SfxMapUnit,
     115                 :            :                                                 XubString & rText,
     116                 :            :                                                 const IntlWrapper * = 0)
     117                 :            :         const;
     118                 :            : 
     119                 :            :     virtual bool QueryValue(com::sun::star::uno::Any& rVal,
     120                 :            :                             sal_uInt8 nMemberId = 0) const;
     121                 :            : 
     122                 :            :     virtual bool PutValue(const com::sun::star::uno::Any& rVal,
     123                 :            :                           sal_uInt8 nMemberId = 0);
     124                 :            : 
     125                 :            :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
     126                 :            : 
     127                 :            :     virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
     128                 :            : 
     129                 :            :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
     130                 :            : 
     131                 :            :     virtual sal_uInt16 GetMin() const;
     132                 :            : 
     133                 :            :     virtual sal_uInt16 GetMax() const;
     134                 :            : 
     135                 :            :     virtual SfxFieldUnit GetUnit() const;
     136                 :            : 
     137                 :    5970222 :     sal_Int16 GetValue() const { return m_nValue; }
     138                 :            : 
     139                 :            :     inline void SetValue(sal_uInt16 nTheValue);
     140                 :            : };
     141                 :            : 
     142                 :      51013 : inline void CntUInt16Item::SetValue(sal_uInt16 nTheValue)
     143                 :            : {
     144                 :            :     DBG_ASSERT(GetRefCount() == 0, "CntUInt16Item::SetValue(): Pooled item");
     145                 :      51013 :     m_nValue = nTheValue;
     146                 :      51013 : }
     147                 :            : 
     148                 :            : //============================================================================
     149                 :            : DBG_NAMEEX_VISIBILITY(CntInt32Item, SVL_DLLPUBLIC)
     150                 :            : 
     151                 :            : class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem
     152                 :            : {
     153                 :            :     sal_Int32 m_nValue;
     154                 :            : 
     155                 :            : public:
     156                 :            :     TYPEINFO();
     157                 :            : 
     158                 :     326301 :     CntInt32Item(sal_uInt16 which = 0, sal_Int32 nTheValue = 0):
     159                 :     326301 :         SfxPoolItem(which), m_nValue(nTheValue)
     160                 :     326301 :     { DBG_CTOR(CntInt32Item, 0); }
     161                 :            : 
     162                 :            :     CntInt32Item(sal_uInt16 which, SvStream & rStream);
     163                 :            : 
     164                 :      71551 :     CntInt32Item(const CntInt32Item & rItem):
     165                 :      71551 :         SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
     166                 :      71551 :     { DBG_CTOR(CntInt32Item, 0); }
     167                 :            : 
     168         [ -  + ]:     378171 :     virtual ~CntInt32Item() { DBG_DTOR(CntInt32Item, 0); }
     169                 :            : 
     170                 :            :     virtual int operator ==(const SfxPoolItem & rItem) const;
     171                 :            : 
     172                 :            :     using SfxPoolItem::Compare;
     173                 :            :     virtual int Compare(const SfxPoolItem & rWith) const;
     174                 :            : 
     175                 :            :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
     176                 :            :                                                 SfxMapUnit, SfxMapUnit,
     177                 :            :                                                 XubString & rText,
     178                 :            :                                                 const IntlWrapper * = 0)
     179                 :            :         const;
     180                 :            : 
     181                 :            :     virtual bool QueryValue(com::sun::star::uno::Any& rVal,
     182                 :            :                             sal_uInt8 nMemberId = 0) const;
     183                 :            : 
     184                 :            :     virtual bool PutValue(const com::sun::star::uno::Any& rVal,
     185                 :            :                           sal_uInt8 nMemberId = 0);
     186                 :            : 
     187                 :            :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
     188                 :            : 
     189                 :            :     virtual SvStream & Store(SvStream &, sal_uInt16) const;
     190                 :            : 
     191                 :            :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
     192                 :            : 
     193                 :            :     virtual sal_Int32 GetMin() const;
     194                 :            : 
     195                 :            :     virtual sal_Int32 GetMax() const;
     196                 :            : 
     197                 :            :     virtual SfxFieldUnit GetUnit() const;
     198                 :            : 
     199                 :    6809819 :     sal_Int32 GetValue() const { return m_nValue; }
     200                 :            : 
     201                 :            :     inline void SetValue(sal_Int32 nTheValue);
     202                 :            : };
     203                 :            : 
     204                 :      25761 : inline void CntInt32Item::SetValue(sal_Int32 nTheValue)
     205                 :            : {
     206                 :            :     DBG_ASSERT(GetRefCount() == 0, "CntInt32Item::SetValue(): Pooled item");
     207                 :      25761 :     m_nValue = nTheValue;
     208                 :      25761 : }
     209                 :            : 
     210                 :            : //============================================================================
     211                 :            : DBG_NAMEEX_VISIBILITY(CntUInt32Item, SVL_DLLPUBLIC)
     212                 :            : 
     213                 :            : class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem
     214                 :            : {
     215                 :            :     sal_uInt32 m_nValue;
     216                 :            : 
     217                 :            : public:
     218                 :            :     TYPEINFO();
     219                 :            : 
     220                 :      34037 :     CntUInt32Item(sal_uInt16 which = 0, sal_uInt32 nTheValue = 0):
     221                 :      34037 :         SfxPoolItem(which), m_nValue(nTheValue)
     222                 :      34037 :     { DBG_CTOR(CntUInt32Item, 0); }
     223                 :            : 
     224                 :            :     CntUInt32Item(sal_uInt16 nWhich, SvStream & rStream);
     225                 :            : 
     226                 :       5707 :     CntUInt32Item(const CntUInt32Item & rItem):
     227                 :       5707 :         SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
     228                 :       5707 :     { DBG_CTOR(CntUInt32Item, 0); }
     229                 :            : 
     230         [ -  + ]:      38276 :     virtual ~CntUInt32Item() { DBG_DTOR(CntUInt32Item, 0); }
     231                 :            : 
     232                 :            :     virtual int operator ==(const SfxPoolItem & rItem) const;
     233                 :            : 
     234                 :            :     using SfxPoolItem::Compare;
     235                 :            :     virtual int Compare(const SfxPoolItem & rWith) const;
     236                 :            : 
     237                 :            :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
     238                 :            :                                                 SfxMapUnit, SfxMapUnit,
     239                 :            :                                                 XubString & rText,
     240                 :            :                                                 const IntlWrapper * = 0)
     241                 :            :         const;
     242                 :            : 
     243                 :            :     virtual bool QueryValue(com::sun::star::uno::Any& rVal,
     244                 :            :                             sal_uInt8 nMemberId = 0) const;
     245                 :            : 
     246                 :            :     virtual bool PutValue(const com::sun::star::uno::Any& rVal,
     247                 :            :                           sal_uInt8 nMemberId = 0);
     248                 :            : 
     249                 :            :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
     250                 :            : 
     251                 :            :     virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
     252                 :            : 
     253                 :            :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
     254                 :            : 
     255                 :            :     virtual sal_uInt32 GetMin() const;
     256                 :            : 
     257                 :            :     virtual sal_uInt32 GetMax() const;
     258                 :            : 
     259                 :            :     virtual SfxFieldUnit GetUnit() const;
     260                 :            : 
     261                 :    6915284 :     sal_uInt32 GetValue() const { return m_nValue; }
     262                 :            : 
     263                 :            :     inline void SetValue(sal_uInt32 nTheValue);
     264                 :            : };
     265                 :            : 
     266                 :         20 : inline void CntUInt32Item::SetValue(sal_uInt32 nTheValue)
     267                 :            : {
     268                 :            :     DBG_ASSERT(GetRefCount() == 0, "CntUInt32Item::SetValue(): Pooled item");
     269                 :         20 :     m_nValue = nTheValue;
     270                 :         20 : }
     271                 :            : 
     272                 :            : #endif // _SVTOOLS_CINTITEM_HXX
     273                 :            : 
     274                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10