LCOV - code coverage report
Current view: top level - include/svl - eitem.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 17 17 100.0 %
Date: 2014-04-11 Functions: 10 11 90.9 %
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             : #ifndef INCLUDED_SVL_EITEM_HXX
      21             : #define INCLUDED_SVL_EITEM_HXX
      22             : 
      23             : #include <svl/svldllapi.h>
      24             : #include <svl/cenumitm.hxx>
      25             : 
      26             : 
      27             : 
      28      996533 : class SVL_DLLPUBLIC SfxEnumItem
      29             :     : public SfxEnumItemInterface
      30             : {
      31             :     sal_uInt16 m_nValue;
      32             : 
      33             : protected:
      34      339870 :     explicit SfxEnumItem(sal_uInt16 const nWhich =0, sal_uInt16 const nValue =0)
      35             :         : SfxEnumItemInterface(nWhich)
      36      339870 :         , m_nValue(nValue)
      37      339870 :     { }
      38             : 
      39      671631 :     SfxEnumItem(const SfxEnumItem & rItem)
      40             :         : SfxEnumItemInterface(rItem)
      41      671631 :         , m_nValue(rItem.m_nValue)
      42      671631 :     { }
      43             : 
      44             :     SfxEnumItem(sal_uInt16 const nWhich, SvStream & rStream);
      45             : 
      46             : public:
      47             :     TYPEINFO_OVERRIDE();
      48             : 
      49    19494642 :     sal_uInt16 GetValue() const { return m_nValue; }
      50             : 
      51             :     void SetValue(sal_uInt16 nTheValue);
      52             : 
      53             :     // SfxPoolItem
      54             :     virtual SvStream & Store(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
      55             : 
      56             :     virtual sal_uInt16 GetEnumValue() const SAL_OVERRIDE;
      57             : 
      58             :     virtual void SetEnumValue(sal_uInt16 nTheValue) SAL_OVERRIDE;
      59             : 
      60             : };
      61             : 
      62             : 
      63             : 
      64     1555459 : class SVL_DLLPUBLIC SfxBoolItem
      65             :     : public SfxPoolItem
      66             : {
      67             :     bool m_bValue;
      68             : 
      69             : public:
      70             :     TYPEINFO_OVERRIDE();
      71             : 
      72      635777 :     explicit SfxBoolItem(sal_uInt16 const nWhich = 0, bool const bValue = false)
      73             :         : SfxPoolItem(nWhich)
      74      635777 :         , m_bValue(bValue)
      75      635777 :     { }
      76             : 
      77      475866 :     SfxBoolItem(SfxBoolItem const& rItem)
      78             :         : SfxPoolItem(rItem)
      79      475866 :         , m_bValue(rItem.m_bValue)
      80      475866 :     { }
      81             : 
      82             :     SfxBoolItem(sal_uInt16 nWhich, SvStream & rStream);
      83             : 
      84     8717199 :     bool GetValue() const { return m_bValue; }
      85             : 
      86       17575 :     void SetValue(bool const bTheValue) { m_bValue = bTheValue; }
      87             : 
      88             :     // SfxPoolItem
      89             :     virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
      90             : 
      91             :     using SfxPoolItem::Compare;
      92             :     virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
      93             : 
      94             :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
      95             :                                                 SfxMapUnit, SfxMapUnit,
      96             :                                                 OUString & rText,
      97             :                                                 const IntlWrapper * = 0)
      98             :         const SAL_OVERRIDE;
      99             : 
     100             :     virtual bool QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8 = 0)
     101             :         const SAL_OVERRIDE;
     102             : 
     103             :     virtual bool PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8 = 0)
     104             :         SAL_OVERRIDE;
     105             : 
     106             : 
     107             :     virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
     108             :         SAL_OVERRIDE;
     109             : 
     110             :     virtual SvStream & Store(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
     111             : 
     112             :     virtual SfxPoolItem * Clone(SfxItemPool * = 0) const SAL_OVERRIDE;
     113             : 
     114             :     virtual sal_uInt16 GetValueCount() const;
     115             : 
     116             :     virtual OUString GetValueTextByVal(bool bTheValue) const;
     117             : 
     118             : };
     119             : 
     120             : #endif // INCLUDED_SVL_EITEM_HXX
     121             : 
     122             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10