164 if ( !pSet )
return nullptr;
168 bool bRet = SfxItemState::SET == pSet->
GetItemState( nWhich, bInParent, &pItem );
170 return bRet ? pItem :
nullptr;
173 return ( nWhich == rAttr.
Which() ) ? &rAttr.
GetAttr() :
nullptr;
183 bRet = SfxItemState::SET == pItemSet->
GetItemState( nWhich );
212 static_txtattr_cast<SwTextINetFormat const&>(rAttr)));
225 *pColor = pItem->GetValue();
265 : m_pIDocumentSettingAccess(nullptr)
267 , m_bVertLayout(false)
268 , m_bVertLayoutLRBT(false)
290 SwFont& rFnt,
bool bVL,
bool bVertLayoutLRBT )
303 if ( pAS && pAS->
Count() )
310 nWhich = pItem->
Which();
356 if (
Push( rAttr, *pItem ) )
363 FontChg( aItemNext, rFnt,
true );
389 "I do not want this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
417 const auto it = std::find(rStack.begin(), rStack.end(), &rAttr);
418 if (it != rStack.end())
465 "I do not have this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
476 "I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
478 const sal_uInt16 nStackPos =
StackPos[ nAttr ];
500 FontChg( aItemNext, rFnt,
false );
503 FontChg( *pItemNext, rFnt,
false );
529 bool bTwoLineAct =
false;
535 bTwoLineAct = rTwoLineItem.GetValue();
566 switch ( rItem.
Which() )
662 FontKerning::FontSpecific :
663 FontKerning::Asian );
749 bool bTwoLineAct =
false;
755 bTwoLineAct = rTwoLineItem.GetValue();
839 sal_uInt16& nAscent, sal_uInt16& nHeight )
const
841 OSL_ENSURE(
m_oFnt,
"No font available for GetDefaultAscentAndHeight");
846 nHeight = aFont.
GetHeight( pShell, rOut );
847 nAscent = aFont.
GetAscent( pShell, rOut );
static bool lcl_ChgHyperLinkColor(const SwTextAttr &rAttr, const SfxPoolItem &rItem, const SwViewShell *pShell, Color *pColor)
The color of hyperlinks is taken from the associated character attribute, depending on its 'visited' ...
const sal_uInt8 StackPos[RES_TXTATR_WITHEND_END - RES_CHRATR_BEGIN+1]
Attribute to Stack Mapping.
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
OutDevType GetOutDevType() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
T & StaticWhichCast(TypedWhichId< T > nId)
const editeng::SvxBorderLine * GetTop() const
const editeng::SvxBorderLine * GetRight() const
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
const editeng::SvxBorderLine * GetBottom() const
sal_uInt16 GetWidth() const
const Color & GetColor() const
SvxShadowLocation GetLocation() const
const IDocumentSettingAccess * m_pIDocumentSettingAccess
void Init(const SwAttrSet &rAttrSet, const IDocumentSettingAccess &rIDocumentSettingAccess)
void PushAndChg(const SwTextAttr &rAttr, SwFont &rFnt)
void Pop(const SwTextAttr &rAttr)
Only used during redlining.
const SwViewShell * m_pShell
std::optional< SwFont > m_oFnt
bool Push(const SwTextAttr &rAttr, const SfxPoolItem &rItem)
std::vector< const SwTextAttr * > m_aAttrStack[NUM_ATTRIBUTE_STACKS]
const SfxPoolItem * m_pDefaultArray[NUM_DEFAULT_VALUES]
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...
void PopAndChg(const SwTextAttr &rAttr, SwFont &rFnt)
void ActivateTop(SwFont &rFnt, sal_uInt16 nStackPos)
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.
const SwTextAttr * GetTop(sal_uInt16 nStack)
void RemoveFromStack(sal_uInt16 nWhich, const SwTextAttr &rAttr)
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
void SetOverline(const FontLineStyle eOverline)
void SetCharSet(const rtl_TextEncoding eCharSet, const SwFontScript nWhich)
void SetPropWidth(const sal_uInt16 nNew)
void SetBottomBorder(const editeng::SvxBorderLine *pBottomBorder)
void SetShadowLocation(const SvxShadowLocation aLocation)
void SetStrikeout(const FontStrikeout eStrikeout)
void SetItalic(const FontItalic eItalic, const SwFontScript nWhich)
void SetHighlightColor(const Color &aNewColor)
void SetEscapement(const short nNewEsc)
void SetVertical(Degree10 nDir, const bool bVertLayout=false, const bool bVertLayoutLRBT=false)
void SetLeftBorder(const editeng::SvxBorderLine *pLeftBorder)
void SetUnderColor(const Color &rColor)
void SetEmphasisMark(const FontEmphasisMark eValue)
void SetName(const OUString &rName, const SwFontScript nWhich)
void SetProportion(const sal_uInt8 nNewPropr)
void SetTopBorderDist(const sal_uInt16 nTopDist)
void SetSize(const Size &rSize, const SwFontScript nWhich)
void SetBackColor(std::optional< Color > xNewColor)
void SetOutline(const bool bOutline)
sal_uInt8 & GetContentControl()
void SetLeftBorderDist(const sal_uInt16 nLeftDist)
sal_uInt8 & GetInputField()
void SetPitch(const FontPitch ePitch, const SwFontScript nWhich)
void SetRightBorderDist(const sal_uInt16 nRightDist)
void SetRightBorder(const editeng::SvxBorderLine *pRightBorder)
void SetShadow(const bool bShadow)
void SetColor(const Color &rColor)
void SetTopBorder(const editeng::SvxBorderLine *pTopBorder)
void SetAutoKern(FontKerning nAutoKern)
void SetOverColor(const Color &rColor)
void SetUnderline(const FontLineStyle eUnderline)
void SetCaseMap(const SvxCaseMap eNew)
void SetShadowColor(const Color &rColor)
void SetWordLineMode(const bool bWordLineMode)
void SetFamily(const FontFamily eFamily, const SwFontScript nWhich)
sal_uInt16 GetAscent(SwViewShell const *pSh, const OutputDevice &rOut)
void SetLanguage(LanguageType eNewLang, const SwFontScript nWhich)
void SetShadowWidth(const sal_uInt16 nWidth)
void SetWeight(const FontWeight eWeight, const SwFontScript nWhich)
void SetRelief(const FontRelief eNew)
tools::Long GetHeight() const
void SetFixKerning(const short nNewKern)
void SetBottomBorderDist(const sal_uInt16 nBottomDist)
void SetStyleName(const OUString &rStyleName, const SwFontScript nWhich)
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SfxPoolItem & GetAttr() const
bool IsPriorityAttr() const
SwTextAttr subclass that tracks the location of the wrapped SwFormatURL.
void SetVisited(bool bNew)
SwCharFormat * GetCharFormat()
bool IsVisitedLinks() const
const Color & GetVisitedLinksColor() const
bool IsPagePreview() const
const Color & GetLinksColor() const
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
vcl::Window * GetWin() const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
bool isCHRATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SvxAutoKernItem > RES_CHRATR_AUTOKERN(17)
constexpr TypedWhichId< SvxShadowItem > RES_CHRATR_SHADOW(41)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr sal_uInt16 RES_TXTATR_WITHEND_END(57)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxContourItem > RES_CHRATR_CONTOUR(4)
constexpr TypedWhichId< SvxCharReliefItem > RES_CHRATR_RELIEF(36)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxCharScaleWidthItem > RES_CHRATR_SCALEW(35)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SvxEmphasisMarkItem > RES_CHRATR_EMPHASIS_MARK(33)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SvxOverlineItem > RES_CHRATR_OVERLINE(38)
constexpr TypedWhichId< SvxCharRotateItem > RES_CHRATR_ROTATE(32)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
constexpr TypedWhichId< SvxWordLineModeItem > RES_CHRATR_WORDLINEMODE(16)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxTwoLinesItem > RES_CHRATR_TWO_LINES(34)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
constexpr TypedWhichId< SwFormatRuby > RES_TXTATR_CJK_RUBY(53)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
#define NUM_DEFAULT_VALUES