xref: /AOO41X/main/sw/inc/cshtyp.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _CSHTYP_HXX
28*cdf0e10cSrcweir #define _CSHTYP_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <tools/solar.h>
31*cdf0e10cSrcweir #include "swdllapi.h"
32*cdf0e10cSrcweir 
33*cdf0e10cSrcweir class SwPaM;
34*cdf0e10cSrcweir class SwCntntFrm;
35*cdf0e10cSrcweir class SwLayoutFrm;
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir // eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer
38*cdf0e10cSrcweir // fuer das richtungsabhaengige Bewegen des Cursors.
39*cdf0e10cSrcweir struct SwMoveFnCollection;
40*cdf0e10cSrcweir typedef SwMoveFnCollection* SwMoveFn;
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir // Type-Definition fuer die CrsrShell
44*cdf0e10cSrcweir // Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert )
45*cdf0e10cSrcweir typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
46*cdf0e10cSrcweir typedef SwCntntFrm  * (*SwPosPage)( const SwLayoutFrm * );
47*cdf0e10cSrcweir extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
48*cdf0e10cSrcweir extern SwPosPage fnPageStart, fnPageEnd;
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir // Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
51*cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosPara;
52*cdf0e10cSrcweir typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara );
53*cdf0e10cSrcweir extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
54*cdf0e10cSrcweir extern SwPosPara fnParaStart, fnParaEnd;
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir // Richtungsparameter fuer MoveSection
57*cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosSection;
58*cdf0e10cSrcweir typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection );
59*cdf0e10cSrcweir extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
60*cdf0e10cSrcweir extern SwPosSection fnSectionStart, fnSectionEnd;
61*cdf0e10cSrcweir 
62*cdf0e10cSrcweir // Richtungsparameter fuer MoveTable
63*cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosTable;
64*cdf0e10cSrcweir typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
65*cdf0e10cSrcweir extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
66*cdf0e10cSrcweir extern SwPosTable fnTableStart, fnTableEnd;
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir // Richtungsparameter fuer MoveColumn
69*cdf0e10cSrcweir typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
70*cdf0e10cSrcweir typedef SwCntntFrm  * (*SwPosColumn)( const SwLayoutFrm * );
71*cdf0e10cSrcweir extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
72*cdf0e10cSrcweir extern SwPosColumn fnColumnStart, fnColumnEnd;
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir // Richtungsparameter fuer MoveRegion	(Bereiche!)
75*cdf0e10cSrcweir typedef SwMoveFnCollection* SwPosRegion;
76*cdf0e10cSrcweir typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
77*cdf0e10cSrcweir extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
78*cdf0e10cSrcweir extern SwPosRegion fnRegionStart, fnRegionEnd;
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir 
82*cdf0e10cSrcweir /*
83*cdf0e10cSrcweir  * folgende Kombinationen sind erlaubt:
84*cdf0e10cSrcweir  *  - suche einen im Body:					-> FND_IN_BODY
85*cdf0e10cSrcweir  *  - suche alle im Body: 					-> FND_IN_BODYONLY | FND_IN_SELALL
86*cdf0e10cSrcweir  *  - suche in Selectionen: einen / alle    -> FND_IN_SEL  [ | FND_IN_SELALL ]
87*cdf0e10cSrcweir  *  - suche im nicht Body: einen / alle     -> FND_IN_OTHER [ | FND_IN_SELALL ]
88*cdf0e10cSrcweir  *  - suche ueberall alle: 					-> FND_IN_SELALL
89*cdf0e10cSrcweir  */
90*cdf0e10cSrcweir enum FindRanges
91*cdf0e10cSrcweir {
92*cdf0e10cSrcweir 	FND_IN_BODY     = 0x00,     // suche "eins" mur im Body-Text
93*cdf0e10cSrcweir 	FND_IN_OTHER    = 0x02,     // suche "alles" in Footer/Header/Fly...
94*cdf0e10cSrcweir 	FND_IN_SEL      = 0x04,     // suche in Selectionen
95*cdf0e10cSrcweir 	FND_IN_BODYONLY	= 0x08,		// suche nur im Body - nur in Verbindung mit
96*cdf0e10cSrcweir 								// FND_IN_SELALL !!!
97*cdf0e10cSrcweir 	FND_IN_SELALL   = 0x01		// - alle ( nur im nicht Body und Selectionen)
98*cdf0e10cSrcweir };
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir enum SwDocPositions
102*cdf0e10cSrcweir {
103*cdf0e10cSrcweir 	DOCPOS_START,
104*cdf0e10cSrcweir 	DOCPOS_CURR,
105*cdf0e10cSrcweir 	DOCPOS_END,
106*cdf0e10cSrcweir 	DOCPOS_OTHERSTART,
107*cdf0e10cSrcweir 	DOCPOS_OTHEREND
108*cdf0e10cSrcweir };
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir SW_DLLPUBLIC SwWhichPara GetfnParaCurr();
111*cdf0e10cSrcweir SW_DLLPUBLIC SwPosPara GetfnParaStart();
112*cdf0e10cSrcweir SW_DLLPUBLIC SwPosPara GetfnParaEnd();
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir SW_DLLPUBLIC SwWhichTable GetfnTablePrev();
115*cdf0e10cSrcweir SW_DLLPUBLIC SwWhichTable GetfnTableCurr();
116*cdf0e10cSrcweir SW_DLLPUBLIC SwPosTable GetfnTableStart();
117*cdf0e10cSrcweir SW_DLLPUBLIC SwPosTable GetfnTableEnd();
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir #endif	// _CSHTYP_HXX
120