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();
152 bool IsStdMode()
const {
return !m_bExtMode && !m_bAddMode && !m_bBlockMode; }
156 void ToggleExtMode();
161 void ToggleAddMode();
164 void EnterBlockMode();
165 void LeaveBlockMode();
166 void ToggleBlockMode();
169 void SetInsMode(
bool bOn =
true );
172 void SetRedlineFlagsAndCheckInsMode(
RedlineFlags eMode );
174 void EnterSelFrameMode(
const Point *pStartDrag =
nullptr);
175 void LeaveSelFrameMode();
178 void UnSelectFrame();
184 inline void EndSelTableCells();
187 bool IsExtSel()
const {
return m_bSelWrd || m_bSelLn; }
191 inline bool Is_FnDragEQBeginDrag()
const;
199 bool SelNearestWrd();
200 bool SelWrd (
const Point * =
nullptr );
202 void SelSentence (
const Point *);
203 void SelPara (
const Point *);
208 bool SimpleMove( FNSimpleMove,
bool bSelect );
210 bool Left ( sal_uInt16 nMode,
bool bSelect,
211 sal_uInt16 nCount,
bool bBasicCall,
bool bVisual =
false );
212 bool Right ( sal_uInt16 nMode,
bool bSelect,
213 sal_uInt16 nCount,
bool bBasicCall,
bool bVisual =
false );
214 bool Up (
bool bSelect, sal_uInt16 nCount = 1,
bool bBasicCall =
false );
215 bool Down (
bool bSelect, sal_uInt16 nCount = 1,
bool bBasicCall =
false );
219 bool LeftMargin (
bool bSelect,
bool bBasicCall );
222 bool StartOfSection(
bool bSelect =
false );
223 bool EndOfSection (
bool bSelect =
false );
225 bool SttNxtPg (
bool bSelect =
false );
226 void SttPrvPg (
bool bSelect =
false );
227 void EndNxtPg (
bool bSelect =
false );
228 bool EndPrvPg (
bool bSelect =
false );
229 bool SttPg (
bool bSelect =
false );
230 bool EndPg (
bool bSelect =
false );
231 bool SttPara (
bool bSelect =
false );
232 void EndPara (
bool bSelect =
false );
243 bool SelectTableRowCol(
const Point& rPt,
const Point* pEnd =
nullptr,
bool bRowDrag =
false );
244 void SelectTableRow();
245 void SelectTableCol();
246 void SelectTableCell();
251 void StartOfColumn ();
253 void StartOfNextColumn ();
254 void EndOfNextColumn ();
255 void StartOfPrevColumn ();
256 void EndOfPrevColumn ();
262 bool GotoPage( sal_uInt16 nPage,
bool bRecord );
267 bool PageCursor(
SwTwips lOffset,
bool bSelect);
272 void NoEdit(
bool bHideCursor =
true);
282 void DelToEndOfLine();
283 void DelToStartOfLine();
288 bool DelRight(
bool isReplaceHeuristic =
false);
289 void DelToEndOfPara();
290 void DelToStartOfPara();
291 bool DelToEndOfSentence();
292 void DelToStartOfSentence();
302 WORD_SPACE_BEFORE = 1,
303 WORD_SPACE_AFTER = 2,
306 int IntelligentCut(
SelectionType nSelectionType,
bool bCut =
true);
309 bool InsertField2(
SwField const &,
SwPaM* pAnnotationRange =
nullptr);
310 void Insert(
const OUString &);
312 void InsertGraphic(
const OUString &rPath,
const OUString &rFilter,
314 RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA);
316 void InsertByWord(
const OUString & );
317 void InsertPageBreak(
const OUString *pPageDesc =
nullptr, const ::std::optional<sal_uInt16>& rPgNum = std::nullopt);
318 void InsertLineBreak(std::optional<SwLineBreakClear> oClear = std::nullopt);
319 void InsertColumnBreak();
321 void InsertFootnote(
const OUString &,
bool bEndNote =
false,
bool bEdit =
true );
322 void SplitNode(
bool bAutoFormat =
false );
336 void NumOrBulletOn(
bool bNum);
337 void NumOrBulletOff();
345 sal_uInt16 nSlotId = 0);
348 void LaunchOLEObj(sal_Int32 nVerb = css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
351 const SwRect *pFlyPrtRect =
nullptr,
352 const SwRect *pFlyFrameRect =
nullptr,
353 const bool bNoTextFramePrtAreaChanged =
false )
override;
355 const SwRect &rFrame )
override;
362 GETSTYLE_CREATEANY };
365 GetStyle eCreate = GETSTYLE_NOCREATE);
367 GetStyle eCreate = GETSTYLE_NOCREATE);
368 SwFrameFormat* GetTableStyle(std::u16string_view rFormatName);
370 void SetPageStyle(
const OUString &rCollName);
375 void QuickUpdateStyle();
381 void Do(DoType eDoType, sal_uInt16 nCnt = 1, sal_uInt16 nOffset = 0);
382 OUString GetDoString( DoType eDoType )
const;
383 OUString GetRepeatString()
const;
391 bool bReplace =
false );
393 sal_uLong SearchTempl (
const OUString &rTempl,
396 const OUString* pReplTempl =
nullptr );
409 void MoveCursor(
bool bWithSelect =
false );
412 bool StartInputFieldDlg(
SwField*,
bool bPrevButton,
bool bNextButton,
weld::Widget* pParentWin, FieldDialogPressedButton* pPressedButton =
nullptr);
414 bool StartDropDownFieldDlg(
SwField*,
bool bPrevButton,
bool bNextButton,
weld::Widget* pParentWin, FieldDialogPressedButton* pPressedButton =
nullptr);
420 void GotoMark( const ::sw::mark::IMark*
const pMark );
421 bool GotoMark( const ::sw::mark::IMark*
const pMark,
bool bSelect );
422 void GotoMark(
const OUString& rName );
434 void SelectNextPrevHyperlink(
bool bNext );
441 void ExecMacro(
const SvxMacro& rMacro, OUString* pRet =
nullptr,
SbxArray* pArgs =
nullptr );
444 bool bCheckPtr =
false );
448 void ClickToField(
const SwField& rField,
bool bExecHyperlinks );
450 bool ClickToINetGrf(
const Point& rDocPt,
LoadUrlFlags nFilter );
451 inline bool IsInClickToEdit()
const ;
454 bool GetURLFromButton( OUString& rURL, OUString& rDescr )
const;
457 const sal_uInt16 nAction );
475 bool TryRemoveIndent();
477 OUString GetSelDescr()
const;
481 void addCurrentPosition();
483 bool bSelFrame =
true );
488 bool GotoRefMark(
const OUString& rRefMark, sal_uInt16 nSubType = 0,
489 sal_uInt16 nSeqNo = 0 );
494 bool GotoDrawingObject(std::u16string_view rName);
496 void ChangeHeaderOrFooter(std::u16string_view rStyleName,
bool bHeader,
bool bOn,
bool bShowWarning);
502 bool IsOutlineContentVisible(
const size_t nPos);
503 void MakeOutlineContentVisible(
const size_t nPos,
bool bMakeVisible =
true);
504 void MakeAllFoldedOutlineContentVisible(
bool bMakeVisible =
true);
505 void InvalidateOutlineContentVisibility();
506 bool GetAttrOutlineContentVisible(
const size_t nPos);
508 OString getLOKPayload(
int nType,
int nViewId,
bool* ignore)
const;
512 SAL_DLLPRIVATE
void OpenMark();
513 SAL_DLLPRIVATE
void CloseMark(
bool bOkFlag );
529 } *m_pModeStack =
nullptr;
537 } m_ePageMove = MV_NO;
548 SwTwips lOff, std::unique_ptr<CursorStack> pN )
550 pNext(
std::move(pN)),
551 bValidCurPos( bValid ),
552 bIsFrameSel( bFrameSel ),
564 bool m_bDestOnStack =
false;
566 SAL_DLLPRIVATE
bool PushCursor(
SwTwips lOffset,
bool bSelect);
567 SAL_DLLPRIVATE
bool PopCursor(
bool bUpdate,
bool bSelect =
false);
570 SAL_DLLPRIVATE
void SttWrd();
571 SAL_DLLPRIVATE
void EndWrd();
572 SAL_DLLPRIVATE
bool NxtWrd_();
573 SAL_DLLPRIVATE
bool PrvWrd_();
575 SAL_DLLPRIVATE
bool NxtWrdForDelete();
576 SAL_DLLPRIVATE
bool PrvWrdForDelete();
577 SAL_DLLPRIVATE
bool FwdSentence_();
578 SAL_DLLPRIVATE
bool BwdSentence_();
580 SAL_DLLPRIVATE
bool BwdPara_();
599 SAL_DLLPRIVATE
void ResetCursorStack_();
604 SAL_DLLPRIVATE
tools::Long SetCursorKillSel(
const Point *,
bool bProp );
606 SAL_DLLPRIVATE
void BeginDrag(
const Point *,
bool bProp );
607 SAL_DLLPRIVATE
void DefaultDrag(
const Point *,
bool bProp );
608 SAL_DLLPRIVATE
void DefaultEndDrag(
const Point *,
bool bProp );
610 SAL_DLLPRIVATE
void ExtSelWrd(
const Point *,
bool bProp );
611 SAL_DLLPRIVATE
void ExtSelLn(
const Point *,
bool bProp );
613 SAL_DLLPRIVATE
void BeginFrameDrag(
const Point *,
bool bProp );
616 SAL_DLLPRIVATE
void UpdateLayoutFrame(
const Point *,
bool bProp );
618 SAL_DLLPRIVATE
void SttLeaveSelect();
619 SAL_DLLPRIVATE
void AddLeaveSelect();
622 SAL_DLLPRIVATE
void LeaveExtSel() { m_bSelWrd = m_bSelLn =
false;}
624 SAL_DLLPRIVATE
bool GoStart(
bool KeepArea,
bool *,
625 bool bSelect,
bool bDontMoveRegion =
false);
626 SAL_DLLPRIVATE
bool GoEnd(
bool KeepArea =
false,
const bool * =
nullptr);
635 SAL_DLLPRIVATE
bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark*
const pMark=
nullptr);
MakeAllOutlineContentTemporarilyVisible(SwDoc *pDoc)
~MakeAllOutlineContentTemporarilyVisible() COVERITY_NOEXCEPT_FALSE
Stores the properties of a content control.
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 Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
bool SelectTextAttr(sal_uInt16 nWhich, bool bExpand, const SwTextAttr *pAttr=nullptr)
bool Right(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
bool GotoNextTOXBase(const OUString *=nullptr)
jump to the next index
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
bool Down(sal_uInt16 nCnt=1)
bool GotoOutline(const OUString &rName)
bool GotoRegion(std::u16string_view rName)
bool Pop(PopMode)
delete cursor
bool GotoFormatField(const SwFormatField &rField)
bool GotoINetAttr(const SwTextINetFormat &rAttr)
bool Up(sal_uInt16 nCnt=1)
SwDocShell * GetDocShell()
void StartAllAction()
For all views of this document.
void SplitNode(bool bAutoFormat=false, bool bCheckTableStart=true)
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.
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.
bool IsShowOutlineContentVisibilityButton() const
virtual void DrawSelChanged()
const SwViewOption * GetViewOptions() const
virtual void SetReadonlyOption(bool bSet)
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)