https://bz.apache.org/ooo/show_bug.cgi?id=117415

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #10 from [email protected] ---
There seems to be a critical misunderstanding between the original poster and
the AOO person examining it.

Re-title: .doc version tag does not comply with binary format specification.

I am testing on AOO 4.1.1 on a Windows7 machine. I also have Word 2010
installed and am using it for comparisons. My comments on using Visual Studio
for data examination are based on VS2010 Professional.

The problem is this: When AOO saves a file in .doc format, it sets the version
number of the file format to a value that is different from the specification.
The specification, [MS-DOC] Word (.doc) Binary File Format, can be found at 
https://msdn.microsoft.com/en-us/library/cc313153.aspx. (same link as original
post.) Open or download this file for reference. Using this link instead of
attaching a copy will keep the reference to the latest version.

The specification says that the value of the file format version, referred to
as FibBase.nFib “should” be 0x00C1. This definition can be found at the bottom
of page 52, in section 2.5.2 FibBase. The “should” text links to an addendum,
which explains conditions under which the value could be 0x00C0 or 0x00C2.

When AOO saves a file in .doc format it sets this version value to 0x1010,
which is contrary to the specification.

Steps to see the issue:

1. Open AOO Writer.
2. Create an empty file.
3. Save as .doc:
    a. Click File: Save As...
    b. Under Save As Type select Microsoft Word 97/2000/XP (.doc) (*.doc)
    c. Enter a name and click Save.
4. Close the file. (see attachment HelloWord2.doc)

At this point you will need to open the saved file in a binary editor. One
option is Visual Studio. It's also possible to use Beyond Compare 3, by
comparing the file to any other short file and selecting a hex comparison.

Visual Studio:
1. Open Visual Studio.
2. Click File: Open: File...
3. Navigate to and select the document.
4. Click the pulldown arrow on the Open button and select Open With...
5. In the Open With dialog select Binary Editor and click OK.
6. In the file search for A5EC. The binary format is little-endian so the
result will look like “EC A5”.
7. The next two bytes are the nFib. They will be 0101. (see attchment
AOOnFib.jpg)
8. Repeat this step with a short file created in Word, or the attached
WordDoc.doc. The nFib will be 0x00C1 (appearing as C1 00) as in the
specification. (see attachment WordnFib.jpg)

As noted in the original report, this does not appear to cause any problems
when opening the files in either Word or AOO Writer. However, it is a deviation
from the specification. It is possible that for other purposes this deviation
may cause problems. The linked definition for “should” in the spec is:

    SHOULD   This word, or the adjective "RECOMMENDED", mean that there
    may exist valid reasons in particular circumstances to ignore a
    particular item, but the full implications must be understood and
    carefully weighed before choosing a different course.

If there is a known valid reason for the deviation, then perhaps this bug
report should be closed with a note of such reason.

-- 
You are receiving this mail because:
You are on the CC list for the issue.

Reply via email to