-/*!
- * wxRichTextAttr stores attributes without a wxFont object, so is a much more
- * efficient way to query styles.
- */
-
-// ctors
-wxRichTextAttr::wxRichTextAttr(const wxColour& colText,
- const wxColour& colBack,
- wxTextAttrAlignment alignment): m_textAlignment(alignment), m_colText(colText), m_colBack(colBack)
-{
- Init();
-
- if (m_colText.Ok()) m_flags |= wxTEXT_ATTR_TEXT_COLOUR;
- if (m_colBack.Ok()) m_flags |= wxTEXT_ATTR_BACKGROUND_COLOUR;
- if (alignment != wxTEXT_ALIGNMENT_DEFAULT)
- m_flags |= wxTEXT_ATTR_ALIGNMENT;
-}
-
-wxRichTextAttr::wxRichTextAttr(const wxTextAttrEx& attr)
-{
- Init();
-
- (*this) = attr;
-}
-
-wxRichTextAttr::wxRichTextAttr(const wxRichTextAttr& attr)
-{
- Copy(attr);
-}
-
-// operations
-void wxRichTextAttr::Init()
-{
- m_textAlignment = wxTEXT_ALIGNMENT_DEFAULT;
- m_flags = 0;
- m_leftIndent = 0;
- m_leftSubIndent = 0;
- m_rightIndent = 0;
-
- m_fontSize = 12;
- m_fontStyle = wxNORMAL;
- m_fontWeight = wxNORMAL;
- m_fontUnderlined = false;
-
- m_paragraphSpacingAfter = 0;
- m_paragraphSpacingBefore = 0;
- m_lineSpacing = 0;
- m_bulletStyle = wxTEXT_ATTR_BULLET_STYLE_NONE;
- m_textEffects = wxTEXT_ATTR_EFFECT_NONE;
- m_textEffectFlags = wxTEXT_ATTR_EFFECT_NONE;
- m_outlineLevel = 0;
- m_bulletNumber = 0;
-}
-
-// Copy
-void wxRichTextAttr::Copy(const wxRichTextAttr& attr)
-{
- m_colText = attr.m_colText;
- m_colBack = attr.m_colBack;
- m_textAlignment = attr.m_textAlignment;
- m_leftIndent = attr.m_leftIndent;
- m_leftSubIndent = attr.m_leftSubIndent;
- m_rightIndent = attr.m_rightIndent;
- m_tabs = attr.m_tabs;
- m_flags = attr.m_flags;
-
- m_fontSize = attr.m_fontSize;
- m_fontStyle = attr.m_fontStyle;
- m_fontWeight = attr.m_fontWeight;
- m_fontUnderlined = attr.m_fontUnderlined;
- m_fontFaceName = attr.m_fontFaceName;
- m_textEffects = attr.m_textEffects;
- m_textEffectFlags = attr.m_textEffectFlags;
-
- m_paragraphSpacingAfter = attr.m_paragraphSpacingAfter;
- m_paragraphSpacingBefore = attr.m_paragraphSpacingBefore;
- m_lineSpacing = attr.m_lineSpacing;
- m_characterStyleName = attr.m_characterStyleName;
- m_paragraphStyleName = attr.m_paragraphStyleName;
- m_listStyleName = attr.m_listStyleName;
- m_bulletStyle = attr.m_bulletStyle;
- m_bulletNumber = attr.m_bulletNumber;
- m_bulletText = attr.m_bulletText;
- m_bulletFont = attr.m_bulletFont;
- m_bulletName = attr.m_bulletName;
- m_outlineLevel = attr.m_outlineLevel;
-
- m_urlTarget = attr.m_urlTarget;
-}
-
-// operators
-void wxRichTextAttr::operator= (const wxRichTextAttr& attr)
-{
- Copy(attr);
-}
-
-// operators
-void wxRichTextAttr::operator= (const wxTextAttrEx& attr)
-{
- m_flags = attr.GetFlags();
-
- m_colText = attr.GetTextColour();
- m_colBack = attr.GetBackgroundColour();
- m_textAlignment = attr.GetAlignment();
- m_leftIndent = attr.GetLeftIndent();
- m_leftSubIndent = attr.GetLeftSubIndent();
- m_rightIndent = attr.GetRightIndent();
- m_tabs = attr.GetTabs();
- m_textEffects = attr.GetTextEffects();
- m_textEffectFlags = attr.GetTextEffectFlags();
-
- m_paragraphSpacingAfter = attr.GetParagraphSpacingAfter();
- m_paragraphSpacingBefore = attr.GetParagraphSpacingBefore();
- m_lineSpacing = attr.GetLineSpacing();
- m_characterStyleName = attr.GetCharacterStyleName();
- m_paragraphStyleName = attr.GetParagraphStyleName();
- m_listStyleName = attr.GetListStyleName();
- m_bulletStyle = attr.GetBulletStyle();
- m_bulletNumber = attr.GetBulletNumber();
- m_bulletText = attr.GetBulletText();
- m_bulletName = attr.GetBulletName();
- m_bulletFont = attr.GetBulletFont();
- m_outlineLevel = attr.GetOutlineLevel();
-
- m_urlTarget = attr.GetURL();
-
- if (attr.GetFont().Ok())
- GetFontAttributes(attr.GetFont());
-}
-
-// Making a wxTextAttrEx object.
-wxRichTextAttr::operator wxTextAttrEx () const
-{
- wxTextAttrEx attr;
- attr.SetTextColour(GetTextColour());
- attr.SetBackgroundColour(GetBackgroundColour());
- attr.SetAlignment(GetAlignment());
- attr.SetTabs(GetTabs());
- attr.SetLeftIndent(GetLeftIndent(), GetLeftSubIndent());
- attr.SetRightIndent(GetRightIndent());
- attr.SetFont(CreateFont());
-
- attr.SetParagraphSpacingAfter(m_paragraphSpacingAfter);
- attr.SetParagraphSpacingBefore(m_paragraphSpacingBefore);
- attr.SetLineSpacing(m_lineSpacing);
- attr.SetBulletStyle(m_bulletStyle);
- attr.SetBulletNumber(m_bulletNumber);
- attr.SetBulletText(m_bulletText);
- attr.SetBulletName(m_bulletName);
- attr.SetBulletFont(m_bulletFont);
- attr.SetCharacterStyleName(m_characterStyleName);
- attr.SetParagraphStyleName(m_paragraphStyleName);
- attr.SetListStyleName(m_listStyleName);
- attr.SetTextEffects(m_textEffects);
- attr.SetTextEffectFlags(m_textEffectFlags);
- attr.SetOutlineLevel(m_outlineLevel);
-
- attr.SetURL(m_urlTarget);
-
- attr.SetFlags(GetFlags()); // Important: set after SetFont and others, since they set flags
- return attr;
-}
-
-// Equality test
-bool wxRichTextAttr::operator== (const wxRichTextAttr& attr) const
-{
- return GetFlags() == attr.GetFlags() &&
-
- GetTextColour() == attr.GetTextColour() &&
- GetBackgroundColour() == attr.GetBackgroundColour() &&
-
- GetAlignment() == attr.GetAlignment() &&
- GetLeftIndent() == attr.GetLeftIndent() &&
- GetLeftSubIndent() == attr.GetLeftSubIndent() &&
- GetRightIndent() == attr.GetRightIndent() &&
- wxRichTextTabsEq(GetTabs(), attr.GetTabs()) &&
-
- GetParagraphSpacingAfter() == attr.GetParagraphSpacingAfter() &&
- GetParagraphSpacingBefore() == attr.GetParagraphSpacingBefore() &&
- GetLineSpacing() == attr.GetLineSpacing() &&
- GetCharacterStyleName() == attr.GetCharacterStyleName() &&
- GetParagraphStyleName() == attr.GetParagraphStyleName() &&
- GetListStyleName() == attr.GetListStyleName() &&
-
- GetBulletStyle() == attr.GetBulletStyle() &&
- GetBulletText() == attr.GetBulletText() &&
- GetBulletNumber() == attr.GetBulletNumber() &&
- GetBulletFont() == attr.GetBulletFont() &&
- GetBulletName() == attr.GetBulletName() &&
-
- GetTextEffects() == attr.GetTextEffects() &&
- GetTextEffectFlags() == attr.GetTextEffectFlags() &&
-
- GetOutlineLevel() == attr.GetOutlineLevel() &&
-
- GetFontSize() == attr.GetFontSize() &&
- GetFontStyle() == attr.GetFontStyle() &&
- GetFontWeight() == attr.GetFontWeight() &&
- GetFontUnderlined() == attr.GetFontUnderlined() &&
- GetFontFaceName() == attr.GetFontFaceName() &&
-
- GetURL() == attr.GetURL();
-}
-
-// Create font from font attributes.
-wxFont wxRichTextAttr::CreateFont() const
-{
- wxFont font(m_fontSize, wxDEFAULT, m_fontStyle, m_fontWeight, m_fontUnderlined, m_fontFaceName);
-#ifdef __WXMAC__
- font.SetNoAntiAliasing(true);
-#endif
- return font;
-}
-
-// Get attributes from font.
-bool wxRichTextAttr::GetFontAttributes(const wxFont& font)
-{
- if (!font.Ok())
- return false;
-
- m_fontSize = font.GetPointSize();
- m_fontStyle = font.GetStyle();
- m_fontWeight = font.GetWeight();
- m_fontUnderlined = font.GetUnderlined();
- m_fontFaceName = font.GetFaceName();
-
- return true;
-}
-
-wxRichTextAttr wxRichTextAttr::Combine(const wxRichTextAttr& style, const wxRichTextAttr* compareWith) const
-{
- wxRichTextAttr destStyle = (*this);
- destStyle.Apply(style, compareWith);
-
- return destStyle;
-}
-
-bool wxRichTextAttr::Apply(const wxRichTextAttr& style, const wxRichTextAttr* compareWith)
-{
- wxRichTextAttr& destStyle = (*this);
-
- if (style.HasFontWeight())
- {
- if (!(compareWith && compareWith->HasFontWeight() && compareWith->GetFontWeight() == style.GetFontWeight()))
- destStyle.SetFontWeight(style.GetFontWeight());
- }
-
- if (style.HasFontSize())
- {
- if (!(compareWith && compareWith->HasFontSize() && compareWith->GetFontSize() == style.GetFontSize()))
- destStyle.SetFontSize(style.GetFontSize());
- }
-
- if (style.HasFontItalic())
- {
- if (!(compareWith && compareWith->HasFontItalic() && compareWith->GetFontStyle() == style.GetFontStyle()))
- destStyle.SetFontStyle(style.GetFontStyle());
- }
-
- if (style.HasFontUnderlined())
- {
- if (!(compareWith && compareWith->HasFontUnderlined() && compareWith->GetFontUnderlined() == style.GetFontUnderlined()))
- destStyle.SetFontUnderlined(style.GetFontUnderlined());
- }
-
- if (style.HasFontFaceName())
- {
- if (!(compareWith && compareWith->HasFontFaceName() && compareWith->GetFontFaceName() == style.GetFontFaceName()))
- destStyle.SetFontFaceName(style.GetFontFaceName());
- }
-
- if (style.GetTextColour().Ok() && style.HasTextColour())
- {
- if (!(compareWith && compareWith->HasTextColour() && compareWith->GetTextColour() == style.GetTextColour()))
- destStyle.SetTextColour(style.GetTextColour());
- }
-
- if (style.GetBackgroundColour().Ok() && style.HasBackgroundColour())
- {
- if (!(compareWith && compareWith->HasBackgroundColour() && compareWith->GetBackgroundColour() == style.GetBackgroundColour()))
- destStyle.SetBackgroundColour(style.GetBackgroundColour());
- }
-
- if (style.HasAlignment())
- {
- if (!(compareWith && compareWith->HasAlignment() && compareWith->GetAlignment() == style.GetAlignment()))
- destStyle.SetAlignment(style.GetAlignment());
- }
-
- if (style.HasTabs())
- {
- if (!(compareWith && compareWith->HasTabs() && wxRichTextTabsEq(compareWith->GetTabs(), style.GetTabs())))
- destStyle.SetTabs(style.GetTabs());
- }
-
- if (style.HasLeftIndent())
- {
- if (!(compareWith && compareWith->HasLeftIndent() && compareWith->GetLeftIndent() == style.GetLeftIndent()
- && compareWith->GetLeftSubIndent() == style.GetLeftSubIndent()))
- destStyle.SetLeftIndent(style.GetLeftIndent(), style.GetLeftSubIndent());
- }
-
- if (style.HasRightIndent())
- {
- if (!(compareWith && compareWith->HasRightIndent() && compareWith->GetRightIndent() == style.GetRightIndent()))
- destStyle.SetRightIndent(style.GetRightIndent());
- }
-
- if (style.HasParagraphSpacingAfter())
- {
- if (!(compareWith && compareWith->HasParagraphSpacingAfter() && compareWith->GetParagraphSpacingAfter() == style.GetParagraphSpacingAfter()))
- destStyle.SetParagraphSpacingAfter(style.GetParagraphSpacingAfter());
- }
-
- if (style.HasParagraphSpacingBefore())
- {
- if (!(compareWith && compareWith->HasParagraphSpacingBefore() && compareWith->GetParagraphSpacingBefore() == style.GetParagraphSpacingBefore()))
- destStyle.SetParagraphSpacingBefore(style.GetParagraphSpacingBefore());
- }
-
- if (style.HasLineSpacing())
- {
- if (!(compareWith && compareWith->HasLineSpacing() && compareWith->GetLineSpacing() == style.GetLineSpacing()))
- destStyle.SetLineSpacing(style.GetLineSpacing());
- }
-
- if (style.HasCharacterStyleName())
- {
- if (!(compareWith && compareWith->HasCharacterStyleName() && compareWith->GetCharacterStyleName() == style.GetCharacterStyleName()))
- destStyle.SetCharacterStyleName(style.GetCharacterStyleName());
- }
-
- if (style.HasParagraphStyleName())
- {
- if (!(compareWith && compareWith->HasParagraphStyleName() && compareWith->GetParagraphStyleName() == style.GetParagraphStyleName()))
- destStyle.SetParagraphStyleName(style.GetParagraphStyleName());
- }
-
- if (style.HasListStyleName())
- {
- if (!(compareWith && compareWith->HasListStyleName() && compareWith->GetListStyleName() == style.GetListStyleName()))
- destStyle.SetListStyleName(style.GetListStyleName());
- }
-
- if (style.HasBulletStyle())
- {
- if (!(compareWith && compareWith->HasBulletStyle() && compareWith->GetBulletStyle() == style.GetBulletStyle()))
- destStyle.SetBulletStyle(style.GetBulletStyle());
- }
-
- if (style.HasBulletText())
- {
- if (!(compareWith && compareWith->HasBulletText() && compareWith->GetBulletText() == style.GetBulletText()))
- {
- destStyle.SetBulletText(style.GetBulletText());
- destStyle.SetBulletFont(style.GetBulletFont());
- }
- }
-
- if (style.HasBulletNumber())
- {
- if (!(compareWith && compareWith->HasBulletNumber() && compareWith->GetBulletNumber() == style.GetBulletNumber()))
- destStyle.SetBulletNumber(style.GetBulletNumber());
- }
-
- if (style.HasBulletName())
- {
- if (!(compareWith && compareWith->HasBulletName() && compareWith->GetBulletName() == style.GetBulletName()))
- destStyle.SetBulletName(style.GetBulletName());
- }
-
- if (style.HasURL())
- {
- if (!(compareWith && compareWith->HasURL() && compareWith->GetURL() == style.GetURL()))
- destStyle.SetURL(style.GetURL());
- }
-
- if (style.HasPageBreak())
- {
- if (!(compareWith && compareWith->HasPageBreak()))
- destStyle.SetPageBreak();
- }
-
- if (style.HasTextEffects())
- {
- if (!(compareWith && compareWith->HasTextEffects() && compareWith->GetTextEffects() == style.GetTextEffects()))
- {
- int destBits = destStyle.GetTextEffects();
- int destFlags = destStyle.GetTextEffectFlags();
-
- int srcBits = style.GetTextEffects();
- int srcFlags = style.GetTextEffectFlags();
-
- wxRichTextCombineBitlists(destBits, srcBits, destFlags, srcFlags);
-
- destStyle.SetTextEffects(destBits);
- destStyle.SetTextEffectFlags(destFlags);
- }
- }
-
- if (style.HasOutlineLevel())
- {
- if (!(compareWith && compareWith->HasOutlineLevel() && compareWith->GetOutlineLevel() == style.GetOutlineLevel()))
- destStyle.SetOutlineLevel(style.GetOutlineLevel());
- }
-
- return true;
-}
-
-/*!
- * wxTextAttrEx is an extended version of wxTextAttr with more paragraph attributes.
- */
-
-wxTextAttrEx::wxTextAttrEx(const wxTextAttrEx& attr): wxTextAttr()
-{
- Copy(attr);
-}
-
-// Initialise this object.
-void wxTextAttrEx::Init()
-{
- m_paragraphSpacingAfter = 0;
- m_paragraphSpacingBefore = 0;
- m_lineSpacing = 0;
- m_bulletStyle = wxTEXT_ATTR_BULLET_STYLE_NONE;
- m_textEffects = wxTEXT_ATTR_EFFECT_NONE;
- m_textEffectFlags = wxTEXT_ATTR_EFFECT_NONE;
- m_bulletNumber = 0;
- m_outlineLevel = 0;
-}
-
-// Copy
-void wxTextAttrEx::Copy(const wxTextAttrEx& attr)
-{
- wxTextAttr::operator= (attr);
-
- m_paragraphSpacingAfter = attr.m_paragraphSpacingAfter;
- m_paragraphSpacingBefore = attr.m_paragraphSpacingBefore;
- m_lineSpacing = attr.m_lineSpacing;
- m_characterStyleName = attr.m_characterStyleName;
- m_paragraphStyleName = attr.m_paragraphStyleName;
- m_listStyleName = attr.m_listStyleName;
- m_bulletStyle = attr.m_bulletStyle;
- m_bulletNumber = attr.m_bulletNumber;
- m_bulletText = attr.m_bulletText;
- m_bulletFont = attr.m_bulletFont;
- m_bulletName = attr.m_bulletName;
- m_urlTarget = attr.m_urlTarget;
- m_textEffects = attr.m_textEffects;
- m_textEffectFlags = attr.m_textEffectFlags;
- m_outlineLevel = attr.m_outlineLevel;
-}
-
-// Assignment from a wxTextAttrEx object
-void wxTextAttrEx::operator= (const wxTextAttrEx& attr)
-{
- Copy(attr);
-}
-
-// Assignment from a wxTextAttr object.
-void wxTextAttrEx::operator= (const wxTextAttr& attr)
-{
- wxTextAttr::operator= (attr);
-}
-
-// Equality test
-bool wxTextAttrEx::operator== (const wxTextAttrEx& attr) const
-{
- return (
- GetFlags() == attr.GetFlags() &&
- GetTextColour() == attr.GetTextColour() &&
- GetBackgroundColour() == attr.GetBackgroundColour() &&
- GetFont() == attr.GetFont() &&
- GetTextEffects() == attr.GetTextEffects() &&
- GetTextEffectFlags() == attr.GetTextEffectFlags() &&
- GetAlignment() == attr.GetAlignment() &&
- GetLeftIndent() == attr.GetLeftIndent() &&
- GetRightIndent() == attr.GetRightIndent() &&
- GetLeftSubIndent() == attr.GetLeftSubIndent() &&
- wxRichTextTabsEq(GetTabs(), attr.GetTabs()) &&
- GetLineSpacing() == attr.GetLineSpacing() &&
- GetParagraphSpacingAfter() == attr.GetParagraphSpacingAfter() &&
- GetParagraphSpacingBefore() == attr.GetParagraphSpacingBefore() &&
- GetBulletStyle() == attr.GetBulletStyle() &&
- GetBulletNumber() == attr.GetBulletNumber() &&
- GetBulletText() == attr.GetBulletText() &&
- GetBulletName() == attr.GetBulletName() &&
- GetBulletFont() == attr.GetBulletFont() &&
- GetCharacterStyleName() == attr.GetCharacterStyleName() &&
- GetParagraphStyleName() == attr.GetParagraphStyleName() &&
- GetListStyleName() == attr.GetListStyleName() &&
- GetOutlineLevel() == attr.GetOutlineLevel() &&
- GetURL() == attr.GetURL());
-}
-
-wxTextAttrEx wxTextAttrEx::CombineEx(const wxTextAttrEx& attr,
- const wxTextAttrEx& attrDef,
- const wxTextCtrlBase *text)
-{
- wxTextAttrEx newAttr;
-
- // If attr specifies the complete font, just use that font, overriding all
- // default font attributes.
- if ((attr.GetFlags() & wxTEXT_ATTR_FONT) == wxTEXT_ATTR_FONT)
- newAttr.SetFont(attr.GetFont());
- else
- {
- // First find the basic, default font
- long flags = 0;
-
- wxFont font;
- if (attrDef.HasFont())
- {
- flags = (attrDef.GetFlags() & wxTEXT_ATTR_FONT);
- font = attrDef.GetFont();
- }
- else
- {
- if (text)
- font = text->GetFont();
-
- // We leave flags at 0 because no font attributes have been specified yet
- }
- if (!font.Ok())
- font = *wxNORMAL_FONT;
-
- // Otherwise, if there are font attributes in attr, apply them
- if (attr.GetFlags() & wxTEXT_ATTR_FONT)
- {
- if (attr.HasFontSize())
- {
- flags |= wxTEXT_ATTR_FONT_SIZE;
- font.SetPointSize(attr.GetFont().GetPointSize());
- }
- if (attr.HasFontItalic())
- {
- flags |= wxTEXT_ATTR_FONT_ITALIC;;
- font.SetStyle(attr.GetFont().GetStyle());
- }
- if (attr.HasFontWeight())
- {
- flags |= wxTEXT_ATTR_FONT_WEIGHT;
- font.SetWeight(attr.GetFont().GetWeight());
- }
- if (attr.HasFontFaceName())
- {
- flags |= wxTEXT_ATTR_FONT_FACE;
- font.SetFaceName(attr.GetFont().GetFaceName());
- }
- if (attr.HasFontUnderlined())
- {
- flags |= wxTEXT_ATTR_FONT_UNDERLINE;
- font.SetUnderlined(attr.GetFont().GetUnderlined());
- }
- newAttr.SetFont(font);
- newAttr.SetFlags(newAttr.GetFlags()|flags);
- }
- }
-
- // TODO: should really check we are specifying these in the flags,
- // before setting them, as per above; or we will set them willy-nilly.
- // However, we should also check whether this is the intention
- // as per wxTextAttr::Combine, i.e. always to have valid colours
- // in the style.
- wxColour colFg = attr.GetTextColour();
- if ( !colFg.Ok() )
- {
- colFg = attrDef.GetTextColour();
-
- if ( text && !colFg.Ok() )
- colFg = text->GetForegroundColour();
- }
-
- wxColour colBg = attr.GetBackgroundColour();
- if ( !colBg.Ok() )
- {
- colBg = attrDef.GetBackgroundColour();
-
- if ( text && !colBg.Ok() )
- colBg = text->GetBackgroundColour();
- }
-
- newAttr.SetTextColour(colFg);
- newAttr.SetBackgroundColour(colBg);
-
- if (attr.HasAlignment())
- newAttr.SetAlignment(attr.GetAlignment());
- else if (attrDef.HasAlignment())
- newAttr.SetAlignment(attrDef.GetAlignment());
-
- if (attr.HasTabs())
- newAttr.SetTabs(attr.GetTabs());
- else if (attrDef.HasTabs())
- newAttr.SetTabs(attrDef.GetTabs());
-
- if (attr.HasLeftIndent())
- newAttr.SetLeftIndent(attr.GetLeftIndent(), attr.GetLeftSubIndent());
- else if (attrDef.HasLeftIndent())
- newAttr.SetLeftIndent(attrDef.GetLeftIndent(), attr.GetLeftSubIndent());
-
- if (attr.HasRightIndent())
- newAttr.SetRightIndent(attr.GetRightIndent());
- else if (attrDef.HasRightIndent())
- newAttr.SetRightIndent(attrDef.GetRightIndent());
-
- // NEW ATTRIBUTES
-
- if (attr.HasParagraphSpacingAfter())
- newAttr.SetParagraphSpacingAfter(attr.GetParagraphSpacingAfter());
-
- if (attr.HasParagraphSpacingBefore())
- newAttr.SetParagraphSpacingBefore(attr.GetParagraphSpacingBefore());
-
- if (attr.HasLineSpacing())
- newAttr.SetLineSpacing(attr.GetLineSpacing());
-
- if (attr.HasCharacterStyleName())
- newAttr.SetCharacterStyleName(attr.GetCharacterStyleName());
-
- if (attr.HasParagraphStyleName())
- newAttr.SetParagraphStyleName(attr.GetParagraphStyleName());
-
- if (attr.HasListStyleName())
- newAttr.SetListStyleName(attr.GetListStyleName());
-
- if (attr.HasBulletStyle())
- newAttr.SetBulletStyle(attr.GetBulletStyle());
-
- if (attr.HasBulletNumber())
- newAttr.SetBulletNumber(attr.GetBulletNumber());
-
- if (attr.HasBulletName())
- newAttr.SetBulletName(attr.GetBulletName());
-
- if (attr.HasBulletText())
- {
- newAttr.SetBulletText(attr.GetBulletText());
- newAttr.SetBulletFont(attr.GetBulletFont());
- }
-
- if (attr.HasURL())
- newAttr.SetURL(attr.GetURL());
-
- if (attr.HasTextEffects())
- {
- newAttr.SetTextEffects(attr.GetTextEffects());
- newAttr.SetTextEffectFlags(attr.GetTextEffectFlags());
- }
-
- if (attr.HasOutlineLevel())
- newAttr.SetOutlineLevel(attr.GetOutlineLevel());
-
- return newAttr;
-}
-
-