GNOME Bugzilla – Bug 132017
unable to import applix with double underline font spec
Last modified: 2004-12-22 21:47:04 UTC
I have many applix spreadsheets, most are importing fine, but about 10% were failing. I tracked it done to a font spec 'double underline' in my applix files not being processing. The format was the letter 'D'. ex: Formula: 406 ('DN|B,I,TF1,P12|) A!A17: Total Assets ('C0|B,TF1,P12|) A!B17: (C0|B,D,TF1,P12,fg|) A!C17; 0 +C8+C10+C16 note: the ,D in the last line is the problem. to work around it I change the 'applix-read.c'(about line 1589) from:---------------------------------------------------------- /* Font spec */ for (++sep ; *sep && *sep != '|' && *sep != ')' ; ) { /* check for the 1 character modifiers */ switch (*sep) { case 'B' : mstyle_set_font_bold (style, TRUE); ++sep; break; case 'I' : mstyle_set_font_italic (style, TRUE); ++sep; break; case 'U' : mstyle_set_font_uline (style, TRUE); ++sep; break; case 'f' : if (sep[1] == 'g' ) { /* TODO : what is this ?? */ sep += 2; break; }; ....... to:---------------------------------------------------------------- for (++sep ; *sep && *sep != '|' && *sep != ')' ; ) { /* check for the 1 character modifiers */ switch (*sep) { case 'B' : mstyle_set_font_bold (style, TRUE); ++sep; break; case 'I' : mstyle_set_font_italic (style, TRUE); ++sep; break; case 'U' : mstyle_set_font_uline (style, TRUE); ++sep; break; case 'D' : ++sep; break; case 'f' : if (sep[1] == 'g' ) { /* TODO : what is this ?? */ sep += 2; break; }; ........... ------------------------------------------------------------------------ This change just skips this attribute. This enable me read the rest of my applix spread sheets. ps: I build a gnome desktop using garnome-0.27.1
Its simple enough to actually import the double underline. Heck your code highlights a bug in the importer we should not be passing TRUE to an enum. patched in both branches. Patch will be in 1.2.6. For now you can patch it yousel case 'U' : mstyle_set_font_uline (style, UNDERLINE_SINGLE); ++sep; break; case 'D' : mstyle_set_font_uline (style, UNDERLINE_DOUBLE); ++sep; break;