35#include <rtl/character.hxx>
36#include <osl/diagnose.h>
72 if (aOldFirstLineOfst > 0)
77 else if (aOldFirstLineOfst < 0)
112 bool bRet =
Delete(
false);
122 bool bRet =
Delete(
false);
130 bool bRet =
Delete(
false);
139 if( nCmp & nSelType )
153 if ( nCmp & nSelType )
213 bDoSomething = pIsInTableNd == pWasInTableNd;
223 bDoSomething = pSNdOld == pSNdNew;
262 if ( rtl::isSurrogate(
nCode ) )
288 std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog(
"InfoReadonlyDialog"));
321 Delete(isReplaceHeuristic);
349 bool bDelFull =
false;
350 bool bDoNothing =
false;
362 bDelFull = bCheckDelFull && pCurrTableNd && pCurrTableNd != pWasInTableNd;
363 if (!bDelFull && (
IsCursorInTable() || (pCurrTableNd != pWasInTableNd)))
372 bDoNothing = pSNdOld != pSNdNew;
384 if (bDelFull || bDoNothing)
409 std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog(
"InfoReadonlyDialog"));
429 std::unique_ptr<SwPosition> pAnchor;
430 RndStdIds eAnchorId = RndStdIds::FLY_AT_PARA;
440 if (
IsRedlineOn() && (eAnchorId != RndStdIds::FLY_AS_CHAR &&
441 eAnchorId != RndStdIds::FLY_AT_CHAR) )
450 if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR)
463 ( eAnchorId == RndStdIds::FLY_AT_CHAR || eAnchorId == RndStdIds::FLY_AS_CHAR ) )
465 sal_Int32 nRedlineLength = 1;
469 if ( eAnchorId == RndStdIds::FLY_AT_CHAR )
518 "<SwWrtShell::DelRight(..)> - <SwWrtShell::UnSelectFrame()> should unmark all objects" );
521 if (
GetView().GetDrawFuncPtr())
563 bool bRet =
Delete(
false);
580 bool bRet =
Delete(
false);
648 bool bRet =
Delete(
false);
672 bool bRet =
Delete(
false);
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)
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().
void Push()
store a copy of the current cursor on the cursor stack
const SwTableNode * IsCursorInTable() const
bool IsEndOfTable() const
at the very last SwPosition inside a table
virtual SwCursor & GetCurrentShellCursor() override
Return the current shell cursor.
void NormalizePam(bool bPointFirst=true)
Ensure point and mark of the current PaM are in a specific order.
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
bool RightMargin(bool bAPI=false)
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
OUString GetSelText() const
get selected text of a node at current cursor
bool Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
bool Right(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
bool IsStartOfDoc() const
bool Pop(PopMode)
delete cursor
bool IsStartWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
sal_Unicode GetChar(bool bEnd=true, tools::Long nOffset=0)
get the nth character of the current SSelection
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history.
virtual void Deactivate()
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
void StartAllAction()
For all views of this document.
bool Delete(bool isArtificialSelection=false)
Delete content of all ranges.
void SetRedlineFlags(RedlineFlags eMode)
void SetAttrSet(const SfxItemSet &, SetAttrMode nFlags=SetAttrMode::DEFAULT, SwPaM *pCursor=nullptr, const bool bParagraphSetting=false)
RedlineFlags GetRedlineFlags() const
For Redlining.
SvtScriptType GetScriptType() const
returns the script type of the selection
bool DelFullPara()
Remove a complete paragraph.
SwFlyFrame * GetSelectedFlyFrame() const
bool SetFlyFrameAttr(SfxItemSet &rSet)
bool GotoNextFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Independent selecting of flys.
bool IsFrameSelected() const
SwRect GetObjRect() const
For adjustment of PosAttr when anchor changes.
bool GetFlyFrameAttr(SfxItemSet &rSet) const
general base class for all free-flowing frames
virtual const SwFlyFrameFormat * GetFormat() const override
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
const SwStartNode * FindTableBoxStartNode() const
SwNode & GetNode(bool bPoint=true) const
const SwPosition * GetPoint() const
Starts a section of nodes in the document model.
const SwFormatField & GetFormatField() const
SwTextNode is a paragraph in the document model.
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, const bool bIncludeInputFieldAtStart=false) const
rtl::Reference< SwDoc > mxDoc
The document; never 0.
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
const SfxItemPool & GetAttrPool() const
SwDrawBase * GetDrawFuncPtr() const
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
SAL_DLLPRIVATE void CloseMark(bool bOkFlag)
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
SAL_DLLPRIVATE bool PrvWrdForDelete()
SAL_DLLPRIVATE tools::Long SetCursor(const Point *, bool bProp=false)
void Insert(const OUString &)
SelectionType GetSelectionType() const
SAL_DLLPRIVATE void SttWrd()
SAL_DLLPRIVATE bool BwdSentence_()
void DelToStartOfSentence()
SAL_DLLPRIVATE void OpenMark()
bool DelRight(bool isReplaceHeuristic=false)
void DelLine()
Description: Erase the line.
bool HasSelection() const
SAL_DLLPRIVATE bool FwdSentence_()
SAL_DLLPRIVATE void EndWrd()
SAL_DLLPRIVATE bool NxtWrdForDelete()
bool DelToEndOfSentence()
const SwView & GetView() const
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)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
#define CH_TXT_TRACKED_DUMMY_CHAR
constexpr T & temporary(T &&x)
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
SwMoveFnCollection const & fnParaStart
SwMoveFnCollection const & fnParaEnd
Marks a position in the document model.
const sal_uInt16 CRSR_SKIP_CELLS
const sal_uInt16 CRSR_SKIP_CHARS