Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #include <pam.hxx>
21 : #include <pamtyp.hxx>
22 :
23 :
24 : static SwMoveFnCollection aFwrd = {
25 : /* fnNd */ &GoNext,
26 : /* fnNds */ &GoNextNds,
27 : /* fnDoc */ &GoEndDoc,
28 : /* fnSections */ &GoEndSection,
29 : /* fnCmpOp */ &SwPosition::operator<,
30 : /* fnGetHint */ &GetFrwrdTxtHint,
31 : /* fnSearch */ &utl::TextSearch::SearchForward,
32 : /* fnSection */ &SwNodes::GoStartOfSection
33 : };
34 :
35 : static SwMoveFnCollection aBwrd = {
36 : /* fnNd */ &GoPrevious,
37 : /* fnNds */ &GoPreviousNds,
38 : /* fnDoc */ &GoStartDoc,
39 : /* fnSections */ &GoStartSection,
40 : /* fnCmpOp */ &SwPosition::operator>,
41 : /* fnGetHint */ &GetBkwrdTxtHint,
42 : /* fnSearch */ &utl::TextSearch::SearchBackward,
43 : /* fnSection */ &SwNodes::GoEndOfSection
44 : };
45 :
46 : SwGoInDoc fnGoDoc = &GoInDoc;
47 : SwGoInDoc fnGoSection = &GoInSection;
48 : SwGoInDoc fnGoNode = &GoInNode;
49 : SwGoInDoc fnGoCntnt = &GoInCntnt;
50 : SwGoInDoc fnGoCntntCells = &GoInCntntCells;
51 : SwGoInDoc fnGoCntntSkipHidden = &GoInCntntSkipHidden;
52 : SwGoInDoc fnGoCntntCellsSkipHidden = &GoInCntntCellsSkipHidden;
53 :
54 : SwWhichPara fnParaPrev = &GoPrevPara;
55 : SwWhichPara fnParaCurr = &GoCurrPara;
56 : SwWhichPara fnParaNext = &GoNextPara;
57 : SwPosPara fnParaStart = &aFwrd;
58 : SwPosPara fnParaEnd = &aBwrd;
59 :
60 : SwWhichSection fnSectionPrev = &GoPrevSection;
61 : SwWhichSection fnSectionCurr = &GoCurrSection;
62 : SwWhichSection fnSectionNext = &GoNextSection;
63 : SwPosSection fnSectionStart = &aFwrd;
64 : SwPosSection fnSectionEnd = &aBwrd;
65 :
66 : // Travelling in tables
67 : sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
68 : sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
69 : sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
70 :
71 : SwWhichTable fnTablePrev = &GotoPrevTable;
72 : SwWhichTable fnTableCurr = &GotoCurrTable;
73 : SwWhichTable fnTableNext = &GotoNextTable;
74 : SwPosTable fnTableStart = &aFwrd;
75 : SwPosTable fnTableEnd = &aBwrd;
76 :
77 : // Travelling in regions
78 : sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
79 : sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
80 : sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
81 : sal_Bool GotoNextRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
82 :
83 : SwWhichRegion fnRegionPrev = &GotoPrevRegion;
84 : SwWhichRegion fnRegionCurr = &GotoCurrRegion;
85 : SwWhichRegion fnRegionCurrAndSkip = &GotoCurrRegionAndSkip;
86 : SwWhichRegion fnRegionNext = &GotoNextRegion;
87 : SwPosRegion fnRegionStart = &aFwrd;
88 : SwPosRegion fnRegionEnd = &aBwrd;
89 :
90 : SwMoveFn fnMoveBackward = &aBwrd;
91 : SwMoveFn fnMoveForward = &aFwrd;
92 :
93 0 : SwWhichPara GetfnParaCurr()
94 : {
95 0 : return fnParaCurr;
96 : }
97 0 : SwPosPara GetfnParaStart()
98 : {
99 0 : return fnParaStart;
100 : }
101 0 : SwWhichTable GetfnTablePrev()
102 : {
103 0 : return fnTablePrev;
104 : }
105 0 : SwPosPara GetfnParaEnd()
106 : {
107 0 : return fnParaEnd;
108 : }
109 0 : SwPosTable GetfnTableStart()
110 : {
111 0 : return fnTableStart;
112 : }
113 0 : SwWhichTable GetfnTableCurr()
114 : {
115 0 : return fnTableCurr;
116 : }
117 0 : SwPosTable GetfnTableEnd()
118 : {
119 0 : return fnTableEnd;
120 99 : }
121 :
122 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|