xref: /AOO41X/main/sw/inc/cshtyp.hxx (revision 1d2dbeb0b7301723c6d13094e87a8714ef81a328)
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 _CSHTYP_HXX
24cdf0e10cSrcweir #define _CSHTYP_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <tools/solar.h>
27cdf0e10cSrcweir #include "swdllapi.h"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir class SwPaM;
30cdf0e10cSrcweir class SwCntntFrm;
31cdf0e10cSrcweir class SwLayoutFrm;
32cdf0e10cSrcweir 
33cdf0e10cSrcweir // eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer
34cdf0e10cSrcweir // fuer das richtungsabhaengige Bewegen des Cursors.
35cdf0e10cSrcweir struct SwMoveFnCollection;
36cdf0e10cSrcweir typedef SwMoveFnCollection* SwMoveFn;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir 
39cdf0e10cSrcweir // Type-Definition fuer die CrsrShell
40cdf0e10cSrcweir // Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert )
41cdf0e10cSrcweir typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
42cdf0e10cSrcweir typedef SwCntntFrm  * (*SwPosPage)( const SwLayoutFrm * );
43cdf0e10cSrcweir extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
44cdf0e10cSrcweir extern SwPosPage fnPageStart, fnPageEnd;
45cdf0e10cSrcweir 
46cdf0e10cSrcweir // Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
47cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosPara;
48cdf0e10cSrcweir typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara );
49cdf0e10cSrcweir extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
50cdf0e10cSrcweir extern SwPosPara fnParaStart, fnParaEnd;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir // Richtungsparameter fuer MoveSection
53cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosSection;
54cdf0e10cSrcweir typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection );
55cdf0e10cSrcweir extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
56cdf0e10cSrcweir extern SwPosSection fnSectionStart, fnSectionEnd;
57cdf0e10cSrcweir 
58cdf0e10cSrcweir // Richtungsparameter fuer MoveTable
59cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosTable;
60cdf0e10cSrcweir typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
61cdf0e10cSrcweir extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
62cdf0e10cSrcweir extern SwPosTable fnTableStart, fnTableEnd;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir // Richtungsparameter fuer MoveColumn
65cdf0e10cSrcweir typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
66cdf0e10cSrcweir typedef SwCntntFrm  * (*SwPosColumn)( const SwLayoutFrm * );
67cdf0e10cSrcweir extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
68cdf0e10cSrcweir extern SwPosColumn fnColumnStart, fnColumnEnd;
69cdf0e10cSrcweir 
70cdf0e10cSrcweir // Richtungsparameter fuer MoveRegion	(Bereiche!)
71cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosRegion;
72cdf0e10cSrcweir typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
73cdf0e10cSrcweir extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
74cdf0e10cSrcweir extern SwPosRegion fnRegionStart, fnRegionEnd;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 
78cdf0e10cSrcweir /*
79cdf0e10cSrcweir  * folgende Kombinationen sind erlaubt:
80cdf0e10cSrcweir  *  - suche einen im Body:					-> FND_IN_BODY
81cdf0e10cSrcweir  *  - suche alle im Body: 					-> FND_IN_BODYONLY | FND_IN_SELALL
82cdf0e10cSrcweir  *  - suche in Selectionen: einen / alle    -> FND_IN_SEL  [ | FND_IN_SELALL ]
83cdf0e10cSrcweir  *  - suche im nicht Body: einen / alle     -> FND_IN_OTHER [ | FND_IN_SELALL ]
84cdf0e10cSrcweir  *  - suche ueberall alle: 					-> FND_IN_SELALL
85cdf0e10cSrcweir  */
86cdf0e10cSrcweir enum FindRanges
87cdf0e10cSrcweir {
88cdf0e10cSrcweir 	FND_IN_BODY     = 0x00,     // suche "eins" mur im Body-Text
89cdf0e10cSrcweir 	FND_IN_OTHER    = 0x02,     // suche "alles" in Footer/Header/Fly...
90cdf0e10cSrcweir 	FND_IN_SEL      = 0x04,     // suche in Selectionen
91cdf0e10cSrcweir 	FND_IN_BODYONLY	= 0x08,		// suche nur im Body - nur in Verbindung mit
92cdf0e10cSrcweir 								// FND_IN_SELALL !!!
93cdf0e10cSrcweir 	FND_IN_SELALL   = 0x01		// - alle ( nur im nicht Body und Selectionen)
94cdf0e10cSrcweir };
95cdf0e10cSrcweir 
96cdf0e10cSrcweir 
97cdf0e10cSrcweir enum SwDocPositions
98cdf0e10cSrcweir {
99cdf0e10cSrcweir 	DOCPOS_START,
100cdf0e10cSrcweir 	DOCPOS_CURR,
101cdf0e10cSrcweir 	DOCPOS_END,
102cdf0e10cSrcweir 	DOCPOS_OTHERSTART,
103cdf0e10cSrcweir 	DOCPOS_OTHEREND
104cdf0e10cSrcweir };
105cdf0e10cSrcweir 
106cdf0e10cSrcweir SW_DLLPUBLIC SwWhichPara GetfnParaCurr();
107cdf0e10cSrcweir SW_DLLPUBLIC SwPosPara GetfnParaStart();
108cdf0e10cSrcweir SW_DLLPUBLIC SwPosPara GetfnParaEnd();
109cdf0e10cSrcweir 
110cdf0e10cSrcweir SW_DLLPUBLIC SwWhichTable GetfnTablePrev();
111cdf0e10cSrcweir SW_DLLPUBLIC SwWhichTable GetfnTableCurr();
112cdf0e10cSrcweir SW_DLLPUBLIC SwPosTable GetfnTableStart();
113cdf0e10cSrcweir SW_DLLPUBLIC SwPosTable GetfnTableEnd();
114cdf0e10cSrcweir 
115cdf0e10cSrcweir #endif	// _CSHTYP_HXX
116