1*b3f79822SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*b3f79822SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*b3f79822SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*b3f79822SAndrew Rist * distributed with this work for additional information 6*b3f79822SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*b3f79822SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*b3f79822SAndrew Rist * "License"); you may not use this file except in compliance 9*b3f79822SAndrew Rist * with the License. You may obtain a copy of the License at 10*b3f79822SAndrew Rist * 11*b3f79822SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*b3f79822SAndrew Rist * 13*b3f79822SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*b3f79822SAndrew Rist * software distributed under the License is distributed on an 15*b3f79822SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b3f79822SAndrew Rist * KIND, either express or implied. See the License for the 17*b3f79822SAndrew Rist * specific language governing permissions and limitations 18*b3f79822SAndrew Rist * under the License. 19*b3f79822SAndrew Rist * 20*b3f79822SAndrew Rist *************************************************************/ 21*b3f79822SAndrew Rist 22*b3f79822SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_sc.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir 28cdf0e10cSrcweir 29cdf0e10cSrcweir //------------------------------------------------------------------ 30cdf0e10cSrcweir 31cdf0e10cSrcweir #ifdef _MSC_VER 32cdf0e10cSrcweir #pragma optimize ("", off) 33cdf0e10cSrcweir #endif 34cdf0e10cSrcweir 35cdf0e10cSrcweir // INCLUDE --------------------------------------------------------------- 36cdf0e10cSrcweir 37cdf0e10cSrcweir #include <sfx2/request.hxx> 38cdf0e10cSrcweir 39cdf0e10cSrcweir #include "cellsh.hxx" 40cdf0e10cSrcweir #include "tabvwsh.hxx" 41cdf0e10cSrcweir #include "global.hxx" 42cdf0e10cSrcweir #include "scmod.hxx" 43cdf0e10cSrcweir #include "inputhdl.hxx" 44cdf0e10cSrcweir #include "inputwin.hxx" 45cdf0e10cSrcweir #include "document.hxx" 46cdf0e10cSrcweir #include "sc.hrc" 47cdf0e10cSrcweir 48cdf0e10cSrcweir 49cdf0e10cSrcweir //------------------------------------------------------------------ 50cdf0e10cSrcweir 51cdf0e10cSrcweir #define IS_AVAILABLE(WhichId,ppItem) \ 52cdf0e10cSrcweir (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir void ScCellShell::ExecuteCursor( SfxRequest& rReq ) 56cdf0e10cSrcweir { 57cdf0e10cSrcweir ScViewData* pData = GetViewData(); 58cdf0e10cSrcweir ScTabViewShell* pTabViewShell = pData->GetViewShell(); 59cdf0e10cSrcweir const SfxItemSet* pReqArgs = rReq.GetArgs(); 60cdf0e10cSrcweir sal_uInt16 nSlotId = rReq.GetSlot(); 61cdf0e10cSrcweir SCsCOLROW nRepeat = 1; 62cdf0e10cSrcweir sal_Bool bSel = sal_False; 63cdf0e10cSrcweir sal_Bool bKeep = sal_False; 64cdf0e10cSrcweir 65cdf0e10cSrcweir if ( pReqArgs != NULL ) 66cdf0e10cSrcweir { 67cdf0e10cSrcweir const SfxPoolItem* pItem; 68cdf0e10cSrcweir if( IS_AVAILABLE( FN_PARAM_1, &pItem ) ) 69cdf0e10cSrcweir nRepeat = static_cast<SCsCOLROW>(((const SfxInt16Item*)pItem)->GetValue()); 70cdf0e10cSrcweir if( IS_AVAILABLE( FN_PARAM_2, &pItem ) ) 71cdf0e10cSrcweir bSel = ((const SfxBoolItem*)pItem)->GetValue(); 72cdf0e10cSrcweir } 73cdf0e10cSrcweir else 74cdf0e10cSrcweir { 75cdf0e10cSrcweir // evaluate locked selection mode 76cdf0e10cSrcweir 77cdf0e10cSrcweir sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers(); 78cdf0e10cSrcweir if ( nLocked & KEY_SHIFT ) 79cdf0e10cSrcweir bSel = sal_True; // EXT 80cdf0e10cSrcweir else if ( nLocked & KEY_MOD1 ) 81cdf0e10cSrcweir { 82cdf0e10cSrcweir // ADD mode: keep the selection, start a new block when marking with shift again 83cdf0e10cSrcweir bKeep = sal_True; 84cdf0e10cSrcweir pTabViewShell->SetNewStartIfMarking(); 85cdf0e10cSrcweir } 86cdf0e10cSrcweir } 87cdf0e10cSrcweir 88cdf0e10cSrcweir SCsCOLROW nRTLSign = 1; 89cdf0e10cSrcweir if ( pData->GetDocument()->IsLayoutRTL( pData->GetTabNo() ) ) 90cdf0e10cSrcweir { 91cdf0e10cSrcweir //! evaluate cursor movement option? 92cdf0e10cSrcweir nRTLSign = -1; 93cdf0e10cSrcweir } 94cdf0e10cSrcweir 95cdf0e10cSrcweir // einmal extra, damit der Cursor bei ExecuteInputDirect nicht zuoft gemalt wird: 96cdf0e10cSrcweir pTabViewShell->HideAllCursors(); 97cdf0e10cSrcweir 98cdf0e10cSrcweir //OS: einmal fuer alle wird doch reichen! 99cdf0e10cSrcweir pTabViewShell->ExecuteInputDirect(); 100cdf0e10cSrcweir switch ( nSlotId ) 101cdf0e10cSrcweir { 102cdf0e10cSrcweir case SID_CURSORDOWN: 103cdf0e10cSrcweir pTabViewShell->MoveCursorRel( 0, nRepeat, SC_FOLLOW_LINE, bSel, bKeep ); 104cdf0e10cSrcweir break; 105cdf0e10cSrcweir 106cdf0e10cSrcweir case SID_CURSORBLKDOWN: 107cdf0e10cSrcweir pTabViewShell->MoveCursorArea( 0, nRepeat, SC_FOLLOW_JUMP, bSel, bKeep ); 108cdf0e10cSrcweir break; 109cdf0e10cSrcweir 110cdf0e10cSrcweir case SID_CURSORUP: 111cdf0e10cSrcweir pTabViewShell->MoveCursorRel( 0, -nRepeat, SC_FOLLOW_LINE, bSel, bKeep ); 112cdf0e10cSrcweir break; 113cdf0e10cSrcweir 114cdf0e10cSrcweir case SID_CURSORBLKUP: 115cdf0e10cSrcweir pTabViewShell->MoveCursorArea( 0, -nRepeat, SC_FOLLOW_JUMP, bSel, bKeep ); 116cdf0e10cSrcweir break; 117cdf0e10cSrcweir 118cdf0e10cSrcweir case SID_CURSORLEFT: 119cdf0e10cSrcweir pTabViewShell->MoveCursorRel( static_cast<SCsCOL>(-nRepeat * nRTLSign), 0, SC_FOLLOW_LINE, bSel, bKeep ); 120cdf0e10cSrcweir break; 121cdf0e10cSrcweir 122cdf0e10cSrcweir case SID_CURSORBLKLEFT: 123cdf0e10cSrcweir pTabViewShell->MoveCursorArea( static_cast<SCsCOL>(-nRepeat * nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep ); 124cdf0e10cSrcweir break; 125cdf0e10cSrcweir 126cdf0e10cSrcweir case SID_CURSORRIGHT: 127cdf0e10cSrcweir pTabViewShell->MoveCursorRel( static_cast<SCsCOL>(nRepeat * nRTLSign), 0, SC_FOLLOW_LINE, bSel, bKeep ); 128cdf0e10cSrcweir break; 129cdf0e10cSrcweir 130cdf0e10cSrcweir case SID_CURSORBLKRIGHT: 131cdf0e10cSrcweir pTabViewShell->MoveCursorArea( static_cast<SCsCOL>(nRepeat * nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep ); 132cdf0e10cSrcweir break; 133cdf0e10cSrcweir 134cdf0e10cSrcweir case SID_CURSORPAGEDOWN: 135cdf0e10cSrcweir pTabViewShell->MoveCursorPage( 0, nRepeat, SC_FOLLOW_FIX, bSel, bKeep ); 136cdf0e10cSrcweir break; 137cdf0e10cSrcweir 138cdf0e10cSrcweir case SID_CURSORPAGEUP: 139cdf0e10cSrcweir pTabViewShell->MoveCursorPage( 0, -nRepeat, SC_FOLLOW_FIX, bSel, bKeep ); 140cdf0e10cSrcweir break; 141cdf0e10cSrcweir 142cdf0e10cSrcweir case SID_CURSORPAGERIGHT_: //XXX !!! 143cdf0e10cSrcweir pTabViewShell->MoveCursorPage( static_cast<SCsCOL>(nRepeat), 0, SC_FOLLOW_FIX, bSel, bKeep ); 144cdf0e10cSrcweir break; 145cdf0e10cSrcweir 146cdf0e10cSrcweir case SID_CURSORPAGELEFT_: //XXX !!! 147cdf0e10cSrcweir pTabViewShell->MoveCursorPage( static_cast<SCsCOL>(-nRepeat), 0, SC_FOLLOW_FIX, bSel, bKeep ); 148cdf0e10cSrcweir break; 149cdf0e10cSrcweir 150cdf0e10cSrcweir default: 151cdf0e10cSrcweir DBG_ERROR("Unbekannte Message bei ViewShell (Cursor)"); 152cdf0e10cSrcweir return; 153cdf0e10cSrcweir } 154cdf0e10cSrcweir 155cdf0e10cSrcweir pTabViewShell->ShowAllCursors(); 156cdf0e10cSrcweir 157cdf0e10cSrcweir rReq.AppendItem( SfxInt16Item(FN_PARAM_1, static_cast<sal_Int16>(nRepeat)) ); 158cdf0e10cSrcweir rReq.AppendItem( SfxBoolItem(FN_PARAM_2, bSel) ); 159cdf0e10cSrcweir rReq.Done(); 160cdf0e10cSrcweir } 161cdf0e10cSrcweir 162cdf0e10cSrcweir void ScCellShell::GetStateCursor( SfxItemSet& /* rSet */ ) 163cdf0e10cSrcweir { 164cdf0e10cSrcweir } 165cdf0e10cSrcweir 166cdf0e10cSrcweir void ScCellShell::ExecuteCursorSel( SfxRequest& rReq ) 167cdf0e10cSrcweir { 168cdf0e10cSrcweir const SfxItemSet* pReqArgs = rReq.GetArgs(); 169cdf0e10cSrcweir sal_uInt16 nSlotId = rReq.GetSlot(); 170cdf0e10cSrcweir short nRepeat = 1; 171cdf0e10cSrcweir 172cdf0e10cSrcweir if ( pReqArgs != NULL ) 173cdf0e10cSrcweir { 174cdf0e10cSrcweir const SfxPoolItem* pItem; 175cdf0e10cSrcweir if( IS_AVAILABLE( FN_PARAM_1, &pItem ) ) 176cdf0e10cSrcweir nRepeat = ((const SfxInt16Item*)pItem)->GetValue(); 177cdf0e10cSrcweir } 178cdf0e10cSrcweir 179cdf0e10cSrcweir switch ( nSlotId ) 180cdf0e10cSrcweir { 181cdf0e10cSrcweir case SID_CURSORDOWN_SEL: rReq.SetSlot( SID_CURSORDOWN ); break; 182cdf0e10cSrcweir case SID_CURSORBLKDOWN_SEL: rReq.SetSlot( SID_CURSORBLKDOWN ); break; 183cdf0e10cSrcweir case SID_CURSORUP_SEL: rReq.SetSlot( SID_CURSORUP ); break; 184cdf0e10cSrcweir case SID_CURSORBLKUP_SEL: rReq.SetSlot( SID_CURSORBLKUP ); break; 185cdf0e10cSrcweir case SID_CURSORLEFT_SEL: rReq.SetSlot( SID_CURSORLEFT ); break; 186cdf0e10cSrcweir case SID_CURSORBLKLEFT_SEL: rReq.SetSlot( SID_CURSORBLKLEFT ); break; 187cdf0e10cSrcweir case SID_CURSORRIGHT_SEL: rReq.SetSlot( SID_CURSORRIGHT ); break; 188cdf0e10cSrcweir case SID_CURSORBLKRIGHT_SEL: rReq.SetSlot( SID_CURSORBLKRIGHT ); break; 189cdf0e10cSrcweir case SID_CURSORPAGEDOWN_SEL: rReq.SetSlot( SID_CURSORPAGEDOWN ); break; 190cdf0e10cSrcweir case SID_CURSORPAGEUP_SEL: rReq.SetSlot( SID_CURSORPAGEUP ); break; 191cdf0e10cSrcweir case SID_CURSORPAGERIGHT_SEL: rReq.SetSlot( SID_CURSORPAGERIGHT_ ); break; 192cdf0e10cSrcweir case SID_CURSORPAGELEFT_SEL: rReq.SetSlot( SID_CURSORPAGELEFT_ ); break; 193cdf0e10cSrcweir default: 194cdf0e10cSrcweir DBG_ERROR("Unbekannte Message bei ViewShell (CursorSel)"); 195cdf0e10cSrcweir return; 196cdf0e10cSrcweir } 197cdf0e10cSrcweir rReq.AppendItem( SfxInt16Item(FN_PARAM_1, nRepeat ) ); 198cdf0e10cSrcweir rReq.AppendItem( SfxBoolItem(FN_PARAM_2, sal_True) ); 199cdf0e10cSrcweir ExecuteSlot( rReq, GetInterface() ); 200cdf0e10cSrcweir } 201cdf0e10cSrcweir 202cdf0e10cSrcweir void ScCellShell::ExecuteMove( SfxRequest& rReq ) 203cdf0e10cSrcweir { 204cdf0e10cSrcweir ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); 205cdf0e10cSrcweir sal_uInt16 nSlotId = rReq.GetSlot(); 206cdf0e10cSrcweir 207cdf0e10cSrcweir if(nSlotId != SID_CURSORTOPOFSCREEN && nSlotId != SID_CURSORENDOFSCREEN) 208cdf0e10cSrcweir pTabViewShell->ExecuteInputDirect(); 209cdf0e10cSrcweir switch ( nSlotId ) 210cdf0e10cSrcweir { 211cdf0e10cSrcweir case SID_NEXT_TABLE: 212cdf0e10cSrcweir case SID_NEXT_TABLE_SEL: 213cdf0e10cSrcweir pTabViewShell->SelectNextTab( 1, (nSlotId == SID_NEXT_TABLE_SEL) ); 214cdf0e10cSrcweir break; 215cdf0e10cSrcweir 216cdf0e10cSrcweir case SID_PREV_TABLE: 217cdf0e10cSrcweir case SID_PREV_TABLE_SEL: 218cdf0e10cSrcweir pTabViewShell->SelectNextTab( -1, (nSlotId == SID_PREV_TABLE_SEL) ); 219cdf0e10cSrcweir break; 220cdf0e10cSrcweir 221cdf0e10cSrcweir // Cursorbewegungen in Bloecken gehen nicht von Basic aus, 222cdf0e10cSrcweir // weil das ScSbxRange-Objekt bei Eingaben die Markierung veraendert 223cdf0e10cSrcweir 224cdf0e10cSrcweir case SID_NEXT_UNPROTECT: 225cdf0e10cSrcweir pTabViewShell->FindNextUnprot( sal_False, !rReq.IsAPI() ); 226cdf0e10cSrcweir break; 227cdf0e10cSrcweir 228cdf0e10cSrcweir case SID_PREV_UNPROTECT: 229cdf0e10cSrcweir pTabViewShell->FindNextUnprot( sal_True, !rReq.IsAPI() ); 230cdf0e10cSrcweir break; 231cdf0e10cSrcweir 232cdf0e10cSrcweir case SID_CURSORENTERUP: 233cdf0e10cSrcweir if (rReq.IsAPI()) 234cdf0e10cSrcweir pTabViewShell->MoveCursorRel( 0, -1, SC_FOLLOW_LINE, sal_False ); 235cdf0e10cSrcweir else 236cdf0e10cSrcweir pTabViewShell->MoveCursorEnter( sal_True ); 237cdf0e10cSrcweir break; 238cdf0e10cSrcweir 239cdf0e10cSrcweir case SID_CURSORENTERDOWN: 240cdf0e10cSrcweir if (rReq.IsAPI()) 241cdf0e10cSrcweir pTabViewShell->MoveCursorRel( 0, 1, SC_FOLLOW_LINE, sal_False ); 242cdf0e10cSrcweir else 243cdf0e10cSrcweir pTabViewShell->MoveCursorEnter( sal_False ); 244cdf0e10cSrcweir break; 245cdf0e10cSrcweir 246cdf0e10cSrcweir case SID_SELECT_COL: 247cdf0e10cSrcweir pTabViewShell->MarkColumns(); 248cdf0e10cSrcweir break; 249cdf0e10cSrcweir 250cdf0e10cSrcweir case SID_SELECT_ROW: 251cdf0e10cSrcweir pTabViewShell->MarkRows(); 252cdf0e10cSrcweir break; 253cdf0e10cSrcweir 254cdf0e10cSrcweir case SID_SELECT_NONE: 255cdf0e10cSrcweir pTabViewShell->Unmark(); 256cdf0e10cSrcweir break; 257cdf0e10cSrcweir 258cdf0e10cSrcweir case SID_ALIGNCURSOR: 259cdf0e10cSrcweir pTabViewShell->AlignToCursor( GetViewData()->GetCurX(), GetViewData()->GetCurY(), SC_FOLLOW_JUMP ); 260cdf0e10cSrcweir break; 261cdf0e10cSrcweir 262cdf0e10cSrcweir case SID_MARKDATAAREA: 263cdf0e10cSrcweir pTabViewShell->MarkDataArea(); 264cdf0e10cSrcweir break; 265cdf0e10cSrcweir 266cdf0e10cSrcweir case SID_MARKARRAYFORMULA: 267cdf0e10cSrcweir pTabViewShell->MarkMatrixFormula(); 268cdf0e10cSrcweir break; 269cdf0e10cSrcweir 270cdf0e10cSrcweir case SID_SETINPUTMODE: 271cdf0e10cSrcweir SC_MOD()->SetInputMode( SC_INPUT_TABLE ); 272cdf0e10cSrcweir break; 273cdf0e10cSrcweir 274cdf0e10cSrcweir case SID_FOCUS_INPUTLINE: 275cdf0e10cSrcweir { 276cdf0e10cSrcweir ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pTabViewShell ); 277cdf0e10cSrcweir if (pHdl) 278cdf0e10cSrcweir { 279cdf0e10cSrcweir ScInputWindow* pWin = pHdl->GetInputWindow(); 280cdf0e10cSrcweir if (pWin) 281cdf0e10cSrcweir pWin->SwitchToTextWin(); 282cdf0e10cSrcweir } 283cdf0e10cSrcweir } 284cdf0e10cSrcweir break; 285cdf0e10cSrcweir 286cdf0e10cSrcweir case SID_CURSORTOPOFSCREEN: 287cdf0e10cSrcweir pTabViewShell->MoveCursorScreen( 0, -1, SC_FOLLOW_LINE, sal_False ); 288cdf0e10cSrcweir break; 289cdf0e10cSrcweir 290cdf0e10cSrcweir case SID_CURSORENDOFSCREEN: 291cdf0e10cSrcweir pTabViewShell->MoveCursorScreen( 0, 1, SC_FOLLOW_LINE, sal_False ); 292cdf0e10cSrcweir break; 293cdf0e10cSrcweir 294cdf0e10cSrcweir default: 295cdf0e10cSrcweir DBG_ERROR("Unbekannte Message bei ViewShell (Cursor)"); 296cdf0e10cSrcweir return; 297cdf0e10cSrcweir } 298cdf0e10cSrcweir 299cdf0e10cSrcweir rReq.Done(); 300cdf0e10cSrcweir } 301cdf0e10cSrcweir 302cdf0e10cSrcweir void ScCellShell::ExecutePageSel( SfxRequest& rReq ) 303cdf0e10cSrcweir { 304cdf0e10cSrcweir sal_uInt16 nSlotId = rReq.GetSlot(); 305cdf0e10cSrcweir switch ( nSlotId ) 306cdf0e10cSrcweir { 307cdf0e10cSrcweir case SID_CURSORHOME_SEL: rReq.SetSlot( SID_CURSORHOME ); break; 308cdf0e10cSrcweir case SID_CURSOREND_SEL: rReq.SetSlot( SID_CURSOREND ); break; 309cdf0e10cSrcweir case SID_CURSORTOPOFFILE_SEL: rReq.SetSlot( SID_CURSORTOPOFFILE ); break; 310cdf0e10cSrcweir case SID_CURSORENDOFFILE_SEL: rReq.SetSlot( SID_CURSORENDOFFILE ); break; 311cdf0e10cSrcweir default: 312cdf0e10cSrcweir DBG_ERROR("Unbekannte Message bei ViewShell (ExecutePageSel)"); 313cdf0e10cSrcweir return; 314cdf0e10cSrcweir } 315cdf0e10cSrcweir rReq.AppendItem( SfxBoolItem(FN_PARAM_2, sal_True) ); 316cdf0e10cSrcweir ExecuteSlot( rReq, GetInterface() ); 317cdf0e10cSrcweir } 318cdf0e10cSrcweir 319cdf0e10cSrcweir void ScCellShell::ExecutePage( SfxRequest& rReq ) 320cdf0e10cSrcweir { 321cdf0e10cSrcweir ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); 322cdf0e10cSrcweir const SfxItemSet* pReqArgs = rReq.GetArgs(); 323cdf0e10cSrcweir sal_uInt16 nSlotId = rReq.GetSlot(); 324cdf0e10cSrcweir sal_Bool bSel = sal_False; 325cdf0e10cSrcweir sal_Bool bKeep = sal_False; 326cdf0e10cSrcweir 327cdf0e10cSrcweir if ( pReqArgs != NULL ) 328cdf0e10cSrcweir { 329cdf0e10cSrcweir const SfxPoolItem* pItem; 330cdf0e10cSrcweir if( IS_AVAILABLE( FN_PARAM_2, &pItem ) ) 331cdf0e10cSrcweir bSel = ((const SfxBoolItem*)pItem)->GetValue(); 332cdf0e10cSrcweir } 333cdf0e10cSrcweir else 334cdf0e10cSrcweir { 335cdf0e10cSrcweir // evaluate locked selection mode 336cdf0e10cSrcweir 337cdf0e10cSrcweir sal_uInt16 nLocked = pTabViewShell->GetLockedModifiers(); 338cdf0e10cSrcweir if ( nLocked & KEY_SHIFT ) 339cdf0e10cSrcweir bSel = sal_True; // EXT 340cdf0e10cSrcweir else if ( nLocked & KEY_MOD1 ) 341cdf0e10cSrcweir { 342cdf0e10cSrcweir // ADD mode: keep the selection, start a new block when marking with shift again 343cdf0e10cSrcweir bKeep = sal_True; 344cdf0e10cSrcweir pTabViewShell->SetNewStartIfMarking(); 345cdf0e10cSrcweir } 346cdf0e10cSrcweir } 347cdf0e10cSrcweir 348cdf0e10cSrcweir pTabViewShell->ExecuteInputDirect(); 349cdf0e10cSrcweir switch ( nSlotId ) 350cdf0e10cSrcweir { 351cdf0e10cSrcweir case SID_CURSORHOME: 352cdf0e10cSrcweir pTabViewShell->MoveCursorEnd( -1, 0, SC_FOLLOW_LINE, bSel, bKeep ); 353cdf0e10cSrcweir break; 354cdf0e10cSrcweir 355cdf0e10cSrcweir case SID_CURSOREND: 356cdf0e10cSrcweir pTabViewShell->MoveCursorEnd( 1, 0, SC_FOLLOW_JUMP, bSel, bKeep ); 357cdf0e10cSrcweir break; 358cdf0e10cSrcweir 359cdf0e10cSrcweir case SID_CURSORTOPOFFILE: 360cdf0e10cSrcweir pTabViewShell->MoveCursorEnd( -1, -1, SC_FOLLOW_LINE, bSel, bKeep ); 361cdf0e10cSrcweir break; 362cdf0e10cSrcweir 363cdf0e10cSrcweir case SID_CURSORENDOFFILE: 364cdf0e10cSrcweir pTabViewShell->MoveCursorEnd( 1, 1, SC_FOLLOW_JUMP, bSel, bKeep ); 365cdf0e10cSrcweir break; 366cdf0e10cSrcweir 367cdf0e10cSrcweir default: 368cdf0e10cSrcweir DBG_ERROR("Unbekannte Message bei ViewShell (ExecutePage)"); 369cdf0e10cSrcweir return; 370cdf0e10cSrcweir } 371cdf0e10cSrcweir 372cdf0e10cSrcweir rReq.AppendItem( SfxBoolItem(FN_PARAM_2, bSel) ); 373cdf0e10cSrcweir rReq.Done(); 374cdf0e10cSrcweir } 375cdf0e10cSrcweir 376cdf0e10cSrcweir 377cdf0e10cSrcweir 378cdf0e10cSrcweir 379