* Bug #12790 fixed - Links to zcos files in doc were broken.
-* Bug #12808 fixed - Add missing </td> in doc generation (note, warning, ...).
\ No newline at end of file
+* Bug #12808 fixed - Add missing </td> in doc generation (note, warning, ...).
+
+* Bug #12816 fixed - Numbers pasted in editvar were not parsed according to locale.
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.IOException;
+import java.text.NumberFormat;
+import java.text.ParsePosition;
import java.util.StringTokenizer;
import java.util.Vector;
JTable table = editor.getCurrentTable();
int col = table.getSelectedColumn();
int row = table.getSelectedRow();
+
+ if (col == -1) {
+ col = 0;
+ }
+
+ if (row == -1) {
+ row = 0;
+ }
+
table.setColumnSelectionInterval(col, col);
table.setRowSelectionInterval(row, row);
String str = "";
} catch (IOException ex2) {
System.err.println(ex2);
}
+
StringTokenizer rElems = new StringTokenizer(str, "\n");
int countRows = rElems.countTokens();
Vector vr = new Vector(countRows);
+ NumberFormat format = NumberFormat.getInstance();
+ ParsePosition position = new ParsePosition(0);
+ format.setParseIntegerOnly(false);
for (int i = 0; i < countRows; i++) {
StringTokenizer cElems = new StringTokenizer(rElems.nextToken(), "\t");
int countCols = cElems.countTokens();
Vector vc = new Vector(countCols);
for (int j = 0; j < countCols; j++) {
- vc.addElement(cElems.nextToken());
+ String ss = cElems.nextToken();
+ Number x = format.parse(ss, position);
+ if (position.getIndex() == ss.length()) {
+ vc.addElement(x.toString());
+ } else {
+ vc.addElement(ss);
+ }
+ position.setIndex(0);
}
vr.addElement(vc);
}