Issue 121379

Summary: SVG graphic with connected connector does not open
Product: Draw Reporter: Oliver-Rainer Wittmann <orw>
Component: open-importAssignee: Armin Le Grand <Armin.Le.Grand>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P2 CC: binbjguo, issues, jsc, jthg
Version: 3.4.1   
Target Milestone: 4.0.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
sample document containing SVG with connected connector none

Description Oliver-Rainer Wittmann 2012-11-20 15:04:45 UTC
Document containing a SVG graphic with a connector attached to it does not open resp. crashes.

Steps to reproduce:
- create new Draw or Presentation document
- insert a SVG graphic
- insert a connector
- connect the connector to the SVG graphic
- save
- open
--> does not open (Windows) or crashes (MacOS X)
Comment 1 Oliver-Rainer Wittmann 2012-11-20 15:11:01 UTC
Created attachment 79929 [details]
sample document containing SVG with connected connector
Comment 2 Armin Le Grand 2012-11-21 10:21:32 UTC
ALG: Deep diving...
It happened with the support for multiple images in 3.4, e.g. svg and png for the same content to allow backward compatibility, the one with the highest quality is choosen, the others are ignored. When doing this, both images are loaded as xShape and then decided which to keep. png is first (for compatibility, older offices just load the first image). Both images get registered with the unique ID to later find them for the connector anchorings. That's the first error: That list can only hold one xShape per ID (what is correct), the second registered with the same ID is ignored (no assertion). The svg is choosen (the second) and the first is deleted.
When the connector gets connected, the ID leads to the xShape from the png which has no SdrObject anymore since it is deleted. That code should not crash, but the error is something else.
I will need to find a way to only register the 'winner' of the graphic quality contest...
Comment 3 Armin Le Grand 2012-11-21 10:48:26 UTC
ALG: Okay, added mechanism to register with ID after deciding the winner. This is a little bit tricky since normally the ID and registering is done in standard parts of import already.
Also checked with Writer's MultiImage support (no problems there due to Writer having own GraphicObjects, but not supporting connectors for these).
Comment 4 Armin Le Grand 2012-11-21 10:48:49 UTC
ALG: Okay, done.
Comment 5 Armin Le Grand 2012-11-21 10:49:42 UTC
ALG: Comitted, setting to fixed.
Comment 6 binguo 2012-11-28 06:04:39 UTC
Verified on Aoo_Trunk_20121123.1915 Rev.1412533, open sample file, svg with connector display correctly and normally, no crash, so this bug is fixed.
Comment 7 binguo 2012-11-28 07:22:03 UTC
close it.