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
261 // If we are deleting a variation selector, we want to delete the
262 // whole sequence.
263 sal_uInt32 nCode = GetChar(false);
264 if ( rtl::isSurrogate( nCode ) )
265 {
266 OUString sStr = GetSelText();
267 nCode = sStr.iterateCodePoints( &o3tl::temporary(sal_Int32(0)) );
268 }
269
270 if ( unicode::isVariationSelector( nCode ) )
271 {
275 }
276 }
277 bool bRet = Delete(true);
278 if( !bRet && bSwap )
280 CloseMark( bRet );
281
282 return bRet;
283}
284
285bool SwWrtShell::DelRight(bool const isReplaceHeuristic)
286{
287 // Will be or'ed, if a tableselection exists;
288 // will here be implemented on SelectionType::Table
289 bool bRet = false;
290 SelectionType nSelection = GetSelectionType();
291 if(nSelection & SelectionType::TableCell)
292 nSelection = SelectionType::Table;
293 if(nSelection & SelectionType::Text)
294 nSelection = SelectionType::Text;
295
296 switch( nSelection & ~SelectionType::Ornament & ~SelectionType::Media )
297 {
302 // If a selection exists, erase it.
303 if( IsSelection() )
304 {
305 if( !IsBlockMode() || HasSelection() )
306 {
307 //OS: And once again Basic: SwActContext must be
308 //leaved before EnterStdMode !
309 {
310 SwActContext aActContext(this);
312 Delete(isReplaceHeuristic);
313 UpdateAttr();
314 }
315 if( IsBlockMode() )
316 {
317 NormalizePam();
318 ClearMark();
320 }
321 else
322 EnterStdMode();
323 bRet = true;
324 break;
325 }
326 else
327 EnterStdMode();
328 }
329
331 {
332 // Start/EndAllAction to avoid cursor flickering
334
335 const SwTableNode* pWasInTableNd = IsCursorInTable();
336 // #108049# Save the startnode of the current cell
337 const SwStartNode* pSNdOld = pWasInTableNd ?
339 bool bCheckDelFull = SelectionType::Text & nSelection && SwCursorShell::IsSttPara();
340 bool bDelFull = false;
341 bool bDoNothing = false;
342
343 // #i41424# Introduced a couple of
344 // Push()-Pop() pairs here. The reason for this is that a
345 // Right()-Left() combination does not make sure, that
346 // the cursor will be in its initial state, because there
347 // may be a numbering in front of the next paragraph.
349
351 {
352 const SwTableNode* pCurrTableNd = IsCursorInTable();
353 bDelFull = bCheckDelFull && pCurrTableNd && pCurrTableNd != pWasInTableNd;
354 if (!bDelFull && (IsCursorInTable() || (pCurrTableNd != pWasInTableNd)))
355 {
356 // #108049# Save the startnode of the current cell.
357 // May be different to pSNdOld as we have moved.
358 const SwStartNode* pSNdNew = pCurrTableNd ?
360
361 // tdf#115132 Only keep cursor position instead of deleting
362 // if we have moved to a different cell
363 bDoNothing = pSNdOld != pSNdNew;
364 }
365 }
366
367 // restore cursor
369
370 if (bDelFull)
371 {
372 DelFullPara();
373 UpdateAttr();
374 }
375 if (bDelFull || bDoNothing)
376 break;
377 }
378
379 {
380 // If we are just ahead of a fieldmark, then remove it completely
381 sw::mark::IFieldmark *const pFm = getIDocumentMarkAccess()->getFieldmarkAt(*GetCursor()->GetPoint());
382 if (pFm && pFm->GetMarkStart() == *GetCursor()->GetPoint())
383 {
384 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
387 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
388 bRet = true;
389 break;
390 }
391 }
392
393 OpenMark();
395 bRet = Delete(true);
396 CloseMark( bRet );
397 break;
398
405 {
406 // Group deletion of the object and its comment together
407 // (also as-character anchor conversion at track changes)
408 mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
409
410 // #108205# Remember object's position.
411 Point aTmpPt = GetObjRect().TopLeft();
412
413 // Remember the anchor of the selected object before deletion.
414 std::optional<SwPosition> oAnchor;
415 RndStdIds eAnchorId = RndStdIds::FLY_AT_PARA;
417 SwFrameFormat* pFormat = nullptr;
418 if (pFly)
419 {
420 pFormat = pFly->GetFormat();
421 if (pFormat)
422 {
423 eAnchorId = pFormat->GetAnchor().GetAnchorId();
424 // to-character anchor conversion at track changes
425 if ( IsRedlineOn() && (eAnchorId != RndStdIds::FLY_AS_CHAR &&
426 eAnchorId != RndStdIds::FLY_AT_CHAR) )
427 {
429 GetFlyFrameAttr(aSet);
430 SwFormatAnchor aAnch(RndStdIds::FLY_AT_CHAR);
431 aSet.Put(aAnch);
432 SetFlyFrameAttr(aSet);
433 eAnchorId = pFormat->GetAnchor().GetAnchorId();
434 }
435 if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR)
436 && pFormat->GetAnchor().GetAnchorNode())
437 {
438 oAnchor.emplace(*pFormat->GetAnchor().GetContentAnchor());
439 // set cursor before the anchor point
440 if ( IsRedlineOn() )
441 *GetCurrentShellCursor().GetPoint() = *oAnchor;
442 }
443 }
444 }
445
446 // track changes: create redline at anchor point of the image to record the deletion
447 if ( IsRedlineOn() && oAnchor && SelectionType::Graphic & nSelection && pFormat &&
448 ( eAnchorId == RndStdIds::FLY_AT_CHAR || eAnchorId == RndStdIds::FLY_AS_CHAR ) )
449 {
450 sal_Int32 nRedlineLength = 1;
451 // create a double CH_TXT_TRACKED_DUMMY_CHAR anchor point of the image to record the
452 // deletion, if needed (otherwise use the existing anchor point of the image anchored
453 // *as* character)
454 if ( eAnchorId == RndStdIds::FLY_AT_CHAR )
455 {
456 nRedlineLength = 2;
461 Insert( OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) +
462 OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) );
463 SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
465 anchor.SetAnchor(GetCursor()->GetPoint());
466 GetDoc()->SetAttr(anchor, *pFormat);
467 SetRedlineFlags( eOld );
469 }
470 OpenMark();
472 bRet = Delete(false);
473 CloseMark( bRet );
474 }
475 else
477
478 if (oAnchor)
479 {
480 SwTextNode* pTextNode = oAnchor->GetNode().GetTextNode();
481 if (pTextNode)
482 {
483 const SwTextField* pField(
484 pTextNode->GetFieldTextAttrAt(oAnchor->GetContentIndex(), ::sw::GetTextAttrMode::Default));
485 if (pField
486 && dynamic_cast<const SwPostItField*>(pField->GetFormatField().GetField()))
487 {
488 // Remove the comment of the deleted object.
489 *GetCurrentShellCursor().GetPoint() = *oAnchor;
490 DelRight();
491 }
492 }
493 }
494
495 mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
496
497 // #108205# Set cursor to remembered position.
498 SetCursor(&aTmpPt);
499
502 OSL_ENSURE( !IsFrameSelected(),
503 "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrame()> should unmark all objects" );
504 // leave draw mode, if necessary.
505 {
506 if (GetView().GetDrawFuncPtr())
507 {
509 GetView().SetDrawFuncPtr(nullptr);
510 }
511 if ( GetView().IsDrawMode() )
512 {
514 }
515 }
516 }
517
518 // <IsFrameSelected()> can't be true - see above.
519 {
520 nSelection = GetSelectionType();
521 if ( SelectionType::Frame & nSelection ||
522 SelectionType::Graphic & nSelection ||
523 SelectionType::Ole & nSelection ||
524 SelectionType::DrawObject & nSelection )
525 {
527 GotoNextFly();
528 }
529 }
530 bRet = true;
531 break;
532 default: break;
533 }
534 return bRet;
535}
536
538{
539 SwActContext aActContext(this);
541 Push();
542 SetMark();
544 {
546 return;
547 }
548 bool bRet = Delete(false);
550 if( bRet )
551 UpdateAttr();
552}
553
555{
556 SwActContext aActContext(this);
558 Push();
559 SetMark();
561 {
563 return;
564 }
565 bool bRet = Delete(false);
567 if( bRet )
568 UpdateAttr();
569}
570
571// All erase operations should work with Find instead with
572// Nxt-/PrvDelim, because the latter works with Wrap Around
573// -- that's probably not wished.
574
576{
577 if(IsStartOfDoc())
578 return;
579 OpenMark();
580 bool bRet = BwdSentence_() && Delete(false);
581 CloseMark( bRet );
582}
583
585{
586 if(IsEndOfDoc())
587 return false;
588 OpenMark();
589 bool bRet(false);
590 // fdo#60967: special case that is documented in help: delete
591 // paragraph following table if cursor is at end of last cell in table
592 if (IsEndOfTable())
593 {
594 Push();
595 ClearMark();
597 {
598 SetMark();
599 if (!IsEndPara()) // can only be at the end if it's empty
600 { // for an empty paragraph this would actually select the _next_
602 }
603 if (!IsEndOfDoc()) // do not delete last paragraph in body text
604 {
605 bRet = DelFullPara();
606 }
607 }
609 }
610 else
611 {
612 bRet = FwdSentence_() && Delete(false);
613 }
614 CloseMark( bRet );
615 return bRet;
616}
617
619{
620 if(IsEndOfDoc())
621 return;
622 SwActContext aActContext(this);
624 EnterStdMode();
625 SetMark();
626 if(IsEndWrd() && !IsStartWord())
627 NxtWrdForDelete(); // #i92468#
628 if(IsStartWord() || IsEndPara())
629 NxtWrdForDelete(); // #i92468#
630 else
631 EndWrd();
632
633 bool bRet = Delete(false);
634 if( bRet )
635 UpdateAttr();
636 else
637 SwapPam();
638 ClearMark();
639}
640
642{
643 if(IsStartOfDoc())
644 return;
645 SwActContext aActContext(this);
647 EnterStdMode();
648 SetMark();
649 if ( !IsStartWord() ||
650 !PrvWrdForDelete() ) // #i92468#
651 {
652 if (IsEndWrd() || IsSttPara())
653 PrvWrdForDelete(); // #i92468#
654 else
655 SttWrd();
656 }
657 bool bRet = Delete(false);
658 if( bRet )
659 UpdateAttr();
660 else
661 SwapPam();
662 ClearMark();
663}
664
665/* 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:550
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:1040
bool Pop(PopMode, ::std::optional< SwCallLink > &roLink)
bool LeftMargin()
Definition: crsrsh.hxx:370
void Push()
store a copy of the current cursor on the cursor stack
Definition: crsrsh.cxx:2550
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
Definition: crsrsh.cxx:600
bool IsEndOfTable() const
at the very last SwPosition inside a table
Definition: crsrsh.cxx:1419
void SwapPam()
Definition: crsrsh.cxx:1262
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:1256
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
Definition: crsrsh.cxx:982
bool IsEndPara() const
Definition: crsrsh.cxx:1400
bool RightMargin(bool bAPI=false)
Definition: crsrsh.hxx:371
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:2862
bool IsSttPara() const
Definition: crsrsh.cxx:1381
bool IsSelection() const
Definition: crsrsh.hxx:910
void UpdateAttr()
Definition: crsrsh.hxx:787
bool IsStartOfDoc() const
Definition: crsrsh.cxx:3070
bool Right(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:366
void ClearMark()
Definition: crsrsh.cxx:1225
void SetMark()
Definition: crsrsh.hxx:906
bool IsEndOfDoc() const
Definition: crsrsh.cxx:3082
bool Left(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:364
void KillPams()
Definition: crsrsh.cxx:1308
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:2918
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:458
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:134
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
bool DelFullPara()
Remove a complete paragraph.
Definition: eddel.cxx:363
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:416
bool IsFrameSelected() const
Definition: feshview.cxx:1133
void DelSelectedObj()
Definition: feshview.cxx:2257
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:3119
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:1614
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:72
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:901
const SwStartNode * FindTableBoxStartNode() const
Definition: node.hxx:218
SwNode & GetPointNode() const
Definition: pam.hxx:275
const SwPosition * GetPoint() const
Definition: pam.hxx:253
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:1849
rtl::Reference< SwDoc > mxDoc
The document; never 0.
Definition: viewsh.hxx:199
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Definition: viewsh.cxx:2821
SwDoc * GetDoc() const
Definition: viewsh.hxx:308
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:648
SwDrawBase * GetDrawFuncPtr() const
Definition: view.hxx:537
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Definition: viewdraw.cxx:641
void LeaveDrawCreate()
Definition: view.hxx:549
void EnterBlockMode()
Definition: select.cxx:660
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:711
void DelPrvWord()
Definition: delete.cxx:641
void LeaveSelFrameMode()
Definition: select.cxx:729
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:313
void Insert(const OUString &)
Definition: wrtsh1.cxx:226
void ResetCursorStack()
Definition: wrtsh.hxx:651
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1723
void EnterStdMode()
Definition: select.cxx:560
SAL_DLLPRIVATE void SttWrd()
Definition: wrtsh4.cxx:32
SAL_DLLPRIVATE bool BwdSentence_()
Definition: wrtsh4.cxx:193
void DelToStartOfSentence()
Definition: delete.cxx:575
SAL_DLLPRIVATE void OpenMark()
Definition: delete.cxx:40
bool IsBlockMode() const
Definition: wrtsh.hxx:168
void DelToEndOfPara()
Definition: delete.cxx:537
bool DelRight(bool isReplaceHeuristic=false)
Definition: delete.cxx:285
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:584
void UnSelectFrame()
Definition: select.cxx:332
bool IsEndWrd()
Definition: wrtsh1.cxx:196
void DelNxtWord()
Definition: delete.cxx:618
void DelToStartOfPara()
Definition: delete.cxx:554
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
Definition: wrtsh1.cxx:2047
const SwView & GetView() const
Definition: wrtsh.hxx:443
void DelToStartOfLine()
Definition: delete.cxx:120
static bool isVariationSelector(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:191
constexpr T & temporary(T &&x)
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
Definition: pam.cxx:1248
SwMoveFnCollection const & fnParaStart
Definition: paminit.cxx:48
SwMoveFnCollection const & fnParaEnd
Definition: paminit.cxx:49
Marks a position in the document model.
Definition: pam.hxx:38
const SwContentNode * GetContentNode() const
Definition: pam.hxx:84
sal_Int32 GetContentIndex() const
Definition: pam.hxx:85
RndStdIds