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 SwTableNode const*const pTable(getShellCursor(false)->GetPoint()->GetNode().FindTableNode());
230 assert(pTable);
231 if( MoveTable( GotoCurrTable, fnTableStart ) || bDontMoveRegion )
232 {
233 if ( pMoveTable )
234 *pMoveTable = true;
235 return true;
236 }
237 else if (SwCursor const*const pCursor = getShellCursor(false);
238 pTable->GetNodes()[pTable->GetIndex()+1]->EndOfSectionIndex()
239 < pCursor->GetPoint()->GetNode().GetIndex()
240 && pMoveTable != nullptr // only set by SelAll()
241 // problem: cursor isn't inside 1st cell, and didn't move there
242 // workaround: try to move cursor outside of table for SelAll()
243 && MoveOutOfTable())
244 {
245 assert(!*pMoveTable);
246 return true;
247 }
248 else if( bBoxSelection && pMoveTable )
249 {
250 // JP 09.01.96: We have a box selection (or an empty cell)
251 // and we want select (pMoveTable will be
252 // set in SelAll). Then the table must not
253 // be left, otherwise there is no selection
254 // of the entire table possible!
255 *pMoveTable = true;
256 return true;
257 }
258 }
259
260 if( !m_bBlockMode )
261 {
262 if ( !bSelect )
263 EnterStdMode();
264 else
265 SttSelect();
266 }
267 const FrameTypeFlags nFrameType = GetFrameType(nullptr,false);
268 if ( FrameTypeFlags::FLY_ANY & nFrameType )
269 {
271 return true;
272 else if ( FrameTypeFlags::FLY_FREE & nFrameType || bDontMoveRegion )
273 return false;
274 }
276 {
278 return true;
279 else if ( bKeepArea )
280 return true;
281 }
282
283 // first try to move to the start of the current SwSection
285 (pMoveTable != nullptr
286 // move to start of text - if in different table, move out
287 ? MoveStartText()
288 // TODO who needs SttEndDoc for other case?
290}
291
292bool SwWrtShell::GoEnd(bool bKeepArea, const bool *pMoveTable)
293{
294 if (pMoveTable && *pMoveTable) // only in SelAll()
295 {
296 SwTableNode const*const pTable(getShellCursor(false)->GetPoint()->GetNode().FindTableNode());
297 assert(pTable);
299 {
300 return true;
301 }
302 else if (SwCursor const*const pCursor = getShellCursor(false);
303 pCursor->GetPoint()->GetNode().GetIndex()
304 < pTable->GetNodes()[pTable->EndOfSectionIndex()-1]->StartOfSectionIndex()
305 // problem: cursor isn't inside 1st cell, and didn't move there
306 // workaround: try to move cursor outside of table for SelAll()
307 && MoveOutOfTable())
308 {
309 return true;
310 }
311 else
312 {
313 return false;
314 }
315 }
316
317 if ( IsCursorInTable() )
318 {
321 return true;
322 }
323 else
324 {
325 const FrameTypeFlags nFrameType = GetFrameType(nullptr,false);
326 if ( FrameTypeFlags::FLY_ANY & nFrameType )
327 {
329 return true;
330 else if ( FrameTypeFlags::FLY_FREE & nFrameType )
331 return false;
332 }
334 {
336 return true;
337 else if ( bKeepArea )
338 return true;
339 }
340 }
341 // Regions ???
344}
345
346bool SwWrtShell::StartOfSection(bool const bSelect)
347{
348 ShellMoveCursor aTmp( this, bSelect );
349 return GoStart(false, nullptr, bSelect );
350}
351
352bool SwWrtShell::EndOfSection(bool const bSelect)
353{
354 ShellMoveCursor aTmp( this, bSelect );
355 return GoEnd();
356}
357
358bool SwWrtShell::SttNxtPg( bool bSelect )
359{
360 ShellMoveCursor aTmp( this, bSelect );
362}
363
364void SwWrtShell::SttPrvPg( bool bSelect )
365{
366 ShellMoveCursor aTmp( this, bSelect );
368}
369
370void SwWrtShell::EndNxtPg( bool bSelect )
371{
372 ShellMoveCursor aTmp( this, bSelect );
374}
375
376bool SwWrtShell::EndPrvPg( bool bSelect )
377{
378 ShellMoveCursor aTmp( this, bSelect );
380}
381
382bool SwWrtShell::SttPg( bool bSelect )
383{
384 ShellMoveCursor aTmp( this, bSelect );
386}
387
388bool SwWrtShell::EndPg( bool bSelect )
389{
390 ShellMoveCursor aTmp( this, bSelect );
392}
393
394bool SwWrtShell::SttPara( bool bSelect )
395{
396 ShellMoveCursor aTmp( this, bSelect );
398}
399
400void SwWrtShell::EndPara( bool bSelect )
401{
402 ShellMoveCursor aTmp( this, bSelect );
404}
405
406// Column-by-jumping.
407// SSelection with or without
408// returns success or failure
409
411{
412 ShellMoveCursor aTmp( this, false/*bSelect*/);
414}
415
417{
418 ShellMoveCursor aTmp( this, false/*bSelect*/);
420}
421
423{
424 ShellMoveCursor aTmp( this, false/*bSelect*/);
426}
427
429{
430 ShellMoveCursor aTmp( this, false/*bSelect*/);
432}
433
435{
436 ShellMoveCursor aTmp( this, false/*bSelect*/);
438}
439
441{
442 ShellMoveCursor aTmp( this, false/*bSelect*/);
444}
445
446bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect)
447{
448 bool bDiff = false;
449 SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() );
450
451 // m_bDestOnStack indicates if I could not set the coursor at the current
452 // position, because in this region is no content.
453 if( !m_bDestOnStack )
454 {
455 Point aPt( aOldRect.Center() );
456
457 if( !IsCursorVisible() )
458 // set CursorPos to top-/bottom left pos. So the pagescroll is not
459 // be dependent on the current cursor, but on the visarea.
460 aPt.setY( aTmpArea.Top() + aTmpArea.Height() / 2 );
461
462 aPt.AdjustY(lOffset );
463 m_aDest = GetContentPos(aPt,lOffset > 0);
464 m_aDest.setX( aPt.X() );
465 m_bDestOnStack = true;
466 }
467
468 // If we had a frame selection, it must be removed after the m_fnSetCursor
469 // and we have to remember the position on the stack to return to it later.
470 bool bIsFrameSel = false;
471
472 //Target position is now within the viewable region -->
473 //Place the cursor at the target position; remember that no target
474 //position is longer on the stack.
475 //The new visible region is to be determined beforehand.
476 aTmpArea.Pos().AdjustY(lOffset );
477 if( aTmpArea.Contains(m_aDest) )
478 {
479 if( bSelect )
480 SttSelect();
481 else
482 EndSelect();
483
484 bIsFrameSel = IsFrameSelected();
485 bool bIsObjSel = 0 != IsObjSelected();
486
487 // unselect frame
488 if( bIsFrameSel || bIsObjSel )
489 {
492 if ( bIsObjSel )
493 {
494 GetView().SetDrawFuncPtr( nullptr );
496 }
497
498 CallChgLnk();
499 }
500
501 (this->*m_fnSetCursor)( &m_aDest, true );
502
503 bDiff = aOldRect != GetCharRect();
504
505 if( bIsFrameSel )
506 {
507 // In frames take only the upper corner
508 // so that it can be re-selected.
509 aOldRect.SSize( 5, 5 );
510 }
511
512 // reset Dest. SPoint Flags
513 m_bDestOnStack = false;
514 }
515
516 // Position into the stack; bDiff indicates if there is a
517 // difference between the old and the new cursor position.
518 m_pCursorStack.reset( new CursorStack( bDiff, bIsFrameSel, aOldRect.Center(),
519 lOffset, std::move(m_pCursorStack) ) );
520 return !m_bDestOnStack && bDiff;
521}
522
523bool SwWrtShell::PopCursor(bool bUpdate, bool bSelect)
524{
525 if( nullptr == m_pCursorStack)
526 return false;
527
528 const bool bValidPos = m_pCursorStack->bValidCurPos;
529 if( bUpdate && bValidPos )
530 {
531 // If a predecessor is on the stack,
532 // use the flag for a valid position.
533 SwRect aTmpArea(VisArea());
534 aTmpArea.Pos().AdjustY( -(m_pCursorStack->lOffset) );
535 if( aTmpArea.Contains( m_pCursorStack->aDocPos ) )
536 {
537 if( bSelect )
538 SttSelect();
539 else
540 EndSelect();
541
542 (this->*m_fnSetCursor)(&m_pCursorStack->aDocPos, !m_pCursorStack->bIsFrameSel);
543 if( m_pCursorStack->bIsFrameSel && IsObjSelectable(m_pCursorStack->aDocPos))
544 {
545 HideCursor();
546 SelectObj( m_pCursorStack->aDocPos );
548 }
549 }
550 // If a discrepancy between the visible range and the
551 // remembered cursor position occurs, all of the remembered
552 // positions are thrown away.
553 else
554 {
556 return false;
557 }
558 }
559 m_pCursorStack = std::move(m_pCursorStack->pNext);
560 if( nullptr == m_pCursorStack )
561 {
563 m_bDestOnStack = false;
564 }
565 return bValidPos;
566}
567
568// Reset of all pushed cursor positions; these will
569// not be displayed ( --> No Start-/EndAction!!)
570
572{
573 while(m_pCursorStack)
574 m_pCursorStack = std::move(m_pCursorStack->pNext);
576 m_bDestOnStack = false;
577}
587bool SwWrtShell::PageCursor(SwTwips lOffset, bool bSelect)
588{
589 // Do nothing if an offset of 0 was indicated
590 if(!lOffset) return false;
591 // Was once used to force a reformat of the layout.
592 // This has not work that way, because the cursor was not set
593 // because this does not happen within a
594 // Start-/EndActionParentheses.
595 // Because only SwViewShell::EndAction() is called at the end,
596 // no updating of the display of the cursor position takes place.
597 // The CursorShell-Actionparentheses cannot be used, because it
598 // always leads to displaying the cursor, thus also,
599 // if after the scroll scrolled in a region without a valid position.
600 // SwViewShell::StartAction();
601 PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP;
602 // Change of direction and stack present
603 if( eDir != m_ePageMove && m_ePageMove != MV_NO && PopCursor( true, bSelect ))
604 return true;
605
606 const bool bRet = PushCursor(lOffset, bSelect);
607 m_ePageMove = eDir;
608 return bRet;
609}
610
611bool SwWrtShell::GotoPage(sal_uInt16 nPage, bool bRecord)
612{
614 ShellMoveCursor aTmp( this, false);
615 if( SwCursorShell::GotoPage(nPage) && bRecord)
616 {
617 if(IsSelFrameMode())
618 {
621 }
622 return true;
623 }
624 return false;
625}
626
627bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect )
628{
629 ShellMoveCursor aTmp( this, bSelect );
630 SwPosition aPos = *GetCursor()->GetPoint();
631 bool bRet = SwCursorShell::GotoMark( pMark, true/*bStart*/ );
632 if (bRet)
634 return bRet;
635}
636
637bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame )
638{
639 SwPosition aPos = *GetCursor()->GetPoint();
640 bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame);
641 if (bRet)
643 return bRet;
644}
645
647{
648 SwPosition aPos = *GetCursor()->GetPoint();
649 bool bRet = SwCursorShell::GotoINetAttr(rAttr);
650 if (bRet)
652 return bRet;
653}
654
656{
659}
660
661bool SwWrtShell::GotoOutline( const OUString& rName )
662{
663 SwPosition aPos = *GetCursor()->GetPoint();
664 bool bRet = SwCursorShell::GotoOutline (rName);
665 if (bRet)
667 return bRet;
668}
669
670bool SwWrtShell::GotoDrawingObject(std::u16string_view rName)
671{
672 SwPosition aPos = *GetCursor()->GetPoint();
673 bool bRet = false;
674 SdrView* pDrawView = GetDrawView();
675 if (pDrawView)
676 {
677 pDrawView->SdrEndTextEdit();
678 pDrawView->UnmarkAll();
680 const size_t nCount = pPage->GetObjCount();
681 for (size_t i = 0; i < nCount; ++i)
682 {
683 SdrObject* pObj = pPage->GetObj(i);
684 if (pObj->GetName() == rName)
685 {
686 SdrPageView* pPageView = pDrawView->GetSdrPageView();
687 if(pPageView)
688 {
689 pDrawView->MarkObj(pObj, pPageView);
691 EnterStdMode();
692 HideCursor();
694 bRet = true;
695 }
696 break;
697 }
698 }
699 }
700 return bRet;
701}
702
703bool SwWrtShell::GotoRegion( std::u16string_view rName )
704{
705 SwPosition aPos = *GetCursor()->GetPoint();
706 bool bRet = SwCursorShell::GotoRegion (rName);
707 if (bRet)
709 return bRet;
710 }
711
712bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType,
713 sal_uInt16 nSeqNo )
714{
715 SwPosition aPos = *GetCursor()->GetPoint();
716 bool bRet = SwCursorShell::GotoRefMark(rRefMark, nSubType, nSeqNo);
717 if (bRet)
719 return bRet;
720}
721
722bool SwWrtShell::GotoNextTOXBase( const OUString* pName )
723{
724 SwPosition aPos = *GetCursor()->GetPoint();
726 if (bRet)
728 return bRet;
729}
730
731bool SwWrtShell::GotoTable( const OUString& rName )
732{
733 SwPosition aPos = *GetCursor()->GetPoint();
734 bool bRet = SwCursorShell::GotoTable(rName);
735 if (bRet)
737 return bRet;
738}
739
741 SwPosition aPos = *GetCursor()->GetPoint();
742 bool bRet = SwCursorShell::GotoFormatField(rField);
743 if (bRet)
745}
746
748{
749 SwPosition aPos = *GetCursor()->GetPoint();
750 bool bRet = SwCursorShell::GotoFootnoteAnchor(rTextFootnote);
751 if (bRet)
753}
754
756 SwPosition aPos = *GetCursor()->GetPoint();
757 const SwRangeRedline *pRedline = SwCursorShell::GotoRedline(nArrPos, bSelect);
758 if (pRedline)
760 return pRedline;
761}
762
763bool SwWrtShell::SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr )
764{
765 bool bRet;
766 {
767 SwMvContext aMvContext(this);
768 SttSelect();
769 bRet = SwCursorShell::SelectTextAttr( nWhich, false, pAttr );
770 }
771 EndSelect();
772 return bRet;
773}
774
775/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char * pName
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
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
virtual 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:1404
bool LeftMargin()
Definition: crsrsh.hxx:370
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
Definition: crsrsh.cxx:600
void SttCursorMove()
Definition: crsrsh.cxx:301
void ClearGCAttr()
Definition: crsrsh.hxx:786
const SwRect & GetCharRect() const
Definition: crsrsh.hxx:536
void HideCursor()
Definition: crsrsh.cxx:2731
bool IsCursorVisible() const
Definition: crsrsh.hxx:540
bool SttEndDoc(bool bStt)
Definition: crsrsh.cxx:579
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:982
bool GotoTable(const OUString &rName)
Definition: trvltbl.cxx:791
bool MoveStartText()
Definition: crsrsh.cxx:732
bool IsCursorReadonly() const
Definition: crsrsh.cxx:3609
bool RightMargin(bool bAPI=false)
Definition: crsrsh.hxx:371
bool GotoPage(sal_uInt16 nPage)
Definition: crsrsh.cxx:1488
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 MoveOutOfTable()
Definition: crsrsh.cxx:627
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:2258
bool GotoNextTOXBase(const OUString *=nullptr)
jump to the next index
Definition: crstrvl.cxx:266
bool MovePage(SwWhichPage, SwPosPage)
Definition: crsrsh.cxx:920
bool Right(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:366
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
Definition: crstrvl.cxx:2604
bool Down(sal_uInt16 nCnt=1)
Definition: crsrsh.hxx:369
bool GotoOutline(const OUString &rName)
Definition: crstrvl.cxx:1173
bool IsGCAttr() const
Definition: crsrsh.hxx:785
void CallChgLnk()
Definition: crsrsh.cxx:2847
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
Definition: crsrsh.cxx:3356
bool MoveSection(SwWhichSection, SwMoveFnCollection const &)
Definition: crsrsh.cxx:1006
bool Left(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:364
bool GotoRegion(std::u16string_view rName)
Definition: trvlreg.cxx:270
bool GotoFormatField(const SwFormatField &rField)
Definition: crstrvl.cxx:1001
bool GotoINetAttr(const SwTextINetFormat &rAttr)
Definition: crstrvl.cxx:2285
bool Up(sal_uInt16 nCnt=1)
Definition: crsrsh.hxx:368
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:1041
bool IsFrameSelected() const
Definition: feshview.cxx:1133
bool IsObjSelectable(const Point &rPt)
The following two methods return enum SdrHdlKind.
Definition: feshview.cxx:1258
bool GotoFly(const OUString &rName, FlyCntType eType, bool bSelFrame)
Jump to named Fly (graphic/OLE).
Definition: feshview.cxx:2493
size_t IsObjSelected() const
Definition: feshview.cxx:1125
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:161
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:1048
bool addEntry(const SwPosition &rPos)
Definition: navmgr.cxx:168
SwNodeOffset GetIndex() const
Definition: node.hxx:312
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:706
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:691
const SwPosition * GetPoint() const
Definition: pam.hxx:253
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:223
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Definition: txatbase.hxx:44
SwTextAttr subclass for footnotes and endnotes.
Definition: txtftn.hxx:34
SwTextAttr subclass that tracks the location of the wrapped SwFormatURL.
Definition: txtinet.hxx:30
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:452
bool ActionPend() const
Definition: viewsh.hxx:225
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
Definition: viewsh.cxx:2823
Size GetDocSize() const
Definition: viewsh.cxx:2190
const SwRect & VisArea() const
Definition: viewsh.cxx:642
SdrView * GetDrawView()
Definition: vnew.cxx:386
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:549
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
bool m_bBlockMode
Definition: wrtsh.hxx:600
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:388
bool LeftMargin()
Definition: crsrsh.hxx:370
void StartOfColumn()
Definition: move.cxx:410
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:711
void EndOfNextColumn()
Definition: move.cxx:428
void GotoFormatField(const SwFormatField &rField)
Definition: move.cxx:740
bool EndPrvPg(bool bSelect=false)
Definition: move.cxx:376
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:722
bool m_bDestOnStack
Definition: wrtsh.hxx:577
bool GotoDrawingObject(std::u16string_view rName)
Definition: move.cxx:670
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
Definition: move.cxx:755
void EndSelect()
Definition: select.cxx:434
void LeaveSelFrameMode()
Definition: select.cxx:729
std::unique_ptr< CursorStack > m_pCursorStack
Definition: wrtsh.hxx:571
void addCurrentPosition()
Definition: wrtsh1.cxx:1869
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:611
void GotoMark(const ::sw::mark::IMark *const pMark)
Definition: wrtsh3.cxx:272
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:394
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
Definition: move.cxx:637
bool GotoINetAttr(const SwTextINetFormat &rAttr)
Definition: move.cxx:646
void EndOfPrevColumn()
Definition: move.cxx:440
void ResetCursorStack()
Definition: wrtsh.hxx:651
bool GotoFootnoteAnchor()
jump from footnote to anchor
Definition: trvlfnfl.cxx:167
void EnterStdMode()
Definition: select.cxx:560
SELECTFUNC m_fnKillSel
Definition: wrtsh.hxx:117
void EndPara(bool bSelect=false)
Definition: move.cxx:400
bool SttNxtPg(bool bSelect=false)
Definition: move.cxx:358
SAL_DLLPRIVATE bool GoEnd(bool KeepArea=false, const bool *=nullptr)
Definition: move.cxx:292
void EndNxtPg(bool bSelect=false)
Definition: move.cxx:370
bool SttPg(bool bSelect=false)
Definition: move.cxx:382
bool GotoTable(const OUString &rName)
Definition: move.cxx:731
bool RightMargin(bool bSelect, bool bBasicCall)
Definition: move.cxx:190
bool GotoRegion(std::u16string_view rName)
Definition: move.cxx:703
bool SimpleMove(FNSimpleMove, bool bSelect)
Definition: move.cxx:91
SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect=false)
Definition: move.cxx:523
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:587
SwView & m_rView
Definition: wrtsh.hxx:573
void SttPrvPg(bool bSelect=false)
Definition: move.cxx:364
SwNavigationMgr m_aNavigationMgr
Definition: wrtsh.hxx:574
void GotoOutline(SwOutlineNodes::size_type nIdx)
Definition: move.cxx:655
Point m_aDest
Definition: wrtsh.hxx:576
SELECTFUNC m_fnSetCursor
Definition: wrtsh.hxx:115
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType=0, sal_uInt16 nSeqNo=0)
Definition: move.cxx:712
SAL_DLLPRIVATE void ResetCursorStack_()
Definition: move.cxx:571
bool EndOfSection(bool bSelect=false)
Definition: move.cxx:352
void SttSelect()
Definition: select.cxx:394
void UnSelectFrame()
Definition: select.cxx:332
void EndOfColumn()
Definition: move.cxx:416
void MoveCursor(bool bWithSelect=false)
Definition: move.cxx:74
SAL_DLLPRIVATE bool PushCursor(SwTwips lOffset, bool bSelect)
Definition: move.cxx:446
enum SwWrtShell::PageMove m_ePageMove
void StartOfNextColumn()
Definition: move.cxx:422
@ MV_PAGE_DOWN
Definition: wrtsh.hxx:549
@ MV_PAGE_UP
Definition: wrtsh.hxx:548
void StartOfPrevColumn()
Definition: move.cxx:434
bool SelectTextAttr(sal_uInt16 nWhich, const SwTextAttr *pAttr=nullptr)
Definition: move.cxx:763
bool StartOfSection(bool bSelect=false)
Definition: move.cxx:346
const SwView & GetView() const
Definition: wrtsh.hxx:443
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:1248
SwContentNode * GetNode(SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
This function returns the next node in direction of search.
Definition: pam.cxx:1043
bool GoCurrSection(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Definition: pam.cxx:1288
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:38
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