LCOV - code coverage report
Current view: top level - sw/source/core/txtnode - atrref.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 24 24 100.0 %
Date: 2014-04-11 Functions: 8 8 100.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             :  * 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             : #include <hintids.hxx>
      21             : #include <txtrfmrk.hxx>
      22             : #include <fmtrfmrk.hxx>
      23             : #include <swfont.hxx>
      24             : 
      25             : /****************************************************************************
      26             :  *
      27             :  *  class SwFmtRefMark
      28             :  *
      29             :  ****************************************************************************/
      30             : 
      31         521 : SwFmtRefMark::~SwFmtRefMark( )
      32             : {
      33         521 : }
      34             : 
      35          78 : SwFmtRefMark::SwFmtRefMark( const OUString& rName )
      36             :     : SfxPoolItem( RES_TXTATR_REFMARK ),
      37             :     pTxtAttr( 0 ),
      38          78 :     aRefName( rName )
      39             : {
      40          78 : }
      41             : 
      42         203 : SwFmtRefMark::SwFmtRefMark( const SwFmtRefMark& rAttr )
      43             :     : SfxPoolItem( RES_TXTATR_REFMARK ),
      44             :     pTxtAttr( 0 ),
      45         203 :     aRefName( rAttr.aRefName )
      46             : {
      47         203 : }
      48             : 
      49          39 : bool SwFmtRefMark::operator==( const SfxPoolItem& rAttr ) const
      50             : {
      51             :     OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
      52          39 :     return aRefName == ((SwFmtRefMark&)rAttr).aRefName;
      53             : }
      54             : 
      55         203 : SfxPoolItem* SwFmtRefMark::Clone( SfxItemPool* ) const
      56             : {
      57         203 :     return new SwFmtRefMark( *this );
      58             : }
      59             : 
      60             : /*************************************************************************
      61             :  *                      class SwTxtRefMark
      62             :  *************************************************************************/
      63             : 
      64             : // Attribut fuer Inhalts-/Positions-Referenzen im Text
      65             : 
      66          41 : SwTxtRefMark::SwTxtRefMark( SwFmtRefMark& rAttr,
      67             :             sal_Int32 const nStartPos, sal_Int32 const*const pEnd)
      68             :     : SwTxtAttrEnd( rAttr, nStartPos, nStartPos )
      69             :     , m_pTxtNode( 0 )
      70          41 :     , m_pEnd( 0 )
      71             : {
      72          41 :     rAttr.pTxtAttr = this;
      73          41 :     if ( pEnd )
      74             :     {
      75          14 :         m_nEnd = *pEnd;
      76          14 :         m_pEnd = & m_nEnd;
      77             :     }
      78             :     else
      79             :     {
      80          27 :         SetHasDummyChar(true);
      81             :     }
      82          41 :     SetDontMoveAttr( true );
      83          41 :     SetOverlapAllowedAttr( true );
      84          41 : }
      85             : 
      86        2634 : sal_Int32* SwTxtRefMark::GetEnd()
      87             : {
      88        2634 :     return m_pEnd;
      89             : }
      90             : 
      91             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10