xref: /trunk/main/sw/source/core/crsr/paminit.cxx (revision efeef26f)
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 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sw.hxx"
26 
27 
28 #include <pamtyp.hxx>
29 
30 
31 static SwMoveFnCollection aFwrd = {
32 	/* fnNd			*/  &GoNext,
33 	/* fnNds 		*/  &GoNextNds,
34 	/* fnDoc 		*/  &GoEndDoc,
35 	/* fnSections	*/  &GoEndSection,
36 	/* fnCmpOp		*/  &SwPosition::operator<,
37 	/* fnGetHint 	*/  &GetFrwrdTxtHint,
38 	/* fnSearch		*/  &utl::TextSearch::SearchFrwrd,
39 	/* fnSection 	*/  &SwNodes::GoStartOfSection
40 };
41 
42 static SwMoveFnCollection aBwrd = {
43 	/* fnNd			*/  &GoPrevious,
44 	/* fnNds 		*/  &GoPreviousNds,
45 	/* fnDoc 		*/  &GoStartDoc,
46 	/* fnSections	*/  &GoStartSection,
47 	/* fnCmpOp		*/  &SwPosition::operator>,
48 	/* fnGetHint 	*/  &GetBkwrdTxtHint,
49 	/* fnSearch		*/  &utl::TextSearch::SearchBkwrd,
50 	/* fnSection 	*/  &SwNodes::GoEndOfSection
51 };
52 
53 SwGoInDoc fnGoDoc 		= &GoInDoc;
54 SwGoInDoc fnGoSection	= &GoInSection;
55 SwGoInDoc fnGoNode		= &GoInNode;
56 SwGoInDoc fnGoCntnt		= &GoInCntnt;
57 SwGoInDoc fnGoCntntCells = &GoInCntntCells;
58 SwGoInDoc fnGoCntntSkipHidden      = &GoInCntntSkipHidden;
59 SwGoInDoc fnGoCntntCellsSkipHidden = &GoInCntntCellsSkipHidden;
60 
61 SwWhichPara fnParaPrev	= &GoPrevPara;
62 SwWhichPara fnParaCurr	= &GoCurrPara;
63 SwWhichPara fnParaNext	= &GoNextPara;
64 SwPosPara fnParaStart	= &aFwrd;
65 SwPosPara fnParaEnd		= &aBwrd;
66 
67 SwWhichSection fnSectionPrev	= &GoPrevSection;
68 SwWhichSection fnSectionCurr	= &GoCurrSection;
69 SwWhichSection fnSectionNext	= &GoNextSection;
70 SwPosSection fnSectionStart		= &aFwrd;
71 SwPosSection fnSectionEnd		= &aBwrd;
72 
73 // Travelling in Tabellen
74 sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
75 sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
76 sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
77 
78 SwWhichTable fnTablePrev = &GotoPrevTable;
79 SwWhichTable fnTableCurr = &GotoCurrTable;
80 SwWhichTable fnTableNext = &GotoNextTable;
81 SwPosTable fnTableStart = &aFwrd;
82 SwPosTable fnTableEnd = &aBwrd;
83 
84 // Travelling in Bereichen
85 sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
86 sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
87 sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
88 sal_Bool GotoNextRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
89 
90 SwWhichRegion fnRegionPrev = &GotoPrevRegion;
91 SwWhichRegion fnRegionCurr = &GotoCurrRegion;
92 SwWhichRegion fnRegionCurrAndSkip = &GotoCurrRegionAndSkip;
93 SwWhichRegion fnRegionNext = &GotoNextRegion;
94 SwPosRegion fnRegionStart = &aFwrd;
95 SwPosRegion fnRegionEnd = &aBwrd;
96 
97 SwMoveFn fnMoveBackward	= &aBwrd;
98 SwMoveFn fnMoveForward	= &aFwrd;
99 
GetfnParaCurr()100 SwWhichPara GetfnParaCurr()
101 {
102 	return fnParaCurr;
103 }
GetfnParaStart()104 SwPosPara GetfnParaStart()
105 {
106 	 return  fnParaStart;
107 }
GetfnTablePrev()108 SwWhichTable GetfnTablePrev()
109 {
110     return fnTablePrev;
111 }
GetfnParaEnd()112 SwPosPara GetfnParaEnd()
113 {
114 	 return  fnParaEnd;
115 }
GetfnTableStart()116 SwPosTable GetfnTableStart()
117 {
118 	return fnTableStart;
119 }
GetfnTableCurr()120 SwWhichTable GetfnTableCurr()
121 {
122 	return fnTableCurr;
123 }
GetfnTableEnd()124 SwPosTable GetfnTableEnd()
125 {
126 	return fnTableEnd;
127 }
128