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