Issue 124825

Summary: Export to SVG: Error when line contains arrow and text
Product: Draw Reporter: Peter Huber <peter.huber>
Component: save-exportAssignee: Armin Le Grand <Armin.Le.Grand>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, elish, fanyuzhen, jsc, pedlino, rainerbielefeld_ooo_qa, rekhask
Version: 4.0.0Keywords: regression
Target Milestone: 4.1.1Flags: jsc: 4.1.1_release_blocker+
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Latest Confirmation in: 4.1.0
Developer Difficulty: ---
Attachments:
Description Flags
Sample document none

Description Peter Huber 2014-05-05 20:23:00 UTC
In OpenOffice Draw, when a line contains an arrow and a text, export to SVG fails. The error message is:

Error saving the document ...:
Write Error.
The file could not be written.

The error does not occur when lines contain only either an arrow or a text.

Steps to reproduce the error:

- Create a new OpenOffice Draw Document.
- Draw a line.
- Define an arrow style for the line other than "- none -" on one or both sides.
- Add some text to the line.
- Export the document to SVG.
--> Error

After removing either the arrow or the text from the line, the export succeeds.


Peter
Comment 1 Edwin Sharp 2014-05-06 08:01:47 UTC
Can not reproduce
AOO410m18(Build:9764)  -  Rev. 1589052
2014-04-22 12:11 - Linux x86_64
Debian

What exactly do you mean by "Add some text to the line." ?
Comment 2 Rainer Bielefeld 2014-05-06 08:44:37 UTC
Created attachment 83340 [details]
Sample document

Simply try sample document
Comment 3 Rainer Bielefeld 2014-05-06 08:48:43 UTC
Still Reproducible with sample document and with "AOO 4.1.0 Release – German UI / German locale [AOO410m18(Build:9764)  -   Rev. 1589052 2014-04-22 11:43:54]" on German WIN7 Home Premium (64bit)", “historic” 4. User Profile used for all predecessor versions

Was still ok with OOo 3.3.0, so Regression!
Comment 4 Rainer Bielefeld 2014-05-06 08:56:49 UTC
(a) Already reproducible with AOO 4.0.0 (WIN)
(b) Was still ok wiht AOO 3.4.1
(c) Message: "Error saving the document:
              DocumentName
              The file could not be written"
(d) Still Reproducible with server installation of "AOO 4.1.0-dev – English UI
    / German locale - [AOO410m14(Build:9760)  -  Rev. 1583418 2014-05-03]" 
    on German WIN7 Home Premium (64bit)", own separate user profile.
Comment 5 Armin Le Grand 2014-07-04 12:04:18 UTC
Regression from AOO341, no crash but filter fails (exception from export filter is fetched). Taking a look...
Comment 6 Armin Le Grand 2014-07-04 12:14:02 UTC
Found the problem, the SVG export tries to generate a name for the shape, but only in one case. The other cases add the locall ycreated ID directly before calling SVGActionWriter::WriteMetaFile, handig over a null pointer. That pointer is handed trough to and used in SVGActionWriter::ImplWriteActions, in the case of line start/end definitions *without* testing it. Adding the tests does the trick.
It looks as if line start/end support was added later, this may be the reason that AOO341 does not crash, but the arrowheads may probably be missing.
Preparing commit...
Comment 7 SVN Robot 2014-07-04 12:15:16 UTC
"alg" committed SVN revision 1607839 into trunk:
i124825 secure usage of object ID in preparation of names for line start/end ...
Comment 8 Armin Le Grand 2014-07-04 12:22:27 UTC
Comitted, done.

Also a safe fix with regression state (from AOO341). A candidate for AOO411, requesting.
Comment 9 jsc 2014-07-04 13:12:19 UTC
grant showstopper flag
Comment 10 Armin Le Grand 2014-07-04 14:10:05 UTC
Preparing to add to AOO411...
Comment 11 SVN Robot 2014-07-04 14:19:36 UTC
"alg" committed SVN revision 1607862 into branches/AOO410:
i124825 secure usage of object ID in preparation of names for line start/end ...
Comment 12 Armin Le Grand 2014-07-04 14:19:58 UTC
OKay, added to AOO411, done.
Comment 13 Rekha S 2014-07-18 22:37:31 UTC
Hi
Verified in the new build that I dont to see this issue .
Tested on :  AOO 4.1.1 m2 on Windows 8.
I see that a line with text in Draw is getting exported to SVG format 




Thanks
Rekha
Comment 14 Pedro 2014-07-19 10:01:21 UTC
Could not reproduce the error with AOO411m2(Build:9771)  -  Rev. 1608452 under Windows 7 SP1 x64.
Apparently the bug is fixed.

Following the instructions in the ODG file revealed another bug
https://issues.apache.org/ooo/show_bug.cgi?id=125277
Comment 15 fanyuzhen 2014-07-23 17:21:51 UTC
Change the status to Verified / Fixed based on testing results in comment 13 and comment 14