Bug 103567 - ODF import: Interaction events / Hyperlinks inserted on SVG images are lost
Summary: ODF import: Interaction events / Hyperlinks inserted on SVG images are lost
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:5.4.0 target:5.3.1 target:...
Keywords: dataLoss, regression
Depends on:
Blocks:
 
Reported: 2016-10-29 02:00 UTC by Bastián Díaz
Modified: 2017-02-10 09:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bastián Díaz 2016-10-29 02:00:32 UTC
Description:
When adding a hyperlink to an object gallery (eg. Arrow) after save and reopen the presentation, it disappears.

Steps to Reproduce:
1. Create a Open Document presentation with 2 slides
2. In the second slide insert a gallery object (Arrow) and add a hyperlink to Slide 1
3. Save presentation (*.odp)
4. Open file and test

Actual Results:  
Hyperlinks disappear.

Expected Results:
Hyperlinks work in gallery objects


Reproducible: Always

User Profile Reset: No

Additional Info:
Two different methods for adding hyperlinks (hyperlinks from the Insert menu and via the context menu, interactions) were tested.

See: Bug 54037 and Bug 103562

LO version: Version: 5.2.2.2
Build ID: 8f96e87c890bf8fa77463cd4b640a2312823f3ad
CPU Threads: 2; OS Version: Linux 4.7; UI Render: default; 
Locale: es-CL (es_CL.utf8); Calc: group

OS: Fedora 24 64 bit (Budgie Desktop)


User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 Buovjaga 2016-11-15 12:36:15 UTC
Repro.

It seems to work in 3.3, but the gallery objects there are gifs.. adding bibisect request anyhow.

Bastián: it would be interesting, if you could test with older versions.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha1+
Build ID: 553cfda502a1516673233e409f91372766da6c4d
CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 11th 2016

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 Michael Stahl (allotropia) 2017-02-08 17:54:38 UTC
LO does store elements like this:

          <office:event-listeners>
            <presentation:event-listener script:event-name="dom:click" presentation:action="next-page"/>
          </office:event-listeners>

          <office:event-listeners>
            <presentation:event-listener script:event-name="dom:click" presentation:action="show" xlink:href="http://example.com/" xlink:type="simple" xlink:show="embed" xlink:actuate="onRequest"/>
          </office:event-listeners>

but doesn't load them if the image is a SVG; if it's a JPEG
then the events load fine.

that started with LO 4.0, which introduced the new SVG import filter.

... the problem is that the SVG actually has 2 draw:image inside a draw:frame,
on import the event stuff is stored on the PNG fall-back object and then
that is deleted by MultiImageImportHelper::solveMultipleImages
because the SVG is better.

... the relaxng for draw frame is:

		<element name="draw:frame">
			<ref name="common-draw-shape-with-text-and-styles-attlist"/>
			<ref name="common-draw-position-attlist"/>
			<ref name="common-draw-rel-size-attlist"/>
			<ref name="common-draw-caption-id-attlist"/>
			<ref name="presentation-shape-attlist"/>
			<ref name="draw-frame-attlist"/>
			<zeroOrMore>
				<choice>
					<ref name="draw-text-box"/>
					<ref name="draw-image"/>
					<ref name="draw-object"/>
					<ref name="draw-object-ole"/>
					<ref name="draw-applet"/>
					<ref name="draw-floating-frame"/>
					<ref name="draw-plugin"/>
					<ref name="table-table"/>
				</choice>
			</zeroOrMore>
			<optional>
				<ref name="office-event-listeners"/>
			</optional>
			<zeroOrMore>
				<ref name="draw-glue-point"/>
			</zeroOrMore>
			<optional>
				<ref name="draw-image-map"/>
			</optional>
			<optional>
				<ref name="svg-title"/>
			</optional>
			<optional>
				<ref name="svg-desc"/>
			</optional>
			<optional>
				<choice>
					<ref name="draw-contour-polygon"/>
					<ref name="draw-contour-path"/>
				</choice>
			</optional>
		</element>

... so its children are ordered, we know at which point we
have all variant main content elements, and can choose which
one to pick *before* applying the various properties in the optional
child elements.

the import calls solveMultipleImages too late currently.

fixed on master.
Comment 3 Commit Notification 2017-02-08 17:55:28 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=791431d7e2485652c96fac7c15f47aa125271ee0

tdf#103567 xmloff: ODF import: fix loss of events on SVG multi-image

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Michael Stahl (allotropia) 2017-02-09 12:25:03 UTC
found there's a second context for draw:frame that is used
by Writer and it has the same problem, contour polygons
and image maps can be lost, fixed too.

didn't find a bug about that though, probably nobody uses
image maps.

also with these fixes the fix for i#124143 is quite
unnecessary so i've removed that too.
Comment 5 Commit Notification 2017-02-09 12:28:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ae00898f12b9087e1d9b59d9a7820d64b5501775

tdf#103567 xmloff: ODF import: fix more lossage on Writer frames

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2017-02-10 09:42:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=40d9d6fa08f3bfaf32b4c4dc79670facc1d59f45&h=libreoffice-5-3

tdf#103567 xmloff: ODF import: fix more lossage on Writer frames

It will be available in 5.3.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2017-02-10 09:45:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bee00eafcf4ade2b5d9139ac751d39429fb52311&h=libreoffice-5-2

tdf#103567 xmloff: ODF import: fix loss of events on SVG multi-image

It will be available in 5.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2017-02-10 09:46:08 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=38c82af5368c7dfb134305cb402b1ce9e1a7cc7f&h=libreoffice-5-2

tdf#103567 xmloff: ODF import: fix more lossage on Writer frames

It will be available in 5.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.