LCOV - code coverage report
Current view: top level - sw/inc - ftninfo.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 10 100.0 %
Date: 2012-08-25 Functions: 12 12 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 10 18 55.6 %

           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 _FTNINFO_HXX
      29                 :            : #define _FTNINFO_HXX
      30                 :            : 
      31                 :            : #include <tools/string.hxx>
      32                 :            : #include "swdllapi.h"
      33                 :            : #include <calbck.hxx>
      34                 :            : #include <editeng/numitem.hxx>
      35                 :            : 
      36                 :            : class SwTxtFmtColl;
      37                 :            : class SwPageDesc;
      38                 :            : class SwCharFmt;
      39                 :            : class SwDoc;
      40                 :            : 
      41 [ +  - ][ +  - ]:       5884 : class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
         [ +  - ][ +  - ]
                 [ -  + ]
      42                 :            : {
      43                 :            :     SwDepend    aPageDescDep;
      44                 :            :     SwDepend    aCharFmtDep, aAnchorCharFmtDep;
      45                 :            :     rtl::OUString sPrefix;
      46                 :            :     rtl::OUString sSuffix;
      47                 :            : protected:
      48                 :            :     bool        m_bEndNote;
      49                 :            :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
      50                 :            : 
      51                 :            : public:
      52                 :            :     SvxNumberType aFmt;
      53                 :            :     sal_uInt16    nFtnOffset;
      54                 :            : 
      55                 :            :     void        ChgPageDesc( SwPageDesc *pDesc );
      56                 :            :     SwPageDesc* GetPageDesc( SwDoc &rDoc ) const;
      57                 :            :     bool        KnowsPageDesc() const;
      58                 :            :     bool        DependsOn( const SwPageDesc* ) const;
      59                 :            : 
      60                 :            :     void SetFtnTxtColl(SwTxtFmtColl& rColl);
      61                 :       4559 :     SwTxtFmtColl* GetFtnTxtColl() const { return  (SwTxtFmtColl*) GetRegisteredIn(); } // can be 0.
      62                 :            : 
      63                 :            :     SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
      64                 :            :     void SetCharFmt( SwCharFmt* );
      65                 :         46 :     SwClient   *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
      66                 :            : 
      67                 :            :     SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
      68                 :            :     void SetAnchorCharFmt( SwCharFmt* );
      69                 :         38 :     SwClient   *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
      70                 :            : 
      71                 :            :     SwEndNoteInfo & operator=(const SwEndNoteInfo&);
      72                 :            :     sal_Bool operator==( const SwEndNoteInfo &rInf ) const;
      73                 :            : 
      74                 :            :     SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
      75                 :            :     SwEndNoteInfo(const SwEndNoteInfo&);
      76                 :            : 
      77                 :        264 :     const rtl::OUString& GetPrefix() const  { return sPrefix; }
      78                 :        248 :     const rtl::OUString& GetSuffix() const  { return sSuffix; }
      79                 :            : 
      80                 :        134 :     void SetPrefix(const rtl::OUString& rSet) { sPrefix = rSet; }
      81                 :        130 :     void SetSuffix(const rtl::OUString& rSet) { sSuffix = rSet; }
      82         [ +  + ]:       3008 :     void ReleaseCollection() { if ( GetRegisteredInNonConst() ) GetRegisteredInNonConst()->Remove( this ); }
      83                 :            : };
      84                 :            : 
      85                 :            : enum SwFtnPos
      86                 :            : {
      87                 :            :     // Momentarily only PAGE and CHAPTER. CHAPTER == document-endnotes.
      88                 :            :     FTNPOS_PAGE = 1,
      89                 :            :     FTNPOS_CHAPTER = 8
      90                 :            : };
      91                 :            : 
      92                 :            : enum SwFtnNum
      93                 :            : {
      94                 :            :     FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
      95                 :            : };
      96                 :            : 
      97 [ +  - ][ +  - ]:       3893 : class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo
                 [ -  + ]
      98                 :            : {
      99                 :            :     using SwEndNoteInfo::operator ==;
     100                 :            : 
     101                 :            : public:
     102                 :            :     String    aQuoVadis;
     103                 :            :     String    aErgoSum;
     104                 :            :     SwFtnPos  ePos;
     105                 :            :     SwFtnNum  eNum;
     106                 :            : 
     107                 :            : 
     108                 :            :     SwFtnInfo& operator=(const SwFtnInfo&);
     109                 :            : 
     110                 :            :     sal_Bool operator==( const SwFtnInfo &rInf ) const;
     111                 :            : 
     112                 :            :     SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
     113                 :            :     SwFtnInfo(const SwFtnInfo&);
     114                 :            : };
     115                 :            : 
     116                 :            : 
     117                 :            : #endif
     118                 :            : 
     119                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10