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 long nMax=0)
 
void GetEndCharRect (SwRect *, TextFrameIndex, SwCursorMoveState *=nullptr, const long nMax=0)
 
TextFrameIndex GetCursorOfst (SwPosition *pPos, const Point &rPoint, bool bChgNode, SwCursorMoveState *=nullptr) const
 
const SwLineLayoutCharCursorToLine (TextFrameIndex const nPos)
 
sal_uInt16 AdjustBaseLine (const SwLineLayout &rLine, const SwLinePortion *pPor, sal_uInt16 nPorHeight=0, sal_uInt16 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_uInt16 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)
 
sal_uInt16 GetLineHeight () const
 
void CalcAscentAndHeight (sal_uInt16 &rAscent, sal_uInt16 &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)
 
- 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 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_uInt16 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::SwTextCursor ( SwTextNode const *  pTextNode)
inlineexplicitprotected

Definition at line 272 of file itrtxt.hxx.

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

Definition at line 274 of file itrtxt.hxx.

References CtorInitTextCursor().

Member Function Documentation

sal_uInt16 SwTextCursor::AdjustBaseLine ( const SwLineLayout rLine,
const SwLinePortion pPor,
sal_uInt16  nPorHeight = 0,
sal_uInt16  nAscent = 0,
const bool  bAutoToCentered = false 
) const
const SwLineLayout * SwTextCursor::CharCursorToLine ( TextFrameIndex const  nPos)
void SwTextCursor::CtorInitTextCursor ( SwTextFrame pFrame,
SwTextSizeInfo pInf 
)
protected

Definition at line 388 of file itrcrsr.cxx.

References SwTextMargin::CtorInitTextMargin().

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

void SwTextCursor::GetCharRect ( SwRect pOrig,
TextFrameIndex  nOfst,
SwCursorMoveState pCMS = nullptr,
const long  nMax = 0 
)
void SwTextCursor::GetCharRect_ ( SwRect pOrig,
TextFrameIndex  nOfst,
SwCursorMoveState pCMS 
)
private

Definition at line 471 of file itrcrsr.cxx.

References AdjustBaseLine(), SvxParaVertAlignItem::Automatic, BEFORE, BIDI, SwTextIter::CalcAscentAndHeight(), SwLinePortion::CalcSpacing(), SwBidiPortion::CalcSpacing(), SwLinePortion::FindLastPortion(), SwLinePortion::GetAscent(), SwTextMargin::GetDropDescent(), SwTextMargin::GetDropHeight(), SwFieldPortion::GetExp(), SwLineLayout::GetFirstPortion(), SwDropPortionPart::GetFollow(), SwDropPortionPart::GetFont(), SwTextSizeInfo::GetFont(), GetGridItem(), SwTextSizeInfo::GetIdx(), SwTextMargin::GetInfo(), SwDropPortionPart::GetJoinBorderWithNext(), SwLinePortion::GetJoinBorderWithNext(), SwDropPortionPart::GetLen(), SwLinePortion::GetLen(), SwBidiPortion::GetLevel(), SwTextIter::GetLineHeight(), SwTextIter::GetLineInfo(), SwLineLayout::GetLLSpaceAdd(), SwTextIter::GetNext(), SwLineLayout::GetNext(), SwLinePortion::GetNextPortion(), SwDropPortion::GetPart(), SwLineLayout::GetpKanaComp(), SwAttrIter::GetPropFont(), SwLineLayout::GetRealHeight(), SwFont::GetRightBorder(), SwFont::GetRightBorderSpace(), SwTextGridItem::GetRubyHeight(), SwTextSizeInfo::GetText(), SwTextIter::GetTextFrame(), SwLinePortion::GetTextSize(), SwLineInfo::GetVertAlign(), SwFieldPortion::HasFollow(), Height, SwPosSize::Height(), SwRect::Height(), SwLinePortion::InFieldGrp(), SwLinePortion::InFixGrp(), SwLinePortion::InFixMargGrp(), SwLinePortion::InHyphGrp(), SwLinePortion::InNumberGrp(), SwLinePortion::InSpaceGrp(), SwLinePortion::InTabGrp(), SwLinePortion::InTextGrp(), SwLinePortion::IsBlankPortion(), SwLinePortion::IsBreakPortion(), 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(), SwLinePortion::SetLen(), SwTextSizeInfo::SetLen(), 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().

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

Definition at line 1281 of file itrcrsr.cxx.

References SwLinePortion::CalcSpacing(), CJK, COMPLETE_STRING, ConsiderNextPortionForCursorOffset(), SwFont::GetActual(), SwTextAdjuster::GetAdjusted(), SwLinePortion::GetAscent(), SwTextIter::GetCurr(), SwLinePortion::GetCursorOfst(), SwFont::GetCursorOfst_(), SwLineLayout::GetFirstPortion(), sw::FlyContentPortion::GetFlyCursorOfst(), sw::FlyContentPortion::GetFlyFrame(), SwAttrIter::GetFnt(), SwDropPortionPart::GetFollow(), SwTextFrame::GetFollow(), SwDropPortionPart::GetFont(), SwTextSizeInfo::GetFont(), SwFrameAreaDefinition::getFrameArea(), SwLineLayout::GetHangingMargin(), SwTextSizeInfo::GetIdx(), SwTextMargin::GetInfo(), SwDropPortionPart::GetJoinBorderWithNext(), SwDropPortionPart::GetJoinBorderWithPrev(), SwLinePortion::GetJoinBorderWithPrev(), SwFont::GetLeftBorder(), SwFont::GetLeftBorderSpace(), SwLinePortion::GetLen(), SwTextMargin::GetLineEnd(), SwTextMargin::GetLineStart(), SwLineLayout::GetLLSpaceAdd(), SwFrame::GetLower(), SwLineLayout::GetNext(), SwLinePortion::GetNextPortion(), SwTextSizeInfo::GetOut(), SwTextInfo::GetParaPortion(), SwDropPortion::GetPart(), SwLineLayout::GetpKanaComp(), SwAttrIter::GetPropFont(), SwFont::GetPropr(), SwFont::GetRightBorder(), SwFont::GetRightBorderSpace(), SwTextSizeInfo::GetText(), SwLinePortion::GetViewWidth(), SwTextSizeInfo::GetVsh(), SwDropPortionPart::GetWidth(), Height, SwPosSize::Height(), if(), SwLinePortion::InFieldGrp(), SwLinePortion::InFixMargGrp(), SwLinePortion::InHyphGrp(), SwLinePortion::InNumberGrp(), SwLinePortion::InSpaceGrp(), SwLinePortion::InTextGrp(), SwLinePortion::InToxRefGrp(), SwLinePortion::InToxRefOrFieldGrp(), SwLinePortion::IsBreakPortion(), SwLinePortion::IsDropPortion(), SwLinePortion::IsFlyCntPortion(), SwLinePortion::IsFlyPortion(), SwLinePortion::IsFootnoteNumPortion(), SwLineLayout::IsHanging(), SwLinePortion::IsHolePortion(), SwRect::IsInside(), SwFrame::IsLayoutFrame(), SwLinePortion::IsMarginPortion(), SwLinePortion::IsMultiPortion(), SwLinePortion::IsPostItsPortion(), SwFrame::IsProtected(), SwFrame::IsRightToLeft(), 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, SwLayoutModeModifier::Modify(), MV_NONE, SwSpecialPos::nCharOfst, nLeftMargin, nLength, nRightMargin, SwTextIter::SeekAndChg(), SelectFont(), SwTextSizeInfo::SnapToGrid(), SwTextFrame::SwitchHorizontalToVertical(), SwTextFrame::SwitchLTRtoRTL(), SwPosSize::Width(), x, Point::X(), and Point::Y().

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

void SwTextCursor::GetEndCharRect ( SwRect pOrig,
TextFrameIndex  nOfst,
SwCursorMoveState pCMS = nullptr,
const long  nMax = 0 
)
static bool SwTextCursor::IsRightMargin ( )
inlinestatic
static void SwTextCursor::SetRightMargin ( const bool  bNew)
inlinestatic

Friends And Related Function Documentation

friend class SwTextCursorSave
friend

Definition at line 265 of file itrtxt.hxx.

Member Data Documentation

bool SwTextCursor::bRightMargin = false
staticprivate

Definition at line 268 of file itrtxt.hxx.

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


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