LCOV - code coverage report
Current view: top level - sw/inc - chpfld.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 6 16.7 %
Date: 2012-08-25 Functions: 2 9 22.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 20 5.0 %

           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 SW_CHPFLD_HXX
      29                 :            : #define SW_CHPFLD_HXX
      30                 :            : 
      31                 :            : #include "fldbas.hxx"
      32                 :            : 
      33                 :            : 
      34                 :            : class SwFrm;
      35                 :            : class SwCntntNode;
      36                 :            : class SwTxtNode;
      37                 :            : 
      38                 :            : 
      39                 :            : enum SwChapterFormat
      40                 :            : {
      41                 :            :     CF_BEGIN,
      42                 :            :     CF_NUMBER = CF_BEGIN,       ///< only the chapter number
      43                 :            :     CF_TITLE,                   ///< only the title
      44                 :            :     CF_NUM_TITLE,               ///< number and title
      45                 :            :     CF_NUMBER_NOPREPST,         ///< only chapter number without post-/prefix
      46                 :            :     CF_NUM_NOPREPST_TITLE,      ///< chapter number without post-/prefix and title
      47                 :            :     CF_END
      48                 :            : };
      49                 :            : 
      50         [ -  + ]:       2916 : class SwChapterFieldType : public SwFieldType
      51                 :            : {
      52                 :            : public:
      53                 :            :     SwChapterFieldType();
      54                 :            : 
      55                 :            :     virtual SwFieldType*    Copy() const;
      56                 :            : 
      57                 :            : };
      58                 :            : 
      59 [ #  # ][ #  # ]:          0 : class SW_DLLPUBLIC SwChapterField : public SwField
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
      60                 :            : {
      61                 :            :     friend class SwChapterFieldType;
      62                 :            :     sal_uInt8 nLevel;
      63                 :            :     String sTitle, sNumber, sPre, sPost;
      64                 :            : 
      65                 :            :     virtual String   Expand() const;
      66                 :            :     virtual SwField* Copy() const;
      67                 :            : 
      68                 :            : public:
      69                 :            :     SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0);
      70                 :            : 
      71                 :            :     // #i53420#
      72                 :            :     void ChangeExpansion( const SwFrm*,
      73                 :            :                           const SwCntntNode*,
      74                 :            :         sal_Bool bSrchNum = sal_False);
      75                 :            :     void ChangeExpansion(const SwTxtNode &rNd, sal_Bool bSrchNum);
      76                 :            : 
      77                 :            :     inline sal_uInt8 GetLevel() const;
      78                 :            :     inline void SetLevel(sal_uInt8);
      79                 :            : 
      80                 :            :     inline const String& GetNumber() const;
      81                 :            :     inline const String& GetTitle() const;
      82                 :            :     virtual bool         QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
      83                 :            :     virtual bool         PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
      84                 :            : };
      85                 :            : 
      86                 :          0 : inline sal_uInt8 SwChapterField::GetLevel() const   { return nLevel; }
      87                 :          0 : inline void SwChapterField::SetLevel(sal_uInt8 nLev) { nLevel = nLev; }
      88                 :          0 : inline const String& SwChapterField::GetNumber() const { return sNumber; }
      89                 :          0 : inline const String& SwChapterField::GetTitle() const { return sTitle; }
      90                 :            : 
      91                 :            : #endif // SW_CHPFLD_HXX
      92                 :            : 
      93                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10