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