LCOV - code coverage report
Current view: top level - svl/source/items - int64item.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 39 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 14 0.0 %
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             : 
      10             : #include <svl/int64item.hxx>
      11             : #include <tools/stream.hxx>
      12             : 
      13           0 : SfxInt64Item::SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal ) :
      14           0 :     SfxPoolItem(nWhich), mnValue(nVal)
      15             : {
      16           0 : }
      17             : 
      18           0 : SfxInt64Item::SfxInt64Item( sal_uInt16 nWhich, SvStream& rStream ) :
      19           0 :     SfxPoolItem(nWhich), mnValue(0)
      20             : {
      21           0 :     rStream.ReadInt64(mnValue);
      22           0 : }
      23             : 
      24           0 : SfxInt64Item::SfxInt64Item( const SfxInt64Item& rItem ) :
      25           0 :     SfxPoolItem(rItem), mnValue(rItem.mnValue)
      26             : {
      27           0 : }
      28             : 
      29           0 : SfxInt64Item::~SfxInt64Item() {}
      30             : 
      31           0 : bool SfxInt64Item::operator== ( const SfxPoolItem& rItem ) const
      32             : {
      33           0 :     return mnValue == static_cast<const SfxInt64Item&>(rItem).mnValue;
      34             : }
      35             : 
      36           0 : int SfxInt64Item::Compare( const SfxPoolItem& r ) const
      37             : {
      38           0 :     sal_Int64 nOther = static_cast<const SfxInt64Item&>(r).mnValue;
      39             : 
      40           0 :     if (mnValue < nOther)
      41           0 :         return -1;
      42             : 
      43           0 :     if (mnValue > nOther)
      44           0 :         return 1;
      45             : 
      46           0 :     return 0;
      47             : }
      48             : 
      49           0 : int SfxInt64Item::Compare( const SfxPoolItem& r, const IntlWrapper& /*rIntlWrapper*/ ) const
      50             : {
      51           0 :     return Compare(r);
      52             : }
      53             : 
      54           0 : bool SfxInt64Item::GetPresentation(
      55             :     SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString& rText,
      56             :     const IntlWrapper* /*pIntlWrapper*/ ) const
      57             : {
      58           0 :     rText = OUString::number(mnValue);
      59           0 :     return true;
      60             : }
      61             : 
      62           0 : bool SfxInt64Item::QueryValue(
      63             :     com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
      64             : {
      65           0 :     rVal <<= mnValue;
      66           0 :     return true;
      67             : }
      68             : 
      69           0 : bool SfxInt64Item::PutValue(
      70             :     const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
      71             : {
      72             :     sal_Int64 nVal;
      73             : 
      74           0 :     if (rVal >>= nVal)
      75             :     {
      76           0 :         mnValue = nVal;
      77           0 :         return true;
      78             :     }
      79             : 
      80           0 :     return false;
      81             : }
      82             : 
      83           0 : SfxPoolItem* SfxInt64Item::Create( SvStream& rStream, sal_uInt16 /*nItemVersion*/ ) const
      84             : {
      85           0 :     return new SfxInt64Item(Which(), rStream);
      86             : }
      87             : 
      88           0 : SvStream& SfxInt64Item::Store( SvStream& rStream, sal_uInt16 /*nItemVersion*/ ) const
      89             : {
      90           0 :     return rStream.WriteInt64(mnValue);
      91             : }
      92             : 
      93           0 : SfxPoolItem* SfxInt64Item::Clone( SfxItemPool* /*pOther*/ ) const
      94             : {
      95           0 :     return new SfxInt64Item(*this);
      96             : }
      97             : 
      98             : 
      99             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11