< prev index next >
src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 1055,1065 ****
// Calculate the bidi levels for the affected range of paragraphs. The
// levels array will contain a bidi level for each character in the
// affected text.
! byte levels[] = calculateBidiLevels( firstPStart, lastPEnd );
Vector<Element> newElements = new Vector<Element>();
// Calculate the first span of characters in the affected range with
--- 1055,1065 ----
// Calculate the bidi levels for the affected range of paragraphs. The
// levels array will contain a bidi level for each character in the
// affected text.
! byte[] levels = calculateBidiLevels( firstPStart, lastPEnd );
Vector<Element> newElements = new Vector<Element>();
// Calculate the first span of characters in the affected range with
*** 1183,1193 ****
/**
* Calculate the levels array for a range of paragraphs.
*/
private byte[] calculateBidiLevels( int firstPStart, int lastPEnd ) {
! byte levels[] = new byte[ lastPEnd - firstPStart ];
int levelsEnd = 0;
Boolean defaultDirection = null;
Object d = getProperty(TextAttribute.RUN_DIRECTION);
if (d instanceof Boolean) {
defaultDirection = (Boolean) d;
--- 1183,1193 ----
/**
* Calculate the levels array for a range of paragraphs.
*/
private byte[] calculateBidiLevels( int firstPStart, int lastPEnd ) {
! byte[] levels = new byte[ lastPEnd - firstPStart ];
int levelsEnd = 0;
Boolean defaultDirection = null;
Object d = getProperty(TextAttribute.RUN_DIRECTION);
if (d instanceof Boolean) {
defaultDirection = (Boolean) d;
< prev index next >