almost working but not quite
This commit is contained in:
parent
d45a58e1ba
commit
a2e8acca39
1 changed files with 12 additions and 9 deletions
|
@ -931,12 +931,7 @@ public void paste(int offset) {
|
||||||
try {
|
try {
|
||||||
Transferable contents = rtfBoard.getContents(this);
|
Transferable contents = rtfBoard.getContents(this);
|
||||||
|
|
||||||
if (!isRomanEnabled || !contents.isDataFlavorSupported(rtfFlavor)) {
|
if (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);
|
InputStream in = (InputStream)contents.getTransferData(rtfFlavor);
|
||||||
int p1 = offset;
|
int p1 = offset;
|
||||||
|
|
||||||
|
@ -959,10 +954,18 @@ public void paste(int offset) {
|
||||||
ThdlDebug.noteIffyCode();
|
ThdlDebug.noteIffyCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (contents.isDataFlavorSupported(DataFlavor.stringFlavor)) {
|
} else if (contents.isDataFlavorSupported(DataFlavor.stringFlavor))
|
||||||
|
{
|
||||||
|
if (!isRomanEnabled) {
|
||||||
|
String data = (String)contents.getTransferData(DataFlavor.stringFlavor);
|
||||||
|
toTibetanMachineWeb(data, offset);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
String s = (String)contents.getTransferData(DataFlavor.stringFlavor);
|
String s = (String)contents.getTransferData(DataFlavor.stringFlavor);
|
||||||
replaceSelection(s);
|
replaceSelection(s);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (UnsupportedFlavorException ufe) {
|
} catch (UnsupportedFlavorException ufe) {
|
||||||
ufe.printStackTrace();
|
ufe.printStackTrace();
|
||||||
ThdlDebug.noteIffyCode();
|
ThdlDebug.noteIffyCode();
|
||||||
|
|
Loading…
Reference in a new issue