Bug 128583 - Can not paste Picture (Windows Metafile) but MS Word can
Summary: Can not paste Picture (Windows Metafile) but MS Word can
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Clipboard
  Show dependency treegraph
 
Reported: 2019-11-04 11:18 UTC by Ferry Toth
Modified: 2023-06-13 03:12 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Saved clipboard picture clipbrd.exe (70.18 KB, application/octet-stream)
2019-11-04 11:19 UTC, Ferry Toth
Details
Document created by Word with pasted image (40.00 KB, application/msword)
2019-11-04 11:20 UTC, Ferry Toth
Details
Converted Word document with pasted image (12.05 KB, application/vnd.oasis.opendocument.text)
2019-11-04 11:21 UTC, Ferry Toth
Details
Screenshots (258.73 KB, application/pdf)
2020-12-17 11:25 UTC, Ferry Toth
Details
Inside clipbboard (64.19 KB, application/octet-stream)
2020-12-17 15:09 UTC, Ferry Toth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferry Toth 2019-11-04 11:18:01 UTC
Description:
Cadence Orcad Schematics copies data to the clipboard in Picture and in Enhanced Metafile format (as well as some native formats). When pasting this into MS Word 'paste as' shows Picture (Windows Metafile) as the only format and paste into the document works fine. LibO 'paste as' shows GDI Metafile. However, when pasting nothing happens (no picture is inserted into the document).

However, after pasting into Word and saving as doc, the file can be opened by LibO.

Steps to Reproduce:
1. You need either Cadence Orcad Schematics or install clipbrd.exe from a Windows XP computer (or download from this web site file:///home/ferry/https:%E2%81%84%E2%81%84www.urtech.ca%E2%81%842016%E2%81%8404%E2%81%84solved-where-is-the-clipboard-viewer-in-windows-10%E2%81%84)
2. Using clipbrd.exe open the orcad.CLP into your clip board
3. Paste into a Writer document

Actual Results:
Nothing is pasted

Expected Results:
Drawing is pasted. See attached Orcad.doc (created by WinWord) and Orcad.odt (converted from Orcad.doc by LibO).


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Ferry Toth 2019-11-04 11:19:46 UTC
Created attachment 155500 [details]
Saved clipboard picture clipbrd.exe
Comment 2 Ferry Toth 2019-11-04 11:20:45 UTC
Created attachment 155501 [details]
Document created by Word with pasted image
Comment 3 Ferry Toth 2019-11-04 11:21:42 UTC
Created attachment 155502 [details]
Converted Word document with pasted image
Comment 4 Ferry Toth 2019-11-04 11:26:22 UTC
Sorry for the broken link in #1, that was an unrelated clipboard issue :-)

Correct link for downloading clipbrd.exe is:
https://www.urtech.ca/2016/04/solved-where-is-the-clipboard-viewer-in-windows-10/

(Note: I haven't tested this for viruses. I can upload clipbrd.exe that I extracted from a Windows XP installation, but I think that might not be legal)
Comment 5 Dieter 2019-11-06 07:51:37 UTC
1. I saved image from comment 1.
2. I opened it with IrfanView
3. Copy => Paste in LO

Result: No problem

Works in

Version: 6.4.0.0.alpha1 (x64)
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

and also in

Version: 6.3.3.1 (x64)
Build ID: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

I'm not an expert in this topic, but are you sure, that .clp-file is the same as WMF/EMF File?
Comment 6 Ferry Toth 2019-12-02 22:00:32 UTC
Yes.

You are not copying the original image from Orcad -> LibO, you are pasting to IrfanView and then placing again on the clipboard and pasting that into LibO.

This is not the issue. If I place the image from Orcad into MS Word, and copy it from Word to LibO it works as it should.

The issue is: Orcad -> LibO is not working. While Orcad -> Word works, suggesting Orcad is doing something that LibO does not expect, but is apparently correct.

I especially saved the clipboard file so that someone with debugging capability can reproduce what this particular corner case is.
Comment 7 QA Administrators 2019-12-03 03:33:29 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2020-04-27 13:33:40 UTC
Inside Clipboard can load .clp files, but I tried it and I see nothing with your file: https://www.nirsoft.net/utils/inside_clipboard.html
Does it work for you? Maybe you should try saving the .clp again from Inside Clipboard instead?
Comment 9 Julien Nabet 2020-06-19 07:26:03 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2020-12-17 03:50:37 UTC Comment hidden (obsolete)
Comment 11 Ferry Toth 2020-12-17 11:24:25 UTC Comment hidden (obsolete)
Comment 12 Ferry Toth 2020-12-17 11:25:02 UTC
Created attachment 168252 [details]
Screenshots
Comment 13 Buovjaga 2020-12-17 12:06:19 UTC
(In reply to Ferry Toth from comment #11)
> @Buovjaga I went into a quite detailed description. Do you really think I
> didn't try this myself? The problem is you are not following my steps...
> 
> I attached a new 'LibO 7.0.3.pdf' now with screenshots, so you can see. Now
> i tried with the latest LibO 7.0.3. It seems it pastes the clipbaord when
> the clipboard is loaded from file, but not when the clipboard is copied
> directly from Orcad :-( So, some progress, but making more difficult to
> reproduce.
> 
> Nothing changed on the Orcad side, I can paste into Inkscape, Word.
> 
> I also tried your suggestion InsideClipboard after loading clipboard from
> file. See attachment for the result.

I think you misunderstood a bit. I did not mean that you didn't try. I meant that I wanted you to
1. Record your clipboard again, this time saving it with Inside Clipboard
2. Attach the .clp file to this report

At least your screenshot shows *something* for Inside Clipboard and it would be interesting to take a look at it.
Comment 14 Ferry Toth 2020-12-17 15:07:48 UTC
Alright then. This time I went to and old WinXP vbox fired up Orcad 16.2 (old version). Copied schematic to clipboard, saved with InsideClipboard as clp. See attached Orcad16.2.clp.

Note: InsideClipboard shows on 2 formats on copy (CF_METAFILEPICT, id 3) and Orcad Schemtic Page Editor, id 49488). However after save and load it shows only the latter. Of course LibO shows the clipboard as empty.

The meta file is shown as size 16:
00000000   08 00 00 00 FD 13 00 00 40 0F 00 00 77 0A 26 1D    ....ý...@...w.&.

Which can't be true as even Wordpad will allow me to paste it.
Comment 15 Ferry Toth 2020-12-17 15:09:31 UTC
Created attachment 168255 [details]
Inside clipbboard
Comment 16 Ferry Toth 2020-12-17 15:23:12 UTC
But not after save / reload with Inside Clipboard. 

When i save and reload with clipbrd.exe, CF_METAFILEPICT is shown as handle type "null", Size 0. And I can indeed paste the cliboard into Wordpad.

1) It looks like Inside Clipboard is missing something, and that thing got built into LibO. 

2) Orcad must be doing something wrong, but all other apps don't care and just paste the EMF.

3) clibbrd.exe is able to fix whatever Orcad does wrong when you save and reload. Causing even LibO to be able to paste.
Comment 17 Timur 2022-05-17 13:09:59 UTC
We have a long standing bug still as Unconfirmed. 
IIUC, only way to reproduce is to install Orcad, as via clipboards paste works. 
But that's not a realistic to expect from any volunteer dev. 
I think we may close, for example as NotOurBug.

Bug 122072 gives a possible hint: paste to Draw, than to Writer. 
This can well be a duplicate.
Comment 18 Ferry Toth 2022-05-17 14:46:52 UTC
It's definitely not resolved. And it's not a duplicate of Bug 122072. Pasting in Draw is not possible in the same way as it is not in Writer: 

The paste button indicates there is something to paste, LibO 'paste as' shows GDI Metafile. However, when pasting nothing happens (no picture is inserted into the document).

Typically, MS word, MS ClipBook, MS Write can paste it.

Unfortunately Inside Clipboard has it's own bugs and is not helping us to solve this bug.

Maybe you have another clipboard tool that we can try?
Comment 19 Ferry Toth 2022-05-17 15:07:39 UTC
I just tried Karen's Clipboard Viewer, it also just views the schematic copied from Orcad, as WMF only (no Text, BMP, DIB available).

It does not allow me to save the clipboard. But that does have source available, may be can easily save to file?
Comment 20 Buovjaga 2022-05-17 17:33:38 UTC
(In reply to Ferry Toth from comment #18)
> Maybe you have another clipboard tool that we can try?

Here is one that is actively developed and works on all operating systems: https://hluk.github.io/CopyQ/
Comment 21 raal 2022-11-13 21:00:51 UTC
(In reply to Buovjaga from comment #20)
> (In reply to Ferry Toth from comment #18)
> > Maybe you have another clipboard tool that we can try?
> 
> Here is one that is actively developed and works on all operating systems:
> https://hluk.github.io/CopyQ/

Please try this one.
Comment 22 QA Administrators 2023-05-13 03:19:09 UTC Comment hidden (obsolete)
Comment 23 QA Administrators 2023-06-13 03:12:10 UTC
Dear Ferry Toth,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp