LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - txtfld.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 4 8 50.0 %
Date: 2012-12-27 Functions: 3 4 75.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             : #ifndef _TXTFLD_HXX
      20             : #define _TXTFLD_HXX
      21             : 
      22             : #include <txatbase.hxx>
      23             : #include <tools/string.hxx>
      24             : #include <pam.hxx>
      25             : 
      26             : class SwTxtNode;
      27             : 
      28             : // ATT_FLD ***********************************
      29             : 
      30             : class SwTxtFld : public SwTxtAttr
      31             : {
      32             :     mutable   String m_aExpand;
      33             :     SwTxtNode * m_pTxtNode;
      34             : 
      35             : public:
      36             :     SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart,
      37             :             bool const bInClipboard);
      38             :     virtual ~SwTxtFld();
      39             : 
      40             :     void CopyFld( SwTxtFld *pDest ) const;
      41             :     void Expand() const;
      42             :     inline void ExpandAlways();
      43             : 
      44             :     // get and set TxtNode pointer
      45         608 :     SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
      46             :     inline SwTxtNode& GetTxtNode() const;
      47         491 :     void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
      48             :     // enable notification that field content has changed and needs reformatting
      49             :     void NotifyContentChange(SwFmtFld& rFmtFld);
      50             : 
      51             :     /**
      52             :        Returns position of this field.
      53             : 
      54             :        @return position of this field. Has to be deleted explicitly.
      55             :     */
      56             : };
      57             : 
      58          64 : inline SwTxtNode& SwTxtFld::GetTxtNode() const
      59             : {
      60             :     OSL_ENSURE( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
      61          64 :     return *m_pTxtNode;
      62             : }
      63             : 
      64           0 : inline void SwTxtFld::ExpandAlways()
      65             : {
      66           0 :     m_aExpand += ' ';
      67           0 :     Expand();
      68           0 : }
      69             : 
      70             : #endif
      71             : 
      72             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10