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 #ifndef _CSHTYP_HXX 28 #define _CSHTYP_HXX 29 30 #include <tools/solar.h> 31 #include "swdllapi.h" 32 33 class SwPaM; 34 class SwCntntFrm; 35 class SwLayoutFrm; 36 37 // eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer 38 // fuer das richtungsabhaengige Bewegen des Cursors. 39 struct SwMoveFnCollection; 40 typedef SwMoveFnCollection* SwMoveFn; 41 42 43 // Type-Definition fuer die CrsrShell 44 // Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert ) 45 typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * ); 46 typedef SwCntntFrm * (*SwPosPage)( const SwLayoutFrm * ); 47 extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext; 48 extern SwPosPage fnPageStart, fnPageEnd; 49 50 // Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert ) 51 typedef SwMoveFnCollection* SwPosPara; 52 typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara ); 53 extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext; 54 extern SwPosPara fnParaStart, fnParaEnd; 55 56 // Richtungsparameter fuer MoveSection 57 typedef SwMoveFnCollection* SwPosSection; 58 typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection ); 59 extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext; 60 extern SwPosSection fnSectionStart, fnSectionEnd; 61 62 // Richtungsparameter fuer MoveTable 63 typedef SwMoveFnCollection* SwPosTable; 64 typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); 65 extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext; 66 extern SwPosTable fnTableStart, fnTableEnd; 67 68 // Richtungsparameter fuer MoveColumn 69 typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * ); 70 typedef SwCntntFrm * (*SwPosColumn)( const SwLayoutFrm * ); 71 extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext; 72 extern SwPosColumn fnColumnStart, fnColumnEnd; 73 74 // Richtungsparameter fuer MoveRegion (Bereiche!) 75 typedef SwMoveFnCollection* SwPosRegion; 76 typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); 77 extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip; 78 extern SwPosRegion fnRegionStart, fnRegionEnd; 79 80 81 82 /* 83 * folgende Kombinationen sind erlaubt: 84 * - suche einen im Body: -> FND_IN_BODY 85 * - suche alle im Body: -> FND_IN_BODYONLY | FND_IN_SELALL 86 * - suche in Selectionen: einen / alle -> FND_IN_SEL [ | FND_IN_SELALL ] 87 * - suche im nicht Body: einen / alle -> FND_IN_OTHER [ | FND_IN_SELALL ] 88 * - suche ueberall alle: -> FND_IN_SELALL 89 */ 90 enum FindRanges 91 { 92 FND_IN_BODY = 0x00, // suche "eins" mur im Body-Text 93 FND_IN_OTHER = 0x02, // suche "alles" in Footer/Header/Fly... 94 FND_IN_SEL = 0x04, // suche in Selectionen 95 FND_IN_BODYONLY = 0x08, // suche nur im Body - nur in Verbindung mit 96 // FND_IN_SELALL !!! 97 FND_IN_SELALL = 0x01 // - alle ( nur im nicht Body und Selectionen) 98 }; 99 100 101 enum SwDocPositions 102 { 103 DOCPOS_START, 104 DOCPOS_CURR, 105 DOCPOS_END, 106 DOCPOS_OTHERSTART, 107 DOCPOS_OTHEREND 108 }; 109 110 SW_DLLPUBLIC SwWhichPara GetfnParaCurr(); 111 SW_DLLPUBLIC SwPosPara GetfnParaStart(); 112 SW_DLLPUBLIC SwPosPara GetfnParaEnd(); 113 114 SW_DLLPUBLIC SwWhichTable GetfnTablePrev(); 115 SW_DLLPUBLIC SwWhichTable GetfnTableCurr(); 116 SW_DLLPUBLIC SwPosTable GetfnTableStart(); 117 SW_DLLPUBLIC SwPosTable GetfnTableEnd(); 118 119 #endif // _CSHTYP_HXX 120