Bug 72260 - XML dumper created duplicate attribute "name"
Summary: XML dumper created duplicate attribute "name"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Korrawit Pruegsanusak
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-03 11:48 UTC by Korrawit Pruegsanusak
Modified: 2013-12-08 07:41 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
xml which was dumped (1.28 KB, text/plain)
2013-12-03 11:48 UTC, Korrawit Pruegsanusak
Details
patch, showing current situation :) (2.17 KB, patch)
2013-12-03 11:54 UTC, Korrawit Pruegsanusak
Details
error log (44.09 KB, text/plain)
2013-12-03 11:57 UTC, Korrawit Pruegsanusak
Details

Note You need to log in before you can comment on or make changes to this bug.
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]
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.