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
70 SvxTextLeftMarginItem leftMargin(aAttrSet.Get(RES_MARGIN_TEXTLEFT));
71 short aOldFirstLineOfst = firstLine.GetTextFirstLineOffset();
72
73 if (aOldFirstLineOfst > 0)
74 {
75 firstLine.SetTextFirstLineOffset(0);
76 bResult = true;
77 }
78 else if (aOldFirstLineOfst < 0)
79 {
80 // this used to call SetLeft() but this should be the same result
81 firstLine.SetTextFirstLineOffset(0);
82 leftMargin.SetTextLeft(leftMargin.GetTextLeft() + aOldFirstLineOfst);
83 bResult = true;
84 }
85 else if (leftMargin.GetTextLeft() != 0)
86 {
87 leftMargin.SetTextLeft(0);
88 bResult = true;
89 }
90
91 if (bResult)
92 {
93 aAttrSet.Put(firstLine);
94 aAttrSet.Put(leftMargin);
95 SetAttrSet(aAttrSet);
96 }
97
98 return bResult;
99}
100
104{
105 SwActContext aActContext(this);
107 // remember the old cursor
108 Push();
109 ClearMark();
111 SetMark();
113
114 bool bRet = Delete(false);
116 if( bRet )
117 UpdateAttr();
118}
119
121{
122 OpenMark();
124 bool bRet = Delete(false);
125 CloseMark( bRet );
126}
127
129{
130 OpenMark();
132 bool bRet = Delete(false);
133 CloseMark( bRet );
134}
135
137{
138 // If it's a Fly, throw it away
139 SelectionType nSelType = GetSelectionType();
141 if( nCmp & nSelType )
142 {
143 // #108205# Remember object's position.
144 Point aTmpPt = GetObjRect().TopLeft();
145
147
148 // #108205# Set cursor to remembered position.
149 SetCursor(&aTmpPt);
150
153
154 nSelType = GetSelectionType();
155 if ( nCmp & nSelType )
156 {
158 GotoNextFly();
159 }
160
161 return true;
162 }
163
164 // If a selection exists, erase this
165 if ( IsSelection() )
166 {
167 if( !IsBlockMode() || HasSelection() )
168 {
169 //OS: Once again Basic: SwActContext must be leaved
170 //before EnterStdMode!
171 {
172 SwActContext aActContext(this);
174 Delete(false);
175 UpdateAttr();
176 }
177 if( IsBlockMode() )
178 {
179 NormalizePam();
180 ClearMark();
182 }
183 else
184 EnterStdMode();
185 return true;
186 }
187 else
188 EnterStdMode();
189 }
190
191 // JP 29.06.95: never erase a table standing in front of it.
192 bool bSwap = false;
193 const SwTableNode * pWasInTableNd = SwCursorShell::IsCursorInTable();
194
196 {
197 // Start/EndAllAction to avoid cursor flickering
200
201 // #i4032# Don't actually call a 'delete' if we
202 // changed the table cell, compare DelRight().
203 const SwStartNode * pSNdOld = pWasInTableNd ?
205 nullptr;
206
207 // If the cursor is at the beginning of a paragraph, try to step
208 // backwards. On failure we are done.
209 bool bDoSomething = SwCursorShell::Left(1,SwCursorSkipMode::Chars);
210
211 if (bDoSomething)
212 {
213 // If the cursor entered or left a table (or both) we are done.
214 const SwTableNode* pIsInTableNd = SwCursorShell::IsCursorInTable();
215 bDoSomething = pIsInTableNd == pWasInTableNd;
216
217 if (bDoSomething)
218 {
219 const SwStartNode* pSNdNew = pIsInTableNd ?
221 nullptr;
222
223 // #i4032# Don't actually call a 'delete' if we
224 // changed the table cell, compare DelRight().
225 bDoSomething = pSNdOld == pSNdNew;
226 }
227 }
228
229 if (!bDoSomething)
230 {
231 // tdf#115132 Restore previous position and we are done
233 return false;
234 }
235
237
238 OpenMark();
241 bSwap = true;
242 }
243 else
244 {
245 // If we are just to the right to a fieldmark, then remove it completely
246 const SwPosition* pCurPos = GetCursor()->GetPoint();
247 SwPosition aPrevChar(*pCurPos->GetContentNode(), pCurPos->GetContentIndex() - 1);
248 sw::mark::IFieldmark* pFm = getIDocumentMarkAccess()->getFieldmarkAt(aPrevChar);
249 if (pFm && pFm->GetMarkEnd() == *pCurPos)
250 {
251 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
254 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
255 return true;
256 }
257
258 OpenMark();
260 if (SvtScriptType::ASIAN == GetScriptType())
261 {
262 sal_uInt32 nCode = GetChar(false);
263 if ( rtl::isSurrogate( nCode ) )
264 {
265 OUString sStr = GetSelText();
266 nCode = sStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
267 }
268
270 {
273 OUString sStr = GetSelText();
274 nCode = sStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
277 else
279 }
280 }
281 }
282 bool bRet = Delete(true);
283 if( !bRet && bSwap )
285 CloseMark( bRet );
286 if (!bRet)
287 { // false indicates HasReadonlySel failed
289 }
290 return bRet;
291}
292
293bool SwWrtShell::DelRight(bool const isReplaceHeuristic)
294{
295 // Will be or'ed, if a tableselection exists;
296 // will here be implemented on SelectionType::Table
297 bool bRet = false;
298 SelectionType nSelection = GetSelectionType();
299 if(nSelection & SelectionType::TableCell)
300 nSelection = SelectionType::Table;
301 if(nSelection & SelectionType::Text)
302 nSelection = SelectionType::Text;
303
304 switch( nSelection & ~SelectionType::Ornament & ~SelectionType::Media )
305 {
310 // If a selection exists, erase it.
311 if( IsSelection() )
312 {
313 if( !IsBlockMode() || HasSelection() )
314 {
315 //OS: And once again Basic: SwActContext must be
316 //leaved before EnterStdMode !
317 {
318 SwActContext aActContext(this);
320 Delete(isReplaceHeuristic);
321 UpdateAttr();
322 }
323 if( IsBlockMode() )
324 {
325 NormalizePam();
326 ClearMark();
328 }
329 else
330 EnterStdMode();
331 bRet = true;
332 break;
333 }
334 else
335 EnterStdMode();
336 }
337
339 {
340 // Start/EndAllAction to avoid cursor flickering
342
343 const SwTableNode* pWasInTableNd = IsCursorInTable();
344 // #108049# Save the startnode of the current cell
345 const SwStartNode* pSNdOld = pWasInTableNd ?
347 bool bCheckDelFull = SelectionType::Text & nSelection && SwCursorShell::IsSttPara();
348 bool bDelFull = false;
349 bool bDoNothing = false;
350
351 // #i41424# Introduced a couple of
352 // Push()-Pop() pairs here. The reason for this is that a
353 // Right()-Left() combination does not make sure, that
354 // the cursor will be in its initial state, because there
355 // may be a numbering in front of the next paragraph.
357
359 {
360 const SwTableNode* pCurrTableNd = IsCursorInTable();
361 bDelFull = bCheckDelFull && pCurrTableNd && pCurrTableNd != pWasInTableNd;
362 if (!bDelFull && (IsCursorInTable() || (pCurrTableNd != pWasInTableNd)))
363 {
364 // #108049# Save the startnode of the current cell.
365 // May be different to pSNdOld as we have moved.
366 const SwStartNode* pSNdNew = pCurrTableNd ?
368
369 // tdf#115132 Only keep cursor position instead of deleting
370 // if we have moved to a different cell
371 bDoNothing = pSNdOld != pSNdNew;
372 }
373 }
374
375 // restore cursor
377
378 if (bDelFull)
379 {
380 DelFullPara();
381 UpdateAttr();
382 }
383 if (bDelFull || bDoNothing)
384 break;
385 }
386
387 {
388 // If we are just ahead of a fieldmark, then remove it completely
389 sw::mark::IFieldmark *const pFm = getIDocumentMarkAccess()->getFieldmarkAt(*GetCursor()->GetPoint());
390 if (pFm && pFm->GetMarkStart() == *GetCursor()->GetPoint())
391 {
392 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
395 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
396 bRet = true;
397 break;
398 }
399 }
400
401 OpenMark();
403 bRet = Delete(true);
404 CloseMark( bRet );
405 if (!bRet)
406 { // false indicates HasReadonlySel failed
408 }
409 break;
410
417 {
418 // Group deletion of the object and its comment together
419 // (also as-character anchor conversion at track changes)
420 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
421
422 // #108205# Remember object's position.
423 Point aTmpPt = GetObjRect().TopLeft();
424
425 // Remember the anchor of the selected object before deletion.
426 std::optional<SwPosition> oAnchor;
427 RndStdIds eAnchorId = RndStdIds::FLY_AT_PARA;
429 SwFrameFormat* pFormat = nullptr;
430 if (pFly)
431 {
432 pFormat = pFly->GetFormat();
433 if (pFormat)
434 {
435 eAnchorId = pFormat->GetAnchor().GetAnchorId();
436 // to-character anchor conversion at track changes
437 if ( IsRedlineOn() && (eAnchorId != RndStdIds::FLY_AS_CHAR &&
438 eAnchorId != RndStdIds::FLY_AT_CHAR) )
439 {
441 GetFlyFrameAttr(aSet);
442 SwFormatAnchor aAnch(RndStdIds::FLY_AT_CHAR);
443 aSet.Put(aAnch);
444 SetFlyFrameAttr(aSet);
445 eAnchorId = pFormat->GetAnchor().GetAnchorId();
446 }
447 if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR)
448 && pFormat->GetAnchor().GetAnchorNode())
449 {
450 oAnchor.emplace(*pFormat->GetAnchor().GetContentAnchor());
451 // set cursor before the anchor point
452 if ( IsRedlineOn() )
453 *GetCurrentShellCursor().GetPoint() = *oAnchor;
454 }
455 }
456 }
457
458 // track changes: create redline at anchor point of the image to record the deletion
459 if ( IsRedlineOn() && oAnchor && SelectionType::Graphic & nSelection && pFormat &&
460 ( eAnchorId == RndStdIds::FLY_AT_CHAR || eAnchorId == RndStdIds::FLY_AS_CHAR ) )
461 {
462 sal_Int32 nRedlineLength = 1;
463 // create a double CH_TXT_TRACKED_DUMMY_CHAR anchor point of the image to record the
464 // deletion, if needed (otherwise use the existing anchor point of the image anchored
465 // *as* character)
466 if ( eAnchorId == RndStdIds::FLY_AT_CHAR )
467 {
468 nRedlineLength = 2;
473 Insert( OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) +
474 OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) );
475 SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
477 anchor.SetAnchor(GetCursor()->GetPoint());
478 GetDoc()->SetAttr(anchor, *pFormat);
479 SetRedlineFlags( eOld );
481 }
482 OpenMark();
484 bRet = Delete(false);
485 CloseMark( bRet );
486 }
487 else
489
490 if (oAnchor)
491 {
492 SwTextNode* pTextNode = oAnchor->GetNode().GetTextNode();
493 if (pTextNode)
494 {
495 const SwTextField* pField(
496 pTextNode->GetFieldTextAttrAt(oAnchor->GetContentIndex(), ::sw::GetTextAttrMode::Default));
497 if (pField
498 && dynamic_cast<const SwPostItField*>(pField->GetFormatField().GetField()))
499 {
500 // Remove the comment of the deleted object.
501 *GetCurrentShellCursor().GetPoint() = *oAnchor;
502 DelRight();
503 }
504 }
505 }
506
507 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
508
509 // #108205# Set cursor to remembered position.
510 SetCursor(&aTmpPt);
511
514 OSL_ENSURE( !IsFrameSelected(),
515 "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrame()> should unmark all objects" );
516 // leave draw mode, if necessary.
517 {
518 if (GetView().GetDrawFuncPtr())
519 {
521 GetView().SetDrawFuncPtr(nullptr);
522 }
523 if ( GetView().IsDrawMode() )
524 {
526 }
527 }
528 }
529
530 // <IsFrameSelected()> can't be true - see above.
531 {
532 nSelection = GetSelectionType();
533 if ( SelectionType::Frame & nSelection ||
534 SelectionType::Graphic & nSelection ||
535 SelectionType::Ole & nSelection ||
536 SelectionType::DrawObject & nSelection )
537 {
539 GotoNextFly();
540 }
541 }
542 bRet = true;
543 break;
544 default: break;
545 }
546 return bRet;
547}
548
550{
551 SwActContext aActContext(this);
553 Push();
554 SetMark();
556 {
558 return;
559 }
560 bool bRet = Delete(false);
562 if( bRet )
563 UpdateAttr();
564}
565
567{
568 SwActContext aActContext(this);
570 Push();
571 SetMark();
573 {
575 return;
576 }
577 bool bRet = Delete(false);
579 if( bRet )
580 UpdateAttr();
581}
582
583// All erase operations should work with Find instead with
584// Nxt-/PrvDelim, because the latter works with Wrap Around
585// -- that's probably not wished.
586
588{
589 if(IsStartOfDoc())
590 return;
591 OpenMark();
592 bool bRet = BwdSentence_() && Delete(false);
593 CloseMark( bRet );
594}
595
597{
598 if(IsEndOfDoc())
599 return false;
600 OpenMark();
601 bool bRet(false);
602 // fdo#60967: special case that is documented in help: delete
603 // paragraph following table if cursor is at end of last cell in table
604 if (IsEndOfTable())
605 {
606 Push();
607 ClearMark();
609 {
610 SetMark();
611 if (!IsEndPara()) // can only be at the end if it's empty
612 { // for an empty paragraph this would actually select the _next_
614 }
615 if (!IsEndOfDoc()) // do not delete last paragraph in body text
616 {
617 bRet = DelFullPara();
618 }
619 }
621 }
622 else
623 {
624 bRet = FwdSentence_() && Delete(false);
625 }
626 CloseMark( bRet );
627 return bRet;
628}
629
631{
632 if(IsEndOfDoc())
633 return;
634 SwActContext aActContext(this);
636 EnterStdMode();
637 SetMark();
638 if(IsEndWrd() && !IsStartWord())
639 NxtWrdForDelete(); // #i92468#
640 if(IsStartWord() || IsEndPara())
641 NxtWrdForDelete(); // #i92468#
642 else
643 EndWrd();
644
645 bool bRet = Delete(false);
646 if( bRet )
647 UpdateAttr();
648 else
649 SwapPam();
650 ClearMark();
651}
652
654{
655 if(IsStartOfDoc())
656 return;
657 SwActContext aActContext(this);
659 EnterStdMode();
660 SetMark();
661 if ( !IsStartWord() ||
662 !PrvWrdForDelete() ) // #i92468#
663 {
664 if (IsEndWrd() || IsSttPara())
665 PrvWrdForDelete(); // #i92468#
666 else
667 SttWrd();
668 }
669 bool bRet = Delete(false);
670 if( bRet )
671 UpdateAttr();
672 else
673 SwapPam();
674 ClearMark();
675}
676
677/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ Ignore
ignore Redlines
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:537
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
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
short GetTextFirstLineOffset() const
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
Class for automated call of Start- and EndAction().
Definition: editsh.hxx:1019
bool Pop(PopMode, ::std::optional< SwCallLink > &roLink)
bool LeftMargin()
Definition: crsrsh.hxx:368
void Push()
store a copy of the current cursor on the cursor stack
Definition: crsrsh.cxx:2279
const SwTableNode * IsCursorInTable() const
Definition: crsrsh.hxx:914
bool IsEndOfTable() const
at the very last SwPosition inside a table
Definition: crsrsh.cxx:1147
void SwapPam()
Definition: crsrsh.cxx:990
virtual SwCursor & GetCurrentShellCursor() override
Return the current shell cursor.
Definition: crsrsh.cxx:185
void NormalizePam(bool bPointFirst=true)
Ensure point and mark of the current PaM are in a specific order.
Definition: crsrsh.cxx:984
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
Definition: crsrsh.cxx:710
bool IsEndPara() const
Definition: crsrsh.cxx:1128
bool RightMargin(bool bAPI=false)
Definition: crsrsh.hxx:369
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:194
OUString GetSelText() const
get selected text of a node at current cursor
Definition: crsrsh.cxx:2588
bool IsSttPara() const
Definition: crsrsh.cxx:1109
bool IsSelection() const
Definition: crsrsh.hxx:904
void UpdateAttr()
Definition: crsrsh.hxx:781
bool IsStartOfDoc() const
Definition: crsrsh.cxx:2796
bool Right(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:364
void ClearMark()
Definition: crsrsh.cxx:953
void SetMark()
Definition: crsrsh.hxx:900
bool IsEndOfDoc() const
Definition: crsrsh.cxx:2808
bool Left(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:362
void KillPams()
Definition: crsrsh.cxx:1036
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:2644
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:125
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:341
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:1253
void DelSelectedObj()
Definition: feshview.cxx:2377
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:3058
FlyAnchors.
Definition: fmtanchr.hxx:37
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:67
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:74
SwNode * GetAnchorNode() const
Definition: atrfrm.cxx:1606
const SwField * GetField() const
Definition: fmtfld.hxx:131
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:88
Style of a layout element.
Definition: frmfmt.hxx:62
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:903
const SwStartNode * FindTableBoxStartNode() const
Definition: node.hxx:218
SwNode & GetPointNode() const
Definition: pam.hxx:283
const SwPosition * GetPoint() const
Definition: pam.hxx:261
Point TopLeft() const
Definition: swrect.hxx:254
Starts a section of nodes in the document model.
Definition: node.hxx:348
const SwFormatField & GetFormatField() const
Definition: txatbase.hxx:199
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Expand) const
Definition: ndtxt.cxx:1847
rtl::Reference< SwDoc > mxDoc
The document; never 0.
Definition: viewsh.hxx:179
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Definition: viewsh.cxx:2813
SwDoc * GetDoc() const
Definition: viewsh.hxx:290
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:625
SwDrawBase * GetDrawFuncPtr() const
Definition: view.hxx:535
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Definition: viewdraw.cxx:641
void LeaveDrawCreate()
Definition: view.hxx:547
void EnterBlockMode()
Definition: select.cxx:652
void DelToEndOfLine()
Definition: delete.cxx:128
SAL_DLLPRIVATE void CloseMark(bool bOkFlag)
Definition: delete.cxx:48
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:703
void DelPrvWord()
Definition: delete.cxx:653
void LeaveSelFrameMode()
Definition: select.cxx:721
bool DelLeft()
Definition: delete.cxx:136
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:305
void Insert(const OUString &)
Definition: wrtsh1.cxx:225
void ResetCursorStack()
Definition: wrtsh.hxx:649
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1717
void EnterStdMode()
Definition: select.cxx:552
SAL_DLLPRIVATE void SttWrd()
Definition: wrtsh4.cxx:32
SAL_DLLPRIVATE bool BwdSentence_()
Definition: wrtsh4.cxx:193
void DelToStartOfSentence()
Definition: delete.cxx:587
SAL_DLLPRIVATE void OpenMark()
Definition: delete.cxx:40
bool IsBlockMode() const
Definition: wrtsh.hxx:168
void InfoReadOnlyDialog(bool bAsync=false)
Definition: wrtsh1.cxx:2664
void DelToEndOfPara()
Definition: delete.cxx:549
bool DelRight(bool isReplaceHeuristic=false)
Definition: delete.cxx:293
void DelLine()
Description: Erase the line.
Definition: delete.cxx:103
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:596
void UnSelectFrame()
Definition: select.cxx:324
bool IsEndWrd()
Definition: wrtsh1.cxx:195
void DelNxtWord()
Definition: delete.cxx:630
void DelToStartOfPara()
Definition: delete.cxx:566
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
Definition: wrtsh1.cxx:2041
const SwView & GetView() const
Definition: wrtsh.hxx:443
void DelToStartOfLine()
Definition: delete.cxx:120
static bool isIVSSelector(sal_uInt32 nCode)
static bool isCJKIVSCharacter(sal_uInt32 nCode)
SelectionType
anchor
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
#define CH_TXT_TRACKED_DUMMY_CHAR
Definition: hintids.hxx:192
sal_uInt16 nCode
constexpr T & temporary(T &&x)
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
Definition: pam.cxx:1225
SwMoveFnCollection const & fnParaStart
Definition: paminit.cxx:48
SwMoveFnCollection const & fnParaEnd
Definition: paminit.cxx:49
Marks a position in the document model.
Definition: pam.hxx:37
const SwContentNode * GetContentNode() const
Definition: pam.hxx:83
sal_Int32 GetContentIndex() const
Definition: pam.hxx:84
RndStdIds