LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - fmtftn.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 8 75.0 %
Date: 2012-12-27 Functions: 6 7 85.7 %
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 _FMTFTN_HXX
      20             : #define _FMTFTN_HXX
      21             : 
      22             : #include <tools/string.hxx>
      23             : #include <svl/poolitem.hxx>
      24             : #include "swdllapi.h"
      25             : 
      26             : class SwDoc;
      27             : class SwTxtFtn;
      28             : 
      29             : // ATT_FTN
      30             : 
      31             : class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
      32             : {
      33             :     friend class SwTxtFtn;
      34             :     SwTxtFtn* pTxtAttr;     ///< My TextAttribute.
      35             :     String  aNumber;        ///< User-defined 'Number'.
      36             :     sal_uInt16  nNumber;    ///< Automatische Nummerierung
      37             :     bool    m_bEndNote;     ///< Is it an End note?
      38             : 
      39             :     /// Protected CopyCtor.
      40             :     SwFmtFtn& operator=(const SwFmtFtn& rFtn);
      41             :     SwFmtFtn( const SwFmtFtn& );
      42             : 
      43             : public:
      44             :     SwFmtFtn( bool bEndNote = false );
      45             :     virtual ~SwFmtFtn();
      46             : 
      47             :     /// "Pure virtual methods" of SfxPoolItem.
      48             :     virtual int             operator==( const SfxPoolItem& ) const;
      49             :     virtual SfxPoolItem*    Clone( SfxItemPool* pPool = 0 ) const;
      50             : 
      51          47 :     const String &GetNumStr() const { return aNumber; }
      52          18 :     const sal_uInt16 &GetNumber() const { return nNumber; }
      53         158 :           bool    IsEndNote() const { return m_bEndNote;}
      54             : 
      55           2 :     void SetNumStr( const String& rStr )    { aNumber = rStr; }
      56             :     void SetNumber( sal_uInt16 nNo )            { nNumber = nNo; }
      57             :     void SetEndNote( bool b );
      58             : 
      59           0 :     void SetNumber( const SwFmtFtn& rFtn )
      60           0 :         { nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
      61             : 
      62          44 :     const SwTxtFtn *GetTxtFtn() const   { return pTxtAttr; }
      63          32 :           SwTxtFtn *GetTxtFtn()         { return pTxtAttr; }
      64             : 
      65             :     void GetFtnText( String& rStr ) const;
      66             : 
      67             :     /// Returns string to be displayed of footnote / endnote.
      68             :     String GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const;
      69             : };
      70             : 
      71             : 
      72             : #endif
      73             : 
      74             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10