28 #include <com/sun/star/embed/EmbedVerbs.hpp>
56 struct SearchOptions2;
119 void Drag (
const Point* pPt,
bool bProp) { (this->*m_fnDrag)(pPt, bProp); }
120 void EndDrag (
const Point* pPt,
bool bProp) { (this->*m_fnEndDrag)(pPt, bProp); }
123 bool IsSplitVerticalByDefault()
const;
124 void SetSplitVerticalByDefault(
bool value);
130 inline void ResetCursorStack();
147 bool IsStdMode()
const {
return !m_bExtMode && !m_bAddMode && !m_bBlockMode; }
151 bool ToggleExtMode();
156 void ToggleAddMode();
159 void EnterBlockMode();
160 void LeaveBlockMode();
161 bool ToggleBlockMode();
164 void SetInsMode(
bool bOn =
true );
167 void SetRedlineFlagsAndCheckInsMode(
RedlineFlags eMode );
169 void EnterSelFrameMode(
const Point *pStartDrag =
nullptr);
170 void LeaveSelFrameMode();
173 void UnSelectFrame();
179 inline void EndSelTableCells();
182 bool IsExtSel()
const {
return m_bSelWrd || m_bSelLn; }
186 inline bool Is_FnDragEQBeginDrag()
const;
194 bool SelNearestWrd();
195 bool SelWrd (
const Point * =
nullptr );
197 void SelSentence (
const Point *);
198 void SelPara (
const Point *);
203 bool SimpleMove( FNSimpleMove,
bool bSelect );
205 bool Left ( sal_uInt16 nMode,
bool bSelect,
206 sal_uInt16 nCount,
bool bBasicCall,
bool bVisual =
false );
207 bool Right ( sal_uInt16 nMode,
bool bSelect,
208 sal_uInt16 nCount,
bool bBasicCall,
bool bVisual =
false );
209 bool Up (
bool bSelect, sal_uInt16 nCount = 1,
bool bBasicCall =
false );
210 bool Down (
bool bSelect, sal_uInt16 nCount = 1,
bool bBasicCall =
false );
214 bool LeftMargin (
bool bSelect,
bool bBasicCall );
217 bool StartOfSection(
bool bSelect =
false );
218 bool EndOfSection (
bool bSelect =
false );
220 bool SttNxtPg (
bool bSelect =
false );
221 void SttPrvPg (
bool bSelect =
false );
222 void EndNxtPg (
bool bSelect =
false );
223 bool EndPrvPg (
bool bSelect =
false );
224 bool SttPg (
bool bSelect =
false );
225 bool EndPg (
bool bSelect =
false );
226 bool SttPara (
bool bSelect =
false );
227 void EndPara (
bool bSelect =
false );
238 bool SelectTableRowCol(
const Point& rPt,
const Point* pEnd =
nullptr,
bool bRowDrag =
false );
239 void SelectTableRow();
240 void SelectTableCol();
241 void SelectTableCell();
246 void StartOfColumn ();
248 void StartOfNextColumn ();
249 void EndOfNextColumn ();
250 void StartOfPrevColumn ();
251 void EndOfPrevColumn ();
257 bool GotoPage( sal_uInt16 nPage,
bool bRecord );
262 bool PageCursor(
SwTwips lOffset,
bool bSelect);
267 void NoEdit(
bool bHideCursor =
true);
277 void DelToEndOfLine();
278 void DelToStartOfLine();
284 void DelToEndOfPara();
285 void DelToStartOfPara();
286 bool DelToEndOfSentence();
287 void DelToStartOfSentence();
297 WORD_SPACE_BEFORE = 1,
298 WORD_SPACE_AFTER = 2,
301 int IntelligentCut(
SelectionType nSelectionType,
bool bCut =
true);
305 void Insert(
const OUString &);
307 void Insert(
const OUString &rPath,
const OUString &rFilter,
309 RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA);
311 void InsertByWord(
const OUString & );
312 void InsertPageBreak(
const OUString *pPageDesc =
nullptr, const ::std::optional<sal_uInt16>& rPgNum = std::nullopt);
313 void InsertLineBreak();
314 void InsertColumnBreak();
315 void InsertFootnote(
const OUString &,
bool bEndNote =
false,
bool bEdit =
true );
316 void SplitNode(
bool bAutoFormat =
false );
330 void NumOrBulletOn(
bool bNum);
331 void NumOrBulletOff();
339 sal_uInt16 nSlotId = 0);
342 void LaunchOLEObj(sal_Int32 nVerb = css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY);
345 const SwRect *pFlyPrtRect =
nullptr,
346 const SwRect *pFlyFrameRect =
nullptr,
347 const bool bNoTextFramePrtAreaChanged =
false )
override;
349 const SwRect &rFrame )
override;
356 GETSTYLE_CREATEANY };
359 GetStyle eCreate = GETSTYLE_NOCREATE);
361 GetStyle eCreate = GETSTYLE_NOCREATE);
362 SwFrameFormat* GetTableStyle(std::u16string_view rFormatName);
364 void SetPageStyle(
const OUString &rCollName);
369 void QuickUpdateStyle();
375 void Do( DoType eDoType, sal_uInt16 nCnt = 1 );
376 OUString GetDoString( DoType eDoType )
const;
377 OUString GetRepeatString()
const;
385 bool bReplace =
false );
387 sal_uLong SearchTempl (
const OUString &rTempl,
390 const OUString* pReplTempl =
nullptr );
403 void MoveCursor(
bool bWithSelect =
false );
406 bool StartInputFieldDlg(
SwField*,
bool bPrevButton,
bool bNextButton,
weld::Widget* pParentWin, FieldDialogPressedButton* pPressedButton =
nullptr);
408 bool StartDropDownFieldDlg(
SwField*,
bool bPrevButton,
bool bNextButton,
weld::Widget* pParentWin, FieldDialogPressedButton* pPressedButton =
nullptr);
414 void GotoMark( const ::sw::mark::IMark*
const pMark );
415 bool GotoMark( const ::sw::mark::IMark*
const pMark,
bool bSelect );
416 void GotoMark(
const OUString& rName );
426 void SelectNextPrevHyperlink(
bool bNext );
433 void ExecMacro(
const SvxMacro& rMacro, OUString* pRet =
nullptr,
SbxArray* pArgs =
nullptr );
436 bool bCheckPtr =
false );
440 void ClickToField(
const SwField& rField );
442 bool ClickToINetGrf(
const Point& rDocPt,
LoadUrlFlags nFilter );
443 inline bool IsInClickToEdit()
const ;
446 bool GetURLFromButton( OUString& rURL, OUString& rDescr )
const;
449 const sal_uInt16 nAction );
467 bool TryRemoveIndent();
469 OUString GetSelDescr()
const;
473 void addCurrentPosition();
475 bool bSelFrame =
true );
480 bool GotoRefMark(
const OUString& rRefMark, sal_uInt16 nSubType = 0,
481 sal_uInt16 nSeqNo = 0 );
486 bool GotoDrawingObject(std::u16string_view rName);
488 void ChangeHeaderOrFooter(std::u16string_view rStyleName,
bool bHeader,
bool bOn,
bool bShowWarning);
494 bool IsOutlineContentVisible(
const size_t nPos);
495 void ToggleOutlineContentVisibility(
SwNode* pNd,
const bool bForceNotVisible =
false);
496 void ToggleOutlineContentVisibility(
const size_t nPos,
const bool bForceNotVisible =
false);
500 SAL_DLLPRIVATE
void OpenMark();
501 SAL_DLLPRIVATE
void CloseMark(
bool bOkFlag );
517 } *m_pModeStack =
nullptr;
525 } m_ePageMove = MV_NO;
531 bool bValidCurPos : 1;
532 bool bIsFrameSel : 1;
536 SwTwips lOff, std::unique_ptr<CursorStack> pN )
538 pNext(
std::move(pN)),
539 bValidCurPos( bValid ),
540 bIsFrameSel( bFrameSel ),
552 bool m_bDestOnStack =
false;
554 SAL_DLLPRIVATE
bool PushCursor(
SwTwips lOffset,
bool bSelect);
555 SAL_DLLPRIVATE
bool PopCursor(
bool bUpdate,
bool bSelect =
false);
558 SAL_DLLPRIVATE
void SttWrd();
559 SAL_DLLPRIVATE
void EndWrd();
560 SAL_DLLPRIVATE
bool NxtWrd_();
561 SAL_DLLPRIVATE
bool PrvWrd_();
563 SAL_DLLPRIVATE
bool NxtWrdForDelete();
564 SAL_DLLPRIVATE
bool PrvWrdForDelete();
565 SAL_DLLPRIVATE
bool FwdSentence_();
566 SAL_DLLPRIVATE
bool BwdSentence_();
568 SAL_DLLPRIVATE
bool BwdPara_();
575 bool m_bBlockMode :1;
576 bool m_bLayoutMode :1;
579 bool m_bIsInClickToEdit:1;
580 bool m_bClearMark :1;
581 bool m_bRetainSelection :1;
587 SAL_DLLPRIVATE
void ResetCursorStack_();
592 SAL_DLLPRIVATE
tools::Long SetCursorKillSel(
const Point *,
bool bProp );
594 SAL_DLLPRIVATE
void BeginDrag(
const Point *,
bool bProp );
595 SAL_DLLPRIVATE
void DefaultDrag(
const Point *,
bool bProp );
596 SAL_DLLPRIVATE
void DefaultEndDrag(
const Point *,
bool bProp );
598 SAL_DLLPRIVATE
void ExtSelWrd(
const Point *,
bool bProp );
599 SAL_DLLPRIVATE
void ExtSelLn(
const Point *,
bool bProp );
601 SAL_DLLPRIVATE
void BeginFrameDrag(
const Point *,
bool bProp );
604 SAL_DLLPRIVATE
void UpdateLayoutFrame(
const Point *,
bool bProp );
606 SAL_DLLPRIVATE
void SttLeaveSelect();
607 SAL_DLLPRIVATE
void AddLeaveSelect();
610 SAL_DLLPRIVATE
void LeaveExtSel() { m_bSelWrd = m_bSelLn =
false;}
612 SAL_DLLPRIVATE
bool GoStart(
bool KeepArea,
bool *,
613 bool bSelect,
bool bDontMoveRegion =
false);
614 SAL_DLLPRIVATE
bool GoEnd(
bool KeepArea =
false,
const bool * =
nullptr);
623 SAL_DLLPRIVATE
bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark*
const pMark=
nullptr);
bool GotoPage(sal_uInt16 nPage)
SAL_DLLPRIVATE tools::Long Ignore(const Point *, bool bProp)
bool IsInClickToEdit() const
void NxtWrd(bool bSelect=false)
bool GotoTable(const OUString &rName)
void ChgDBData(const SwDBData &SwDBData)
Represents the style of a paragraph.
bool Right(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
void InsertTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
Insert content table. Renew if required.
virtual void MoveObjectIfActive(svt::EmbeddedObjectRef &xObj, const Point &rOffset)
The layout has been changed, so the active object has to be moved after that.
#define DECL_LINK(Member, ArgType, RetType)
void UpdateTableOf(const SwTOXBase &rTOX, const SfxItemSet *pSet=nullptr)
update tables of content
bool IsRetainSelection() const
Base class of all fields.
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
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.
void AutoCorrect(SvxAutoCorrect &rACorr, bool bInsertMode, sal_Unicode cChar)
Call AutoCorrect.
Link< SwWrtShell &, void > m_aSelTableLink
SAL_DLLPRIVATE bool BwdPara_()
bool Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
Of course Writer needs its own rectangles.
SAL_DLLPRIVATE bool FwdSentence_()
bool GotoMark(const ::sw::mark::IMark *const pMark)
virtual void SetReadonlyOption(bool bSet)
bool HasSelection() const
Does the current cursor create a selection?
SwNavigationMgr & GetNavigationMgr()
Used by the UI to modify the document model.
void BeginDrag(const Point *pPt, bool bProp)
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
const SwView & GetView() const
bool Down(sal_uInt16 nCnt=1)
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
bool PrvWrd(bool bSelect=false)
int SetCursor(const Point &rPt, bool bOnlyText=false, bool bBlock=true)
bool GotoRegion(std::u16string_view rName)
bool GotoFly(const OUString &rName, FlyCntType eType, bool bSelFrame)
Jump to named Fly (graphic/OLE).
SwNavigationMgr m_aNavigationMgr
virtual void ConnectObj(svt::EmbeddedObjectRef &, const SwRect &rPrt, const SwRect &rFrame)=0
Connect objects with ActivateWhenVisible at Paint.
PaM is Point and Mark: a selection of the document model.
bool HasSelection() const
std::unique_ptr< CursorStack > m_pCursorStack
bool Up(sal_uInt16 nCnt=1)
virtual void DrawSelChanged()
void SetRetainSelection(bool bRet)
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow)
void BwdSentence(bool bSelect=false)
SAL_DLLPRIVATE bool BwdSentence_()
vector_type::size_type size_type
bool GotoFieldmark(const ::sw::mark::IFieldmark *const pMark)
bool GotoINetAttr(const SwTextINetFormat &rAttr)
bool RightMargin(bool bAPI=false)
bool GotoNextTOXBase(const OUString *=nullptr)
jump to the next index
bool SelectTextAttr(sal_uInt16 nWhich, bool bExpand, const SwTextAttr *pAttr=nullptr)
void Insert(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet)
void FwdSentence(bool bSelect=false)
bool HasCursorStack() const
SAL_DLLPRIVATE void DefaultEndDrag(const Point *, bool bProp)
void Drag(const Point *pPt, bool bProp)
tools::Long CallSetCursor(const Point *pPt, bool bProp)
SwTextFormatColl * GetParaStyle(SwDoc &rDoc, const OUString &rName)
Get a Paragraph Style which fits a given name.
void EndDrag(const Point *pPt, bool bProp)
SwFlyFrameFormat * InsertObject(const svt::EmbeddedObjectRef &, SfxItemSet *pFlyAttrSet)
CursorStack(bool bValid, bool bFrameSel, const Point &rDocPos, SwTwips lOff, std::unique_ptr< CursorStack > pN)
bool Is_FnDragEQBeginDrag() const
bool IsMultiSelection() const
bool IsModePushed() const
size_t IsObjSelected() const
tools::Long KillSelection(const Point *pPt, bool bProp)
SAL_DLLPRIVATE void BeginDrag(const Point *, bool bProp)
Find "one" only in body text.
void GetCurPageStyle(SwPaM const &rPaM, OUString &rString)
void SetSelTableCells(bool bFlag)
void Insert(sal_Unicode, bool bOnlyCurrCursor=false)
Edit (all selected ranges).
SAL_DLLPRIVATE bool NxtWrd_()
SAL_DLLPRIVATE bool PrvWrd_()
void SplitNode(bool bAutoFormat=false, bool bCheckTableStart=true)
bool Pop(PopMode)
delete cursor
std::vector< SwNode * >::size_type size_type
SwCharFormat * GetCharStyle(SwDoc &rDoc, const OUString &rName)
Get a Character Style which fits a given name.
bool GotoOutline(const OUString &rName)
void(SwWrtShell::* SELECTFUNC2)(const Point *, bool bProp)
bool GotoFormatField(const SwFormatField &rField)
ModeStack(ModeStack *pNextMode, bool _bIns, bool _bExt, bool _bAdd, bool _bBlock)
std::unique_ptr< CursorStack > pNext
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo)
jump to reference marker
bool IsSelFrameMode() const
SAL_DLLPRIVATE void LeaveExtSel()
SAL_DLLPRIVATE tools::Long SetCursor(const Point *, bool bProp=false)
void SelTableCells(const Link< SwWrtShell &, void > &rLink)
SAL_DLLPRIVATE void ResetCursorStack_()
Base class of the Writer document model elements.