Update ooo320-m1
[ooovba.git] / sw / source / core / inc / doctxm.hxx
blob8db243ce3b9ca6daa21db9a9cc9e8d63c611264b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: doctxm.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _DOCTXM_HXX
31 #define _DOCTXM_HXX
34 #include <svtools/svarray.hxx>
35 #include <tools/gen.hxx>
36 #include <tox.hxx>
37 #include <section.hxx>
39 class SwTOXInternational;
40 class SvUShorts;
41 class SvStringsDtor;
42 class SvPtrarr;
43 class SwPageDesc;
44 class SwTxtNode;
45 class SwTxtFmtColl;
46 struct SwPosition;
47 struct SwTOXSortTabBase;
49 typedef SwTOXSortTabBase* SwTOXSortTabBasePtr;
51 SV_DECL_PTRARR(SwTOXSortTabBases, SwTOXSortTabBasePtr, 0, 5 )
53 /*--------------------------------------------------------------------
54 Beschreibung: Ring der speziellen Verzeichnisse
55 --------------------------------------------------------------------*/
57 class SwTOXBaseSection : public SwTOXBase, public SwSection
59 SwTOXSortTabBases aSortArr;
61 void UpdateMarks( const SwTOXInternational& rIntl,
62 const SwTxtNode* pOwnChapterNode );
63 void UpdateOutline( const SwTxtNode* pOwnChapterNode );
64 void UpdateTemplate( const SwTxtNode* pOwnChapterNode );
65 void UpdateCntnt( SwTOXElement eType,
66 const SwTxtNode* pOwnChapterNode );
67 void UpdateTable( const SwTxtNode* pOwnChapterNode );
68 void UpdateSequence( const SwTxtNode* pOwnChapterNode );
69 void UpdateAuthorities( const SwTOXInternational& rIntl );
70 void UpdateAll();
72 // Sortiert einfuegen ins Array fuer die Generierung
73 void InsertSorted(SwTOXSortTabBase* pBase);
75 // Alpha-Trennzeichen bei der Generierung einfuegen
76 void InsertAlphaDelimitter( const SwTOXInternational& rIntl );
78 // Textrumpf generieren
79 // OD 18.03.2003 #106329# - add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc>
80 void GenerateText( USHORT nArrayIdx,
81 USHORT nCount,
82 SvStringsDtor&,
83 const sal_uInt32 _nTOXSectNdIdx,
84 const SwPageDesc* _pDefaultPageDesc );
86 // Seitennummerplatzhalter gegen aktuelle Nummern austauschen
87 void _UpdatePageNum( SwTxtNode* pNd,
88 const SvUShorts& rNums,
89 const SvPtrarr &rDescs,
90 const SvUShorts* pMainEntryNums,
91 const SwTOXInternational& rIntl );
93 // Bereich fuer Stichwort einfuegen suchen
94 Range GetKeyRange( const String& rStr, const String& rStrReading,
95 const SwTOXSortTabBase& rNew, USHORT nLevel,
96 const Range& rRange );
98 // returne die TextCollection ueber den Namen / aus Format-Pool
99 SwTxtFmtColl* GetTxtFmtColl( USHORT nLevel );
101 public:
102 SwTOXBaseSection( const SwTOXBase& rBase );
103 virtual ~SwTOXBaseSection();
105 // OD 19.03.2003 #106329# - add parameter <_bNewTOX> in order to distinguish
106 // between the creation of a new table-of-content or an update of
107 // a table-of-content. Default value: false
108 void Update( const SfxItemSet* pAttr = 0,
109 const bool _bNewTOX = false ); // Formatieren
110 void UpdatePageNum(); // Seitennummern einfuegen
111 TYPEINFO(); // fuers rtti
113 BOOL SetPosAtStartEnd( SwPosition& rPos, BOOL bAtStart = TRUE ) const;
115 /* -----------------02.09.99 07:52-------------------
117 --------------------------------------------------*/
118 struct SwDefTOXBase_Impl
120 SwTOXBase* pContBase;
121 SwTOXBase* pIdxBase;
122 SwTOXBase* pUserBase;
123 SwTOXBase* pTblBase;
124 SwTOXBase* pObjBase;
125 SwTOXBase* pIllBase;
126 SwTOXBase* pAuthBase;
128 SwDefTOXBase_Impl() :
129 pContBase(0),
130 pIdxBase(0),
131 pUserBase(0),
132 pTblBase(0),
133 pObjBase(0),
134 pIllBase(0),
135 pAuthBase(0)
137 ~SwDefTOXBase_Impl()
139 delete pContBase;
140 delete pIdxBase;
141 delete pUserBase;
142 delete pTblBase;
143 delete pObjBase;
144 delete pIllBase;
145 delete pAuthBase;
150 #endif // _DOCTXM_HXX