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