https://bugs.documentfoundation.org/show_bug.cgi?id=169574
--- Comment #2 from Regina Henschel <[email protected]> --- Created attachment 204901 --> https://bugs.documentfoundation.org/attachment.cgi?id=204901&action=edit FYI only, works in principle but might crash I have tried to fix the XML case. I have changed the treatment of the "Identifier" field of the dialog so, that it expects a semicolon separated list of entries: "/bookstore/book;title;author", for example. This user input is then separated into its tokens and assigned to the values of ScOrcusImportXMLParam::RangeLink. That works as long as the user enters the string syntactically correct and appropriate for the data to be imported. However, if the user enters a not suitable string, LibreOffice might crash due to asserts in the liborcus library or in MSVC. The attached patch detects some of the possible errors in the user input. But I cannot detect all problems. For example, if the user writes an item as element name, but in the source it is an attribute, it is not possible to detect it beforehand without having read the source. A try-catch guard does not catch the assert failures. I have tried it, but it is not included in the patch. Thus the attached patch is no solution. I have attached is nevertheless for to inform other developers, that such attempt will not work. The "XML Source" tool in menu "Data" circumvents the chicken-and-egg problem by first loading a stream and generating the XML structure and then allowing the user to select the part to be imported from this structure. The "Insert Sheet from File" dialog works totally different and has no problems in reading the sources. So it might be necessary to change the "read the source" part in the "Data Provider" tool to use the same way as the "Insert Sheet from File" dialog. But that would be a very large change. On the other hand, the "Insert Sheet from File" way might solve in addition the problem, that the current way for XML - both in "XML Source" tool and in "Data Provider" tool - cannot use sources from the internet but only local files. -- You are receiving this mail because: You are the assignee for the bug.
