After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 132017 - unable to import applix with double underline font spec
unable to import applix with double underline font spec
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export Applix
1.1.x
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-01-20 18:54 UTC by thad
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description thad 2004-01-20 18:54:51 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
Comment 1 Jody Goldberg 2004-01-20 19:18:09 UTC
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;