28#include <com/sun/star/embed/EmbedVerbs.hpp>
61 struct SearchOptions2;
124 void Drag (
const Point* pPt,
bool bProp) { (this->*m_fnDrag)(pPt, bProp); }
125 void EndDrag (
const Point* pPt,
bool bProp) { (this->*m_fnEndDrag)(pPt, bProp); }
128 bool IsSplitVerticalByDefault()
const;
129 void SetSplitVerticalByDefault(
bool value);
135 inline void ResetCursorStack();
153 bool IsStdMode()
const {
return !m_bExtMode && !m_bAddMode && !m_bBlockMode; }
157 void ToggleExtMode();
162 void ToggleAddMode();
165 void EnterBlockMode();
166 void LeaveBlockMode();
167 void ToggleBlockMode();
170 void SetInsMode(
bool bOn =
true );
173 void SetRedlineFlagsAndCheckInsMode(
RedlineFlags eMode );
175 void EnterSelFrameMode(
const Point *pStartDrag =
nullptr);
176 void LeaveSelFrameMode();
179 void UnSelectFrame();
185 inline void EndSelTableCells();
188 bool IsExtSel()
const {
return m_bSelWrd || m_bSelLn; }
192 inline bool Is_FnDragEQBeginDrag()
const;
200 bool SelNearestWrd();
201 bool SelWrd (
const Point * =
nullptr );
203 void SelSentence (
const Point *);
204 void SelPara (
const Point *);
209 bool SimpleMove( FNSimpleMove,
bool bSelect );
212 sal_uInt16 nCount,
bool bBasicCall,
bool bVisual =
false );
214 sal_uInt16 nCount,
bool bBasicCall,
bool bVisual =
false );
215 bool Up (
bool bSelect, sal_uInt16 nCount = 1,
bool bBasicCall =
false );
216 bool Down (
bool bSelect, sal_uInt16 nCount = 1,
bool bBasicCall =
false );
220 bool LeftMargin (
bool bSelect,
bool bBasicCall );
223 bool StartOfSection(
bool bSelect =
false );
224 bool EndOfSection (
bool bSelect =
false );
226 bool SttNxtPg (
bool bSelect =
false );
227 void SttPrvPg (
bool bSelect =
false );
228 void EndNxtPg (
bool bSelect =
false );
229 bool EndPrvPg (
bool bSelect =
false );
230 bool SttPg (
bool bSelect =
false );
231 bool EndPg (
bool bSelect =
false );
232 bool SttPara (
bool bSelect =
false );
233 void EndPara (
bool bSelect =
false );
244 bool SelectTableRowCol(
const Point& rPt,
const Point* pEnd =
nullptr,
bool bRowDrag =
false );
245 void SelectTableRow();
246 void SelectTableCol();
247 void SelectTableCell();
252 void StartOfColumn ();
254 void StartOfNextColumn ();
255 void EndOfNextColumn ();
256 void StartOfPrevColumn ();
257 void EndOfPrevColumn ();
263 bool GotoPage( sal_uInt16 nPage,
bool bRecord );
268 bool PageCursor(
SwTwips lOffset,
bool bSelect);
273 void NoEdit(
bool bHideCursor =
true);
283 void DelToEndOfLine();
284 void DelToStartOfLine();
289 bool DelRight(
bool isReplaceHeuristic =
false);
290 void DelToEndOfPara();
291 void DelToStartOfPara();
292 bool DelToEndOfSentence();
293 void DelToStartOfSentence();
303 WORD_SPACE_BEFORE = 1,
304 WORD_SPACE_AFTER = 2,
307 int IntelligentCut(
SelectionType nSelectionType,
bool bCut =
true);
310 bool InsertField2(
SwField const &,
SwPaM* pAnnotationRange =
nullptr);
311 void Insert(
const OUString &);
313 void InsertGraphic(
const OUString &rPath,
const OUString &rFilter,
315 RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA);
317 void InsertByWord(
const OUString & );
318 void InsertPageBreak(
const OUString *pPageDesc =
nullptr, const ::std::optional<sal_uInt16>& rPgNum = std::nullopt);
319 void InsertLineBreak(std::optional<SwLineBreakClear> oClear = std::nullopt);
320 void InsertColumnBreak();
322 void InsertFootnote(
const OUString &,
bool bEndNote =
false,
bool bEdit =
true );
323 void SplitNode(
bool bAutoFormat =
false );
337 void NumOrBulletOn(
bool bNum);
338 void NumOrBulletOff();
346 sal_uInt16 nSlotId = 0);
349 void LaunchOLEObj(sal_Int32 nVerb = css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
352 const SwRect *pFlyPrtRect =
nullptr,
353 const SwRect *pFlyFrameRect =
nullptr,
354 const bool bNoTextFramePrtAreaChanged =
false )
override;
356 const SwRect &rFrame )
override;
363 GETSTYLE_CREATEANY };
366 GetStyle eCreate = GETSTYLE_NOCREATE);
368 GetStyle eCreate = GETSTYLE_NOCREATE);
369 SwFrameFormat* GetTableStyle(std::u16string_view rFormatName);
371 void SetPageStyle(
const OUString &rCollName);
376 void QuickUpdateStyle();
382 void Do(DoType eDoType, sal_uInt16 nCnt = 1, sal_uInt16 nOffset = 0);
383 OUString GetDoString( DoType eDoType )
const;
384 OUString GetRepeatString()
const;
392 bool bReplace =
false );
394 sal_Int32 SearchTempl (
const OUString &rTempl,
397 const OUString* pReplTempl =
nullptr );
399 sal_Int32 SearchAttr (
const SfxItemSet& rFindSet,
410 void MoveCursor(
bool bWithSelect =
false );
413 bool StartInputFieldDlg(
SwField*,
bool bPrevButton,
bool bNextButton,
weld::Widget* pParentWin, FieldDialogPressedButton* pPressedButton =
nullptr);
415 bool StartDropDownFieldDlg(
SwField*,
bool bPrevButton,
bool bNextButton,
weld::Widget* pParentWin, FieldDialogPressedButton* pPressedButton =
nullptr);
421 void GotoMark( const ::sw::mark::IMark*
const pMark );
422 bool GotoMark( const ::sw::mark::IMark*
const pMark,
bool bSelect );
423 void GotoMark(
const OUString& rName );
427 bool GotoFieldmark(::sw::mark::IFieldmark
const *
const pMark);
436 bool bOnlyRefresh =
false);
440 void SelectNextPrevHyperlink(
bool bNext );
447 void ExecMacro(
const SvxMacro& rMacro, OUString* pRet =
nullptr,
SbxArray* pArgs =
nullptr );
450 bool bCheckPtr =
false );
454 void ClickToField(
const SwField& rField,
bool bExecHyperlinks );
457 inline bool IsInClickToEdit()
const ;
460 bool GetURLFromButton( OUString& rURL, OUString& rDescr )
const;
463 const sal_uInt16 nAction );
481 bool TryRemoveIndent();
483 OUString GetSelDescr()
const;
487 void addCurrentPosition();
489 bool bSelFrame =
true );
494 bool GotoRefMark(
const OUString& rRefMark, sal_uInt16 nSubType = 0,
495 sal_uInt16 nSeqNo = 0 );
500 bool GotoDrawingObject(std::u16string_view rName);
502 void ChangeHeaderOrFooter(std::u16string_view rStyleName,
bool bHeader,
bool bOn,
bool bShowWarning);
508 bool IsOutlineContentVisible(
const size_t nPos);
509 void MakeOutlineContentVisible(
const size_t nPos,
bool bMakeVisible =
true,
bool bSetAttrOutlineVisibility =
true);
510 void MakeAllFoldedOutlineContentVisible(
bool bMakeVisible =
true);
511 void InvalidateOutlineContentVisibility();
512 bool GetAttrOutlineContentVisible(
const size_t nPos)
const;
514 void MakeOutlineLevelsVisible(
const int nLevel);
516 bool HasFoldedOutlineContentSelected()
const;
521 std::optional<OString> getLOKPayload(
int nType,
int nViewId)
const;
525 SAL_DLLPRIVATE
void OpenMark();
526 SAL_DLLPRIVATE
void CloseMark(
bool bOkFlag );
542 } *m_pModeStack =
nullptr;
550 } m_ePageMove = MV_NO;
561 SwTwips lOff, std::unique_ptr<CursorStack> pN )
563 pNext(
std::move(pN)),
564 bValidCurPos( bValid ),
565 bIsFrameSel( bFrameSel ),
577 bool m_bDestOnStack =
false;
579 SAL_DLLPRIVATE
bool PushCursor(
SwTwips lOffset,
bool bSelect);
580 SAL_DLLPRIVATE
bool PopCursor(
bool bUpdate,
bool bSelect =
false);
583 SAL_DLLPRIVATE
void SttWrd();
584 SAL_DLLPRIVATE
void EndWrd();
585 SAL_DLLPRIVATE
bool NxtWrd_();
586 SAL_DLLPRIVATE
bool PrvWrd_();
588 SAL_DLLPRIVATE
bool NxtWrdForDelete();
589 SAL_DLLPRIVATE
bool PrvWrdForDelete();
590 SAL_DLLPRIVATE
bool FwdSentence_();
591 SAL_DLLPRIVATE
bool BwdSentence_();
593 SAL_DLLPRIVATE
bool BwdPara_();
612 SAL_DLLPRIVATE
void ResetCursorStack_();
620 SAL_DLLPRIVATE
void DefaultDrag(
const Point *,
bool bProp );
621 SAL_DLLPRIVATE
void DefaultEndDrag(
const Point *,
bool bProp );
623 SAL_DLLPRIVATE
void ExtSelWrd(
const Point *,
bool bProp );
624 SAL_DLLPRIVATE
void ExtSelLn(
const Point *,
bool bProp );
626 SAL_DLLPRIVATE
void BeginFrameDrag(
const Point *,
bool bProp );
629 SAL_DLLPRIVATE
void UpdateLayoutFrame(
const Point *,
bool bProp );
631 SAL_DLLPRIVATE
void SttLeaveSelect();
632 SAL_DLLPRIVATE
void AddLeaveSelect();
635 SAL_DLLPRIVATE
void LeaveExtSel() { m_bSelWrd = m_bSelLn =
false;}
637 SAL_DLLPRIVATE
bool GoStart(
bool KeepArea,
bool *,
638 bool bSelect,
bool bDontMoveRegion =
false);
639 SAL_DLLPRIVATE
bool GoEnd(
bool KeepArea =
false,
const bool * =
nullptr);
648 SAL_DLLPRIVATE
bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark*
const pMark=
nullptr);
MakeAllOutlineContentTemporarilyVisible(SwDoc *pDoc, bool bScrollToCursor=false)
~MakeAllOutlineContentTemporarilyVisible() COVERITY_NOEXCEPT_FALSE
Stores the properties of a content control.
bool Pop(PopMode, ::std::optional< SwCallLink > &roLink)
SAL_DLLPRIVATE void UpdateCursor(sal_uInt16 eFlags=SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE, bool bIdleEnd=false)
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo)
jump to reference marker
int SetCursor(const Point &rPt, bool bOnlyText=false, bool bBlock=true)
bool HasSelection() const
Does the current cursor create a selection?
bool IsMultiSelection() const
bool GotoFieldmark(const ::sw::mark::IFieldmark *const pMark)
bool GotoFootnoteAnchor()
jump from footnote to anchor
bool GotoTable(const OUString &rName)
bool RightMargin(bool bAPI=false)
bool GotoPage(sal_uInt16 nPage)
void SetSelTableCells(bool bFlag)
bool GotoMark(const ::sw::mark::IMark *const pMark)
bool SelectTextAttr(sal_uInt16 nWhich, bool bExpand, const SwTextAttr *pAttr=nullptr)
bool GotoNextTOXBase(const OUString *=nullptr)
jump to the next index
bool Right(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
bool Down(sal_uInt16 nCnt=1)
bool GotoOutline(const OUString &rName)
bool Left(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
bool GotoRegion(std::u16string_view rName)
bool GotoFormatField(const SwFormatField &rField)
bool GotoINetAttr(const SwTextINetFormat &rAttr)
bool Up(sal_uInt16 nCnt=1)
SwDocShell * GetDocShell()
void SplitNode(bool bAutoFormat=false, bool bCheckTableStart=true)
virtual bool WarnSwitchToDesignModeDialog() const
Switch to Design mode for Forms.
void ChgDBData(const SwDBData &SwDBData)
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
void Insert(sal_Unicode, bool bOnlyCurrCursor=false)
Edit (all selected ranges).
void InsertTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Insert content table. Renew if required.
void UpdateTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
update tables of content
void AutoCorrect(SvxAutoCorrect &rACorr, bool bInsertMode, sal_Unicode cChar)
Call AutoCorrect.
virtual bool WarnHiddenSectionDialog() const
Selected area has hidden content.
virtual void InfoReadOnlyDialog(bool) const
Selected area has readonly content.
SwFlyFrameFormat * InsertObject(const svt::EmbeddedObjectRef &, SfxItemSet *pFlyAttrSet)
virtual void MoveObjectIfActive(svt::EmbeddedObjectRef &xObj, const Point &rOffset)
The layout has been changed, so the active object has to be moved after that.
virtual void ConnectObj(svt::EmbeddedObjectRef &, const SwRect &rPrt, const SwRect &rFrame)=0
Connect objects with ActivateWhenVisible at Paint.
bool GotoFly(const OUString &rName, FlyCntType eType, bool bSelFrame)
Jump to named Fly (graphic/OLE).
void Insert(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet)
size_t IsObjSelected() const
void BeginDrag(const Point *pPt, bool bProp)
virtual void CalcAndSetScale(svt::EmbeddedObjectRef &xObj, const SwRect *pFlyPrtRect=nullptr, const SwRect *pFlyFrameRect=nullptr, const bool bNoTextFramePrtAreaChanged=false)=0
Client for OleObject has to be up-to-date regarding scaling.
Base class of all fields.
SfxPoolItem subclass that wraps an SwContentControl.
PaM is Point and Mark: a selection of the document model.
Of course Writer needs its own rectangles.
vector_type::size_type size_type
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
Represents the style of a paragraph.
SwTextAttr subclass that tracks the location of the wrapped SwFormatURL.
bool IsShowOutlineContentVisibilityButton() const
virtual void DrawSelChanged()
const SwViewOption * GetViewOptions() const
void UnlockPaint(bool bVirDev=false)
virtual void SetReadonlyOption(bool bSet)
void LockPaint(LockPaintReason eReason)
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow)
Used by the UI to modify the document model.
void SelTableCells(const Link< SwWrtShell &, void > &rLink)
bool IsSelFrameMode() const
bool IsRetainSelection() const
SAL_DLLPRIVATE void DefaultEndDrag(const Point *, bool bProp)
SAL_DLLPRIVATE bool BwdPara_()
void NxtWrd(bool bSelect=false)
std::unique_ptr< CursorStack > m_pCursorStack
void FwdSentence(bool bSelect=false)
SAL_DLLPRIVATE void LeaveExtSel()
bool IsModePushed() const
bool PrvWrd(bool bSelect=false)
SAL_DLLPRIVATE tools::Long SetCursor(const Point *, bool bProp=false)
void(SwWrtShell::* SELECTFUNC2)(const Point *, bool bProp)
bool Is_FnDragEQBeginDrag() const
tools::Long CallSetCursor(const Point *pPt, bool bProp)
SAL_DLLPRIVATE void BeginDrag(const Point *, bool bProp)
SAL_DLLPRIVATE bool NxtWrd_()
SAL_DLLPRIVATE bool BwdSentence_()
tools::Long KillSelection(const Point *pPt, bool bProp)
SwNavigationMgr & GetNavigationMgr()
Link< SwWrtShell &, void > m_aSelTableLink
SAL_DLLPRIVATE tools::Long Ignore(const Point *, bool bProp)
void MakeAllFoldedOutlineContentVisible(bool bMakeVisible=true)
bool HasCursorStack() const
DECL_DLLPRIVATE_LINK(ExecFlyMac, const SwFlyFrameFormat *, void)
void BwdSentence(bool bSelect=false)
void SetRetainSelection(bool bRet)
SwNavigationMgr m_aNavigationMgr
void EndDrag(const Point *pPt, bool bProp)
void Drag(const Point *pPt, bool bProp)
SAL_DLLPRIVATE bool PrvWrd_()
bool HasSelection() const
SAL_DLLPRIVATE bool FwdSentence_()
SAL_DLLPRIVATE void ResetCursorStack_()
bool IsInClickToEdit() const
const SwView & GetView() const
std::vector< Value >::size_type size_type
@ InBody
Find "one" only in body text.
void GetCurPageStyle(SwPaM const &rPaM, OUString &rString)
SwCharFormat * GetCharStyle(SwDoc &rDoc, const OUString &rName)
Get a Character Style which fits a given name.
SwTextFormatColl * GetParaStyle(SwDoc &rDoc, const OUString &rName)
Get a Paragraph Style which fits a given name.
std::unique_ptr< CursorStack > pNext
CursorStack(bool bValid, bool bFrameSel, const Point &rDocPos, SwTwips lOff, std::unique_ptr< CursorStack > pN)
ModeStack(ModeStack *pNextMode, bool _bIns, bool _bExt, bool _bAdd, bool _bBlock)