Changed paste so that if (isRomanEnabled = false),
it will assume the text is Wylie and convert it to Tibetan.
This commit is contained in:
parent
d211930e68
commit
d45a58e1ba
1 changed files with 8 additions and 1 deletions
|
@ -930,7 +930,13 @@ public void paste(int offset) {
|
|||
return;
|
||||
try {
|
||||
Transferable contents = rtfBoard.getContents(this);
|
||||
if (contents.isDataFlavorSupported(rtfFlavor)) {
|
||||
|
||||
if (!isRomanEnabled || !contents.isDataFlavorSupported(rtfFlavor)) {
|
||||
if (contents.isDataFlavorSupported(DataFlavor.stringFlavor)) {
|
||||
String data = (String)contents.getTransferData(DataFlavor.stringFlavor);
|
||||
doc.toTibetanMachineWeb(data, offset);
|
||||
}
|
||||
} else {
|
||||
InputStream in = (InputStream)contents.getTransferData(rtfFlavor);
|
||||
int p1 = offset;
|
||||
|
||||
|
@ -942,6 +948,7 @@ public void paste(int offset) {
|
|||
ThdlDebug.verify(null != in);
|
||||
|
||||
rtfEd.read(in, sd, 0);
|
||||
|
||||
for (int i=0; i<sd.getLength()-1; i++) { //getLength()-1 so that final newline is not included in paste
|
||||
try {
|
||||
String s = sd.getText(i,1);
|
||||
|
|
Loading…
Reference in a new issue