LCOV - code coverage report
Current view: top level - libreoffice/sw/source/core/inc - doctxm.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 12 12 100.0 %
Date: 2012-12-27 Functions: 2 2 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             : 
      20             : #ifndef _DOCTXM_HXX
      21             : #define _DOCTXM_HXX
      22             : 
      23             : #include <tools/gen.hxx>
      24             : #include <tox.hxx>
      25             : #include <section.hxx>
      26             : 
      27             : class  SwTOXInternational;
      28             : class  SwPageDesc;
      29             : class  SwTxtNode;
      30             : class  SwTxtFmtColl;
      31             : struct SwPosition;
      32             : struct SwTOXSortTabBase;
      33             : 
      34             : typedef std::vector<SwTOXSortTabBase*> SwTOXSortTabBases;
      35             : 
      36             : class SwTOXBaseSection : public SwTOXBase, public SwSection
      37             : {
      38             :     SwTOXSortTabBases aSortArr;
      39             : 
      40             :     void UpdateMarks( const SwTOXInternational& rIntl,
      41             :                       const SwTxtNode* pOwnChapterNode );
      42             :     void UpdateOutline( const SwTxtNode* pOwnChapterNode );
      43             :     void UpdateTemplate( const SwTxtNode* pOwnChapterNode );
      44             :     void UpdateCntnt( SwTOXElement eType,
      45             :                       const SwTxtNode* pOwnChapterNode );
      46             :     void UpdateTable( const SwTxtNode* pOwnChapterNode );
      47             :     void UpdateSequence( const SwTxtNode* pOwnChapterNode );
      48             :     void UpdateAuthorities( const SwTOXInternational& rIntl );
      49             :     void UpdateAll();
      50             : 
      51             :     // insert sorted into array for creation
      52             :     void InsertSorted(SwTOXSortTabBase* pBase);
      53             : 
      54             :     // insert alpha delimiter at creation
      55             :     void InsertAlphaDelimitter( const SwTOXInternational& rIntl );
      56             : 
      57             :     // generate text body
      58             :     void GenerateText( sal_uInt16 nArrayIdx,
      59             :                        sal_uInt16 nCount,
      60             :                        const sal_uInt32   _nTOXSectNdIdx,
      61             :                        const SwPageDesc*  _pDefaultPageDesc );
      62             : 
      63             :     // replace page num placeholder with actual page number
      64             :     void _UpdatePageNum( SwTxtNode* pNd,
      65             :                          const std::vector<sal_uInt16>& rNums,
      66             :                          const std::vector<SwPageDesc*>& rDescs,
      67             :                          const std::vector<sal_uInt16>* pMainEntryNums,
      68             :                          const SwTOXInternational& rIntl );
      69             : 
      70             :     // get section for entering keywords
      71             :     Range GetKeyRange( const String& rStr, const String& rStrReading,
      72             :                        const SwTOXSortTabBase& rNew, sal_uInt16 nLevel,
      73             :                        const Range& rRange );
      74             : 
      75             :     // return text collection via name/ from format pool
      76             :     SwTxtFmtColl* GetTxtFmtColl( sal_uInt16 nLevel );
      77             : 
      78             : public:
      79             :     SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt);
      80             :     virtual ~SwTOXBaseSection();
      81             : 
      82             :     // <_bNewTOX> : distinguish between the creation of a new table-of-content
      83             :     //              (true) or an update of a table-of-content (false)
      84             :     void Update( const SfxItemSet* pAttr = 0,
      85             :                  const bool        _bNewTOX = false );
      86             :     void UpdatePageNum();               // insert page numbering
      87             :     TYPEINFO();                         // for rtti
      88             : 
      89             :     bool SetPosAtStartEnd( SwPosition& rPos, bool bAtStart = true ) const;
      90             : };
      91             : 
      92             : struct SwDefTOXBase_Impl
      93             : {
      94             :     SwTOXBase* pContBase;
      95             :     SwTOXBase* pIdxBase;
      96             :     SwTOXBase* pUserBase;
      97             :     SwTOXBase* pTblBase;
      98             :     SwTOXBase* pObjBase;
      99             :     SwTOXBase* pIllBase;
     100             :     SwTOXBase* pAuthBase;
     101             : 
     102         276 :     SwDefTOXBase_Impl() :
     103             :     pContBase(0),
     104             :     pIdxBase(0),
     105             :     pUserBase(0),
     106             :     pTblBase(0),
     107             :     pObjBase(0),
     108             :     pIllBase(0),
     109         276 :     pAuthBase(0)
     110             :     {
     111         276 :     }
     112         102 :     ~SwDefTOXBase_Impl()
     113             :     {
     114         102 :         delete pContBase;
     115         102 :         delete pIdxBase;
     116         102 :         delete pUserBase;
     117         102 :         delete pTblBase;
     118         102 :         delete pObjBase;
     119         102 :         delete pIllBase;
     120         102 :         delete pAuthBase;
     121         102 :     }
     122             : 
     123             : };
     124             : 
     125             : #endif
     126             : 
     127             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10