LibreOffice Module sw (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Attributes | Friends | List of all members
SwTextCursor Class Reference

#include <itrtxt.hxx>

Inheritance diagram for SwTextCursor:
[legend]
Collaboration diagram for SwTextCursor:
[legend]

Public Member Functions

 SwTextCursor (SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf)
 
void GetCharRect (SwRect *, TextFrameIndex, SwCursorMoveState *=nullptr, const tools::Long nMax=0)
 
void GetEndCharRect (SwRect *, TextFrameIndex, SwCursorMoveState *=nullptr, const tools::Long nMax=0)
 
TextFrameIndex GetModelPositionForViewPoint (SwPosition *pPos, const Point &rPoint, bool bChgNode, SwCursorMoveState *=nullptr) const
 
const SwLineLayoutCharCursorToLine (TextFrameIndex const nPos)
 
SwTwips AdjustBaseLine (const SwLineLayout &rLine, const SwLinePortion *pPor, SwTwips nPorHeight=0, SwTwips nAscent=0, const bool bAutoToCentered=false) const
 
- Public Member Functions inherited from SwTextAdjuster
void CalcAdjLine (SwLineLayout *pCurr)
 
void GetAdjusted () const
 
void CalcDropAdjust ()
 
void CalcDropRepaint ()
 
- Public Member Functions inherited from SwTextMargin
 SwTextMargin (SwTextFrame *pTextFrame, SwTextSizeInfo *pTextSizeInf)
 
SwTwips GetLeftMargin () const
 
SwTwips Left () const
 
SwTwips Right () const
 
SwTwips FirstLeft () const
 
SwTwips CurrWidth () const
 
SwTwips GetLineStart () const
 
SwTwips GetLineEnd () const
 
Point GetTopLeft () const
 
bool IsOneBlock () const
 
bool IsLastBlock () const
 
bool IsLastCenter () const
 
SvxAdjust GetAdjust () const
 
sal_uInt16 GetLineWidth () const
 
SwTwips GetLeftMin () const
 
bool HasNegFirst () const
 
SwTwips GetTabLeft () const
 
sal_uInt16 GetDropLines () const
 
void SetDropLines (const sal_uInt16 nNew)
 
sal_uInt16 GetDropLeft () const
 
sal_uInt16 GetDropHeight () const
 
void SetDropHeight (const sal_uInt16 nNew)
 
sal_uInt16 GetDropDescent () const
 
void SetDropDescent (const sal_uInt16 nNew)
 
void DropInit ()
 
TextFrameIndex GetTextStart () const
 
TextFrameIndex GetTextEnd () const
 
SwTextSizeInfoGetInfo ()
 
const SwTextSizeInfoGetInfo () const
 
- Public Member Functions inherited from SwTextIter
 SwTextIter (SwTextFrame *pTextFrame, SwTextInfo *pTextInf)
 
const SwLineLayoutGetCurr () const
 
const SwLineLayoutGetNext () const
 
const SwLineLayoutGetPrev ()
 
TextFrameIndex GetLength () const
 
sal_Int32 GetLineNr () const
 
TextFrameIndex GetStart () const
 
TextFrameIndex GetEnd () const
 
SwTwips Y () const
 
SwTwips RegStart () const
 
sal_uInt16 RegDiff () const
 
bool IsRegisterOn () const
 
SwTextInfoGetInfo ()
 
const SwTextInfoGetInfo () const
 
void Top ()
 
void Bottom ()
 
const SwLineLayoutNext ()
 
const SwLineLayoutPrev ()
 
const SwLineLayoutNextLine ()
 
const SwLineLayoutPrevLine ()
 
const SwLineLayoutGetNextLine () const
 
const SwLineLayoutGetPrevLine ()
 
void CharToLine (TextFrameIndex)
 
void TwipsToLine (const SwTwips)
 
void TruncLines (bool bNoteFollow=false)
 
SwTwips GetLineHeight () const
 
void CalcAscentAndHeight (SwTwips &rAscent, SwTwips &rHeight) const
 
bool IsFirstTextLine () const
 
bool IsParaLine () const
 
const SwLineInfoGetLineInfo () const
 
SwTwips GetFirstPos () const
 
bool SeekAndChg (SwTextSizeInfo &rInf)
 
bool SeekAndChgBefore (SwTextSizeInfo &rInf)
 
bool SeekStartAndChg (SwTextSizeInfo &rInf, const bool bPara=false)
 
SwTextFrameGetTextFrame ()
 
const SwTextFrameGetTextFrame () const
 
void CntHyphens (sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
 
- Public Member Functions inherited from SwAttrIter
 SwAttrIter (SwTextNode &rTextNode, SwScriptInfo &rScrInf, SwTextFrame const *const pFrame=nullptr)
 All subclasses of this always have a SwTextFrame passed to the constructor, but SwAttrIter itself may be created without a SwTextFrame in certain special cases via this ctor here. More...
 
virtual ~SwAttrIter ()
 
SwRedlineItrGetRedln ()
 
TextFrameIndex GetNextAttr () const
 
bool Seek (TextFrameIndex nPos)
 Enables the attributes used at char pos nPos in the logical font. More...
 
bool IsSymbol (TextFrameIndex nPos)
 
bool SeekAndChgAttrIter (TextFrameIndex nPos, OutputDevice *pOut)
 Executes ChgPhysFnt if Seek() returns true and change font to merge character border with neighbours. More...
 
bool SeekStartAndChgAttrIter (OutputDevice *pOut, const bool bParaFont)
 
bool MaybeHasHints () const
 
SwTextAttrGetAttr (TextFrameIndex nPos) const
 Returns the attribute for a position. More...
 
SwFontGetFnt ()
 
const SwFontGetFnt () const
 
sal_uInt8 GetPropFont () const
 
void SetPropFont (const sal_uInt8 nNew)
 
SwAttrHandlerGetAttrHandler ()
 

Static Public Member Functions

static void SetRightMargin (const bool bNew)
 
static bool IsRightMargin ()
 

Protected Member Functions

void CtorInitTextCursor (SwTextFrame *pFrame, SwTextSizeInfo *pInf)
 
 SwTextCursor (SwTextNode const *pTextNode)
 
void AddExtraBlankWidth ()
 
- Protected Member Functions inherited from SwTextAdjuster
 SwTextAdjuster (SwTextNode const *pTextNode)
 
void CalcNewBlock (SwLineLayout *pCurr, const SwLinePortion *pStopAt, SwTwips nReal=0, bool bSkipKashida=false)
 
SwTwips CalcKanaAdj (SwLineLayout *pCurr)
 
- Protected Member Functions inherited from SwTextMargin
void Right (const SwTwips nNew)
 
void CtorInitTextMargin (SwTextFrame *pFrame, SwTextSizeInfo *pInf)
 
 SwTextMargin (SwTextNode const *pTextNode)
 
- Protected Member Functions inherited from SwTextIter
SwLineLayoutGetPrev_ ()
 
void Init ()
 
void CtorInitTextIter (SwTextFrame *pFrame, SwTextInfo *pInf)
 
 SwTextIter (SwTextNode const *pTextNode)
 
- Protected Member Functions inherited from SwAttrIter
void Chg (SwTextAttr const *pHt)
 
void Rst (SwTextAttr const *pHt)
 
void CtorInitAttrIter (SwTextNode &rTextNode, SwScriptInfo &rScrInf, SwTextFrame const *pFrame=nullptr)
 
 SwAttrIter (SwTextNode const *pTextNode)
 

Private Member Functions

void GetCharRect_ (SwRect *, TextFrameIndex, SwCursorMoveState *)
 

Static Private Attributes

static bool s_bRightMargin = false
 

Friends

class SwTextCursorSave
 

Additional Inherited Members

- Protected Attributes inherited from SwTextIter
SwLineInfo m_aLineInf
 
SwTextFramem_pFrame
 
SwTextInfom_pInf
 
SwLineLayoutm_pCurr
 
SwLineLayoutm_pPrev
 
SwTwips m_nFrameStart
 
SwTwips m_nY
 
SwTwips m_nRegStart
 
TextFrameIndex m_nStart
 
sal_uInt16 m_nRegDiff
 
sal_Int32 m_nLineNr
 
bool m_bPrev: 1
 
bool m_bRegisterOn: 1
 
bool m_bOneBlock: 1
 
bool m_bLastBlock: 1
 
bool m_bLastCenter: 1
 
- Protected Attributes inherited from SwAttrIter
SwAttrHandler m_aAttrHandler
 
SwViewShellm_pViewShell
 
SwFontm_pFont
 
SwScriptInfom_pScriptInfo
 

Detailed Description

Definition at line 261 of file itrtxt.hxx.

Constructor & Destructor Documentation

◆ SwTextCursor() [1/2]

SwTextCursor::SwTextCursor ( SwTextNode const *  pTextNode)
inlineexplicitprotected

Definition at line 272 of file itrtxt.hxx.

◆ SwTextCursor() [2/2]

SwTextCursor::SwTextCursor ( SwTextFrame pTextFrame,
SwTextSizeInfo pTextSizeInf 
)
inline

Definition at line 275 of file itrtxt.hxx.

References CtorInitTextCursor().

Member Function Documentation

◆ AddExtraBlankWidth()

void SwTextCursor::AddExtraBlankWidth ( )
protected

◆ AdjustBaseLine()

SwTwips SwTextCursor::AdjustBaseLine ( const SwLineLayout rLine,
const SwLinePortion pPor,
SwTwips  nPorHeight = 0,
SwTwips  nAscent = 0,
const bool  bAutoToCentered = false 
) const

◆ CharCursorToLine()

const SwLineLayout * SwTextCursor::CharCursorToLine ( TextFrameIndex const  nPos)

◆ CtorInitTextCursor()

void SwTextCursor::CtorInitTextCursor ( SwTextFrame pFrame,
SwTextSizeInfo pInf 
)
protected

Definition at line 395 of file itrcrsr.cxx.

References SwTextMargin::CtorInitTextMargin().

Referenced by SwTextPainter::CtorInitTextPainter(), and SwTextCursor().

◆ GetCharRect()

void SwTextCursor::GetCharRect ( SwRect pOrig,
TextFrameIndex  nOfst,
SwCursorMoveState pCMS = nullptr,
const tools::Long  nMax = 0 
)

◆ GetCharRect_()

void SwTextCursor::GetCharRect_ ( SwRect pOrig,
TextFrameIndex  nOfst,
SwCursorMoveState pCMS 
)
private

Definition at line 498 of file itrcrsr.cxx.

References AdjustBaseLine(), SvxParaVertAlignItem::Automatic, BEFORE, BIDI, SwTextIter::CalcAscentAndHeight(), SwLinePortion::CalcSpacing(), SwBidiPortion::CalcSpacing(), SwLinePortion::FindLastPortion(), SwLinePortion::GetAscent(), GetCharRect_(), SwDropPortion::GetDropDescent(), SwTextMargin::GetDropHeight(), SwFieldPortion::GetExp(), SwLineLayout::GetFirstPortion(), SwDropPortionPart::GetFollow(), SwTextSizeInfo::GetFont(), SwDropPortionPart::GetFont(), GetFont(), GetGridItem(), SwTextSizeInfo::GetIdx(), SwTextMargin::GetInfo(), SwDropPortionPart::GetJoinBorderWithNext(), SwLinePortion::GetJoinBorderWithNext(), SwTextSizeInfo::GetLen(), SwDropPortionPart::GetLen(), SwLinePortion::GetLen(), SwBidiPortion::GetLevel(), SwTextIter::GetLineHeight(), SwTextIter::GetLineInfo(), SwDropPortion::GetLines(), SwLineLayout::GetLLSpaceAdd(), SwTextSizeInfo::GetMeasureLen(), SwLineLayout::GetNext(), SwTextIter::GetNext(), SwLinePortion::GetNextPortion(), SwDropPortion::GetPart(), SwLineLayout::GetpKanaComp(), SwAttrIter::GetPropFont(), SwLineLayout::GetRealHeight(), SwFont::GetRightBorder(), SwFont::GetRightBorderSpace(), SwTextGridItem::GetRubyHeight(), SwTextSizeInfo::GetText(), SwTextIter::GetTextFrame(), SwLinePortion::GetTextSize(), SwFieldPortion::HasFollow(), SwMultiPortion::HasTabulator(), Height, SwPosSize::Height(), SwLineLayout::Height(), SwRect::Height(), SwLinePortion::InFieldGrp(), SwLinePortion::InFixGrp(), SwLinePortion::InFixMargGrp(), SwLinePortion::InHyphGrp(), SwLinePortion::InNumberGrp(), SwLinePortion::InSpaceGrp(), SwLinePortion::InTabGrp(), SwLinePortion::InTextGrp(), SwMultiPortion::IsBidi(), SwLinePortion::IsBlankPortion(), SwLinePortion::IsBreakPortion(), SwMultiPortion::IsDouble(), SwLinePortion::IsDropPortion(), SwLinePortion::IsFlyPortion(), SwLinePortion::IsKernPortion(), SwLinePortion::IsMarginPortion(), SwLinePortion::IsMultiPortion(), SwLinePortion::IsPostItsPortion(), SwLineLayout::IsSpaceAdd(), lcl_GetCharRectInsideField(), SwRect::Left(), SwCursorMoveState::m_aRealHeight, SwCursorMoveState::m_b2Lines, SwCursorMoveState::m_bFieldInfo, SwTextIter::m_bPrev, SwCursorMoveState::m_bRealHeight, SwCursorMoveState::m_bRealWidth, SwCursorMoveState::m_nCursorBidiLevel, SwTextIter::m_nStart, SwTextIter::m_nY, SwCursorMoveState::m_p2Lines, SwTextIter::m_pCurr, SwCursorMoveState::m_pSpecialPos, SwLayoutModeModifier::Modify(), SwTextIter::Next(), SwSpecialPos::nExtendRange, SwSpecialPos::nLineOfst, SwTextSizeInfo::OnWin(), SwRect::Pos(), SwLinePortion::PrtWidth(), SwDoubleLinePortion::ResetSpaceAdd(), ROT_270, ROT_90, RUBY, SwAttrIter::Seek(), SwTextIter::SeekAndChg(), SwTextSizeInfo::SetFirstMulti(), SwTextSizeInfo::SetIdx(), SwTextSizeInfo::SetKanaComp(), SwTextSizeInfo::SetKanaIdx(), SwTextSizeInfo::SetLen(), SwLinePortion::SetLen(), SwTextSizeInfo::SetMeasureLen(), SwTextSizeInfo::SetMulti(), SwTextSizeInfo::SetOnWin(), SwAttrIter::SetPropFont(), SwFont::SetProportion(), SwLineLayout::SetRealHeight(), Point::setX(), Point::setY(), SwTextSizeInfo::SnapToGrid(), SwRect::SSize(), SwRect::Top(), TWOLINE, SwPosSize::Width(), SwRect::Width(), Point::X(), and Point::Y().

Referenced by GetCharRect(), and GetCharRect_().

◆ GetEndCharRect()

void SwTextCursor::GetEndCharRect ( SwRect pOrig,
TextFrameIndex  nOfst,
SwCursorMoveState pCMS = nullptr,
const tools::Long  nMax = 0 
)

◆ GetModelPositionForViewPoint()

TextFrameIndex SwTextCursor::GetModelPositionForViewPoint ( SwPosition pPos,
const Point rPoint,
bool  bChgNode,
SwCursorMoveState pCMS = nullptr 
) const

Definition at line 1322 of file itrcrsr.cxx.

References SwLinePortion::CalcSpacing(), CJK, COMPLETE_STRING, ConsiderNextPortionForCursorOffset(), SwRect::Contains(), SwScriptInfo::CountCompChg(), o3tl::strong_int< typename UNDERLYING_TYPE, typename PHANTOM_TYPE >::get(), SwFont::GetActual(), SwTextAdjuster::GetAdjusted(), SwLinePortion::GetAscent(), SwTextIter::GetCurr(), SwDrawTextInfo::GetCursorBidiLevel(), SwLineLayout::GetFirstPortion(), sw::FlyContentPortion::GetFlyCursorOfst(), sw::FlyContentPortion::GetFlyFrame(), SwAttrIter::GetFnt(), SwDropPortion::GetFnt(), SwTextFrame::GetFollow(), SwDropPortionPart::GetFollow(), SwTextSizeInfo::GetFont(), SwDropPortionPart::GetFont(), GetFont(), SwFrameAreaDefinition::getFrameArea(), SwLineLayout::GetHangingMargin(), SwTextSizeInfo::GetIdx(), SwTextMargin::GetInfo(), SwDropPortionPart::GetJoinBorderWithNext(), SwDropPortionPart::GetJoinBorderWithPrev(), SwLinePortion::GetJoinBorderWithPrev(), SwFont::GetLeftBorder(), SwFont::GetLeftBorderSpace(), SwLinePortion::GetLen(), SwTextMargin::GetLineEnd(), SwDropPortion::GetLines(), SwTextMargin::GetLineStart(), SwLineLayout::GetLLSpaceAdd(), SwFrame::GetLower(), SwLinePortion::GetModelPositionForViewPoint(), GetModelPositionForViewPoint(), SwFont::GetModelPositionForViewPoint_(), SwLineLayout::GetNext(), SwLinePortion::GetNextPortion(), SwTextSizeInfo::GetOut(), SwTextInfo::GetParaPortion(), SwDropPortion::GetPart(), SwLineLayout::GetpKanaComp(), SwAttrIter::GetPropFont(), SwFont::GetPropr(), SwFont::GetRightBorder(), SwFont::GetRightBorderSpace(), SwParaPortion::GetScriptInfo(), SwTextPortion::GetSpaceCnt(), SwTextSizeInfo::GetText(), SwTextSizeInfo::GetVsh(), SwDropPortionPart::GetWidth(), SwFieldPortion::HasFollow(), SwMultiPortion::HasRotation(), SwMultiPortion::HasTabulator(), Height, SwPosSize::Height(), if(), SwLinePortion::InFieldGrp(), SwLinePortion::InFixMargGrp(), SwLinePortion::InHyphGrp(), SwLinePortion::InNumberGrp(), SwLinePortion::InSpaceGrp(), SwLinePortion::InTextGrp(), SwLinePortion::InToxRefGrp(), SwLinePortion::InToxRefOrFieldGrp(), SwMultiPortion::IsBidi(), SwLinePortion::IsBreakPortion(), SwLinePortion::IsDropPortion(), SwLinePortion::IsFlyCntPortion(), SwLinePortion::IsFlyPortion(), SwFieldPortion::IsFollow(), SwLinePortion::IsFootnoteNumPortion(), SwLineLayout::IsHanging(), SwLinePortion::IsHolePortion(), SwFrame::IsLayoutFrame(), SwLinePortion::IsMarginPortion(), SwTextSizeInfo::IsMulti(), SwLinePortion::IsMultiPortion(), SwFrame::IsNoTextFrame(), SwLinePortion::IsPostItsPortion(), SwFrame::IsProtected(), SwMultiPortion::IsRevers(), SwFrame::IsRightToLeft(), SwMultiPortion::IsRuby(), SwPostItsPortion::IsScript(), SwLineLayout::IsSpaceAdd(), SwFrame::IsTextFrame(), SwFrame::IsVertical(), SwCursorMoveState::m_bFieldInfo, SwCursorMoveState::m_bFootnoteNoInfo, SwCursorMoveState::m_bInFrontOfLabel, SwCursorMoveState::m_bInNumPortion, SwCursorMoveState::m_bPosCorr, SwCursorMoveState::m_bPosMatchesBounds, SwCursorMoveState::m_eState, SwCursorMoveState::m_nCursorBidiLevel, SwCursorMoveState::m_nInNumPortionOffset, SwTextIter::m_nStart, SwTextIter::m_nY, SwTextIter::m_pCurr, SwTextIter::m_pFrame, SwTextIter::m_pInf, SwCursorMoveState::m_pSpecialPos, min(), SwLayoutModeModifier::Modify(), SwSpecialPos::nCharOfst, nLeftMargin, nLength, NONE, nRightMargin, SAL_WARN_IF, SwTextIter::SeekAndChg(), SelectFont(), SwDrawTextInfo::SetFont(), SwDrawTextInfo::SetFrame(), SwDrawTextInfo::SetKanaComp(), SwDrawTextInfo::SetLen(), SwDrawTextInfo::SetNumberOfBlanks(), SwDrawTextInfo::SetOffset(), SwDrawTextInfo::SetPosMatchesBounds(), SwDrawTextInfo::SetSnapToGrid(), SwDrawTextInfo::SetSpace(), SwTextSizeInfo::SnapToGrid(), SwTextFrame::SwitchHorizontalToVertical(), SwTextFrame::SwitchLTRtoRTL(), SwPosSize::Width(), x, Point::X(), and Point::Y().

Referenced by SwTextFrameInfo::GetBigIndent(), GetModelPositionForViewPoint(), SwTextFrame::GetModelPositionForViewPoint_(), SwTextFrame::UnitDown_(), and SwTextFrame::UnitUp_().

◆ IsRightMargin()

static bool SwTextCursor::IsRightMargin ( )
inlinestatic

◆ SetRightMargin()

static void SwTextCursor::SetRightMargin ( const bool  bNew)
inlinestatic

Definition at line 295 of file itrtxt.hxx.

References s_bRightMargin.

Referenced by SwTextFrame::LeftMargin(), SwTextFrame::RightMargin(), and SwTextFrame::UnitDown().

Friends And Related Function Documentation

◆ SwTextCursorSave

friend class SwTextCursorSave
friend

Definition at line 265 of file itrtxt.hxx.

Member Data Documentation

◆ s_bRightMargin

bool SwTextCursor::s_bRightMargin = false
staticprivate

Definition at line 268 of file itrtxt.hxx.

Referenced by CharCursorToLine(), GetEndCharRect(), IsRightMargin(), and SetRightMargin().


The documentation for this class was generated from the following files: