Issue 118796 - Open .svg file and exports as .svg, failed
Summary: Open .svg file and exports as .svg, failed
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: PC All
: P5 (lowest) Major (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2012-01-16 10:17 UTC by Li Lin Yi
Modified: 2012-08-28 09:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

SVG-example.svg: Original file; soffice-bugreport.txt: Crash log on SUSE; ExportSVGResult.bmp: Screenshot of error on XP. (57.08 KB, application/octet-stream)
2012-01-16 10:17 UTC, Li Lin Yi
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Li Lin Yi 2012-01-16 10:17:27 UTC
Created attachment 77135 [details]
SVG-example.svg: Original file; soffice-bugreport.txt: Crash log on SUSE; ExportSVGResult.bmp: Screenshot of error on XP.

Steps to Reproduce:
1. Start Draw.
2. File->Open...->choose the attachment file SVG-example.svg. The SVG-example.svg file is open.
3. File->Export..., the "Export" dialog appears.
4. Choose "File format" as SVG, put a "File name", and click "Export".

Actual Results: 
On SUSE: Draw crashes. The crash log is soffice-bugreport.txt.
On XP: Error occurs. Screenshot is ExportSVGResult.bmp.

Expected Results:
The file can be exported as .svg correctly.

Build Date & Platform:
Build revision is 1229490, on SUSE Linux Enterprise Desktop
Comment 1 Armin Le Grand 2012-02-03 16:20:29 UTC
ALG: Taking a look. One remark first: To save a SVG which was embedded in AOO as original SVG is possible by selecting the GraphicObject and choosing 'save as picture...' from the context menu. The described steps use the old AOO SVG export which will export the whole page (or selection) based on SdrObjects. This means that the original SVG will be converted to SdrObjects. This again is done using old functionalities, (the same as using 'break' on the object) and may be of varying quality.
Comment 2 Armin Le Grand 2012-02-03 17:40:05 UTC
ALG: Taking over. Problem is an error in the old SVG exporter in the filter module. In filter/source/svg/svgwriter.cxx ln 897 the pDXArray is accessed but SVGActionWriter::ImplWriteText is called without one (null pointer) from SVGActionWriter::ImplWriteActions ln 1698.
Comment 3 Armin Le Grand 2012-02-03 17:50:58 UTC
ALG: ImplWriteText from the Svgexporter seems to have been used before never with a MetaTextRectAction which would be pure luck. Changed to use the already created replacement array for pDXArray (apTmpArray) by using pDX (which seems to have been prepared exactly fo rthis purpose but was not used).
Comment 4 Armin Le Grand 2012-02-03 17:53:39 UTC
ALG: Works as expected, comitting change. Done in r1240262.
Comment 5 2012-04-25 15:13:12 UTC
Closing resolved issues assigned to the pre-AOO graphics default owner.
Comment 6 liuping 2012-08-28 09:08:13 UTC
verify on AOO350ml 1377620 on Win7-64bit,pass