To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=62537
                  Issue #:|62537
                  Summary:|some horror in tools/source/stream.cxx
                          |operator>>(long
                Component:|utilities
                  Version:|OOo 2.0.2
                 Platform:|Opteron/x86_64
                      URL:|
               OS/Version:|All
                   Status:|NEW
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|code
              Assigned to:|sb
              Reported by:|cmc





------- Additional comments from [EMAIL PROTECTED] Fri Feb 24 07:35:54 -0800 
2006 -------
All the way back since rev 1.1 there's been a timebomb in
tools/source/stream/stream.cxx. 

The streaming operator>>(long 
has an #ifdef for a LONG isn't 4 bytes case, presumably for a long is 2 bytes
archaic scenario, and there's a set of brokenness.

SwapInt and SwapUInt assume that an int is 2bytes, they have to go :-), it makes
no sense to SWAPSHORT an int on any sizeof(int) > 2 system

Regardless of that it makes no sense to use READNUMBER_WITHOUT_SWAP(long,tmp)
for reading and WRITENUMBER_WITHOUT_SWAP(int,tmp) for writing as sizeof(long) !=
sizeof(int)

The following patch make reading and writing "long" consistent. I doubt there
should be any streaming operators for raw int/long at all as undoubtedly there
are files intended to be cross platform which have "longs" streamed to them but
that's a different argument.

pjanik/kendy: this is why StarWriterTeam + F3 save and reload misses its graphic

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to