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