Bug 155452 - When pasting image from Firefox in Calc, pasted image is not visible (only paste frame)
Summary: When pasting image from Firefox in Calc, pasted image is not visible (only pa...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
Whiteboard: target:24.2.0 target:7.6.0 target:7.5.6
Depends on:
Blocks: Paste Calc-Images
  Show dependency treegraph
Reported: 2023-05-23 14:15 UTC by Regis Perdreau
Modified: 2023-07-07 09:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

bt (5.26 KB, text/plain)
2023-05-27 22:00 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description Regis Perdreau 2023-05-23 14:15:57 UTC
When pasting image from Firefox in Calc, pasted image is not visible (only paste frame) 

Steps to Reproduce:

Steps to Reproduce:
1.Open Firefox, on the wikipedia.org main page https://en.wikipedia.org/wiki/Main_Page
2.Locate a picture linked with a link 
3. With the right click open menu and do "copy picture"

3.Go to LibreOffice (Windows), open a Calc sheet,  paste picture with Ctrl-V for example
4. A paste frame is displayed with no image inside.

Reproducible: Always

Actual Results:
We can see the paste frame is activated, but no visible picture. 

Expected Results:
Picture is pasted and visible

Reproducible: Always

User Profile Reset: Yes

Additional Info:

Tested in 7.5.2 X64.
Comment 1 Regis Perdreau 2023-05-23 14:17:29 UTC
Works with Edge browser.
Comment 2 Rainer Bielefeld Retired 2023-05-23 17:06:53 UTC Comment hidden (obsolete)
Comment 3 Rainer Bielefeld Retired 2023-05-23 17:09:41 UTC Comment hidden (obsolete)
Comment 4 Rainer Bielefeld Retired 2023-05-23 17:19:39 UTC
Damned, please forget the nonsense I wrote! I tested with writer instead of Calc 😥

For calc the problem with mentioned FF and LibO versions it's reproducible for me

And Yes, works fine with Chromium Version 97.0.4692.71 (Offizieller Build) (64-Bit) 

Works fine when I paste to writer or draw
Comment 5 Rainer Bielefeld Retired 2023-05-23 17:49:26 UTC
Also does not work with Browser SeaMonkey 2.53.16

But WFM with SeaMonkey 2.40

What ever that might mean.

This one looks similar to Bug 134031 - [EDITING]Images copied from Firefox won't paste 

Comment 6 Stéphane Guillou (stragu) 2023-05-24 09:05:45 UTC
(In reply to Rainer Bielefeld Retired from comment #5)
> This one looks similar to Bug 134031 - [EDITING]Images copied from Firefox
> won't paste 
> DUP?

Possibly, we might need to set that one back to New as it was closed as "not a bug" on a misunderstanding, and mark this one as a duplicate.

To be specific about the issue, which looks like it's Windows-specific, can you both please test the steps with these specific images:
- https://en.wikipedia.org/static/images/icons/wikipedia.png
- https://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Hurricane_Wilma_eye.jpg/258px-Hurricane_Wilma_eye.jpg

... to see if the results are different between filetypes.

Thank you!
Comment 7 Regis Perdreau 2023-05-25 13:31:32 UTC
-> none, paste unsuccessful with CTRL-V

-> unsuccessful with CTRL-V

We have to do "paste special" options then Bitmap Image (BMP) to obtain an empty paste frame.
The picture appears only if you click inside the paste frame with the left mouse button. If you release button, the picture is gone away.
Comment 8 QA Administrators 2023-05-26 03:18:16 UTC Comment hidden (obsolete)
Comment 9 Julien Nabet 2023-05-27 21:58:26 UTC
On Win10 with master sources updated today, I could reproduce this.
Noticing this line:

warn:svtools:13036:14080:svtools/source/svhtml/parhtml.cxx:1480: GetOption: unknown HTML option 'decoding'

I took a bt from here with Visual Studio:

svtlo.dll!HTMLParser::GetOptions(const HtmlOptionId * pNoConvertToken) Ligne 1478	C++
 	scfiltlo.dll!ScHTMLLayoutParser::Image(HtmlImportInfo * pInfo) Ligne 1270	C++
 	scfiltlo.dll!ScHTMLLayoutParser::ProcToken(HtmlImportInfo * pInfo) Ligne 1548	C++
 	scfiltlo.dll!ScHTMLLayoutParser::HTMLImportHdl(HtmlImportInfo & rInfo) Ligne 864	C++
 	scfiltlo.dll!ScHTMLLayoutParser::LinkStubHTMLImportHdl(void * instance, HtmlImportInfo & data) Ligne 858	C++
 	editenglo.dll!Link<HtmlImportInfo &,void>::Call(HtmlImportInfo & data) Ligne 111	C++
 	editenglo.dll!EditEngine::CallHtmlImportHandler(HtmlImportInfo & rInfo) Ligne 2853	C++
 	editenglo.dll!EditHTMLParser::NextToken(HtmlTokenId nToken) Ligne 491	C++
 	svtlo.dll!HTMLParser::Continue(HtmlTokenId nToken) Ligne 298	C++
 	svtlo.dll!HTMLParser::CallParser() Ligne 282	C++
 	editenglo.dll!EditHTMLParser::CallParser(EditEngine * pEE, const EditPaM & rPaM) Ligne 84	C++
 	editenglo.dll!ImpEditEngine::ReadHTML(SvStream & rInput, const rtl::OUString & rBaseURL, EditSelection aSel, SvKeyValueIterator * pHTTPHeaderAttrs) Ligne 168	C++
 	editenglo.dll!ImpEditEngine::Read(SvStream & rInput, const rtl::OUString & rBaseURL, EETextFormat eFormat, const EditSelection & rSel, SvKeyValueIterator * pHTTPHeaderAttrs) Ligne 97	C++
 	editenglo.dll!EditEngine::Read(SvStream & rInput, const rtl::OUString & rBaseURL, EETextFormat eFormat, SvKeyValueIterator * pHTTPHeaderAttrs) Ligne 1506	C++
 	scfiltlo.dll!ScHTMLLayoutParser::Read(SvStream & rStream, const rtl::OUString & rBaseURL) Ligne 280	C++
 	scfiltlo.dll!ScEEImport::Read(SvStream & rStream, const rtl::OUString & rBaseURL) Ligne 84	C++
 	sclo.dll!ScImportExport::HTML2Doc(SvStream & rStrm, const rtl::OUString & rBaseURL) Ligne 2634	C++
>	sclo.dll!ScImportExport::ImportStream(SvStream & rStrm, const rtl::OUString & rBaseURL, SotClipboardFormatId nFmt) Ligne 426	C++
 	sclo.dll!ScViewFunc::PasteDataFormat(SotClipboardFormatId nFormatId, const com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> & rxTransferable, short nPosX, long nPosY, const Point * pLogicPos, bool bLink, bool bAllowDialogs) Ligne 382	C++
 	sclo.dll!ScViewFunc::PasteFromSystem(SotClipboardFormatId nFormatId, bool bApi) Ligne 745	C++
 	sclo.dll!ScViewFunc::PasteFromSystem() Ligne 601	C++
 	sclo.dll!ScClipUtil::PasteFromClipboard(ScViewData & rViewData, ScTabViewShell * pTabViewShell, bool bShowDialog) Ligne 87	C++
 	sclo.dll!ScCellShell::ExecuteEdit(SfxRequest & rReq) Ligne 1391	C++
Comment 10 Julien Nabet 2023-05-27 22:00:59 UTC
Created attachment 187550 [details]

Sorry, I hadn't thought the copy-paste of the bt directly in the comment would be so badly formatted.
Comment 11 Regis Perdreau 2023-06-09 14:38:16 UTC
tested in Version: (X86_64) / LibreOffice Community
Build ID: a0ce0d4418ad92dd0e3a70cf698c549b544d6084
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded

the paste action in paste special with bmp format is working now.( we have not the empty paste frame described previously)
But not the direct ctrl-v paste action.
Comment 12 Regis Perdreau 2023-06-20 12:27:35 UTC
it works with Edge...
Comment 13 Stéphane Guillou (stragu) 2023-06-20 20:55:29 UTC
Setting to Windows-only, and based on bug Bug 134031 Comment 9, setting first affected version as

Would be great if you could test earlier versions to see if it is a regression.
Comment 14 Aron Budea 2023-06-20 21:28:44 UTC
Already in, not a regression.

The following bug fixes could be pointers:
author		Henry Castro <hcvcastro@gmail.com>	2015-02-22 19:30:42 -0400
committer	Caolán McNamara <caolanm@redhat.com>	2015-02-27 12:08:24 +0000

"Resolves tdf#71095 Calc doesn't paste images copied from some web browsers"

author		Szymon Kłos <szymon.klos@collabora.com>	2022-05-27 14:50:21 +0200
committer	Andras Timar <andras.timar@collabora.com>	2022-05-27 20:32:34 +0200

"tdf#145875 don't open Insert section dialog when pasting image"
Comment 15 Aron Budea 2023-07-02 00:59:54 UTC
Should be fixed by the following commits in 24.02 and 7.6.0:

author		Luigi Iucci <luigi.iucci@collabora.com>	2023-06-21 10:16:16 +0200
committer	Henry Castro <hcastro@collabora.com>	2023-06-26 16:40:14 +0200

"problem pasting to calc an image copied from firefox (windows)"

author		Luigi Iucci <luigi.iucci@collabora.com>	2023-06-21 10:16:16 +0200
committer	Xisco Fauli <xiscofauli@libreoffice.org>	2023-06-28 13:10:52 +0200

"problem pasting to calc an image copied from firefox (windows)"
Comment 16 Commit Notification 2023-07-07 09:16:19 UTC
Luigi Iucci committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":


tdf#155452 problem pasting to calc an image copied from firefox (windows)

It will be available in 7.5.6.

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

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