1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: doctxm.hxx,v $
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 ************************************************************************/
34 #include <svtools/svarray.hxx>
35 #include <tools/gen.hxx>
37 #include <section.hxx>
39 class SwTOXInternational
;
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
);
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
,
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
);
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
;
122 SwTOXBase
* pUserBase
;
126 SwTOXBase
* pAuthBase
;
128 SwDefTOXBase_Impl() :
150 #endif // _DOCTXM_HXX