LCOV - code coverage report
Current view: top level - libreoffice/sw/inc - ftninfo.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 10 100.0 %
Date: 2012-12-27 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 _FTNINFO_HXX
      20             : #define _FTNINFO_HXX
      21             : 
      22             : #include <tools/string.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         847 : class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
      33             : {
      34             :     SwDepend    aPageDescDep;
      35             :     SwDepend    aCharFmtDep, aAnchorCharFmtDep;
      36             :     rtl::OUString sPrefix;
      37             :     rtl::OUString sSuffix;
      38             : protected:
      39             :     bool        m_bEndNote;
      40             :    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
      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        1629 :     SwTxtFmtColl* GetFtnTxtColl() const { return  (SwTxtFmtColl*) GetRegisteredIn(); } // can be 0.
      53             : 
      54             :     SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
      55             :     void SetCharFmt( SwCharFmt* );
      56           4 :     SwClient   *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
      57             : 
      58             :     SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
      59             :     void SetAnchorCharFmt( SwCharFmt* );
      60           4 :     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          17 :     const rtl::OUString& GetPrefix() const  { return sPrefix; }
      69          17 :     const rtl::OUString& GetSuffix() const  { return sSuffix; }
      70             : 
      71          34 :     void SetPrefix(const rtl::OUString& rSet) { sPrefix = rSet; }
      72          34 :     void SetSuffix(const rtl::OUString& rSet) { sSuffix = rSet; }
      73         220 :     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         543 : class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo
      89             : {
      90             :     using SwEndNoteInfo::operator ==;
      91             : 
      92             : public:
      93             :     String    aQuoVadis;
      94             :     String    aErgoSum;
      95             :     SwFtnPos  ePos;
      96             :     SwFtnNum  eNum;
      97             : 
      98             : 
      99             :     SwFtnInfo& operator=(const SwFtnInfo&);
     100             : 
     101             :     bool operator==( const SwFtnInfo &rInf ) const;
     102             : 
     103             :     SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
     104             :     SwFtnInfo(const SwFtnInfo&);
     105             : };
     106             : 
     107             : 
     108             : #endif
     109             : 
     110             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10