LCOV - code coverage report
Current view: top level - sw/inc - ftninfo.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 10 10 100.0 %
Date: 2014-11-03 Functions: 12 12 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             : #ifndef INCLUDED_SW_INC_FTNINFO_HXX
      20             : #define INCLUDED_SW_INC_FTNINFO_HXX
      21             : 
      22             : #include <rtl/ustring.hxx>
      23             : #include "swdllapi.h"
      24             : #include <calbck.hxx>
      25             : #include <editeng/numitem.hxx>
      26             : 
      27             : class SwTxtFmtColl;
      28             : class SwPageDesc;
      29             : class SwCharFmt;
      30             : class SwDoc;
      31             : 
      32       21159 : class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
      33             : {
      34             :     SwDepend    aPageDescDep;
      35             :     SwDepend    aCharFmtDep, aAnchorCharFmtDep;
      36             :     OUString sPrefix;
      37             :     OUString sSuffix;
      38             : protected:
      39             :     bool        m_bEndNote;
      40             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) SAL_OVERRIDE;
      41             : 
      42             : public:
      43             :     SvxNumberType aFmt;
      44             :     sal_uInt16    nFtnOffset;
      45             : 
      46             :     void        ChgPageDesc( SwPageDesc *pDesc );
      47             :     SwPageDesc* GetPageDesc( SwDoc &rDoc ) const;
      48             :     bool        KnowsPageDesc() const;
      49             :     bool        DependsOn( const SwPageDesc* ) const;
      50             : 
      51             :     void SetFtnTxtColl(SwTxtFmtColl& rColl);
      52       18346 :     SwTxtFmtColl* GetFtnTxtColl() const { return  (SwTxtFmtColl*) GetRegisteredIn(); } // can be 0.
      53             : 
      54             :     SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
      55             :     void SetCharFmt( SwCharFmt* );
      56         124 :     SwClient   *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
      57             : 
      58             :     SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
      59             :     void SetAnchorCharFmt( SwCharFmt* );
      60         116 :     SwClient   *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
      61             : 
      62             :     SwEndNoteInfo & operator=(const SwEndNoteInfo&);
      63             :     bool operator==( const SwEndNoteInfo &rInf ) const;
      64             : 
      65             :     SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
      66             :     SwEndNoteInfo(const SwEndNoteInfo&);
      67             : 
      68         572 :     const OUString& GetPrefix() const  { return sPrefix; }
      69         556 :     const OUString& GetSuffix() const  { return sSuffix; }
      70             : 
      71         632 :     void SetPrefix(const OUString& rSet) { sPrefix = rSet; }
      72         628 :     void SetSuffix(const OUString& rSet) { sSuffix = rSet; }
      73       10166 :     void ReleaseCollection() { if ( GetRegisteredInNonConst() ) GetRegisteredInNonConst()->Remove( this ); }
      74             : };
      75             : 
      76             : enum SwFtnPos
      77             : {
      78             :     // Momentarily only PAGE and CHAPTER. CHAPTER == document-endnotes.
      79             :     FTNPOS_PAGE = 1,
      80             :     FTNPOS_CHAPTER = 8
      81             : };
      82             : 
      83             : enum SwFtnNum
      84             : {
      85             :     FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
      86             : };
      87             : 
      88       13948 : class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo
      89             : {
      90             :     using SwEndNoteInfo::operator ==;
      91             : 
      92             : public:
      93             :     OUString  aQuoVadis;
      94             :     OUString  aErgoSum;
      95             :     SwFtnPos  ePos;
      96             :     SwFtnNum  eNum;
      97             : 
      98             :     SwFtnInfo& operator=(const SwFtnInfo&);
      99             : 
     100             :     bool operator==( const SwFtnInfo &rInf ) const;
     101             : 
     102             :     SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
     103             :     SwFtnInfo(const SwFtnInfo&);
     104             : };
     105             : 
     106             : #endif
     107             : 
     108             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10