Bug 99507 - Paste Individual Image From MS Word fails (Paste special as GDI image works and should be default) per comment 11 and comment 12
Summary: Paste Individual Image From MS Word fails (Paste special as GDI image works a...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
: 108966 129561 129563 133467 (view as bug list)
Depends on:
Blocks: Paste-From-MSO
  Show dependency treegraph
 
Reported: 2016-04-26 10:26 UTC by christian.rufener
Modified: 2020-06-10 10:27 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Attachments
.clp file from image copied from MS Word 2013 (776.28 KB, application/octet-stream)
2016-05-05 14:58 UTC, Buovjaga
Details
Windows clipboard PNG image clipped from PowerPoint (96.75 KB, image/png)
2018-09-19 22:50 UTC, V Stuart Foote
Details
Windows clipboard PNG image clipped from Word (91.11 KB, image/png)
2018-09-19 22:50 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christian.rufener 2016-04-26 10:26:21 UTC
Pasting an image from MS Powerpoint or MS Word does not work. It works though when using Edit-Paste Special - "GDI Metafile" or "Bitmap".
Reproduce:
(Windows 7/ MS Office 2010 and above)

Create new writer document
Place a picture in MS Word or PPT
Copy image/picture to clipboard
Attempt to paste in LO Writer
=> No effect.
Comment 1 Buovjaga 2016-05-05 14:58:34 UTC
Created attachment 124866 [details]
.clp file from image copied from MS Word 2013
Comment 2 Buovjaga 2016-05-05 14:59:23 UTC
Confirmed.

Win 8.1
MSO 2013
LibO Version: 5.2.0.0.alpha1+
Build ID: 16777b6bb0267c2b0602f1007a1e1fecac81329b
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-04-29_05:45:00
Locale: fi-FI (fi_FI)
Comment 3 Roeland 2016-05-14 13:03:20 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2016-05-14 15:33:48 UTC Comment hidden (obsolete)
Comment 5 Luke 2018-09-18 19:31:02 UTC
*** Bug 108966 has been marked as a duplicate of this bug. ***
Comment 6 Luke 2018-09-18 19:35:14 UTC
This is not the same as bug 35176. Copying individual images and copying a document with embedded images are totally different. bug 35176 is about documents with images. This bug is about images.
Comment 7 Daveo 2018-09-18 20:15:01 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2018-09-19 08:59:32 UTC Comment hidden (obsolete)
Comment 9 Thomas Lendo 2018-09-19 15:17:47 UTC
In my installation this bug still exists and I'm curious that an issue that is reproduced by many people is dismissed as 'local issue'. I'm strongly for reopening this bug as NEW!

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 18c5089df091bddeb8c2dc339776671964389040
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-12_23:24:12
Locale: de-AT (de_AT); Calc: CL

Copying a single picture from attachment 92563 [details] or attachment 144992 [details] doesn't work for me. Tested with MSO Word & Excel 2013 on Windows 10 Pro (x64).

More curious, in some cases e.g. if I copy an embedded image from an MS Outlook e-mail or an image/text combination (of bug 35176) from MSO Word then I can paste it with ctrl+v bug not with the menu, toolbar or context menu. These commands are greyed out.
Comment 10 Luke 2018-09-19 15:36:18 UTC Comment hidden (obsolete)
Comment 11 Luke 2018-09-19 15:42:03 UTC
Steps to Reproduce:
1. In a MS Word, open or create a document with an image, like attachment 144992 [details] 
2. Select ONLY the image. CTRL+C (only image, no text should be in clipboard)
3. In Writer, New document
4. CTRL+V

Hopefully this will clear up some confusion
Comment 12 V Stuart Foote 2018-09-19 22:48:58 UTC
So here is an oddity--the same image pasted into PowerPoint 2016 and into Word 2016 has different results on image copy and paste, <Ctrl>+V into empty Writer 6.1.1.2 document.

Attaching clips of NirSoft InsideClipboard stack of what PowerPoint, and then what Word place onto clipboard.

The sequences are different between the two--the PowerPoint clip will paste image to Writer; while the Word clip will not. Looks like Word hits the empty CF_BITMAP bitmap first while the PowerPoint hits the PNG stream.

Is that why the paste from PowerPoint clip works and the paste from Word fails?

The Art::GVML Clipformat -- ID 49962 is an internal non-OOXML MS-ODRAWXML [1] holding a ZIP of the embedded image.

=-ref-=
http://interoperability.blob.core.windows.net/files/MS-ODRAWXML/[MS-ODRAWXML]-150904.pdf
Comment 13 V Stuart Foote 2018-09-19 22:50:05 UTC
Created attachment 145044 [details]
Windows clipboard PNG image clipped from PowerPoint
Comment 14 V Stuart Foote 2018-09-19 22:50:30 UTC
Created attachment 145045 [details]
Windows clipboard PNG image clipped from Word
Comment 15 V Stuart Foote 2018-09-19 23:05:06 UTC
(In reply to V Stuart Foote from comment #12)
> The sequences are different between the two--the PowerPoint clip will paste
> image to Writer; while the Word clip will not. Looks like Word hits the
> empty CF_BITMAP bitmap first while the PowerPoint hits the PNG stream.
> 
> Is that why the paste from PowerPoint clip works and the paste from Word
> fails?
> 

@Miklos, *

If that is issue, would there be some way to guard against zero length CF_BITMAP, or other "standard" clipboard formats that could trip things up?

Also, for interoperability, would it be worth creating a module to handle the Art::GVML Clipformat? Its been around forever [1]

=-ref-=
[1] https://bugs.documentfoundation.org/show_bug.cgi?id=35176#c2
Comment 16 Miklos Vajna 2018-09-20 07:26:07 UTC
I guess the best would be to figure out what MSO uses between their apps for copy&paste and make sure we read the same.
Comment 17 Xisco Faulí 2018-10-17 13:39:47 UTC
I doesn't work in

Versión: 4.4.0.3
Id. de compilación: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Configuración regional: es_ES

but it does in

Versión: 4.1.6.2
Id. de compilación: 40ff705089295be5be0aae9b15123f687c05b0a
Comment 18 QA Administrators 2019-10-18 02:39:26 UTC Comment hidden (obsolete)
Comment 19 Timur 2019-10-18 07:50:18 UTC
Repro 6.4+ in Windows for paste from MS Word to LO Writer per steps in comment 11.
As noted in Comment 12, paste same image from MS Excel or Powerpoint works.
Comment 20 Thomas Lendo 2019-12-23 12:06:45 UTC
*** Bug 129563 has been marked as a duplicate of this bug. ***
Comment 21 Timur 2019-12-24 11:34:47 UTC
*** Bug 129561 has been marked as a duplicate of this bug. ***
Comment 22 Timur 2020-05-14 12:16:46 UTC
This seems to work in 7.0+. I'll close but please test yourself.
Comment 23 Timur 2020-06-09 12:11:56 UTC
*** Bug 133467 has been marked as a duplicate of this bug. ***