xref: /aoo42x/main/sw/source/core/crsr/paminit.cxx (revision efeef26f)
1*efeef26fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*efeef26fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*efeef26fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*efeef26fSAndrew Rist  * distributed with this work for additional information
6*efeef26fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*efeef26fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*efeef26fSAndrew Rist  * "License"); you may not use this file except in compliance
9*efeef26fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*efeef26fSAndrew Rist  *
11*efeef26fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*efeef26fSAndrew Rist  *
13*efeef26fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*efeef26fSAndrew Rist  * software distributed under the License is distributed on an
15*efeef26fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*efeef26fSAndrew Rist  * KIND, either express or implied.  See the License for the
17*efeef26fSAndrew Rist  * specific language governing permissions and limitations
18*efeef26fSAndrew Rist  * under the License.
19*efeef26fSAndrew Rist  *
20*efeef26fSAndrew Rist  *************************************************************/
21*efeef26fSAndrew Rist 
22*efeef26fSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sw.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <pamtyp.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir 
31cdf0e10cSrcweir static SwMoveFnCollection aFwrd = {
32cdf0e10cSrcweir 	/* fnNd			*/  &GoNext,
33cdf0e10cSrcweir 	/* fnNds 		*/  &GoNextNds,
34cdf0e10cSrcweir 	/* fnDoc 		*/  &GoEndDoc,
35cdf0e10cSrcweir 	/* fnSections	*/  &GoEndSection,
36cdf0e10cSrcweir 	/* fnCmpOp		*/  &SwPosition::operator<,
37cdf0e10cSrcweir 	/* fnGetHint 	*/  &GetFrwrdTxtHint,
38cdf0e10cSrcweir 	/* fnSearch		*/  &utl::TextSearch::SearchFrwrd,
39cdf0e10cSrcweir 	/* fnSection 	*/  &SwNodes::GoStartOfSection
40cdf0e10cSrcweir };
41cdf0e10cSrcweir 
42cdf0e10cSrcweir static SwMoveFnCollection aBwrd = {
43cdf0e10cSrcweir 	/* fnNd			*/  &GoPrevious,
44cdf0e10cSrcweir 	/* fnNds 		*/  &GoPreviousNds,
45cdf0e10cSrcweir 	/* fnDoc 		*/  &GoStartDoc,
46cdf0e10cSrcweir 	/* fnSections	*/  &GoStartSection,
47cdf0e10cSrcweir 	/* fnCmpOp		*/  &SwPosition::operator>,
48cdf0e10cSrcweir 	/* fnGetHint 	*/  &GetBkwrdTxtHint,
49cdf0e10cSrcweir 	/* fnSearch		*/  &utl::TextSearch::SearchBkwrd,
50cdf0e10cSrcweir 	/* fnSection 	*/  &SwNodes::GoEndOfSection
51cdf0e10cSrcweir };
52cdf0e10cSrcweir 
53cdf0e10cSrcweir SwGoInDoc fnGoDoc 		= &GoInDoc;
54cdf0e10cSrcweir SwGoInDoc fnGoSection	= &GoInSection;
55cdf0e10cSrcweir SwGoInDoc fnGoNode		= &GoInNode;
56cdf0e10cSrcweir SwGoInDoc fnGoCntnt		= &GoInCntnt;
57cdf0e10cSrcweir SwGoInDoc fnGoCntntCells = &GoInCntntCells;
58cdf0e10cSrcweir SwGoInDoc fnGoCntntSkipHidden      = &GoInCntntSkipHidden;
59cdf0e10cSrcweir SwGoInDoc fnGoCntntCellsSkipHidden = &GoInCntntCellsSkipHidden;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir SwWhichPara fnParaPrev	= &GoPrevPara;
62cdf0e10cSrcweir SwWhichPara fnParaCurr	= &GoCurrPara;
63cdf0e10cSrcweir SwWhichPara fnParaNext	= &GoNextPara;
64cdf0e10cSrcweir SwPosPara fnParaStart	= &aFwrd;
65cdf0e10cSrcweir SwPosPara fnParaEnd		= &aBwrd;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir SwWhichSection fnSectionPrev	= &GoPrevSection;
68cdf0e10cSrcweir SwWhichSection fnSectionCurr	= &GoCurrSection;
69cdf0e10cSrcweir SwWhichSection fnSectionNext	= &GoNextSection;
70cdf0e10cSrcweir SwPosSection fnSectionStart		= &aFwrd;
71cdf0e10cSrcweir SwPosSection fnSectionEnd		= &aBwrd;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir // Travelling in Tabellen
74cdf0e10cSrcweir sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
75cdf0e10cSrcweir sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
76cdf0e10cSrcweir sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
77cdf0e10cSrcweir 
78cdf0e10cSrcweir SwWhichTable fnTablePrev = &GotoPrevTable;
79cdf0e10cSrcweir SwWhichTable fnTableCurr = &GotoCurrTable;
80cdf0e10cSrcweir SwWhichTable fnTableNext = &GotoNextTable;
81cdf0e10cSrcweir SwPosTable fnTableStart = &aFwrd;
82cdf0e10cSrcweir SwPosTable fnTableEnd = &aBwrd;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir // Travelling in Bereichen
85cdf0e10cSrcweir sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
86cdf0e10cSrcweir sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
87cdf0e10cSrcweir sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
88cdf0e10cSrcweir sal_Bool GotoNextRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
89cdf0e10cSrcweir 
90cdf0e10cSrcweir SwWhichRegion fnRegionPrev = &GotoPrevRegion;
91cdf0e10cSrcweir SwWhichRegion fnRegionCurr = &GotoCurrRegion;
92cdf0e10cSrcweir SwWhichRegion fnRegionCurrAndSkip = &GotoCurrRegionAndSkip;
93cdf0e10cSrcweir SwWhichRegion fnRegionNext = &GotoNextRegion;
94cdf0e10cSrcweir SwPosRegion fnRegionStart = &aFwrd;
95cdf0e10cSrcweir SwPosRegion fnRegionEnd = &aBwrd;
96cdf0e10cSrcweir 
97cdf0e10cSrcweir SwMoveFn fnMoveBackward	= &aBwrd;
98cdf0e10cSrcweir SwMoveFn fnMoveForward	= &aFwrd;
99cdf0e10cSrcweir 
GetfnParaCurr()100cdf0e10cSrcweir SwWhichPara GetfnParaCurr()
101cdf0e10cSrcweir {
102cdf0e10cSrcweir 	return fnParaCurr;
103cdf0e10cSrcweir }
GetfnParaStart()104cdf0e10cSrcweir SwPosPara GetfnParaStart()
105cdf0e10cSrcweir {
106cdf0e10cSrcweir 	 return  fnParaStart;
107cdf0e10cSrcweir }
GetfnTablePrev()108cdf0e10cSrcweir SwWhichTable GetfnTablePrev()
109cdf0e10cSrcweir {
110cdf0e10cSrcweir     return fnTablePrev;
111cdf0e10cSrcweir }
GetfnParaEnd()112cdf0e10cSrcweir SwPosPara GetfnParaEnd()
113cdf0e10cSrcweir {
114cdf0e10cSrcweir 	 return  fnParaEnd;
115cdf0e10cSrcweir }
GetfnTableStart()116cdf0e10cSrcweir SwPosTable GetfnTableStart()
117cdf0e10cSrcweir {
118cdf0e10cSrcweir 	return fnTableStart;
119cdf0e10cSrcweir }
GetfnTableCurr()120cdf0e10cSrcweir SwWhichTable GetfnTableCurr()
121cdf0e10cSrcweir {
122cdf0e10cSrcweir 	return fnTableCurr;
123cdf0e10cSrcweir }
GetfnTableEnd()124cdf0e10cSrcweir SwPosTable GetfnTableEnd()
125cdf0e10cSrcweir {
126cdf0e10cSrcweir 	return fnTableEnd;
127cdf0e10cSrcweir }
128