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
46namespace {
47
48class ShellMoveCursor
49{
50 SwWrtShell* pSh;
51 bool bAct;
52public:
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
74void SwWrtShell::MoveCursor( bool bWithSelect )
75{
77 if ( IsGCAttr() )
78 {
79 GCAttr();
81 }
82 if ( bWithSelect )
83 SttSelect();
84 else
85 {
86 EndSelect();
87 (this->*m_fnKillSel)( nullptr, false );
88 }
89}
90
91bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, bool bSelect )
92{
93 bool bRet;
94 if( bSelect )
95 {
97 MoveCursor( true );
98 bRet = (this->*FnSimpleMove)();
100 }
101 else
102 {
103 bRet = (this->*FnSimpleMove)();
104 if( bRet )
105 MoveCursor();
106 }
107 return bRet;
108}
109
110bool SwWrtShell::Left( SwCursorSkipMode 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
127bool SwWrtShell::Right( SwCursorSkipMode 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
145bool 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 );
157}
158
159bool 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 );
172}
173
174bool 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 );
187 }
188}
189
190bool 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
208bool 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
274bool 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
308bool SwWrtShell::StartOfSection(bool const bSelect)
309{
310 ShellMoveCursor aTmp( this, bSelect );
311 return GoStart(false, nullptr, bSelect );
312}
313
314bool SwWrtShell::EndOfSection(bool const bSelect)
315{
316 ShellMoveCursor aTmp( this, bSelect );
317 return GoEnd();
318}
319
320bool SwWrtShell::SttNxtPg( bool bSelect )
321{
322 ShellMoveCursor aTmp( this, bSelect );
324}
325
326void SwWrtShell::SttPrvPg( bool bSelect )
327{
328 ShellMoveCursor aTmp( this, bSelect );
330}
331
332void SwWrtShell::EndNxtPg( bool bSelect )
333{
334 ShellMoveCursor aTmp( this, bSelect );
336}
337
338bool SwWrtShell::EndPrvPg( bool bSelect )
339{
340 ShellMoveCursor aTmp( this, bSelect );
342}
343
344bool SwWrtShell::SttPg( bool bSelect )
345{
346 ShellMoveCursor aTmp( this, bSelect );
348}
349
350bool SwWrtShell::EndPg( bool bSelect )
351{
352 ShellMoveCursor aTmp( this, bSelect );
354}
355
356bool SwWrtShell::SttPara( bool bSelect )
357{
358 ShellMoveCursor aTmp( this, bSelect );
360}
361
362void 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
408bool 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.Contains(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 {
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
485bool 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.Contains( 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 );
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 {
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);
538 m_bDestOnStack = false;
539}
549bool 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
573bool SwWrtShell::GotoPage(sal_uInt16 nPage, bool bRecord)
574{
576 ShellMoveCursor aTmp( this, false);
577 if( SwCursorShell::GotoPage(nPage) && bRecord)
578 {
579 if(IsSelFrameMode())
580 {
583 }
584 return true;
585 }
586 return false;
587}
588
589bool 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
599bool 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
623bool 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
632bool 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
665bool 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
674bool 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
684bool SwWrtShell::GotoNextTOXBase( const OUString* pName )
685{
686 SwPosition aPos = *GetCursor()->GetPoint();
688 if (bRet)
690 return bRet;
691}
692
693bool 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{
711 SwPosition aPos = *GetCursor()->GetPoint();
712 bool bRet = SwCursorShell::GotoFootnoteAnchor(rTextFootnote);
713 if (bRet)
715}
716
718 SwPosition aPos = *GetCursor()->GetPoint();
719 const SwRangeRedline *pRedline = SwCursorShell::GotoRedline(nArrPos, bSelect);
720 if (pRedline)
722 return pRedline;
723}
724
725bool SwWrtShell::SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr )
726{
727 bool bRet;
728 {
729 SwMvContext aMvContext(this);
730 SttSelect();
731 bRet = SwCursorShell::SelectTextAttr( nWhich, false, pAttr );
732 }
733 EndSelect();
734 return bRet;
735}
736
737/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char * pName
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
const OUString & GetName() const
SdrPageView * GetSdrPageView() const
void UnmarkAll()
void Invalidate(sal_uInt16 nId)
SfxBindings & GetBindings()
SfxViewFrame * GetViewFrame() const
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo)
jump to reference marker
Definition: crstrvl.cxx:1273
bool LeftMargin()
Definition: crsrsh.hxx:367
const SwTableNode * IsCursorInTable() const
Definition: crsrsh.hxx:909
void SttCursorMove()
Definition: crsrsh.cxx:301
void ClearGCAttr()
Definition: crsrsh.hxx:775
const SwRect & GetCharRect() const
Definition: crsrsh.hxx:532
void HideCursor()
Definition: crsrsh.cxx:2429
bool IsCursorVisible() const
Definition: crsrsh.hxx:536
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:573
bool MoveRegion(SwWhichRegion, SwMoveFnCollection const &)
Definition: trvlreg.cxx:236
void MoveColumn(SwWhichColumn, SwPosColumn)
Definition: trvlcol.cxx:66
bool GotoFootnoteAnchor()
jump from footnote to anchor
Definition: trvlfnfl.cxx:167
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
Definition: crsrsh.cxx:696
bool GotoTable(const OUString &rName)
Definition: trvltbl.cxx:791
bool IsCursorReadonly() const
Definition: crsrsh.cxx:3306
bool RightMargin(bool bAPI=false)
Definition: crsrsh.hxx:368
bool GotoPage(sal_uInt16 nPage)
Definition: crsrsh.cxx:1188
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
Definition: trvltbl.cxx:679
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:194
bool GotoMark(const ::sw::mark::IMark *const pMark)
Definition: crbm.cxx:187
bool SelectTextAttr(sal_uInt16 nWhich, bool bExpand, const SwTextAttr *pAttr=nullptr)
Definition: crstrvl.cxx:2100
bool GotoNextTOXBase(const OUString *=nullptr)
jump to the next index
Definition: crstrvl.cxx:263
bool MovePage(SwWhichPage, SwPosPage)
Definition: crsrsh.cxx:634
bool Right(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:363
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
Definition: crstrvl.cxx:2443
bool Down(sal_uInt16 nCnt=1)
Definition: crsrsh.hxx:366
bool GotoOutline(const OUString &rName)
Definition: crstrvl.cxx:1042
bool IsGCAttr() const
Definition: crsrsh.hxx:774
void CallChgLnk()
Definition: crsrsh.cxx:2544
bool MoveSection(SwWhichSection, SwMoveFnCollection const &)
Definition: crsrsh.cxx:720
bool Left(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:361
bool GotoRegion(std::u16string_view rName)
Definition: trvlreg.cxx:270
bool GotoFormatField(const SwFormatField &rField)
Definition: crstrvl.cxx:870
bool GotoINetAttr(const SwTextINetFormat &rAttr)
Definition: crstrvl.cxx:2127
bool Up(sal_uInt16 nCnt=1)
Definition: crsrsh.hxx:365
void EndCursorMove(const bool bIdleEnd=false)
Definition: crsrsh.cxx:310
void GCAttr()
Definition: edatmisc.cxx:55
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
void EndAllAction()
Definition: edws.cxx:97
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
Definition: fews.cxx:237
bool HasBoxSelection() const
Is content of a table cell or at least a table cell completely selected?
Definition: fetab.cxx:976
bool IsFrameSelected() const
Definition: feshview.cxx:1253
bool IsObjSelectable(const Point &rPt)
The following two methods return enum SdrHdlKind.
Definition: feshview.cxx:1378
bool GotoFly(const OUString &rName, FlyCntType eType, bool bSelFrame)
Jump to named Fly (graphic/OLE).
Definition: feshview.cxx:2613
size_t IsObjSelected() const
Definition: feshview.cxx:1245
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
Point GetContentPos(const Point &rPoint, bool bNext) const
Provide information about content situated closes to given Point.
Definition: fews.cxx:84
Class for automated call of Start- and EndCursorMove().
Definition: editsh.hxx:1027
bool addEntry(const SwPosition &rPos)
Definition: navmgr.cxx:168
const SwPosition * GetPoint() const
Definition: pam.hxx:261
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
void Height(tools::Long nNew)
Definition: swrect.hxx:193
void Top(const tools::Long nTop)
Definition: swrect.hxx:206
void Pos(const Point &rNew)
Definition: swrect.hxx:171
bool Contains(const Point &rPOINT) const
Definition: swrect.hxx:356
vector_type::size_type size_type
Definition: docary.hxx:222
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition: txatbase.hxx:44
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:433
bool ActionPend() const
Definition: viewsh.hxx:204
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
Definition: viewsh.cxx:2809
Size GetDocSize() const
Definition: viewsh.cxx:2187
const SwRect & VisArea() const
Definition: viewsh.cxx:630
SdrView * GetDrawView()
Definition: vnew.cxx:373
tools::Long SetHScrollMax(tools::Long lMax)
Definition: viewport.cxx:130
tools::Long SetVScrollMax(tools::Long lMax)
Definition: viewport.cxx:140
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Definition: viewdraw.cxx:641
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
Definition: viewport.cxx:198
void LeaveDrawCreate()
Definition: view.hxx:541
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
bool m_bBlockMode
Definition: wrtsh.hxx:593
bool IsSelFrameMode() const
Definition: wrtsh.hxx:177
bool Down(bool bSelect, sal_uInt16 nCount=1, bool bBasicCall=false)
Definition: move.cxx:159
bool EndPg(bool bSelect=false)
Definition: move.cxx:350
bool LeftMargin()
Definition: crsrsh.hxx:367
void StartOfColumn()
Definition: move.cxx:372
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:702
void EndOfNextColumn()
Definition: move.cxx:390
void GotoFormatField(const SwFormatField &rField)
Definition: move.cxx:702
bool EndPrvPg(bool bSelect=false)
Definition: move.cxx:338
bool Right(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:127
bool GotoNextTOXBase(const OUString *pName=nullptr)
Definition: move.cxx:684
bool m_bDestOnStack
Definition: wrtsh.hxx:570
bool GotoDrawingObject(std::u16string_view rName)
Definition: move.cxx:632
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
Definition: move.cxx:717
void EndSelect()
Definition: select.cxx:425
void LeaveSelFrameMode()
Definition: select.cxx:720
std::unique_ptr< CursorStack > m_pCursorStack
Definition: wrtsh.hxx:564
void addCurrentPosition()
Definition: wrtsh1.cxx:1852
SAL_DLLPRIVATE bool GoStart(bool KeepArea, bool *, bool bSelect, bool bDontMoveRegion=false)
Definition: move.cxx:208
bool GotoPage(sal_uInt16 nPage, bool bRecord)
Definition: move.cxx:573
void GotoMark(const ::sw::mark::IMark *const pMark)
Definition: wrtsh3.cxx:273
bool Left(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
Definition: move.cxx:110
bool SttPara(bool bSelect=false)
Definition: move.cxx:356
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
Definition: move.cxx:599
bool GotoINetAttr(const SwTextINetFormat &rAttr)
Definition: move.cxx:608
void EndOfPrevColumn()
Definition: move.cxx:402
void ResetCursorStack()
Definition: wrtsh.hxx:644
bool GotoFootnoteAnchor()
jump from footnote to anchor
Definition: trvlfnfl.cxx:167
void EnterStdMode()
Definition: select.cxx:551
SELECTFUNC m_fnKillSel
Definition: wrtsh.hxx:117
void EndPara(bool bSelect=false)
Definition: move.cxx:362
bool SttNxtPg(bool bSelect=false)
Definition: move.cxx:320
SAL_DLLPRIVATE bool GoEnd(bool KeepArea=false, const bool *=nullptr)
Definition: move.cxx:274
void EndNxtPg(bool bSelect=false)
Definition: move.cxx:332
bool SttPg(bool bSelect=false)
Definition: move.cxx:344
bool GotoTable(const OUString &rName)
Definition: move.cxx:693
bool RightMargin(bool bSelect, bool bBasicCall)
Definition: move.cxx:190
bool GotoRegion(std::u16string_view rName)
Definition: move.cxx:665
bool SimpleMove(FNSimpleMove, bool bSelect)
Definition: move.cxx:91
SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect=false)
Definition: move.cxx:485
bool Up(bool bSelect, sal_uInt16 nCount=1, bool bBasicCall=false)
Definition: move.cxx:145
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
SwView & m_rView
Definition: wrtsh.hxx:566
void SttPrvPg(bool bSelect=false)
Definition: move.cxx:326
SwNavigationMgr m_aNavigationMgr
Definition: wrtsh.hxx:567
void GotoOutline(SwOutlineNodes::size_type nIdx)
Definition: move.cxx:617
Point m_aDest
Definition: wrtsh.hxx:569
SELECTFUNC m_fnSetCursor
Definition: wrtsh.hxx:115
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType=0, sal_uInt16 nSeqNo=0)
Definition: move.cxx:674
SAL_DLLPRIVATE void ResetCursorStack_()
Definition: move.cxx:533
bool EndOfSection(bool bSelect=false)
Definition: move.cxx:314
void SttSelect()
Definition: select.cxx:385
void UnSelectFrame()
Definition: select.cxx:323
void EndOfColumn()
Definition: move.cxx:378
void MoveCursor(bool bWithSelect=false)
Definition: move.cxx:74
SAL_DLLPRIVATE bool PushCursor(SwTwips lOffset, bool bSelect)
Definition: move.cxx:408
enum SwWrtShell::PageMove m_ePageMove
void StartOfNextColumn()
Definition: move.cxx:384
@ MV_PAGE_DOWN
Definition: wrtsh.hxx:542
@ MV_PAGE_UP
Definition: wrtsh.hxx:541
void StartOfPrevColumn()
Definition: move.cxx:396
bool SelectTextAttr(sal_uInt16 nWhich, const SwTextAttr *pAttr=nullptr)
Definition: move.cxx:725
bool StartOfSection(bool bSelect=false)
Definition: move.cxx:308
const SwView & GetView() const
Definition: wrtsh.hxx:438
int nCount
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:63
FlyCntType
Definition: flyenum.hxx:24
DocumentType eType
const tools::Long nReadOnlyScrollOfst
Always:
Definition: move.cxx:44
int i
long Long
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
Definition: pam.cxx:1224
bool GoCurrSection(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1264
SwMoveFnCollection const & fnParaStart
Definition: paminit.cxx:48
SwMoveFnCollection const & fnRegionEnd
Definition: paminit.cxx:58
SwMoveFnCollection const & fnTableEnd
Definition: paminit.cxx:55
SwMoveFnCollection const & fnSectionEnd
Definition: paminit.cxx:52
SwMoveFnCollection const & fnParaEnd
Definition: paminit.cxx:49
SwMoveFnCollection const & fnTableStart
Definition: paminit.cxx:54
SwMoveFnCollection const & fnRegionStart
Definition: paminit.cxx:57
SwMoveFnCollection const & fnSectionStart
Definition: paminit.cxx:51
Marks a position in the document model.
Definition: pam.hxx:37
SwCursorSkipMode
Definition: swcrsr.hxx:65
tools::Long SwTwips
Definition: swtypes.hxx:51
constexpr SwTwips DOCUMENTBORDER
Definition: swtypes.hxx:79
SwContentFrame * GetColumnEnd(const SwLayoutFrame *pColFrame)
Definition: trvlcol.cxx:51
SwLayoutFrame * GetPrevColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:40
SwLayoutFrame * GetCurrColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:27
SwLayoutFrame * GetNextColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:34
SwContentFrame * GetColumnStt(const SwLayoutFrame *pColFrame)
Definition: trvlcol.cxx:46
SwContentFrame * GetLastSub(const SwLayoutFrame *pLayout)
Definition: trvlfrm.cxx:1053
SwContentFrame * GetFirstSub(const SwLayoutFrame *pLayout)
Definition: trvlfrm.cxx:1048
SwLayoutFrame * GetPrevFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1075
SwLayoutFrame * GetThisFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1070
SwLayoutFrame * GetNextFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1058
bool GotoCurrRegionAndSkip(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosRegion, bool bInReadOnly)
Definition: trvlreg.cxx:181
bool GotoCurrTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
Definition: trvltbl.cxx:631