[Mono-bugs] [Bug 591859] New: System.IO.Packaging generates invalid ID strings
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Mar 29 09:25:07 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=591859
http://bugzilla.novell.com/show_bug.cgi?id=591859#c0
Summary: System.IO.Packaging generates invalid ID strings
Classification: Mono
Product: Mono: Class Libraries
Version: 1.2.0
Platform: x86-64
OS/Version: openSUSE 11.2
Status: NEW
Severity: Normal
Priority: P5 - None
Component: WPF
AssignedTo: toshok at novell.com
ReportedBy: ustramooner at users.sourceforge.net
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=351138)
--> (http://bugzilla.novell.com/attachment.cgi?id=351138)
Test files for the problem, including a patch
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.2
(KHTML, like Gecko) Chrome/5.0.342.7 Safari/533.2
In test program, using run argument of 'mono Main.exe 0', the ID is printed
out. The auto-generated ID acordding
to
http://msdn.microsoft.com/en-us/library/system.io.packaging.packagepart.getrelationship.aspx
is an
ID string, however the current implementation returns an integer. Adding 'R' to
the beginning of the ID solves
the problem:
Index: System.IO.Packaging/PackagePart.cs
===================================================================
--- System.IO.Packaging/PackagePart.cs (revision 154267)
+++ System.IO.Packaging/PackagePart.cs (working copy)
@@ -237,7 +237,7 @@
{
while (true)
{
- string s = relationshipId.ToString ();
+ string s = "R" + relationshipId.ToString ();
if (!RelationshipExists (s))
return s;
relationshipId ++;
Index: System.IO.Packaging/Package.cs
===================================================================
--- System.IO.Packaging/Package.cs (revision 154267)
+++ System.IO.Packaging/Package.cs (working copy)
@@ -337,7 +337,7 @@
string NextId ()
{
while (true) {
- string s = RelationshipId.ToString ();
+ string s = "R" + RelationshipId.ToString ();
if (!Relationships.ContainsKey (s))
return s;
Reproducible: Always
Steps to Reproduce:
1. Run 'mono Main.exe 0'
2.
3.
Actual Results:
ID string generates an integer by default
Expected Results:
ID string should be something like R0, R197611, etc
See README in the zip file for more details, including:
* Main.cs a test program that produces several different problems
* README describes all the bugs I found and how to reproduce
* DocumentFormat.OpenXml.dll the dll I'm running
* expected.docx the expected docx that the Main.cs should create
* WindowsBase.diff: a patch that I applied to my code
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list