- while (line != cell) {
- line -> SetPos(line -> GetPosX() + xdelta, ypos + line -> GetPosY());
- line = line -> GetNext();
+
+ if (m_AlignHor != wxHTML_ALIGN_JUSTIFY || cell == NULL)
+ while (line != cell) {
+ line -> SetPos(line -> GetPosX() + xdelta,
+ ypos + line -> GetPosY());
+ line = line -> GetNext();
+ }
+ else
+ {
+ int counter = 0;
+ int step = (s_width - xpos);
+ if (step < 0) step = 0;
+ while (line != cell) {
+ line -> SetPos(line -> GetPosX() + s_indent +
+ (counter++ * step / xcnt),
+ ypos + line -> GetPosY());
+ line = line -> GetNext();
+ }