29#include <osl/diagnose.h>
91 std::pair<Point, bool>
const tmp(aPt,
true);
156 return nullptr != pFrame;
189 return nullptr != pFrame;
199 if( SIZE_MAX == nDescNo )
209 if (nDescNo < pMyDoc->GetPageDescCnt())
244 std::pair<Point, bool>
const tmp(aPt,
false);
272 const SwSection* pSect = rFormats[ --
n ]->GetSection();
319 const SwSection* pSect = rFormats[ --
n ]->GetSection();
326 && (!pFnd || *pFnd < *pSectNd)
369 const SwTOXType* pType = aMarks[0]->GetTOXType();
375 assert(pContentFrame->IsTextFrame());
414 std::pair<Point, bool>
const tmp(aPt,
false);
430 pTBox = pFormulaItem->GetTableBox();
435 !pFormulaItem->HasValidBoxes() ) )
439 std::pair<Point, bool>
const tmp(aPt,
false);
448 if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF )
449 : ( aCmp < aCurGEF && aFndGEF < aCmp ))
472 }
while( !bFnd && --nMaxDo );
486 aFndGEF.GetPosOfContent( rPos );
517 std::pair<Point, bool>
const tmp(aPt,
false);
534 auto pToxMarkItem =
dynamic_cast<const SwTOXMark*
>(pItem);
537 pTextTOX = pToxMarkItem->GetTextTOXMark();
543 std::pair<Point, bool>
const tmp(aPt,
false);
550 if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF )
551 : ( aCmp < aCurGEF && aFndGEF < aCmp ))
578 aFndGEF.GetPosOfContent( rPos );
613 const bool bInReadOnly,
614 const bool bChkInpFlag =
false )
618 std::vector<SwFormatField*> vFields;
622 SwTextField* pTextField = pFormatField->GetTextField();
623 if ( pTextField !=
nullptr
628 std::pair<Point, bool>
const tmp(aPt,
false);
633 if ( pCFrame !=
nullptr
636 std::unique_ptr<SetGetExpField> pNew(
new SetGetExpField( rTextNode, pTextField ));
637 pNew->SetBodyPos( *pCFrame );
638 rLst.
insert( std::move(pNew) );
648 sal_Int32
const nContentOffset)
650 std::optional<SetGetExpField> oSrch;
651 if (-1 == nContentOffset)
657 oSrch.emplace(rPos.
GetNode(), pTextField, nContentOffset);
664 std::pair<Point, bool>
const tmp(aPt,
false);
665 oSrch->SetBodyPos(*pTextNode->
getLayoutFrame(pLayout, &rPos, &tmp));
670 o_rFound = (it != rSrtLst.
end()) && (**it == *oSrch);
678 const bool bAddSetExpressionFieldsToInputFields )
696 const SwFieldTypes& rFieldTypes = *
mxDoc->getIDocumentFieldsAccess().GetFieldTypes();
697 const size_t nSize = rFieldTypes.size();
698 for(
size_t i=0;
i < nSize; ++
i )
700 pFieldType = rFieldTypes[
i ].get();
710 const SwFieldTypes& rFieldTypes = *
mxDoc->getIDocumentFieldsAccess().GetFieldTypes();
711 const size_t nSize = rFieldTypes.size();
713 for(
size_t i=0;
i < nSize; ++
i )
715 pFieldType = rFieldTypes[
i ].get();
716 if (bAllFieldTypes || nResType == pFieldType->
Which())
724 if( aSrtLst.
empty() )
736 OSL_ENSURE( pTNd,
"No ContentNode" );
739 const bool bDelField = ( pTextField == nullptr );
740 sal_Int32 nContentOffset = -1;
749 mxDoc->IsClipBoard() );
758 nContentOffset = pTextField->
GetStart();
762 GetLayout(), pTNd, pTextField, rPos, nContentOffset);
771 if( it != aSrtLst.
end() && isSrch )
775 if( ++it == aSrtLst.
end() )
780 if( it == aSrtLst.
begin() )
789 if( it == aSrtLst.
end() )
794 if( it == aSrtLst.
begin() )
817 pWrtSh->addCurrentPosition();
836 std::shared_ptr<SwContentControl> pContentControl = rContentControl.
GetContentControl();
838 if (!pTextContentControl)
849 sal_Int32 nStart = pTextContentControl->
GetStart() + 1;
854 if (pContentControl->GetShowingPlaceHolder() || pContentControl->GetCheckbox()
855 || pContentControl->GetSelectedListItem() || pContentControl->GetSelectedDate())
859 sal_Int32 nEnd = *pTextContentControl->
End() - 1;
884 struct FormControlSort
886 bool operator()(std::pair<const SwPosition&, sal_uInt32> rLHS,
887 std::pair<const SwPosition&, sal_uInt32> rRHS)
const
889 assert(rLHS.second && rRHS.second &&
"tabIndex zero must be changed to SAL_MAX_UINT32");
891 if (rLHS.second < rRHS.second)
893 if (rLHS.second > rRHS.second)
897 return rLHS.first < rRHS.first;
900 std::map<std::pair<SwPosition, sal_uInt32>,
901 std::pair<SwTextContentControl*, sw::mark::IFieldmark*>, FormControlSort> aFormMap;
920 sal_uInt32 nTabIndex = pCC && pCC->GetTabIndex() ? pCC->GetTabIndex() :
SAL_MAX_UINT32;
922 const std::pair<SwTextContentControl*, sw::mark::IFieldmark*> pFormControl(pTCC,
nullptr);
923 aFormMap[std::make_pair(
nPos, nTabIndex)] = pFormControl;
926 if (aFormMap.begin() == aFormMap.end())
937 auto pFieldMark =
dynamic_cast<sw::mark::IFieldmark*
>(*it);
939 std::pair<SwTextContentControl*, sw::mark::IFieldmark*> pFormControl(
nullptr, pFieldMark);
941 aFormMap[std::make_pair((*it)->GetMarkStart(),
SAL_MAX_UINT32)] = pFormControl;
944 if (aFormMap.begin() == aFormMap.end())
954 const sal_Int32 nCurTabIndex = pCC && pCC->GetTabIndex() ? pCC->GetTabIndex() :
SAL_MAX_UINT32;
958 nCurPos = pFieldMark->GetMarkStart();
963 const std::pair<SwPosition, sal_uInt32> nOldPos(nCurPos, nCurTabIndex);
967 auto aNewPos = aFormMap.lower_bound(nOldPos);
968 if (bNext && aNewPos != aFormMap.end())
970 else if (!bNext && aNewPos != aFormMap.end() && aNewPos->first == nOldPos)
973 if (aNewPos == aFormMap.begin())
974 aNewPos = aFormMap.end();
979 if (aNewPos == aFormMap.end())
983 aNewPos = aFormMap.begin();
989 if (aNewPos->second.first)
996 assert(aNewPos->second.second);
1032 if ( pNode !=
nullptr )
1041 const SwPaM* pCursor,
1050 const sal_Int32 nTextFieldLength =
1051 pTextField->
End() !=
nullptr
1056 pFieldAtCursor = pTextField;
1059 return pFieldAtCursor;
1063 const SwPaM *
const pCursor,
1064 const bool bIncludeInputFieldAtStart)
1083 if ( pCurField !=
nullptr
1088 static_cast<SwTableField*
>(pCurField)->PtrToBoxNm( pTableNd ? &pTableNd->
GetTable() : nullptr );
1118 return static_txtattr_cast<SwTextContentControl*>(pAttr);
1133 Point aDocPt( rDocPt );
1134 if (
GetLayout()->GetModelPositionForViewPoint( &aPos, aDocPt ) )
1144 assert(pTextInputField !=
nullptr
1145 &&
"<SwEditShell::StartOfInputFieldAtPos(..)> - no Input Field at given position");
1146 return pTextInputField->
GetStart();
1152 assert(pTextInputField !=
nullptr
1153 &&
"<SwEditShell::EndOfInputFieldAtPos(..)> - no Input Field at given position");
1154 return *(pTextInputField->
End());
1225 if (
nPos == nStartPos)
1236 if (
nPos < nStartPos)
1283 if (
nPos == nStartPos)
1299 if (nStartPos <
nPos)
1349 bool bWithChildren ,
bool bKillPams)
1353 if( rOutlNds.
empty() )
1359 if( nSttPos > nEndPos )
1361 OSL_ENSURE(
false,
"Start > End for array access" );
1362 std::swap(nSttPos, nEndPos);
1365 SwNode* pSttNd = rOutlNds[ nSttPos ];
1366 SwNode* pEndNd = rOutlNds[ nEndPos ];
1371 for( ++nEndPos; nEndPos < rOutlNds.
size(); ++nEndPos )
1373 pEndNd = rOutlNds[ nEndPos ];
1375 if( nNxtLevel <= nLevel )
1380 else if( ++nEndPos < rOutlNds.
size() )
1381 pEndNd = rOutlNds[ nEndPos ];
1383 if( nEndPos == rOutlNds.
size() )
1411 sal_Int32
nPos = -1;
1460 &aSpecialPos :
nullptr;
1479 bFoundOutline =
true;
1490 && bCursorFoundExact )
1504 else if( bCursorFoundExact && pTextNd )
1515 const sal_Int32 nBegin = nCurrent;
1532 if( bRet && bSetCursor )
1547 std::pair<Point, bool> tmp(aPt,
true);
1552 pFrame->
GetCharRect( *pFieldRect, aPos, &aTmpState );
1563 const SwField* pField = pTextAttr !=
nullptr
1576 std::pair<Point, bool> tmp(aPt,
true);
1584 pFrame->
GetCharRect( *pFieldRect, aPos, &aTmpState );
1630 if (bCursorFoundExact && pFieldBookmark)
1672 pWrtSh->addCurrentPosition();
1701 std::pair<Point, bool> tmp(aPt,
true);
1704 pFrame->
GetCharRect( *pFieldRect, aPos, &aTmpState );
1714 pTextAttr =
nullptr;
1717 std::vector<SwTextAttr *>
const marks(
1722 pTextAttr = *marks.begin();
1729 std::vector<SwTextAttr *>
const marks(
1734 pTextAttr = *marks.begin();
1755 const sal_Int32* pEnd = pTextAttr->
GetEnd();
1757 rContentAtPos.
sStr =
1760 rContentAtPos.
sStr =
1770 std::pair<Point, bool> tmp(aPt,
true);
1775 pFrame->
GetCharRect( *pFieldRect, aPos, &aTmpState );
1788 if(!pTextAttr &&
index > 0)
1808 const sal_Int32 nSt = pTextAttr->
GetStart();
1809 const sal_Int32 nEnd = *pTextAttr->
End();
1819 std::pair<Point, bool> tmp(aPt,
true);
1826 pFrame->
GetCharRect(aStart, aStartPos, &aTmpState);
1835 *pFieldRect = aStart.
Union(aEnd);
1855 std::pair<Point, bool> tmp(aPt,
true);
1874 nEnd = pTextNd->
Len();
1886 *pFieldRect = aStart.
Union(aEnd);
1900 if( pSttNd &&
nullptr != ( pTableNd = pTextNd->
FindTableNode()) &&
1903 nullptr != ( pTableLine = pBox->
GetUpper() ) &&
1925 if( pFnd && RedlineType::Delete == pFnd->
GetType() )
1949 if( pSttNd &&
nullptr != ( pTableNd = pTextNd->
FindTableNode()) &&
1960 std::pair<Point, bool> tmp(aPt,
true);
2027 const sal_Int32 nAttrStart = pHt->
GetStart();
2028 if( nAttrStart >
n )
2031 if(
nullptr != pHt->
End() && (
2034 : n <= *pHt->
End() )) ||
2035 (
n == nAttrStart &&
2036 ( nAttrStart == *pHt->
End() || !
n ))) )
2048 aSet.Put( aFormatSet );
2052 pTextNd->SwContentNode::GetAttr( aSet );
2054 rContentAtPos.
sStr =
"Pos: (";
2056 rContentAtPos.
sStr +=
":";
2058 rContentAtPos.
sStr +=
")";
2059 rContentAtPos.
sStr +=
"\nParagraph Style: ";
2068 OUStringBuffer sAttrs;
2078 MapUnit::MapCM,
aStr, aInt);
2079 if (!sAttrs.isEmpty())
2080 sAttrs.append(
", ");
2081 sAttrs.append(
aStr);
2085 if (!sAttrs.isEmpty())
2087 if( !rContentAtPos.
sStr.isEmpty() )
2088 rContentAtPos.
sStr +=
"\n";
2089 rContentAtPos.
sStr +=
"Attr: " + sAttrs;
2125 return pPostItField;
2138 pNd = static_txtattr_cast<SwTextField const*>(
pFndTextAttr)->GetpTextNode();
2146 pNd = static_txtattr_cast<SwTextINetFormat const*>(
pFndTextAttr)->GetpTextNode();
2174 SwPaM aTemp( *pSttNd );
2177 if(pContentNode && pContentNode->
IsTextNode())
2187 if ( !pTmpFrame->IsFollow())
2192 pTmpFrame = aIter.
Next();
2198 const sal_Int32 nEnd )
2224 SwTextNode const*
const pTextNode(pPos->GetNode().GetTextNode());
2228 return pFrame->MapModelToViewPos(*pPos);
2245 rPos = pFrame->MapViewToModelPos(nStart);
2247 rPos = pFrame->MapViewToModelPos(nEnd);
2280 const sal_Int32* pEnd = pTextAttr->
End();
2304 return mxDoc->FindINetAttr( rName );
2308 SwRect& rRect, sal_Int16& rOrient )
2324 if(
GetLayout()->GetModelPositionForViewPoint( &aPos, aPt, &aTmpState ) &&
2349 if( !
GetLayout()->GetModelPositionForViewPoint( &aPos, aPt, &aTmpState ) )
2363 pCNd && pCNd->
Len() )
2390 if( !
n && pNextFormat )
2404 switch( aFPos.
eMode )
2417 aSet.Put(firstLine);
2418 aSet.Put(leftMargin);
2421 if( SvxAdjust::Left != rAdj.
GetAdjust() )
2427 OSL_ENSURE(
false,
"No ContentNode" );
2435 OUStringBuffer sInsert;
2447 if (!sInsert.isEmpty())
2457 case text::HoriOrientation::CENTER:
2460 case text::HoriOrientation::RIGHT:
2557 if( pFnd && bSelect )
2560 if( RedlineType::FmtColl == pFnd->
GetType() )
2614 sal_uInt16 nSeqNo = pTmp->
GetSeqNo();
2615 if( !nSeqNo || !bSelect )
2621 bool bCheck =
false;
2631 if( pTmp && bCheck )
2637 auto [pCStt, pCEnd] = pCur->
StartEnd();
2638 while( pCur != pNextPam )
2640 auto [pNStt, pNEnd] = pNextPam->
StartEnd();
2685 pNextPam = pPrevPam;
2687 pNextPam = pNextPam->
GetNext();
2709 }
while( nLoopCnt );
2723 if( aCurPos.
GetNode() < nBodySttNdIdx )
2726 std::pair<Point, bool> tmp(aPt,
true);
2745 pTextNd = pFnd->GetpTextNode();
2750 if (pTextNd->
GetIndex() < nBodySttNdIdx)
2752 std::pair<Point, bool> tmp(aPt,
true);
2761 ? ( aPos < aCmpPos && aCurPos < aPos )
2762 : ( aCmpPos < aPos && aPos < aCurPos ))
2768 sText = sText.replaceAll(
"\x0a",
"");
2771 if( !sText.isEmpty() )
2785 if( rURLItem.
GetMap() || !rURLItem.
GetURL().isEmpty() )
2787 SwFlyFrame* pFly = pFormat->GetFrame( &aPt );
2795 ? ( aPos < aCmpPos && aCurPos < aPos )
2796 : ( aCmpPos < aPos && aPos < aCurPos ))
2806 if( !pFndAttr && !pFndFormat )
2846 static_cast<SwFEShell*
>(
this)->SelectFlyFrame( *pFly );
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
virtual bool AppendTextNode(SwPosition &rPos)=0
virtual void InsertItemSet(const SwPaM &rRg, const SfxItemSet &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr)=0
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
virtual bool InsertString(const SwPaM &rRg, const OUString &, const SwInsertFlags nInsertMode=SwInsertFlags::EMPTYEXPAND)=0
Insert string into existing text node at position rRg.Point().
virtual const SwRootFrame * GetCurrentLayout() const =0
Provides access to the marks of a document.
virtual const_iterator_t getFieldmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of fieldmarks.
virtual const_iterator_t getFieldmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of fieldmarks.
virtual sw::mark::IFieldmark * getInnerFieldmarkFor(const SwPosition &pos) const =0
virtual const SwRangeRedline * SelNextRedline(SwPaM &rPam) const =0
virtual const SwRedlineTable & GetRedlineTable() const =0
virtual const SwRangeRedline * GetRedline(const SwPosition &rPos, SwRedlineTable::size_type *pFndPos) const =0
virtual const SwRangeRedline * SelPrevRedline(SwPaM &rPam) const =0
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long getX() const
constexpr tools::Long getY() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
const SwTextINetFormat * GetINetFormat() const
const SwNode * GetNodeFromContent() const
void SetBodyPos(const SwContentFrame &rFrame)
void GetPosOfContent(SwPosition &rPos) const
SwNodeOffset GetNode() const
const SwFlyFrameFormat * GetFlyFormat() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
virtual bool GetPresentation(const SfxPoolItem &rItem, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
sal_uInt32 GetItemCount2(sal_uInt16 nWhich) const
void Differentiate(const SfxItemSet &rSet)
constexpr tools::Long Width() const
SvxAdjust GetAdjust() const
void SetAdjust(const SvxAdjust eType)
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
static void SetSearchLabel(const SearchLabel &rSL)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
Knows all the text content controls in the document.
SwTextContentControl * UnsortedGet(size_t nIndex)
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwFormatColl * GetFormatColl() const
bool HasSwAttrSet() const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
virtual sal_Int32 Len() const
const SwAttrSet * GetpSwAttrSet() const
SwFormatColl * GetCondFormatColl() const
A helper class to save cursor state (position).
SAL_DLLPRIVATE void UpdateCursor(sal_uInt16 eFlags=SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE, bool bIdleEnd=false)
tools::Long GetUpDownX() const
bool GotoRefMark(const OUString &rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo)
jump to reference marker
static SwTextField * GetTextFieldAtPos(const SwPosition *pPos, ::sw::GetTextAttrMode eMode)
void GotoFormControl(bool bNext)
Go to the next (or previous) form control, based first on tabIndex and then paragraph position,...
bool GetShadowCursorPos(const Point &rPt, SwFillMode eFillMode, SwRect &rRect, sal_Int16 &rOrient)
bool GotoNextOutline()
jump to next node with outline num.
bool GotoPrevOutline()
jump to previous node with outline num.
void GotoTOXMarkBase()
jump to index of TOXMark
bool IsReadOnlyAvailable() const
SAL_DLLPRIVATE void MoveCursorToNum()
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
bool GotoHeaderText()
jump from the content to the header
bool GotoPrevTOXBase(const OUString *=nullptr)
jump to previous index
bool SelectNxtPrvHyperlink(bool bNext)
SwShellCursor * GetCursor_()
const SwPostItField * GetPostItFieldAtCursor() const
const SwTOXMark & GotoTOXMark(const SwTOXMark &rStart, SwTOXSearch eDir)
traveling between marks
const SwFormatINetFormat * FindINetAttr(std::u16string_view rName) const
bool HasSelection() const
Does the current cursor create a selection?
bool GotoFieldmark(const ::sw::mark::IFieldmark *const pMark)
void NormalizePam(bool bPointFirst=true)
Ensure point and mark of the current PaM are in a specific order.
bool GotoFootnoteAnchor()
jump from footnote to anchor
bool SetCursorInHdFt(size_t nDescNo, bool bInHeader, bool bEven=false, bool bFirst=false)
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
bool SelectTextModel(sal_Int32 nStart, sal_Int32 nEnd)
bool GotoNxtPrvTOXMark(bool bNext=true)
jump to next/previous index marker
bool SelectTextAttr(sal_uInt16 nWhich, bool bExpand, const SwTextAttr *pAttr=nullptr)
bool CursorInsideInputField() const
SwField * GetCurField(const bool bIncludeInputFieldAtStart=false) const
SwPaM * CreateCursor()
delete the current cursor and make the following into the current
bool SetShadowCursorPos(const Point &rPt, SwFillMode eFillMode)
void MakeOutlineSel(SwOutlineNodes::size_type nSttPos, SwOutlineNodes::size_type nEndPos, bool bWithChildren, bool bKillPams=true)
void EndAction(const bool bIdleEnd=false)
bool IsPageAtPos(const Point &rPt) const
void GotoNextNum()
go to next/previous point on the same level
bool GotoNextTOXBase(const OUString *=nullptr)
jump to the next index
static sal_Int32 StartOfInputFieldAtPos(const SwPosition &rPos)
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
static SwTextField * GetTextFieldAtCursor(const SwPaM *pCursor, ::sw::GetTextAttrMode eMode)
const SwRangeRedline * GotoRedline(SwRedlineTable::size_type nArrPos, bool bSelect)
static SwField * GetFieldAtCursor(const SwPaM *pCursor, const bool bIncludeInputFieldAtStart)
const SwRangeRedline * SelNextRedline()
virtual void MakeSelVisible()
show the current selected "object"
bool DocPtInsideInputField(const Point &rDocPt) const
SAL_DLLPRIVATE const SwRangeRedline * GotoRedline_(SwRedlineTable::size_type nArrPos, bool bSelect)
sw::mark::IFieldmark * GetFieldmarkBefore(bool bLoop)
bool GotoOutline(const OUString &rName)
SwTextContentControl * CursorInsideContentControl() const
const SwRangeRedline * SelPrevRedline()
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
SwRect m_aCharRect
Char-SRectangle on which the cursor is located.
static sal_Int32 EndOfInputFieldAtPos(const SwPosition &rPos)
@ READONLY
make visible in spite of Readonly
@ CHKRANGE
check overlapping PaMs
@ UPDOWN
keep Up/Down on columns
static bool PosInsideInputField(const SwPosition &rPos)
::sw::mark::IFieldmark * GetCurrentFieldmark()
SwOutlineNodes::size_type GetOutlinePos(sal_uInt8 nLevel=UCHAR_MAX, SwPaM *pPaM=nullptr)
search "outline position" before previous outline node at given level
sw::mark::IFieldmark * GetFieldmarkAfter(bool bLoop)
SwShellCursor * m_pCurrentCursor
current cursor
bool GotoNxtPrvTableFormula(bool bNext=true, bool bOnlyErrors=false)
Jump to next/previous table formula Optionally it is possible to also jump to broken formulas.
bool GotoFormatField(const SwFormatField &rField)
bool GetContentAtPos(const Point &rPt, SwContentAtPos &rContentAtPos, bool bSetCursor=false, SwRect *pFieldRect=nullptr)
bool GotoINetAttr(const SwTextINetFormat &rAttr)
bool GotoFormatContentControl(const SwFormatContentControl &rContentControl)
bool MoveFieldType(const SwFieldType *pFieldType, const bool bNext, const SwFieldIds nResType=SwFieldIds::Unknown, const bool bAddSetExpressionFieldsToInputFields=true)
bool GotoFooterText()
jump from the content to the footer
void RestoreSavePos()
Restore cursor state to the one saved by SwCursorSaveState.
virtual bool IsSelOvr(SwCursorSelOverFlags eFlags=SwCursorSelOverFlags::CheckNodeSection|SwCursorSelOverFlags::Toggle|SwCursorSelOverFlags::ChangePos)
bool IsInProtectTable(bool bMove=false, bool bChgCursor=true)
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
bool ContainsPageDesc(const SwPageDesc *pDesc, size_t *pPos) const
SwSectionFormats & GetSections()
static sal_uInt16 GetCurTOXMark(const SwPosition &rPos, SwTOXMarks &)
Get current table of contents Mark.
static bool GotoPrevNum(SwPosition &, SwRootFrame const *pLayout, bool bOverUpper=true)
const SwCharFormats * GetCharFormats() const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
IDocumentMarkAccess * getIDocumentMarkAccess()
const SwAttrPool & GetAttrPool() const
bool SetTextFormatColl(const SwPaM &rRg, SwTextFormatColl *pFormat, const bool bReset=true, const bool bResetListAttrs=false, SwRootFrame const *pLayout=nullptr)
Add 4th optional parameter <bResetListAttrs>.
SwDocShell * GetDocShell()
static bool GotoNextNum(SwPosition &, SwRootFrame const *pLayout, bool bOverUpper=true, sal_uInt8 *pUpper=nullptr, sal_uInt8 *pLower=nullptr)
const SwPageDesc & GetPageDesc(const size_t i) const
::SwContentControlManager & GetContentControlManager()
const SwTOXMark & GotoTOXMark(const SwTOXMark &rCurTOXMark, SwTOXSearch eDir, bool bInReadOnly)
Instances of SwFields and those derived from it occur 0 to n times.
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
Base class of all fields.
bool HasClickHdl() const
Does the field possess an action on its ClickHandler? (e.g. INetFields, ...).
SwFieldType * GetTyp() const
SwFieldIds Which() const
ResId.
general base class for all free-flowing frames
SfxPoolItem subclass that wraps an SwContentControl.
const std::shared_ptr< SwContentControl > & GetContentControl() const
Content, content of frame (header, footer, fly).
const SwNodeIndex * GetContentIdx() const
const SwRect & getFrameArea() const
const SwRect & getFramePrintArea() const
Base class of the Writer layout elements.
bool IsHeaderFrame() const
virtual void Calc(vcl::RenderContext *pRenderContext) const
bool IsProtected() const
Is the Frame or rather the Section in which it lies protected?
bool IsRightToLeft() const
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
bool IsFooterFrame() const
SwLayoutFrame * GetUpper()
bool IsContentFrame() const
SwPageFrame * FindPageFrame()
virtual bool GetCharRect(SwRect &, const SwPosition &, SwCursorMoveState *=nullptr, bool bAllowFarAway=true) const
static SwTextNode * FindAnchor(SwDoc *pDoc, const OUString &rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_Int32 *pStt, sal_Int32 *pEnd=nullptr, SwRootFrame const *pLayout=nullptr)
const SwFrame * GetLastLower() const
Marks a node in the document model.
Base class of the Writer document model elements.
SwStartNode * GetStartNode()
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
const SwStartNode * FindTableBoxStartNode() const
bool IsProtect() const
Is node in something that is protected (range, frame, table cells ... including anchor in case of fra...
SwNodes & GetNodes()
Node is in which nodes-array/doc?
bool IsInProtectSect() const
Is node in a protected area?
bool IsContentNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
SwSectionNode * FindSectionNode()
Search section node, in which it is.
const SwStartNode * StartOfSectionNode() const
SwNodeOffset EndOfSectionIndex() const
SwContentNode * GetContentNode()
const SwEndNode * EndOfSectionNode() const
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
SwContentNode * GoNext(SwNodeIndex *) const
SwContentNode * GoNextSection(SwNodeIndex *, bool bSkipHidden=true, bool bSkipProtect=true) const
Go to next content-node that is not protected or hidden (Both set FALSE ==> GoNext/GoPrevious!...
static SwContentNode * GoPrevSection(SwNodeIndex *, bool bSkipHidden=true, bool bSkipProtect=true)
bool Seek_Entry(SwNode *rP, size_type *pnPos) const
static constexpr auto npos
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
std::pair< const SwPosition *, const SwPosition * > StartEnd() const
Because sometimes the cost of the operator<= can add up.
bool IsMultiSelection() const
SwContentNode * GetPointContentNode() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
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.
SwFrameFormat & GetMaster()
SwFrameFormat & GetFirstLeft()
SwFrameFormat & GetFirstMaster()
SwFrameFormat & GetLeft()
A page of the document layout.
SwPageDesc * GetPageDesc()
void CalcStartEnd(SwNodeOffset nNdIdx, sal_Int32 &rStart, sal_Int32 &rEnd) const
Calculates the intersection with text node number nNdIdx.
RedlineType GetType(sal_uInt16 nPos=0) const
sal_uInt16 GetSeqNo() const
Of course Writer needs its own rectangles.
SwRect & Union(const SwRect &rRect)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Pos(const Point &rNew)
bool Contains(const Point &rPOINT) const
void Left(const tools::Long nLeft)
size_type FindPrevOfSeqNo(size_type nSttPos) const
size_type FindNextOfSeqNo(size_type nSttPos) const
static constexpr size_type npos
vector_type::size_type size_type
const SwRangeRedline * FindAtPosition(const SwPosition &startPosition, size_type &tableIndex, bool next=true) const
Find the redline at the given position.
The root element of a Writer document layout.
const SwPageFrame * GetPageAtPos(const Point &rPt, const Size *pSize=nullptr, bool bExtend=false) const
Point rPt: The point that should be used to find the page Size pSize: If given, we return the (first)...
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const override
Primary passes the call to the first page.
A section node represents the start of a section on the UI, i.e.
SwSectionFormat * GetFormat()
SectionType GetType() const
bool GetInputFlag() const
const Point & GetPtPos() const
virtual void SetMark() override
Unless this is called, the getter method of Mark will return Point.
Starts a section of nodes in the document model.
const OUString & GetTOXName() const
const SwTextTOXMark * GetTextTOXMark() const
const OUString & GetAlternativeText() const
SwContentFrame * FindContentFrame(const SwDoc &rDoc, const SwRootFrame &rLayout) const
SwTableBox is one table cell in the document model.
SwFrameFormat * GetFrameFormat()
RedlineType GetRedlineType() const
const SwStartNode * GetSttNd() const
SwTableLine is one table row in the document model.
SwRedlineTable::size_type UpdateTextChangesOnly(SwRedlineTable::size_type &rRedlinePos, bool bUpdateProperty=true) const
RedlineType GetRedlineType() const
const SwTable & GetTable() const
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
virtual const sal_Int32 * GetEnd() const override
end position
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SfxPoolItem & GetAttr() const
virtual const sal_Int32 * GetEnd() const
end position
const sal_Int32 * End() const
sal_Int32 GetStart() const
const SwFormatINetFormat & GetINetFormat() const
const SwFormatContentControl & GetContentControl() const
const SwFormatField & GetFormatField() const
const SwTOXMark & GetTOXMark() const
SwTextAttr subclass that tracks the location of the wrapped SwFormatContentControl.
SwTextNode * GetTextNode() const
SwTextNode & GetTextNode() const
void ChgTextNode(SwTextNode *pNew)
SwTextNode * GetpTextNode() const
Represents the style of a paragraph.
SwTextFormatColl & GetNextTextFormatColl() const
Represents the visualization of a paragraph.
SwTextAttr subclass that tracks the location of the wrapped SwFormatURL.
const SwTextNode * GetpTextNode() const
SwTextNode is a paragraph in the document model.
OUString GetExpandText(SwRootFrame const *pLayout, const sal_Int32 nIdx=0, const sal_Int32 nLen=-1, const bool bWithNum=false, const bool bAddSpaceAfterListLabelStr=false, const bool bWithSpacesForLevel=false, const ExpandMode eAdditionalMode=ExpandMode::ExpandFootnote|ExpandMode::HideFieldmarkCommands) const
add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating, when <bWithNum = true> that a spa...
virtual sal_Int32 Len() const override
SwWrongList * GetSmartTags()
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Expand) const
SwpHints & GetSwpHints()
getters for SwpHints
bool IsSymbolAt(sal_Int32 nBegin) const
in ndcopy.cxx
int GetAttrOutlineLevel() const
Returns outline level of this text node.
std::vector< SwTextAttr * > GetTextAttrsAt(sal_Int32 const nIndex, sal_uInt16 const nWhich) const
get the innermost text attributes covering position nIndex.
SwTextAttr * GetTextAttrAt(sal_Int32 const nIndex, sal_uInt16 const nWhich, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Default) const
get the innermost text attribute covering position nIndex.
SwpHints * GetpSwpHints()
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
SwTextFormatColl * GetTextColl() const
const SwTextNode & GetTextNode() const
std::vector< SwSectionFormat * >::size_type size_type
vcl::RenderContext * GetOut() const
const SwNodes & GetNodes() const
rtl::Reference< SwDoc > mxDoc
The document; never 0.
SwRootFrame * GetLayout() const
vcl::Window * GetWin() const
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
const IDocumentRedlineAccess & getIDocumentRedlineAccess() const
Provides access to the document redline interface.
const SfxItemPool & GetAttrPool() const
sal_uInt16 GetWrongPos(sal_Int32 nValue) const
Find the first position that is greater or equal to the given value.
bool InWrongWord(sal_Int32 &rChk, sal_Int32 &rLn) const
If a word is incorrectly selected, this method returns begin and length of it.
SwWrongList * SubList(sal_uInt16 nIdx) const
Used by the UI to modify the document model.
bool EndOfSection(bool bSelect=false)
bool StartOfSection(bool bSelect=false)
SwTextAttr * Get(size_t nPos) const
const_iterator begin() const
std::vector< Value >::const_iterator const_iterator
const_iterator end() const
std::vector< Value >::size_type size_type
std::pair< const_iterator, bool > insert(Value &&x)
const_iterator lower_bound(const Value &x) const
ring_container GetRingContainer()
Point LogicToPixel(const Point &rLogicPt) const
@ CurrAttrs
only for debugging
@ TableBoxValue
only for debugging
@ Indent
by left paragraph indentation
@ Tab
default, fill with tabs
@ Margin
only align left, center, right
@ TabSpace
fill with spaces and tabs
static SetGetExpFields::const_iterator lcl_FindField(bool &o_rFound, SetGetExpFields const &rSrtLst, SwRootFrame const *const pLayout, SwTextNode *const pTextNode, SwTextField const *const pTextField, SwPosition const &rPos, sal_Int32 const nContentOffset)
static void lcl_MakeFieldLst(SetGetExpFields &rLst, const SwFieldType &rFieldType, const bool bInReadOnly, const bool bChkInpFlag=false)
jump to next/previous field type
static SwNode * GetStartNode(SwOutlineNodes const *pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type *nOutl)
const SwTextNode * GetBodyTextNode(const SwDoc &rDoc, SwPosition &rPos, const SwFrame &rFrame)
Forward declaration: get "BodyTextNode" for exp.fld in Fly's headers/footers/footnotes.
static SwContentNode * GetContentNode(SwDoc &rDoc, SwPosition &rPos, bool bNext)
constexpr sal_uInt16 POOLATTR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(158)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(157)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
OString strip(const OString &rIn, char c)
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill='\0')
bool IsFieldDeletedInModel(IDocumentRedlineAccess const &rIDRA, SwTextField const &rTextField)
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNode const &rNode)
@ Parent
EXPAND : (Start < nIndex <= End)
@ Expand
DEFAULT: (Start <= nIndex < End)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwComparePosition ComparePosition(const T &rStt1, const T &rEnd1, const T &rStt2, const T &rEnd2)
@ OverlapBehind
Pos1 overlaps Pos2 at the end.
@ OverlapBefore
Pos1 overlaps Pos2 at the beginning.
@ Outside
Pos2 completely contained in Pos1.
@ Inside
Pos1 completely contained in Pos2.
@ Equal
Pos1 is as large as Pos2.
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
bool IsInvalidItem(const SfxPoolItem *pItem)
union SwContentAtPos::@21 aFnd
const SwRangeRedline * pRedl
bool IsInProtectSect() const
is the node in a protected section?
const SfxPoolItem * pAttr
const SwTextAttr * pFndTextAttr
IsAttrAtPos eContentAtPos
const sw::mark::IFieldmark * pFieldmark
bool m_bPosCorr
Point had to be corrected.
bool m_bInNumPortion
point is in number portion #i23726#
bool m_bFootnoteNoInfo
recognized footnote numbering
int m_nInNumPortionOffset
distance from number portion's start
SwSpecialPos * m_pSpecialPos
for positions inside fields
bool m_bFieldInfo
should be fields recognized?
bool m_bExactOnly
let GetModelPositionForViewPoint look for exact matches only, i.e.
bool m_bSetInReadOnly
ReadOnly areas may be entered.
sal_uInt16 nColumnCnt
number of necessary column breaks
SwFillMode eMode
desired fill-up rule
sal_Int16 eOrient
paragraph alignment
sal_uInt16 nSpaceOnlyCnt
number of spaces to insert ("only spaces, no tabs" mode)
SwRect aCursor
position and size of the ShadowCursor
sal_uInt16 nSpaceCnt
number of spaces to insert
sal_uInt16 nTabCnt
number of tabs respectively size of indentation
sal_uInt16 nParaCnt
number of paragraphs to insert
Marks a position in the document model.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
constexpr sal_Int32 COMPLETE_STRING
std::vector< SwTOXMark * > SwTOXMarks