LCOV - code coverage report
Current view: top level - include/svl - eitem.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 17 17 100.0 %
Date: 2015-06-13 12:38:46 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     1503400 : class SVL_DLLPUBLIC SfxEnumItem
      29             :     : public SfxEnumItemInterface
      30             : {
      31             :     sal_uInt16 m_nValue;
      32             : 
      33             : protected:
      34      487170 :     explicit SfxEnumItem(sal_uInt16 const nWhich =0, sal_uInt16 const nValue =0)
      35             :         : SfxEnumItemInterface(nWhich)
      36      487170 :         , m_nValue(nValue)
      37      487170 :     { }
      38             : 
      39     1065267 :     SfxEnumItem(const SfxEnumItem & rItem)
      40             :         : SfxEnumItemInterface(rItem)
      41     1065267 :         , m_nValue(rItem.m_nValue)
      42     1065267 :     { }
      43             : 
      44             :     SfxEnumItem(sal_uInt16 const nWhich, SvStream & rStream);
      45             : 
      46             : public:
      47             :     TYPEINFO_OVERRIDE();
      48             : 
      49   212660670 :     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     3450746 : class SVL_DLLPUBLIC SfxBoolItem
      65             :     : public SfxPoolItem
      66             : {
      67             :     bool m_bValue;
      68             : 
      69             : public:
      70             :     TYPEINFO_OVERRIDE();
      71             : 
      72     1164693 :     explicit SfxBoolItem(sal_uInt16 const nWhich = 0, bool const bValue = false)
      73             :         : SfxPoolItem(nWhich)
      74     1164693 :         , m_bValue(bValue)
      75     1164693 :     { }
      76             : 
      77     1169807 :     SfxBoolItem(SfxBoolItem const& rItem)
      78             :         : SfxPoolItem(rItem)
      79     1169807 :         , m_bValue(rItem.m_bValue)
      80     1169807 :     { }
      81             : 
      82             :     SfxBoolItem(sal_uInt16 nWhich, SvStream & rStream);
      83             : 
      84     9739442 :     bool GetValue() const { return m_bValue; }
      85             : 
      86       25733 :     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 bool 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 OUString GetValueTextByVal(bool bTheValue) const;
     115             : };
     116             : 
     117             : #endif // INCLUDED_SVL_EITEM_HXX
     118             : 
     119             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11