update dev300-m58
[ooovba.git] / sw / inc / docary.hxx
blob9152f8064f4e5d0fd8807b325db976ef07a588d1
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: docary.hxx,v $
10 * $Revision: 1.7 $
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 _DOCARY_HXX
31 #define _DOCARY_HXX
33 #include <com/sun/star/i18n/ForbiddenCharacters.hpp>
35 class SwFieldType;
36 class SwFrmFmt;
37 class SwCharFmt;
38 class SwTOXType;
39 class SwUndo;
40 class SwSectionFmt;
41 class SwNumRule;
42 class SwRedline;
43 class SwUnoCrsr;
44 class SwOLENode;
46 namespace com { namespace sun { namespace star { namespace i18n {
47 struct ForbiddenCharacters; // comes from the I18N UNO interface
48 }}}}
50 #ifndef _TABLE_HXX //autogen
51 #include <tools/table.hxx>
52 #endif
53 #include <swtypes.hxx>
54 #include <svtools/svarray.hxx>
56 typedef SwFieldType* SwFldTypePtr;
57 #define GROW_FLDTYPES 16
59 //PageDescriptor-Schnittstelle
60 //typedef SwPageDesc * SwPageDescPtr;
61 //SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1);
63 typedef SwFrmFmt* SwFrmFmtPtr;
64 SV_DECL_PTRARR_DEL(SwFrmFmts,SwFrmFmtPtr,4,4)
66 //Spezifische Frameformate (Rahmen, DrawObjecte)
67 SV_DECL_PTRARR_DEL(SwSpzFrmFmts,SwFrmFmtPtr,0,4)
69 typedef SwCharFmt* SwCharFmtPtr;
70 SV_DECL_PTRARR_DEL(SwCharFmts,SwCharFmtPtr,4,4)
72 SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES )
74 typedef SwTOXType* SwTOXTypePtr;
75 SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 )
77 // Undo
78 #define INIT_UNDOS 5
79 #define GROW_UNDOS 5
80 // Das Array der Undo-History
81 typedef SwUndo* SwUndoPtr;
82 SV_DECL_PTRARR_DEL( SwUndos, SwUndoPtr, INIT_UNDOS, GROW_UNDOS )
84 typedef SwSectionFmt* SwSectionFmtPtr;
85 SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4)
88 typedef SwNumRule* SwNumRulePtr;
89 SV_DECL_PTRARR_DEL_VISIBILITY( SwNumRuleTbl, SwNumRulePtr, 0, 5, SW_DLLPUBLIC )
91 typedef SwRedline* SwRedlinePtr;
92 SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 )
94 class SwRedlineTbl : private _SwRedlineTbl
96 public:
97 SwRedlineTbl( BYTE nSize = 0, BYTE nG = 16 )
98 : _SwRedlineTbl( nSize, nG ) {}
99 ~SwRedlineTbl() {}
101 BOOL SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
103 BOOL Insert( SwRedlinePtr& p, BOOL bIns = TRUE );
104 BOOL Insert( SwRedlinePtr& p, USHORT& rInsPos, BOOL bIns = TRUE );
105 BOOL InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos = 0 );
107 void Remove( USHORT nP, USHORT nL = 1 );
108 void DeleteAndDestroy( USHORT nP, USHORT nL=1 );
110 // suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
111 // Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
112 // USHRT_MAX suchen im gesamten Array.
113 USHORT FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
114 USHORT FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
115 USHORT FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
116 USHORT nLookahead = 20 ) const;
117 USHORT FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
118 USHORT nLookahead = 20 ) const;
120 using _SwRedlineTbl::Count;
121 using _SwRedlineTbl::operator[];
122 using _SwRedlineTbl::GetObject;
123 using _SwRedlineTbl::Seek_Entry;
124 using _SwRedlineTbl::GetPos;
127 typedef SwUnoCrsr* SwUnoCrsrPtr;
128 SV_DECL_PTRARR_DEL( SwUnoCrsrTbl, SwUnoCrsrPtr, 0, 4 )
130 typedef SwOLENode* SwOLENodePtr;
131 SV_DECL_PTRARR(SwOLENodes,SwOLENodePtr,16,16)
134 #endif //_DOCARY_HXX