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, OUString const &rText, 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::SwAttrIter ( SwTextNode const *  pTextNode)
explicitprotected

Definition at line 71 of file itratr.cxx.

References CJK, CTL, Latin, and m_aFontCacheIds.

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 87 of file itratr.cxx.

References CtorInitAttrIter().

SwAttrIter::~SwAttrIter ( )
virtual

Definition at line 121 of file itratr.cxx.

References m_pFont, and m_pRedline.

Member Function Documentation

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

Definition at line 100 of file itratr.cxx.

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

Referenced by SeekFwd(), and SeekStartAndChgAttrIter().

void SwAttrIter::CtorInitAttrIter ( SwTextNode rTextNode,
SwScriptInfo rScrInf,
SwTextFrame const *  pFrame = nullptr 
)
protected
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 147 of file itratr.cxx.

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

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

SwAttrHandler& SwAttrIter::GetAttrHandler ( )
inline
SwFont* SwAttrIter::GetFnt ( )
inline
const SwFont* SwAttrIter::GetFnt ( ) const
inline

Definition at line 104 of file itratr.hxx.

References m_pFont.

TextFrameIndex SwAttrIter::GetNextAttr ( ) const
sal_uInt8 SwAttrIter::GetPropFont ( ) const
inline
SwRedlineItr* SwAttrIter::GetRedln ( )
inline
void SwAttrIter::InitFontAndAttrHandler ( SwTextNode const &  rPropsNode,
SwTextNode const &  rTextNode,
OUString const &  rText,
bool const *  pbVertLayout,
bool const *  pbVertLayoutLRBT 
)
private
bool SwAttrIter::IsSymbol ( TextFrameIndex  nPos)
bool SwAttrIter::MaybeHasHints ( ) const

Definition at line 127 of file itratr.cxx.

References SwTextNode::GetpSwpHints(), m_pMergedPara, and m_pTextNode.

Referenced by SwTextIter::TruncLines().

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

Definition at line 110 of file itratr.cxx.

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

Referenced by SeekFwd().

bool SwAttrIter::Seek ( TextFrameIndex  nPos)
bool SwAttrIter::SeekAndChgAttrIter ( TextFrameIndex  nPos,
OutputDevice pOut 
)
void SwAttrIter::SeekFwd ( sal_Int32  nOldPos,
sal_Int32  nNewPos 
)
private

Definition at line 263 of file itratr.cxx.

References Chg(), Count, SwTextNode::GetpSwpHints(), m_nEndIndex, m_nStartIndex, m_pTextNode, and Rst().

Referenced by Seek().

bool SwAttrIter::SeekStartAndChgAttrIter ( OutputDevice pOut,
const bool  bParaFont 
)
void SwAttrIter::SetFnt ( SwFont pNew)
inlineprivate

Definition at line 61 of file itratr.hxx.

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

void SwAttrIter::SetPropFont ( const sal_uInt8  nNew)
inline

Friends And Related Function Documentation

friend class SwFontSave
friend

Member Data Documentation

SwAttrHandler SwAttrIter::m_aAttrHandler
protected
o3tl::enumarray<SwFontScript, const void*> SwAttrIter::m_aFontCacheIds
private
o3tl::enumarray<SwFontScript, sal_uInt16> SwAttrIter::m_aFontIdx
private
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().

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

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

sal_uInt8 SwAttrIter::m_nPropFont
private
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().

SwFont* SwAttrIter::m_pFont
protected
VclPtr<OutputDevice> SwAttrIter::m_pLastOut
private

Definition at line 43 of file itratr.hxx.

Referenced by SeekAndChgAttrIter(), and SeekStartAndChgAttrIter().

sw::MergedPara const* SwAttrIter::m_pMergedPara
private
std::unique_ptr<SwRedlineItr, o3tl::default_delete<SwRedlineItr> > SwAttrIter::m_pRedline
private
SwScriptInfo* SwAttrIter::m_pScriptInfo
protected
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().

SwViewShell* SwAttrIter::m_pViewShell
protected

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