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 547183 - some XML elements depend on having the attributes sorted
some XML elements depend on having the attributes sorted
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-08-10 17:08 UTC by pataphor
Modified: 2008-08-11 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.69 KB, patch)
2008-08-10 17:17 UTC, Jean Bréfort
committed Details | Review

Description pataphor 2008-08-10 17:08:49 UTC
I was writing a python module that reads a gnumeric file and just writes it back again. I noticed that everything worked except the column width wasn't preserved. The python module changed the order in which XML attributes are written in the XML file. If I use a text editor to change this part of the XML file back, then it works again:

      <gnm:Cols DefaultSizePts="48">
        <gnm:ColInfo HardSize="1" No="0" Unit="114" />
        <gnm:ColInfo HardSize="1" No="1" Unit="394.5" />
        <gnm:ColInfo HardSize="1" No="2" Unit="73.5" />
        <gnm:ColInfo HardSize="1" No="3" Unit="51.75" />
        <gnm:ColInfo HardSize="1" No="4" Unit="31.5" />
        <gnm:ColInfo No="5" Unit="27.75" />
      </gnm:Cols>

was changed into:

       <gnm:Cols DefaultSizePts="48">
        <gnm:ColInfo No="0" Unit="114" HardSize="1"/>
        <gnm:ColInfo No="1" Unit="394.5" HardSize="1"/>
        <gnm:ColInfo No="2" Unit="73.5" HardSize="1"/>
        <gnm:ColInfo No="3" Unit="51.75" HardSize="1"/>
        <gnm:ColInfo No="4" Unit="31.5" HardSize="1"/>
        <gnm:ColInfo No="5" Unit="27.75"/>
      </gnm:Cols>

On irc this behavior was confirmed, it seems necessary that No comes first. The XML spec however says attributes do not need to be ordered.
Comment 1 Jean Bréfort 2008-08-10 17:17:33 UTC
Created attachment 116296 [details] [review]
proposed patch
Comment 2 Jean Bréfort 2008-08-11 11:12:16 UTC
Both branches. Fixed.