View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026415 | Community | OCCT:Application Framework | public | 2015-07-10 13:36 | 2016-04-20 15:50 |
Reporter | Vico Liang | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2013 | ||
Product Version | 6.9.0 | ||||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0026415: <TFunction_GraphNode> XML should not break line in the middle of text. | ||||
Description | The picture uploaded in file TFunction_GraphNode_NotNecessaryLineBreak.png shows the issue. The code of below has a line 'aValueStr += "\n";' which cause such issue. It's not necessary of this line from program logic. It can be removed. void XmlMFunction_GraphNodeDriver::Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& ) const { Handle(TFunction_GraphNode) G = Handle(TFunction_GraphNode)::DownCast(theSource); // Previous // ======== theTarget.Element().setAttribute(::LastPreviousIndex(), G->GetPrevious().Extent()); TCollection_AsciiString aValueStr; TColStd_MapIteratorOfMapOfInteger itrm(G->GetPrevious()); for (; itrm.More(); itrm.Next()) { const Standard_Integer ID = itrm.Key(); aValueStr += TCollection_AsciiString(ID); aValueStr += ' '; } aValueStr += "\n"; // Next // ==== theTarget.Element().setAttribute(::LastNextIndex(), G->GetNext().Extent()); itrm.Initialize(G->GetNext()); for (; itrm.More(); itrm.Next()) { const Standard_Integer ID = itrm.Key(); aValueStr += TCollection_AsciiString(ID); aValueStr += ' '; } XmlObjMgt::SetStringValue (theTarget, aValueStr.ToCString(), Standard_True); // Execution status theTarget.Element().setAttribute(::ExecutionStatus(), (Standard_Integer) G->GetStatus()); } | ||||
Steps To Reproduce | N/A | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
TFunction_GraphNode_NotNecessaryLineBreak.png (3,405 bytes) |
|
Provide, please code snippet allowing to reproduce the specified case. Without these additional data the registered issue is useless. |
|
Dear szy, It's not necessary to reproduce it with code. This is not a bug. It just cause the unlecessary line break in xml format. To fix this, please remove line: aValueStr += "\n"; |
|
Vico, it seems that current code intentionally adds line break between lists of "previous" and "next" IDs. This might have been done to be able to easily recognize those two sub-lists visually when looking at the file in text editor. Does this make any sense? |
|
Dear Colleagues, you are right all. Indeed, the "\n" symbol separates the dependent and depending GraphNodes in XML file. And this symbol is necessary only for visual observation of these two lists. It might be better if we replace this symbol by several spaces (" ", for example), what do you think? It will still be possible to recognize these two lists of integers as well as an unnecessary line break is removed. Any ideas are welcome! Also, I attach a XML file with replaced "\n" by " ". |
|
testxmlxml.zip (1,043 bytes) |
|
Dear vro, your solution is better than line break from my point of view. I accept this solution. I'm not sure there is any compatible issue between version. |
|
Branch CR26415 has been created by abv. SHA-1: 7e96f212077b4d161ea92e46e0046ff562b0e790 Detailed log of new commits: Author: abv Date: Mon Feb 1 17:33:25 2016 +0300 0026415: <TFunction_GraphNode> XML should not break line in the middle of text. Line break between "previous" and "next" ids is replaced by additional spaces (these facilitate visual separation of the two sub-lists). |
|
Fis pushed to CR26415, please review |
|
Reviewed! |
|
Dear BugMaster, Branch CR26415 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 7e96f212077b4d161ea92e46e0046ff562b0e790 Number of compiler warnings: occt component: Linux: 0 (0 on master) Windows: 0 (0 on master) MacOS: 1 (1 on master) products component: Linux: 36 (36 on master) Windows: 0 (0 on master) Regressions/Differences: Not detected Testing cases: Not needed Testing on Linux: Total MEMORY difference: 89977480 / 89400824 [+0.65%] Total CPU difference: 19146.569999999996 / 19103.82999999992 [+0.22%] Testing on Windows: Total MEMORY difference: 57285354 / 57306359 [-0.04%] Total CPU difference: 18010.62745199902 / 18574.243464898933 [-3.03%] |
|
Branch CR26415 has been deleted by kgv. SHA-1: 7e96f212077b4d161ea92e46e0046ff562b0e790 |
occt: master 6e448ab0 2016-02-01 14:33:25
Committer: bugmaster Details Diff |
0026415: <TFunction_GraphNode> XML should not break line in the middle of text. Line break between "previous" and "next" ids is replaced by additional spaces (these facilitate visual separation of the two sub-lists). |
Affected Issues 0026415 |
|
mod - src/XmlMFunction/XmlMFunction_GraphNodeDriver.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-07-10 13:36 | Vico Liang | New Issue | |
2015-07-10 13:36 | Vico Liang | Assigned To | => szy |
2015-07-10 13:37 | Vico Liang | File Added: TFunction_GraphNode_NotNecessaryLineBreak.png | |
2015-09-30 18:54 |
|
Note Added: 0046350 | |
2015-09-30 18:54 |
|
Status | new => feedback |
2015-09-30 18:54 |
|
Assigned To | szy => Vico Liang |
2015-10-04 11:12 | Vico Liang | Note Added: 0046429 | |
2015-10-04 11:13 | Vico Liang | Assigned To | Vico Liang => szy |
2015-10-04 11:13 | Vico Liang | Status | feedback => assigned |
2015-12-30 16:02 |
|
Assigned To | szy => vro |
2016-01-08 10:13 |
|
Note Added: 0049728 | |
2016-01-26 11:44 | vro | Note Added: 0050124 | |
2016-01-26 11:46 | vro | File Added: testxmlxml.zip | |
2016-01-27 17:47 | Vico Liang | Note Added: 0050167 | |
2016-02-01 17:33 | git | Note Added: 0050316 | |
2016-02-01 17:34 |
|
Note Added: 0050317 | |
2016-02-01 17:34 |
|
Status | assigned => resolved |
2016-02-01 17:34 |
|
Steps to Reproduce Updated | |
2016-02-02 07:06 | vro | Note Added: 0050325 | |
2016-02-02 07:06 | vro | Assigned To | vro => bugmaster |
2016-02-02 07:06 | vro | Status | resolved => reviewed |
2016-02-02 11:34 |
|
Assigned To | bugmaster => apv |
2016-02-04 17:01 |
|
Test case number | => Not needed |
2016-02-04 18:04 |
|
Note Added: 0050425 | |
2016-02-04 18:04 |
|
Assigned To | apv => bugmaster |
2016-02-04 18:04 |
|
Status | reviewed => tested |
2016-02-12 11:37 | bugmaster | Changeset attached | => occt master 6e448ab0 |
2016-02-12 11:37 | bugmaster | Status | tested => verified |
2016-02-12 11:37 | bugmaster | Resolution | open => fixed |
2016-04-17 13:40 | git | Note Added: 0052889 | |
2016-04-20 15:43 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:50 |
|
Status | verified => closed |