LibreOffice Module sw (master) 1
|
Used by Attribute Iterators to organize attributes on stacks to find the valid attribute in each category. More...
#include <atrhndl.hxx>
Public Member Functions | |
SwAttrHandler () | |
~SwAttrHandler () | |
void | Init (const SwAttrSet &rAttrSet, const IDocumentSettingAccess &rIDocumentSettingAccess) |
void | Init (const SfxPoolItem **pPoolItem, const SwAttrSet *pAttrSet, const IDocumentSettingAccess &rIDocumentSettingAccess, const SwViewShell *pShell, SwFont &rFnt, bool bVertLayout, bool bVertLayoutLRBT) |
bool | IsVertLayout () const |
void | Reset () |
void | PushAndChg (const SwTextAttr &rAttr, SwFont &rFnt) |
void | PopAndChg (const SwTextAttr &rAttr, SwFont &rFnt) |
void | Pop (const SwTextAttr &rAttr) |
Only used during redlining. More... | |
void | ResetFont (SwFont &rFnt) const |
const SwFont * | GetFont () const |
void | GetDefaultAscentAndHeight (SwViewShell const *pShell, OutputDevice const &rOut, sal_uInt16 &nAscent, sal_uInt16 &nHeight) const |
Takes the default font and calculated the ascent and height. More... | |
Private Member Functions | |
const SwTextAttr * | GetTop (sal_uInt16 nStack) |
void | RemoveFromStack (sal_uInt16 nWhich, const SwTextAttr &rAttr) |
void | FontChg (const SfxPoolItem &rItem, SwFont &rFnt, bool bPush) |
When popping an attribute from the stack, the top more remaining attribute in the stack becomes valid. More... | |
bool | Push (const SwTextAttr &rAttr, const SfxPoolItem &rItem) |
void | ActivateTop (SwFont &rFnt, sal_uInt16 nStackPos) |
Private Attributes | |
std::vector< const SwTextAttr * > | m_aAttrStack [NUM_ATTRIBUTE_STACKS] |
const SfxPoolItem * | m_pDefaultArray [NUM_DEFAULT_VALUES] |
const IDocumentSettingAccess * | m_pIDocumentSettingAccess |
const SwViewShell * | m_pShell |
std::optional< SwFont > | m_oFnt |
bool | m_bVertLayout |
bool | m_bVertLayoutLRBT |
Used by Attribute Iterators to organize attributes on stacks to find the valid attribute in each category.
Definition at line 37 of file atrhndl.hxx.
SwAttrHandler::SwAttrHandler | ( | ) |
Definition at line 264 of file atrstck.cxx.
References m_pDefaultArray, m_pShell, and NUM_DEFAULT_VALUES.
SwAttrHandler::~SwAttrHandler | ( | ) |
Definition at line 273 of file atrstck.cxx.
|
private |
Definition at line 473 of file atrstck.cxx.
References FontChg(), SwTextAttr::GetAttr(), SwFont::GetContentControl(), SwFont::GetInputField(), CharFormat::GetItem(), CharFormat::GetItemSet(), SfxItemSet::GetItemState(), SwFont::GetMeta(), SwFont::GetRef(), GetTop(), SwFont::GetTox(), GetValue, lcl_ChgHyperLinkColor(), m_bVertLayout, m_pDefaultArray, m_pShell, NUM_DEFAULT_VALUES, RES_CHRATR_COLOR(), RES_CHRATR_ROTATE(), RES_CHRATR_TWO_LINES(), RES_TXTATR_AUTOFMT(), RES_TXTATR_CHARFMT(), RES_TXTATR_CJK_RUBY(), RES_TXTATR_CONTENTCONTROL(), RES_TXTATR_INETFMT(), RES_TXTATR_INPUTFIELD(), RES_TXTATR_META(), RES_TXTATR_METAFIELD(), RES_TXTATR_REFMARK(), RES_TXTATR_TOXMARK(), RES_TXTATR_WITHEND_END(), SwFont::SetVertical(), StackPos, SfxPoolItem::StaticWhichCast(), and SwTextAttr::Which().
Referenced by FontChg(), and PopAndChg().
|
private |
When popping an attribute from the stack, the top more remaining attribute in the stack becomes valid.
The following function change a font depending on the stack id.
Definition at line 564 of file atrstck.cxx.
References ActivateTop(), CJK, CTL, IDocumentSettingAccess::get(), SvxBoxItem::GetBottom(), SvxShadowItem::GetColor(), SwFont::GetContentControl(), SvxBoxItem::GetDistance(), SwFont::GetInputField(), CharFormat::GetItem(), SvxBoxItem::GetLeft(), SvxShadowItem::GetLocation(), SwFont::GetMeta(), SwFont::GetRef(), SvxBoxItem::GetRight(), SvxBoxItem::GetTop(), GetTop(), SwFont::GetTox(), GetValue, SvxShadowItem::GetWidth(), SwViewShell::GetWin(), KERN_ASIAN_PUNCTUATION, Latin, LINESTYLE_DOTTED, m_aAttrStack, m_bVertLayout, m_bVertLayoutLRBT, m_pDefaultArray, m_pIDocumentSettingAccess, m_pShell, RES_CHRATR_AUTOKERN(), RES_CHRATR_BACKGROUND(), RES_CHRATR_BOX(), RES_CHRATR_CASEMAP(), RES_CHRATR_CJK_FONT(), RES_CHRATR_CJK_FONTSIZE(), RES_CHRATR_CJK_LANGUAGE(), RES_CHRATR_CJK_POSTURE(), RES_CHRATR_CJK_WEIGHT(), RES_CHRATR_COLOR(), RES_CHRATR_CONTOUR(), RES_CHRATR_CROSSEDOUT(), RES_CHRATR_CTL_FONT(), RES_CHRATR_CTL_FONTSIZE(), RES_CHRATR_CTL_LANGUAGE(), RES_CHRATR_CTL_POSTURE(), RES_CHRATR_CTL_WEIGHT(), RES_CHRATR_EMPHASIS_MARK(), RES_CHRATR_ESCAPEMENT(), RES_CHRATR_FONT(), RES_CHRATR_FONTSIZE(), RES_CHRATR_HIDDEN(), RES_CHRATR_HIGHLIGHT(), RES_CHRATR_KERNING(), RES_CHRATR_LANGUAGE(), RES_CHRATR_OVERLINE(), RES_CHRATR_POSTURE(), RES_CHRATR_RELIEF(), RES_CHRATR_ROTATE(), RES_CHRATR_SCALEW(), RES_CHRATR_SHADOW(), RES_CHRATR_SHADOWED(), RES_CHRATR_TWO_LINES(), RES_CHRATR_UNDERLINE(), RES_CHRATR_WEIGHT(), RES_CHRATR_WORDLINEMODE(), RES_TXTATR_CJK_RUBY(), RES_TXTATR_CONTENTCONTROL(), RES_TXTATR_INPUTFIELD(), RES_TXTATR_META(), RES_TXTATR_METAFIELD(), RES_TXTATR_REFMARK(), RES_TXTATR_TOXMARK(), SwFont::SetAutoKern(), SwFont::SetBackColor(), SwFont::SetBottomBorder(), SwFont::SetBottomBorderDist(), SwFont::SetCaseMap(), SwFont::SetCharSet(), SwFont::SetColor(), SwFont::SetEmphasisMark(), SwFont::SetEscapement(), SwFont::SetFamily(), SwFont::SetFixKerning(), SwFont::SetHighlightColor(), SwFont::SetItalic(), SwFont::SetLanguage(), SwFont::SetLeftBorder(), SwFont::SetLeftBorderDist(), SwFont::SetName(), SwFont::SetOutline(), SwFont::SetOverColor(), SwFont::SetOverline(), SwFont::SetPitch(), SwFont::SetProportion(), SwFont::SetPropWidth(), SwFont::SetRelief(), SwFont::SetRightBorder(), SwFont::SetRightBorderDist(), SwFont::SetShadow(), SwFont::SetShadowColor(), SwFont::SetShadowLocation(), SwFont::SetShadowWidth(), SwFont::SetSize(), SwFont::SetStrikeout(), SwFont::SetStyleName(), SwFont::SetTopBorder(), SwFont::SetTopBorderDist(), SwFont::SetUnderColor(), SwFont::SetUnderline(), SwFont::SetVertical(), SwFont::SetWeight(), SwFont::SetWordLineMode(), StackPos, SfxPoolItem::StaticWhichCast(), and SfxPoolItem::Which().
Referenced by ActivateTop(), Init(), and PushAndChg().
void SwAttrHandler::GetDefaultAscentAndHeight | ( | SwViewShell const * | pShell, |
OutputDevice const & | rOut, | ||
sal_uInt16 & | nAscent, | ||
sal_uInt16 & | nHeight | ||
) | const |
Takes the default font and calculated the ascent and height.
Definition at line 838 of file atrstck.cxx.
References SwFont::GetAscent(), SwFont::GetHeight(), and m_oFnt.
Referenced by SwLineLayout::CalcLine().
|
inline |
Definition at line 111 of file atrhndl.hxx.
References m_oFnt.
Referenced by SwTextPainter::CheckSpecialUnderline().
|
private |
Definition at line 381 of file atrstck.cxx.
References m_aAttrStack.
Referenced by ActivateTop(), FontChg(), and Push().
void SwAttrHandler::Init | ( | const SfxPoolItem ** | pPoolItem, |
const SwAttrSet * | pAttrSet, | ||
const IDocumentSettingAccess & | rIDocumentSettingAccess, | ||
const SwViewShell * | pShell, | ||
SwFont & | rFnt, | ||
bool | bVertLayout, | ||
bool | bVertLayoutLRBT | ||
) |
Definition at line 287 of file atrstck.cxx.
References SfxItemSet::Count(), FontChg(), SfxItemIter::GetCurItem(), isCHRATR(), m_bVertLayout, m_bVertLayoutLRBT, m_oFnt, m_pDefaultArray, m_pIDocumentSettingAccess, m_pShell, SfxItemIter::NextItem(), NUM_DEFAULT_VALUES, StackPos, and SfxPoolItem::Which().
void SwAttrHandler::Init | ( | const SwAttrSet & | rAttrSet, |
const IDocumentSettingAccess & | rIDocumentSettingAccess | ||
) |
Definition at line 277 of file atrstck.cxx.
References SfxItemSet::Get(), i, m_pDefaultArray, m_pIDocumentSettingAccess, m_pShell, RES_CHRATR_BEGIN(), RES_CHRATR_END(), and StackPos.
Referenced by SwTextFrame::EmptyHeight(), SwAttrIter::InitFontAndAttrHandler(), and SwTextFrame::PaintEmpty().
|
inline |
Definition at line 79 of file atrhndl.hxx.
References m_bVertLayout.
Referenced by SwAttrIter::InitFontAndAttrHandler().
void SwAttrHandler::Pop | ( | const SwTextAttr & | rAttr | ) |
Only used during redlining.
Definition at line 462 of file atrstck.cxx.
References RemoveFromStack(), RES_TXTATR_WITHEND_END(), and SwTextAttr::Which().
Referenced by SwRedlineItr::Clear_().
void SwAttrHandler::PopAndChg | ( | const SwTextAttr & | rAttr, |
SwFont & | rFnt | ||
) |
Definition at line 422 of file atrstck.cxx.
References ActivateTop(), SwTextAttr::GetAttr(), CharFormat::GetItemSet(), SfxItemSet::GetItemState(), i, RemoveFromStack(), RES_CHRATR_BEGIN(), RES_CHRATR_END(), RES_TXTATR_AUTOFMT(), RES_TXTATR_CHARFMT(), RES_TXTATR_INETFMT(), RES_TXTATR_WITHEND_END(), and SwTextAttr::Which().
Referenced by SwRedlineItr::ChangeTextAttr(), SwRedlineItr::Clear_(), and SwAttrIter::Rst().
|
private |
Definition at line 386 of file atrstck.cxx.
References GetTop(), SwTextAttr::IsPriorityAttr(), lcl_ChgHyperLinkColor(), m_aAttrStack, m_pShell, RES_TXTATR_WITHEND_END(), StackPos, and SfxPoolItem::Which().
Referenced by PushAndChg().
void SwAttrHandler::PushAndChg | ( | const SwTextAttr & | rAttr, |
SwFont & | rFnt | ||
) |
Definition at line 337 of file atrstck.cxx.
References FontChg(), SwTextAttr::GetAttr(), CharFormat::GetItemSet(), SfxItemSet::GetItemState(), i, lcl_ChgHyperLinkColor(), m_pShell, Push(), RES_CHRATR_BEGIN(), RES_CHRATR_COLOR(), RES_CHRATR_END(), RES_TXTATR_AUTOFMT(), RES_TXTATR_CHARFMT(), RES_TXTATR_INETFMT(), and SwTextAttr::Which().
Referenced by SwRedlineItr::ChangeTextAttr(), SwAttrIter::Chg(), SwTextFrame::GetScalingOfSelectedText(), and SwRedlineItr::Seek().
|
private |
Definition at line 414 of file atrstck.cxx.
References m_aAttrStack, and StackPos.
Referenced by Pop(), and PopAndChg().
void SwAttrHandler::Reset | ( | void | ) |
Definition at line 331 of file atrstck.cxx.
References i, and m_aAttrStack.
Referenced by SwAttrIter::Seek(), and SwAttrIter::SeekStartAndChgAttrIter().
|
inline |
Definition at line 104 of file atrhndl.hxx.
References m_oFnt.
Referenced by SwAttrIter::Seek(), and SwAttrIter::SeekStartAndChgAttrIter().
|
private |
Definition at line 40 of file atrhndl.hxx.
Referenced by FontChg(), GetTop(), Push(), RemoveFromStack(), and Reset().
|
private |
Definition at line 49 of file atrhndl.hxx.
Referenced by ActivateTop(), FontChg(), Init(), and IsVertLayout().
|
private |
Definition at line 50 of file atrhndl.hxx.
|
private |
Definition at line 47 of file atrhndl.hxx.
Referenced by GetDefaultAscentAndHeight(), GetFont(), Init(), and ResetFont().
|
private |
Definition at line 41 of file atrhndl.hxx.
Referenced by ActivateTop(), FontChg(), Init(), and SwAttrHandler().
|
private |
Definition at line 42 of file atrhndl.hxx.
|
private |
Definition at line 43 of file atrhndl.hxx.
Referenced by ActivateTop(), FontChg(), Init(), Push(), and PushAndChg().