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: ftnidx.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 #define _SVSTDARR_USHORTS
35 #include <svtools/svstdarr.hxx>
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
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
;
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
);