Bug 43688 - Visio properties corrupted
Summary: Visio properties corrupted
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: HPSF (show other bugs)
Version: 3.0-FINAL
Hardware: Other All
: P2 major with 3 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-24 05:09 UTC by fathi.nemeur
Modified: 2007-11-06 03:41 UTC (History)
0 users



Attachments
PoiBowser view of the Document entries of an original visio and a corrupted one (31.58 KB, image/jpeg)
2007-10-24 05:14 UTC, fathi.nemeur
Details
Original document. properties modified (221.00 KB, application/octet-stream)
2007-10-24 05:17 UTC, fathi.nemeur
Details
open and saved document (220.50 KB, application/octet-stream)
2007-10-31 06:16 UTC, fathi.nemeur
Details
the original file as created by Visio (221.00 KB, application/octet-stream)
2007-11-05 06:21 UTC, fathi.nemeur
Details
the file as modified by HPSF (220.50 KB, application/octet-stream)
2007-11-05 06:22 UTC, fathi.nemeur
Details
the HPSF modifed file edited and saved by Visio (220.50 KB, application/octet-stream)
2007-11-05 06:25 UTC, fathi.nemeur
Details
JUnit test case exhibiting the faulty behaviour (7.72 KB, application/octet-stream)
2007-11-05 06:28 UTC, fathi.nemeur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fathi.nemeur 2007-10-24 05:09:45 UTC
Steps to Reproduce: 
1 - create a new visio file
2 - modify its title with an application using poi like "WriteTitle.java" (poi
example)
3 - open the document with visio and save it (don't modify the title).

Actual Results: 
the document title is gone.

Expected Results:
the title should be the same title modified by step one.

I am using visio 2002 sp-2 - 10.0.6865
poi-3.0.1-FINAL

description:

I modify visio document properties through poi( title,author, custom
properties...), everything looks fine.
If I modify the same document via visio application or via windows, the document
entries are inverted VisioInformation(1st) et VisioDocument(2nd) then every
properties are lost (title...) and sometimes the document becomes unreadable.

I check an original visio document with PoiBrowser, VisioInformation shoulb be
before VisioDocument but if a document is modified via my application(poi)
VisioDocument is before VisioInformation.

I also tried with the example code "WriteTitle.java", it is the same result.
Comment 1 fathi.nemeur 2007-10-24 05:14:37 UTC
Created attachment 21033 [details]
PoiBowser view of the Document entries of an original visio and a corrupted one
Comment 2 fathi.nemeur 2007-10-24 05:17:32 UTC
Created attachment 21034 [details]
Original document.
properties modified

if this file is saved via visio application, every properties disapeared
Comment 3 Rainer Klute 2007-10-24 11:12:00 UTC
The order of entries in the property set doesn't matter. Properties are
identified by name. The so-called "corrupted" file looks not quite, but rather
good. At least the title is there.

Anyway, if something is wrong with the properties after Vision wrote them, that
looked like a bug in Visio, not in HPSF.
Comment 4 fathi.nemeur 2007-10-25 00:32:35 UTC
First of all, thank you for checking my bug.
I agree with you visio application is not bug free.

Anyway, the problem happens only when a visio file is modified by HPSF.
The only difference noticed between a "no-problem" file and "problem" file is 
the order of the document entries.

If you open and save the file in attachment with visio application, the title 
will disappear.

Is there anyway to force the order of "VisioInformation" and "VisioDocument" 
document entries.

Thank you

note : I wrote "corrupted" because I don't find any other that really fit the 
nature of the document.



(In reply to comment #0)
> Steps to Reproduce: 
> 1 - create a new visio file
> 2 - modify its title with an application using poi like "WriteTitle.java" (poi
> example)
> 3 - open the document with visio and save it (don't modify the title).
> Actual Results: 
> the document title is gone.
> Expected Results:
> the title should be the same title modified by step one.
> I am using visio 2002 sp-2 - 10.0.6865
> poi-3.0.1-FINAL
> description:
> I modify visio document properties through poi( title,author, custom
> properties...), everything looks fine.
> If I modify the same document via visio application or via windows, the 
document
> entries are inverted VisioInformation(1st) et VisioDocument(2nd) then every
> properties are lost (title...) and sometimes the document becomes unreadable.
> I check an original visio document with PoiBrowser, VisioInformation shoulb be
> before VisioDocument but if a document is modified via my application(poi)
> VisioDocument is before VisioInformation.
> I also tried with the example code "WriteTitle.java", it is the same result.

(In reply to comment #3)
> The order of entries in the property set doesn't matter. Properties are
> identified by name. The so-called "corrupted" file looks not quite, but rather
> good. At least the title is there.
> Anyway, if something is wrong with the properties after Vision wrote them, 
that
> looked like a bug in Visio, not in HPSF.

(In reply to comment #3)
> The order of entries in the property set doesn't matter. Properties are
> identified by name. The so-called "corrupted" file looks not quite, but rather
> good. At least the title is there.
> Anyway, if something is wrong with the properties after Vision wrote them, 
that
> looked like a bug in Visio, not in HPSF.

Comment 5 fathi.nemeur 2007-10-31 06:16:15 UTC
Created attachment 21065 [details]
open and saved document

This is the same document.It was only opened and saved with.
Every properties are gone.You can compare with the original document in
attachment.
Comment 6 fathi.nemeur 2007-10-31 06:17:39 UTC
Comment on attachment 21034 [details]
Original document.
properties modified

the properties were modified using hpsf
Comment 7 Rainer Klute 2007-10-31 12:07:11 UTC
In order to make this issue researchable you should submit the following:
* the original file as created by Vision,
* the file as modified by HPSF,
* a JUnit test case exhibiting the faulty behaviour.
Comment 8 fathi.nemeur 2007-11-05 06:21:05 UTC
Created attachment 21086 [details]
the original file as created by Visio
Comment 9 fathi.nemeur 2007-11-05 06:22:40 UTC
Created attachment 21087 [details]
the file as modified by HPSF

I modified the title and some customProperties by HPSF
Comment 10 fathi.nemeur 2007-11-05 06:25:42 UTC
Created attachment 21088 [details]
the HPSF modifed file edited and saved by Visio

the properties and the title are unavailable.
Comment 11 fathi.nemeur 2007-11-05 06:28:35 UTC
Created attachment 21089 [details]
JUnit test case exhibiting the faulty behaviour

I used your example code source to modify the title and custom properties of a
document
Comment 12 fathi.nemeur 2007-11-06 03:17:36 UTC
You can find in attachment:
 - The original vsd file "document.vsd" (id = 21086).
 - The same document modified with HPSF (id = 21087).The title was modified and
   some custom properties.When you open this everything seems fine.
 - The document edited and saved with visio(id = 21088).The title and 
   custom properties are lost.
 - The JUnit class (id = 21089)I used to modify the original document.It includes
   a poi example method.

Comment 13 Rainer Klute 2007-11-06 03:41:15 UTC
Thanks for the info you provided! Now if I only could find some time to have a
look at them...