Bug 31270 - Impress V3.3.0 Beta does not save Interactions that are assigned to Form Controls
Summary: Impress V3.3.0 Beta does not save Interactions that are assigned to Form Cont...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Form-Controls
  Show dependency treegraph
 
Reported: 2010-10-31 16:34 UTC by irs
Modified: 2019-03-27 21:39 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
test data (13.67 KB, application/vnd.oasis.opendocument.presentation)
2010-12-02 01:53 UTC, Yifan Jiang
Details
Impress Example with BASIC macro to correct missing parameters (59.83 KB, application/vnd.oasis.opendocument.presentation)
2013-03-22 09:01 UTC, irs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description irs 2010-10-31 16:34:47 UTC
An Impress slide may contain a custom-shape (e.g. rectangle, circle, etc.) or a control (e.g. PushButton, Image Control, etc.) Using the Interaction feature of Impress, it is possible to make a mouse click on one of these objects on a slide perform a function, like, run macro.

This initially works fine for both the custom-shapes and the controls at the slide design phase.

When the Impress slide show is saved the interactions with the custom-shapes are stored in the .odp archive of content.xml as a section called <office:event-listeners>. For example, a rectangle shape that can be clicked on to run a macro would be saved in content.xml as follows:

<draw:custom-shape draw:style-name="gr10" draw:text-style-name="P7" draw:layer="layout" svg:width="2cm" svg:height="1cm" svg:x="17.5cm" svg:y="19.5cm">
−<office:event-listeners>
<script:event-listener script:language="ooo:script" script:event-name="dom:click" xlink:href="vnd.sun.star.script:Standard.Module1.ClickOnObject?language=Basic&location=document"/>
</office:event-listeners>
<text:p/>
<draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
</draw:custom-shape>

The problem is that when a control has been assigned to perform an interaction, this <office:event-listeners> information is not being saved in the content.xml file. For example, a PushButton control is currently being saved in content.xml as follows:

<draw:control draw:style-name="gr1" draw:text-style-name="P2" draw:layer="controls" svg:width="5.5cm" svg:height="1.5cm" svg:x="1cm" svg:y="1.5cm" draw:control="control1"/>

In the above the PushButton control no longer has any event-listeners information, thus when this Impress.odp file is next opened, the PushButton will not have the Interaction functionality it originally had during the slide design phase.


To simulate this problem: 

Create a new Impress presentation with one blank slide. Add a Rectangle shape and a PushButton control. Create a BASIC subroutine in Module1.bas with the instruction: msgbox "Object was clicked". For both the Rectangle and the PushButton click on Interaction icon and select run macro to execute this subroutine. 

Start the slide show. You will be able to click on either the Rectangle or the PushButton and the message window will open with the message "Object was clicked".

Now save the Impress presentation to disk as a .odp file. Close LibreOffice. Find the file you've saved, and double click on it to launch Impress. Start the slide show. You will find that the Rectangle will still run the subroutine and display the message window, but the PushButton control no longer performed this interaction.
Comment 1 Yifan Jiang 2010-12-02 01:53:28 UTC
Reproduced on LibO 3.3. beta3 SLED 11 sp1 .

A sample attached, the push button is not interactive in slide show.

Hi irs,

Did you notice this ever worked in previous OO.o build? If it is a regression problem, please feel free to promote the priority. Otherwise, I think it is more like an enhancement feature. Thanks!
Comment 2 Yifan Jiang 2010-12-02 01:53:51 UTC
Created attachment 40733 [details]
test data
Comment 3 irs 2010-12-11 18:58:40 UTC
(In reply to comment #2)
> Created an attachment (id=40733) [details]
> test data

Hi Yifan.

The versions of Impress that I have tried are OpenOffice V3.2 and LibreOfficeV3.3-beta and neither of them save the interactions capability when they have been assigned to a form control like a button, but they do save the interactions capability when saved to a drawing object. I don't have enough experience with previous versions to know if this feature used to work or not.

The reason I assumed that it should work is based on the openoffice online Impress User Guide. Please see this web-page on Interactions...


http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Impress_Guide/Using_interactions

It states...

Interactions are things that happen when you click on an object in a slide. They are typically used with buttons or images, but text objects can also have interactions. 

...this suggests to me that the interactions will work OK with buttons (which they do the first time you set them up to run a macro and then run the slide show). It seem to me that these interaction characteristics should then be preserved during a save of the Impress slide show, such that they then work the next time the slide show file is launched.

Perhaps there is someone with older versions of OpenOffice that can confirm if this used to work and if the problems I'm observing is a regression in the functionality in these latest releases.


Regards, irs
Comment 4 Roman Eisele 2012-05-03 07:40:06 UTC
This is a Impress bug, therefore changed Component accordingly. Added version according to Summary.
Comment 5 Thorsten Behrens (CIB) 2013-02-20 09:04:09 UTC
Freeing this bug - can't currently commit time to this, unfortunately.
Comment 6 irs 2013-03-22 09:01:07 UTC
Created attachment 76896 [details]
Impress Example with BASIC macro to correct missing parameters

With regard to interactions, the two properties for Form Controls that do not get saved to the Impress.odp file are "OnClick" and "Bookmark". 

As a workaround a subroutine can be launched upon loading the file and it will restore these two parameters.

The attached file is a one slide Impress presentation that contains a BASIC macros to restore the onClick and Bookmark parameters for two Form Controls,  "push button" and "image control".

As the file is loaded it executes a subroutine to correctly set the OnClick and and Bookmark parameters. See Module1 for more information and to read the BASIC code.  

Additional Note: I also found that for Push Button Form Controls the font size does not seem to get saved. Upon reloading a file it will come up with the default font size label on the push button. The macro in the attached example file also corrects the font size on each file load. This font size issue is a seperate bug.

Regards, Ian.
Comment 7 QA Administrators 2014-10-23 17:31:56 UTC Comment hidden (obsolete)
Comment 8 irs 2014-11-13 21:57:01 UTC
Hi,

I have tested for the problem scenario using Libre Office version: 
4.2.6.3 Build ID: 420m0(Build:3)

The test was on Ubuntu 14.04 Linux Operating System version: 
3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

The problem I intially reported on 2010-10-31 16:34:47 UTC is still present.

Regards, Ian.
Comment 9 QA Administrators 2015-12-20 16:20:00 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2017-01-03 19:50:57 UTC Comment hidden (obsolete)
Comment 11 Thehache 2017-02-08 19:37:32 UTC
Hello,

I confirm the non-functioning of the interactions (go to the page or the object) put on the cliparts of the gallery. Interactions are lost when the slideshow is saved.
These interactions work on shapes and images.
Does not work on Libo 5.0.6.3, Libo 5.1.6.2, Libo 5.2.5
Works on AOO 4.1.3

See you soon
Comment 12 QA Administrators 2018-09-25 02:51:26 UTC Comment hidden (obsolete)
Comment 13 irs 2019-03-27 21:39:14 UTC
This problem now seems to be resolved as it works for me with the following Libreoffice:

Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.2
CPU threads: 2; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-NZ (en_NZ.UTF-8); Calc: group

Thanks and regards, irs.