1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _DOCARY_HXX 24cdf0e10cSrcweir #define _DOCARY_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <com/sun/star/i18n/ForbiddenCharacters.hpp> 27cdf0e10cSrcweir 28cdf0e10cSrcweir class SwFieldType; 29cdf0e10cSrcweir class SwFrmFmt; 30cdf0e10cSrcweir class SwCharFmt; 31cdf0e10cSrcweir class SwTOXType; 32cdf0e10cSrcweir class SwUndo; 33cdf0e10cSrcweir class SwSectionFmt; 34cdf0e10cSrcweir class SwNumRule; 35cdf0e10cSrcweir class SwRedline; 36cdf0e10cSrcweir class SwUnoCrsr; 37cdf0e10cSrcweir class SwOLENode; 38cdf0e10cSrcweir 39cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace i18n { 40cdf0e10cSrcweir struct ForbiddenCharacters; // comes from the I18N UNO interface 41cdf0e10cSrcweir }}}} 42cdf0e10cSrcweir 43cdf0e10cSrcweir #ifndef _TABLE_HXX //autogen 44cdf0e10cSrcweir #include <tools/table.hxx> 45cdf0e10cSrcweir #endif 46cdf0e10cSrcweir #include <swtypes.hxx> 47cdf0e10cSrcweir #include <svl/svarray.hxx> 48cdf0e10cSrcweir 49cdf0e10cSrcweir typedef SwFieldType* SwFldTypePtr; 50cdf0e10cSrcweir #define GROW_FLDTYPES 16 51cdf0e10cSrcweir 52cdf0e10cSrcweir //PageDescriptor-Schnittstelle 53cdf0e10cSrcweir //typedef SwPageDesc * SwPageDescPtr; 54cdf0e10cSrcweir //SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1); 55cdf0e10cSrcweir 56cdf0e10cSrcweir typedef SwFrmFmt* SwFrmFmtPtr; 57cdf0e10cSrcweir SV_DECL_PTRARR_DEL(SwFrmFmts,SwFrmFmtPtr,4,4) 58cdf0e10cSrcweir 59cdf0e10cSrcweir //Spezifische Frameformate (Rahmen, DrawObjecte) 60cdf0e10cSrcweir SV_DECL_PTRARR_DEL(SwSpzFrmFmts,SwFrmFmtPtr,0,4) 61cdf0e10cSrcweir 62cdf0e10cSrcweir typedef SwCharFmt* SwCharFmtPtr; 63cdf0e10cSrcweir SV_DECL_PTRARR_DEL(SwCharFmts,SwCharFmtPtr,4,4) 64cdf0e10cSrcweir 65cdf0e10cSrcweir SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES ) 66cdf0e10cSrcweir 67cdf0e10cSrcweir typedef SwTOXType* SwTOXTypePtr; 68cdf0e10cSrcweir SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 ) 69cdf0e10cSrcweir 70cdf0e10cSrcweir typedef SwSectionFmt* SwSectionFmtPtr; 71cdf0e10cSrcweir SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4) 72cdf0e10cSrcweir 73cdf0e10cSrcweir 74cdf0e10cSrcweir typedef SwNumRule* SwNumRulePtr; 75cdf0e10cSrcweir SV_DECL_PTRARR_DEL_VISIBILITY( SwNumRuleTbl, SwNumRulePtr, 0, 5, SW_DLLPUBLIC ) 76cdf0e10cSrcweir 77cdf0e10cSrcweir typedef SwRedline* SwRedlinePtr; 78cdf0e10cSrcweir SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 ) 79cdf0e10cSrcweir 80cdf0e10cSrcweir class SwRedlineTbl : private _SwRedlineTbl 81cdf0e10cSrcweir { 82cdf0e10cSrcweir public: SwRedlineTbl(sal_uInt8 nSize=0,sal_uInt8 nG=16)83cdf0e10cSrcweir SwRedlineTbl( sal_uInt8 nSize = 0, sal_uInt8 nG = 16 ) 84cdf0e10cSrcweir : _SwRedlineTbl( nSize, nG ) {} ~SwRedlineTbl()85cdf0e10cSrcweir ~SwRedlineTbl() {} 86cdf0e10cSrcweir SavePtrInArr(SwRedlinePtr p)87cdf0e10cSrcweir sal_Bool SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); } 88cdf0e10cSrcweir 89cdf0e10cSrcweir sal_Bool Insert( SwRedlinePtr& p, sal_Bool bIns = sal_True ); 90cdf0e10cSrcweir sal_Bool Insert( SwRedlinePtr& p, sal_uInt16& rInsPos, sal_Bool bIns = sal_True ); 91cdf0e10cSrcweir sal_Bool InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsPos = 0 ); 92cdf0e10cSrcweir 93cdf0e10cSrcweir void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 ); 94cdf0e10cSrcweir void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 ); 95cdf0e10cSrcweir 96cdf0e10cSrcweir // suche den naechsten oder vorherigen Redline mit dergleichen Seq.No 97cdf0e10cSrcweir // Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder 98cdf0e10cSrcweir // USHRT_MAX suchen im gesamten Array. 99cdf0e10cSrcweir sal_uInt16 FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const; 100cdf0e10cSrcweir sal_uInt16 FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const; 101cdf0e10cSrcweir sal_uInt16 FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos, 102cdf0e10cSrcweir sal_uInt16 nLookahead = 20 ) const; 103cdf0e10cSrcweir sal_uInt16 FindPrevSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos, 104cdf0e10cSrcweir sal_uInt16 nLookahead = 20 ) const; 105cdf0e10cSrcweir 106cdf0e10cSrcweir using _SwRedlineTbl::Count; 107cdf0e10cSrcweir using _SwRedlineTbl::operator[]; 108cdf0e10cSrcweir using _SwRedlineTbl::GetObject; 109cdf0e10cSrcweir using _SwRedlineTbl::Seek_Entry; 110cdf0e10cSrcweir using _SwRedlineTbl::GetPos; 111cdf0e10cSrcweir }; 112cdf0e10cSrcweir 113cdf0e10cSrcweir typedef SwUnoCrsr* SwUnoCrsrPtr; 114cdf0e10cSrcweir SV_DECL_PTRARR_DEL( SwUnoCrsrTbl, SwUnoCrsrPtr, 0, 4 ) 115cdf0e10cSrcweir 116cdf0e10cSrcweir typedef SwOLENode* SwOLENodePtr; 117cdf0e10cSrcweir SV_DECL_PTRARR(SwOLENodes,SwOLENodePtr,16,16) 118cdf0e10cSrcweir 119cdf0e10cSrcweir 120cdf0e10cSrcweir #endif //_DOCARY_HXX 121