LCOV - code coverage report
Current view: top level - sw/inc - txtfld.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 8 50.0 %
Date: 2012-08-25 Functions: 3 4 75.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _TXTFLD_HXX
      29                 :            : #define _TXTFLD_HXX
      30                 :            : 
      31                 :            : #include <txatbase.hxx>
      32                 :            : #include <tools/string.hxx>
      33                 :            : #include <pam.hxx>
      34                 :            : 
      35                 :            : class SwTxtNode;
      36                 :            : 
      37                 :            : // ATT_FLD ***********************************
      38                 :            : 
      39                 :            : class SwTxtFld : public SwTxtAttr
      40                 :            : {
      41                 :            :     mutable   String m_aExpand;
      42                 :            :     SwTxtNode * m_pTxtNode;
      43                 :            : 
      44                 :            : public:
      45                 :            :     SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart,
      46                 :            :             bool const bInClipboard);
      47                 :            :     virtual ~SwTxtFld();
      48                 :            : 
      49                 :            :     void CopyFld( SwTxtFld *pDest ) const;
      50                 :            :     void Expand() const;
      51                 :            :     inline void ExpandAlways();
      52                 :            : 
      53                 :            :     // get and set TxtNode pointer
      54                 :       2145 :     SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
      55                 :            :     inline SwTxtNode& GetTxtNode() const;
      56                 :       1549 :     void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
      57                 :            :     // enable notification that field content has changed and needs reformatting
      58                 :            :     void NotifyContentChange(SwFmtFld& rFmtFld);
      59                 :            : 
      60                 :            :     /**
      61                 :            :        Returns position of this field.
      62                 :            : 
      63                 :            :        @return position of this field. Has to be deleted explicitly.
      64                 :            :     */
      65                 :            : };
      66                 :            : 
      67                 :       1050 : inline SwTxtNode& SwTxtFld::GetTxtNode() const
      68                 :            : {
      69                 :            :     OSL_ENSURE( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
      70                 :       1050 :     return *m_pTxtNode;
      71                 :            : }
      72                 :            : 
      73                 :          0 : inline void SwTxtFld::ExpandAlways()
      74                 :            : {
      75                 :          0 :     m_aExpand += ' ';
      76                 :          0 :     Expand();
      77                 :          0 : }
      78                 :            : 
      79                 :            : #endif
      80                 :            : 
      81                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10