LibreOffice Module sw (master)  1
move.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <sfx2/bindings.hxx>
21 #include <sfx2/viewfrm.hxx>
22 #include <wrtsh.hxx>
23 #include <view.hxx>
24 #include <viewopt.hxx>
25 #include <drawbase.hxx>
26 
40 const long nReadOnlyScrollOfst = 10;
41 
42 namespace {
43 
44 class ShellMoveCursor
45 {
46  SwWrtShell* pSh;
47  bool bAct;
48 public:
49  ShellMoveCursor( SwWrtShell* pWrtSh, bool bSel )
50  {
51  bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrameType(nullptr,false) & FrameTypeFlags::FLY_ANY);
52  pSh = pWrtSh;
53  pSh->MoveCursor( bSel );
54  pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
55  }
56  ~ShellMoveCursor() COVERITY_NOEXCEPT_FALSE
57  {
58  if( bAct )
59  {
60  // The action is used for scrolling in "single paragraph"
61  // frames with fixed height.
62  pSh->StartAllAction();
63  pSh->EndAllAction();
64  }
65  }
66 };
67 
68 }
69 
70 void SwWrtShell::MoveCursor( bool bWithSelect )
71 {
73  if ( IsGCAttr() )
74  {
75  GCAttr();
76  ClearGCAttr();
77  }
78  if ( bWithSelect )
79  SttSelect();
80  else
81  {
82  EndSelect();
83  (this->*m_fnKillSel)( nullptr, false );
84  }
85 }
86 
87 bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, bool bSelect )
88 {
89  bool bRet;
90  if( bSelect )
91  {
92  SttCursorMove();
93  MoveCursor( true );
94  bRet = (this->*FnSimpleMove)();
95  EndCursorMove();
96  }
97  else
98  {
99  bRet = (this->*FnSimpleMove)();
100  if( bRet )
101  MoveCursor();
102  }
103  return bRet;
104 }
105 
106 bool SwWrtShell::Left( sal_uInt16 nMode, bool bSelect,
107  sal_uInt16 nCount, bool bBasicCall, bool bVisual )
108 {
109  if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
110  {
111  Point aTmp( VisArea().Pos() );
112  aTmp.AdjustX( -(VisArea().Width() * nReadOnlyScrollOfst / 100) );
113  m_rView.SetVisArea( aTmp );
114  return true;
115  }
116  else
117  {
118  ShellMoveCursor aTmp( this, bSelect );
119  return SwCursorShell::Left( nCount, nMode, bVisual );
120  }
121 }
122 
123 bool SwWrtShell::Right( sal_uInt16 nMode, bool bSelect,
124  sal_uInt16 nCount, bool bBasicCall, bool bVisual )
125 {
126  if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly() )
127  {
128  Point aTmp( VisArea().Pos() );
129  aTmp.AdjustX(VisArea().Width() * nReadOnlyScrollOfst / 100 );
130  aTmp.setX( m_rView.SetHScrollMax( aTmp.X() ) );
131  m_rView.SetVisArea( aTmp );
132  return true;
133  }
134  else
135  {
136  ShellMoveCursor aTmp( this, bSelect );
137  return SwCursorShell::Right( nCount, nMode, bVisual );
138  }
139 }
140 
141 bool SwWrtShell::Up( bool bSelect, sal_uInt16 nCount, bool bBasicCall )
142 {
143  if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
144  {
145  Point aTmp( VisArea().Pos() );
146  aTmp.AdjustY( -(VisArea().Height() * nReadOnlyScrollOfst / 100) );
147  m_rView.SetVisArea( aTmp );
148  return true;
149  }
150 
151  ShellMoveCursor aTmp( this, bSelect );
152  return SwCursorShell::Up(nCount);
153 }
154 
155 bool SwWrtShell::Down( bool bSelect, sal_uInt16 nCount, bool bBasicCall )
156 {
157  if ( !bSelect && !bBasicCall && IsCursorReadonly() && !GetViewOptions()->IsSelectionInReadonly())
158  {
159  Point aTmp( VisArea().Pos() );
160  aTmp.AdjustY(VisArea().Height() * nReadOnlyScrollOfst / 100 );
161  aTmp.setY( m_rView.SetVScrollMax( aTmp.Y() ) );
162  m_rView.SetVisArea( aTmp );
163  return true;
164  }
165 
166  ShellMoveCursor aTmp( this, bSelect );
167  return SwCursorShell::Down(nCount);
168 }
169 
170 bool SwWrtShell::LeftMargin( bool bSelect, bool bBasicCall )
171 {
172  if ( !bSelect && !bBasicCall && IsCursorReadonly() )
173  {
174  Point aTmp( VisArea().Pos() );
175  aTmp.setX( DOCUMENTBORDER );
176  m_rView.SetVisArea( aTmp );
177  return true;
178  }
179  else
180  {
181  ShellMoveCursor aTmp( this, bSelect );
182  return SwCursorShell::LeftMargin();
183  }
184 }
185 
186 bool SwWrtShell::RightMargin( bool bSelect, bool bBasicCall )
187 {
188  if ( !bSelect && !bBasicCall && IsCursorReadonly() )
189  {
190  Point aTmp( VisArea().Pos() );
191  aTmp.setX( GetDocSize().Width() - VisArea().Width() + DOCUMENTBORDER );
192  if( DOCUMENTBORDER > aTmp.X() )
193  aTmp.setX( DOCUMENTBORDER );
194  m_rView.SetVisArea( aTmp );
195  return true;
196  }
197  else
198  {
199  ShellMoveCursor aTmp( this, bSelect );
200  return SwCursorShell::RightMargin(bBasicCall);
201  }
202 }
203 
204 bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable,
205  bool bSelect, bool bDontMoveRegion )
206 {
207  if ( IsCursorInTable() )
208  {
209  const bool bBoxSelection = HasBoxSelection();
210  if( !m_bBlockMode )
211  {
212  if ( !bSelect )
213  EnterStdMode();
214  else
215  SttSelect();
216  }
217  // Table cell ?
218  if ( !bBoxSelection && (MoveSection( GoCurrSection, fnSectionStart)
219  || bDontMoveRegion))
220  {
221  if ( pMoveTable )
222  *pMoveTable = false;
223  return true;
224  }
225  if( MoveTable( GotoCurrTable, fnTableStart ) || bDontMoveRegion )
226  {
227  if ( pMoveTable )
228  *pMoveTable = true;
229  return true;
230  }
231  else if( bBoxSelection && pMoveTable )
232  {
233  // JP 09.01.96: We have a box selection (or an empty cell)
234  // and we want select (pMoveTable will be
235  // set in SelAll). Then the table must not
236  // be left, otherwise there is no selection
237  // of the entire table possible!
238  *pMoveTable = true;
239  return true;
240  }
241  }
242 
243  if( !m_bBlockMode )
244  {
245  if ( !bSelect )
246  EnterStdMode();
247  else
248  SttSelect();
249  }
250  const FrameTypeFlags nFrameType = GetFrameType(nullptr,false);
251  if ( FrameTypeFlags::FLY_ANY & nFrameType )
252  {
254  return true;
255  else if ( FrameTypeFlags::FLY_FREE & nFrameType || bDontMoveRegion )
256  return false;
257  }
259  {
261  return true;
262  else if ( bKeepArea )
263  return true;
264  }
265  // Regions ???
268 }
269 
270 bool SwWrtShell::GoEnd(bool bKeepArea, const bool *pMoveTable)
271 {
272  if ( pMoveTable && *pMoveTable )
274 
275  if ( IsCursorInTable() )
276  {
279  return true;
280  }
281  else
282  {
283  const FrameTypeFlags nFrameType = GetFrameType(nullptr,false);
284  if ( FrameTypeFlags::FLY_ANY & nFrameType )
285  {
287  return true;
288  else if ( FrameTypeFlags::FLY_FREE & nFrameType )
289  return false;
290  }
292  {
294  return true;
295  else if ( bKeepArea )
296  return true;
297  }
298  }
299  // Regions ???
302 }
303 
304 bool SwWrtShell::StartOfSection(bool const bSelect)
305 {
306  ShellMoveCursor aTmp( this, bSelect );
307  return GoStart(false, nullptr, bSelect );
308 }
309 
310 bool SwWrtShell::EndOfSection(bool const bSelect)
311 {
312  ShellMoveCursor aTmp( this, bSelect );
313  return GoEnd();
314 }
315 
316 bool SwWrtShell::SttNxtPg( bool bSelect )
317 {
318  ShellMoveCursor aTmp( this, bSelect );
319  return MovePage( GetNextFrame, GetFirstSub );
320 }
321 
322 void SwWrtShell::SttPrvPg( bool bSelect )
323 {
324  ShellMoveCursor aTmp( this, bSelect );
326 }
327 
328 void SwWrtShell::EndNxtPg( bool bSelect )
329 {
330  ShellMoveCursor aTmp( this, bSelect );
332 }
333 
334 bool SwWrtShell::EndPrvPg( bool bSelect )
335 {
336  ShellMoveCursor aTmp( this, bSelect );
337  return MovePage( GetPrevFrame, GetLastSub );
338 }
339 
340 bool SwWrtShell::SttPg( bool bSelect )
341 {
342  ShellMoveCursor aTmp( this, bSelect );
343  return MovePage( GetThisFrame, GetFirstSub );
344 }
345 
346 bool SwWrtShell::EndPg( bool bSelect )
347 {
348  ShellMoveCursor aTmp( this, bSelect );
349  return MovePage( GetThisFrame, GetLastSub );
350 }
351 
352 bool SwWrtShell::SttPara( bool bSelect )
353 {
354  ShellMoveCursor aTmp( this, bSelect );
355  return MovePara( GoCurrPara, fnParaStart );
356 }
357 
358 void SwWrtShell::EndPara( bool bSelect )
359 {
360  ShellMoveCursor aTmp( this, bSelect );
362 }
363 
364 // Column-by-jumping.
365 // SSelection with or without
366 // returns success or failure
367 
369 {
370  ShellMoveCursor aTmp( this, false/*bSelect*/);
372 }
373 
375 {
376  ShellMoveCursor aTmp( this, false/*bSelect*/);
378 }
379 
381 {
382  ShellMoveCursor aTmp( this, false/*bSelect*/);
384 }
385 
387 {
388  ShellMoveCursor aTmp( this, false/*bSelect*/);
390 }
391 
393 {
394  ShellMoveCursor aTmp( this, false/*bSelect*/);
396 }
397 
399 {
400  ShellMoveCursor aTmp( this, false/*bSelect*/);
402 }
403 
404 bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect)
405 {
406  bool bDiff = false;
407  SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() );
408 
409  // m_bDestOnStack indicates if I could not set the coursor at the current
410  // position, because in this region is no content.
411  if( !m_bDestOnStack )
412  {
413  Point aPt( aOldRect.Center() );
414 
415  if( !IsCursorVisible() )
416  // set CursorPos to top-/bottom left pos. So the pagescroll is not
417  // be dependent on the current cursor, but on the visarea.
418  aPt.setY( aTmpArea.Top() + aTmpArea.Height() / 2 );
419 
420  aPt.AdjustY(lOffset );
421  m_aDest = GetContentPos(aPt,lOffset > 0);
422  m_aDest.setX( aPt.X() );
423  m_bDestOnStack = true;
424  }
425 
426  // If we had a frame selection, it must be removed after the m_fnSetCursor
427  // and we have to remember the position on the stack to return to it later.
428  bool bIsFrameSel = false;
429 
430  //Target position is now within the viewable region -->
431  //Place the cursor at the target position; remember that no target
432  //position is longer on the stack.
433  //The new visible region is to be determined beforehand.
434  aTmpArea.Pos().AdjustY(lOffset );
435  if( aTmpArea.IsInside(m_aDest) )
436  {
437  if( bSelect )
438  SttSelect();
439  else
440  EndSelect();
441 
442  bIsFrameSel = IsFrameSelected();
443  bool bIsObjSel = 0 != IsObjSelected();
444 
445  // unselect frame
446  if( bIsFrameSel || bIsObjSel )
447  {
448  UnSelectFrame();
450  if ( bIsObjSel )
451  {
452  GetView().SetDrawFuncPtr( nullptr );
454  }
455 
456  CallChgLnk();
457  }
458 
459  (this->*m_fnSetCursor)( &m_aDest, true );
460 
461  bDiff = aOldRect != GetCharRect();
462 
463  if( bIsFrameSel )
464  {
465  // In frames take only the upper corner
466  // so that it can be re-selected.
467  aOldRect.SSize( 5, 5 );
468  }
469 
470  // reset Dest. SPoint Flags
471  m_bDestOnStack = false;
472  }
473 
474  // Position into the stack; bDiff indicates if there is a
475  // difference between the old and the new cursor position.
476  m_pCursorStack.reset( new CursorStack( bDiff, bIsFrameSel, aOldRect.Center(),
477  lOffset, std::move(m_pCursorStack) ) );
478  return !m_bDestOnStack && bDiff;
479 }
480 
481 bool SwWrtShell::PopCursor(bool bUpdate, bool bSelect)
482 {
483  if( nullptr == m_pCursorStack)
484  return false;
485 
486  const bool bValidPos = m_pCursorStack->bValidCurPos;
487  if( bUpdate && bValidPos )
488  {
489  // If a predecessor is on the stack,
490  // use the flag for a valid position.
491  SwRect aTmpArea(VisArea());
492  aTmpArea.Pos().AdjustY( -(m_pCursorStack->lOffset) );
493  if( aTmpArea.IsInside( m_pCursorStack->aDocPos ) )
494  {
495  if( bSelect )
496  SttSelect();
497  else
498  EndSelect();
499 
500  (this->*m_fnSetCursor)(&m_pCursorStack->aDocPos, !m_pCursorStack->bIsFrameSel);
501  if( m_pCursorStack->bIsFrameSel && IsObjSelectable(m_pCursorStack->aDocPos))
502  {
503  HideCursor();
504  SelectObj( m_pCursorStack->aDocPos );
505  EnterSelFrameMode( &m_pCursorStack->aDocPos );
506  }
507  }
508  // If a discrepancy between the visible range and the
509  // remembered cursor position occurs, all of the remembered
510  // positions are thrown away.
511  else
512  {
514  return false;
515  }
516  }
517  m_pCursorStack = std::move(m_pCursorStack->pNext);
518  if( nullptr == m_pCursorStack )
519  {
520  m_ePageMove = MV_NO;
521  m_bDestOnStack = false;
522  }
523  return bValidPos;
524 }
525 
526 // Reset of all pushed cursor positions; these will
527 // not be displayed ( --> No Start-/EndAction!!)
528 
530 {
531  while(m_pCursorStack)
532  m_pCursorStack = std::move(m_pCursorStack->pNext);
533  m_ePageMove = MV_NO;
534  m_bDestOnStack = false;
535 }
545 bool SwWrtShell::PageCursor(SwTwips lOffset, bool bSelect)
546 {
547  // Do nothing if an offset of 0 was indicated
548  if(!lOffset) return false;
549  // Was once used to force a reformat of the layout.
550  // This has not work that way, because the cursor was not set
551  // because this does not happen within a
552  // Start-/EndActionParentheses.
553  // Because only SwViewShell::EndAction() is called at the end,
554  // no updating of the display of the cursor position takes place.
555  // The CursorShell-Actionparentheses cannot be used, because it
556  // always leads to displaying the cursor, thus also,
557  // if after the scroll scrolled in a region without a valid position.
558  // SwViewShell::StartAction();
559  PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP;
560  // Change of direction and stack present
561  if( eDir != m_ePageMove && m_ePageMove != MV_NO && PopCursor( true, bSelect ))
562  return true;
563 
564  const bool bRet = PushCursor(lOffset, bSelect);
565  m_ePageMove = eDir;
566  return bRet;
567 }
568 
569 bool SwWrtShell::GotoPage(sal_uInt16 nPage, bool bRecord)
570 {
571  ShellMoveCursor aTmp( this, false);
572  if( SwCursorShell::GotoPage(nPage) && bRecord)
573  {
574  if(IsSelFrameMode())
575  {
576  UnSelectFrame();
578  }
579  return true;
580  }
581  return false;
582 }
583 
584 bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect )
585 {
586  ShellMoveCursor aTmp( this, bSelect );
587  SwPosition aPos = *GetCursor()->GetPoint();
588  bool bRet = SwCursorShell::GotoMark( pMark, true/*bStart*/ );
589  if (bRet)
591  return bRet;
592 }
593 
594 bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame )
595 {
596  SwPosition aPos = *GetCursor()->GetPoint();
597  bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame);
598  if (bRet)
600  return bRet;
601 }
602 
604 {
605  SwPosition aPos = *GetCursor()->GetPoint();
606  bool bRet = SwCursorShell::GotoINetAttr(rAttr);
607  if (bRet)
609  return bRet;
610 }
611 
613 {
616 }
617 
618 bool SwWrtShell::GotoOutline( const OUString& rName )
619 {
620  SwPosition aPos = *GetCursor()->GetPoint();
621  bool bRet = SwCursorShell::GotoOutline (rName);
622  if (bRet)
624  return bRet;
625 }
626 
627 bool SwWrtShell::GotoRegion( const OUString& rName )
628 {
629  SwPosition aPos = *GetCursor()->GetPoint();
630  bool bRet = SwCursorShell::GotoRegion (rName);
631  if (bRet)
633  return bRet;
634  }
635 
636 bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType,
637  sal_uInt16 nSeqNo )
638 {
639  SwPosition aPos = *GetCursor()->GetPoint();
640  bool bRet = SwCursorShell::GotoRefMark(rRefMark, nSubType, nSeqNo);
641  if (bRet)
643  return bRet;
644 }
645 
646 bool SwWrtShell::GotoNextTOXBase( const OUString* pName )
647 {
648  SwPosition aPos = *GetCursor()->GetPoint();
649  bool bRet = SwCursorShell::GotoNextTOXBase(pName);
650  if (bRet)
652  return bRet;
653 }
654 
655 bool SwWrtShell::GotoTable( const OUString& rName )
656 {
657  SwPosition aPos = *GetCursor()->GetPoint();
658  bool bRet = SwCursorShell::GotoTable(rName);
659  if (bRet)
661  return bRet;
662 }
663 
665  SwPosition aPos = *GetCursor()->GetPoint();
666  bool bRet = SwCursorShell::GotoFormatField(rField);
667  if (bRet)
669 }
670 
672  SwPosition aPos = *GetCursor()->GetPoint();
673  const SwRangeRedline *pRedline = SwCursorShell::GotoRedline(nArrPos, bSelect);
674  if (pRedline)
676  return pRedline;
677 }
678 
679 bool SwWrtShell::SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr )
680 {
681  bool bRet;
682  {
683  SwMvContext aMvContext(this);
684  SttSelect();
685  bRet = SwCursorShell::SelectTextAttr( nWhich, false, pAttr );
686  }
687  EndSelect();
688  return bRet;
689 }
690 
691 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
SwContentFrame * GetColumnEnd(const SwLayoutFrame *pColFrame)
Definition: trvlcol.cxx:51
bool GotoPage(sal_uInt16 nPage)
Definition: crsrsh.cxx:1186
bool Right(sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:123
bool SttPara(bool bSelect=false)
Definition: move.cxx:352
SwMoveFnCollection const & fnParaEnd
Definition: paminit.cxx:47
SwMoveFnCollection const & fnTableEnd
Definition: paminit.cxx:53
bool GotoTable(const OUString &rName)
Definition: trvltbl.cxx:793
bool EndPg(bool bSelect=false)
Definition: move.cxx:346
void ClearGCAttr()
Definition: crsrsh.hxx:756
void ResetCursorStack()
Definition: wrtsh.hxx:624
Marks a position in the document model.
Definition: pam.hxx:35
void EndOfPrevColumn()
Definition: move.cxx:398
bool Right(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:351
SwPaM * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:189
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:572
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
Definition: pam.cxx:1009
bool m_bBlockMode
Definition: wrtsh.hxx:573
bool GotoRegion(const OUString &rName)
Definition: trvlreg.cxx:270
void StartOfPrevColumn()
Definition: move.cxx:392
SwContentFrame * GetColumnStt(const SwLayoutFrame *pColFrame)
Definition: trvlcol.cxx:46
bool SttNxtPg(bool bSelect=false)
Definition: move.cxx:316
SwLayoutFrame * GetPrevFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1077
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
Definition: crstrvl.cxx:2306
bool EndPrvPg(bool bSelect=false)
Definition: move.cxx:334
SwMoveFnCollection const & fnParaStart
Definition: paminit.cxx:46
void Height(long nNew)
Definition: swrect.hxx:191
void GotoFormatField(const SwFormatField &rField)
Definition: move.cxx:664
bool addEntry(const SwPosition &rPos)
Definition: navmgr.cxx:170
bool GotoINetAttr(const SwTextINetFormat &rAttr)
Definition: move.cxx:603
bool Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:349
long SwTwips
Definition: swtypes.hxx:49
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
Definition: move.cxx:671
void EnterStdMode()
Definition: select.cxx:550
void Pos(const Point &rNew)
Definition: swrect.hxx:169
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
void Invalidate(sal_uInt16 nId)
bool GotoMark(const ::sw::mark::IMark *const pMark)
Definition: crbm.cxx:184
SwLayoutFrame * GetThisFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1072
void EndAllAction()
Definition: edws.cxx:97
bool GotoTable(const OUString &rName)
Definition: move.cxx:655
void SttPrvPg(bool bSelect=false)
Definition: move.cxx:322
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
Definition: viewport.cxx:195
SwLayoutFrame * GetNextFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1060
bool GotoCurrTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
Definition: trvltbl.cxx:632
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Definition: viewdraw.cxx:632
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
Definition: move.cxx:594
const SwView & GetView() const
Definition: wrtsh.hxx:428
bool GotoNextTOXBase(const OUString *pName=nullptr)
Definition: move.cxx:646
void Top(const long nTop)
Definition: swrect.hxx:204
void SttCursorMove()
Definition: crsrsh.cxx:301
bool Down(sal_uInt16 nCnt=1)
Definition: crsrsh.hxx:354
enum SwWrtShell::PageMove m_ePageMove
SELECTFUNC m_fnSetCursor
Definition: wrtsh.hxx:109
SwMoveFnCollection const & fnRegionEnd
Definition: paminit.cxx:56
SAL_DLLPRIVATE bool GoStart(bool KeepArea, bool *, bool bSelect, bool bDontMoveRegion=false)
Definition: move.cxx:204
bool MovePage(SwWhichPage, SwPosPage)
Definition: crsrsh.cxx:632
SAL_DLLPRIVATE bool PushCursor(SwTwips lOffset, bool bSelect)
Definition: move.cxx:404
bool GotoFly(const OUString &rName, FlyCntType eType, bool bSelFrame)
Jump to named Fly (graphic/OLE).
Definition: feshview.cxx:2508
void EndCursorMove(const bool bIdleEnd=false)
Definition: crsrsh.cxx:310
SwNavigationMgr m_aNavigationMgr
Definition: wrtsh.hxx:547
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
Definition: crsrsh.cxx:694
void EndSelect()
Definition: select.cxx:424
SwLayoutFrame * GetPrevColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:40
bool LeftMargin()
Definition: crsrsh.hxx:355
sal_uInt16 char * pName
const SwTableNode * IsCursorInTable() const
Definition: crsrsh.hxx:889
bool Up(bool bSelect, sal_uInt16 nCount=1, bool bBasicCall=false)
Definition: move.cxx:141
bool HasBoxSelection() const
Is content of a table cell or at least a table cell completely selected?
Definition: fetab.cxx:859
const SwRect & VisArea() const
Definition: viewsh.cxx:560
std::unique_ptr< CursorStack > m_pCursorStack
Definition: wrtsh.hxx:544
SwContentFrame * GetLastSub(const SwLayoutFrame *pLayout)
Definition: trvlfrm.cxx:1055
bool Up(sal_uInt16 nCnt=1)
Definition: crsrsh.hxx:353
const SwPosition * GetPoint() const
Definition: pam.hxx:207
bool IsGCAttr() const
Definition: crsrsh.hxx:755
FlyCntType
Definition: flyenum.hxx:23
void StartOfNextColumn()
Definition: move.cxx:380
SfxBindings & GetBindings()
bool ActionPend() const
Definition: viewsh.hxx:197
Size GetDocSize() const
Definition: viewsh.cxx:2096
vector_type::size_type size_type
Definition: docary.hxx:228
SAL_DLLPRIVATE bool GoEnd(bool KeepArea=false, const bool *=nullptr)
Definition: move.cxx:270
bool GotoINetAttr(const SwTextINetFormat &rAttr)
Definition: crstrvl.cxx:1994
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:62
bool SelectTextAttr(sal_uInt16 nWhich, const SwTextAttr *pAttr=nullptr)
Definition: move.cxx:679
bool SimpleMove(FNSimpleMove, bool bSelect)
Definition: move.cxx:87
bool RightMargin(bool bAPI=false)
Definition: crsrsh.hxx:356
bool IsCursorReadonly() const
Definition: crsrsh.cxx:3279
bool RightMargin(bool bSelect, bool bBasicCall)
Definition: move.cxx:186
bool GotoNextTOXBase(const OUString *=nullptr)
jump to the next index
Definition: crstrvl.cxx:264
bool GoCurrSection(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1051
void StartOfColumn()
Definition: move.cxx:368
bool SelectTextAttr(sal_uInt16 nWhich, bool bExpand, const SwTextAttr *pAttr=nullptr)
Definition: crstrvl.cxx:1965
void SttSelect()
Definition: select.cxx:384
void LeaveDrawCreate()
Definition: view.hxx:523
SwLayoutFrame * GetNextColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:34
bool StartOfSection(bool bSelect=false)
Definition: move.cxx:304
SwContentFrame * GetFirstSub(const SwLayoutFrame *pLayout)
Definition: trvlfrm.cxx:1050
bool SttPg(bool bSelect=false)
Definition: move.cxx:340
long SetVScrollMax(long lMax)
Definition: viewport.cxx:137
bool MoveSection(SwWhichSection, SwMoveFnCollection const &)
Definition: crsrsh.cxx:718
void MoveColumn(SwWhichColumn, SwPosColumn)
Definition: trvlcol.cxx:66
void CallChgLnk()
Definition: crsrsh.cxx:2510
Class for automated call of Start- and EndCursorMove().
Definition: editsh.hxx:1026
void GotoMark(const ::sw::mark::IMark *const pMark)
Definition: wrtsh3.cxx:133
void EndOfColumn()
Definition: move.cxx:374
bool MoveRegion(SwWhichRegion, SwMoveFnCollection const &)
Definition: trvlreg.cxx:236
void addCurrentPosition()
Definition: wrtsh1.cxx:1544
SwView & m_rView
Definition: wrtsh.hxx:546
bool IsCursorVisible() const
Definition: crsrsh.hxx:520
bool Left(sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:106
SwMoveFnCollection const & fnTableStart
Definition: paminit.cxx:52
bool PageCursor(SwTwips lOffset, bool bSelect)
if no stack exists –> cancel selection if stack && change of direction –> pop cursor and return els...
Definition: move.cxx:545
void MoveCursor(bool bWithSelect=false)
Definition: move.cxx:70
void EndPara(bool bSelect=false)
Definition: move.cxx:358
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:424
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
Definition: trvltbl.cxx:681
SwMoveFnCollection const & fnSectionEnd
Definition: paminit.cxx:50
bool m_bDestOnStack
Definition: wrtsh.hxx:550
void GCAttr()
Definition: edatmisc.cxx:55
bool IsInside(const Point &rPOINT) const
Definition: swrect.cxx:105
const long nReadOnlyScrollOfst
Always:
Definition: move.cxx:40
const SwRect & GetCharRect() const
Definition: crsrsh.hxx:516
void GotoOutline(SwOutlineNodes::size_type nIdx)
Definition: move.cxx:612
Point m_aDest
Definition: wrtsh.hxx:549
size_t IsObjSelected() const
Definition: feshview.cxx:1150
long SetHScrollMax(long lMax)
Definition: viewport.cxx:127
void UnSelectFrame()
Definition: select.cxx:322
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType=0, sal_uInt16 nSeqNo=0)
Definition: move.cxx:636
bool SelectObj(const Point &rSelPt, sal_uInt8 nFlag=0, SdrObject *pObj=nullptr)
If an object has been given, exactly this object is selected (instead of searching over position)...
Definition: feshview.cxx:176
void EndOfNextColumn()
Definition: move.cxx:386
bool Down(bool bSelect, sal_uInt16 nCount=1, bool bBasicCall=false)
Definition: move.cxx:155
SwMoveFnCollection const & fnSectionStart
Definition: paminit.cxx:49
void LeaveSelFrameMode()
Definition: select.cxx:719
bool GotoPage(sal_uInt16 nPage, bool bRecord)
Definition: move.cxx:569
Point GetContentPos(const Point &rPoint, bool bNext) const
Provide information about content situated closes to given Point.
Definition: fews.cxx:83
void EndNxtPg(bool bSelect=false)
Definition: move.cxx:328
bool EndOfSection(bool bSelect=false)
Definition: move.cxx:310
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:701
bool IsObjSelectable(const Point &rPt)
The following two methods return enum SdrHdlKind.
Definition: feshview.cxx:1283
SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect=false)
Definition: move.cxx:481
bool GotoCurrRegionAndSkip(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosRegion, bool bInReadOnly)
Definition: trvlreg.cxx:181
std::vector< SwNode * >::size_type size_type
#define DOCUMENTBORDER
Definition: swtypes.hxx:82
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
bool GotoOutline(const OUString &rName)
Definition: crstrvl.cxx:985
bool GotoRegion(const OUString &rName)
Definition: move.cxx:627
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
Definition: fews.cxx:236
bool GotoFormatField(const SwFormatField &rField)
Definition: crstrvl.cxx:831
bool IsFrameSelected() const
Definition: feshview.cxx:1158
void HideCursor()
Definition: crsrsh.cxx:2404
SELECTFUNC m_fnKillSel
Definition: wrtsh.hxx:111
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo)
jump to reference marker
Definition: crstrvl.cxx:1216
bool IsSelFrameMode() const
Definition: wrtsh.hxx:170
SwLayoutFrame * GetCurrColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:27
SAL_DLLPRIVATE void ResetCursorStack_()
Definition: move.cxx:529
SwMoveFnCollection const & fnRegionStart
Definition: paminit.cxx:55