This patch fixes handling of the BR tag (the tailing part of the text
after the tag is no longer swallowed). It also improves work of the HR
tag a little bit, despite the HR in, in general, not yet working exactly
as it should.
2006-07-07 Audrius Meskauskas <[EMAIL PROTECTED]>
* javax/swing/text/FlowView.java (FlowStrategy.layoutRow):
Advance the offset also in the case of the enforced break.
Index: FlowView.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/text/FlowView.java,v
retrieving revision 1.11
diff -u -r1.11 FlowView.java
--- FlowView.java 25 Apr 2006 09:13:28 -0000 1.11
+++ FlowView.java 7 Jul 2006 13:22:30 -0000
@@ -198,11 +198,13 @@
int viewSpan = (int) view.getPreferredSpan(axis);
row.append(view);
int breakWeight = view.getBreakWeight(axis, x, span);
+
+ offset += (view.getEndOffset() - view.getStartOffset());
if (breakWeight >= View.ForcedBreakWeight)
- break;
+ break;
+
x += viewSpan;
span -= viewSpan;
- offset += (view.getEndOffset() - view.getStartOffset());
}
if (span < 0)
{