xref: /AOO41X/main/sw/source/ui/shells/txtcrsr.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_sw.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir #include <sfx2/request.hxx>
33*cdf0e10cSrcweir #include <svl/eitem.hxx>
34*cdf0e10cSrcweir #ifndef __SBX_SBXVARIABLE_HXX //autogen
35*cdf0e10cSrcweir #include <basic/sbxvar.hxx>
36*cdf0e10cSrcweir #endif
37*cdf0e10cSrcweir #include <sfx2/viewfrm.hxx>
38*cdf0e10cSrcweir #include <sfx2/bindings.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #ifndef _VIEW_HXX
41*cdf0e10cSrcweir #include <view.hxx>
42*cdf0e10cSrcweir #endif
43*cdf0e10cSrcweir #include <wrtsh.hxx>
44*cdf0e10cSrcweir #ifndef _TEXTSH_HXX
45*cdf0e10cSrcweir #include <textsh.hxx>
46*cdf0e10cSrcweir #endif
47*cdf0e10cSrcweir #include <num.hxx>
48*cdf0e10cSrcweir #include <edtwin.hxx>
49*cdf0e10cSrcweir #include <crsskip.hxx>
50*cdf0e10cSrcweir #include <doc.hxx>
51*cdf0e10cSrcweir #include <docsh.hxx>
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir #ifndef _CMDID_H
54*cdf0e10cSrcweir #include <cmdid.h>
55*cdf0e10cSrcweir #endif
56*cdf0e10cSrcweir #include <globals.h>
57*cdf0e10cSrcweir #ifndef _GLOBALS_HRC
58*cdf0e10cSrcweir #include <globals.hrc>
59*cdf0e10cSrcweir #endif
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir #include <svx/svdouno.hxx>
62*cdf0e10cSrcweir #include <svx/fmshell.hxx>
63*cdf0e10cSrcweir #include <svx/sdrobjectfilter.hxx>
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir using namespace ::com::sun::star;
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir void SwTextShell::ExecBasicMove(SfxRequest &rReq)
68*cdf0e10cSrcweir {
69*cdf0e10cSrcweir 	SwWrtShell &rSh = GetShell();
70*cdf0e10cSrcweir     GetView().GetEditWin().FlushInBuffer();
71*cdf0e10cSrcweir     const SfxItemSet *pArgs = rReq.GetArgs();
72*cdf0e10cSrcweir     sal_Bool bSelect = sal_False;
73*cdf0e10cSrcweir     sal_uInt16 nCount = 1;
74*cdf0e10cSrcweir     if(pArgs)
75*cdf0e10cSrcweir     {
76*cdf0e10cSrcweir 		const SfxPoolItem *pItem;
77*cdf0e10cSrcweir 		if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, sal_True, &pItem))
78*cdf0e10cSrcweir 			nCount = ((const SfxInt16Item *)pItem)->GetValue();
79*cdf0e10cSrcweir 		if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, sal_True, &pItem))
80*cdf0e10cSrcweir 			bSelect = ((const SfxBoolItem *)pItem)->GetValue();
81*cdf0e10cSrcweir 	}
82*cdf0e10cSrcweir     switch(rReq.GetSlot())
83*cdf0e10cSrcweir 	{
84*cdf0e10cSrcweir         case FN_CHAR_LEFT_SEL:  rReq.SetSlot( FN_CHAR_LEFT );  bSelect = sal_True; break;
85*cdf0e10cSrcweir         case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = sal_True; break;
86*cdf0e10cSrcweir         case FN_LINE_UP_SEL:    rReq.SetSlot( FN_LINE_UP );    bSelect = sal_True; break;
87*cdf0e10cSrcweir         case FN_LINE_DOWN_SEL:  rReq.SetSlot( FN_LINE_DOWN );  bSelect = sal_True; break;
88*cdf0e10cSrcweir 	}
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir     uno::Reference< frame::XDispatchRecorder > xRecorder =
91*cdf0e10cSrcweir             GetView().GetViewFrame()->GetBindings().GetRecorder();
92*cdf0e10cSrcweir     if ( xRecorder.is() )
93*cdf0e10cSrcweir     {
94*cdf0e10cSrcweir         rReq.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nCount) );
95*cdf0e10cSrcweir 		rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
96*cdf0e10cSrcweir     }
97*cdf0e10cSrcweir     sal_uInt16 nSlot = rReq.GetSlot();
98*cdf0e10cSrcweir     rReq.Done();
99*cdf0e10cSrcweir     // Get EditWin before calling the move functions (shell change may occur!)
100*cdf0e10cSrcweir     SwEditWin& rTmpEditWin = GetView().GetEditWin();
101*cdf0e10cSrcweir     for( sal_uInt16 i = 0; i < nCount; i++ )
102*cdf0e10cSrcweir 	{
103*cdf0e10cSrcweir         switch(nSlot)
104*cdf0e10cSrcweir         {
105*cdf0e10cSrcweir         case FN_CHAR_LEFT:  rSh.Left( CRSR_SKIP_CELLS,  bSelect, 1, sal_False, sal_True ); break;
106*cdf0e10cSrcweir         case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
107*cdf0e10cSrcweir         case FN_LINE_UP:    rSh.Up   ( bSelect, 1 ); break;
108*cdf0e10cSrcweir         case FN_LINE_DOWN:  rSh.Down ( bSelect, 1 ); break;
109*cdf0e10cSrcweir         default:            ASSERT(sal_False, falscher Dispatcher); return;
110*cdf0e10cSrcweir         }
111*cdf0e10cSrcweir     }
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir     //#i42732# - notify the edit window that from now on we do not use the input language
114*cdf0e10cSrcweir     rTmpEditWin.SetUseInputLanguage( sal_False );
115*cdf0e10cSrcweir }
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir void SwTextShell::ExecMove(SfxRequest &rReq)
118*cdf0e10cSrcweir {
119*cdf0e10cSrcweir 	SwWrtShell &rSh = GetShell();
120*cdf0e10cSrcweir     SwEditWin& rTmpEditWin = GetView().GetEditWin();
121*cdf0e10cSrcweir     rTmpEditWin.FlushInBuffer();
122*cdf0e10cSrcweir 
123*cdf0e10cSrcweir 	sal_uInt16 nSlot = rReq.GetSlot();
124*cdf0e10cSrcweir 	sal_Bool bRet = sal_False;
125*cdf0e10cSrcweir 	switch ( nSlot )
126*cdf0e10cSrcweir 	{
127*cdf0e10cSrcweir 		case FN_START_OF_LINE_SEL:
128*cdf0e10cSrcweir 		case FN_START_OF_LINE:		bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, sal_False );
129*cdf0e10cSrcweir 		break;
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir 		case FN_END_OF_LINE_SEL:
132*cdf0e10cSrcweir 		case FN_END_OF_LINE:		bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, sal_False );
133*cdf0e10cSrcweir 		break;
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir 		case FN_START_OF_DOCUMENT_SEL:
136*cdf0e10cSrcweir 		case FN_START_OF_DOCUMENT:	bRet = rSh.SttDoc	   ( FN_START_OF_DOCUMENT_SEL == nSlot);
137*cdf0e10cSrcweir 		break;
138*cdf0e10cSrcweir 
139*cdf0e10cSrcweir 		case FN_END_OF_DOCUMENT_SEL:
140*cdf0e10cSrcweir 		case FN_END_OF_DOCUMENT:	bRet = rSh.EndDoc( FN_END_OF_DOCUMENT_SEL == nSlot );
141*cdf0e10cSrcweir 		break;
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir 		case FN_SELECT_WORD:			bRet = rSh.SelNearestWrd();	break;
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir         case SID_SELECTALL:             bRet = 0 != rSh.SelAll();   break;
146*cdf0e10cSrcweir 		default:					ASSERT(sal_False, falscher Dispatcher); return;
147*cdf0e10cSrcweir 	}
148*cdf0e10cSrcweir 
149*cdf0e10cSrcweir 	if ( bRet )
150*cdf0e10cSrcweir 		rReq.Done();
151*cdf0e10cSrcweir 	else
152*cdf0e10cSrcweir 		rReq.Ignore();
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir     //#i42732# - notify the edit window that from now on we do not use the input language
155*cdf0e10cSrcweir     rTmpEditWin.SetUseInputLanguage( sal_False );
156*cdf0e10cSrcweir }
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir void SwTextShell::ExecMovePage(SfxRequest &rReq)
159*cdf0e10cSrcweir {
160*cdf0e10cSrcweir 	SwWrtShell &rSh = GetShell();
161*cdf0e10cSrcweir     GetView().GetEditWin().FlushInBuffer();
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir 	sal_uInt16 nSlot = rReq.GetSlot();
164*cdf0e10cSrcweir 	switch( nSlot )
165*cdf0e10cSrcweir 	{
166*cdf0e10cSrcweir 		case FN_START_OF_NEXT_PAGE_SEL :
167*cdf0e10cSrcweir 		case FN_START_OF_NEXT_PAGE: rSh.SttNxtPg( FN_START_OF_NEXT_PAGE_SEL == nSlot ); break;
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir 		case FN_END_OF_NEXT_PAGE_SEL:
170*cdf0e10cSrcweir 		case FN_END_OF_NEXT_PAGE:	rSh.EndNxtPg( FN_END_OF_NEXT_PAGE_SEL == nSlot ); break;
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir 		case FN_START_OF_PREV_PAGE_SEL:
173*cdf0e10cSrcweir 		case FN_START_OF_PREV_PAGE: rSh.SttPrvPg( FN_START_OF_PREV_PAGE_SEL == nSlot ); break;
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir 		case FN_END_OF_PREV_PAGE_SEL:
176*cdf0e10cSrcweir 		case FN_END_OF_PREV_PAGE:   rSh.EndPrvPg( FN_END_OF_PREV_PAGE_SEL == nSlot ); break;
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir 		case FN_START_OF_PAGE_SEL:
179*cdf0e10cSrcweir 		case FN_START_OF_PAGE:      rSh.SttPg	( FN_START_OF_PAGE_SEL == nSlot ); break;
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir 		case FN_END_OF_PAGE_SEL:
182*cdf0e10cSrcweir 		case FN_END_OF_PAGE:        rSh.EndPg	( FN_END_OF_PAGE_SEL == nSlot ); break;
183*cdf0e10cSrcweir 		default:					ASSERT(sal_False, falscher Dispatcher); return;
184*cdf0e10cSrcweir 	}
185*cdf0e10cSrcweir     rReq.Done();
186*cdf0e10cSrcweir }
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir void SwTextShell::ExecMoveCol(SfxRequest &rReq)
190*cdf0e10cSrcweir {
191*cdf0e10cSrcweir 	SwWrtShell &rSh = GetShell();
192*cdf0e10cSrcweir 	switch ( rReq.GetSlot() )
193*cdf0e10cSrcweir 	{
194*cdf0e10cSrcweir 		case FN_START_OF_COLUMN:	  rSh.StartOfColumn	   ( sal_False ); break;
195*cdf0e10cSrcweir 		case FN_END_OF_COLUMN:		  rSh.EndOfColumn	   ( sal_False ); break;
196*cdf0e10cSrcweir 		case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( sal_False ) ; break;
197*cdf0e10cSrcweir 		case FN_END_OF_NEXT_COLUMN:	  rSh.EndOfNextColumn  ( sal_False ); break;
198*cdf0e10cSrcweir 		case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( sal_False ); break;
199*cdf0e10cSrcweir 		case FN_END_OF_PREV_COLUMN:	  rSh.EndOfPrevColumn  ( sal_False ); break;
200*cdf0e10cSrcweir 		default:					  ASSERT(sal_False, falscher Dispatcher); return;
201*cdf0e10cSrcweir 	}
202*cdf0e10cSrcweir     rReq.Done();
203*cdf0e10cSrcweir }
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
206*cdf0e10cSrcweir {
207*cdf0e10cSrcweir 	SwWrtShell &rSh = GetShell();
208*cdf0e10cSrcweir     GetView().GetEditWin().FlushInBuffer();
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 	sal_uInt16 nSlot = rReq.GetSlot();
211*cdf0e10cSrcweir 	sal_Bool bRet = sal_False;
212*cdf0e10cSrcweir 	switch ( nSlot )
213*cdf0e10cSrcweir 	{
214*cdf0e10cSrcweir 		case FN_NEXT_WORD_SEL:
215*cdf0e10cSrcweir 		case FN_NEXT_WORD:		bRet = rSh.NxtWrd( FN_NEXT_WORD_SEL == nSlot );
216*cdf0e10cSrcweir 		break;
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir 		case FN_START_OF_PARA_SEL:
219*cdf0e10cSrcweir 		case FN_START_OF_PARA:  bRet = rSh.SttPara( FN_START_OF_PARA_SEL == nSlot );
220*cdf0e10cSrcweir 		break;
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 		case FN_END_OF_PARA_SEL:
223*cdf0e10cSrcweir 		case FN_END_OF_PARA:    bRet = rSh.EndPara( FN_END_OF_PARA_SEL == nSlot );
224*cdf0e10cSrcweir 		break;
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir 		case FN_PREV_WORD_SEL:
227*cdf0e10cSrcweir 		case FN_PREV_WORD:      bRet = rSh.PrvWrd( FN_PREV_WORD_SEL == nSlot );
228*cdf0e10cSrcweir 		break;
229*cdf0e10cSrcweir 
230*cdf0e10cSrcweir 		case FN_NEXT_SENT_SEL:
231*cdf0e10cSrcweir 		case FN_NEXT_SENT:      bRet = rSh.FwdSentence( FN_NEXT_SENT_SEL == nSlot );
232*cdf0e10cSrcweir 		break;
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir 		case FN_PREV_SENT_SEL:
235*cdf0e10cSrcweir 		case FN_PREV_SENT:      bRet = rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot );
236*cdf0e10cSrcweir 		break;
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 		case FN_NEXT_PARA:      bRet = rSh.FwdPara    ( sal_False );
239*cdf0e10cSrcweir 		break;
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir 		case FN_PREV_PARA:      bRet = rSh.BwdPara    ( sal_False );
242*cdf0e10cSrcweir 		break;
243*cdf0e10cSrcweir 		default:                ASSERT(sal_False, falscher Dispatcher); return;
244*cdf0e10cSrcweir 	}
245*cdf0e10cSrcweir     rReq.Done();
246*cdf0e10cSrcweir }
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
249*cdf0e10cSrcweir {
250*cdf0e10cSrcweir 	SwWrtShell &rSh = GetShell();
251*cdf0e10cSrcweir 	sal_uInt16 nSlot = rReq.GetSlot();
252*cdf0e10cSrcweir 	sal_Bool bSetRetVal = sal_True, bRet = sal_True;
253*cdf0e10cSrcweir 	switch ( nSlot )
254*cdf0e10cSrcweir 	{
255*cdf0e10cSrcweir         case SID_FM_TOGGLECONTROLFOCUS:
256*cdf0e10cSrcweir             {
257*cdf0e10cSrcweir                 const SwDoc* pDoc = rSh.GetDoc();
258*cdf0e10cSrcweir                 const SwDocShell* pDocShell = pDoc ? pDoc->GetDocShell() : NULL;
259*cdf0e10cSrcweir                 const SwView* pView = pDocShell ? pDocShell->GetView() : NULL;
260*cdf0e10cSrcweir                 const FmFormShell* pFormShell = pView ? pView->GetFormShell() : NULL;
261*cdf0e10cSrcweir                 SdrView* pDrawView = pView ? pView->GetDrawView() : NULL;
262*cdf0e10cSrcweir                 Window* pWindow = pView ? pView->GetWrtShell().GetWin() : NULL;
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir                 OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::ExecMoveMisc: no chance!" );
265*cdf0e10cSrcweir                 if ( !pFormShell || !pDrawView || !pWindow )
266*cdf0e10cSrcweir                     break;
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir                 ::std::auto_ptr< ::svx::ISdrObjectFilter > pFilter( pFormShell->CreateFocusableControlFilter(
269*cdf0e10cSrcweir                     *pDrawView, *pWindow ) );
270*cdf0e10cSrcweir                 if ( !pFilter.get() )
271*cdf0e10cSrcweir                     break;
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir                 const SdrObject* pNearestControl = rSh.GetBestObject( sal_True, GOTOOBJ_DRAW_CONTROL, sal_False, pFilter.get() );
274*cdf0e10cSrcweir                 if ( !pNearestControl )
275*cdf0e10cSrcweir                     break;
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir                 const SdrUnoObj* pUnoObject = dynamic_cast< const SdrUnoObj* >( pNearestControl );
278*cdf0e10cSrcweir                 OSL_ENSURE( pUnoObject, "SwTextShell::ExecMoveMisc: GetBestObject returned nonsense!" );
279*cdf0e10cSrcweir                 if ( !pUnoObject )
280*cdf0e10cSrcweir                     break;
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir                 pFormShell->ToggleControlFocus( *pUnoObject, *pDrawView, *pWindow );
283*cdf0e10cSrcweir             }
284*cdf0e10cSrcweir             break;
285*cdf0e10cSrcweir 		case FN_CNTNT_TO_NEXT_FRAME:
286*cdf0e10cSrcweir             bRet = rSh.GotoObj(sal_True, GOTOOBJ_GOTO_ANY);
287*cdf0e10cSrcweir 			if(bRet)
288*cdf0e10cSrcweir 			{
289*cdf0e10cSrcweir 				rSh.HideCrsr();
290*cdf0e10cSrcweir 				rSh.EnterSelFrmMode();
291*cdf0e10cSrcweir 			}
292*cdf0e10cSrcweir 		break;
293*cdf0e10cSrcweir 		case FN_NEXT_FOOTNOTE:
294*cdf0e10cSrcweir 			rSh.MoveCrsr();
295*cdf0e10cSrcweir 			bRet = rSh.GotoNextFtnAnchor();
296*cdf0e10cSrcweir 			break;
297*cdf0e10cSrcweir 		case FN_PREV_FOOTNOTE:
298*cdf0e10cSrcweir 			rSh.MoveCrsr();
299*cdf0e10cSrcweir 			bRet = rSh.GotoPrevFtnAnchor();
300*cdf0e10cSrcweir 			break;
301*cdf0e10cSrcweir 		case FN_TO_HEADER:
302*cdf0e10cSrcweir 			rSh.MoveCrsr();
303*cdf0e10cSrcweir 			if ( FRMTYPE_HEADER & rSh.GetFrmType(0,sal_False) )
304*cdf0e10cSrcweir 				rSh.SttPg();
305*cdf0e10cSrcweir 			else
306*cdf0e10cSrcweir 				rSh.GotoHeaderTxt();
307*cdf0e10cSrcweir 			bSetRetVal = sal_False;
308*cdf0e10cSrcweir 			break;
309*cdf0e10cSrcweir 		case FN_TO_FOOTER:
310*cdf0e10cSrcweir 			rSh.MoveCrsr();
311*cdf0e10cSrcweir 			if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,sal_False) )
312*cdf0e10cSrcweir 				rSh.EndPg();
313*cdf0e10cSrcweir 			else
314*cdf0e10cSrcweir 				rSh.GotoFooterTxt();
315*cdf0e10cSrcweir 			bSetRetVal = sal_False;
316*cdf0e10cSrcweir 			break;
317*cdf0e10cSrcweir 		case FN_FOOTNOTE_TO_ANCHOR:
318*cdf0e10cSrcweir 			rSh.MoveCrsr();
319*cdf0e10cSrcweir 			if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,sal_False) )
320*cdf0e10cSrcweir 				rSh.GotoFtnAnchor();
321*cdf0e10cSrcweir 			else
322*cdf0e10cSrcweir 				rSh.GotoFtnTxt();
323*cdf0e10cSrcweir 			bSetRetVal = sal_False;
324*cdf0e10cSrcweir 			break;
325*cdf0e10cSrcweir         case FN_TO_FOOTNOTE_AREA :
326*cdf0e10cSrcweir             rSh.GotoFtnTxt();
327*cdf0e10cSrcweir         break;
328*cdf0e10cSrcweir 		case FN_PREV_TABLE:
329*cdf0e10cSrcweir 			bRet = rSh.MoveTable( fnTablePrev, fnTableStart);
330*cdf0e10cSrcweir 			break;
331*cdf0e10cSrcweir 		case FN_NEXT_TABLE:
332*cdf0e10cSrcweir 			bRet = rSh.MoveTable(fnTableNext, fnTableStart);
333*cdf0e10cSrcweir 			break;
334*cdf0e10cSrcweir 		case FN_GOTO_NEXT_REGION :
335*cdf0e10cSrcweir 			bRet = rSh.MoveRegion(fnRegionNext, fnRegionStart);
336*cdf0e10cSrcweir 		break;
337*cdf0e10cSrcweir 		case FN_GOTO_PREV_REGION :
338*cdf0e10cSrcweir 			bRet = rSh.MoveRegion(fnRegionPrev, fnRegionStart);
339*cdf0e10cSrcweir 		break;
340*cdf0e10cSrcweir 
341*cdf0e10cSrcweir 		case FN_NEXT_TOXMARK:
342*cdf0e10cSrcweir 			bRet = rSh.GotoNxtPrvTOXMark( sal_True );
343*cdf0e10cSrcweir 			break;
344*cdf0e10cSrcweir 		case FN_PREV_TOXMARK:
345*cdf0e10cSrcweir 			bRet = rSh.GotoNxtPrvTOXMark( sal_False );
346*cdf0e10cSrcweir 			break;
347*cdf0e10cSrcweir 		case FN_NEXT_TBLFML:
348*cdf0e10cSrcweir 			bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_False );
349*cdf0e10cSrcweir 			break;
350*cdf0e10cSrcweir 		case FN_PREV_TBLFML:
351*cdf0e10cSrcweir 			bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_False );
352*cdf0e10cSrcweir 			break;
353*cdf0e10cSrcweir 		case FN_NEXT_TBLFML_ERR:
354*cdf0e10cSrcweir 			bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_True );
355*cdf0e10cSrcweir 			break;
356*cdf0e10cSrcweir 		case FN_PREV_TBLFML_ERR:
357*cdf0e10cSrcweir 			bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_True );
358*cdf0e10cSrcweir 			break;
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir 		default:
361*cdf0e10cSrcweir 			ASSERT(sal_False, falscher Dispatcher);
362*cdf0e10cSrcweir 			return;
363*cdf0e10cSrcweir 	}
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 	if( bSetRetVal )
366*cdf0e10cSrcweir 		rReq.SetReturnValue(SfxBoolItem( nSlot, bRet ));
367*cdf0e10cSrcweir     rReq.Done();
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir }
370*cdf0e10cSrcweir 
371