An error now appears if you try to convert from format A to format B but no

glyphs in format A appear.  In this case, it is likely that you meant to convert
a different file or do a different conversion.
This commit is contained in:
dchandler 2003-06-29 21:31:48 +00:00
parent ee14b7b97f
commit aedef4b44d
5 changed files with 105 additions and 33 deletions

View file

@ -1489,8 +1489,8 @@ public void paste(int offset) {
public void toWylie() {
int start = getSelectionStart();
int end = getSelectionEnd();
toWylie(start, end);
long n[] = new long[] { 0 };
toWylie(start, end, n);
}
/**
@ -1499,8 +1499,11 @@ public void paste(int offset) {
*
* @param start the point from which to begin converting to Wylie
* @param end the point at which to stop converting to Wylie
*/
public void toWylie(int start, int end) {
* @param numAttemptedReplacements an array that contains one element;
* this first element will be, upon exit, incremented by the number of
* TMW glyphs that we encountered and attempted to convert to Wylie */
public void toWylie(int start, int end,
long numAttemptedReplacements[]) {
if (start == end)
return;
@ -1529,6 +1532,7 @@ public void paste(int offset) {
} else {
char ch = getTibDoc().getText(i,1).charAt(0);
dcs.add(new DuffCode(fontNum, ch));
++numAttemptedReplacements[0];
}
i++;