Corrections to attribute manipulation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -392,6 +392,12 @@ bool wxTextAttr::EqPartial(const wxTextAttr& attr, bool weakTest) const
|
||||
if ((HasPageBreak() != attr.HasPageBreak()))
|
||||
return false;
|
||||
|
||||
if ((GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE) != (attr.GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE))
|
||||
return false;
|
||||
|
||||
if ((GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER) != (attr.GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER))
|
||||
return false;
|
||||
|
||||
if (HasTextEffects() && attr.HasTextEffects())
|
||||
{
|
||||
if (!BitlistsEqPartial(GetTextEffects(), attr.GetTextEffects(), GetTextEffectFlags()))
|
||||
@@ -705,6 +711,18 @@ bool wxTextAttr::Apply(const wxTextAttr& style, const wxTextAttr* compareWith)
|
||||
destStyle.SetPageBreak();
|
||||
}
|
||||
|
||||
if (style.GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE)
|
||||
{
|
||||
if (!(compareWith && (compareWith->GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE)))
|
||||
destStyle.SetFlags(destStyle.GetFlags()|wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE);
|
||||
}
|
||||
|
||||
if (style.GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER)
|
||||
{
|
||||
if (!(compareWith && (compareWith->GetFlags() & wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER)))
|
||||
destStyle.SetFlags(destStyle.GetFlags()|wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER);
|
||||
}
|
||||
|
||||
if (style.HasTextEffects())
|
||||
{
|
||||
if (!(compareWith && compareWith->HasTextEffects() && compareWith->GetTextEffects() == style.GetTextEffects()))
|
||||
|
||||
Reference in New Issue
Block a user