LibreOffice Module sw (master) 1
delete.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 <hintids.hxx>
21#include <wrtsh.hxx>
22#include <swcrsr.hxx>
23#include <editeng/lrspitem.hxx>
24#include <view.hxx>
25#include <drawbase.hxx>
26#include <unobaseclass.hxx>
27#include <fmtanchr.hxx>
28#include <flyfrm.hxx>
29#include <ndtxt.hxx>
30#include <txtfld.hxx>
31#include <docufld.hxx>
32#include <IDocumentUndoRedo.hxx>
33#include <i18nutil/unicode.hxx>
34#include <o3tl/temporary.hxx>
35#include <rtl/character.hxx>
36#include <osl/diagnose.h>
37#include <doc.hxx>
39
41{
44 KillPams();
45 SetMark();
46}
47
48inline void SwWrtShell::CloseMark( bool bOkFlag )
49{
50 if( bOkFlag )
51 UpdateAttr();
52 else
53 SwapPam();
54
55 ClearMark();
57}
58
59
60
61// #i23725#
63{
64 bool bResult = false;
65
67 GetCurAttr(aAttrSet);
68
69 SvxLRSpaceItem aItem = aAttrSet.Get(RES_LR_SPACE);
70 short aOldFirstLineOfst = aItem.GetTextFirstLineOffset();
71
72 if (aOldFirstLineOfst > 0)
73 {
75 bResult = true;
76 }
77 else if (aOldFirstLineOfst < 0)
78 {
80 aItem.SetLeft(aItem.GetLeft() + aOldFirstLineOfst);
81
82 bResult = true;
83 }
84 else if (aItem.GetLeft() != 0)
85 {
86 aItem.SetLeft(0);
87 bResult = true;
88 }
89
90 if (bResult)
91 {
92 aAttrSet.Put(aItem);
93 SetAttrSet(aAttrSet);
94 }
95
96 return bResult;
97}
98
102{
103 SwActContext aActContext(this);
105 // remember the old cursor
106 Push();
107 ClearMark();
109 SetMark();
111
112 bool bRet = Delete(false);
114 if( bRet )
115 UpdateAttr();
116}
117
119{
120 OpenMark();
122 bool bRet = Delete(false);
123 CloseMark( bRet );
124}
125
127{
128 OpenMark();
130 bool bRet = Delete(false);
131 CloseMark( bRet );
132}
133
135{
136 // If it's a Fly, throw it away
137 SelectionType nSelType = GetSelectionType();
139 if( nCmp & nSelType )
140 {
141 // #108205# Remember object's position.
142 Point aTmpPt = GetObjRect().TopLeft();
143
145
146 // #108205# Set cursor to remembered position.
147 SetCursor(&aTmpPt);
148
151
152 nSelType = GetSelectionType();
153 if ( nCmp & nSelType )
154 {
156 GotoNextFly();
157 }
158
159 return true;
160 }
161
162 // If a selection exists, erase this
163 if ( IsSelection() )
164 {
165 if( !IsBlockMode() || HasSelection() )
166 {
167 //OS: Once again Basic: SwActContext must be leaved
168 //before EnterStdMode!
169 {
170 SwActContext aActContext(this);
172 Delete(false);
173 UpdateAttr();
174 }
175 if( IsBlockMode() )
176 {
177 NormalizePam();
178 ClearMark();
180 }
181 else
182 EnterStdMode();
183 return true;
184 }
185 else
186 EnterStdMode();
187 }
188
189 // JP 29.06.95: never erase a table standing in front of it.
190 bool bSwap = false;
191 const SwTableNode * pWasInTableNd = SwCursorShell::IsCursorInTable();
192
194 {
195 // Start/EndAllAction to avoid cursor flickering
198
199 // #i4032# Don't actually call a 'delete' if we
200 // changed the table cell, compare DelRight().
201 const SwStartNode * pSNdOld = pWasInTableNd ?
203 nullptr;
204
205 // If the cursor is at the beginning of a paragraph, try to step
206 // backwards. On failure we are done.
207 bool bDoSomething = SwCursorShell::Left(1,CRSR_SKIP_CHARS);
208
209 if (bDoSomething)
210 {
211 // If the cursor entered or left a table (or both) we are done.
212 const SwTableNode* pIsInTableNd = SwCursorShell::IsCursorInTable();
213 bDoSomething = pIsInTableNd == pWasInTableNd;
214
215 if (bDoSomething)
216 {
217 const SwStartNode* pSNdNew = pIsInTableNd ?
219 nullptr;
220
221 // #i4032# Don't actually call a 'delete' if we
222 // changed the table cell, compare DelRight().
223 bDoSomething = pSNdOld == pSNdNew;
224 }
225 }
226
227 if (!bDoSomething)
228 {
229 // tdf#115132 Restore previous position and we are done
231 return false;
232 }
233
235
236 OpenMark();
239 bSwap = true;
240 }
241 else
242 {
243 // If we are just to the right to a fieldmark, then remove it completely
244 const SwPosition* pCurPos = GetCursor()->GetPoint();
245 SwPosition aPrevChar(*pCurPos);
246 --aPrevChar.nContent;
248 if (pFm && pFm->GetMarkEnd() == *pCurPos)
249 {
250 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
253 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
254 return true;
255 }
256
257 OpenMark();
259 if (SvtScriptType::ASIAN == GetScriptType())
260 {
261 sal_uInt32 nCode = GetChar(false);
262 if ( rtl::isSurrogate( nCode ) )
263 {
264 OUString sStr = GetSelText();
265 nCode = sStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
266 }
267
269 {
272 OUString sStr = GetSelText();
273 nCode = sStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
276 else
278 }
279 }
280 }
281 bool bRet = Delete(true);
282 if( !bRet && bSwap )
284 CloseMark( bRet );
285 if (!bRet)
286 { // false indicates HasReadonlySel failed
287 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
288 std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
289 xInfo->run();
290 }
291 return bRet;
292}
293
294bool SwWrtShell::DelRight(bool const isReplaceHeuristic)
295{
296 // Will be or'ed, if a tableselection exists;
297 // will here be implemented on SelectionType::Table
298 bool bRet = false;
299 SelectionType nSelection = GetSelectionType();
300 if(nSelection & SelectionType::TableCell)
301 nSelection = SelectionType::Table;
302 if(nSelection & SelectionType::Text)
303 nSelection = SelectionType::Text;
304
305 switch( nSelection & ~SelectionType::Ornament & ~SelectionType::Media )
306 {
311 // If a selection exists, erase it.
312 if( IsSelection() )
313 {
314 if( !IsBlockMode() || HasSelection() )
315 {
316 //OS: And once again Basic: SwActContext must be
317 //leaved before EnterStdMode !
318 {
319 SwActContext aActContext(this);
321 Delete(isReplaceHeuristic);
322 UpdateAttr();
323 }
324 if( IsBlockMode() )
325 {
326 NormalizePam();
327 ClearMark();
329 }
330 else
331 EnterStdMode();
332 bRet = true;
333 break;
334 }
335 else
336 EnterStdMode();
337 }
338
340 {
341 // Start/EndAllAction to avoid cursor flickering
343
344 const SwTableNode* pWasInTableNd = IsCursorInTable();
345 // #108049# Save the startnode of the current cell
346 const SwStartNode* pSNdOld = pWasInTableNd ?
347 GetCursor()->GetNode().FindTableBoxStartNode() : nullptr;
348 bool bCheckDelFull = SelectionType::Text & nSelection && SwCursorShell::IsSttPara();
349 bool bDelFull = false;
350 bool bDoNothing = false;
351
352 // #i41424# Introduced a couple of
353 // Push()-Pop() pairs here. The reason for this is that a
354 // Right()-Left() combination does not make sure, that
355 // the cursor will be in its initial state, because there
356 // may be a numbering in front of the next paragraph.
358
360 {
361 const SwTableNode* pCurrTableNd = IsCursorInTable();
362 bDelFull = bCheckDelFull && pCurrTableNd && pCurrTableNd != pWasInTableNd;
363 if (!bDelFull && (IsCursorInTable() || (pCurrTableNd != pWasInTableNd)))
364 {
365 // #108049# Save the startnode of the current cell.
366 // May be different to pSNdOld as we have moved.
367 const SwStartNode* pSNdNew = pCurrTableNd ?
368 GetCursor()->GetNode().FindTableBoxStartNode() : nullptr;
369
370 // tdf#115132 Only keep cursor position instead of deleting
371 // if we have moved to a different cell
372 bDoNothing = pSNdOld != pSNdNew;
373 }
374 }
375
376 // restore cursor
378
379 if (bDelFull)
380 {
381 DelFullPara();
382 UpdateAttr();
383 }
384 if (bDelFull || bDoNothing)
385 break;
386 }
387
388 {
389 // If we are just ahead of a fieldmark, then remove it completely
391 if (pFm && pFm->GetMarkStart() == *GetCursor()->GetPoint())
392 {
393 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
396 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
397 bRet = true;
398 break;
399 }
400 }
401
402 OpenMark();
404 bRet = Delete(true);
405 CloseMark( bRet );
406 if (!bRet)
407 { // false indicates HasReadonlySel failed
408 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
409 std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
410 xInfo->run();
411 }
412 break;
413
420 {
421 // Group deletion of the object and its comment together
422 // (also as-character anchor conversion at track changes)
423 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
424
425 // #108205# Remember object's position.
426 Point aTmpPt = GetObjRect().TopLeft();
427
428 // Remember the anchor of the selected object before deletion.
429 std::unique_ptr<SwPosition> pAnchor;
430 RndStdIds eAnchorId = RndStdIds::FLY_AT_PARA;
432 SwFrameFormat* pFormat = nullptr;
433 if (pFly)
434 {
435 pFormat = pFly->GetFormat();
436 if (pFormat)
437 {
438 eAnchorId = pFormat->GetAnchor().GetAnchorId();
439 // to-character anchor conversion at track changes
440 if ( IsRedlineOn() && (eAnchorId != RndStdIds::FLY_AS_CHAR &&
441 eAnchorId != RndStdIds::FLY_AT_CHAR) )
442 {
444 GetFlyFrameAttr(aSet);
445 SwFormatAnchor aAnch(RndStdIds::FLY_AT_CHAR);
446 aSet.Put(aAnch);
447 SetFlyFrameAttr(aSet);
448 eAnchorId = pFormat->GetAnchor().GetAnchorId();
449 }
450 if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR)
451 && pFormat->GetAnchor().GetContentAnchor())
452 {
453 pAnchor.reset(new SwPosition(*pFormat->GetAnchor().GetContentAnchor()));
454 // set cursor before the anchor point
455 if ( IsRedlineOn() )
456 *GetCurrentShellCursor().GetPoint() = *pAnchor;
457 }
458 }
459 }
460
461 // track changes: create redline at anchor point of the image to record the deletion
462 if ( IsRedlineOn() && pAnchor && SelectionType::Graphic & nSelection && pFormat &&
463 ( eAnchorId == RndStdIds::FLY_AT_CHAR || eAnchorId == RndStdIds::FLY_AS_CHAR ) )
464 {
465 sal_Int32 nRedlineLength = 1;
466 // create a double CH_TXT_TRACKED_DUMMY_CHAR anchor point of the image to record the
467 // deletion, if needed (otherwise use the existing anchor point of the image anchored
468 // *as* character)
469 if ( eAnchorId == RndStdIds::FLY_AT_CHAR )
470 {
471 nRedlineLength = 2;
476 Insert( OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) +
477 OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) );
478 SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
480 anchor.SetAnchor(GetCursor()->GetPoint());
481 GetDoc()->SetAttr(anchor, *pFormat);
482 SetRedlineFlags( eOld );
484 }
485 OpenMark();
486 SwCursorShell::Right(nRedlineLength, CRSR_SKIP_CHARS);
487 bRet = Delete(false);
488 CloseMark( bRet );
489 }
490 else
492
493 if (pAnchor)
494 {
495 SwTextNode* pTextNode = pAnchor->nNode.GetNode().GetTextNode();
496 if (pTextNode)
497 {
498 const SwTextField* pField(
499 pTextNode->GetFieldTextAttrAt(pAnchor->nContent.GetIndex(), true));
500 if (pField
501 && dynamic_cast<const SwPostItField*>(pField->GetFormatField().GetField()))
502 {
503 // Remove the comment of the deleted object.
504 *GetCurrentShellCursor().GetPoint() = *pAnchor;
505 DelRight();
506 }
507 }
508 }
509
510 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
511
512 // #108205# Set cursor to remembered position.
513 SetCursor(&aTmpPt);
514
517 OSL_ENSURE( !IsFrameSelected(),
518 "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrame()> should unmark all objects" );
519 // leave draw mode, if necessary.
520 {
521 if (GetView().GetDrawFuncPtr())
522 {
524 GetView().SetDrawFuncPtr(nullptr);
525 }
526 if ( GetView().IsDrawMode() )
527 {
529 }
530 }
531 }
532
533 // <IsFrameSelected()> can't be true - see above.
534 {
535 nSelection = GetSelectionType();
536 if ( SelectionType::Frame & nSelection ||
537 SelectionType::Graphic & nSelection ||
538 SelectionType::Ole & nSelection ||
539 SelectionType::DrawObject & nSelection )
540 {
542 GotoNextFly();
543 }
544 }
545 bRet = true;
546 break;
547 default: break;
548 }
549 return bRet;
550}
551
553{
554 SwActContext aActContext(this);
556 Push();
557 SetMark();
559 {
561 return;
562 }
563 bool bRet = Delete(false);
565 if( bRet )
566 UpdateAttr();
567}
568
570{
571 SwActContext aActContext(this);
573 Push();
574 SetMark();
576 {
578 return;
579 }
580 bool bRet = Delete(false);
582 if( bRet )
583 UpdateAttr();
584}
585
586// All erase operations should work with Find instead with
587// Nxt-/PrvDelim, because the latter works with Wrap Around
588// -- that's probably not wished.
589
591{
592 if(IsStartOfDoc())
593 return;
594 OpenMark();
595 bool bRet = BwdSentence_() && Delete(false);
596 CloseMark( bRet );
597}
598
600{
601 if(IsEndOfDoc())
602 return false;
603 OpenMark();
604 bool bRet(false);
605 // fdo#60967: special case that is documented in help: delete
606 // paragraph following table if cursor is at end of last cell in table
607 if (IsEndOfTable())
608 {
609 Push();
610 ClearMark();
612 {
613 SetMark();
614 if (!IsEndPara()) // can only be at the end if it's empty
615 { // for an empty paragraph this would actually select the _next_
617 }
618 if (!IsEndOfDoc()) // do not delete last paragraph in body text
619 {
620 bRet = DelFullPara();
621 }
622 }
624 }
625 else
626 {
627 bRet = FwdSentence_() && Delete(false);
628 }
629 CloseMark( bRet );
630 return bRet;
631}
632
634{
635 if(IsEndOfDoc())
636 return;
637 SwActContext aActContext(this);
639 EnterStdMode();
640 SetMark();
641 if(IsEndWrd() && !IsStartWord())
642 NxtWrdForDelete(); // #i92468#
643 if(IsStartWord() || IsEndPara())
644 NxtWrdForDelete(); // #i92468#
645 else
646 EndWrd();
647
648 bool bRet = Delete(false);
649 if( bRet )
650 UpdateAttr();
651 else
652 SwapPam();
653 ClearMark();
654}
655
657{
658 if(IsStartOfDoc())
659 return;
660 SwActContext aActContext(this);
662 EnterStdMode();
663 SetMark();
664 if ( !IsStartWord() ||
665 !PrvWrdForDelete() ) // #i92468#
666 {
667 if (IsEndWrd() || IsSttPara())
668 PrvWrdForDelete(); // #i92468#
669 else
670 SttWrd();
671 }
672 bool bRet = Delete(false);
673 if( bRet )
674 UpdateAttr();
675 else
676 SwapPam();
677 ClearMark();
678}
679
680/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ Ignore
ignore Redlines
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
virtual ::sw::mark::IFieldmark * getFieldmarkAt(const SwPosition &rPos) const =0
get Fieldmark for CH_TXT_ATR_FIELDSTART/CH_TXT_ATR_FIELDEND at rPos
static void DeleteFieldmarkCommand(::sw::mark::IFieldmark const &rMark)
Definition: docbm.cxx:522
virtual std::unique_ptr< ILazyDeleter > deleteMark(const IDocumentMarkAccess::const_iterator_t &ppMark, bool isMoveNodes)=0
Deletes a mark.
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
short GetTextFirstLineOffset() const
tools::Long GetLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
Class for automated call of Start- and EndAction().
Definition: editsh.hxx:1018
bool LeftMargin()
Definition: crsrsh.hxx:360
void Push()
store a copy of the current cursor on the cursor stack
Definition: crsrsh.cxx:2248
const SwTableNode * IsCursorInTable() const
Definition: crsrsh.hxx:898
bool IsEndOfTable() const
at the very last SwPosition inside a table
Definition: crsrsh.cxx:1133
void SwapPam()
Definition: crsrsh.cxx:976
virtual SwCursor & GetCurrentShellCursor() override
Return the current shell cursor.
Definition: crsrsh.cxx:186
void NormalizePam(bool bPointFirst=true)
Ensure point and mark of the current PaM are in a specific order.
Definition: crsrsh.cxx:970
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
Definition: crsrsh.cxx:696
bool IsEndPara() const
Definition: crsrsh.cxx:1114
bool RightMargin(bool bAPI=false)
Definition: crsrsh.hxx:361
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:195
OUString GetSelText() const
get selected text of a node at current cursor
Definition: crsrsh.cxx:2552
bool IsSttPara() const
Definition: crsrsh.cxx:1095
bool Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:354
bool IsSelection() const
Definition: crsrsh.hxx:888
void UpdateAttr()
Definition: crsrsh.hxx:765
bool Right(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:356
bool IsStartOfDoc() const
Definition: crsrsh.cxx:2760
void ClearMark()
Definition: crsrsh.cxx:939
void SetMark()
Definition: crsrsh.hxx:884
bool IsEndOfDoc() const
Definition: crsrsh.cxx:2772
void KillPams()
Definition: crsrsh.cxx:1022
bool Pop(PopMode)
delete cursor
Definition: crsrsh.cxx:2270
bool IsStartWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
Definition: crstrvl1.cxx:27
sal_Unicode GetChar(bool bEnd=true, tools::Long nOffset=0)
get the nth character of the current SSelection
Definition: crsrsh.cxx:2608
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history.
Definition: docfmt.cxx:452
virtual void Deactivate()
Definition: drawbase.cxx:444
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Definition: edattr.cxx:171
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
bool IsRedlineOn() const
Definition: edredln.cxx:43
bool Delete(bool isArtificialSelection=false)
Delete content of all ranges.
Definition: eddel.cxx:126
void SetRedlineFlags(RedlineFlags eMode)
Definition: edredln.cxx:32
void SetAttrSet(const SfxItemSet &, SetAttrMode nFlags=SetAttrMode::DEFAULT, SwPaM *pCursor=nullptr, const bool bParagraphSetting=false)
Definition: edatmisc.cxx:129
RedlineFlags GetRedlineFlags() const
For Redlining.
Definition: edredln.cxx:27
SvtScriptType GetScriptType() const
returns the script type of the selection
Definition: edattr.cxx:662
bool DelFullPara()
Remove a complete paragraph.
Definition: eddel.cxx:343
void EndAllAction()
Definition: edws.cxx:97
SwFlyFrame * GetSelectedFlyFrame() const
Definition: fefly1.cxx:277
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1103
bool GotoNextFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Independent selecting of flys.
Definition: fesh.hxx:414
bool IsFrameSelected() const
Definition: feshview.cxx:1254
void DelSelectedObj()
Definition: feshview.cxx:2379
SwRect GetObjRect() const
For adjustment of PosAttr when anchor changes.
Definition: fefly1.cxx:1298
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Definition: fefly1.cxx:1061
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
virtual const SwFlyFrameFormat * GetFormat() const override
Definition: fly.cxx:2895
FlyAnchors.
Definition: fmtanchr.hxx:35
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:67
const SwField * GetField() const
Definition: fmtfld.hxx:116
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
Style of a layout element.
Definition: frmfmt.hxx:61
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:871
const SwStartNode * FindTableBoxStartNode() const
Definition: node.hxx:198
SwNode & GetNode(bool bPoint=true) const
Definition: pam.hxx:224
const SwPosition * GetPoint() const
Definition: pam.hxx:208
Point TopLeft() const
Definition: swrect.hxx:254
Starts a section of nodes in the document model.
Definition: node.hxx:314
const SwFormatField & GetFormatField() const
Definition: txatbase.hxx:199
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:84
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, const bool bIncludeInputFieldAtStart=false) const
Definition: ndtxt.cxx:1790
rtl::Reference< SwDoc > mxDoc
The document; never 0.
Definition: viewsh.hxx:171
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Definition: viewsh.cxx:2781
SwDoc * GetDoc() const
Definition: viewsh.hxx:282
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:617
SwDrawBase * GetDrawFuncPtr() const
Definition: view.hxx:526
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Definition: viewdraw.cxx:641
void LeaveDrawCreate()
Definition: view.hxx:538
void EnterBlockMode()
Definition: select.cxx:651
void DelToEndOfLine()
Definition: delete.cxx:126
SAL_DLLPRIVATE void CloseMark(bool bOkFlag)
Definition: delete.cxx:48
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:702
void DelPrvWord()
Definition: delete.cxx:656
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
Definition: wrtsh1.cxx:2011
void LeaveSelFrameMode()
Definition: select.cxx:720
bool DelLeft()
Definition: delete.cxx:134
SAL_DLLPRIVATE bool PrvWrdForDelete()
Definition: wrtsh4.cxx:154
bool TryRemoveIndent()
Definition: delete.cxx:62
SAL_DLLPRIVATE tools::Long SetCursor(const Point *, bool bProp=false)
Definition: select.cxx:304
void Insert(const OUString &)
Definition: wrtsh1.cxx:223
void ResetCursorStack()
Definition: wrtsh.hxx:638
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1693
void EnterStdMode()
Definition: select.cxx:551
SAL_DLLPRIVATE void SttWrd()
Definition: wrtsh4.cxx:32
SAL_DLLPRIVATE bool BwdSentence_()
Definition: wrtsh4.cxx:193
void DelToStartOfSentence()
Definition: delete.cxx:590
SAL_DLLPRIVATE void OpenMark()
Definition: delete.cxx:40
bool IsBlockMode() const
Definition: wrtsh.hxx:167
void DelToEndOfPara()
Definition: delete.cxx:552
bool DelRight(bool isReplaceHeuristic=false)
Definition: delete.cxx:294
void DelLine()
Description: Erase the line.
Definition: delete.cxx:101
bool HasSelection() const
Definition: wrtsh.hxx:147
SAL_DLLPRIVATE bool FwdSentence_()
Definition: wrtsh4.cxx:176
SAL_DLLPRIVATE void EndWrd()
Definition: wrtsh4.cxx:52
SAL_DLLPRIVATE bool NxtWrdForDelete()
Definition: wrtsh4.cxx:131
bool DelToEndOfSentence()
Definition: delete.cxx:599
void UnSelectFrame()
Definition: select.cxx:323
bool IsEndWrd()
Definition: wrtsh1.cxx:193
void DelNxtWord()
Definition: delete.cxx:633
void DelToStartOfPara()
Definition: delete.cxx:569
const SwView & GetView() const
Definition: wrtsh.hxx:437
void DelToStartOfLine()
Definition: delete.cxx:118
virtual const SwPosition & GetMarkEnd() const =0
virtual const SwPosition & GetMarkStart() const =0
static bool isIVSSelector(sal_uInt32 nCode)
static bool isCJKIVSCharacter(sal_uInt32 nCode)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
SelectionType
anchor
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
#define CH_TXT_TRACKED_DUMMY_CHAR
Definition: hintids.hxx:190
sal_uInt16 nCode
constexpr T & temporary(T &&x)
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
Definition: pam.cxx:1040
SwMoveFnCollection const & fnParaStart
Definition: paminit.cxx:46
SwMoveFnCollection const & fnParaEnd
Definition: paminit.cxx:47
Marks a position in the document model.
Definition: pam.hxx:37
SwIndex nContent
Definition: pam.hxx:39
const sal_uInt16 CRSR_SKIP_CELLS
Definition: swcrsr.hxx:66
const sal_uInt16 CRSR_SKIP_CHARS
Definition: swcrsr.hxx:65
RndStdIds