28 #include <osl/diagnose.h>
45 struct SearchOptions2;
131 bool bMoveTable =
false;
132 std::unique_ptr<SwPosition> pStartPos;
133 std::unique_ptr<SwPosition> pEndPos;
140 if (!bHasWholeTabSelection)
155 GoStart(
true, &bMoveTable,
false, !bIsFullSel);
163 GoEnd(
true, &bMoveTable);
171 if (bNeedsExtendedSelectAll && bIsCursorInTable)
172 bNeedsExtendedSelectAll = bHasWholeTabSelection;
174 if (bNeedsExtendedSelectAll)
199 if( ( *pTmpCursor->
GetPoint() < *pEndPos ||
200 ( *pStartPos == *pTmpCursor->
GetMark() &&
201 *pEndPos == *pTmpCursor->
GetPoint() ) ) && !bNeedsExtendedSelectAll)
219 bool bCancel =
false;
220 sal_uLong nRet =
Find_Text(rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace);
233 FindRanges eFlags,
const OUString* pReplTempl )
243 bool bCancel =
false;
245 eStt,eEnd, bCancel, eFlags, pReplaceColl);
266 bool bCancel =
false;
267 sal_uLong nRet =
FindAttrs(rFindSet, bNoColls, eStart, eEnd, bCancel, eFlags, pSearchOpt, pReplaceSet);
326 Point aPt(LONG_MIN, LONG_MIN);
412 aDescription.
aParameters = {{
"START_POS", aSelStart}, {
"END_POS", aSelEnd}};
413 aDescription.
aAction =
"SELECT";
414 aDescription.
aID =
"writer_edit";
415 aDescription.
aKeyWord =
"SwEditWinUIObject";
416 aDescription.
aParent =
"MainWindow";
468 bool bMoveCursor =
true, bToTop =
false;
475 case -1: bToTop =
false;
break;
476 case 1: bToTop =
true;
break;
477 default: bMoveCursor =
false;
break;
736 OSL_ENSURE(pFormat,
"no frame format");
739 if(rFormatMac.
HasMacro(SvMacroItemId::SwObjectSelect))
742 if( IsFrameSelected() )
743 m_bLayoutMode =
true;
882 if( !cPrev || !cNext ||
892 if (cPrev && cNext &&
957 bool bCreateXSelection =
false;
961 if ( bFrameSelected )
968 bCreateXSelection =
true;
970 else if( bFrameSelected )
973 bCreateXSelection =
true;
979 bCreateXSelection =
true;
982 if( bCreateXSelection )
SfxViewFrame * GetViewFrame() const
bool SelectTableRowCol(const Point &rPt, const Point *pEnd=nullptr, bool bRowDrag=false)
SAL_DLLPRIVATE tools::Long Ignore(const Point *, bool bProp)
SwMoveFnCollection const & fnParaEnd
sal_uLong Find_Text(const i18nutil::SearchOptions2 &rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, bool &bCancel, FindRanges eRng, bool bReplace=false)
Represents the style of a paragraph.
Marks a position in the document model.
SfxChildWindow * GetChildWindow(sal_uInt16)
bool Right(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
sal_uLong SearchTempl(const OUString &rTempl, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags=FindRanges::InBody, const OUString *pReplTempl=nullptr)
void SetState(const SfxItemSet &rSet)
bool GoNextCursor()
go to the next SSelection
bool SttEndDoc(bool bStt)
bool GoCurrPara(SwPaM &rPam, SwMoveFnCollection const &aPosPara)
static void ClearSelection(const SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
void SetRedlineFlags(RedlineFlags eMode)
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
SAL_DLLPRIVATE void UpdateLayoutFrame(const Point *, bool bProp)
bool IsRetainSelection() const
const SwPosition * GetMark() const
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
virtual void SetMark() override
Unless this is called, the getter method of Mark will return Point.
SwMoveFnCollection const & fnParaStart
Link< SwWrtShell &, void > m_aSelTableLink
bool Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
sal_Unicode GetChar(bool bEnd=true, tools::Long nOffset=0)
get the nth character of the current SSelection
void DestroyCursor()
transform TableCursor to normal cursor, nullify Tablemode
void ExtendedSelectAll(bool bFootnotes=true)
void SetRedlineFlagsAndCheckInsMode(RedlineFlags eMode)
void Invalidate(sal_uInt16 nId)
SAL_DLLPRIVATE void ExtSelLn(const Point *, bool bProp)
bool HasSelection() const
Does the current cursor create a selection?
SAL_DLLPRIVATE void BeginFrameDrag(const Point *, bool bProp)
bool IsStartSentence() const
Used by the UI to modify the document model.
static UITestLogger & getInstance()
void BeginDrag(const Point *pPt, bool bProp)
#define CH_TXTATR_BREAKWORD
void logEvent(const EventDescription &rDescription)
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
tools::Long ResetSelect(const Point *, bool)
const SwView & GetView() const
static void CreateSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
void SetOverwriteCursor(bool bFlag)
bool PrvWrd(bool bSelect=false)
SAL_DLLPRIVATE bool GoStart(bool KeepArea, bool *, bool bSelect, bool bDontMoveRegion=false)
int SetCursor(const Point &rPt, bool bOnlyText=false, bool bBlock=true)
bool SelTableRowCol(const Point &rPt, const Point *pEnd, bool bRowDrag)
pEnd will be used during MouseMove
bool SelectNxtPrvHyperlink(bool bNext)
void SelPara(const Point *)
SAL_DLLPRIVATE void DefaultDrag(const Point *, bool bProp)
static tools::Long nStartDragY
SwShellCursor * GetCursor_()
bool MovePara(SwWhichPara, SwMoveFnCollection const &)
Class for automated call of Start- and EndAction().
const SwTableNode * IsCursorInTable() const
A helper class to save cursor state (position).
bool SelWrd(const Point *=nullptr)
SwPaM * CreateCursor()
delete the current cursor and make the following into the current
const SwPosition * GetPoint() const
void Push()
store a copy of the current cursor on the cursor stack
void SetSplitVerticalByDefault(bool value)
SAL_DLLPRIVATE void AddLeaveSelect()
SfxBindings & GetBindings()
IMPL_LINK(SwWrtShell, ExecFlyMac, const SwFlyFrameFormat *, pFlyFormat, void)
void BlockCursorToCursor()
int IntelligentCut(SelectionType nSelectionType, bool bCut=true)
SAL_DLLPRIVATE bool GoEnd(bool KeepArea=false, const bool *=nullptr)
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
void SelSentence(const Point *)
static tools::Long nStartDragX
bool IsInWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
void Undo(sal_uInt16 const nCount=1, sal_uInt16 nOffset=0)
sal_uLong SearchPattern(const i18nutil::SearchOptions2 &rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags=FindRanges::InBody, bool bReplace=false)
SwTable::SearchType GetEnhancedTableSelection() const
bool GoCurrSection(SwPaM &rPam, SwMoveFnCollection const &fnMove)
static void SetFrameMode(FlyMode eMode, SwWrtShell *pShell)
sal_uLong SearchAttr(const SfxItemSet &rFindSet, bool bNoColls, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags=FindRanges::InBody, const i18nutil::SearchOptions2 *pSearchOpt=nullptr, const SfxItemSet *pReplaceSet=nullptr)
bool IsSelTableCells() const
sal_uLong FindFormat(const SwTextFormatColl &rFormatColl, SwDocPositions eStart, SwDocPositions eEnd, bool &bCancel, FindRanges eRng, const SwTextFormatColl *pReplFormat)
bool HasMacro(SvMacroItemId nEvent) const
bool IsEndSentence() const
struct SwWrtShell::ModeStack * m_pModeStack
const Link< LinkParamNone *, void > & GetChgLnk() const
void TableCursorToCursor()
enter block mode, change normal cursor into block cursor
const SwPosition * Start() const
SAL_DLLPRIVATE void DefaultEndDrag(const Point *, bool bProp)
bool MoveSection(SwWhichSection, SwMoveFnCollection const &)
bool IsStartWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
bool Delete()
Delete content of all ranges.
SAL_DLLPRIVATE void SttLeaveSelect()
const sal_uInt16 CRSR_SKIP_CELLS
Class for automated call of Start- and EndCursorMove().
void SetInsMode(bool bOn=true)
void Drag(const Point *pPt, bool bProp)
bool Left(sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
SAL_DLLPRIVATE void ExtSelWrd(const Point *, bool bProp)
bool TestCurrPam(const Point &rPt, bool bTstHit=false)
Search in the selected area for a Selection that covers the given point.
void Combine()
Combine two cursors.
void CursorToBlockCursor()
leave block mode, change block cursor into normal cursor
sal_uInt16 GetCntType() const
Determine form of content. Return Type at CurrentCursor->SPoint.
bool IsCursorPtAtEnd() const
SwMoveFnCollection const & fnSectionEnd
const SvxMacro & GetMacro(SvMacroItemId nEvent) const
void SetSplitVerticalByDefault(bool value)
sal_Int32 GetIndex() const
bool IsSplitVerticalByDefault() const
bool StartsWithTable()
If document body starts with a table.
bool GoPrevCursor()
go to the previous SSelection
const SwPosition * End() const
const SwRect & GetCharRect() const
size_t IsObjSelected() const
int CompareCursorStackMkCurrPt() const
SAL_DLLPRIVATE void BeginDrag(const Point *, bool bProp)
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 SelectNextPrevHyperlink(bool bNext)
SwMoveFnCollection const & fnSectionStart
SAL_DLLPRIVATE tools::Long SetCursorKillSel(const Point *, bool bProp)
sal_uLong FindAttrs(const SfxItemSet &rSet, bool bNoCollections, SwDocPositions eStart, SwDocPositions eEnd, bool &bCancel, FindRanges eRng, const i18nutil::SearchOptions2 *pSearchOpt, const SfxItemSet *rReplSet)
const sal_uInt16 CRSR_SKIP_CHARS
SwTextFormatColl & GetDfltTextFormatColl() const
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
bool SelectWord(const Point *pPt)
bool Pop(PopMode)
delete cursor
std::map< OUString, OUString > aParameters
bool HasWholeTabSelection() const
CharClass & GetAppCharClass()
bool IsSplitVerticalByDefault() const
bool IsFrameSelected() const
bool IsViewLocked() const
bool IsSelFrameMode() const
void RestoreSavePos()
Restore cursor state to the one saved by SwCursorSaveState.
SwTextFormatColl * GetParaStyle(const OUString &rCollName, GetStyle eCreate=GETSTYLE_NOCREATE)
SAL_DLLPRIVATE void LeaveExtSel()
void EndAction(const bool bIdleEnd=false)
SAL_DLLPRIVATE tools::Long SetCursor(const Point *, bool bProp=false)
void UnsetEnhancedTableSelection()