Bug 72260

Summary: XML dumper created duplicate attribute "name"
Product: LibreOffice Reporter: Korrawit Pruegsanusak <detective.conan.1412>
Component: filters and storageAssignee: Korrawit Pruegsanusak <detective.conan.1412>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: target:4.3.0
i915 platform: i915 features:
Attachments: xml which was dumped
patch, showing current situation :)
error log

Description Korrawit Pruegsanusak 2013-12-03 11:48:37 UTC
Created attachment 90148 [details]
xml which was dumped

While creating a unit test for bug#71434, using the XML dump method, the xml file which the program created has duplicate attribute: "name"

My master is built at http://cgit.freedesktop.org/libreoffice/core/commit/?id=62fcdfa34aa302aa9051e90e75b94eb442fa1db7

pptx file: attachment 88942 [details]
xml file attached, see line 3, there are two instances of name="Picture 5", one near the start, another near the end of line.
Comment 1 Korrawit Pruegsanusak 2013-12-03 11:54:26 UTC
Created attachment 90149 [details] [review]
patch, showing current situation :)

the pptx file could be downloaded at >> attachment 88942 [details]
Comment 2 Korrawit Pruegsanusak 2013-12-03 11:57:20 UTC
Created attachment 90150 [details]
error log
Comment 3 Korrawit Pruegsanusak 2013-12-04 07:35:27 UTC
I think the bug resides near here:
http://opengrok.libreoffice.org/xref/core/drawinglayer/source/dumper/XShapeDumper.cxx#dumpXShape
Comment 4 Korrawit Pruegsanusak 2013-12-07 06:07:08 UTC
The bug is we have dumped "name" attributes two times:

First: http://opengrok.libreoffice.org/xref/core/drawinglayer/source/dumper/XShapeDumper.cxx#1820

Second: In dumpShapeService function:
>   1859     if(xServiceInfo->supportsService("com.sun.star.drawing.Shape"))
>   1860         dumpShapeService(xPropSet, xmlWriter);
Comment 5 Korrawit Pruegsanusak 2013-12-08 07:34:44 UTC
Patch submitted to gerrit:
https://gerrit.libreoffice.org/6984
Comment 6 Commit Notification 2013-12-08 07:35:36 UTC
Korrawit Pruegsanusak committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a78f683b1e53d1328af11abdcd362e93db837701

fdo#72260: guard against duplicate "name" attribute



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Korrawit Pruegsanusak 2013-12-08 07:41:21 UTC
Fixed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.