MantisBT - Open CASCADE
View Issue Details
0029217Open CASCADE[OCCT] OCCT:Application Frameworkpublic2017-10-12 14:472019-09-04 17:52
kgv 
abv 
normalminor 
feedbackopen 
[OCCT] 7.2.0 
[OCCT] 7.5.0* 
0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion()
The patch for #0028691 introduced new feature ability to save OCAF document within XML persistence formats which can be (theoretically?) opened by earlier OCCT versions - at least Open CASCADE 6.7.0.

However, the way it was implemented (new global method XmlLDrivers::SetStorageVersion()) is quite questionable:
- No documentation provided anywhere, including API methods and Draw Harness command.
  No description provided about possible side effects of settings version below last.
- Patch does not clarifies what has been introduced within version 9 comparing to 8.
- No any checks for supported/unsupported version numbers.
  One may set any version.
  Only test case bugs/caf/bug28691 suggests that at least 7 and 9 are valid numbers.
- No API provided returning actual (last) version of format.
- XmlLDrivers_DocumentRetrievalDriver also uses XmlLDrivers::StorageVersion()
  resulting in read failure if application wants writing XML file
  in compatible mode (e.g. set version 7) and then try reading file
  written in latest format (9), which does not make sense.
No tags attached.
Issue History
2017-10-12 14:47kgvNew Issue
2017-10-12 14:47kgvAssigned To => mpv
2017-10-12 14:47kgvRelationship addedrelated to 0028691
2017-10-12 14:54kgvRelationship addedrelated to 0029216
2017-10-12 14:54mpvAssigned Tompv => vro
2017-10-19 16:25gitNote Added: 0071646
2017-10-20 09:05vroAssigned Tovro => mpv
2017-10-20 09:05vroStatusnew => resolved
2017-10-20 09:05vroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17971#r17971
2017-10-20 15:34mpvAssigned Tompv => kgv
2017-10-20 15:34mpvNote Added: 0071662
2017-10-20 15:40kgvNote Added: 0071664
2017-10-20 15:40kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17972#r17972
2017-10-20 15:40kgvAssigned Tokgv => abv
2018-01-23 15:43kgvRelationship addedparent of 0029443
2018-02-05 15:30gzyNote Added: 0073819
2018-02-05 15:30gzyAssigned Toabv => bugmaster
2018-02-05 15:30gzyStatusresolved => reviewed
2018-02-05 15:30gzyAssigned Tobugmaster => kgv
2018-02-05 15:34kgvAssigned Tokgv => abv
2018-02-05 15:34kgvStatusreviewed => feedback
2018-02-05 15:34gzyNote Deleted: 0073819
2019-09-04 17:52kgvTarget Version7.4.0 => 7.5.0*

Notes
(0071646)
git   
2017-10-19 16:25   
Branch CR29217 has been created by vro.

SHA-1: 248dd6ca65ced8d4bd648f56a5eb6e3839b65c9d


Detailed log of new commits:

Author: vro
Date: Thu Oct 19 16:24:15 2017 +0300

    0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion()
(0071662)
mpv   
2017-10-20 15:34   
Dear KGV,

Could you review this fix from your case point of view.
(0071664)
kgv   
2017-10-20 15:40   
vro written:

Done:
- multiple definition of the document version in BinLDrivers, XmlLDrivers, ... is removed;
- a document version variable now belongs to each instance of the document (TDocStd_Document);
- it is possible to change the document version.
- a comment for the new methods of TDocStd_Document describe a purpose of the methods and how to use them.

The branch is compiled and tested: http://jenkins-test-10.nnov.opencascade.com/view/CR29217-master-vro/view/START%20BRANCH%20CERTIFICATION/ [^] [^]

Any remarks are welcome!