Issue 121379 - SVG graphic with connected connector does not open
SVG graphic with connected connector does not open
Status: CLOSED FIXED
Product: Draw
Classification: Application
Component: open-import
3.4.1
All All
: P2 normal (vote)
: 4.0.0
Assigned To: Armin Le Grand
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-20 15:04 UTC by Oliver-Rainer Wittmann
Modified: 2013-07-12 16:31 UTC (History)
4 users (show)

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


Attachments
sample document containing SVG with connected connector (503.58 KB, application/octet-stream)
2012-11-20 15:11 UTC, Oliver-Rainer Wittmann
no flags Details

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