LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/svl/source/items - sitem.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 15 20 75.0 %
Date: 2013-07-09 Functions: 5 8 62.5 %
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             : 
      21             : #include <tools/string.hxx>
      22             : #include <tools/stream.hxx>
      23             : 
      24             : #include <svl/poolitem.hxx>
      25             : #include <svl/itemset.hxx>
      26             : 
      27             : 
      28             : // STATIC DATA -----------------------------------------------------------
      29             : 
      30             : DBG_NAME(SfxSetItem)
      31             : 
      32             : // --------------------------------------------------------------------------
      33             : 
      34        1820 : SfxSetItem::SfxSetItem( sal_uInt16 which, const SfxItemSet &rSet) :
      35             :     SfxPoolItem(which),
      36        1820 :     pSet(rSet.Clone(sal_True))
      37             : {
      38             :     DBG_CTOR(SfxSetItem, 0);
      39        1820 : }
      40             : 
      41             : // --------------------------------------------------------------------------
      42             : 
      43       60110 : SfxSetItem::SfxSetItem( sal_uInt16 which, SfxItemSet *pS) :
      44             :     SfxPoolItem(which),
      45       60110 :     pSet(pS)
      46             : {
      47             :     DBG_CTOR(SfxSetItem, 0);
      48             :     DBG_ASSERT(pS, "SfxSetItem without set constructed" );
      49       60110 : }
      50             : 
      51             : // --------------------------------------------------------------------------
      52             : 
      53      113339 : SfxSetItem::SfxSetItem( const SfxSetItem& rCopy, SfxItemPool *pPool ) :
      54      113339 :     SfxPoolItem(rCopy.Which()),
      55      113339 :     pSet(rCopy.pSet->Clone(sal_True, pPool))
      56             : {
      57             :     DBG_CTOR(SfxSetItem, 0);
      58      113339 : }
      59             : 
      60             : // --------------------------------------------------------------------------
      61             : 
      62      348562 : SfxSetItem::~SfxSetItem()
      63             : {
      64             :     DBG_DTOR(SfxSetItem, 0);
      65      174281 :     delete pSet; pSet = 0;
      66      174281 : }
      67             : 
      68             : // --------------------------------------------------------------------------
      69             : 
      70       14004 : int SfxSetItem::operator==( const SfxPoolItem& rCmp) const
      71             : {
      72             :     DBG_CHKTHIS(SfxSetItem, 0);
      73             :     DBG_ASSERT( SfxPoolItem::operator==( rCmp ), "unequal type" );
      74       14004 :     return *pSet == *(((const SfxSetItem &)rCmp).pSet);
      75             : }
      76             : 
      77             : // --------------------------------------------------------------------------
      78             : 
      79           0 : SfxItemPresentation SfxSetItem::GetPresentation
      80             : (
      81             :     SfxItemPresentation     /*ePresentation*/,
      82             :     SfxMapUnit              /*eCoreMetric*/,
      83             :     SfxMapUnit              /*ePresentationMetric*/,
      84             :     OUString&              /*rText*/,
      85             :     const IntlWrapper *
      86             : )   const
      87             : {
      88             :     DBG_CHKTHIS(SfxSetItem, 0);
      89           0 :     return SFX_ITEM_PRESENTATION_NONE;
      90             : }
      91             : 
      92             : // --------------------------------------------------------------------------
      93             : 
      94           0 : SvStream& SfxSetItem::Store(SvStream& rStream, sal_uInt16) const
      95             : {
      96           0 :     GetItemSet().Store(rStream);
      97           0 :     return rStream;
      98             : }
      99             : 
     100             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10