almost working but not quite

This commit is contained in:
amontano 2002-10-25 17:59:27 +00:00
parent d45a58e1ba
commit a2e8acca39

View file

@ -931,12 +931,7 @@ public void paste(int offset) {
try {
Transferable contents = rtfBoard.getContents(this);
if (!isRomanEnabled || !contents.isDataFlavorSupported(rtfFlavor)) {
if (contents.isDataFlavorSupported(DataFlavor.stringFlavor)) {
String data = (String)contents.getTransferData(DataFlavor.stringFlavor);
doc.toTibetanMachineWeb(data, offset);
}
} else {
if (contents.isDataFlavorSupported(rtfFlavor)){
InputStream in = (InputStream)contents.getTransferData(rtfFlavor);
int p1 = offset;
@ -959,10 +954,18 @@ public void paste(int offset) {
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);
replaceSelection(s);
}
}
} catch (UnsupportedFlavorException ufe) {
ufe.printStackTrace();
ThdlDebug.noteIffyCode();