function TWPRTFEnginePaint.GetBlockAttr(
var DifferentSettings: TWPBlockAttribute;
IgnoredValue: Boolean = FALSE): Boolean;
var d: Integer; s: Single; sel: TWPSelectionContents;
begin
with Cursor do
begin
if not IsSelected then
Result := FALSE
else
begin
Result := TRUE;
if not SelectedTextAttr.GetStyles(DifferentSettings.UnionStyle) then
DifferentSettings.UnionStyle := [];
DifferentSettings.FontDiffers := not SelectedTextAttr.GetFont(d);
DifferentSettings.SizeDiffers := not SelectedTextAttr.GetFontSize(s);
DifferentSettings.ColorDiffers := not SelectedTextAttr.GetColorNr(d);
DifferentSettings.BKColorDiffers := not SelectedTextAttr.GetBGColorNr(d);
DifferentSettings.AlignDiffers := not SelectedTextAttr.AGet(
WPAT_Alignment, d);
DifferentSettings.IndentfirstDiffers := not SelectedTextAttr.AGet(
WPAT_IndentFirst, d);
DifferentSettings.IndentleftDiffers := not SelectedTextAttr.AGet(
WPAT_IndentLeft, d);
DifferentSettings.IndentrightDiffers := not SelectedTextAttr.AGet(
WPAT_IndentRight, d);
DifferentSettings.SpacebeforeDiffers := not SelectedTextAttr.AGet(
WPAT_SpaceBefore, d);
DifferentSettings.SpaceafterDiffers := not SelectedTextAttr.AGet(
WPAT_SpaceAfter, d);
DifferentSettings.SpacebetweenDiffers := not SelectedTextAttr.AGet(
WPAT_SpaceBetween, d);
DifferentSettings.ParcolorDiffers := not SelectedTextAttr.AGet(
WPAT_FGColor, d);
DifferentSettings.ParshadingDiffers := not SelectedTextAttr.AGet(
WPAT_ShadingValue, d);
DifferentSettings.ParstyleDiffers := not SelectedTextAttr.AGetBaseStyle(d);
DifferentSettings.ParIDDiffers := not SelectedTextAttr.AGet(
WPAT_ParID, d);
DifferentSettings.ParBorderDiffers := not SelectedTextAttr.AGet(
WPAT_BorderFlags, d);
sel := SelectionContents;
DifferentSettings.ParInTableDiffers :=
(wpSelStandardText in sel) and
(wpSelTableCells in sel);
Result := TRUE;
end;
end;
end; |