28#include <osl/diagnose.h>
45 struct SearchOptions2;
132 bool bMoveTable =
false;
133 std::optional<SwPosition> oStartPos;
134 std::optional<SwPosition> oEndPos;
141 if (!bHasWholeTabSelection
142 && ( !bIsCursorInTable
143 ||
getShellCursor(
false)->GetMarkNode().FindTableNode() ==
nullptr
151 oStartPos.emplace( *pTmpCursor->
GetPoint() );
152 oEndPos.emplace( *pTmpCursor->
GetMark() );
159 GoStart(
true, &bMoveTable,
false, !bIsFullSel);
161 GoEnd(
true, &bMoveTable);
182 if (bNeedsExtendedSelectAll && bIsCursorInTable)
187 if (bNeedsExtendedSelectAll)
208 if( ( *pTmpCursor->
GetPoint() < *oEndPos ||
209 ( *oStartPos == *pTmpCursor->
GetMark() &&
210 *oEndPos == *pTmpCursor->
GetPoint() ) ) && !bNeedsExtendedSelectAll)
228 bool bCancel =
false;
229 sal_Int32 nRet =
Find_Text(rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace);
242 FindRanges eFlags,
const OUString* pReplTempl )
252 bool bCancel =
false;
254 eStt,eEnd, bCancel, eFlags, pReplaceColl);
275 bool bCancel =
false;
276 sal_Int32 nRet =
FindAttrs(rFindSet, bNoColls, eStart, eEnd, bCancel, eFlags, pSearchOpt, pReplaceSet);
335 Point aPt(LONG_MIN, LONG_MIN);
421 aDescription.
aParameters = {{
"START_POS", aSelStart}, {
"END_POS", aSelEnd}};
422 aDescription.
aAction =
"SELECT";
423 aDescription.
aID =
"writer_edit";
424 aDescription.
aKeyWord =
"SwEditWinUIObject";
425 aDescription.
aParent =
"MainWindow";
477 bool bMoveCursor =
true, bToTop =
false;
484 case -1: bToTop =
false;
break;
485 case 1: bToTop =
true;
break;
486 default: bMoveCursor =
false;
break;
745 OSL_ENSURE(pFormat,
"no frame format");
748 if(rFormatMac.
HasMacro(SvMacroItemId::SwObjectSelect))
751 if( IsFrameSelected() )
752 m_bLayoutMode =
true;
891 if( !cPrev || !cNext ||
901 if (cPrev && cNext &&
966 bool bCreateXSelection =
false;
970 if ( bFrameSelected )
977 bCreateXSelection =
true;
979 else if( bFrameSelected )
982 bCreateXSelection =
true;
988 bCreateXSelection =
true;
991 if( bCreateXSelection )
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
constexpr tools::Long Y() const
constexpr tools::Long X() const
void SetState(const SfxItemSet &rSet)
void Update(sal_uInt16 nId)
void Invalidate(sal_uInt16 nId)
SfxBindings & GetBindings()
SfxChildWindow * GetChildWindow(sal_uInt16)
SfxViewFrame & GetViewFrame() const
const SvxMacro & GetMacro(SvMacroItemId nEvent) const
bool HasMacro(SvMacroItemId nEvent) const
Class for automated call of Start- and EndAction().
static void SetFrameMode(FlyMode eMode, SwWrtShell *pShell)
A helper class to save cursor state (position).
void ExtendedSelectAll(bool bFootnotes=true)
bool Pop(PopMode, ::std::optional< SwCallLink > &roLink)
void Push()
store a copy of the current cursor on the cursor stack
void SetOverwriteCursor(bool bFlag)
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
bool TrySelectOuterTable()
bool GoPrevCursor()
go to the previous SSelection
bool IsStartSentence() const
void BlockCursorToCursor()
bool SelectNxtPrvHyperlink(bool bNext)
SwShellCursor * GetCursor_()
const SwRect & GetCharRect() const
const Link< LinkParamNone *, void > & GetChgLnk() const
StartsWith StartsWith_()
If document body starts with a table or starts/ends with hidden paragraph.
bool IsInWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
int SetCursor(const Point &rPt, bool bOnlyText=false, bool bBlock=true)
bool HasSelection() const
Does the current cursor create a selection?
bool SttEndDoc(bool bStt)
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
int CompareCursorStackMkCurrPt() const
bool IsSelTableCells() const
bool GoNextCursor()
go to the next SSelection
void CursorToBlockCursor()
leave block mode, change block cursor into normal cursor
void Combine()
Combine two cursors.
SwPaM * CreateCursor()
delete the current cursor and make the following into the current
void EndAction(const bool bIdleEnd=false)
sal_Int32 FindFormat(const SwTextFormatColl &rFormatColl, SwDocPositions eStart, SwDocPositions eEnd, bool &bCancel, FindRanges eRng, const SwTextFormatColl *pReplFormat)
bool TestCurrPam(const Point &rPt, bool bTstHit=false)
Search in the selected area for a Selection that covers the given point.
void UnsetEnhancedTableSelection()
bool SelectWord(const Point *pPt)
bool Right(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
sal_Int32 Find_Text(const i18nutil::SearchOptions2 &rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, bool &bCancel, FindRanges eRng, bool bReplace=false)
sal_Int32 FindAttrs(const SfxItemSet &rSet, bool bNoCollections, SwDocPositions eStart, SwDocPositions eEnd, bool &bCancel, FindRanges eRng, const i18nutil::SearchOptions2 *pSearchOpt, const SfxItemSet *rReplSet)
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
void DestroyCursor()
transform TableCursor to normal cursor, nullify Tablemode
bool MoveSection(SwWhichSection, SwMoveFnCollection const &)
SwTable::SearchType GetEnhancedTableSelection() const
bool Left(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
bool IsCursorPtAtEnd() const
bool IsStartWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
bool IsEndSentence() const
sal_Unicode GetChar(bool bEnd=true, tools::Long nOffset=0)
get the nth character of the current SSelection
::std::optional<::std::pair< SwNode const *, ::std::vector< SwTableNode * > > > ExtendedSelectedAll() const
If ExtendedSelectAll() was called and selection didn't change since then.
void RestoreSavePos()
Restore cursor state to the one saved by SwCursorSaveState.
void SetSplitVerticalByDefault(bool value)
bool IsSplitVerticalByDefault() const
sal_uInt16 GetCntType() const
Determine form of content. Return Type at CurrentCursor->SPoint.
bool Delete(bool isArtificialSelection=false)
Delete content of all ranges.
void SetRedlineFlags(RedlineFlags eMode)
SwTextFormatColl & GetDfltTextFormatColl() const
void Undo(sal_uInt16 const nCount=1, sal_uInt16 nOffset=0)
void Drag(const Point *pPt, bool bProp)
bool IsFrameSelected() const
bool HasWholeTabSelection() const
bool SelTableRowCol(const Point &rPt, const Point *pEnd, bool bRowDrag)
pEnd will be used during MouseMove
size_t IsObjSelected() const
bool SelectObj(const Point &rSelPt, sal_uInt8 nFlag=0, SdrObject *pObj=nullptr)
If an object has been given, exactly this object is selected (instead of searching over position).
void BeginDrag(const Point *pPt, bool bProp)
Class for automated call of Start- and EndCursorMove().
const SwPosition * GetMark() const
const SwPosition * End() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
Represents the current text cursor of one opened edit window.
virtual void SetMark() override
Unless this is called, the getter method of Mark will return Point.
Represents the style of a paragraph.
static void ClearSelection(const SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
static void CreateSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
bool IsViewLocked() const
Used by the UI to modify the document model.
bool IsSelFrameMode() const
SAL_DLLPRIVATE tools::Long SetCursorKillSel(const Point *, bool bProp)
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
bool IsRetainSelection() const
SAL_DLLPRIVATE void DefaultEndDrag(const Point *, bool bProp)
SAL_DLLPRIVATE void SttLeaveSelect()
void SetSplitVerticalByDefault(bool value)
sal_Int32 SearchAttr(const SfxItemSet &rFindSet, bool bNoColls, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags=FindRanges::InBody, const i18nutil::SearchOptions2 *pSearchOpt=nullptr, const SfxItemSet *pReplaceSet=nullptr)
SAL_DLLPRIVATE bool GoStart(bool KeepArea, bool *, bool bSelect, bool bDontMoveRegion=false)
SAL_DLLPRIVATE void LeaveExtSel()
SAL_DLLPRIVATE void BeginFrameDrag(const Point *, bool bProp)
bool PrvWrd(bool bSelect=false)
bool Left(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
SAL_DLLPRIVATE tools::Long SetCursor(const Point *, bool bProp=false)
void SelectNextPrevHyperlink(bool bNext)
sal_Int32 SearchTempl(const OUString &rTempl, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags=FindRanges::InBody, const OUString *pReplTempl=nullptr)
bool IsSplitVerticalByDefault() const
void SetInsMode(bool bOn=true)
struct SwWrtShell::ModeStack * m_pModeStack
SAL_DLLPRIVATE void ExtSelWrd(const Point *, bool bProp)
SAL_DLLPRIVATE void AddLeaveSelect()
void SelPara(const Point *)
void SelSentence(const Point *)
SAL_DLLPRIVATE void BeginDrag(const Point *, bool bProp)
SAL_DLLPRIVATE bool GoEnd(bool KeepArea=false, const bool *=nullptr)
int IntelligentCut(SelectionType nSelectionType, bool bCut=true)
sal_Int32 SearchPattern(const i18nutil::SearchOptions2 &rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags=FindRanges::InBody, bool bReplace=false)
Link< SwWrtShell &, void > m_aSelTableLink
SAL_DLLPRIVATE tools::Long Ignore(const Point *, bool bProp)
void SetRedlineFlagsAndCheckInsMode(RedlineFlags eMode)
SwTextFormatColl * GetParaStyle(const OUString &rCollName, GetStyle eCreate=GETSTYLE_NOCREATE)
tools::Long ResetSelect(const Point *, bool)
bool SelWrd(const Point *=nullptr)
SAL_DLLPRIVATE void DefaultDrag(const Point *, bool bProp)
SAL_DLLPRIVATE void UpdateLayoutFrame(const Point *, bool bProp)
bool SelectTableRowCol(const Point &rPt, const Point *pEnd=nullptr, bool bRowDrag=false)
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
const SwView & GetView() const
SAL_DLLPRIVATE void ExtSelLn(const Point *, bool bProp)
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
@ InSel
Find in selections.
#define CH_TXTATR_BREAKWORD
CharClass & GetAppCharClass()
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
bool GoCurrSection(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnParaStart
SwMoveFnCollection const & fnSectionEnd
SwMoveFnCollection const & fnParaEnd
SwMoveFnCollection const & fnSectionStart
static tools::Long nStartDragX
static tools::Long nStartDragY
IMPL_LINK(SwWrtShell, ExecFlyMac, const SwFlyFrameFormat *, pFlyFormat, void)
std::map< OUString, OUString > aParameters
sal_Int32 GetContentIndex() const