xref: /aoo42x/main/sw/inc/cshtyp.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _CSHTYP_HXX
24 #define _CSHTYP_HXX
25 
26 #include <tools/solar.h>
27 #include "swdllapi.h"
28 
29 class SwPaM;
30 class SwCntntFrm;
31 class SwLayoutFrm;
32 
33 // eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer
34 // fuer das richtungsabhaengige Bewegen des Cursors.
35 struct SwMoveFnCollection;
36 typedef SwMoveFnCollection* SwMoveFn;
37 
38 
39 // Type-Definition fuer die CrsrShell
40 // Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert )
41 typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
42 typedef SwCntntFrm  * (*SwPosPage)( const SwLayoutFrm * );
43 extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
44 extern SwPosPage fnPageStart, fnPageEnd;
45 
46 // Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
47 typedef SwMoveFnCollection* SwPosPara;
48 typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara );
49 extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
50 extern SwPosPara fnParaStart, fnParaEnd;
51 
52 // Richtungsparameter fuer MoveSection
53 typedef SwMoveFnCollection* SwPosSection;
54 typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection );
55 extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
56 extern SwPosSection fnSectionStart, fnSectionEnd;
57 
58 // Richtungsparameter fuer MoveTable
59 typedef SwMoveFnCollection* SwPosTable;
60 typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
61 extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
62 extern SwPosTable fnTableStart, fnTableEnd;
63 
64 // Richtungsparameter fuer MoveColumn
65 typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
66 typedef SwCntntFrm  * (*SwPosColumn)( const SwLayoutFrm * );
67 extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
68 extern SwPosColumn fnColumnStart, fnColumnEnd;
69 
70 // Richtungsparameter fuer MoveRegion	(Bereiche!)
71 typedef SwMoveFnCollection* SwPosRegion;
72 typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
73 extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
74 extern SwPosRegion fnRegionStart, fnRegionEnd;
75 
76 
77 
78 /*
79  * folgende Kombinationen sind erlaubt:
80  *  - suche einen im Body:					-> FND_IN_BODY
81  *  - suche alle im Body: 					-> FND_IN_BODYONLY | FND_IN_SELALL
82  *  - suche in Selectionen: einen / alle    -> FND_IN_SEL  [ | FND_IN_SELALL ]
83  *  - suche im nicht Body: einen / alle     -> FND_IN_OTHER [ | FND_IN_SELALL ]
84  *  - suche ueberall alle: 					-> FND_IN_SELALL
85  */
86 enum FindRanges
87 {
88 	FND_IN_BODY     = 0x00,     // suche "eins" mur im Body-Text
89 	FND_IN_OTHER    = 0x02,     // suche "alles" in Footer/Header/Fly...
90 	FND_IN_SEL      = 0x04,     // suche in Selectionen
91 	FND_IN_BODYONLY	= 0x08,		// suche nur im Body - nur in Verbindung mit
92 								// FND_IN_SELALL !!!
93 	FND_IN_SELALL   = 0x01		// - alle ( nur im nicht Body und Selectionen)
94 };
95 
96 
97 enum SwDocPositions
98 {
99 	DOCPOS_START,
100 	DOCPOS_CURR,
101 	DOCPOS_END,
102 	DOCPOS_OTHERSTART,
103 	DOCPOS_OTHEREND
104 };
105 
106 SW_DLLPUBLIC SwWhichPara GetfnParaCurr();
107 SW_DLLPUBLIC SwPosPara GetfnParaStart();
108 SW_DLLPUBLIC SwPosPara GetfnParaEnd();
109 
110 SW_DLLPUBLIC SwWhichTable GetfnTablePrev();
111 SW_DLLPUBLIC SwWhichTable GetfnTableCurr();
112 SW_DLLPUBLIC SwPosTable GetfnTableStart();
113 SW_DLLPUBLIC SwPosTable GetfnTableEnd();
114 
115 #endif	// _CSHTYP_HXX
116