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 );
void SetLeftBorderDist(const sal_uInt16 nLeftDist)
vcl::RenderContext * GetOut() const
OutDevType GetOutDevType() const
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
SwCharFormat * GetCharFormat()
bool IsPagePreview() const
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
void Pop(const SwTextAttr &rAttr)
Only used during redlining.
static bool IsVisitedLinks()
bool IsPriorityAttr() const
void SetWordLineMode(const bool bWordLineMode)
bool isCHRATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
void PopAndChg(const SwTextAttr &rAttr, SwFont &rFnt)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
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...
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr sal_uInt16 RES_TXTATR_WITHEND_END(57)
static Color & GetLinksColor()
void SetEmphasisMark(const FontEmphasisMark eValue)
sal_uInt16 GetDistance(SvxBoxItemLine nLine) const
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxAutoKernItem > RES_CHRATR_AUTOKERN(17)
const SfxPoolItem * m_pDefaultArray[NUM_DEFAULT_VALUES]
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
void SetOutline(const bool bOutline)
const editeng::SvxBorderLine * GetRight() const
void SetPropWidth(const sal_uInt16 nNew)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
void SetBottomBorderDist(const sal_uInt16 nBottomDist)
void SetPitch(const FontPitch ePitch, const SwFontScript nWhich)
constexpr TypedWhichId< SvxTwoLinesItem > RES_CHRATR_TWO_LINES(34)
#define NUM_DEFAULT_VALUES
void SetColor(const Color &rColor)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
void SetShadow(const bool bShadow)
const SfxPoolItem * NextItem()
SvxShadowLocation GetLocation() const
constexpr TypedWhichId< SvxShadowItem > RES_CHRATR_SHADOW(41)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
sal_uInt16 GetAscent(SwViewShell const *pSh, const OutputDevice &rOut)
static Color & GetVisitedLinksColor()
constexpr TypedWhichId< SwFormatRuby > RES_TXTATR_CJK_RUBY(53)
void SetShadowColor(const Color &rColor)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
void SetUnderline(const FontLineStyle eUnderline)
constexpr TypedWhichId< SvxCharReliefItem > RES_CHRATR_RELIEF(36)
void SetShadowLocation(const SvxShadowLocation aLocation)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
void SetStrikeout(const FontStrikeout eStrikeout)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
void SetLeftBorder(const editeng::SvxBorderLine *pLeftBorder)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
const Color & GetColor() const
void SetStyleName(const OUString &rStyleName, const SwFontScript nWhich)
const editeng::SvxBorderLine * GetTop() const
void SetLanguage(LanguageType eNewLang, const SwFontScript nWhich)
void Init(const SwAttrSet &rAttrSet, const IDocumentSettingAccess &rIDocumentSettingAccess)
void SetRightBorder(const editeng::SvxBorderLine *pRightBorder)
const editeng::SvxBorderLine * GetLeft() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetVisited(bool bNew)
T & StaticWhichCast(TypedWhichId< T > nId)
void SetUnderColor(const Color &rColor)
void SetRightBorderDist(const sal_uInt16 nRightDist)
void SetShadowWidth(const sal_uInt16 nWidth)
void SetCaseMap(const SvxCaseMap eNew)
void SetVertical(Degree10 nDir, const bool bVertLayout=false, const bool bVertLayoutLRBT=false)
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
void SetRelief(const FontRelief eNew)
const IDocumentSettingAccess * m_pIDocumentSettingAccess
sal_uInt8 & GetContentControl()
void SetEscapement(const short nNewEsc)
Provides access to settings of a document.
void RemoveFromStack(sal_uInt16 nWhich, const SwTextAttr &rAttr)
void SetWeight(const FontWeight eWeight, const SwFontScript nWhich)
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.
bool Push(const SwTextAttr &rAttr, const SfxPoolItem &rItem)
constexpr TypedWhichId< SvxOverlineItem > RES_CHRATR_OVERLINE(38)
constexpr TypedWhichId< SvxEmphasisMarkItem > RES_CHRATR_EMPHASIS_MARK(33)
void SetOverColor(const Color &rColor)
const SwTextAttr * GetTop(sal_uInt16 nStack)
void SetFixKerning(const short nNewKern)
constexpr TypedWhichId< SvxCharScaleWidthItem > RES_CHRATR_SCALEW(35)
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
std::optional< SwFont > m_oFnt
void SetBottomBorder(const editeng::SvxBorderLine *pBottomBorder)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
const sal_uInt8 StackPos[RES_TXTATR_WITHEND_END-RES_CHRATR_BEGIN+1]
Attribute to Stack Mapping.
const SwViewShell * m_pShell
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
sal_uInt8 & GetInputField()
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void SetBackColor(std::optional< Color > xNewColor)
void SetSize(const Size &rSize, const SwFontScript nWhich)
constexpr TypedWhichId< SvxWordLineModeItem > RES_CHRATR_WORDLINEMODE(16)
const SwViewOption * GetViewOptions() const
vcl::Window * GetWin() const
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
void SetTopBorder(const editeng::SvxBorderLine *pTopBorder)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
void SetFamily(const FontFamily eFamily, const SwFontScript nWhich)
void SetCharSet(const rtl_TextEncoding eCharSet, const SwFontScript nWhich)
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
void ActivateTop(SwFont &rFnt, sal_uInt16 nStackPos)
std::vector< const SwTextAttr * > m_aAttrStack[NUM_ATTRIBUTE_STACKS]
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr sal_uInt16 RES_CHRATR_END(46)
void SetName(const OUString &rName, const SwFontScript nWhich)
void PushAndChg(const SwTextAttr &rAttr, SwFont &rFnt)
const SfxPoolItem & GetAttr() const
void SetAutoKern(FontKerning nAutoKern)
constexpr TypedWhichId< SvxCharRotateItem > RES_CHRATR_ROTATE(32)
void SetItalic(const FontItalic eItalic, const SwFontScript nWhich)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
void SetProportion(const sal_uInt8 nNewPropr)
void SetHighlightColor(const Color &aNewColor)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
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' ...
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
void SetOverline(const FontLineStyle eOverline)
const editeng::SvxBorderLine * GetBottom() const
tools::Long GetHeight() const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
void SetTopBorderDist(const sal_uInt16 nTopDist)
const SfxPoolItem * GetCurItem() const
bool m_bDetectedRangeSegmentation false
sal_uInt16 GetWidth() const
constexpr TypedWhichId< SvxContourItem > RES_CHRATR_CONTOUR(4)