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

Used by Attribute Iterators to organize attributes on stacks to find the valid attribute in each category. More...

#include <atrhndl.hxx>

Collaboration diagram for SwAttrHandler:

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 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 SwFontGetFont () 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 SwTextAttrGetTop (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 SfxPoolItemm_pDefaultArray [NUM_DEFAULT_VALUES]
const IDocumentSettingAccessm_pIDocumentSettingAccess
const SwViewShellm_pShell
std::unique_ptr< SwFontm_pFnt
bool m_bVertLayout

Detailed Description

Used by Attribute Iterators to organize attributes on stacks to find the valid attribute in each category.

Definition at line 40 of file atrhndl.hxx.

Constructor & Destructor Documentation

SwAttrHandler::SwAttrHandler ( )

Definition at line 265 of file atrstck.cxx.

References m_pDefaultArray, m_pShell, and NUM_DEFAULT_VALUES.

SwAttrHandler::~SwAttrHandler ( )

Definition at line 273 of file atrstck.cxx.

Member Function Documentation

void SwAttrHandler::ActivateTop ( SwFont rFnt,
sal_uInt16  nStackPos 
void SwAttrHandler::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.

The following function change a font depending on the stack id.

Definition at line 571 of file atrstck.cxx.

References ActivateTop(), CJK, CTL, IDocumentSettingAccess::get(), SvxBoxItem::GetBottom(), GetCaseMap(), SvxShadowItem::GetColor(), SvxBoxItem::GetDistance(), SwFont::GetInputField(), CharFormat::GetItem(), SwLangHelper::GetLanguage(), 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_pDefaultArray, m_pIDocumentSettingAccess, m_pShell, RES_CHRATR_AUTOKERN, RES_CHRATR_BACKGROUND, RES_CHRATR_BLINK, 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_INPUTFIELD, RES_TXTATR_META, RES_TXTATR_METAFIELD, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK, SwFont::SetAutoKern(), SwFont::SetBackColor(), SwFont::SetBlink(), 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, 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 837 of file atrstck.cxx.

References SwFont::GetAscent(), SwFont::GetHeight(), and m_pFnt.

Referenced by SwLineLayout::CalcLine().

const SwFont * SwAttrHandler::GetFont ( ) const

Definition at line 113 of file atrhndl.hxx.

References m_pFnt.

Referenced by SwTextPainter::CheckSpecialUnderline().

const SwTextAttr * SwAttrHandler::GetTop ( sal_uInt16  nStack)

Definition at line 387 of file atrstck.cxx.

References m_aAttrStack.

Referenced by ActivateTop(), FontChg(), and Push().

void SwAttrHandler::Init ( const SwAttrSet rAttrSet,
const IDocumentSettingAccess rIDocumentSettingAccess 
void SwAttrHandler::Init ( const SfxPoolItem **  pPoolItem,
const SwAttrSet pAttrSet,
const IDocumentSettingAccess rIDocumentSettingAccess,
const SwViewShell pShell,
SwFont rFnt,
bool  bVertLayout 
bool SwAttrHandler::IsVertLayout ( ) const

Definition at line 81 of file atrhndl.hxx.

References m_bVertLayout.

Referenced by SwAttrIter::InitFontAndAttrHandler().

void SwAttrHandler::Pop ( const SwTextAttr rAttr)

Only used during redlining.

Definition at line 468 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 
bool SwAttrHandler::Push ( const SwTextAttr rAttr,
const SfxPoolItem rItem 
void SwAttrHandler::PushAndChg ( const SwTextAttr rAttr,
SwFont rFnt 
void SwAttrHandler::RemoveFromStack ( sal_uInt16  nWhich,
const SwTextAttr rAttr 

Definition at line 420 of file atrstck.cxx.

References m_aAttrStack, and StackPos.

Referenced by Pop(), and PopAndChg().

void SwAttrHandler::Reset ( void  )

Definition at line 337 of file atrstck.cxx.

References i, and m_aAttrStack.

Referenced by SwAttrIter::Seek(), and SwAttrIter::SeekStartAndChgAttrIter().

void SwAttrHandler::ResetFont ( SwFont rFnt) const

Definition at line 106 of file atrhndl.hxx.

References m_pFnt.

Referenced by SwAttrIter::Seek(), and SwAttrIter::SeekStartAndChgAttrIter().

Member Data Documentation

std::vector<const SwTextAttr*> SwAttrHandler::m_aAttrStack[NUM_ATTRIBUTE_STACKS]

Definition at line 43 of file atrhndl.hxx.

Referenced by FontChg(), GetTop(), Push(), RemoveFromStack(), and Reset().

bool SwAttrHandler::m_bVertLayout

Definition at line 52 of file atrhndl.hxx.

Referenced by ActivateTop(), FontChg(), Init(), and IsVertLayout().

const SfxPoolItem* SwAttrHandler::m_pDefaultArray[NUM_DEFAULT_VALUES]

Definition at line 44 of file atrhndl.hxx.

Referenced by ActivateTop(), FontChg(), Init(), and SwAttrHandler().

std::unique_ptr<SwFont> SwAttrHandler::m_pFnt

Definition at line 50 of file atrhndl.hxx.

Referenced by GetDefaultAscentAndHeight(), GetFont(), Init(), and ResetFont().

const IDocumentSettingAccess* SwAttrHandler::m_pIDocumentSettingAccess

Definition at line 45 of file atrhndl.hxx.

Referenced by FontChg(), and Init().

const SwViewShell* SwAttrHandler::m_pShell

Definition at line 46 of file atrhndl.hxx.

Referenced by ActivateTop(), FontChg(), Init(), Push(), and PushAndChg().

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