Lines 42-47
Link Here
|
42 |
|
42 |
|
43 |
#include "hintids.hxx" |
43 |
#include "hintids.hxx" |
44 |
|
44 |
|
|
|
45 |
#ifndef _SV_SVAPP_HXX |
46 |
#include <vcl/svapp.hxx> |
47 |
#endif |
45 |
#ifndef _SFXDISPATCH_HXX //autogen |
48 |
#ifndef _SFXDISPATCH_HXX //autogen |
46 |
#include <sfx2/dispatch.hxx> |
49 |
#include <sfx2/dispatch.hxx> |
47 |
#endif |
50 |
#endif |
Lines 324-346
Link Here
|
324 |
*/ |
327 |
*/ |
325 |
IMPL_LINK( SwView, BtnPage, Button *, pButton ) |
328 |
IMPL_LINK( SwView, BtnPage, Button *, pButton ) |
326 |
{ |
329 |
{ |
327 |
MoveNavigation(pButton == pPageDownBtn); |
330 |
// #i75416# move the execution of the search to an asynchronously called static link |
|
|
331 |
Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), new BOOL(pButton == pPageDownBtn) ); |
328 |
return 0; |
332 |
return 0; |
329 |
} |
333 |
} |
330 |
/*-----------------20.06.97 10:46------------------- |
334 |
/*-----------------20.06.97 10:46------------------- |
331 |
|
335 |
|
332 |
--------------------------------------------------*/ |
336 |
--------------------------------------------------*/ |
333 |
void SwView::MoveNavigation(BOOL bNext) |
337 |
IMPL_STATIC_LINK( SwView, MoveNavigationHdl, BOOL *, pbNext ) |
334 |
{ |
338 |
{ |
335 |
SwWrtShell& rSh = GetWrtShell(); |
339 |
if ( !pbNext ) |
|
|
340 |
return 0; |
341 |
SwWrtShell& rSh = pThis->GetWrtShell(); |
336 |
switch( nMoveType ) |
342 |
switch( nMoveType ) |
337 |
{ |
343 |
{ |
338 |
case NID_PGE: |
344 |
case NID_PGE: |
339 |
bNext ? PhyPageDown() : PhyPageUp(); |
345 |
*pbNext ? pThis->PhyPageDown() : pThis->PhyPageUp(); |
340 |
break; |
346 |
break; |
341 |
case NID_TBL : |
347 |
case NID_TBL : |
342 |
rSh.EnterStdMode(); |
348 |
rSh.EnterStdMode(); |
343 |
if(bNext) |
349 |
if(*pbNext) |
344 |
rSh.MoveTable(fnTableNext, fnTableStart); |
350 |
rSh.MoveTable(fnTableNext, fnTableStart); |
345 |
else |
351 |
else |
346 |
rSh.MoveTable(fnTablePrev, fnTableStart); |
352 |
rSh.MoveTable(fnTablePrev, fnTableStart); |
Lines 354-360
Link Here
|
354 |
eType = FLY_GRF; |
360 |
eType = FLY_GRF; |
355 |
else if(nMoveType == NID_OLE) |
361 |
else if(nMoveType == NID_OLE) |
356 |
eType = FLY_OLE; |
362 |
eType = FLY_OLE; |
357 |
BOOL bSuccess = bNext ? |
363 |
BOOL bSuccess = *pbNext ? |
358 |
rSh.GotoNextFly(eType) : |
364 |
rSh.GotoNextFly(eType) : |
359 |
rSh.GotoPrevFly(eType); |
365 |
rSh.GotoPrevFly(eType); |
360 |
if(bSuccess) |
366 |
if(bSuccess) |
Lines 366-379
Link Here
|
366 |
break; |
372 |
break; |
367 |
case NID_DRW : |
373 |
case NID_DRW : |
368 |
case NID_CTRL: |
374 |
case NID_CTRL: |
369 |
rSh.GotoObj(bNext, |
375 |
rSh.GotoObj(*pbNext, |
370 |
nMoveType == NID_DRW ? |
376 |
nMoveType == NID_DRW ? |
371 |
DRAW_SIMPLE : |
377 |
DRAW_SIMPLE : |
372 |
DRAW_CONTROL); |
378 |
DRAW_CONTROL); |
373 |
break; |
379 |
break; |
374 |
case NID_REG : |
380 |
case NID_REG : |
375 |
rSh.EnterStdMode(); |
381 |
rSh.EnterStdMode(); |
376 |
if(bNext) |
382 |
if(*pbNext) |
377 |
rSh.MoveRegion(fnRegionNext, fnRegionStart); |
383 |
rSh.MoveRegion(fnRegionNext, fnRegionStart); |
378 |
else |
384 |
else |
379 |
rSh.MoveRegion(fnRegionPrev, fnRegionStart); |
385 |
rSh.MoveRegion(fnRegionPrev, fnRegionStart); |
Lines 381-400
Link Here
|
381 |
break; |
387 |
break; |
382 |
case NID_BKM : |
388 |
case NID_BKM : |
383 |
rSh.EnterStdMode(); |
389 |
rSh.EnterStdMode(); |
384 |
GetViewFrame()->GetDispatcher()->Execute(bNext ? |
390 |
pThis->GetViewFrame()->GetDispatcher()->Execute(*pbNext ? |
385 |
FN_NEXT_BOOKMARK : |
391 |
FN_NEXT_BOOKMARK : |
386 |
FN_PREV_BOOKMARK); |
392 |
FN_PREV_BOOKMARK); |
387 |
break; |
393 |
break; |
388 |
case NID_OUTL: |
394 |
case NID_OUTL: |
389 |
rSh.EnterStdMode(); |
395 |
rSh.EnterStdMode(); |
390 |
bNext ? rSh.GotoNextOutline() : rSh.GotoPrevOutline(); |
396 |
*pbNext ? rSh.GotoNextOutline() : rSh.GotoPrevOutline(); |
391 |
break; |
397 |
break; |
392 |
case NID_SEL : |
398 |
case NID_SEL : |
393 |
bNext ? rSh.GoNextCrsr() : rSh.GoPrevCrsr(); |
399 |
*pbNext ? rSh.GoNextCrsr() : rSh.GoPrevCrsr(); |
394 |
break; |
400 |
break; |
395 |
case NID_FTN: |
401 |
case NID_FTN: |
396 |
rSh.EnterStdMode(); |
402 |
rSh.EnterStdMode(); |
397 |
bNext ? |
403 |
*pbNext ? |
398 |
rSh.GotoNextFtnAnchor() : |
404 |
rSh.GotoNextFtnAnchor() : |
399 |
rSh.GotoPrevFtnAnchor(); |
405 |
rSh.GotoPrevFtnAnchor(); |
400 |
break; |
406 |
break; |
Lines 416-422
Link Here
|
416 |
} |
422 |
} |
417 |
if (nMarkCount) |
423 |
if (nMarkCount) |
418 |
{ |
424 |
{ |
419 |
if(!bNext) |
425 |
if(!(*pbNext)) |
420 |
{ |
426 |
{ |
421 |
if (nActMark > 1) |
427 |
if (nActMark > 1) |
422 |
--nActMark; |
428 |
--nActMark; |
Lines 438-471
Link Here
|
438 |
{ |
444 |
{ |
439 |
|
445 |
|
440 |
SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD); |
446 |
SwFieldType* pFldType = rSh.GetFldType(0, RES_POSTITFLD); |
441 |
rSh.MoveFldType( pFldType, bNext ); |
447 |
rSh.MoveFldType( pFldType, *pbNext ); |
442 |
} |
448 |
} |
443 |
break; |
449 |
break; |
444 |
case NID_SRCH_REP: |
450 |
case NID_SRCH_REP: |
445 |
if(pSrchItem) |
451 |
if(pSrchItem) |
446 |
{ |
452 |
{ |
447 |
BOOL bBackward = pSrchItem->GetBackward(); |
453 |
BOOL bBackward = pSrchItem->GetBackward(); |
448 |
if(rSh.HasSelection() && !bNext == rSh.IsCrsrPtAtEnd()) |
454 |
if(rSh.HasSelection() && !(*pbNext) == rSh.IsCrsrPtAtEnd()) |
449 |
rSh.SwapPam(); |
455 |
rSh.SwapPam(); |
450 |
pSrchItem->SetBackward(!bNext); |
456 |
pSrchItem->SetBackward(!(*pbNext)); |
451 |
SfxRequest aReq(FN_REPEAT_SEARCH, SFX_CALLMODE_SLOT, GetPool()); |
457 |
SfxRequest aReq(FN_REPEAT_SEARCH, SFX_CALLMODE_SLOT, pThis->GetPool()); |
452 |
ExecSearch(aReq); |
458 |
pThis->ExecSearch(aReq); |
453 |
pSrchItem->SetBackward(bBackward); |
459 |
pSrchItem->SetBackward(bBackward); |
454 |
} |
460 |
} |
455 |
break; |
461 |
break; |
456 |
case NID_INDEX_ENTRY: |
462 |
case NID_INDEX_ENTRY: |
457 |
rSh.GotoNxtPrvTOXMark(bNext); |
463 |
rSh.GotoNxtPrvTOXMark(*pbNext); |
458 |
break; |
464 |
break; |
459 |
|
465 |
|
460 |
case NID_TABLE_FORMULA: |
466 |
case NID_TABLE_FORMULA: |
461 |
rSh.GotoNxtPrvTblFormula( bNext ); |
467 |
rSh.GotoNxtPrvTblFormula( *pbNext ); |
462 |
break; |
468 |
break; |
463 |
|
469 |
|
464 |
case NID_TABLE_FORMULA_ERROR: |
470 |
case NID_TABLE_FORMULA_ERROR: |
465 |
rSh.GotoNxtPrvTblFormula( bNext, TRUE ); |
471 |
rSh.GotoNxtPrvTblFormula( *pbNext, TRUE ); |
466 |
break; |
472 |
break; |
467 |
} |
473 |
} |
468 |
pEditWin->GrabFocus(); |
474 |
pThis->pEditWin->GrabFocus(); |
|
|
475 |
|
476 |
delete pbNext; |
477 |
|
478 |
return 0; |
469 |
} |
479 |
} |
470 |
|
480 |
|
471 |
/************************************************************************* |
481 |
/************************************************************************* |