Apache OpenOffice (AOO) Bugzilla – Issue 123405
copying and pasting tables as GDI metafile pastes incomplete table
Last modified: 2017-05-20 10:45:33 UTC
Created attachment 81691 [details] Test file with copied/pasted table as GDI metafile When copying a large--but not huge!--table and then pasting it as a GDI Metafile, the pasted image is missing both rows and columns; I've attached a test file from the file I was working on, and erased data, added rows (my original had issues only with columns, but it's clear now it's an issue of how many rows/columns are copied). The pasted GDI image is right next to the original copied table. Had the same issue before upgrading from OO 3 to OO 4, but usually repeating the copy/paste commands would copy the whole thing eventually...
p.s. the behaviour is exactly the same when pasting the table to other OO apps; verified in Writer and Draw.
Copy from Calc and paste in Draw is truncated. Rev. 1525015 Win 7
Confirmed also in AOO401m5(Build:9714) - Rev. 1524958 2013-09-20 11:54 - Linux x86_64
ALG: First check: Paste special/as Bitmap does paste all, the last two columns get not clipped. Strange, AFAIK the Bitmap is prepared based on the Metafile, thus the Metafile sould work, too. Taking a look...
ALG: The limitation is applied in ScTransferObj::InitDocShell(). There, the PageSize is taken, multiplied by 2 (comment is: 'limit OLE object to double of page size') and then the visible size is calculated and set using SetVisArea. Checking how this can be avoided when target is a Metafile...
ALG: I do not know why the limitation to 2xpagesize is there, thus it would be unsafe to just remove it. But it seems possible to add a parameter to ScTransferObj::InitDocShell() to define if the value for SetVisArea shall be limited in relation to PageSize or not. Checking possibility...
ALG: Works as expected, I can add this with minimal risk impact - only metafile creation will be affected. Preparing commit...
"alg" committed SVN revision 1531041 into trunk: i123405 Allow to not limit size to PageSize when creating Metafile content
ALG: Committed, done. BTW: I could not find out how to paste/special as Metafile in Calc itself, I get the paste special dialog of calc. How is that done? I always pasted to another app for test purposes...
@ALG: I have a small drop-down-menu arrow on my paste button which gives all the 'graphical' paste as options, if I correctly understood what you're asking... and thanks for solving the issue, it's been bugging me for some time...
ALG: @darwinbot: Thanks, found and checked, works now. When you have more stuff bugging you, you are already doing the right thing, tasks welcome!
if pasted as GDI image, some areas are missing on AOO410m15(Build:9761) - Rev. 1585021 refer to 'missing area.png'
Created attachment 83146 [details] missing area
also same issue on AOO410m14(Build:9760) - Rev. 1585624
Just tried with AOO410 (AOO410m16(Build:9762) - Rev. 1585426 2014-04-07 10:29:13 (Mo, 07 Apr 2014)), no problem found. The pasted (as GDI) table looks the same as the selected and copied one. @zhaoshzh: When I look at your screenshot I think you tried to select not only the table (Ao to AQ50) but also the example graphic. To reproduce the task, - select Ao to AQ50 - CTRL-C - PasteSpecial - GDI Metafile Please try again, I see no error anymore.
Reset the assignee to the default "issues@openoffice.apache.org".