View Single Post
Old 03-11-2009, 08:53 AM   #143
tlc
Zealot
tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!tlc is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 142
Karma: 50288
Join Date: Feb 2009
Device: KK 3G, iPad
I did some debugging last night. Line 108 in StyleItem.java:

Code:
return new StyleItem("color","#"+Integer.toHexString(t.getValueAt(0)).substring(2));
getValueAt returns 0; toHexString returns "0"; substring throws an exception. I changed it to check for length < 2 before doing substring and the conversion completed, but I don't know if 0 valid and this is the right fix.


Also, when I tried to convert to RTF, I got other errors, which I fixed by changing Book#getRTF to guard against null author & title like it already did for null bookID and the conversion completed.

Code:
                if (getAuth() != null)
                        doc.addAuthor(getAuth());
                if (getTitle() != null)
                        doc.addTitle(getTitle());
                if(getBookID()!=null)
                        doc.addHeader("BookID", getBookID());
tlc is offline   Reply With Quote