joniles / mpxj

Primary repository for MPXJ library
http://www.mpxj.org/
GNU Lesser General Public License v2.1
245 stars 101 forks source link

MPP8Reader read task notes issue #94

Closed luoyunfeng2016 closed 5 years ago

luoyunfeng2016 commented 5 years ago

Your work is very great! I found a small issue in the source code: line 462 in the file "mpxj/src/main/java/net/sf/mpxj/mpp/MPP8Reader.java", the code is "taskExtData = new ExtendedData(taskVarData, getOffset(data, 312));"; here the parameter "312" seems incorrect, after testing it, i think this parameter should be 362, do you agree?

joniles commented 5 years ago

Hi, thanks for the note. I've checked quickly with the sample MPP8 files I have here and the code seems to work fine as it is. Can you provide an example MPP8 file where the offset needs to be different to read the extended data?

luoyunfeng2016 commented 5 years ago

Please check this file, it contain 3 task and 3 resource, each of them contain one notes. The content like this:

AAAAA我是第一个任务的Name 11111我是第一个任务的Notes BBBBB我是第二个任务的Name 22222我是第二个任务的Notes +++++This is the name of the third task +++++This is the notes of the third task XXXXX我是第一个资源的Name 33333我是第一个资源的Notes YYYYY我是第二个资源的Name 44444我是第二个资源的Notes -----This is the name of the third resource -----This is the notes of the third resource

发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用


发件人: Jon Iles notifications@github.com 发送时间: Tuesday, April 23, 2019 6:14:18 PM 收件人: joniles/mpxj 抄送: luoyunfeng2016; Author 主题: Re: [joniles/mpxj] MPP8Reader read task notes issue (#94)

Hi, thanks for the note. I've checked quickly with the sample MPP8 files I have here and the code seems to work fine as it is. Can you provide an example MPP8 file where the offset needs to be different to read the extended data?

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/joniles/mpxj/issues/94#issuecomment-485742967, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFPVZX3RH2UUMLXCGANMOV3PR3OPVANCNFSM4HHVESFA.

luoyunfeng2016 commented 5 years ago

small issue: line 462 in the file "mpxj/src/main/java/net/sf/mpxj/mpp/MPP8Reader.java", the code is "taskExtData = new ExtendedData(taskVarData, getOffset(data, 312));";

Hello, I think the parameter "312" has some relation with the class FixFix, the constructor function is "FixFix(int itemSize, InputStream is)", look at the parameter "int itemSize", if it's 316 (code is "FixFix taskFixedData = new FixFix(316, new DocumentInputStream(((DocumentEntry) taskDir.getEntry("FixFix 0"))));"), the parameter will be 312, and if it's 366 (code is "taskFixedData = new FixFix(366, new DocumentInputStream(((DocumentEntry) taskDir.getEntry("FixFix 0"))));"), the parameter should be 362. Do you think about?

joniles commented 5 years ago

Hi, unfortunately I can't see a file attached to this issue, let me know when you have attached the file. Thanks!

luoyunfeng2016 commented 5 years ago

task-text-98simple.zip

My IE doesn't support attached files, i change to Edge, it can work well. This file is made by Microsoft Project 2003 and "Save As" Project 98 format. Its itemsize is 366, not 316.

joniles commented 5 years ago

I've just pushed a change to GitHub which fixes this issue. This will be in the next MPXJ release.