// centering, right-justification
if (attr.HasAlignment() && GetAttributes().GetAlignment() == wxTEXT_ALIGNMENT_CENTRE)
{
- pos.x = (rect.GetWidth() - size.x)/2 + pos.x;
+ pos.x = (rect.GetWidth() - (pos.x - rect.x) - size.x)/2 + pos.x;
line->SetPosition(pos);
}
else if (attr.HasAlignment() && GetAttributes().GetAlignment() == wxTEXT_ALIGNMENT_RIGHT)
{
- pos.x = pos.x + rect.GetWidth() - size.x;
+ pos.x = rect.x + rect.GetWidth() - size.x;
line->SetPosition(pos);
}
widthBefore = 0;
size_t i;
- for (i = (size_t) range.GetStart(); i < (size_t) range.GetEnd(); i++)
+ for (i = (size_t) range.GetStart(); i= < (size_t) range.GetEnd(); i++)
{
int widthFromStartOfThisRange = (*partialExtents)[i - GetRange().GetStart()] - widthBefore;
if (para->GetAttributes().HasBulletNumber())
attr.SetBulletNumber(para->GetAttributes().GetBulletNumber());
}
- }
+ }
if (!foundAttributes)
{