1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_sw.hxx" 30 31 32 #include <pamtyp.hxx> 33 34 35 static SwMoveFnCollection aFwrd = { 36 /* fnNd */ &GoNext, 37 /* fnNds */ &GoNextNds, 38 /* fnDoc */ &GoEndDoc, 39 /* fnSections */ &GoEndSection, 40 /* fnCmpOp */ &SwPosition::operator<, 41 /* fnGetHint */ &GetFrwrdTxtHint, 42 /* fnSearch */ &utl::TextSearch::SearchFrwrd, 43 /* fnSection */ &SwNodes::GoStartOfSection 44 }; 45 46 static SwMoveFnCollection aBwrd = { 47 /* fnNd */ &GoPrevious, 48 /* fnNds */ &GoPreviousNds, 49 /* fnDoc */ &GoStartDoc, 50 /* fnSections */ &GoStartSection, 51 /* fnCmpOp */ &SwPosition::operator>, 52 /* fnGetHint */ &GetBkwrdTxtHint, 53 /* fnSearch */ &utl::TextSearch::SearchBkwrd, 54 /* fnSection */ &SwNodes::GoEndOfSection 55 }; 56 57 SwGoInDoc fnGoDoc = &GoInDoc; 58 SwGoInDoc fnGoSection = &GoInSection; 59 SwGoInDoc fnGoNode = &GoInNode; 60 SwGoInDoc fnGoCntnt = &GoInCntnt; 61 SwGoInDoc fnGoCntntCells = &GoInCntntCells; 62 SwGoInDoc fnGoCntntSkipHidden = &GoInCntntSkipHidden; 63 SwGoInDoc fnGoCntntCellsSkipHidden = &GoInCntntCellsSkipHidden; 64 65 SwWhichPara fnParaPrev = &GoPrevPara; 66 SwWhichPara fnParaCurr = &GoCurrPara; 67 SwWhichPara fnParaNext = &GoNextPara; 68 SwPosPara fnParaStart = &aFwrd; 69 SwPosPara fnParaEnd = &aBwrd; 70 71 SwWhichSection fnSectionPrev = &GoPrevSection; 72 SwWhichSection fnSectionCurr = &GoCurrSection; 73 SwWhichSection fnSectionNext = &GoNextSection; 74 SwPosSection fnSectionStart = &aFwrd; 75 SwPosSection fnSectionEnd = &aBwrd; 76 77 // Travelling in Tabellen 78 sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); 79 sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); 80 sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); 81 82 SwWhichTable fnTablePrev = &GotoPrevTable; 83 SwWhichTable fnTableCurr = &GotoCurrTable; 84 SwWhichTable fnTableNext = &GotoNextTable; 85 SwPosTable fnTableStart = &aFwrd; 86 SwPosTable fnTableEnd = &aBwrd; 87 88 // Travelling in Bereichen 89 sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); 90 sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); 91 sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); 92 sal_Bool GotoNextRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); 93 94 SwWhichRegion fnRegionPrev = &GotoPrevRegion; 95 SwWhichRegion fnRegionCurr = &GotoCurrRegion; 96 SwWhichRegion fnRegionCurrAndSkip = &GotoCurrRegionAndSkip; 97 SwWhichRegion fnRegionNext = &GotoNextRegion; 98 SwPosRegion fnRegionStart = &aFwrd; 99 SwPosRegion fnRegionEnd = &aBwrd; 100 101 SwMoveFn fnMoveBackward = &aBwrd; 102 SwMoveFn fnMoveForward = &aFwrd; 103 104 SwWhichPara GetfnParaCurr() 105 { 106 return fnParaCurr; 107 } 108 SwPosPara GetfnParaStart() 109 { 110 return fnParaStart; 111 } 112 SwWhichTable GetfnTablePrev() 113 { 114 return fnTablePrev; 115 } 116 SwPosPara GetfnParaEnd() 117 { 118 return fnParaEnd; 119 } 120 SwPosTable GetfnTableStart() 121 { 122 return fnTableStart; 123 } 124 SwWhichTable GetfnTableCurr() 125 { 126 return fnTableCurr; 127 } 128 SwPosTable GetfnTableEnd() 129 { 130 return fnTableEnd; 131 } 132