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

#include <itratr.hxx>

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

Public Member Functions

 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 ()
 

Protected Member Functions

void Chg (SwTextAttr const *pHt)
 
void Rst (SwTextAttr const *pHt)
 
void CtorInitAttrIter (SwTextNode &rTextNode, SwScriptInfo &rScrInf, SwTextFrame const *pFrame=nullptr)
 
 SwAttrIter (SwTextNode const *pTextNode)
 

Protected Attributes

SwAttrHandler m_aAttrHandler
 
SwViewShellm_pViewShell
 
SwFontm_pFont
 
SwScriptInfom_pScriptInfo
 

Private Member Functions

void SeekFwd (sal_Int32 nOldPos, sal_Int32 nNewPos)
 
void SetFnt (SwFont *pNew)
 
void InitFontAndAttrHandler (SwTextNode const &rPropsNode, SwTextNode const &rTextNode, std::u16string_view aText, bool const *pbVertLayout, bool const *pbVertLayoutLRBT)
 

Private Attributes

VclPtr< OutputDevicem_pLastOut
 
short m_nChgCnt
 count currently open hints, redlines, ext-input More...
 
std::unique_ptr< SwRedlineItr, o3tl::default_delete< SwRedlineItr > > m_pRedline
 
size_t m_nStartIndex
 current iteration index in HintStarts More...
 
size_t m_nEndIndex
 current iteration index in HintEnds More...
 
sal_Int32 m_nPosition
 current iteration index in text node More...
 
sal_uInt8 m_nPropFont
 
o3tl::enumarray< SwFontScript, const void * > m_aFontCacheIds
 
o3tl::enumarray< SwFontScript, sal_uInt16 > m_aFontIdx
 
const SwTextNodem_pTextNode
 input: the current text node More...
 
sw::MergedPara const * m_pMergedPara
 

Friends

class SwFontSave
 

Detailed Description

Definition at line 32 of file itratr.hxx.

Constructor & Destructor Documentation

◆ SwAttrIter() [1/2]

SwAttrIter::SwAttrIter ( SwTextNode const *  pTextNode)
explicitprotected

Definition at line 67 of file itratr.cxx.

References CJK, CTL, Latin, m_aFontCacheIds, and m_nPosition.

◆ SwAttrIter() [2/2]

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.

Definition at line 83 of file itratr.cxx.

References CtorInitAttrIter().

◆ ~SwAttrIter()

SwAttrIter::~SwAttrIter ( )
virtual

Definition at line 117 of file itratr.cxx.

References m_pFont, and m_pRedline.

Member Function Documentation

◆ Chg()

void SwAttrIter::Chg ( SwTextAttr const *  pHt)
protected

Definition at line 96 of file itratr.cxx.

References m_aAttrHandler, m_nChgCnt, m_pFont, m_pRedline, and SwAttrHandler::PushAndChg().

Referenced by SeekFwd(), and SeekStartAndChgAttrIter().

◆ CtorInitAttrIter()

void SwAttrIter::CtorInitAttrIter ( SwTextNode rTextNode,
SwScriptInfo rScrInf,
SwTextFrame const *  pFrame = nullptr 
)
protected

◆ GetAttr()

SwTextAttr * SwAttrIter::GetAttr ( TextFrameIndex  nPos) const

Returns the attribute for a position.

Only if the attribute is exactly at the position

Parameters
nPosand does not have an EndIndex

We need this function for attributes which should alter formatting without changing the content of the string. Such "degenerated" attributes are e.g.: fields which retain expanded text and line-bound Frames. In order to avoid ambiguities between different such attributes, we insert a special character at the start of the string, when creating such an attribute. The Formatter later on encounters such a special character and retrieves the degenerate attribute via GetAttr().

Definition at line 143 of file itratr.cxx.

References m_pMergedPara, m_pTextNode, sw::MapViewToModel(), and pos.

Referenced by SwTaggedPDFHelper::BeginInlineStructureElements(), SwTextNode::GetMinMaxSize(), SwTextFrame::GetScalingOfSelectedText(), SwTextFormatter::MakeRestPortion(), SwTextFormatter::NewExtraPortion(), and SwTextFormatter::NewPortion().

◆ GetAttrHandler()

SwAttrHandler & SwAttrIter::GetAttrHandler ( )
inline

◆ GetFnt() [1/2]

SwFont * SwAttrIter::GetFnt ( )
inline

◆ GetFnt() [2/2]

const SwFont * SwAttrIter::GetFnt ( ) const
inline

Definition at line 104 of file itratr.hxx.

References m_pFont.

◆ GetNextAttr()

TextFrameIndex SwAttrIter::GetNextAttr ( ) const

◆ GetPropFont()

sal_uInt8 SwAttrIter::GetPropFont ( ) const
inline

◆ GetRedln()

SwRedlineItr * SwAttrIter::GetRedln ( )
inline

◆ InitFontAndAttrHandler()

void SwAttrIter::InitFontAndAttrHandler ( SwTextNode const &  rPropsNode,
SwTextNode const &  rTextNode,
std::u16string_view  aText,
bool const *  pbVertLayout,
bool const *  pbVertLayoutLRBT 
)
private

◆ IsSymbol()

bool SwAttrIter::IsSymbol ( TextFrameIndex  nPos)

◆ MaybeHasHints()

bool SwAttrIter::MaybeHasHints ( ) const

◆ Rst()

void SwAttrIter::Rst ( SwTextAttr const *  pHt)
protected

Definition at line 106 of file itratr.cxx.

References m_aAttrHandler, m_nChgCnt, m_pFont, m_pRedline, and SwAttrHandler::PopAndChg().

Referenced by SeekFwd().

◆ Seek()

bool SwAttrIter::Seek ( TextFrameIndex  nPos)

◆ SeekAndChgAttrIter()

bool SwAttrIter::SeekAndChgAttrIter ( TextFrameIndex  nPos,
OutputDevice pOut 
)

◆ SeekFwd()

void SwAttrIter::SeekFwd ( sal_Int32  nOldPos,
sal_Int32  nNewPos 
)
private

◆ SeekStartAndChgAttrIter()

bool SwAttrIter::SeekStartAndChgAttrIter ( OutputDevice pOut,
const bool  bParaFont 
)

◆ SetFnt()

void SwAttrIter::SetFnt ( SwFont pNew)
inlineprivate

Definition at line 61 of file itratr.hxx.

References m_pFont.

Referenced by SwFontSave::SwFontSave(), and SwFontSave::~SwFontSave().

◆ SetPropFont()

void SwAttrIter::SetPropFont ( const sal_uInt8  nNew)
inline

Friends And Related Function Documentation

◆ SwFontSave

friend class SwFontSave
friend

Definition at line 34 of file itratr.hxx.

Member Data Documentation

◆ m_aAttrHandler

SwAttrHandler SwAttrIter::m_aAttrHandler
protected

◆ m_aFontCacheIds

o3tl::enumarray<SwFontScript, const void*> SwAttrIter::m_aFontCacheIds
private

◆ m_aFontIdx

o3tl::enumarray<SwFontScript, sal_uInt16> SwAttrIter::m_aFontIdx
private

◆ m_nChgCnt

short SwAttrIter::m_nChgCnt
private

count currently open hints, redlines, ext-input

Definition at line 45 of file itratr.hxx.

Referenced by Chg(), CtorInitAttrIter(), IsSymbol(), Rst(), Seek(), SeekAndChgAttrIter(), and SeekStartAndChgAttrIter().

◆ m_nEndIndex

size_t SwAttrIter::m_nEndIndex
private

current iteration index in HintEnds

Definition at line 50 of file itratr.hxx.

Referenced by CtorInitAttrIter(), GetNextAttr(), Seek(), SeekFwd(), and SeekStartAndChgAttrIter().

◆ m_nPosition

sal_Int32 SwAttrIter::m_nPosition
private

current iteration index in text node

Definition at line 52 of file itratr.hxx.

Referenced by CtorInitAttrIter(), GetNextAttr(), Seek(), SeekAndChgAttrIter(), SeekStartAndChgAttrIter(), and SwFontSave::~SwFontSave().

◆ m_nPropFont

sal_uInt8 SwAttrIter::m_nPropFont
private

◆ m_nStartIndex

size_t SwAttrIter::m_nStartIndex
private

current iteration index in HintStarts

Definition at line 48 of file itratr.hxx.

Referenced by CtorInitAttrIter(), GetNextAttr(), Seek(), SeekAndChgAttrIter(), SeekFwd(), and SeekStartAndChgAttrIter().

◆ m_pFont

SwFont* SwAttrIter::m_pFont
protected

◆ m_pLastOut

VclPtr<OutputDevice> SwAttrIter::m_pLastOut
private

Definition at line 43 of file itratr.hxx.

Referenced by SeekAndChgAttrIter(), and SeekStartAndChgAttrIter().

◆ m_pMergedPara

sw::MergedPara const* SwAttrIter::m_pMergedPara
private

◆ m_pRedline

std::unique_ptr<SwRedlineItr, o3tl::default_delete<SwRedlineItr> > SwAttrIter::m_pRedline
private

◆ m_pScriptInfo

SwScriptInfo* SwAttrIter::m_pScriptInfo
protected

◆ m_pTextNode

const SwTextNode* SwAttrIter::m_pTextNode
private

input: the current text node

Definition at line 57 of file itratr.hxx.

Referenced by GetAttr(), GetNextAttr(), MaybeHasHints(), Seek(), SeekAndChgAttrIter(), SeekFwd(), and SeekStartAndChgAttrIter().

◆ m_pViewShell

SwViewShell* SwAttrIter::m_pViewShell
protected

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