Bug 117172 - Image context menu Save fails to do anything
Summary: Image context menu Save fails to do anything
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.0.2.1 release
Hardware: All All
: medium normal
Assignee: Marco Cecchetti
URL:
Whiteboard: target:6.2.0 target:6.1.0.1 target:6.0.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Context-Menu
  Show dependency treegraph
 
Reported: 2018-04-23 07:25 UTC by Adelbert
Modified: 2018-05-31 10:29 UTC (History)
7 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 Adelbert 2018-04-23 07:25:14 UTC
Description:
GDI metafile files cannot be exported (saved) from Writer (select, right click, selecting "Save"). BMP files can be exported. I save them as *.png files but have tried *.jpg etc which also don't save.

I have found a workaround by selecting "Edit with External Tool" which opens "Windows Photo Viewer". Then I select "File" > "Make a Copy" and saving that. 

Steps to Reproduce:
1.Produce a picture in Impress
2.Copy and paste into Writer as a "GDI Metafile"
3.Select the "GDI Metafile" in Writer
4.Right click, select Save to open "Image Export" screen
5.Give a file name and save

Actual Results:  
Should create a file but no file is created. No error messages. Just nothing

Expected Results:
Should have created a file of the picture produced in Impress.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I have found a workaround by selecting "Edit with External Tool" which opens "Windows Photo Viewer". Then I select "File" > "Make a Copy" and saving that. 


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 V Stuart Foote 2018-04-23 13:23:47 UTC
Confirmed on Windows 10 Home 64-bit  en-US Intel HD 620 GPU
with 

Version: 6.1.0.0.alpha0+ (x64)
Build ID: ef7f8c263fcb2bac596aa0247f1e54ff375c3146
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-04-20_16:41:59
Locale: en-US (en_US); Calc: CL

and 

Version: 6.0.4.1 (x64)
Build ID: a63363f6506b8bdc5222481ce79ef33b2d13c741
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: en-US (en_US); Calc: CL

With Paste Special "GDI metafile" is copied to canvas and is stored as .SVM into the Pictures directory of the ODF. On manipulating the document, a .PNG is also created in the Pictures directory. 

The image can be selected from canvas and pasted, but attempts to Save from the context menu (as any format .PNG, .SVG, .EMF) fail silently.
Comment 2 V Stuart Foote 2018-04-23 13:32:25 UTC
The PNGs are there on save from

https://gerrit.libreoffice.org/45567

so nothing out of the ordinary that regard.

Just lacking any apparent result on attempt to save out an image selection via the context menu.
Comment 3 V Stuart Foote 2018-04-23 13:44:37 UTC
So, preferred image Export from canvas handling (Draw or Impress), with or without selection, works to any of the formats--that should satisfy OPs use case.

But handling of Save from an image's context menu seems to be disconnected and mishandled.  What is the 'Save' control on the context menu supposed to do?
Comment 4 Xisco Faulí 2018-04-27 14:40:57 UTC
it works in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

and 

Version: 5.3.0.0.alpha1+
Build ID: 4136757b4e51c4e6f7cb4132c95538a7f831ef2c
CPU Threads: 4; OS Version: Linux 4.13; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

but not in

Version: 6.0.3.2
Build ID: 1:6.0.3~rc2-0ubuntu0.16.04.1~lo2
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 5 raal 2018-05-11 19:49:03 UTC
This seems to have begun at the below commit.
Adding Cc: to Marco Cecchetti ; Could you possibly take a look at this one?
Thanks
 0b8482dfe034a5fb988da6822cf8969bb8c86cba is the first bad commit
commit 0b8482dfe034a5fb988da6822cf8969bb8c86cba
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Jul 20 21:57:16 2017 +0200

    source f715c6cfa41ad5a552181bad5e36e8e03f96f480

author	Marco Cecchetti <marco.cecchetti@collabora.com>	2017-07-20 12:18:37 +0200
committer	Marco Cecchetti <mrcekets@gmail.com>	2017-07-20 15:35:11 +0200
commit f715c6cfa41ad5a552181bad5e36e8e03f96f480 (patch)
tree 44ad9bb0cb896f24b3664a02e8ab68be9c1ed3f1
parent 0d5b54116b92c126eb7fcd7b832aceed17011c79 (diff)
support for filter dialog when an image is exported from context menu
When user save the selected image in a non-vector format the filter
dialog used in Draw pops up for filter setting.
Comment 6 Marco Cecchetti 2018-05-15 14:00:14 UTC
Uh, so the issue seems to be trivial, too trivial; anyway I can't remember implementation details for commit 0b8482dfe034a5fb988da6822cf8969bb8c86cba, so I hope that my fix is enough:

https://gerrit.libreoffice.org/#/c/54359
Comment 7 Commit Notification 2018-05-28 13:06:53 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "master":

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

tdf#117172 - Image context menu Save fails to do anything

It will be available in 6.2.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 8 Xisco Faulí 2018-05-28 13:45:09 UTC
Cherry-picked:
6-1: https://gerrit.libreoffice.org/#/c/54930/1
6-0: https://gerrit.libreoffice.org/#/c/54931/
Comment 9 Commit Notification 2018-05-29 08:11:13 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=41b0c3c789c3423b2e25fd3e219e1c631883fdf5&h=libreoffice-6-1

tdf#117172 - Image context menu Save fails to do anything

It will be available in 6.1.0.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 10 Commit Notification 2018-05-29 08:19:02 UTC
Marco Cecchetti committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b582ec97fbcce88fa1a39bc7fe2a2ae084f30e35&h=libreoffice-6-0

tdf#117172 - Image context menu Save fails to do anything

It will be available in 6.0.5.

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 11 Xisco Faulí 2018-05-31 10:29:54 UTC
Verified in

Version: 6.1.0.0.beta1+
Build ID: 2a0d8106a558845357d39648656e08ec6f091cf8
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Marco Cecchetti, Thanks for fixing this!!