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

Generated by: LCOV version 1.10