merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / ftnidx.hxx
blobc3a8b5c84ce632c49f23f8cbf0f6b2ef03143a82
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: ftnidx.hxx,v $
10 * $Revision: 1.5 $
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 _FTNIDX_HXX
31 #define _FTNIDX_HXX
34 #define _SVSTDARR_USHORTS
35 #include <svtools/svstdarr.hxx>
37 class SwTxtFtn;
38 class SwNodeIndex;
39 class SwSectionNode;
41 // ueberall, wo der NodeIndex gebraucht wird, werden die hier fehlenden
42 // Headerfiles schon includes. Darum hier nur als define und nicht als
43 // inline Methode (spart Compile-Zeit)
44 #define _SwTxtFtn_GetIndex( pFIdx ) (pFIdx->GetTxtNode().GetIndex())
47 typedef SwTxtFtn* SwTxtFtnPtr;
48 SV_DECL_PTRARR_SORT( _SwFtnIdxs, SwTxtFtnPtr, 0, 10 )
50 class SwFtnIdxs : public _SwFtnIdxs
52 public:
53 SwFtnIdxs() {}
55 void UpdateFtn( const SwNodeIndex& rStt ); // ab Pos. alle Updaten
56 void UpdateAllFtn(); // alle Fussnoten updaten
58 SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, USHORT* pPos = 0 ) const;
62 class SwUpdFtnEndNtAtEnd
64 SvPtrarr aFtnSects, aEndSects;
65 SvUShorts aFtnNums, aEndNums;
67 public:
68 SwUpdFtnEndNtAtEnd() : aFtnSects( 0, 4 ), aEndSects( 0, 4 ),
69 aFtnNums( 0, 4 ), aEndNums( 0, 4 )
72 static const SwSectionNode* FindSectNdWithEndAttr(
73 const SwTxtFtn& rTxtFtn );
75 USHORT GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
76 USHORT ChkNumber( const SwTxtFtn& rTxtFtn );
81 #endif // _FTNIDX_HXX