LibreOffice Module sw (master) 1
|
#include <itratr.hxx>
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 () |
SwRedlineItr * | GetRedln () |
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 |
SwTextAttr * | GetAttr (TextFrameIndex nPos) const |
Returns the attribute for a position. More... | |
SwFont * | GetFnt () |
const SwFont * | GetFnt () const |
sal_uInt8 | GetPropFont () const |
void | SetPropFont (const sal_uInt8 nNew) |
SwAttrHandler & | GetAttrHandler () |
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 |
SwViewShell * | m_pViewShell |
SwFont * | m_pFont |
SwScriptInfo * | m_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< OutputDevice > | m_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 SwTextNode * | m_pTextNode |
input: the current text node More... | |
sw::MergedPara const * | m_pMergedPara |
Friends | |
class | SwFontSave |
Definition at line 32 of file itratr.hxx.
|
explicitprotected |
Definition at line 71 of file itratr.cxx.
References CJK, CTL, Latin, m_aFontCacheIds, and m_nPosition.
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().
|
virtual |
Definition at line 121 of file itratr.cxx.
References m_pFont, and m_pRedline.
|
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().
|
protected |
Definition at line 582 of file redlnitr.cxx.
References COMPLETE_STRING, sw::MergedPara::extents, SwExtTextInput::GetAttrs(), IDocumentLayoutAccess::GetCurrentLayout(), SwRootFrame::GetCurrShell(), SwNode::GetDoc(), SwDoc::GetExtTextInput(), SwRootFrame::GetFieldmarkMode(), SwNode::getIDocumentLayoutAccess(), SwNode::getIDocumentRedlineAccess(), SwScriptInfo::GetInvalidityA(), SwTextFrame::GetMergedPara(), IDocumentRedlineAccess::GetRedlineFlags(), IDocumentRedlineAccess::GetRedlinePos(), SwTextNode::GetText(), SwRedlineItr::Hide, SwRedlineItr::Ignore, InitFontAndAttrHandler(), SwScriptInfo::InitScriptInfo(), SwRootFrame::IsHideRedlines(), SwFrame::IsRightToLeft(), IDocumentRedlineAccess::IsShowChanges(), SwFrame::IsVertical(), SwFrame::IsVertLRBT(), m_aAttrHandler, m_nChgCnt, m_nEndIndex, m_nPosition, m_nPropFont, m_nStartIndex, m_pFont, m_pMergedPara, m_pRedline, m_pScriptInfo, m_pViewShell, sw::MergedPara::mergedText, SwRedlineTable::npos, sw::MergedPara::pParaPropsNode, Seek(), SwRedlineItr::Show, sw::ShowBoth, and SwPaM::Start().
Referenced by SwTextIter::CtorInitTextIter(), and SwAttrIter().
SwTextAttr * SwAttrIter::GetAttr | ( | TextFrameIndex | nPos | ) | const |
Returns the attribute for a position.
Only if the attribute is exactly at the position
nPos | and 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, sw::MapViewToModel(), and pos.
Referenced by SwTaggedPDFHelper::BeginInlineStructureElements(), SwTextNode::GetMinMaxSize(), SwTextFrame::GetScalingOfSelectedText(), SwTextFormatter::MakeRestPortion(), SwTextFormatter::NewExtraPortion(), and SwTextFormatter::NewPortion().
|
inline |
Definition at line 109 of file itratr.hxx.
References m_aAttrHandler.
Referenced by SwLineLayout::CalcLine(), SwTextPainter::CheckSpecialUnderline(), and SwTextFrame::GetScalingOfSelectedText().
|
inline |
Definition at line 103 of file itratr.hxx.
References m_pFont.
Referenced by SwTextPainter::CheckSpecialUnderline(), SwTextMargin::CtorInitTextMargin(), SwTextPainter::CtorInitTextPainter(), SwTextPainter::DrawTextLine(), SwTextFormatter::FeedInf(), SwTextNode::GetMinMaxSize(), SwTextCursor::GetModelPositionForViewPoint(), SwTextFrame::GetScalingOfSelectedText(), SwTextNode::IsSymbolAt(), SwTextFormatter::MergeCharacterBorder(), SwTextFormatter::NewFieldPortion(), SwFontSave::SwFontSave(), and SwTextFormatter::WhichTextPor().
|
inline |
Definition at line 104 of file itratr.hxx.
References m_pFont.
TextFrameIndex SwAttrIter::GetNextAttr | ( | ) | const |
Definition at line 734 of file itratr.cxx.
References CanSkipOverRedline(), SwNode::GetIndex(), GetNextAttrImpl(), SwNode::GetTextNode(), m_nEndIndex, m_nPosition, m_nStartIndex, m_pMergedPara, m_pRedline, m_pTextNode, sw::MapModelToView(), SwRedlineTable::npos, and sw::MergedPara::pLastNode.
Referenced by SwTextNode::GetMinMaxSize(), SwTextFrame::GetScalingOfSelectedText(), lcl_CheckKashidaPositions(), lcl_CheckKashidaWidth(), SwTextFormatter::NewDropPortion(), and SwTextFormatter::NewTextPortion().
|
inline |
Definition at line 106 of file itratr.hxx.
References m_nPropFont.
Referenced by SwTextFormatter::BuildMultiPortion(), SwTextCursor::GetCharRect_(), SwTextCursor::GetModelPositionForViewPoint(), SwTextPainter::PaintMultiPortion(), and SwTextCursorSave::SwTextCursorSave().
|
inline |
Definition at line 81 of file itratr.hxx.
References m_pRedline.
Referenced by SwLineLayout::CalcLine(), SwTextPainter::CheckSpecialUnderline(), SwTextPainter::DrawTextLine(), SwTextFormatter::FeedInf(), SwTextFormatter::FormatQuoVadis(), and SwTextPainter::PaintMultiPortion().
|
private |
Definition at line 506 of file redlnitr.cxx.
References SwFont::CheckFontCacheId(), CJK, SwScriptInfo::CountScriptChg(), CTL, g_pBreakIt, SwFontAccess::Get(), SwContentNode::GetAnyFormatColl(), SwBreakIt::GetBreakIter(), SwFontObj::GetDefault(), SwFontObj::GetFont(), SwFont::GetFontCacheId(), SwNode::getIDocumentSettingAccess(), SwFont::GetOrientation(), SwContentNode::GetpSwAttrSet(), SwScriptInfo::GetScriptChg(), SwScriptInfo::GetScriptType(), SwAttrHandler::Init(), SwAttrHandler::IsVertLayout(), Latin, m_aAttrHandler, m_aFontCacheIds, m_aFontIdx, m_pFont, m_pScriptInfo, m_pViewShell, SwFont::SetActual(), SwFont::SetVertical(), SW_SCRIPTS, and SwScriptInfo::WhichFont().
Referenced by CtorInitAttrIter(), Seek(), and SeekStartAndChgAttrIter().
bool SwAttrIter::IsSymbol | ( | TextFrameIndex | nPos | ) |
Definition at line 181 of file itratr.cxx.
References SwFont::GetActual(), SwFont::IsSymbol(), m_aFontCacheIds, m_aFontIdx, m_nChgCnt, m_nPropFont, m_pFont, m_pViewShell, Seek(), and SwFont::SetFontCacheId().
Referenced by SwTextFrameInfo::IsBullet(), and SwTextFrame::IsSymbolAt().
bool SwAttrIter::MaybeHasHints | ( | ) | const |
Definition at line 127 of file itratr.cxx.
References SwTextNode::GetpSwpHints(), m_pMergedPara, and m_pTextNode.
Referenced by SwTextFrameBreak::IsInside(), and SwTextIter::TruncLines().
|
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 | ) |
Enables the attributes used at char pos nPos in the logical font.
Definition at line 306 of file itratr.cxx.
References SwNode::GetIndex(), GetNextAttrImpl(), SwTextNode::GetpSwpHints(), InitFontAndAttrHandler(), SwFont::IsFntChg(), SwTextNode::Len(), m_aAttrHandler, m_nChgCnt, m_nEndIndex, m_nPosition, m_nPropFont, m_nStartIndex, m_pFont, m_pMergedPara, m_pRedline, m_pScriptInfo, m_pTextNode, sw::MapViewToModel(), sw::MergedPara::mergedText, nPos, sw::MergedPara::pParaPropsNode, SwAttrHandler::Reset(), SwAttrHandler::ResetFont(), SeekFwd(), SwFont::SetActual(), SwFont::SetProportion(), and SwScriptInfo::WhichFont().
Referenced by SwTextPainter::CheckSpecialUnderline(), CtorInitAttrIter(), SwTextCursor::GetCharRect_(), IsSymbol(), SwTextNode::IsSymbolAt(), SwTextFormatter::MergeCharacterBorder(), SwTextFormatter::NewDropPortion(), SwTextFormatter::NewTextPortion(), and SeekAndChgAttrIter().
bool SwAttrIter::SeekAndChgAttrIter | ( | TextFrameIndex | nPos, |
OutputDevice * | pOut | ||
) |
Executes ChgPhysFnt if Seek() returns true and change font to merge character border with neighbours.
Definition at line 155 of file itratr.cxx.
References SwFont::ChgPhysFnt(), VclPtr< class reference_type >::get(), SwFont::GetActual(), SwFont::IsFntChg(), m_aFontCacheIds, m_aFontIdx, m_nChgCnt, m_nPosition, m_nPropFont, m_nStartIndex, m_pFont, m_pLastOut, m_pMergedPara, m_pTextNode, m_pViewShell, sw::MapViewToModel(), pos, pOut, Seek(), SwFont::SetFntChg(), and SwFont::SetFontCacheId().
Referenced by SwTextNode::GetMinMaxSize(), SwTextFrame::GetScalingOfSelectedText(), lcl_CheckKashidaPositions(), lcl_CheckKashidaWidth(), SwTextIter::SeekAndChg(), and SwTextIter::SeekAndChgBefore().
|
private |
Definition at line 263 of file itratr.cxx.
References Chg(), SwpHints::Count(), SwpHints::Get(), SwTextAttr::GetAnyEnd(), SwTextNode::GetpSwpHints(), SwpHints::GetSortedByEnd(), SwTextAttr::GetStart(), m_nEndIndex, m_nStartIndex, m_pTextNode, and Rst().
Referenced by Seek().
bool SwAttrIter::SeekStartAndChgAttrIter | ( | OutputDevice * | pOut, |
const bool | bParaFont | ||
) |
Definition at line 197 of file itratr.cxx.
References Chg(), SwFont::ChgPhysFnt(), COMPLETE_STRING, Count, VclPtr< class reference_type >::get(), SwpHints::Get(), SwFont::GetActual(), SwNode::GetIndex(), SwTextNode::GetpSwpHints(), InitFontAndAttrHandler(), SwFont::IsFntChg(), m_aAttrHandler, m_aFontCacheIds, m_aFontIdx, m_nChgCnt, m_nEndIndex, m_nPosition, m_nPropFont, m_nStartIndex, m_pFont, m_pLastOut, m_pMergedPara, m_pRedline, m_pTextNode, m_pViewShell, sw::MergedPara::mergedText, sw::MergedPara::pFirstNode, pOut, sw::MergedPara::pParaPropsNode, SwAttrHandler::Reset(), SwAttrHandler::ResetFont(), SwFont::SetFntChg(), SwFont::SetFontCacheId(), and SwFont::SetProportion().
Referenced by SwTextIter::SeekStartAndChg().
|
inlineprivate |
Definition at line 61 of file itratr.hxx.
References m_pFont.
Referenced by SwFontSave::SwFontSave(), and SwFontSave::~SwFontSave().
|
inline |
Definition at line 107 of file itratr.hxx.
References m_nPropFont.
Referenced by SwTextFormatter::BuildMultiPortion(), SwTextCursor::GetCharRect_(), SwTextPainter::PaintMultiPortion(), SwTextCursorSave::SwTextCursorSave(), and SwTextCursorSave::~SwTextCursorSave().
|
friend |
Definition at line 34 of file itratr.hxx.
|
protected |
Definition at line 37 of file itratr.hxx.
Referenced by Chg(), CtorInitAttrIter(), GetAttrHandler(), InitFontAndAttrHandler(), Rst(), Seek(), and SeekStartAndChgAttrIter().
|
private |
Definition at line 54 of file itratr.hxx.
Referenced by InitFontAndAttrHandler(), IsSymbol(), SeekAndChgAttrIter(), SeekStartAndChgAttrIter(), and SwAttrIter().
|
private |
Definition at line 55 of file itratr.hxx.
Referenced by InitFontAndAttrHandler(), IsSymbol(), SeekAndChgAttrIter(), and SeekStartAndChgAttrIter().
|
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().
|
private |
current iteration index in HintEnds
Definition at line 50 of file itratr.hxx.
Referenced by CtorInitAttrIter(), GetNextAttr(), Seek(), SeekFwd(), and SeekStartAndChgAttrIter().
|
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().
|
private |
Definition at line 53 of file itratr.hxx.
Referenced by CtorInitAttrIter(), GetPropFont(), IsSymbol(), Seek(), SeekAndChgAttrIter(), SeekStartAndChgAttrIter(), and SetPropFont().
|
private |
current iteration index in HintStarts
Definition at line 48 of file itratr.hxx.
Referenced by CtorInitAttrIter(), GetNextAttr(), Seek(), SeekAndChgAttrIter(), SeekFwd(), and SeekStartAndChgAttrIter().
|
protected |
Definition at line 39 of file itratr.hxx.
Referenced by SwTextFormatter::BuildPortions(), SwTextFormatter::CalcAscent(), SwTextPainter::CheckSpecialUnderline(), Chg(), CtorInitAttrIter(), SwTextPainter::DrawTextLine(), SwTextFormatter::FormatQuoVadis(), GetFnt(), InitFontAndAttrHandler(), IsSymbol(), SwTextFormatter::NewFieldPortion(), Rst(), Seek(), SeekAndChgAttrIter(), SeekStartAndChgAttrIter(), SetFnt(), and ~SwAttrIter().
|
private |
Definition at line 43 of file itratr.hxx.
Referenced by SeekAndChgAttrIter(), and SeekStartAndChgAttrIter().
|
private |
Definition at line 58 of file itratr.hxx.
Referenced by CtorInitAttrIter(), GetAttr(), GetNextAttr(), MaybeHasHints(), Seek(), SeekAndChgAttrIter(), and SeekStartAndChgAttrIter().
|
private |
Definition at line 46 of file itratr.hxx.
Referenced by Chg(), CtorInitAttrIter(), GetNextAttr(), GetRedln(), Rst(), Seek(), SeekStartAndChgAttrIter(), and ~SwAttrIter().
|
protected |
Definition at line 40 of file itratr.hxx.
Referenced by SwTextFormatter::BuildPortions(), CtorInitAttrIter(), InitFontAndAttrHandler(), SwTextFormatter::NewDropPortion(), SwTextFormatter::NewTextPortion(), Seek(), and SwTextFormatter::WhichFirstPortion().
|
private |
input: the current text node
Definition at line 57 of file itratr.hxx.
Referenced by GetAttr(), GetNextAttr(), MaybeHasHints(), Seek(), SeekAndChgAttrIter(), SeekFwd(), and SeekStartAndChgAttrIter().
|
protected |
Definition at line 38 of file itratr.hxx.
Referenced by CtorInitAttrIter(), InitFontAndAttrHandler(), IsSymbol(), SeekAndChgAttrIter(), and SeekStartAndChgAttrIter().